diff --git a/trunk/.mpd.conf b/trunk/.mpd.conf deleted file mode 100644 index bf47811ab..000000000 --- a/trunk/.mpd.conf +++ /dev/null @@ -1 +0,0 @@ -secretword=Nothing diff --git a/trunk/.project b/trunk/.project deleted file mode 100644 index daf60532e..000000000 --- a/trunk/.project +++ /dev/null @@ -1,11 +0,0 @@ - - - trunk - - - - - - - - diff --git a/trunk/AUTHORS b/trunk/AUTHORS index ff1c0cec0..4b59b102d 100644 --- a/trunk/AUTHORS +++ b/trunk/AUTHORS @@ -1,12 +1,11 @@ -Jean-Charles Boisson +Main developers: + Sébastien Cahon -Clive Canape -Laetitia Jourdan -Thomas Legrand -Arnaud Liefooghe -Nouredine Melab -El-Ghazali Talbi -Alexandru-Adrian Tantar -Sebastien Verel Jérémie Humeau -Karima Boufaras +Arnaud Liefooghe +Sebastien Verel +Nourdine Melab + +Team leader: + +El-Ghazali Talbi diff --git a/trunk/CMakeLists.txt b/trunk/CMakeLists.txt new file mode 100644 index 000000000..92f504d75 --- /dev/null +++ b/trunk/CMakeLists.txt @@ -0,0 +1,90 @@ +# ParadiseO + +###################################################################################### +### 0) Check the CMake version +###################################################################################### + +cmake_minimum_required(VERSION 2.8 FATAL_ERROR) + +###################################################################################### +### 1) Define the project +###################################################################################### + +## Name +project("ParadisEO") + +## Language +enable_language(CXX) + +## Test the presence of a compiler +if("${CMAKE_CXX_COMPILER}" STREQUAL "" OR "${CMAKE_C_COMPILER}" STREQUAL "") + message(FATAL_ERROR "No compiler founded !") +endif() + +## Versioning +set(VERSION_MAJOR 2) +set(VERSION_MINOR 0) +set(VERSION_PATCH 0) + +###################################################################################### +### 2) Check dependencies +###################################################################################### + +## Optional +include(FindDoxygen OPTIONAL) + +###################################################################################### +### 3) Include CMake files +###################################################################################### + +## Configuration file for building type and flags +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake) + +## Macro file +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Macro.cmake) + +## Custom Targets file +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Target.cmake) + +###################################################################################### +### 4) Define and add module paths : EO, MO, MOEO +###################################################################################### + +## Paths +set(EO_SRC_DIR "${CMAKE_SOURCE_DIR}/eo" CACHE PATH "ParadisEO-EO source directory" FORCE) +set(EO_BIN_DIR "${CMAKE_BINARY_DIR}/eo" CACHE PATH "ParadisEO-EO binary directory" FORCE) + +set(MO_SRC_DIR "${CMAKE_SOURCE_DIR}/mo" CACHE PATH "ParadisMO-MO source directory" FORCE) +set(MO_BIN_DIR "${CMAKE_BINARY_DIR}/mo" CACHE PATH "ParadisMO-MO binary directory" FORCE) + +set(MOEO_SRC_DIR "${CMAKE_SOURCE_DIR}/moeo" CACHE PATH "ParadisMOEO-MOEO source directory" FORCE) +set(MOEO_BIN_DIR "${CMAKE_BINARY_DIR}/moeo" CACHE PATH "ParadisMOEO-MOEO binary directory" FORCE) + +set(PROBLEMS_SRC_DIR "${CMAKE_SOURCE_DIR}/problems" CACHE PATH "Problems dependant source directory" FORCE) + +set(CMAKE_BASE_SOURCE_DIR ${CMAKE_SOURCE_DIR}) + +## EO Module +set(EO_MODULE_NAME "Evolving Object") +set(CMAKE_SOURCE_DIR ${EO_SRC_DIR}) +add_subdirectory(${CMAKE_SOURCE_DIR}) + +if(NOT EO_ONLY) + ## MO Module + set(MO_MODULE_NAME "ParadisEO-MO") + set(CMAKE_SOURCE_DIR ${MO_SRC_DIR}) + add_subdirectory(${MO_SRC_DIR}) + + ## MOEO Module + set(MOEO_MODULE_NAME "ParadisEO-MOEO") + set(CMAKE_SOURCE_DIR ${MOEO_SRC_DIR}) + add_subdirectory(${MOEO_SRC_DIR}) +endif() + +###################################################################################### +### 5) Packaging : only in release ! +###################################################################################### + +if(${CMAKE_BUILD_TYPE} STREQUAL "Release") + include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Package.cmake) +endif() diff --git a/trunk/paradiseo-moeo/CTestConfig.cmake b/trunk/CTestConfig.cmake similarity index 87% rename from trunk/paradiseo-moeo/CTestConfig.cmake rename to trunk/CTestConfig.cmake index 465d208d6..d0c3e1484 100644 --- a/trunk/paradiseo-moeo/CTestConfig.cmake +++ b/trunk/CTestConfig.cmake @@ -1,7 +1,7 @@ set(CTEST_PROJECT_NAME "ParadisEO") set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") -set(CTEST_DROP_METHOD "http") +set(CTEST_DROP_METHOD "https") set(CTEST_DROP_SITE "cdash.inria.fr") set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ParadisEO") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/trunk/INSTALL b/trunk/INSTALL new file mode 100644 index 000000000..1f9a17964 --- /dev/null +++ b/trunk/INSTALL @@ -0,0 +1,138 @@ + +========================================================================================== + INSTALLING PARADISEO +========================================================================================== + +There is several ways to install ParadisEO, according to your needs. + +========================================================================================== + WINDOWS +========================================================================================== + +On Windows, and for compatibility reason, ParadisEO supply support only for MinGW. +Feel free to test with another compiler and to send us you report. + +------------------------------------------------------------------------------------------ +1) WITH EXE +------------------------------------------------------------------------------------------ + +The simpliest way ton install ParadisEO on Windows is to use the NSIS installer. +We would like to draw your attention on the fact that the PATH variable will not +be affected by the installation in order to allow anybody to install ParadisEO +without administration right. To have further information about how to use ParadisEO +in your project, see the tutorial on ParadisEO website (http://paradiseo.gforge.inria.fr/). + +------------------------------------------------------------------------------------------ +2) WITH CMAKE +------------------------------------------------------------------------------------------ + +You can also install ParadisEO using CMake. For that you must have a compiler installed, +and obviously cmake. +Then, follow UNIX instructions. + +========================================================================================== + UNIX +========================================================================================== +------------------------------------------------------------------------------------------ +1. WITH CMAKE +------------------------------------------------------------------------------------------ +1.0 DEPENDENCIES +------------------------------------------------------------------------------------------ +Required +- Compiler with OpenMP implementation (hence, Clang isn't supported atm). + +Optionnal +- Doxygen for documentation +- lcov for coverage + +------------------------------------------------------------------------------------------ +1.1 FAST INSTALLATION +------------------------------------------------------------------------------------------ + +After getting ParadisEO sources from repository, you have to create a build directory in order to keep your file tree clean. + +> mkdir build +> cd build + +To make the installation easier, ParadisEO propose you two installation types which are "Full" and "Min". +Full corresponds examples / lessons, tests and obviously libraries. +Min corresponds to libraries and headers. + +You can specified an installation type by adding the following declaration to cmake : + +> cmake .. -DINSTALL_TYPE=full +> cmake .. -DINSTALL_TYPE=min + +Actually, by default the generator will be "Unix Makefiles" and cmake will try to look for a C++ compiler. +Be sure you have make installed, or choose an alternative according to your configuration. +To know available generators on your computer, type cmake -help. If you are on Windows and you use MinGW, you have to specify it explicitly by adding -G "MinGW Makefiles". + +To compile ParadisEO simply compile sources using your generator. For instance, if you are using Unix Makefiles, type make. + +------------------------------------------------------------------------------------------ +1.2 BUILD TYPE +------------------------------------------------------------------------------------------ + +There are 2 types of build : Release or Debug. +To explicitly change the type, add -DCMAKE_BUILD_TYPE=Debug for instance. + +------------------------------------------------------------------------------------------ +1.3 INSTALLATION +------------------------------------------------------------------------------------------ + +WARNING : This require administration rights. + +To install ParadisEO in standard paths (such as /usr/lib for lib and /usr/include for headers on UNIX-like) : + +> make install + +------------------------------------------------------------------------------------------ +2. DOCUMENTATION +------------------------------------------------------------------------------------------ + +There is 2 ways to build ParadisEO documentation : module by module, or all the documentation. + +Targets are : +doc for all documentations +doc-eo for building EO documentation +doc-mo for MO +doc-moeo for MOEO + +Each documentation are generated separatly in the module build folder. +For instance, after the generation of the MO documentation, you will find it in build/paradise-mo/doc. + +------------------------------------------------------------------------------------------ +3. LESSONS / EXAMPLES +------------------------------------------------------------------------------------------ + +Examples and lessons are generated by default. +If you want to disable lessons manually, you have to specify -DENABLE_CMAKE_TESTING=false to CMake. +If you want to build a specific lesson or example, you can check the list of available targets with make help. + +All lessons are build on the same pattern : Lesson. +For instance, make moLesson4 will build the Lesson 4 from the MO module. +Easy, isn't it ? + +------------------------------------------------------------------------------------------ +4. TESTS +------------------------------------------------------------------------------------------ +4.1 CTESTS +------------------------------------------------------------------------------------------ + +By performing tests, you can check your installation. +Testing is disable by default, except if you build with the full install type. +To enable testing, define -DENABLE_TESTING when you launch cmake. + +To perform tests simply type ctest ou make test. + +------------------------------------------------------------------------------------------ +4.2 REPORTING +------------------------------------------------------------------------------------------ + +Feel free to send us reports about building, installation, tests and profiling in order to help us to improve compatibilty and installation process. Sending reports is very simple : + +> ctest -D Experimental + +WARNING : Reports are anonymous. CTest will also send informations about your configuration such as OS, CPU frequency, etc. + + diff --git a/trunk/OldDartConfig.cmake b/trunk/OldDartConfig.cmake deleted file mode 100644 index c7d4bee30..000000000 --- a/trunk/OldDartConfig.cmake +++ /dev/null @@ -1,10 +0,0 @@ - -############################################################################# -# Dart config for report submission -############################################################################# - -SET (DROP_METHOD "xmlrpc") -SET (DROP_SITE "http://dart.irisa.fr") -SET (DROP_LOCATION "ParadisEO") -SET (NIGHTLY_START_TIME "23:00:00 WEST") -############################################################################# \ No newline at end of file diff --git a/trunk/README b/trunk/README index fa79c9af5..c989a97b5 100644 --- a/trunk/README +++ b/trunk/README @@ -3,17 +3,23 @@ RELEASE ========================================================================================== -The current release is paradisEO-1.4 +The current release is paradisEO-2.0 ========================================================================================== INSTALLATION ========================================================================================== -The basic installation procedure must be done in the directory -which contains the extracted archive. +The basic installation procedure must be done in a separatly folder in order to keep +your file tree clean. - --> Example : bash installParadiseo.sh +1) mkdir build +2) cd build +3) cmake .. +4) make +5) Take a cofee. +6) Congratulation, ParadiseEO is installed ! -Please try source installParadiseo.sh --help for further information +Please refer to paradisEO website or INSTALL file for further information about +installation types and options. ========================================================================================== DIRECTORY STRUCTURE @@ -21,41 +27,34 @@ Please try source installParadiseo.sh --help for further information After unpacking the archive file, you should end up with the following structure: -.../ Installation directory (specified with ./installParadiseo.sh) +.../ | | +-- AUTHORS Author list | | + +-- cmake/ CMake dir + | + | + +-- CMakeLists.txt For building process + | + | + +-- CTestConfig.cmake For testing process + | + | +-- INSTALL INSTALL file | | - +-- install.cmake ParadisEO main install config file + +-- LICENCE Licence contents | | - +-- installParadiseo.sh Install script - | - +-- lib/ - | | +-- /libxml2-2.7.3.tar.gz LIBXML2 archive (required for ParadisEO-PEO) - | | +-- /mpich2-1.0.8.tar.gz MPICH2 archive (required for ParadisEO-PEO) + +-- paradiseo-eo paradiseo-eo dir | | - + LICENCE Licence contents + +-- paradiseo-mo paradiseo-mo dir | | - +-- paradiseo-eo paradiseo-eo dir - | - | - +-- paradiseo-mo paradiseo-mo dir - | - | - +-- paradiseo-moeo paradiseo-moeo dir - | - | - +-- paradiseo-old-mo paradiseo-old-mo dir - | - | - +-- paradiseo-peo paradiseo-peo dir + +-- paradiseo-moeo paradiseo-moeo dir | | +-- problems classical problems evaluation functions diff --git a/trunk/cmake/Config.cmake b/trunk/cmake/Config.cmake new file mode 100644 index 000000000..ee6302190 --- /dev/null +++ b/trunk/cmake/Config.cmake @@ -0,0 +1,92 @@ +###################################################################################### +### 0) Detect the configuration +###################################################################################### + +# Inspired by Boost and SFML CMake files +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(MACOSX 1) + + # detect OS X version. (use '/usr/bin/sw_vers -productVersion' to extract V from '10.V.x'.) + execute_process (COMMAND /usr/bin/sw_vers -productVersion OUTPUT_VARIABLE MACOSX_VERSION_RAW) + string(REGEX REPLACE "10\\.([0-9]).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}") + if(${MACOSX_VERSION} LESS 5) + message(FATAL_ERROR "Unsupported version of OS X : ${MACOSX_VERSION_RAW}") + return() + endif() +endif() + +# Determine architecture +include(CheckTypeSize) +check_type_size(void* SIZEOF_VOID_PTR) +if("${SIZEOF_VOID_PTR}" STREQUAL "4") + set(ARCH x86) + set(LIB lib32) +elseif("${SIZEOF_VOID_PTR}" STREQUAL "8") + set(ARCH x86_64) + set(LIB lib64) +else() + message(FATAL_ERROR "Unsupported architecture") + return() +endif() + +###################################################################################### +### 0) Define general CXX flags for DEBUG and RELEASE +###################################################################################### + +add_definitions(-DDEPRECATED_MESSAGES) +set(CMAKE_CXX_FLAGS_DEBUG "-Wunknown-pragmas -O0 -g -Wall -Wextra -ansi -pedantic -fopenmp -std=c++0x" CACHE STRING "" FORCE) +set(CMAKE_CXX_FLAGS_RELEASE "-Wunknown-pragmas -O2 -fopenmp -std=c++0x" CACHE STRING "" FORCE) + +###################################################################################### +### 1) Define installation type +###################################################################################### + +if(INSTALL_TYPE STREQUAL full) + set(ENABLE_CMAKE_EXAMPLE "true" CACHE PATH "ParadisEO examples") + set(ENABLE_CMAKE_TESTING "true" CACHE PATH "ParadisEO tests") +elseif(INSTALL_TYPE STREQUAL min) + set(ENABLE_CMAKE_EXAMPLE "false" CACHE PATH "ParadisEO examples") + set(ENABLE_CMAKE_TESTING "false" CACHE PATH "ParadisEO tests") +endif() + +###################################################################################### +### 2) Define profiling flags +###################################################################################### + +if(PROFILING) + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg --coverage" CACHE STRING "" FORCE) + set(ENABLE_CMAKE_TESTING "true" CACHE STRING "" FORCE) +endif(PROFILING) + +###################################################################################### +### 3) Testing part +###################################################################################### + +if(ENABLE_CMAKE_TESTING) + enable_testing() + include(CTest REQUIRED) +endif(ENABLE_CMAKE_TESTING) + +###################################################################################### +### 4) Set DEBUG or RELEASE build type depending testing and profiling +###################################################################################### + +if(NOT DEFINED DEBUG) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE) +else( NOT DEFINED DEBUG) + set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "" FORCE) +endif(NOT DEFINED DEBUG) + +###################################################################################### +### 5) Build examples ? +###################################################################################### + +set(ENABLE_CMAKE_EXAMPLE "true" CACHE PATH "ParadisEO examples") + +###################################################################################### +### 6) Determine prefix for installation +###################################################################################### + +if(UNIX) + set(INSTALL_SUB_DIR /paradiseo) +endif() diff --git a/trunk/cmake/Macro.cmake b/trunk/cmake/Macro.cmake new file mode 100644 index 000000000..f2211e51c --- /dev/null +++ b/trunk/cmake/Macro.cmake @@ -0,0 +1,38 @@ +###################################################################################### +### add_lesson(module target files) +### Macro to add a lesson to a specific module. +### Currently module must be "mo" or "moeo". +### The target name will be prefixed by module name. +### Paramaters files must have the same name as cpp file. No need to have a .param +### file. CMake will check if such a file exists. +###################################################################################### + +macro(add_lesson module target files) + foreach(i ${files}) + if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${i}.param) + add_executable(${i} ${i}.cpp) + else(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${i}.param) + if(${CMAKE_VERBOSE_MAKEFILE}) + message(STATUS "Copying ${i}.param") + endif(${CMAKE_VERBOSE_MAKEFILE}) + execute_process( + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_CURRENT_SOURCE_DIR}/${i}.param + ${CMAKE_CURRENT_BINARY_DIR}/${i}.param) + add_executable(${i} + ${i}.cpp + ${CMAKE_CURRENT_BINARY_DIR}/${i}.param) + endif(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${i}.param) + if(${module} MATCHES mo) + target_link_libraries(${i} eoutils ga eo) + elseif(${module} MATCHES moeo) + target_link_libraries(${i} moeo flowshop eo eoutils) + endif() + install(TARGETS ${i} RUNTIME DESTINATION share${INSTALL_SUB_DIR}/${module}/tutorial/${target} COMPONENT examples) + endforeach(i) + + # Custom target + add_custom_target(${module}${target} DEPENDS + ${files} + ${files}.param) +endmacro() diff --git a/trunk/cmake/Package.cmake b/trunk/cmake/Package.cmake new file mode 100644 index 000000000..d6bec7ebe --- /dev/null +++ b/trunk/cmake/Package.cmake @@ -0,0 +1,104 @@ +###################################################################################### +### 0) Set up components +###################################################################################### + +set(CPACK_COMPONENTS_ALL + libraries + headers + tests + examples + doc +) +set(CPACK_ALL_INSTALL_TYPES Minimal Full) + +###################################################################################### +### 1) Describing components +###################################################################################### + +set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries") +set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "ParadisEO Libraries : EO, MO, MOEO") +set(CPACK_COMPONENT_LIBRARIES_INSTALL_TYPES Minimal Full) +set(CPACK_COMPONENT_LIBRARIES_REQUIRED) + +set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "Headers") +set(CPACK_COMPONENT_HEADERS_DESCRIPTION "C++ headers for using ParadisEO") +set(CPACK_COMPONENT_HEADERS_DEPENDS libraries) +set(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Minimal Full) +set(CPACK_COMPONENT_LIBRARIES_REQUIRED) + +set(CPACK_COMPONENT_TESTS_DISPLAY_NAME "Tests") +set(CPACK_COMPONENT_TESTS_DESCRIPTION "Tests") +set(CPACK_COMPONENT_TESTS_DEPENDS libraries) +set(CPACK_COMPONENT_TESTS_INSTALL_TYPES Full) + +set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples") +set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "Examples and lessons") +set(CPACK_COMPONENT_EXAMPLES_DEPENDS libraries) +set(CPACK_COMPONENT_EXAMPLES_INSTALL_TYPES Full) + +set(CPACK_COMPONENT_DOC_DISPLAY_NAME "Documentation") +set(CPACK_COMPONENT_DOC_DESCRIPTION "ParadisEO documentation") +set(CPACK_COMPONENT_DOC_INSTALL_TYPES Full) + +###################################################################################### +### 2) Set up general information about packaging +###################################################################################### + +# For more details: http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack + +#cpack package information +set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") +set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README") +set(CPACK_PACKAGE_DESCRIPTION "ParadisEO is a white-box object-oriented framework dedicated to the flexible design of metaheuristics. This template-based, ANSI-C++ compliant computation library is portable across both Windows system and sequential platforms (Unix, Linux, Mac OS X, etc.). ParadisEO is distributed under the CeCill license and can be used under several environments.") +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Software Framework for Metaheuristics") +set(CPACK_PACKAGE_VENDOR "Inria") +set(CPACK_PACKAGE_CONTACT "paradiseo-help@lists.gforge.inria.fr") +set(CPACK_PACKAGE_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) +set(CPACK_STRIP_FILES ${PACKAGE_NAME}) +set(CPACK_SOURCE_STRIP_FILES "bin/${PROJECT_NAME}") +set(CPACK_PACKAGE_EXECUTABLES "${PROJECT_NAME}" "${PROJECT_NAME}") +set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}") +set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}") +set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}") +set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}") +set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}-${ARCH}") + +if(UNIX) + if(APPLE) + # Generators for Mac OS X + set(CPACK_BINARY_PACKAGEMARKER "ON") + set(CPACK_BINARY_TGZ "OFF") + set(CPACK_BINARY_STGZ "OFF") + + set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/mac.rtf") + + else() + # Generators for Unix-like + set(CPACK_GENERATOR "DEB;RPM") + # Determine architecture + include(CheckTypeSize) + check_type_size(void* SIZEOF_VOID_PTR) + if("${SIZEOF_VOID_PTR}" STREQUAL "4") + set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386) + elseif("${SIZEOF_VOID_PTR}" STREQUAL "8") + set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE amd64) + else() + message(FATAL_ERROR "Unsupported architecture") + return() + endif() + + endif() +else(UNIX) + + # Generator for Windows + set(CPACK_GENERATOR "NSIS") + #set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/winicon.bpm") + +endif() + +###################################################################################### +### 3) And finally, include cpack, this is the last thing to do. +###################################################################################### + +include(CPack) diff --git a/trunk/cmake/Target.cmake b/trunk/cmake/Target.cmake new file mode 100644 index 000000000..4cb6d9180 --- /dev/null +++ b/trunk/cmake/Target.cmake @@ -0,0 +1,45 @@ +###################################################################################### +### Mrproper will delete all files and folders in build directory +###################################################################################### + +if(UNIX) + add_custom_target(mrproper COMMAND cd ${CMAKE_BINARY_DIR} && rm -rf *) +endif(UNIX) + +###################################################################################### +### Doc-all enable to build all documentations in one target +###################################################################################### + +if(DOXYGEN_FOUND AND DOXYGEN_EXECUTABLE) + add_custom_target(doc + COMMAND make doc-eo + COMMAND make doc-mo + COMMAND make doc-moeo + ) +endif(DOXYGEN_FOUND AND DOXYGEN_EXECUTABLE) + +###################################################################################### +### Perform covering test if lcov is found +###################################################################################### + +if(PROFILING) + find_program(LCOV + NAMES lcov + PATHS + "/usr/local/bin /usr/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder] [HKEY_CURRENT_USER\\Software]" + DOC "Path to the memory checking command, used for memory error detection.") + if(LCOV) + add_custom_target(coverage + COMMAND make + COMMAND ctest + COMMAND lcov -d . -c -o output.info + COMMAND lcov -r output.info '*/tutorial*' -o output.info + COMMAND lcov -r output.info '/usr*' -o output.info + COMMAND lcov -r output.info '*/test*' -o output.info + COMMAND genhtml output.info -o coverage/ --highlight --legend + ) + else(LCOV) + message(STATUS "Could NOT find Lcov") + endif(LCOV) +endif(PROFILING) + diff --git a/trunk/cmake/module/FindParadiseo.cmake b/trunk/cmake/module/FindParadiseo.cmake new file mode 100644 index 000000000..c261ece2a --- /dev/null +++ b/trunk/cmake/module/FindParadiseo.cmake @@ -0,0 +1,130 @@ +# File: FindParadiseo.cmake +# Version: 0.0.1 +# +# The following variables are filled out: +# - PARADISEO_INCLUDE_DIR : EO, MO and MOEO source dir +# - EO_INCLUDE_DIR : EO source dir +# - MO_INCLUDE_DIR : MO source dir +# - MOEO_INCLUDE_DIR : MOEO source dir. WARNING : You have ton include MO before ! +# - PARADISEO_LIBRARIES : the list of all required modules +# - PARADISEO_XXX_LIBRARY : the name of the library to link for the required module +# - PARADISEO_XXX_FOUND : true if the required module is found +# - PARADISEO_FOUND : true if all required modules are found +# +# Here are the components: +# - eo +# - PyEO +# - es +# - ga +# - cma +# - flowshop +# - moeo +# You can use find_package(Paradiseo COMPONENTS ... ) to enable one or several components. If you not specifie component, all components will be load. +# +# Output +# ------ +# +# example: +# find_package(Paradiseo COMPONENTS eo eoutils cma es flowshop ga moeo REQUIRED) +# include_directories(${PARADISEO_INCLUDE_DIR}) +# add_executable(example ...) +# target_link_libraries(examplep ${PARADISEO_LIBRARIES}) + +if(UNIX) + set(INSTALL_SUB_DIR /paradiseo) +endif() + +# enabled components +if ("${Paradiseo_FIND_COMPONENTS}" STREQUAL "") + set(PARADISEO_LIBRARIES_TO_FIND eo eoutils cma es flowshop ga moeo) +else() + set(PARADISEO_LIBRARIES_TO_FIND ${Paradiseo_FIND_COMPONENTS}) +endif() + +#set the build directory +set(BUILD_DIR build) + +# Path +set(PARADISEO_SRC_PATHS + ${PARADISEO_ROOT} + $ENV{PARADISEO_ROOT} + /usr/local/ + /usr/ + /sw # Fink + /opt/local/ # DarwinPorts + /opt/csw/ # Blastwave + /opt/ + [KEY_CURRENT_USER\\Software\\Inria\\ParadisEO] + [HKEY_LOCAL_MACHINE\\Software\\Inria\\ParadiseEO] +) + +find_path(EO_INCLUDE_DIR eo + PATH_SUFFIXES include${INSTALL_SUB_DIR}/eo eo/src + PATHS ${PARADISEO_SRC_PATHS}) + +find_path(MO_INCLUDE_DIR mo + PATH_SUFFIXES include${INSTALL_SUB_DIR}/mo mo/src + PATHS ${PARADISEO_SRC_PATHS}) + +find_path(MOEO_INCLUDE_DIR moeo + PATH_SUFFIXES include${INSTALL_SUB_DIR}/moeo moeo/src + PATHS ${PARADISEO_SRC_PATHS}) + +set(PARADISEO_INCLUDE_DIR ${EO_INCLUDE_DIR} ${MO_INCLUDE_DIR} ${MOEO_INCLUDE_DIR}) + +# find the requested modules +set(PARADISEO_FOUND TRUE) # will be set to false if one of the required modules is not found + +set(FIND_PARADISEO_LIB_PATHS + ${PARADISEO_ROOT}/${BUILD_DIR} + $ENV{PARADISEO_ROOT} + /usr/local/ + /usr/ + /sw # Fink + /opt/local/ # DarwinPorts + /opt/csw/ # Blastwave + /opt/ + [KEY_CURRENT_USER\\Software\\Inria\\ParadisEO] + [HKEY_LOCAL_MACHINE\\Software\\Inria\\ParadiseEO] +) + +#Suffixes +set(PARADISEO_LIB_PATHS_SUFFIXES + eo/lib + mo/lib + moeo/lib + moeo/tutorial/examples/flowshop/lib #For flowshop library + lib + lib32 + lib64 + ) + +foreach(FIND_PARADISEO_COMPONENT ${PARADISEO_LIBRARIES_TO_FIND}) + string(TOUPPER ${FIND_PARADISEO_COMPONENT} FIND_PARADISEO_COMPONENT_UPPER) + # release library + find_library(PARADISEO_${FIND_PARADISEO_COMPONENT_UPPER}_LIBRARY + NAMES ${FIND_PARADISEO_COMPONENT} + PATH_SUFFIXES ${PARADISEO_LIB_PATHS_SUFFIXES} + PATHS ${FIND_PARADISEO_LIB_PATHS}) + if (PARADISEO_${FIND_PARADISEO_COMPONENT_UPPER}_LIBRARY) + # library found + set(PARADISEO_${FIND_PARADISEO_COMPONENT_UPPER}_FOUND TRUE) + else() + # library not found + set(PARADISEO_FOUND FALSE) + set(PARADISEO_${FIND_PARADISEO_COMPONENT_UPPER}_FOUND FALSE) + set(FIND_PARADISEO_MISSING "${FIND_PARADISEO_MISSING} ${FIND_PARADISEO_COMPONENT}") + endif() + set(PARADISEO_LIBRARIES ${PARADISEO_LIBRARIES} "${PARADISEO_${FIND_PARADISEO_COMPONENT_UPPER}_LIBRARY}") +endforeach() + +# handle result +if(PARADISEO_FOUND) + message(STATUS "Found ParadisEO includes :") + message(${EO_INCLUDE_DIR}) + message(${MO_INCLUDE_DIR}) + message(${MOEO_INCLUDE_DIR}) +else() + # include directory or library not found + message(FATAL_ERROR "Could NOT find ParadisEO (missing : ${FIND_PARADISEO_MISSING})") +endif() diff --git a/trunk/eo/AUTHORS b/trunk/eo/AUTHORS new file mode 100644 index 000000000..6eff7dbe4 --- /dev/null +++ b/trunk/eo/AUTHORS @@ -0,0 +1,12 @@ +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 +Caner Candan diff --git a/trunk/eo/BuildConfig.cmake b/trunk/eo/BuildConfig.cmake new file mode 100644 index 000000000..bb1af9652 --- /dev/null +++ b/trunk/eo/BuildConfig.cmake @@ -0,0 +1,44 @@ +# the user should choose the build type on windows environments,excepted under cygwin (default=none) + +#SET(CMAKE_DEFAULT_BUILD_TYPE "Release" CACHE STRING "Variable that stores the default CMake build type" FORCE) + +#SET(CMAKE_BUILD_TYPE Debug) # allows to enable assert calls and -g flag + +FIND_PROGRAM(MEMORYCHECK_COMMAND + NAMES purify valgrind + PATHS + "/usr/local/bin /usr/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder]" + DOC "Path to the memory checking command, used for memory error detection.") + +IF(NOT CMAKE_BUILD_TYPE) + SET( CMAKE_BUILD_TYPE + ${CMAKE_DEFAULT_BUILD_TYPE} CACHE STRING + "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." + FORCE) +ENDIF(NOT CMAKE_BUILD_TYPE) + +IF(WIN32 AND NOT CYGWIN) + IF(CMAKE_CXX_COMPILER MATCHES cl) + IF(NOT WITH_SHARED_LIBS) + IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008") + SET(CMAKE_CXX_FLAGS "/nologo /Gy") + SET(CMAKE_CXX_FLAGS_DEBUG "/W3 /MTd /Z7 /Od") + SET(CMAKE_CXX_FLAGS_RELEASE "/w /MT /O2 /wd4530") + SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O2") + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Z7 /Od") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE") + ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008") + ENDIF(NOT WITH_SHARED_LIBS) + ENDIF(CMAKE_CXX_COMPILER MATCHES cl) +ELSE(WIN32 AND NOT CYGWIN) + IF(CMAKE_COMPILER_IS_GNUCXX) + # SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fprofile-arcs -ftest-coverage -Wall -Wextra -Wno-unused-parameter") + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -Wall -Wextra -Wno-unused-parameter -Wunknown-pragmas") + SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -Wunknown-pragmas") + SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -O6 -Wunknown-pragmas") + ENDIF(CMAKE_COMPILER_IS_GNUCXX) +ENDIF(WIN32 AND NOT CYGWIN) + +IF(CMAKE_BUILD_TYPE MATCHES Debug) + ADD_DEFINITIONS(-DCMAKE_VERBOSE_MAKEFILE=ON) +ENDIF(CMAKE_BUILD_TYPE MATCHES Debug) diff --git a/trunk/eo/CHANGELOG b/trunk/eo/CHANGELOG new file mode 100644 index 000000000..8a518c2f8 --- /dev/null +++ b/trunk/eo/CHANGELOG @@ -0,0 +1,9882 @@ +Author: Caner Candan +Date: Tue May 10 15:33:42 2011 +0200 + + * NEWS + +Author: Caner Candan +Date: Tue May 10 11:45:37 2011 +0200 + + - old eclipse files + +Author: Caner Candan +Date: Tue May 10 11:44:53 2011 +0200 + + * ConfigureChecks.cmake: issue fixed + +Author: Caner Candan +Date: Tue May 10 10:34:35 2011 +0200 + + - removed useless .cvsignore files since we are using git now + +Author: nojhan +Date: Tue May 10 00:31:18 2011 +0200 + + updated build instructions + +Author: Caner Candan +Date: Mon May 9 17:21:18 2011 +0200 + + + build_gcc_linux_pyeo + +Author: Caner Candan +Date: Mon May 9 17:21:16 2011 +0200 + + * build_gcc_linux_unittest + +Author: Caner Candan +Date: Mon May 9 17:20:33 2011 +0200 + + + build_gcc_linux_stl_parallel + +Author: Caner Candan +Date: Fri May 6 16:01:28 2011 +0200 + + * pyeo + +Author: Caner Candan +Date: Fri May 6 11:14:39 2011 +0200 + + * apply: needed eoLogger header file inclusion + +Author: Caner Candan +Date: Thu May 5 17:15:10 2011 +0200 + + * whitespace cleanup + +Author: Caner Candan +Date: Thu May 5 16:54:00 2011 +0200 + + * indentations + whitespace cleanup + +Author: Caner Candan +Date: Thu May 5 16:53:31 2011 +0200 + + * pyeo/PyEO.cpp: renamed module name + +Author: Caner Candan +Date: Thu May 5 16:53:02 2011 +0200 + + * pyeo/CMakeLists.txt: auto find cpp files + +Author: Caner Candan +Date: Thu May 5 11:47:30 2011 +0200 + + * pyeo cmake config file + +Merge: 7dcc7b6 f984839 +Author: Caner Candan +Date: Wed May 4 17:57:54 2011 +0200 + + Merge branch 'openmp' + +Author: Caner Candan +Date: Tue Mar 15 18:05:45 2011 +0100 + + * edoSampler: sampler method protected + +Author: Caner Candan +Date: Tue Mar 15 16:39:46 2011 +0100 + + * eoLogger: forgot to close opened file + +Author: Caner Candan +Date: Wed May 4 17:29:45 2011 +0200 + + * pyeo: updated pyeo in order to make it works + +Author: Caner Candan +Date: Wed May 4 17:28:46 2011 +0200 + + * eoReduceSplit.h: bad syntax in using eo::log + +Author: Caner Candan +Date: Wed Mar 30 15:52:23 2011 +0200 + + * eoOpContainer: call to eoGenOp::apply instead of operator() to avoid calling reserve + +Author: Caner Candan +Date: Wed Mar 30 15:50:19 2011 +0200 + + * eoEasyEA: pop reserve at each call to algo + +Author: Caner Candan +Date: Thu Mar 24 12:52:27 2011 +0100 + + * switched eoGenOp::apply method from protected to public in order to be visible from eoSequentialOp + +Author: Caner Candan +Date: Wed Mar 23 17:34:35 2011 +0100 + + * eoEasyEA: moved offspring into attributes space in order to avoid memory reallocation when we restart + +Merge: 007aae6 bc30b2c +Author: Caner Candan +Date: Fri Mar 18 11:20:09 2011 +0100 + + Merge branch 'master' into openmp + +Merge: aa23cec 8f6e4b2 +Author: Caner Candan +Date: Fri Mar 18 11:10:59 2011 +0100 + + Merge branch 'master' of ssh://localhost:9001/gitroot/eodev/eodev + +Merge: e7b6b17 16c2e9d +Author: Caner Candan +Date: Fri Mar 18 11:10:14 2011 +0100 + + Merge branch 'openmp' of ssh://localhost:9001/gitroot/eodev/eodev into openmp + +Merge: 9597010 8f6e4b2 +Author: Caner Candan +Date: Mon Mar 14 17:30:46 2011 +0100 + + Merge branch 'master' into openmp + +Author: Caner Candan +Date: Mon Mar 14 17:29:20 2011 +0100 + + * pipecom: added an argument to printf generating a warning + +Merge: cbc44d4 9e95eef +Author: Caner Candan +Date: Tue Mar 8 00:20:37 2011 +0100 + + Merge branch 'openmp' of ssh://eodev.git.sourceforge.net/gitroot/eodev/eodev into openmp + +Merge: 2044d92 90863fd +Author: Caner Candan +Date: Tue Mar 8 00:19:46 2011 +0100 + + Merge branch 'master' into openmp + +Author: Caner Candan +Date: Tue Mar 8 00:08:18 2011 +0100 + + * disabled app/gprop temporary because of the incompatibility with gcc version higher than 4.5.1 + +Merge: 9e95eef aa23cec +Author: Caner Candan +Date: Thu Feb 24 14:29:29 2011 +0100 + + Merge branch 'master' into openmp + +Author: Caner Candan +Date: Thu Feb 24 11:10:47 2011 +0100 + + + added install.cmake to configure dependancies paths + +Author: Caner Candan +Date: Thu Feb 24 11:09:51 2011 +0100 + + * fixed issues on the code to be compatible with last version of boost + +Author: Caner Candan +Date: Thu Feb 24 10:32:13 2011 +0100 + + * application/common/cmakelists.txt: fixed issues with copy of files + +Author: Caner Candan +Date: Tue Feb 8 10:59:00 2011 +0100 + + * eoParallel: added the both parameters enable_results and do_measure + +Author: Caner Candan +Date: Fri Feb 4 16:29:27 2011 +0100 + + * t-openmpy.*: added a header + +Author: Caner Candan +Date: Fri Feb 4 16:28:24 2011 +0100 + + * eoParallel: added the parameter enableResults + +Merge: a733983 2044d92 +Author: Caner Candan +Date: Fri Feb 4 14:10:10 2011 +0100 + + Merge branch 'openmp' of ssh://localhost:9001/gitroot/eodev/eodev into openmp + +Merge: 77a92ff 61faa63 +Author: Caner Candan +Date: Fri Feb 4 14:09:12 2011 +0100 + + Merge branch 'master' into openmp + +Author: Caner Candan +Date: Wed Feb 2 23:50:58 2011 +0100 + + * eoParallel: added the call to omp_set_num_threads to define the number of threads with parameters + +Merge: 54e2a8b 61faa63 +Author: Caner Candan +Date: Fri Jan 28 15:27:24 2011 +0100 + + Merge branch 'master' into openmp + +Author: Caner Candan +Date: Fri Jan 28 14:38:50 2011 +0100 + + * apply.h: size variable missing without openmp + +Author: Caner Candan +Date: Fri Jan 28 11:11:20 2011 +0100 + + * a little update in building script files + +Merge: 4c561f9 36fe44b +Author: Caner Candan +Date: Fri Jan 28 10:43:23 2011 +0100 + + Merge branch 'master' of ssh://eodev.git.sourceforge.net/gitroot/eodev/eodev + +Author: Caner Candan +Date: Thu Jan 27 17:50:11 2011 +0100 + + * removed some warnings + +Merge: db4eda2 9635901 +Author: Caner Candan +Date: Thu Jan 27 14:41:42 2011 +0100 + + Merge branch 'openmp' of ssh://localhost:9001/gitroot/eodev/eodev into openmp + +Author: Caner Candan +Date: Thu Jan 27 14:41:17 2011 +0100 + + * eoParallel: added a missing attribute + +Merge: 4c561f9 32a183e +Author: Caner Candan +Date: Thu Jan 27 13:53:42 2011 +0100 + + Merge branch 'openmp' of ssh://eodev.git.sourceforge.net/gitroot/eodev/eodev into openmp + + Conflicts: + eo/test/CMakeLists.txt + +Author: Johann Dreo +Date: Thu Jan 27 11:59:14 2011 +0100 + + a very simple script to create snapshot of the current head + +Author: Johann Dreo +Date: Thu Jan 27 11:58:21 2011 +0100 + + move edo stuff, that was in the wriong place after the merge, in the edo directory + +Merge: e6ee096 d618ab0 +Author: Johann Dreo +Date: Thu Jan 27 11:36:55 2011 +0100 + + Merge branch 'edo' + +Merge: 12f4f24 8c4b160 +Author: Johann Dreo +Date: Thu Jan 27 11:32:21 2011 +0100 + + Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev + +Author: Johann Dreo +Date: Thu Jan 27 11:23:23 2011 +0100 + + rename everything from 'do' to 'edo' + +Merge: 6e2041d 5fe07ab +Author: Caner Candan +Date: Thu Jan 27 10:49:41 2011 +0100 + + Merge branch 'master' into symlink + +Merge: 3d06d4a 5fe07ab +Author: Caner Candan +Date: Thu Jan 27 10:45:07 2011 +0100 + + Merge branch 'master' into openmp + + Conflicts: + eo/src/eo + +Author: Caner Candan +Date: Thu Jan 27 10:43:13 2011 +0100 + + + eoParallel: nthreads option * apply.h: mangled the openmp code with pre-processing conditions + +Author: Caner Candan +Date: Thu Jan 27 10:39:15 2011 +0100 + + fixed an issue in eoParallel class + + Conflicts: + + eo/src/utils/eoParallel.cpp + +Author: Caner Candan +Date: Tue Dec 28 16:42:53 2010 +0100 + + * updated eoParallel class in order to define the result filename according to the parallelization mode + +Author: Caner Candan +Date: Thu Jan 27 10:35:49 2011 +0100 + + - removed old parallelization parameters from the old-style from eoParser class + + Conflicts: + + eo/src/utils/eoParser.h + +Author: Caner Candan +Date: Thu Jan 27 10:31:28 2011 +0100 + + * changed apply.h to use new parallelization s parameters + + Conflicts: + + eo/src/apply.h + +Author: Caner Candan +Date: Thu Jan 27 10:30:40 2011 +0100 + + added measure into apply function + + Conflicts: + + eo/src/apply.h + +Author: Caner Candan +Date: Thu Jan 27 10:29:09 2011 +0100 + + + now you are able to enable or not parallelization with the option --parallelize-loops=1|0 + + Conflicts: + + eo/src/apply.h + eo/src/utils/eoParser.cpp + eo/src/utils/eoParser.h + +Author: Caner Candan +Date: Thu Jan 27 10:25:22 2011 +0100 + + add the parser/logger to the general header + + Conflicts: + + eo/src/eo + +Author: Caner Candan +Date: Wed Jan 26 18:10:34 2011 +0100 + + - removed t-eoDualFitness from test/CMakeLists.txt because it fails + + Conflicts: + + eo/test/CMakeLists.txt + +Author: Caner Candan +Date: Thu Dec 23 12:22:29 2010 +0100 + + + add the value() method in eoParam used by dae + +Author: Caner Candan +Date: Wed Dec 22 13:40:49 2010 +0100 + + * package dependancies changed + +Author: Caner Candan +Date: Wed Jan 26 18:09:37 2011 +0100 + + * doc: solved some mistakes + + Conflicts: + + eo/doc/index.h + +Author: Caner Candan +Date: Thu Jan 6 09:16:01 2011 +0100 + + * a little update tu be compatible with gnuplot + +Author: Caner Candan +Date: Wed Jan 5 16:07:08 2011 +0100 + + * --parallelize-prefix parameter description + +Author: Caner Candan +Date: Tue Dec 28 22:54:10 2010 +0100 + + fixed an issue in eoParallel class + +Author: Caner Candan +Date: Tue Dec 28 16:43:44 2010 +0100 + + + added a test file for eoParallel class + +Author: Caner Candan +Date: Tue Dec 28 16:42:53 2010 +0100 + + * updated eoParallel class in order to define the result filename according to the parallelization mode + +Author: Caner Candan +Date: Tue Dec 28 16:41:14 2010 +0100 + + * apply.h: now results stored to a filename defined with parallelization parameters + +Author: Caner Candan +Date: Sun Dec 26 19:19:20 2010 +0100 + + * added eoParallel header inclusion to eo + +Author: Caner Candan +Date: Sun Dec 26 19:13:43 2010 +0100 + + - removed old parallelization parameters from the old-style from eoParser class + +Author: Caner Candan +Date: Sun Dec 26 19:12:20 2010 +0100 + + * updated cmakelists.txt to compile new eoParallel class + +Author: Caner Candan +Date: Sun Dec 26 19:11:00 2010 +0100 + + + created new eoParallel class with a global variable eo::parallel in order to store all parameters tied to parallelization and to access from anywhere + +Author: Caner Candan +Date: Sun Dec 26 19:09:08 2010 +0100 + + * changed apply.h to use new parallelization s parameters + +Author: Caner Candan +Date: Thu Dec 23 23:03:02 2010 +0100 + + added measure into apply function + +Author: Caner Candan +Date: Thu Dec 23 18:09:25 2010 +0100 + + + now you are able to enable or not parallelization with the option --parallelize-loops=1|0 + +Author: Johann Dreo +Date: Thu Dec 16 15:51:28 2010 +0100 + + set the version to 1.1.1-edge + +Author: Johann Dreo +Date: Thu Dec 16 15:50:26 2010 +0100 + + evaluator that throw an exception if a maximum CPU user time has been reached, for POSIX systems + +Author: Johann Dreo +Date: Tue Dec 14 15:27:26 2010 +0100 + + add the parser/logger to the general header + +Merge: df57a10 5fe07ab +Author: Johann Dreo +Date: Wed Jan 26 16:31:55 2011 +0100 + + Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev + +Author: Caner Candan +Date: Thu Jan 20 19:07:41 2011 +0100 + + - removed t-eoDualFitness from test/CMakeLists.txt because it fails + +Merge: 9e93f52 1e177e1 +Author: Johann Dreo +Date: Tue Jan 4 10:42:20 2011 +0100 + + Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev + +Author: Caner Candan +Date: Thu Dec 23 14:31:34 2010 +0100 + + fixed a mistake in cflags setting about openmp flags + +Author: Caner Candan +Date: Thu Dec 23 12:22:29 2010 +0100 + + + add the value() method in eoParam used by dae + +Author: Johann Dreo +Date: Wed Dec 22 18:29:30 2010 +0100 + + const parameter + intermediate reused variable + +Author: Johann Dreo +Date: Wed Dec 22 18:25:44 2010 +0100 + + missing include of the eoLogger header + +Author: Caner Candan +Date: Wed Dec 22 18:23:45 2010 +0100 + + * now symlink script more generic + +Author: Caner Candan +Date: Wed Dec 22 17:25:40 2010 +0100 + + changed cmakelists.txt to generate install symlink script + +Author: Caner Candan +Date: Wed Dec 22 17:24:34 2010 +0100 + + added install_symlink script + +Author: Caner Candan +Date: Wed Dec 22 13:40:49 2010 +0100 + + * package dependancies changed + +Author: Caner Candan +Date: Wed Dec 22 10:25:13 2010 +0100 + + * doc: solved some mistakes + +Author: Johann Dreo +Date: Fri Dec 17 11:25:58 2010 +0100 + + Add a value(ValueType) method for ValueParam, to directly change the value using the templatized type. Use two intermediate streamstring conversions. + +Author: Johann Dreo +Date: Fri Dec 17 10:39:42 2010 +0100 + + eoMaxTimeException is not used only for wallclock time, set a more general message + +Author: Johann Dreo +Date: Thu Dec 16 15:51:28 2010 +0100 + + set the version to 1.1.1-edge + +Author: Johann Dreo +Date: Thu Dec 16 15:50:26 2010 +0100 + + evaluator that throw an exception if a maximum CPU user time has been reached, for POSIX systems + +Author: Johann Dreo +Date: Tue Dec 14 15:27:26 2010 +0100 + + add the parser/logger to the general header + +Author: Caner Candan +Date: Sun Nov 28 14:21:26 2010 +0100 + + now we can select which measures we want + +Author: Caner Candan +Date: Sun Nov 28 13:36:25 2010 +0100 + + using rdtsc for rng seed with mersenne twister + +Author: Caner Candan +Date: Sun Nov 28 03:41:09 2010 +0100 + + update + +Author: Caner Candan +Date: Sun Nov 28 03:35:21 2010 +0100 + + added variable time measure + +Author: Caner Candan +Date: Sun Nov 28 03:32:53 2010 +0100 + + added variable time measure + +Author: Caner Candan +Date: Sun Nov 28 03:24:02 2010 +0100 + + added variable time measure + +Author: Caner Candan +Date: Sun Nov 28 00:19:46 2010 +0100 + + added n processus and fixed bound parameters + +Author: Caner Candan +Date: Sun Nov 28 00:12:08 2010 +0100 + + added n processus and fixed bound parameters + +Author: Caner Candan +Date: Sat Nov 27 23:26:16 2010 +0100 + + onlyexec and onlyprint parameters added on openmp script + +Author: Caner Candan +Date: Sat Nov 27 23:22:54 2010 +0100 + + onlyexec and onlyprint parameters added on openmp script + +Author: Caner Candan +Date: Sat Nov 27 23:07:11 2010 +0100 + + t-openmp.py released + +Author: Caner Candan +Date: Sat Nov 27 21:27:41 2010 +0100 + + changed output results name + +Author: Caner Candan +Date: Sat Nov 27 21:24:07 2010 +0100 + + added t-openmp.py + +Author: Caner Candan +Date: Sat Nov 27 16:19:51 2010 +0100 + + added prefix parameter on t-openmp + +Author: Caner Candan +Date: Mon Nov 22 19:16:09 2010 +0100 + + updated Dp = Tp / TDp + +Author: Caner Candan +Date: Mon Nov 22 18:20:38 2010 +0100 + + remode two - on results filename + +Author: Caner Candan +Date: Mon Nov 22 18:08:58 2010 +0100 + + updated to D_p = T_Dp / T_p and avoid all D_p higher than the number of tasks used + +Author: Caner Candan +Date: Mon Nov 22 17:43:52 2010 +0100 + + popStep and dimStep replaced by pS and dS on the results filename + +Author: Caner Candan +Date: Mon Nov 22 17:37:44 2010 +0100 + + added popStep and dimStep value on the result filename + +Author: Caner Candan +Date: Mon Nov 22 17:35:06 2010 +0100 + + created two boxplot script files one to generate image the other to display with matplotlab + +Author: Caner Candan +Date: Mon Nov 22 17:33:11 2010 +0100 + + removed omp_apply.h and added to apply.h, added dynamicity computation + +Author: Caner Candan +Date: Mon Nov 22 14:47:55 2010 +0100 + + remove threshold parameter and move from static schedule to dynamic + +Author: Caner Candan +Date: Mon Nov 22 14:07:47 2010 +0100 + + added efficienty computation + +Author: Caner Candan +Date: Sat Nov 20 01:57:30 2010 +0100 + + added stepping parameters + +Merge: dab81d1 6625cd2 +Author: Caner Candan +Date: Sat Nov 20 01:08:22 2010 +0100 + + uptodate + +Author: Caner Candan +Date: Sat Nov 20 01:01:45 2010 +0100 + + openmp testing up-to-date + +Author: nojhan +Date: Fri Nov 19 21:08:18 2010 +0100 + + test binary for dual fitness + +Merge: e8a083f 651ba9f +Author: nojhan +Date: Fri Nov 19 21:07:05 2010 +0100 + + Merge branch 'master' of ssh://eodev.git.sourceforge.net/gitroot/eodev/eodev + + Conflicts: + eo/test/CMakeLists.txt + +Author: nojhan +Date: Fri Nov 19 21:03:07 2010 +0100 + + add t-eoDualFitness to CMake + +Author: nojhan +Date: Fri Nov 19 21:02:35 2010 +0100 + + added a method to get the value of a dual fitness + +Author: Caner Candan +Date: Fri Nov 19 11:54:45 2010 +0100 + + new pkg-config file + +Author: Caner Candan +Date: Fri Nov 19 11:50:51 2010 +0100 + + changed pkg-config file creation process + +Author: Caner Candan +Date: Fri Nov 19 11:48:42 2010 +0100 + + openmp test updated + +Author: Caner Candan +Date: Thu Nov 18 10:49:24 2010 +0100 + + added some new scripts to specialize building and a build script for visual studio 2008 + +Author: Caner Candan +Date: Thu Nov 18 10:47:29 2010 +0100 + + forgot to add t-eoParser in test/CMakeLists.txt + +Author: Caner Candan +Date: Wed Nov 17 17:27:55 2010 +0100 + + added a apply.h variant for parallel execution + +Author: Caner Candan +Date: Wed Nov 17 14:43:18 2010 +0100 + + functor operator applying to population in parallel + +Merge: 979a186 8ecef39 +Author: Caner Candan +Date: Wed Nov 17 11:54:07 2010 +0100 + + Merge branch 'master' of ssh://eodev.git.sourceforge.net/gitroot/eodev/eodev + +Author: Caner Candan +Date: Wed Nov 17 11:47:49 2010 +0100 + + unit test for eoParser added + +Author: Caner Candan +Date: Wed Nov 17 11:41:43 2010 +0100 + + fixed unistd.h portability issue + +Author: Johann Dreo +Date: Mon Nov 15 09:30:37 2010 +0100 + + eoDualStatSwitch, a wrapper for computing stats on feasible and unfeasible individuals, separately + +Merge: fb8a8d7 04f12b7 +Author: Johann Dreo +Date: Mon Nov 15 09:14:00 2010 +0100 + + Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev + +Author: Johann Dreo +Date: Mon Nov 15 09:13:39 2010 +0100 + + verify that pop is not empty before attempting to compute the IQR + +Author: Johann Dreo +Date: Mon Nov 15 09:12:10 2010 +0100 + + @todo: add an init method for continuators? + +Author: nojhan +Date: Sun Nov 14 15:24:35 2010 +0100 + + supress some doxygen warnings about \classes + +Author: nojhan +Date: Sun Nov 14 15:11:46 2010 +0100 + + eoInterquartileRangeStat example link to t-eoIQRStat + +Author: nojhan +Date: Sun Nov 14 15:07:50 2010 +0100 + + a test binary for eoInterquartileRangeStat + +Author: Caner Candan +Date: Wed Nov 10 11:18:57 2010 +0100 + + there was a warning from compiler related to a comment syntax in eoInvalidateOps.h + +Author: Johann Dreo +Date: Tue Nov 9 11:44:28 2010 +0100 + + fix most of the doxygen warnings + +Author: Johann Dreo +Date: Mon Nov 8 22:58:37 2010 +0100 + + default log output to debug for the ostream monitor ; better documentation + +Author: Johann Dreo +Date: Mon Nov 8 18:29:25 2010 +0100 + + new eoAerageSizeStat class + +Author: Johann Dreo +Date: Mon Nov 8 18:27:58 2010 +0100 + + check for self assignement in copy operator of eoDualFitness + +Author: Johann Dreo +Date: Mon Nov 8 18:27:19 2010 +0100 + + deactivate gpsymreg that uses the now unsuported multi-objective feature + +Author: Johann Dreo +Date: Sun Nov 7 23:43:58 2010 +0100 + + fix some doxygen warnings + +Author: Johann Dreo +Date: Sun Nov 7 23:16:45 2010 +0100 + + remove multi-objective stuff, deprecated by ParadisEO-PEO + +Author: Johann Dreo +Date: Sun Nov 7 23:12:28 2010 +0100 + + add tests interfaces as examples in the doc ; remove unused test binaries ; some code formating + +Author: Johann Dreo +Date: Sun Nov 7 23:09:35 2010 +0100 + + remove unused test binaries, some code formating + +Author: Johann Dreo +Date: Sun Nov 7 11:19:33 2010 +0100 + + in the doc's main page: brief section first with a link to the modules list + +Author: Johann Dreo +Date: Sat Nov 6 17:31:39 2010 +0100 + + do not documentify: test, tutorial, contrib and app, that are not part of the framework by itself + +Author: Johann Dreo +Date: Sat Nov 6 17:24:00 2010 +0100 + + removing obsolete win directory, we now se CMake that can generate VC++ project files by itself + +Author: nojhan +Date: Sat Nov 6 09:19:17 2010 +0100 + + small fixes in the doc + +Author: Johann Dreo +Date: Fri Nov 5 22:46:15 2010 +0100 + + and finally... still more grouping in documentation. + +Author: Johann Dreo +Date: Fri Nov 5 15:59:35 2010 +0100 + + grouping classes in documentation + +Author: Johann Dreo +Date: Fri Nov 5 14:28:28 2010 +0100 + + name of variables in english ; use the eo::log instead of cerr ; doc grouping + +Author: Johann Dreo +Date: Fri Nov 5 11:26:04 2010 +0100 + + grouping classes in documentation + +Author: Johann Dreo +Date: Tue Nov 2 17:23:27 2010 +0100 + + readable size for the evolutionry algorithm diagram + +Author: Johann Dreo +Date: Tue Nov 2 16:57:13 2010 +0100 + + evolutionary algorithm diagram with lego blocks, fancier + +Author: Johann Dreo +Date: Mon Nov 1 23:08:58 2010 +0100 + + more doc groups, cleaner modules hierarchy + +Author: Johann Dreo +Date: Mon Nov 1 22:09:40 2010 +0100 + + replace TODO comments by @ŧodo doxygen command + +Author: Johann Dreo +Date: Mon Nov 1 22:08:37 2010 +0100 + + more explanations in doc main page, remove HTML markup, remove deprecated link pages + +Author: Johann Dreo +Date: Mon Nov 1 18:20:56 2010 +0100 + + Create more doxygen groups for base classes, clean some doc + +Author: Johann Dreo +Date: Mon Nov 1 18:19:37 2010 +0100 + + delete the obsolete directory (still versionned in the repository if necessary) + +Author: Johann Dreo +Date: Mon Nov 1 15:34:27 2010 +0100 + + grouping algorithms in a module of the doc + +Author: Johann Dreo +Date: Mon Nov 1 13:37:24 2010 +0100 + + added Johann and Caner as authors on the web page + +Author: Johann Dreo +Date: Mon Nov 1 13:32:37 2010 +0100 + + more shortcut links on the webpage, toward the chat and the trac + +Author: Johann Dreo +Date: Sun Oct 31 23:01:16 2010 +0100 + + fix #10: removed MOO binaries + +Author: Johann Dreo +Date: Sun Oct 31 22:57:05 2010 +0100 + + fix #10: removed the moo/ directory and eoMO* classes, deprecated by the Paradiseo-MOEO project + +Author: Johann Dreo +Date: Sun Oct 31 21:57:06 2010 +0100 + + indicate cudacc branch in the changelog + +Merge: fc21827 66b4dfd +Author: Johann Dreo +Date: Sun Oct 31 21:50:15 2010 +0100 + + Merge branch 'cudacc' + +Author: Johann Dreo +Date: Sun Oct 31 21:36:53 2010 +0100 + + remove default values for verbose parameters, so as to make deprecated wrappers unused by default + +Author: Johann Dreo +Date: Sun Oct 31 21:19:34 2010 +0100 + + alternate function prototypes without verbose parameter + +Author: Johann Dreo +Date: Sun Oct 31 07:47:12 2010 +0100 + + changelog summary for the next 1.1 release + +Author: Johann Dreo +Date: Sat Oct 30 23:30:40 2010 +0200 + + fix #13: remove the use of the verbose members, replaced by the eo::log system ; functions prototypes keep their verbose parameters, but display a warning until next version + +Author: Johann Dreo +Date: Tue Oct 26 13:48:47 2010 +0200 + + file not at the right place + +Author: Johann Dreo +Date: Tue Oct 26 13:37:15 2010 +0200 + + replace the changelog with the (cleaned) git log, more up-to-date + +Author: Johann Dreo +Date: Tue Oct 26 13:35:08 2010 +0200 + + renamed in CHANGELOG + +Author: Johann Dreo +Date: Tue Oct 26 13:34:19 2010 +0200 + + warning: not up-to-date + +Author: Johann Dreo +Date: Tue Oct 26 13:32:55 2010 +0200 + + added Johann and Caner as authors + +Author: Johann Dreo +Date: Tue Oct 26 13:32:43 2010 +0200 + + replace the changelog with the (cleaned) git log, more up-to-date + +Author: Johann Dreo +Date: Tue Oct 26 10:51:48 2010 +0200 + + create a more generic class for monitoring to any ostream (useful for output to clog or cerr, for example), the stdout monitor now inherits from it + +Author: Johann Dreo +Date: Mon Oct 25 09:50:50 2010 +0200 + + Stat object to compute ratio of feasible indviduals in a pop using eoDualFitness + +Author: Johann Dreo +Date: Fri Oct 22 10:08:57 2010 +0200 + + a stat object for computing interquartile range (a robust measure of dispersion) + +Author: Johann Dreo +Date: Fri Oct 22 10:07:09 2010 +0200 + + Arithmetic operators (note: priority to unfeasibility) + +Author: Caner Candan +Date: Tue Oct 12 10:09:56 2010 +0200 + + I have fixed some bugs and added some tests for doDistrib classes + +Author: Johann Dreo +Date: Wed Sep 29 22:52:30 2010 +0200 + + using eo::log instead of std::cout + +Author: Caner Candan +Date: Tue Sep 28 10:38:38 2010 +0200 + + there was an issue on doBounderNo class tied to the default values of the ctor of mother class doBounder: fixed + +Author: Caner Candan +Date: Wed Sep 22 19:25:37 2010 +0200 + + * eda n eda_sa: bug fixed, while we were using -h the result folder was removed + +Author: Caner Candan +Date: Wed Sep 22 14:38:15 2010 +0200 + + + eda algo: same algo than eda-sa without sa, + plotting scripts and problem functions moved to application/common + +Author: Johann Dreo +Date: Tue Sep 21 17:53:48 2010 +0200 + + do not explicitely specify build type, use O3 instead of O2 for release + +Author: Johann Dreo +Date: Tue Sep 21 17:52:59 2010 +0200 + + typo variable name + +Author: Caner Candan +Date: Tue Sep 21 15:12:19 2010 +0200 + + + boxplot.py: script to generate graphic with boxplot to illustrate distances between theorical and visual means for each population value + +Author: Caner Candan +Date: Tue Sep 21 15:08:38 2010 +0200 + + + t-mean-distance: program to generate distance value between the theorical and visual means + +Author: Johann Dreo +Date: Mon Sep 20 13:35:51 2010 +0200 + + typofix declaration types in macro + +Author: Johann Dreo +Date: Mon Sep 20 11:32:55 2010 +0200 + + deactivate -fprofile-arcs -ftest-coverage that necessitate gcov + +Author: Johann Dreo +Date: Thu Sep 16 14:16:24 2010 +0200 + + accessors to levels ; typofix on _contextLevel + +Author: Johann Dreo +Date: Thu Sep 16 11:29:32 2010 +0200 + + important note: we are using wallclock time + +Author: Johann Dreo +Date: Thu Sep 16 11:16:55 2010 +0200 + + bugfix operator() signature + +Author: Johann Dreo +Date: Thu Sep 16 11:06:04 2010 +0200 + + evals that can throw exceptions + +Merge: ccd5b01 88b2ec3 +Author: Johann Dreo +Date: Thu Sep 16 09:41:26 2010 +0200 + + Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev + +Author: Johann Dreo +Date: Thu Sep 16 09:33:55 2010 +0200 + + more comments ; header + +Author: Johann Dreo +Date: Thu Sep 16 09:29:51 2010 +0200 + + typo bugfix + +Author: Johann Dreo +Date: Thu Sep 16 09:28:55 2010 +0200 + + use std::endl ; error message format ; more comments + +Author: Johann Dreo +Date: Wed Sep 15 22:53:15 2010 +0200 + + bugfix _keep_existing name ; added an overwriting option to use ios_base::trunc instead of ios_base::app + +Author: Johann Dreo +Date: Wed Sep 15 22:28:58 2010 +0200 + + use eo::log + +Author: Johann Dreo +Date: Wed Sep 15 22:28:29 2010 +0200 + + doc comments + +Merge: 26ac5ca 86b7538 +Author: Caner Candan +Date: Tue Sep 14 14:18:14 2010 +0200 + + Merge branch 'master' of 188.165.44.48:do + +Author: Caner Candan +Date: Tue Sep 14 13:19:43 2010 +0200 + + bugfixed from ublas::vector assignement ctor for old version of boost + +Author: Caner Candan +Date: Mon Sep 13 06:17:44 2010 +0200 + + - screenshots + +Merge: 0f4e43c 6a613bc +Author: Caner Candan +Date: Sat Sep 11 00:21:02 2010 +0200 + + Merge branch 'mo-1.3' of candan.fr:do into mo-1.3 + +Author: Caner Candan +Date: Fri Sep 10 23:21:31 2010 +0200 + + t-doEstimatorNormalMulti: display means and distance + +Author: Caner Candan +Date: Fri Sep 10 17:04:02 2010 +0200 + + * bugfixed on test_cov_parameters + +Author: Caner Candan +Date: Fri Sep 10 15:52:54 2010 +0200 + + replaced generated prefix name in result folder + +Author: Caner Candan +Date: Fri Sep 10 15:48:16 2010 +0200 + + + test_cov_parameters.py: script to execute the estimator testor (t-EstimatorNormalMulti) in using all combinaison parameters values for 2-D cov-matrix + +Author: Caner Candan +Date: Fri Sep 10 01:09:16 2010 +0200 + + + test/t-doEstimatorNormalMulti + +Author: nojhan +Date: Thu Sep 9 22:37:50 2010 +0200 + + update related softwares: + EASEA, GUIDE + +Merge: 15ae721 86b0828 +Author: Caner Candan +Date: Thu Sep 9 13:55:59 2010 +0200 + + Merge branch 'mo-1.3' of git:do into mo-1.3 + +Author: Caner Candan +Date: Thu Sep 9 13:55:18 2010 +0200 + + * added some comments + +Author: Caner Candan +Date: Thu Sep 9 11:53:14 2010 +0200 + + + new screenshot with parameters -P=10000 -d=10 + +Author: Caner Candan +Date: Thu Sep 9 11:24:35 2010 +0200 + + * some updates on gplot.py to have a better display + screenshots from gnuplot + +Author: Caner Candan +Date: Thu Sep 9 08:03:01 2010 +0200 + + * README + +Author: Caner Candan +Date: Thu Sep 9 07:59:50 2010 +0200 + + buxfixed on CMakeLists.txt regarding copying failures + +Author: Caner Candan +Date: Thu Sep 9 07:58:05 2010 +0200 + + renamed scripts filenames + +Author: Caner Candan +Date: Thu Sep 9 07:56:15 2010 +0200 + + * added some features in plot.py plotting script + +Merge: 2e43f47 56680e8 +Author: Johann Dreo +Date: Wed Sep 8 12:15:08 2010 +0200 + + Merge branch 'mo-1.3' of git:do into mo-1.3 + +Author: Johann Dreo +Date: Wed Sep 8 12:14:15 2010 +0200 + + bounder on uniform distribution that can handle different bounds on several dimensions + +Author: Caner CANDAN +Date: Tue Sep 7 15:36:16 2010 +0200 + + * fixed bad using of method moNeighbor< EOT >::init( EOT& ) + +Author: Johann Dreo +Date: Mon Sep 6 12:05:13 2010 +0200 + + bugfix xdebug level + +Author: Johann Dreo +Date: Mon Sep 6 11:20:00 2010 +0200 + + use eo::log instead of cout + +Author: Johann Dreo +Date: Mon Sep 6 10:43:34 2010 +0200 + + no more dummy bounder + +Author: Johann Dreo +Date: Mon Sep 6 10:43:07 2010 +0200 + + constructors for passing the bounder to super class + +Author: Johann Dreo +Date: Mon Sep 6 00:04:37 2010 +0200 + + indent clean, more comments + +Author: Johann Dreo +Date: Sun Sep 5 23:56:17 2010 +0200 + + replace \n with endl + +Author: Johann Dreo +Date: Sun Sep 5 23:42:58 2010 +0200 + + use eo::log instead of cout + +Author: Johann Dreo +Date: Sat Sep 4 23:07:37 2010 +0200 + + some MO types replacement + +Author: Johann Dreo +Date: Fri Sep 3 18:32:27 2010 +0200 + + switch to new MO 1.3 classes and interface + +Author: Johann Dreo +Date: Fri Sep 3 15:55:28 2010 +0200 + + Patch from Karima.Boufaras@inria.fr: compilation wth CUDACC + +Author: nojhan +Date: Fri Sep 3 09:19:23 2010 +0200 + + official xmpp chat room + +Author: Caner Candan +Date: Wed Sep 1 19:15:26 2010 +0200 + + * t-eoLogger: missed some code lines to display correctly the help + +Author: Caner Candan +Date: Wed Sep 1 17:30:50 2010 +0200 + + * packaging: now the test and tutorial binaries are installed in share directory + +Author: Caner Candan +Date: Wed Sep 1 14:51:09 2010 +0200 + + ticket #1: Remove the autotools files done + +Merge: 5bd0baa 7159f8e +Author: Caner Candan +Date: Wed Sep 1 12:07:23 2010 +0200 + + Merge branch 'packaging' of ssh://localhost:9001/gitroot/eodev/eodev + +Author: Caner Candan +Date: Wed Sep 1 12:01:42 2010 +0200 + + eo::log: added the parameter -o in order to define a log file + removed some warning messages at compile time + +Merge: 25bb766 13b9b62 +Author: Caner Candan +Date: Wed Sep 1 10:33:42 2010 +0200 + + Merge branch 'master' of ssh://localhost:8007/do + +Author: Caner Candan +Date: Tue Aug 31 19:29:05 2010 +0200 + + added temporary population sorting + +Author: Caner Candan +Date: Tue Aug 31 19:26:51 2010 +0200 + + * added some useful comments in eoLogger class + +Author: Caner Candan +Date: Tue Aug 31 17:16:48 2010 +0200 + + * main.cpp: removed useless comments * src/do: added some lines to make detectable language file * doEDASA.h: added some comments + +Author: Caner Candan +Date: Tue Aug 31 16:39:21 2010 +0200 + + fixed some warning messages while compiling + +Author: Caner Candan +Date: Tue Aug 31 16:35:50 2010 +0200 + + + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached + +Author: Caner Candan +Date: Tue Aug 31 16:34:03 2010 +0200 + + + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached + +Author: Caner Candan +Date: Tue Aug 31 16:32:19 2010 +0200 + + + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached + +Author: Caner Candan +Date: Tue Aug 31 16:31:39 2010 +0200 + + + eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached + +Author: Caner Candan +Date: Tue Aug 31 15:53:32 2010 +0200 + + * eoRNG.h: added double uniform(double min, double max) + +Author: Caner Candan +Date: Tue Aug 31 14:56:11 2010 +0200 + + * eoFitContinue: using of _pop.best_element().fitness() instead of pop.nth_element_fitness(0) + +Author: Caner Candan +Date: Tue Aug 31 14:54:42 2010 +0200 + + removed a wrong logging message from eoEvalContinue.h + +Author: Caner Candan +Date: Tue Aug 31 14:52:08 2010 +0200 + + repared some compile warning messages + +Author: Caner Candan +Date: Tue Aug 31 14:15:54 2010 +0200 + + updated doxygen config file to the version 1.6.x + +Author: Caner Candan +Date: Tue Aug 31 14:10:13 2010 +0200 + + * fixed some warning issues during compilation + +Author: Caner Candan +Date: Tue Aug 31 14:06:34 2010 +0200 + + updated doc/CMakeLists.txt in order to add docs in packages + +Author: Caner Candan +Date: Tue Aug 31 14:04:25 2010 +0200 + + removed useless eo.cfg, this is generated automaticaly by cmake with the file eo.cfg.cmake + +Merge: 248d12d 2fdc24a +Author: Johann Dreo +Date: Tue Aug 31 10:22:46 2010 +0200 + + Merge branch 'master' of ssh://eodev/gitroot/eodev/eodev + +Author: Johann Dreo +Date: Mon Aug 30 22:50:59 2010 +0200 + + add eoDualFitness.h to the list of headers + +Author: Johann Dreo +Date: Mon Aug 30 22:50:34 2010 +0200 + + bugfix: typo on _this_ + +Author: Johann Dreo +Date: Mon Aug 30 22:46:55 2010 +0200 + + update of the license headers, LGPL version 2 only for those new files + +Author: Johann Dreo +Date: Mon Aug 30 22:46:37 2010 +0200 + + add a xdebug level & update of the license headers, LGPL version 2 only for this new file + +Author: Johann Dreo +Date: Mon Aug 30 22:44:18 2010 +0200 + + no ; at the end of the line + +Author: Johann Dreo +Date: Mon Aug 30 22:43:50 2010 +0200 + + New class: A fitness class that permits to compare feasible and unfeasible individuals. It guaranties that a feasible individual will always be better than an unfeasible one. + +Author: Johann Dreo +Date: Mon Aug 30 22:42:42 2010 +0200 + + no ; at the end of the line + +Author: Caner Candan +Date: Mon Aug 30 16:20:55 2010 +0200 + + fixed a bug with using of replacor, it didnt reduce the fitness + +Author: nojhan +Date: Sat Aug 28 12:30:37 2010 +0200 + + openhatch button, supposed to facilitate the involvement of new contributors + +Merge: 74b23dd 799a8f0 +Author: Caner Candan +Date: Thu Aug 26 19:54:05 2010 +0200 + + Merge branch 'master' of candan.fr:do + +Author: Caner Candan +Date: Thu Aug 26 19:31:30 2010 +0200 + + ... + +Author: Caner Candan +Date: Wed Aug 25 19:15:32 2010 +0200 + + * removed rho parameter and replaced it by popsize + +Author: Caner Candan +Date: Tue Aug 24 18:40:49 2010 +0200 + + + script to plot on ggobi + +Author: Caner Candan +Date: Tue Aug 24 11:23:55 2010 +0200 + + * LICENSE + +Author: Caner Candan +Date: Tue Aug 24 11:22:06 2010 +0200 + + * fixed remove command issue + +Author: Caner Candan +Date: Tue Aug 24 11:19:31 2010 +0200 + + * pkg-config updated + cmake file + +Author: Caner Candan +Date: Tue Aug 24 10:26:36 2010 +0200 + + + lib utils + +Author: Caner Candan +Date: Mon Aug 23 18:03:44 2010 +0200 + + + multiplot with gnuplot + +Author: Caner Candan +Date: Mon Aug 23 16:14:02 2010 +0200 + + a C header include missed + +Author: Caner Candan +Date: Mon Aug 23 15:56:58 2010 +0200 + + + plot populations by generation - removed dump from doEDASA + +Author: nojhan +Date: Thu Aug 19 22:04:01 2010 +0200 + + more sections to jump to + +Author: nojhan +Date: Thu Aug 19 21:45:19 2010 +0200 + + correct links to sourceforge features + +Author: nojhan +Date: Thu Aug 19 20:38:19 2010 +0200 + + bugfix #2054922: using base_const_iterator::node; + +Author: Caner Candan +Date: Wed Aug 18 19:13:38 2010 +0200 + + added a FIXME + +Author: Caner Candan +Date: Wed Aug 18 18:39:58 2010 +0200 + + * cma-sa name has been replace by eda-sa in the project + +Author: Caner Candan +Date: Wed Aug 18 18:24:16 2010 +0200 + + - useless comments and files removed + +Author: Caner Candan +Date: Wed Aug 18 18:23:01 2010 +0200 + + - useless comments and files removed + +Author: Caner Candan +Date: Wed Aug 18 18:22:28 2010 +0200 + + - useless comments and files removed + +Author: Caner CANDAN +Date: Wed Aug 18 17:30:11 2010 +0200 + + * eoDetSelect: when the call of howmany() returns 0 it is replaced by 1 + +Author: Caner CANDAN +Date: Wed Aug 18 17:18:36 2010 +0200 + + fixed a warning issue at the file eoRealBounds.cpp + +Author: Caner CANDAN +Date: Wed Aug 18 17:06:16 2010 +0200 + + + cpack configuration in order to generate packaging files, to make it easier use the script package_deb and package_rpm + +Author: Caner Candan +Date: Wed Aug 18 13:37:17 2010 +0200 + + - some useless comments + authors in files header + +Merge: 0a37f66 6ec3fc5 +Author: Caner CANDAN +Date: Wed Aug 18 12:16:13 2010 +0200 + + Merge branch 'master' of ssh://localhost:9001/gitroot/eodev/eodev + +Author: Caner Candan +Date: Tue Aug 17 17:44:53 2010 +0200 + + bug fixed + +Author: Johann Dreo +Date: Tue Aug 17 15:11:18 2010 +0200 + + correct headers ; class comment + +Author: Johann Dreo +Date: Tue Aug 17 15:07:17 2010 +0200 + + improved explanations + +Author: Johann Dreo +Date: Tue Aug 17 15:02:39 2010 +0200 + + missing header ; correct copyright ; correct emails + +Author: Johann Dreo +Date: Tue Aug 17 14:59:24 2010 +0200 + + translate variable from french to english + +Author: Johann Dreo +Date: Tue Aug 17 14:56:33 2010 +0200 + + use eo::log ; warning when returns 0 + +Author: Caner Candan +Date: Mon Aug 16 15:38:39 2010 +0200 + + issue to fix + +Author: Caner Candan +Date: Mon Aug 16 11:45:43 2010 +0200 + + added L(i,i) = sqrt( abs(V(i,i) - sum) ) but the issue still exists + +Author: Caner Candan +Date: Mon Aug 16 11:30:06 2010 +0200 + + * added the eo features Continue/CheckOut/Stat to DO in order to dump distribution parameters and to have compatibility with eoMonitor/eoUpdater classes + +Author: Caner Candan +Date: Mon Aug 16 07:52:30 2010 +0200 + + +Author: Caner Candan +Date: Fri Aug 6 10:24:45 2010 +0200 + + added doNormalMono + +Author: Caner Candan +Date: Fri Aug 6 10:19:50 2010 +0200 + + replace doNormal by doNormalMulti + +Merge: f66efcb 36ec42d +Author: Caner Candan +Date: Fri Aug 6 09:50:58 2010 +0200 + + merge + +Merge: 9f4c073 68a03aa +Author: Caner CANDAN +Date: Wed Aug 4 14:10:57 2010 +0200 + + Merge branch 'yaml_load_and_save' of ssh://localhost:9001/gitroot/eodev/eodev + +Author: Caner Candan +Date: Wed Aug 4 14:05:42 2010 +0200 + + * changed some comments sentences + +Author: Caner CANDAN +Date: Wed Aug 4 13:47:51 2010 +0200 + + + feature eoSIGContinue: Continuator can catch user signals + feature eoLogger: flexible logging system for eo + +Author: Caner Candan +Date: Wed Aug 4 13:05:28 2010 +0200 + + +Author: Caner Candan +Date: Tue Aug 3 18:54:41 2010 +0200 + + * cholesky + +Author: Caner Candan +Date: Tue Aug 3 10:35:25 2010 +0200 + + - doDistribParams + +Author: Caner Candan +Date: Tue Aug 3 10:26:15 2010 +0200 + + + some useful files added + +Author: Johann Dreo +Date: Mon Aug 2 17:07:32 2010 +0200 + + code to display only once the message about the help parameter + some indent fix + some more comments + +Author: nojhan +Date: Sun Aug 1 22:27:31 2010 +0200 + + list of some publications + +Author: nojhan +Date: Sun Aug 1 10:55:38 2010 +0200 + + example diagrams now close to features list, with a better legend + +Author: nojhan +Date: Sat Jul 31 23:00:10 2010 +0200 + + better layout for the menu + +Author: nojhan +Date: Sat Jul 31 22:48:49 2010 +0200 + + correct layout in 1024, better spacing for greater resolutions + +Author: nojhan +Date: Sat Jul 31 22:40:04 2010 +0200 + + 'jump to section' links and back links + +Author: nojhan +Date: Sat Jul 31 22:14:09 2010 +0200 + + logo icon for sourceforge, without text, 48px + +Author: nojhan +Date: Sat Jul 31 22:06:27 2010 +0200 + + slides via slideshare, better section order, small design changes + +Author: nojhan +Date: Sat Jul 31 18:59:12 2010 +0200 + + website sources + +Author: nojhan +Date: Thu Jul 29 14:28:05 2010 +0200 + + no more CVSROOT + +Author: Caner Candan +Date: Thu Jul 29 11:22:10 2010 +0200 + + * doc installable + +Author: Caner Candan +Date: Fri Jul 23 13:34:42 2010 +0200 + + + added some useful files + +Author: Caner Candan +Date: Fri Jul 23 13:24:09 2010 +0200 + + + TODO + doStats.cpp + +Author: Caner Candan +Date: Fri Jul 23 13:18:30 2010 +0200 + + * some cleaner updates + +Author: Caner Candan +Date: Tue Jul 13 13:20:07 2010 +0200 + + * doStats * doEstimatorNormal: replaced use of Variance by CoMatrix + +Author: Caner Candan +Date: Tue Jul 6 15:43:15 2010 +0200 + + ... + +Author: Caner Candan +Date: Tue Jul 6 11:25:02 2010 +0200 + + + do.pc + +Author: Caner Candan +Date: Tue Jul 6 10:15:47 2010 +0200 + + * fixed some packaging issues + +Author: Caner Candan +Date: Tue Jul 6 01:31:44 2010 +0200 + + cpack works + +Author: Caner Candan +Date: Tue Jul 6 01:27:14 2010 +0200 + + config cmake + +Author: Caner Candan +Date: Mon Jul 5 20:39:41 2010 +0200 + + + test + +Author: Caner Candan +Date: Mon Jul 5 20:31:30 2010 +0200 + + ... + +Author: Caner Candan +Date: Mon Jul 5 19:42:34 2010 +0200 + + + packaging + cmake files + +Author: Caner Candan +Date: Mon Jul 5 19:06:34 2010 +0200 + + + cma_sa application + +Author: Caner Candan +Date: Mon Jul 5 19:04:35 2010 +0200 + + + do files + +Author: Caner Candan +Date: Mon Jul 5 18:54:55 2010 +0200 + + ... + +Author: paradiseo +Date: Tue Jun 22 09:31:58 2010 +0000 + + Store a result in a variable to have no warning + +Author: paradiseo +Date: Thu Jun 10 10:03:26 2010 +0000 + + Add "Visual Studio 10" in config file for CMake + +Author: stevemadere +Date: Fri May 7 03:17:44 2010 +0000 + + changed YAML saving technique to YAML::Serializable + +Author: stevemadere +Date: Thu May 6 22:46:10 2010 +0000 + + added support to save app/gprop/mlp as YAML + +Author: stevemadere +Date: Tue May 4 17:18:12 2010 +0000 + + configure changes to prepare for use of libyaml-cpp + +Author: (EO team) <(EO team)> +Date: Tue May 4 13:00:51 2010 +0000 + + 'yaml_load_and_save'. + +Author: stevemadere +Date: Tue May 4 13:00:50 2010 +0000 + + Reflecting build process changes in doc and source tree (now using autogen.sh;./configure) + +Author: stevemadere +Date: Tue May 4 12:56:54 2010 +0000 + + Added includes necessary to compile using gcc 4.4 + +Author: stevemadere +Date: Tue May 4 12:54:36 2010 +0000 + + Removed references to eliminated headers eoDummyFlight.h, eoLSPSO.h, eoSSPSO.h + +Author: stevemadere +Date: Tue May 4 12:50:29 2010 +0000 + + Removed reference to Lesson6 until its makefile is fixed + +Author: paradiseo +Date: Thu Mar 18 12:44:45 2010 +0000 + + add an include + +Author: paradiseo +Date: Wed Dec 9 15:49:30 2009 +0000 + + +Author: paradiseo +Date: Thu Jun 25 14:49:53 2009 +0000 + + Accept long time + +Author: paradiseo +Date: Tue Jan 27 16:30:18 2009 +0000 + + little change to delete warnings + +Author: paradiseo +Date: Tue Jan 27 16:28:55 2009 +0000 + + little modif to delete warning + +Author: paradiseo +Date: Tue Jan 27 16:26:44 2009 +0000 + + little change to delete warning + +Author: paradiseo +Date: Tue Jan 27 16:21:53 2009 +0000 + + little modif to delete warning + +Author: paradiseo +Date: Mon Jan 26 14:39:37 2009 +0000 + + Change Compiler flags + +Author: paradiseo +Date: Mon Jan 26 13:43:40 2009 +0000 + + disable warning C4530 (Visual Studio) + +Author: paradiseo +Date: Mon Jan 26 13:38:01 2009 +0000 + + option added to disable warning (mode release with Visual Studio) + +Author: paradiseo +Date: Mon Jan 26 09:07:59 2009 +0000 + + cmake < 2.6 authorized + +Author: paradiseo +Date: Thu Jan 22 10:18:10 2009 +0000 + + test on PSO changed. + +Author: paradiseo +Date: Fri Jan 16 14:29:42 2009 +0000 + + modif cmake + +Author: paradiseo +Date: Wed Jan 14 14:50:46 2009 +0000 + + Cmake configuration modified + +Author: paradiseo +Date: Mon Jan 12 09:14:02 2009 +0000 + + Update to cmake2.6 + modif to support compatibility with icc + +Author: evomarc +Date: Thu Dec 25 16:01:57 2008 +0000 + + Fixing a small glitch that was giving wrong clues to newcomers ... + Thanks to Christophe-Marie Duquesne for the post + +Author: paradiseo +Date: Fri Dec 5 13:55:41 2008 +0000 + + add "=0;" at the end of two virtual method + +Author: paradiseo +Date: Thu Nov 20 16:35:47 2008 +0000 + + remove DartConfig + +Author: paradiseo +Date: Mon Nov 17 10:27:55 2008 +0000 + + Switch from Dart to Dash. + +Author: jeggermo +Date: Tue Nov 11 09:51:17 2008 +0000 + + fixed some very old and stupid problems + +Author: jeggermo +Date: Tue Nov 11 09:50:52 2008 +0000 + + fixed some stupid problems + +Author: maartenkeijzer +Date: Mon May 5 12:33:26 2008 +0000 + + updated configure.in to generate moo files + +Author: tlegrand +Date: Fri Apr 18 12:00:15 2008 +0000 + + deleted "win" directory in the autotools config + +Author: tlegrand +Date: Fri Apr 18 08:59:02 2008 +0000 + + added eoExtendedvelocity (+doc + test) that takes both the local best and the global of a PSO topology into account. Also updated the doc tags for the other topologies and velocities + +Author: tlegrand +Date: Fri Apr 18 08:58:42 2008 +0000 + + imrproved PSO topology/velocity tests + +Author: tlegrand +Date: Fri Apr 18 08:51:38 2008 +0000 + + updated the doc tags + +Author: tlegrand +Date: Fri Apr 18 08:50:22 2008 +0000 + + added eoExtendedvelocity (+doc + test) that takes both the local best and the global of a PSO topology into account. Also updated the doc tags for the other topologies and velocities + +Author: tlegrand +Date: Fri Apr 18 08:19:22 2008 +0000 + + updated a few things about paradiseo (links, docs) + +Author: tlegrand +Date: Fri Apr 18 07:58:17 2008 +0000 + + deleted old and obsolete paradiseo's pdf slides + +Author: paradiseo +Date: Thu Apr 17 14:31:11 2008 +0000 + + new implementation of the test + +Author: paradiseo +Date: Thu Apr 17 14:29:57 2008 +0000 + + Add t-eoOrderXover in the test list + +Author: paradiseo +Date: Thu Apr 17 14:29:10 2008 +0000 + + test of eoOrderXover + +Author: paradiseo +Date: Thu Apr 17 14:26:59 2008 +0000 + + new crossover dedicated to permutation-based representation + +Author: kuepper +Date: Mon Mar 31 19:12:12 2008 +0000 + + start preparation for 1.1 release + +Author: kuepper +Date: Mon Mar 31 19:11:13 2008 +0000 + + Update for gcc-4.3 compatibility + +Author: kuepper +Date: Mon Mar 31 13:35:41 2008 +0000 + + Add climits header as required for gcc-4.3 when using UINT_MAX + +Author: ldacosta +Date: Mon Mar 31 12:53:51 2008 +0000 + + make_continue... just a little formatting + +Author: ldacosta +Date: Fri Mar 28 16:24:17 2008 +0000 + + Output functor is needed if there is screen output OR FILE OUTPUT - until now, it was only created and stored in the screen output was activated. Line 120 of make_checkpoint.h + +Author: ldacosta +Date: Fri Mar 28 16:09:40 2008 +0000 + + Change in do_make_checkpoint: it receives not just a parameter from the evaluation function, not the function itself!! + +Author: ldacosta +Date: Fri Mar 28 15:57:55 2008 +0000 + + Adjusting configuration for Eclipse + +Author: ldacosta +Date: Fri Mar 28 15:51:48 2008 +0000 + + do_make_algo_scalar is extended: now it accepts also an evaluation of the fitness of the population as parameter. + +Author: ldacosta +Date: Fri Mar 28 13:49:14 2008 +0000 + + "Tutorial" conflicts with "tutorial" (in Eclipse), so I try to change names + +Author: ldacosta +Date: Fri Mar 28 13:49:13 2008 +0000 + + "Tutorial" conflicts with "tutorial" (in Eclipse), so I try to change names + +Author: tlegrand +Date: Thu Mar 20 15:48:31 2008 +0000 + + come back to dart.irisa.fr ! + +Author: tlegrand +Date: Thu Mar 20 08:43:44 2008 +0000 + + added minimal test config + +Author: ldacosta +Date: Thu Mar 13 16:28:34 2008 +0000 + + "Tutorial" (with capital T) was interfering with the checkout of eo on Eclipse (because there is already one "tutorial", with "t"). This is just a renaming of "Tutorial". + +Author: tlegrand +Date: Wed Mar 12 15:36:58 2008 +0000 + + replaced ParadisEO links + +Author: tlegrand +Date: Wed Mar 12 15:29:29 2008 +0000 + + replaced ParadisEO links + +Author: tlegrand +Date: Wed Mar 12 15:23:35 2008 +0000 + + added lesson6 + +Author: tlegrand +Date: Wed Mar 12 14:59:03 2008 +0000 + + added lesson 6 subdir + +Author: tlegrand +Date: Tue Mar 11 13:16:35 2008 +0000 + + changed dart server + +Author: tlegrand +Date: Mon Mar 10 14:27:19 2008 +0000 + + added coverage flags + visual studio 9 specific flags + +Author: tlegrand +Date: Thu Mar 6 17:05:16 2008 +0000 + + deleted CMAKE_BUILD_TYPE tags and management + +Author: tlegrand +Date: Wed Mar 5 09:41:24 2008 +0000 + + deleted old customized LL/SS PSO algorithms + +Author: tlegrand +Date: Wed Mar 5 09:06:50 2008 +0000 + + added lesson6 subdir + +Author: tlegrand +Date: Tue Mar 4 14:01:29 2008 +0000 + + Added new lesson (6) dedicated to the PSO. Also changed a few things into the PSO-dedicated components (constructors) + +Author: tlegrand +Date: Tue Feb 26 14:53:32 2008 +0000 + + corrected bad index error when uniform()=0 in roulette_wheel. The error was: if fortune=0, we first have "int i=0", then "return --i" . + +Author: tlegrand +Date: Wed Feb 20 10:07:49 2008 +0000 + + changed nightly start time : EDT -> WEST + +Author: kuepper +Date: Mon Feb 18 20:14:47 2008 +0000 + + fix SF doc-generation, + remove absolute paths + +Author: tlegrand +Date: Mon Feb 18 15:08:08 2008 +0000 + + added nighlty start date for Dart config + +Author: tlegrand +Date: Mon Feb 18 14:43:09 2008 +0000 + + set new gcc warning flags -Wall & -Wextra (deleted the others) + +Author: tlegrand +Date: Fri Feb 15 13:10:06 2008 +0000 + + Replaced "_isOneIndexed" boolean by an unsigned "_startFrom" + +Author: tlegrand +Date: Fri Feb 15 12:50:58 2008 +0000 + + Completed eoInitPermutation: CTor now has a "isOneIndexed" parameter to assign 1..Indi_size as genotype values instead of 0..Indi_size + +Author: tlegrand +Date: Thu Feb 14 09:08:42 2008 +0000 + + added "IF(ENABLE_CMAKE_TESTING)" to add test only if they have been enabled + +Author: tlegrand +Date: Thu Feb 14 08:39:41 2008 +0000 + + Added DartConfig for Dart reporting. By default CTest will submit to dart.irisa.fr (project ParadisEO). + +Author: tlegrand +Date: Thu Feb 14 08:28:47 2008 +0000 + + Added cl compiler flags + new DartConfig + +Author: tlegrand +Date: Thu Feb 14 08:23:48 2008 +0000 + + set warning flags to OFF + +Author: tlegrand +Date: Thu Feb 14 08:23:16 2008 +0000 + + deleted cxx flags for cl compiler. They have been moved to the CMakeLists.txt at the top level + +Author: paradiseo +Date: Thu Jan 24 08:35:11 2008 +0000 + + Addition of a method sort for PSO + +Author: paradiseo +Date: Fri Jan 18 09:49:16 2008 +0000 + + Modification of cotinuator.h + +Author: tlegrand +Date: Thu Jan 17 13:08:21 2008 +0000 + + added generic continuator for tests. just an "continuator" class extended by eoContinue. No impact for the rest. + +Author: tlegrand +Date: Wed Jan 16 08:30:38 2008 +0000 + + removed bad semicolon at the end of a "{}" bloc which is not a class/template/struct. + Debugged using g++ flags + +Author: tlegrand +Date: Wed Jan 16 08:14:18 2008 +0000 + + corrected contructor parameter names. All tests OK + +Author: tlegrand +Date: Tue Jan 15 13:57:32 2008 +0000 + + renamed "globalBest" parameter in "globalBest" function ... + +Author: tlegrand +Date: Tue Jan 15 13:53:18 2008 +0000 + + removed bad semicolon at the end of a "{}" bloc which is not a class/template. + Debugged using g++ flags (see CMakeLists.txt at the root) + +Author: tlegrand +Date: Tue Jan 8 15:34:43 2008 +0000 + + corrected weight factor and updated doc + +Author: tlegrand +Date: Tue Jan 8 15:13:32 2008 +0000 + + corrected PSO dummy errors and completed documentation + +Author: tlegrand +Date: Tue Jan 8 14:50:13 2008 +0000 + + corrected PSO dummy errors and completed documentation + +Author: evomarc +Date: Sat Dec 8 15:05:51 2007 +0000 + + Added the GDB trick to visualize the components of a vector + (but it still doesn't work with EO objects, though???) + +Author: evomarc +Date: Sat Dec 8 14:49:52 2007 +0000 + + 3 identical typos in 3 different files :-) + +Author: tlegrand +Date: Mon Nov 26 08:00:25 2007 +0000 + + Warning: A '_WINDOWS' definition is added to compile four Unix-dedicated files (eoCtrlCContinue.h,eoCtrlCContinue.cpp, pipecom.h, pipecom.cpp). The same definition should be added in the automake configuration file to ensure the compatibility. + +Author: tlegrand +Date: Mon Nov 26 07:56:08 2007 +0000 + + added definition _WINDOWS for (mingw and others) compatibility + +Author: maartenkeijzer +Date: Mon Nov 12 16:23:57 2007 +0000 + + Updated makefiles, updated the moo stuff and cleaned up some stuff that refused to compile + +Author: tlegrand +Date: Mon Nov 12 15:48:56 2007 +0000 + + indented file + +Author: tlegrand +Date: Mon Nov 12 15:46:42 2007 +0000 + + completed with pso new components + +Author: tlegrand +Date: Mon Nov 12 15:45:27 2007 +0000 + + completed pso topologies+velocities + +Author: tlegrand +Date: Mon Nov 12 15:43:43 2007 +0000 + + added pso initializer+ integerVelocity + +Author: tlegrand +Date: Mon Nov 12 15:41:46 2007 +0000 + + added permutation init + +Author: tlegrand +Date: Mon Nov 12 15:41:09 2007 +0000 + + added permut components + +Author: tlegrand +Date: Thu Oct 11 14:14:10 2007 +0000 + + added test for permutation components + +Author: tlegrand +Date: Thu Oct 11 14:10:27 2007 +0000 + + added generic parameter for sigmoid function + +Author: tlegrand +Date: Thu Oct 11 14:08:41 2007 +0000 + + added new tests + +Author: tlegrand +Date: Thu Oct 11 14:08:06 2007 +0000 + + added PSO ring topology test + +Author: tlegrand +Date: Thu Oct 11 14:03:18 2007 +0000 + + added PSO ring topology + +Author: tlegrand +Date: Mon Oct 8 15:33:46 2007 +0000 + + *** empty log message *** + +Author: tlegrand +Date: Mon Oct 8 15:22:25 2007 +0000 + + added best position updating + printOn + +Author: tlegrand +Date: Thu Oct 4 15:10:11 2007 +0000 + + added autoconf > 2.6 compatibility + +Author: kuepper +Date: Tue Sep 25 21:29:31 2007 +0000 + + add coding cookies for Emacs and vim + +Author: maartenkeijzer +Date: Sun Sep 23 08:37:09 2007 +0000 + + added patched tcc source tree + +Author: maartenkeijzer +Date: Sun Sep 23 08:35:51 2007 +0000 + + updated include dependencies + +Author: tlegrand +Date: Wed Sep 19 11:45:19 2007 +0000 + + Added #ifdef HAVE_GNUPLOT for Windows compatibility + +Author: tlegrand +Date: Wed Sep 19 11:44:39 2007 +0000 + + Added eoNSGA_II classes in eomoo lib + +Author: tlegrand +Date: Wed Sep 19 11:41:08 2007 +0000 + + Forget gprop application under Visual Studio + +Author: tlegrand +Date: Wed Sep 19 11:40:31 2007 +0000 + + Several fixes + +Author: tlegrand +Date: Wed Sep 19 11:32:47 2007 +0000 + + Added basic CMake file + +Author: tlegrand +Date: Tue Sep 18 15:40:31 2007 +0000 + + Avoid EONSGA in the lib (errors with Windows/MVS) + +Author: tlegrand +Date: Tue Sep 18 15:12:22 2007 +0000 + + Completed CMake config + +Author: tlegrand +Date: Fri Sep 14 14:47:15 2007 +0000 + + Corrected missing eo.doxytag + +Author: tlegrand +Date: Thu Sep 13 15:13:15 2007 +0000 + + removed --force-missing option for Automake: incompatible with the latest versions + +Author: tlegrand +Date: Thu Sep 13 13:36:13 2007 +0000 + + Added cmake support, deleted Autoconf/Automake stuff and made an easy-to-use process + +Author: tlegrand +Date: Tue Sep 11 14:20:16 2007 +0000 + + Changed file format (to avoid Visual Studio errors): MAC --> DOS + +Author: tlegrand +Date: Tue Sep 11 13:59:49 2007 +0000 + + Added HAVE_GNUPLOT checking + +Author: maartenkeijzer +Date: Mon Sep 10 10:30:53 2007 +0000 + + Various changes and optimizations + +Author: maartenkeijzer +Date: Thu Sep 6 08:15:22 2007 +0000 + + Woops, used the wrong sort here + +Author: maartenkeijzer +Date: Wed Sep 5 13:52:17 2007 +0000 + + added eoFuncPtrStat, and appended various addTo member functions for more elegant definition of monitors, stats, checkpoints, etc + +Author: maartenkeijzer +Date: Wed Sep 5 11:36:44 2007 +0000 + + added eoFuncPtrStat, and appended various addTo member functions for more elegant definition of monitors, stats, checkpoints, etc + +Author: maartenkeijzer +Date: Tue Sep 4 15:30:42 2007 +0000 + + added eoEpsMOEA support + +Author: maartenkeijzer +Date: Tue Sep 4 15:26:45 2007 +0000 + + added epsilon moea + +Author: maartenkeijzer +Date: Tue Sep 4 13:44:41 2007 +0000 + + made fitness() query return const reference + +Author: maartenkeijzer +Date: Tue Sep 4 13:44:02 2007 +0000 + + removed const qualifier from choice() member + +Author: maartenkeijzer +Date: Tue Sep 4 07:50:31 2007 +0000 + + Added member to get to the embedded fitness object + +Author: maartenkeijzer +Date: Tue Sep 4 07:47:46 2007 +0000 + + Added reinitialization of fitness when fitness is invalidated. Needed this to clear worths in multi-objective case + +Author: maartenkeijzer +Date: Mon Sep 3 14:37:27 2007 +0000 + + several fixes + +Author: maartenkeijzer +Date: Fri Aug 31 14:12:54 2007 +0000 + + more bugfixes + +Author: maartenkeijzer +Date: Fri Aug 31 14:03:35 2007 +0000 + + changed eoTruncate to use sort. nth_element leads to weird results in moo case + +Author: maartenkeijzer +Date: Fri Aug 31 13:45:46 2007 +0000 + + made stuff virtual + +Author: maartenkeijzer +Date: Fri Aug 31 13:27:40 2007 +0000 + + Refactoring + +Author: maartenkeijzer +Date: Fri Aug 31 13:26:41 2007 +0000 + + updated nsga + +Author: maartenkeijzer +Date: Fri Aug 31 12:59:18 2007 +0000 + + refactoring + +Author: maartenkeijzer +Date: Fri Aug 31 11:19:26 2007 +0000 + + hmm not a good idea to replace with dummy + +Author: maartenkeijzer +Date: Fri Aug 31 11:08:25 2007 +0000 + + update needed for multi-objective approach + +Author: maartenkeijzer +Date: Fri Aug 31 11:05:59 2007 +0000 + + updated comments + +Author: maartenkeijzer +Date: Fri Aug 31 10:57:05 2007 +0000 + + added new multi-objective support + +Author: maartenkeijzer +Date: Fri Aug 31 06:47:39 2007 +0000 + + fixed bug in NSGA-II, only niching on last objective + +Author: maartenkeijzer +Date: Thu Aug 30 22:30:52 2007 +0000 + + fixed bug in NSGA-II, only niching on last objective + +Author: kuepper +Date: Wed Aug 22 07:30:47 2007 +0000 + + eoRNG.h (eoRng::random): Add comment on truncation as standard way of + floating point to integer conversion. + +Author: kuepper +Date: Tue Aug 21 14:52:50 2007 +0000 + + Fix according to + [ 1663606 ] eoBitOp vector access + +Author: kuepper +Date: Tue Aug 21 14:50:55 2007 +0000 + + Fix wrong removalr of necessary include statement + +Author: kuepper +Date: Tue Aug 21 14:47:14 2007 +0000 + + Correctly round towards zero in random(uint32_t) + +Author: kuepper +Date: Tue Aug 21 14:44:41 2007 +0000 + + Minor cleanup + +Author: kuepper +Date: Tue Aug 21 13:58:53 2007 +0000 + + Fix typos + +Author: maartenkeijzer +Date: Sat Aug 11 20:48:07 2007 +0000 + + brought gprop into 21st century + +Author: tlegrand +Date: Fri Aug 10 14:31:04 2007 +0000 + + added #ifdef SIGQUIT for windows compatibility + +Author: tlegrand +Date: Fri Aug 10 14:30:26 2007 +0000 + + added #define _MSC_VER_ for windows compatibility + +Author: tlegrand +Date: Fri Aug 10 14:29:12 2007 +0000 + + added CMake configuration files + +Author: tlegrand +Date: Fri Aug 10 14:27:12 2007 +0000 + + added CMake configuration file + +Author: xohm +Date: Thu Aug 2 10:48:20 2007 +0000 + + Add extra functionwrapper to member 'size' + +Author: xohm +Date: Thu Aug 2 10:47:15 2007 +0000 + + Excluded 'config.h' from windows build + +Author: xohm +Date: Thu Aug 2 10:46:07 2007 +0000 + + Add static var-declaration + +Author: xohm +Date: Thu Aug 2 10:45:12 2007 +0000 + + Cmake multiplattform buildfile + +Author: xohm +Date: Thu Aug 2 10:15:13 2007 +0000 + + *** empty log message *** + +Author: maartenkeijzer +Date: Tue Jul 17 13:03:29 2007 +0000 + + comments removed + +Author: maartenkeijzer +Date: Tue Jul 17 13:01:00 2007 +0000 + + Adding timed continuator + +Author: tlegrand +Date: Tue Jul 3 09:13:07 2007 +0000 + + added doc details to recognize particle swarm optimization + +Author: tlegrand +Date: Mon Jul 2 13:05:14 2007 +0000 + + added t-eoEasyPSO test + +Author: tlegrand +Date: Mon Jul 2 13:02:26 2007 +0000 + + added myself in the author list :-)) + +Author: tlegrand +Date: Mon Jul 2 13:01:49 2007 +0000 + + particle-swarm-optimization includes added + +Author: tlegrand +Date: Mon Jul 2 13:00:48 2007 +0000 + + removed unconsitent reference in "eoWeakElitistReplacement" (const EOT oldChamp) + +Author: tlegrand +Date: Mon Jul 2 12:59:49 2007 +0000 + + "dMatrix distMatrix(pSize*(pSize-1)/2)" replaced by "distMatrix(pSize) " + +Author: tlegrand +Date: Mon Jul 2 12:58:13 2007 +0000 + + particle-swarm-optimization main templates added + +Author: tlegrand +Date: Mon Jun 25 09:38:44 2007 +0000 + + PSO package - contains src+doc+examples and build process files - should be removed before integrating sources + +Author: maartenkeijzer +Date: Tue Jun 19 17:48:16 2007 +0000 + + Re-enabled declone flag (seemed to be commented out for some reason) + +Author: jeggermo +Date: Thu May 3 14:00:50 2007 +0000 + + All debug (dll and non-dll libs) and release libs are placed in either debug or release + +Author: jeggermo +Date: Thu May 3 13:54:27 2007 +0000 + + Added Multi-Threaded DLL projects settings for both deebug and release + +Author: kuepper +Date: Thu Feb 22 08:27:32 2007 +0000 + + * mutation.tmpl, quadCrossover.tmpl, stat.tmpl: Initialize formerly + uninitialized variables. + + * README.tmpl: Hint to regular Templates/README for details. + + * README: Add documentation for adding new source-files. + + * Makefile.am.src-tmpl (noinst_HEADERS): Add + (MyStruct_SOURCES): Move header files from here to the new + noinst_HEADERS variable. + +Author: kuepper +Date: Tue Jan 23 22:25:57 2007 +0000 + + bump versions to 1.0.2-cvs + +Author: kuepper +Date: Tue Jan 23 22:23:31 2007 +0000 + + *** empty log message *** + +Author: kuepper +Date: Tue Jan 23 22:09:17 2007 +0000 + + updates for 1.0.1 release + +Author: evomarc +Date: Wed Jan 17 05:31:05 2007 +0000 + + Slightly modified the README.tmpl for more help to first-timers + +Author: kuepper +Date: Tue Jan 16 08:28:24 2007 +0000 + + Add instructions for bash. + +Author: kuepper +Date: Sun Jan 14 18:56:31 2007 +0000 + + * createEOproject.sh: Set TargetDir to /tmp/. This is a workaround + for automake finding the scripts of eo itself if we run it in a embedded + subdirectory. + (COPYING, INSTALL): create. + + * README: State more explicitly what a "complete installation" means. + Give build-instructions for moved directories. + +Author: kuepper +Date: Sun Jan 14 18:13:40 2007 +0000 + + State more explicitly what a "complete installation" means. + +Author: kuepper +Date: Fri Dec 29 14:16:01 2006 +0000 + + Update after release + +Author: kuepper +Date: Mon Dec 18 18:56:05 2006 +0000 + + (EXTRA_DIST): Add README's + +Author: kuepper +Date: Mon Dec 18 18:51:12 2006 +0000 + + Update for release. + +Author: jeggermo +Date: Mon Dec 18 16:21:38 2006 +0000 + + Small changes to 2 readme files to stress that the release version are in + eo\win\lib\release and the debug versions in eo\win\lib\debug + +Author: kuepper +Date: Mon Dec 18 12:18:32 2006 +0000 + + * index.h: Add old ToDos + +Author: kuepper +Date: Mon Dec 18 11:19:53 2006 +0000 + + *** empty log message *** + +Author: kuepper +Date: Mon Dec 18 11:17:55 2006 +0000 + + * TODO.html, README.html: Remove these old files. + + * AUTHORS, COPYING, ForRelease, NEWS, ToDo: Update for release. + + * eo.cfg (PROJECT_NUMBER): Bump version to 1.0 + +Author: kuepper +Date: Sun Dec 17 23:18:33 2006 +0000 + + update + +Author: kuepper +Date: Sun Dec 17 22:59:53 2006 +0000 + + * README: Better links to Templates/ + + * configure.in: Bump version to 1.0-beta2. + +Author: kuepper +Date: Sun Dec 17 22:56:03 2006 +0000 + + Remove these, potentially confusing files + +Author: kuepper +Date: Sun Dec 17 22:50:26 2006 +0000 + + Added new README. + Removed old unnecesary files + +Author: kuepper +Date: Sat Dec 16 22:05:17 2006 +0000 + + * Makefile.am (EXTRA_DIST): Distribute exactly the necessary files + +Author: kuepper +Date: Sat Dec 16 22:01:46 2006 +0000 + + * Makefile.am (EXTRA_DIST): Distribute exactly the necessary files + +Author: kuepper +Date: Sat Dec 16 21:55:03 2006 +0000 + + * EO.tpl, MyStructEA.cpp, MyStructSEA.cpp, make_MyStruct.cpp: Use + correct names for includes. + + * README.manual: This is a copy of the old README. + + * README: Describe the new way and setup of creating a new EO project. + + * createEOproject.sh, Makefile.am.src-tmpl, Makefile.am.top-tmpl: + * configure.ac.tmpl: New files to create a standalone EO project from + templates. + +Author: uid24343 +Date: Thu Dec 7 21:54:48 2006 +0000 + + clean up + +Author: kuepper +Date: Thu Dec 7 21:36:33 2006 +0000 + + cleanup for release + +Author: kuepper +Date: Tue Dec 5 08:42:39 2006 +0000 + + set version to 1.0-cvs again + +Author: kuepper +Date: Tue Dec 5 08:41:24 2006 +0000 + + (EXTRA_DIST): Add new MSVC project files to distribution. + +Author: kuepper +Date: Mon Dec 4 22:27:41 2006 +0000 + + * Makefile.am: Add t-eoRNG + + * t-eoRNG.cpp: Start test for random number generator. + +Author: kuepper +Date: Mon Dec 4 21:55:31 2006 +0000 + + (eoRng::normal(stdev)): Revert erroneous change. + +Author: kuepper +Date: Sun Dec 3 11:57:34 2006 +0000 + + Fixupper/lowercase issues + +Author: kuepper +Date: Sun Dec 3 11:44:38 2006 +0000 + + fix html errors + +Author: kuepper +Date: Sun Dec 3 11:40:25 2006 +0000 + + update + +Author: kuepper +Date: Sun Dec 3 11:24:41 2006 +0000 + + update, add link to Niko Hansen's comparison + +Author: kuepper +Date: Sun Dec 3 10:53:29 2006 +0000 + + update version number of next release + +Author: kuepper +Date: Sun Dec 3 10:41:54 2006 +0000 + + * mainpage.html: update, add link to Niko Hansen's comparison + + * README: Add more specific note about tutorial. + + * configure.in: Bump version to 1.0-beta1 + + * tutorial/Makefile.am: Add all necessary files, including html and + Templates to distribution. + +Author: evomarc +Date: Sun Dec 3 07:21:44 2006 +0000 + + Added a note to avoid that some dishonest researchers use teh code + in this tutorial as a basis for comparing their algorithms with "EAs" + as was done for the LEM3 algorithm in GECCO 2006. + +Author: kuepper +Date: Sat Dec 2 12:15:29 2006 +0000 + + update + +Author: kuepper +Date: Sat Dec 2 11:46:34 2006 +0000 + + cleanup, docs + +Author: kuepper +Date: Sat Dec 2 11:36:29 2006 +0000 + + (VirusShiftMutation::operator()): Fix test for i>1. + This makes t-MGE1bit pass on x86_64 using GCC. + +Author: kuepper +Date: Sat Dec 2 11:32:00 2006 +0000 + + Change float to double. + +Author: kuepper +Date: Sat Dec 2 11:02:13 2006 +0000 + + Remove unnecessary tests. + +Author: kuepper +Date: Sat Dec 2 10:18:57 2006 +0000 + + * eoTimedMonitor.h (eoTimedMonitor::seconds): Make unsigned. + + * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. + + * t-eoGenOp.cpp (init): Do not add std::ends to end of string, as this + results in escape-codes (^@) to be printed at runtime and is not + necessary anyway. + + * test/t-eoSymreg.cpp (SymregNode::operator()): Initialize r1 and r2 to + avoid compiler warnings. + +Author: kuepper +Date: Sat Dec 2 09:39:13 2006 +0000 + + * eoRNG.h: Cleanup docs and document /all/ members. + + * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. + +Author: kuepper +Date: Fri Dec 1 21:07:55 2006 +0000 + + minor typos + +Author: kuepper +Date: Fri Dec 1 20:40:54 2006 +0000 + + Use C++ style cast. + +Author: kuepper +Date: Fri Dec 1 20:08:51 2006 +0000 + + * Makefile.am: Update for release-distribution. + + * Makefile.am: Add missing CMA header for distribution. + + * Makefile.am: Add missing header for distribution. + +Author: kuepper +Date: Fri Dec 1 10:49:47 2006 +0000 + + minor cleanup of code and docs, + resolve some compiler warnings + +Author: okoenig +Date: Fri Dec 1 08:42:54 2006 +0000 + + Replaced float vars with double to avoid conversion warnings on VS 8.0 + +Author: kuepper +Date: Wed Nov 29 23:47:40 2006 +0000 + + update for release + +Author: kuepper +Date: Wed Nov 29 23:37:29 2006 +0000 + + Generally include + +Author: okoenig +Date: Tue Nov 28 17:14:05 2006 +0000 + + Removing MAC line endings, because Windows VS 8.0 does not accept them. + +Author: okoenig +Date: Tue Nov 28 17:12:21 2006 +0000 + + Added additonal definition for operator< between fitness and ScalarType. Needed for compilation with VS 8.0. + +Author: jeggermo +Date: Mon Nov 20 13:34:28 2006 +0000 + + Added Solution and Project files for MSVC 2003 + +Author: jeggermo +Date: Mon Nov 20 13:25:46 2006 +0000 + + Changed some files for compatibility with MSVC 2003 and 2005 + +Author: kuepper +Date: Thu Nov 16 13:21:41 2006 +0000 + + include + +Author: kuepper +Date: Thu Nov 16 12:52:46 2006 +0000 + + * configure.in (AC_DEBUG): add test + + * acinclude.m4 (AC_DEBUG): Define debug-feature and set DEBUG, NODEBUG, + or NDEBUG according to its value. + +Author: kuepper +Date: Thu Nov 16 12:35:46 2006 +0000 + + * make_genotype_real.h (eoEsChromInit): Rewrite vecSigmaInit-handling: + If sigmaInit is relative (%), do not read vecSigmaInit. Otherwise + always use vecSigmaInit with default all values of sigmaInit. + + * eoParser.h (eoParser::getORcreateParam): Make this a real if-then-else + clause around ptParam (found or not). + + * eoParam.h (eoValueParam::setValue): Document. + (eoValueParam >::setValue): Allow delimiters ',' and + ';'. A plain ' ' does not work, as it is not correctly read by + eoParser::readFrom. + +Author: kuepper +Date: Tue Jun 13 13:35:26 2006 +0000 + + update + +Author: kuepper +Date: Mon Mar 27 18:55:20 2006 +0000 + + Fix using directives for gcc-4.1 + +Author: maartenkeijzer +Date: Sun Mar 26 13:33:25 2006 +0000 + + fixed t-eoCMAES.cpp test + +Author: kuepper +Date: Sun Mar 26 10:04:01 2006 +0000 + + Update docs, some cleanup + +Author: kuepper +Date: Sat Mar 25 13:03:45 2006 +0000 + + Start list of publications + +Author: kuepper +Date: Thu Mar 23 18:06:10 2006 +0000 + + Fix spelling + +Author: kuepper +Date: Thu Mar 23 10:15:17 2006 +0000 + + update Makefile.am foe eoPeriodicContiunue addition + +Author: maartenkeijzer +Date: Mon Mar 6 20:47:28 2006 +0000 + + making dimensionality requirement optional + +Author: maartenkeijzer +Date: Mon Mar 6 20:31:03 2006 +0000 + + making dimensionality requirement optional + +Author: cahon +Date: Tue Feb 28 14:40:37 2006 +0000 + + Adding a continuator + +Author: cahon +Date: Tue Feb 28 14:39:45 2006 +0000 + + New continuation strategy + +Author: evomarc +Date: Wed Feb 22 04:53:20 2006 +0000 + + Corrected a few typos, and acknowledged the fact that all Lessons are now + compiled within the installation procedure... + +Author: maartenkeijzer +Date: Mon Jan 23 15:12:49 2006 +0000 + + updated makefile to boost-python3.3 and python2.4 + +Author: evomarc +Date: Mon Jan 2 14:09:22 2006 +0000 + + Changed some bug in never-used-except-in-make_algo_easea.h file + (probably some change in the compiler made this stop working ???) + +Author: cahon +Date: Fri Dec 9 17:49:43 2005 +0000 + + eoGenContinue is now persistent + +Author: cahon +Date: Fri Dec 9 17:45:56 2005 +0000 + + eoContinue is now persistent + +Author: kuepper +Date: Wed Dec 7 15:51:32 2005 +0000 + + fix build for our FC4 systems + +Author: kuepper +Date: Wed Dec 7 15:40:23 2005 +0000 + + fixes for gcc-4 compilation -- still have a linker problem + +Author: maartenkeijzer +Date: Thu Nov 24 09:38:05 2005 +0000 + + kd + +Author: maartenkeijzer +Date: Thu Nov 24 09:35:34 2005 +0000 + + Various bugfixes and additions + +Author: evomarc +Date: Tue Nov 8 11:34:12 2005 +0000 + + Removed the "using eoMonitor::vec from eoGnuplot1DMonitor.h because it generated + an internal compiler error with gcc4.0.0. + Repalced all occurences of "vec" by "this->vec" in eoGnuplot1DMonitor.cpp + so it is understood by the compiler :-( + +Author: evomarc +Date: Tue Nov 8 11:31:01 2005 +0000 + + Removed extra colon (;) at end of class definitions. + They didn't hurt until gcc 3.4.1 but then they generated an error! + +Author: maartenkeijzer +Date: Mon Oct 17 12:46:53 2005 +0000 + + Woops, forgot to clear a static string for compile + +Author: maartenkeijzer +Date: Sun Oct 16 15:38:38 2005 +0000 + + Added lambda expression (user/automatically defined functions + +Author: maartenkeijzer +Date: Sat Oct 15 21:27:47 2005 +0000 + + Solved some issues and prepared the library for using unordered_map instead of hash_map (C++ TR1). Can only use this when g++-4.0.3 is out + +Author: maartenkeijzer +Date: Sat Oct 15 09:05:57 2005 +0000 + + Made eoGencontinue a ValueParam, so that it can be attached to a monitor + +Author: maartenkeijzer +Date: Fri Oct 14 16:14:37 2005 +0000 + + forgot to invalidate + +Author: maartenkeijzer +Date: Fri Oct 14 15:34:45 2005 +0000 + + Tester for CMA + +Author: maartenkeijzer +Date: Fri Oct 14 15:33:32 2005 +0000 + + Added CMA + +Author: maartenkeijzer +Date: Fri Oct 14 15:33:16 2005 +0000 + + added timed monitor + +Author: maartenkeijzer +Date: Wed Oct 12 18:35:13 2005 +0000 + + oops, stats.h was missing + +Author: maartenkeijzer +Date: Tue Oct 11 08:15:29 2005 +0000 + + Added simplify and differentiation tests + +Author: kuepper +Date: Mon Oct 10 21:59:57 2005 +0000 + + prepare vecInitSize + +Author: kuepper +Date: Mon Oct 10 21:42:31 2005 +0000 + + cleanup, prepare vecSigmaInit change + +Author: kuepper +Date: Mon Oct 10 21:13:27 2005 +0000 + + cleanup + +Author: evomarc +Date: Mon Oct 10 13:34:21 2005 +0000 + + Added an accessor to the pointsize in eoeoGnuplot1DSnapshot.h + +Author: evomarc +Date: Mon Oct 10 13:33:13 2005 +0000 + + Added an accessor to the pointsize, for do_make_checkpoint_pareto + +Author: maartenkeijzer +Date: Sun Oct 9 07:03:35 2005 +0000 + + Added symbolic differentiation + +Author: maartenkeijzer +Date: Fri Oct 7 13:31:20 2005 +0000 + + Faster scaled evaluation, etc. + +Author: maartenkeijzer +Date: Fri Oct 7 11:31:01 2005 +0000 + + Constant mutation + simplification added + +Author: evomarc +Date: Fri Oct 7 08:27:59 2005 +0000 + + A colon had mystriously dissappeared !!! + +Author: maartenkeijzer +Date: Thu Oct 6 22:26:59 2005 +0000 + + more ramblings in readme + +Author: maartenkeijzer +Date: Thu Oct 6 22:14:48 2005 +0000 + + Added constant getting and setting + +Author: maartenkeijzer +Date: Thu Oct 6 18:10:13 2005 +0000 + + fix + +Author: kuepper +Date: Thu Oct 6 17:22:40 2005 +0000 + + Handle including from contrib/MGE nicely. + +Author: maartenkeijzer +Date: Thu Oct 6 14:31:09 2005 +0000 + + removed stray object files + +Author: maartenkeijzer +Date: Thu Oct 6 12:25:00 2005 +0000 + + first fix in makefile + +Author: maartenkeijzer +Date: Thu Oct 6 12:13:53 2005 +0000 + + Added mathsym+tcc and boost against all advice + +Author: maartenkeijzer +Date: Thu Oct 6 10:06:25 2005 +0000 + + Replaced GPL with LGPL license here. EO has always been LGPL + +Author: kuepper +Date: Wed Oct 5 22:22:25 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Wed Oct 5 22:08:29 2005 +0000 + + typos + +Author: kuepper +Date: Wed Oct 5 21:48:01 2005 +0000 + + cleanup + +Author: kuepper +Date: Wed Oct 5 21:40:53 2005 +0000 + + comments + +Author: kuepper +Date: Wed Oct 5 21:34:19 2005 +0000 + + finish the handling of gnuplot completely at build-time. + No gnuplot-ifs in headers anymore. + +Author: kuepper +Date: Wed Oct 5 21:25:51 2005 +0000 + + some first external links + +Author: kuepper +Date: Mon Oct 3 21:48:15 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Mon Oct 3 12:54:45 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Mon Oct 3 10:58:01 2005 +0000 + + cleanup + +Author: kuepper +Date: Mon Oct 3 10:53:35 2005 +0000 + + clean up + +Author: kuepper +Date: Mon Oct 3 10:32:56 2005 +0000 + + some nifty details, + passes W3 validator. + +Author: kuepper +Date: Mon Oct 3 10:26:30 2005 +0000 + + clean up html + +Author: kuepper +Date: Mon Oct 3 10:10:09 2005 +0000 + + move logo to cvs + +Author: kuepper +Date: Mon Oct 3 10:06:26 2005 +0000 + + updates for release + +Author: kuepper +Date: Mon Oct 3 09:56:02 2005 +0000 + + Make clear that the docs are for the cvs code. + +Author: kuepper +Date: Mon Oct 3 09:51:27 2005 +0000 + + update for release. + +Author: kuepper +Date: Mon Oct 3 09:47:06 2005 +0000 + + Initialize booleans to get rid of compiler-warnings. + +Author: kuepper +Date: Sun Oct 2 21:57:43 2005 +0000 + + fix foe gnuplot configuration-switch usage + +Author: kuepper +Date: Sun Oct 2 21:42:08 2005 +0000 + + Clean up configure/build-process. + - assume C++ standard-conforming environment + - add a user-option for gnuplot-support + - separate gnuplot-code into declaration and implementation, + so we can define at EO-build-time whether to use it or not. + + Adopt code and Makefiles to above changes. + + Some minor fixes. + +Author: kuepper +Date: Sat Oct 1 17:07:59 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Sat Oct 1 16:05:01 2005 +0000 + + add zip to dist, + update release-plan. + +Author: kuepper +Date: Sat Oct 1 15:35:45 2005 +0000 + + Search for ar as necessary on Solaris-x86. + Make DOXYGEN and AR precious variables. + +Author: kuepper +Date: Sat Oct 1 14:25:29 2005 +0000 + + update for solaris-x86 + +Author: kuepper +Date: Sat Oct 1 14:00:42 2005 +0000 + + Include inttypes.h if available but stdint.h is not. + Add powerpc success. + +Author: kuepper +Date: Sat Oct 1 13:27:25 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Sat Oct 1 13:26:29 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Sat Oct 1 13:07:01 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Sat Oct 1 13:00:59 2005 +0000 + + update and clean up + +Author: kuepper +Date: Sat Oct 1 12:18:21 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Sat Oct 1 12:13:00 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Sat Oct 1 11:59:14 2005 +0000 + + update docs + clean Tutorial + bump version-number for cvs + +Author: kuepper +Date: Fri Sep 30 21:16:24 2005 +0000 + + typo + +Author: kuepper +Date: Fri Sep 30 11:47:26 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Thu Sep 29 22:08:19 2005 +0000 + + *** empty log message *** + +Author: kuepper +Date: Thu Sep 29 22:01:52 2005 +0000 + + add main web-page + +Author: kuepper +Date: Thu Sep 29 16:53:06 2005 +0000 + + Use install to copy generated documentation. + +Author: kuepper +Date: Wed Sep 28 21:57:40 2005 +0000 + + remove forgotten config.h + +Author: kuepper +Date: Wed Sep 28 21:49:26 2005 +0000 + + Simplify configuration. + Remove support for (outdated) , require . + Require uint32_t for now, defined in stdint.h according to C99. + Some general cleanup and more documentation. + +Author: kuepper +Date: Wed Sep 28 18:25:38 2005 +0000 + + +Author: kuepper +Date: Wed Sep 28 17:59:59 2005 +0000 + + +Author: kuepper +Date: Wed Sep 28 16:32:35 2005 +0000 + + Switch on documentation generation for private and static members. + +Author: kuepper +Date: Wed Sep 28 14:32:12 2005 +0000 + + Some more documentation + +Author: kuepper +Date: Wed Sep 28 10:00:16 2005 +0000 + + Add ignore-files to quiten cvs + +Author: kuepper +Date: Wed Sep 28 08:36:00 2005 +0000 + + documente for stdev_eps + +Author: kuepper +Date: Tue Sep 27 22:06:08 2005 +0000 + + cleanup + +Author: kuepper +Date: Tue Sep 27 21:54:05 2005 +0000 + + documentation, whitespace + +Author: maartenkeijzer +Date: Mon Sep 26 11:22:47 2005 +0000 + + Removed wrong reference to rng from choice members (what was I thinking?) + +Author: kuepper +Date: Mon Sep 26 10:18:15 2005 +0000 + + Make sure uint32_t is defined correctly in eoRNG.h and use it where + appropriate. + +Author: maartenkeijzer +Date: Sun Sep 25 19:32:10 2005 +0000 + + Added few convenience functions + +Author: maartenkeijzer +Date: Sun Sep 25 19:09:38 2005 +0000 + + Added choice functions, plus rolled back inadvertant chance to eoRNG + +Author: kuepper +Date: Tue Sep 13 10:24:50 2005 +0000 + + setORcreate returns it parameter. + +Author: kuepper +Date: Mon Sep 12 17:53:25 2005 +0000 + + Use getORcreateParam instead of createParam when getting values from + the eoParser. + Update setORcreateParam. + +Author: maartenkeijzer +Date: Wed Sep 7 17:09:19 2005 +0000 + + eoRNG.h + +Author: kuepper +Date: Mon Sep 5 17:04:13 2005 +0000 + + Remove paradiseo configuration switch + +Author: kuepper +Date: Mon Sep 5 16:47:53 2005 +0000 + + Provide virtual destructors as gcc-4 barks heavily otherwise + +Author: kuepper +Date: Mon Sep 5 16:11:00 2005 +0000 + + ParadiesEO cleanup + +Author: kuepper +Date: Mon Sep 5 16:09:43 2005 +0000 + + Remove useless PAradisEO files + +Author: kuepper +Date: Mon Sep 5 16:08:14 2005 +0000 + + Remove useless files from paradiseo directories + +Author: cahon +Date: Fri Sep 2 13:36:21 2005 +0000 + + Removing ParadisEO + +Author: cahon +Date: Fri Sep 2 07:12:27 2005 +0000 + + Removing ParadisEO + +Author: cahon +Date: Fri Sep 2 07:00:45 2005 +0000 + + Removing ParadisEO + +Author: kuepper +Date: Mon Aug 29 07:50:50 2005 +0000 + + Provide eoParser::setORcreateParam to set a paramter in the parser to + a specific value. + +Author: kuepper +Date: Mon Aug 29 07:32:13 2005 +0000 + + Install eoPropGAGenOp.h + Add #include in eoEsChromInit.h in order to make gcc-4.0 happy. + +Author: evomarc +Date: Sat May 7 15:43:29 2005 +0000 + + Added eoPropGAGenOp, the sequential application of crossover and mutation + +Author: evomarc +Date: Mon Apr 4 20:41:06 2005 +0000 + + Small upgrade for gcc 3.3 (I guess no-one is using those files, right?) + +Author: evomarc +Date: Mon Mar 14 21:00:00 2005 +0000 + + Updated the src:: everywhere in eoVariableLengthCrossover.h eoFlOrMonOp.h + (that nobody seems to actually use btw :-) + +Author: cahon +Date: Wed Feb 23 13:31:20 2005 +0000 + + Removing ParadisEO + +Author: cahon +Date: Tue Feb 22 14:12:19 2005 +0000 + + Removing ParadisEO + +Author: evomarc +Date: Thu Feb 10 09:57:28 2005 +0000 + + Added the complete reference to the base class in call for value() + because g++3.4 otherwise complains + +Author: kuepper +Date: Mon Jan 3 09:35:39 2005 +0000 + + include config.h + +Author: kuepper +Date: Mon Jan 3 09:35:17 2005 +0000 + + fix for gcc-3.4 + +Author: evomarc +Date: Mon Dec 27 09:08:44 2004 +0000 + + Mainly made it obvious that Lesson4 contains "ready-to-use" EAs + +Author: evomarc +Date: Mon Dec 27 08:01:29 2004 +0000 + + Modified the way to set the initial values of the sigmas (and stdevs) + so that they can be scaled to the range of each variable (by adding + a "%" after the value in the parameter file) + See also the examples in tutorial/Lesson4 + +Author: evomarc +Date: Mon Dec 27 07:59:58 2004 +0000 + + Added the 2 parameter files ESEA.param amd RealEA.param + so both programs go to 0 nicely instead of staying anywhere but close + +Author: evomarc +Date: Mon Dec 27 07:33:03 2004 +0000 + + Added the explicit calls to the base class ctors in eoXXXGeneralBounds copy Ctors + +Author: evomarc +Date: Mon Dec 27 07:31:59 2004 +0000 + + Fixed some int - unsigned int problem for the case "combien < 0" + +Author: kuepper +Date: Thu Dec 23 17:33:08 2004 +0000 + + reshuffle libraries to resolve all dependencies + +Author: kuepper +Date: Thu Dec 23 17:26:39 2004 +0000 + + minor updates, + create doxytag-file when running doxygen + +Author: kuepper +Date: Thu Dec 23 17:22:52 2004 +0000 + + more adjustments for gcc-3.4 (now using optimization, go figure...) + +Author: kuepper +Date: Thu Dec 23 16:06:37 2004 +0000 + + small fix for gcc-3.3.3 + +Author: maartenkeijzer +Date: Thu Dec 23 15:40:44 2004 +0000 + + Some small changes concerning flags and warnings + +Author: kuepper +Date: Thu Dec 23 15:29:07 2004 +0000 + + Adjust code to perform to C++ standard according to gcc-3.4 + interpretation... (Have not compiled/checked/changed paradisEO.) + + That is, the current code compiles with gcc-3.4 and the checks + (besides t-MGE1bit) all pass. + +Author: maartenkeijzer +Date: Thu Dec 23 10:14:42 2004 +0000 + + Added using declarations to avoid g++-3.4 errors + +Author: evomarc +Date: Wed Dec 1 09:27:31 2004 +0000 + + Added comments so that the new classes eoGeneralXXXBounds are taken into account + by Doxygen. + +Author: evomarc +Date: Wed Dec 1 09:23:53 2004 +0000 + + ... some comments ... + +Author: evomarc +Date: Wed Dec 1 09:22:48 2004 +0000 + + ... some comments for Doxygen ... + +Author: evomarc +Date: Wed Dec 1 09:19:47 2004 +0000 + + ... a comment ... + +Author: evomarc +Date: Wed Dec 1 08:49:40 2004 +0000 + + Added a few words about Lesson5, and the change in the Makefiles. + Also, looking alive is probably important ! + +Author: evomarc +Date: Mon Nov 29 20:49:34 2004 +0000 + + Corrected some bugs in eoGeneralXXXBounds (e.g. no const in copy Ctor arguments) + Added a default value for the intialization (-infty, +infty) + Needs to allow uniform() on unbounded - still pondering + +Author: evomarc +Date: Fri Nov 5 08:57:34 2004 +0000 + + Added classes to hendle bounds: + - eoGeneralRealBound that can be initialized using a string (and hence can be + easily read as a parameter) + - eoIntBound and all other integer-equivalent of the classes in eoRealBound.h + Note that there is no equivalent to eoRealVectorBounds for vector of integers + + In file eo, I have added the 2 includes of eoRealBounds.h and eoIntBounds.h + The first one was already there by chance, through eoUniformInit.h + +Author: evomarc +Date: Fri Nov 5 08:55:12 2004 +0000 + + Added classes to hendle bounds: + - eoGeneralRealBound that can be initialized using a string (and hence can be + easily read as a parameter) + - eoIntBound and all other integer-equivalent of the classes in eoRealBound.h + Note that there is no equivalent to eoRealVectorBounds for vector of integers + +Author: kuepper +Date: Thu Oct 7 14:32:54 2004 +0000 + + fix install dir + +Author: kuepper +Date: Thu Oct 7 13:36:43 2004 +0000 + + were these lost? + +Author: kuepper +Date: Thu Oct 7 13:34:08 2004 +0000 + + wrong directory + +Author: kuepper +Date: Wed Sep 29 18:37:20 2004 +0000 + + update for sstream + +Author: kuepper +Date: Tue Sep 28 17:13:34 2004 +0000 + + +Author: evomarc +Date: Mon Sep 27 15:19:53 2004 +0000 + + Added include eoDistance.h + +Author: evomarc +Date: Mon Sep 27 13:34:34 2004 +0000 + + Replaced the eoNormalMutation (mutating ALL variables of a real-valued vector) + with eiNormalVecMutation that has a proba. to mutation each variable + +Author: evomarc +Date: Mon Sep 27 13:31:40 2004 +0000 + + Added the class eoNormalVecMutation (yes, should have made another file :-( + +Author: okoenig +Date: Sun Sep 26 09:47:06 2004 +0000 + + Replaced top_builddir with top_srcdir + +Author: okoenig +Date: Sun Sep 26 09:45:59 2004 +0000 + + Removing a "/" at the end of a comment + +Author: kuepper +Date: Fri Sep 24 15:00:48 2004 +0000 + + Fix doc-target. + Fix inclusion of documentation in dist. + +Author: kuepper +Date: Fri Sep 24 11:55:09 2004 +0000 + + minor fixes + +Author: kuepper +Date: Wed Sep 22 18:38:12 2004 +0000 + + Removed clean-local due to problems with "make distcheck" + +Author: kuepper +Date: Wed Sep 22 18:18:31 2004 +0000 + + fix installation, dist-preparation + +Author: kuepper +Date: Wed Sep 22 17:30:11 2004 +0000 + + updates for distributing/installing ParadisEO. + +Author: kuepper +Date: Wed Sep 22 13:20:15 2004 +0000 + + update for new build-process + +Author: kuepper +Date: Wed Sep 22 12:38:28 2004 +0000 + + update build process to include paradiseo tutorial, + fix paradiseo headers for sstream + +Author: kuepper +Date: Wed Sep 22 08:18:29 2004 +0000 + + Update configure with switches for app, ParadisEO, and tutorial. + Add ParadisEO/Lesson1 tutorial in build-process. + minor fixes. + +Author: maartenkeijzer +Date: Tue Sep 21 19:49:48 2004 +0000 + + Made couple of functions virtual + +Author: kuepper +Date: Tue Sep 21 17:01:14 2004 +0000 + + updates, + start supoorting ParadisEO + +Author: kuepper +Date: Tue Sep 21 10:30:45 2004 +0000 + + fix dist-header + +Author: kuepper +Date: Tue Sep 21 10:23:33 2004 +0000 + + fix 'make dist', works now (besides ParadisEO). + +Author: kuepper +Date: Mon Sep 20 21:47:15 2004 +0000 + + updates + +Author: kuepper +Date: Mon Sep 20 17:14:11 2004 +0000 + + fix + +Author: kuepper +Date: Mon Sep 20 17:12:12 2004 +0000 + + better distribution support (not finished) + +Author: kuepper +Date: Mon Sep 20 17:06:25 2004 +0000 + + conditional compilation fixes + +Author: kuepper +Date: Mon Sep 20 16:05:25 2004 +0000 + + don't use user-variables + +Author: kuepper +Date: Mon Sep 20 15:51:53 2004 +0000 + + update user commentary + +Author: kuepper +Date: Mon Sep 20 15:50:00 2004 +0000 + + *** empty log message *** + +Author: kuepper +Date: Mon Sep 20 14:11:24 2004 +0000 + + updates for build-process + +Author: kuepper +Date: Mon Sep 20 09:56:10 2004 +0000 + + *** empty log message *** + +Author: kuepper +Date: Mon Sep 20 09:52:19 2004 +0000 + + Remove support files, they are automatically created by autotools + +Author: kuepper +Date: Mon Sep 20 09:50:47 2004 +0000 + + update + +Author: kuepper +Date: Mon Sep 20 09:47:19 2004 +0000 + + remove + +Author: kuepper +Date: Mon Sep 20 09:46:48 2004 +0000 + + remove Makefiles from cvs + +Author: kuepper +Date: Fri Sep 17 17:05:28 2004 +0000 + + add conditional includes for sstream + +Author: kuepper +Date: Fri Sep 17 17:00:04 2004 +0000 + + cleanup + +Author: kuepper +Date: Fri Sep 17 16:53:31 2004 +0000 + + Updated build-prcess to be completely under automake control. + + For the tutorial the old Makefiles are saved as Makefile.simple in all + the respective directories. + + Use generated config.h instead of command-line passing of preprocessor + flags. + + Updated support files from current automake. + +Author: kuepper +Date: Fri Sep 17 15:20:19 2004 +0000 + + Save copies of old simple Makefiles + +Author: maartenkeijzer +Date: Mon Aug 30 19:44:48 2004 +0000 + + added verbose flag that can be used to turn off annoying message to cout + +Author: evomarc +Date: Sat Aug 28 16:26:03 2004 +0000 + + CLeaned up the comments in files related to Sharing (added t-eoSharing in test) + +Author: evomarc +Date: Sat Aug 28 16:25:12 2004 +0000 + + Committing at last the long awaited test for Sharing + +Author: evomarc +Date: Sat Aug 28 14:03:34 2004 +0000 + + Cleaned up the comments + +Author: jmerelo +Date: Tue Aug 10 17:19:46 2004 +0000 + + Changes in docs and added stuff to eoEvalSteadyFitness to reset after using it + +Author: jmerelo +Date: Tue Aug 10 07:39:10 2004 +0000 + + Updating doxygen configuration + +Author: okoenig +Date: Sun Jul 25 13:26:02 2004 +0000 + + added a string msg to eoScalarFitnessAssembled, in order to store all sorts of messages for an individual + +Author: evomarc +Date: Fri Jul 16 08:45:02 2004 +0000 + + Added className (mysteriously missint) mandatory for eoCombinedInit + +Author: evomarc +Date: Fri Jul 16 08:44:14 2004 +0000 + + Allows proportional combinations of eoInit objects + Similar to eoPropostionalCombinedXXXOp + +Author: cahon +Date: Mon Jul 12 09:16:41 2004 +0000 + + Adding typedef EOT EOType ; + +Author: cahon +Date: Mon Jul 12 08:57:38 2004 +0000 + + Adding typedef EOT EOType ; + +Author: evomarc +Date: Wed Jun 23 23:19:17 2004 +0000 + + Added the Ctor using the Parser + +Author: evomarc +Date: Tue Jun 15 07:28:54 2004 +0000 + + Added the className method everywhere + +Author: evomarc +Date: Tue Jun 15 07:09:57 2004 +0000 + + Added the className methods everywhere + +Author: evomarc +Date: Tue Jun 15 07:06:27 2004 +0000 + + Added newline at end of stat + +Author: evomarc +Date: Tue Jun 15 07:04:12 2004 +0000 + + Added the allClassName method to print the name of all + classes that have been added to the checkpoint + +Author: okoenig +Date: Mon Jun 14 17:07:25 2004 +0000 + + Added a failed boolean to the fitness, for statistics... Average stat values are now computed from succesful fitness evaluations only + +Author: okoenig +Date: Mon Jun 14 17:05:07 2004 +0000 + + Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) + Avg Stats are now only evaluated of individuals if this bool is false! + +Author: okoenig +Date: Mon Jun 14 11:59:39 2004 +0000 + + Replaced #include with #include to get rid of "deprecated" warnings in gcc 3.3 + +Author: okoenig +Date: Mon Jun 14 11:24:37 2004 +0000 + + Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) + Avg Stats are now only evaluated of individuals if this bool is false! + +Author: okoenig +Date: Mon Jun 14 11:23:48 2004 +0000 + + Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis) + +Author: evomarc +Date: Wed May 26 10:23:07 2004 +0000 + + Adding Sharing (though eoSharingSelect - a roulette selection on shared fitnesses + +Author: evomarc +Date: Wed May 26 09:00:26 2004 +0000 + + Temporary modification of the tutorial to account for the new features + - stat.tmpl allowing easy creation of own stat + - sharing as a new possible selector in make_algo_scalar - requires a distance + No detail given, though ... + +Author: evomarc +Date: Tue May 25 08:03:30 2004 +0000 + + Adding sharing - needed to modify quite a few files, like eoDistance.h + make_algo_scalar.h and all related files, and the like + +Author: evomarc +Date: Tue May 25 07:57:52 2004 +0000 + + Adding the statistics in createSimple (create.sh is becoming obsolete) + +Author: stevemadere +Date: Fri May 21 01:44:32 2004 +0000 + + Fixed a bug in mlp::net::load() that prevented loading of multiple nets + from the same stream. + +Author: stevemadere +Date: Fri Apr 23 16:20:12 2004 +0000 + + Added weight perturbation operators to enable implementation of + exact GPROP-III algorithm. + +Author: evomarc +Date: Thu Apr 8 07:55:40 2004 +0000 + + Added the setLongName method to handle the prefix trick in eoParser + +Author: evomarc +Date: Mon Apr 5 15:28:12 2004 +0000 + + Added a prefix data in eoParser - and the setPrefix method - + for multi-population parameter input. Now you can call the make_xxx + functions from teh src/do directory several times for different populations + provided you do different calls to setPrefix inbetween + +Author: evomarc +Date: Tue Mar 30 16:51:06 2004 +0000 + + Corrected errors in the "memory management" section. + Thanks to ZhangQian for pointing them out + +Author: okoenig +Date: Sun Mar 28 22:18:03 2004 +0000 + + Bugfix regarding the feasible flag + +Author: maartenkeijzer +Date: Fri Mar 26 09:56:56 2004 +0000 + + Fixed bug in rng::roulette_wheel: use of float had too little precision in change/fortune var + +Author: maartenkeijzer +Date: Fri Mar 26 09:36:07 2004 +0000 + + Fixed rng::uniform to not provide the wrong result (1.0) once in every 2^32 times + +Author: stevemadere +Date: Wed Feb 11 23:03:23 2004 +0000 + + Made mlp::net::operator() a virtual function to allow for subclassing + with networks that transform their input or output. + +Author: stevemadere +Date: Tue Feb 10 22:33:30 2004 +0000 + + Fixed some signed/unsigned conversion bugs + +Author: jeggermo +Date: Mon Feb 2 08:54:10 2004 +0000 + + *** empty log message *** + +Author: maartenkeijzer +Date: Wed Jan 21 19:57:19 2004 +0000 + + Added define NO_GNUPLOT to disable gnuplot extensions + Needed for win32 (well, at least for me) + +Author: stevemadere +Date: Tue Jan 13 20:28:33 2004 +0000 + + Fixed the string serialization operators (>>, <<) for neuron, layer, + and net so they actually work and added or fixed stream-source + constructors where appropriate. + +Author: stevemadere +Date: Tue Jan 13 20:21:52 2004 +0000 + + Made it compile under gcc 3.2.2 by adding explicit definitions + of normally derived comparison operators >, >=, and == for the + structure phenotype. ( adding #include was not sufficient + to solve the problem) + Also added function gprop_use_datasets() to give more flexibility + in subclassing the datasets used to train the nets. + +Author: evomarc +Date: Tue Jan 13 03:35:27 2004 +0000 + + Added the standard header - just a test of CVS in fact! + +Author: evomarc +Date: Wed Dec 24 16:38:02 2003 +0000 + + Corrected a but in eoUniformMutation (only the first component ever got modified! + Thanks to Jeroen's student ... + +Author: evomarc +Date: Fri Dec 5 05:39:40 2003 +0000 + + There was an infinite loop in case of a file without section header on first line! + +Author: evomarc +Date: Fri Dec 5 05:38:02 2003 +0000 + + Added a few user-friendly comments in case sizes don't match between + load file and required popsize + +Author: evomarc +Date: Wed Nov 26 14:20:26 2003 +0000 + + A minor typo ... + +Author: evomarc +Date: Wed Nov 26 11:15:59 2003 +0000 + + THe call to randomize was forgotten after the choice of a terminal + at max_depth. + This was only visible if + - you implemented the randomize method + - you reached the maximum depth (or used ramped half-and-half). + +Author: okoenig +Date: Wed Nov 19 13:29:15 2003 +0000 + + Added possibility to print header to first line of output file; control through last bool in constructor - default = false... + +Author: jeggermo +Date: Tue Nov 4 15:32:24 2003 +0000 + + parse_tree.h now uses standard memory allocation + for MacOSX + +Author: jeggermo +Date: Tue Nov 4 15:29:24 2003 +0000 + + eoData has been changed slightly for MacOSX + +Author: maartenkeijzer +Date: Sun Oct 12 23:49:23 2003 +0000 + + oops, forgot std:: + +Author: maartenkeijzer +Date: Sun Oct 12 20:53:28 2003 +0000 + + Sort dissappeared in one-objective + +Author: evomarc +Date: Sat Sep 20 05:42:23 2003 +0000 + + Updated lists of headers in some Makefile.am (thanks to Claude Dion for pointing this out) + While there, changed the presentations of source and headers (1 per line with \) + +Author: evomarc +Date: Thu Sep 18 15:09:34 2003 +0000 + + Modified a wrong link + +Author: evomarc +Date: Tue Sep 2 05:49:37 2003 +0000 + + Slightly modified the formula: the worst individual had "fitness" 0 in hte case of linear scaling with pressure=2. Now it has fitness 1/[P(P-1)/2] + Thanks to Gilles BAUDRILLARD (EADS) + +Author: evomarc +Date: Mon Sep 1 12:56:29 2003 +0000 + + Added 2 missing headers (and broke the long lines). + Thanks to Jochen Küpper for pointing this out. + +Author: evomarc +Date: Tue Aug 26 18:07:06 2003 +0000 + + Corrected a HUGE bug in eoRealUXover !!! + Thanks to Gilles BAUDRILLARD - EADS + +Author: okoenig +Date: Thu Aug 21 13:02:53 2003 +0000 + + added parameters to the constructors to start generation counting !=0 + the parameters are optional and appended in the end + +Author: evomarc +Date: Sat Aug 2 06:55:47 2003 +0000 + + CLean-up + +Author: evomarc +Date: Sat Aug 2 06:42:33 2003 +0000 + + Adding the generic operators for FIXED-LENGTH ORDERED genotypes eoFlOrXxxOp.h + +Author: okoenig +Date: Wed Jul 30 14:48:13 2003 +0000 + + Inserted a missing std:: + +Author: evomarc +Date: Tue Jul 29 05:33:58 2003 +0000 + + Forgot the dir when adding eoSBXcross.h :-((( + +Author: evomarc +Date: Mon Jul 28 09:48:58 2003 +0000 + + Adding SBX crossover operator in es dir + +Author: evomarc +Date: Mon Jul 28 09:47:15 2003 +0000 + + Adding the SBX operator in es dir + +Author: evomarc +Date: Sat Jun 21 06:34:00 2003 +0000 + + More precise comment + +Author: jmerelo +Date: Wed Jun 18 09:07:19 2003 +0000 + + Eliminated using namespace std + +Author: jmerelo +Date: Tue Jun 17 12:03:42 2003 +0000 + + better eoString + +Author: jmerelo +Date: Tue Jun 17 06:24:15 2003 +0000 + + Changes to obsolete things + +Author: okoenig +Date: Mon Jun 16 21:41:30 2003 +0000 + + added a public bool feasible, used to identify feasible individuals in initialization processes + +Author: maartenkeijzer +Date: Mon Jun 9 06:25:11 2003 +0000 + + Exported operator() for eoSGATransform in abstract1.cpp + +Author: evomarc +Date: Mon Jun 9 06:17:26 2003 +0000 + + Change in terminology: EDA (Estimation of Distribution Algorithms) replaces + DEA (Distribution Evolution Algorithms), as it seems more widely used today. + +Author: evomarc +Date: Mon Jun 9 06:06:13 2003 +0000 + + Change in terminology: EDA (Estimation of Distribution Algorithms) replaces + DEA (Distribution Evolution Algorithms), as it seems more widely used today. + +Author: maartenkeijzer +Date: Fri Jun 6 10:29:13 2003 +0000 + + Improved the check for changed. Now it will only set the changed flag when the elements that are flipped are actually different + +Author: maartenkeijzer +Date: Wed Jun 4 11:50:48 2003 +0000 + + added shuffle + +Author: maartenkeijzer +Date: Wed Jun 4 09:34:26 2003 +0000 + + Added tests for roulette wheel selection + +Author: maartenkeijzer +Date: Wed Jun 4 09:33:27 2003 +0000 + + optimized eoProportional and added universalselect + +Author: jeggermo +Date: Fri May 16 14:28:52 2003 +0000 + + GCC 3.3 + +Author: evomarc +Date: Sun Apr 27 06:08:11 2003 +0000 + + Added keywords "Sequential" and "Random" as synonyms of resp. "Deterministic" + and "Uniform" - for EASEA + +Author: maartenkeijzer +Date: Sun Apr 20 12:57:59 2003 +0000 + + Removed HAVE_SSTREAM for redhat 2.96 + +Author: cahon +Date: Fri Apr 18 13:32:39 2003 +0000 + + missing include eoParetoFitness.h + +Author: okoenig +Date: Sat Apr 5 13:42:44 2003 +0000 + + minor changes + +Author: okoenig +Date: Sat Apr 5 13:42:01 2003 +0000 + + added eoAssembledFitnessStat.h to implement Best and Avg Stat for eoScalarFitnessAssembled + +Author: okoenig +Date: Sat Apr 5 13:40:57 2003 +0000 + + Removed function template specializations for eoScalarFitnessAssembled from classes in this file, since they do not work under Visual Studio! Reimplemented these stat classes for this new fitness class in eoAssembledFitnessStat.h + +Author: okoenig +Date: Thu Apr 3 16:51:47 2003 +0000 + + Included new fitness class eoScalarFitnessAssembled, that stores different fitness terms in a std::vector, but still acts as a scalar fitness. A new checkpoint uses these values for statistics. + +Author: okoenig +Date: Thu Apr 3 16:47:47 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +Author: okoenig +Date: Thu Apr 3 16:25:55 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +Author: okoenig +Date: Thu Apr 3 10:44:35 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +Author: okoenig +Date: Thu Apr 3 09:23:52 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +Author: okoenig +Date: Thu Apr 3 09:11:17 2003 +0000 + + Minor changes to make it run under Visual Studio 6.0 + +Author: okoenig +Date: Wed Apr 2 21:10:53 2003 +0000 + + included new fitness class eoScalarFitnessAssembled, that stores different fitness terms in a std::vector, but still acts as a scalar fitness. A new checkpoint uses these values for statistics. + +Author: evomarc +Date: Tue Apr 1 12:09:37 2003 +0000 + + Removed a dummy line containing reference to lesson3! + +Author: maartenkeijzer +Date: Tue Mar 25 10:46:08 2003 +0000 + + Deleted political statement as I changed my mind about this + +Author: evomarc +Date: Sat Mar 22 06:39:21 2003 +0000 + + ADded comments and hook for copy constructor + +Author: maartenkeijzer +Date: Fri Mar 21 09:17:38 2003 +0000 + + bumped up the version number + +Author: maartenkeijzer +Date: Fri Mar 21 02:44:05 2003 +0000 + + now added an std::ends for plotting strstream + +Author: maartenkeijzer +Date: Fri Mar 21 02:41:54 2003 +0000 + + again: std::ends and stringstream + +Author: maartenkeijzer +Date: Fri Mar 21 02:39:09 2003 +0000 + + fixed (?) some problems with stringstreams and std::ends + +Author: maartenkeijzer +Date: Thu Mar 20 20:00:38 2003 +0000 + + eliminated gprop from the build until someone makes sure it builds under gcc-3.2 + +Author: maartenkeijzer +Date: Thu Mar 20 19:49:32 2003 +0000 + + replace \0 with std::ends + +Author: maartenkeijzer +Date: Wed Mar 19 10:47:08 2003 +0000 + + finished pickling support for valueParam + +Author: maartenkeijzer +Date: Wed Mar 19 10:16:56 2003 +0000 + + Added pickling support for ValueParams + +Author: maartenkeijzer +Date: Wed Mar 19 08:53:59 2003 +0000 + + removed comment in PyEO.cpp + +Author: maartenkeijzer +Date: Tue Mar 18 16:57:17 2003 +0000 + + added operator> + +Author: maartenkeijzer +Date: Tue Mar 18 16:52:31 2003 +0000 + + fixed a bug reported on sourceforge + +Author: maartenkeijzer +Date: Tue Mar 18 16:35:27 2003 +0000 + + *** empty log message *** + +Author: maartenkeijzer +Date: Tue Mar 18 09:40:36 2003 +0000 + + excluded gcc>3 from check + +Author: maartenkeijzer +Date: Tue Mar 18 09:35:46 2003 +0000 + + hi + +Author: maartenkeijzer +Date: Sun Mar 2 11:35:43 2003 +0000 + + decorated sort and max with std:: specifier + +Author: maartenkeijzer +Date: Sun Mar 2 11:29:01 2003 +0000 + + decorated copy with std:: specifier + +Author: maartenkeijzer +Date: Sun Mar 2 11:26:45 2003 +0000 + + added typenames for pop::iterator + +Author: maartenkeijzer +Date: Sun Mar 2 11:16:33 2003 +0000 + + added include file + +Author: okoenig +Date: Fri Feb 28 17:47:24 2003 +0000 + + This Makefile.am was missing; all it does is adding the *.h and Readme files to distribution + +Author: maartenkeijzer +Date: Fri Feb 28 16:56:59 2003 +0000 + + oops, forgot thisone + +Author: maartenkeijzer +Date: Fri Feb 28 16:49:19 2003 +0000 + + changed to using sstream + +Author: okoenig +Date: Thu Feb 27 19:28:07 2003 +0000 + + Removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary. + +Author: okoenig +Date: Thu Feb 27 19:18:53 2003 +0000 + + removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary + +Author: okoenig +Date: Thu Feb 27 19:18:07 2003 +0000 + + removed "using namespace std" statements from header files in EO -- "std::" identifier were added where necessary. + +Author: okoenig +Date: Thu Feb 20 19:13:33 2003 +0000 + + added an #ifdef _MSC_VER statement to hide "typename" identifier for Visual Studio + +Author: maartenkeijzer +Date: Mon Feb 17 10:42:03 2003 +0000 + + added std:: + +Author: maartenkeijzer +Date: Mon Feb 17 10:19:25 2003 +0000 + + Updated to use gcc-3.2 + +Author: maartenkeijzer +Date: Mon Feb 17 09:52:36 2003 +0000 + + rolled back unfortunate change in eoAverageStat + +Author: evomarc +Date: Sat Feb 8 05:36:01 2003 +0000 + + Added a mthod to remove one of the combined things (from Ramón Casero Cañas) + +Author: evomarc +Date: Sat Feb 8 05:24:51 2003 +0000 + + Removed debugging printouts + +Author: maartenkeijzer +Date: Tue Jan 14 10:09:28 2003 +0000 + + added missing valueparm.h" + +Author: maartenkeijzer +Date: Tue Jan 14 09:37:45 2003 +0000 + + next iteration + +Author: maartenkeijzer +Date: Fri Jan 10 15:42:45 2003 +0000 + + found a bug in eoProportionalOp, hope this helps... + +Author: maartenkeijzer +Date: Fri Jan 10 15:41:17 2003 +0000 + + Added monitors and statistics, also made a module with some + specific python stuff in __init__.py + +Author: okoenig +Date: Wed Jan 8 12:43:31 2003 +0000 + + bugfix: since there are no Makefiles in the directory ~eo/src/do anymore, I removed this directory from the subdirs list in this Makefile.am + +Author: maartenkeijzer +Date: Tue Jan 7 14:24:56 2003 +0000 + + some bugfixes + +Author: maartenkeijzer +Date: Tue Jan 7 10:50:23 2003 +0000 + + df + +Author: maartenkeijzer +Date: Tue Jan 7 10:49:55 2003 +0000 + + added a small cookbook + +Author: maartenkeijzer +Date: Mon Jan 6 21:56:40 2003 +0000 + + needed for redhat + +Author: maartenkeijzer +Date: Mon Jan 6 16:11:05 2003 +0000 + + added + +Author: maartenkeijzer +Date: Mon Jan 6 16:10:38 2003 +0000 + + Added multi-objective support to PyEO (and changed its name to that) + +Author: maartenkeijzer +Date: Mon Jan 6 14:25:40 2003 +0000 + + Changed a few things so that the python library can + be used with the multi-objective library (it basically + boils down to removing the assumption that fitness() has a + size() member function and changing eoPop to vector) + +Author: maartenkeijzer +Date: Sun Jan 5 16:45:48 2003 +0000 + + updated build info + +Author: maartenkeijzer +Date: Sun Jan 5 16:31:50 2003 +0000 + + Added pyeo. Some changes needed to be made for include files and the like + in some files (and some bugs were fixed as well [Marc: eoOneToOneBreeder was a mess]) + + eoFunctor.h now contains static functor_category members, this shouldn't hurt anyone. + +Author: maartenkeijzer +Date: Sun Dec 29 22:48:01 2002 +0000 + + oops, error in line 47 + +Author: music_dev +Date: Sat Dec 14 02:51:53 2002 +0000 + + Added compatibility for MSVC.NET + +Author: cahon +Date: Fri Dec 13 10:03:47 2002 +0000 + + Fixing bug [preserve order of the pop. to evaluate] + +Author: evomarc +Date: Mon Dec 9 21:04:47 2002 +0000 + + There was a bug in teh Ctor (fortunately, only with the last + parameter, that was generally used with the default value). + Thanks to Ramón Casero Cañas + +Author: evomarc +Date: Mon Dec 9 06:57:33 2002 +0000 + + Corrected wrong links in the 1st paragraph + +Author: evomarc +Date: Mon Dec 9 06:19:56 2002 +0000 + + Corrected an error in name of statusParam parameter + +Author: evomarc +Date: Mon Dec 9 06:17:25 2002 +0000 + + Corrected a typo + +Author: okoenig +Date: Sun Nov 3 13:17:48 2002 +0000 + + reordered initialization list to match declaration order + +Author: okoenig +Date: Sun Nov 3 13:07:43 2002 +0000 + + added some typename statements to make it compile without warnings under gcc3.2 + +Author: okoenig +Date: Wed Oct 23 10:23:03 2002 +0000 + + small bugfix, to make this example run under Solaris/g++ 2.95.3 + +Author: evomarc +Date: Wed Oct 23 04:43:10 2002 +0000 + + Adding depcom so that it compile smoothly on Solaris. + Thanks to Oliver Koenig + +Author: evomarc +Date: Wed Oct 23 04:42:07 2002 +0000 + + Modification of all Makefiles so that it compiles smoothly on Solaris. + Thanks to Oliver Koenig + +Author: evomarc +Date: Mon Oct 21 04:28:11 2002 +0000 + + Added the .SUFFIXES lien (for Solaris) and the use of $(CXX) instead of c++ + plus a few comments :-) + +Author: jeggermo +Date: Fri Oct 18 11:39:09 2002 +0000 + + *** empty log message *** + +Author: music_dev +Date: Mon Oct 14 16:16:01 2002 +0000 + + Better install for libraries. + +Author: evomarc +Date: Wed Oct 2 14:07:58 2002 +0000 + + Removed the stringstream (sstream not in all compilers distributions) + +Author: evomarc +Date: Wed Sep 18 15:36:41 2002 +0000 + + Added accessors to private parameter stopOnUnknownParam + +Author: jeggermo +Date: Wed Sep 18 12:40:46 2002 +0000 + + A new readFrom & printOn function for EO.h + Now it CAN handle VALID/INVALID fitnesses. + + The problems are over at last + +Author: cahon +Date: Tue Sep 17 07:08:51 2002 +0000 + + Allowing a first eval. of the pop. to be performed by the E.A. + +Author: cahon +Date: Mon Sep 16 12:53:08 2002 +0000 + + Invalidating flags ... + +Author: evomarc +Date: Thu Aug 29 16:44:30 2002 +0000 + + Added a missing test in the weak elitism + +Author: evomarc +Date: Thu Aug 29 16:31:50 2002 +0000 + + Added an error message in case of unknown reducer + (was the source of a segmentation fault with old parameter files) + +Author: evomarc +Date: Fri Aug 23 16:06:06 2002 +0000 + + Removed non-tested code (forthcoming)... + +Author: evomarc +Date: Fri Aug 23 16:02:02 2002 +0000 + + It was about time to enter the template file for EASEA here, as createSimple + and EASEA are doing approximately the same job ...` + +Author: evomarc +Date: Fri Aug 23 15:58:15 2002 +0000 + + Adding a simpler way of generating files for new genotypes (see EO.tpl + in EASEA). + +Author: evomarc +Date: Fri Aug 23 15:56:09 2002 +0000 + + Adding more repalcements utilities (see do/make_easea_algo.h) + +Author: evomarc +Date: Fri Aug 23 15:54:30 2002 +0000 + + Adding replacement strategies: teh ReduceMergeReduce for EASEA and the + MGG and G2 replacements from Deb's PCX paper + +Author: evomarc +Date: Fri Aug 23 15:52:40 2002 +0000 + + Adding make_xxx files for EASEA + +Author: evomarc +Date: Fri Aug 23 15:50:57 2002 +0000 + + Adding eoSGAGenOp.h - mimicking eoSGATransform into an eoGenOp + +Author: evomarc +Date: Fri Aug 23 15:49:29 2002 +0000 + + Added the invalidate method + +Author: evomarc +Date: Fri Aug 23 15:44:27 2002 +0000 + + Tiny details + +Author: evomarc +Date: Fri Aug 23 15:41:00 2002 +0000 + + Added bounds to FitnessStat and Gnuplot monitor + +Author: evomarc +Date: Fri Aug 2 07:40:47 2002 +0000 + + Removed some multiple declaraions inside for loops that MSVC++ doesn't like + +Author: evomarc +Date: Tue Jul 30 03:21:59 2002 +0000 + + Removed a typo that made gnuplot file not be in the RESULT directory + +Author: evomarc +Date: Sun Jul 28 05:40:25 2002 +0000 + + Added eoReduceMergeReduce and elitism (+ corrected small bug in eoHowMany) + +Author: evomarc +Date: Wed Jul 24 18:08:30 2002 +0000 + + A radical change in eoCheckPoint - though invisible from the outside: + eoCheckpoint now alos contains a vector - and not only + IS A eoContinue. So you can ADD another eoContinue to an eoCheckpoint... + +Author: evomarc +Date: Wed Jul 24 18:05:18 2002 +0000 + + There was a problem with the activation of the Ctrl C + +Author: maartenkeijzer +Date: Tue Jul 23 09:34:46 2002 +0000 + + added EO.h to include list + +Author: maartenkeijzer +Date: Tue Jul 23 09:17:59 2002 +0000 + + Run it for 50 generations, it's too fast otherwise :) + +Author: maartenkeijzer +Date: Mon Jul 22 13:35:11 2002 +0000 + + +Author: maartenkeijzer +Date: Mon Jul 22 13:31:55 2002 +0000 + + added a 'nasty_declone_flag' to be able to declone a population + +Author: maartenkeijzer +Date: Mon Jul 22 13:20:04 2002 +0000 + + Added 'sweepline' optimization for eoNDSorting.h + +Author: evomarc +Date: Sat Jul 6 05:24:51 2002 +0000 + + Added eoSequentialSelect.h in the includes + +Author: evomarc +Date: Sat Jul 6 05:23:18 2002 +0000 + + I had left a flaw in teh Ctor (did not accept rates >1) + +Author: evomarc +Date: Fri Jun 21 13:50:39 2002 +0000 + + Changd a const_iterator to iterator in method it_best_element + God (or Maarten :-) knows why this was there + +Author: evomarc +Date: Fri Jun 21 13:30:17 2002 +0000 + + Added the negative rate (-> 1-rate) and the unary operator- (useful + in eoG3Replacement) + +Author: jeggermo +Date: Thu Jun 20 12:38:47 2002 +0000 + + small typo + +Author: evomarc +Date: Wed Jun 19 03:42:54 2002 +0000 + + Replaced ../../src with the DIR_EO macro! + +Author: evomarc +Date: Mon Jun 17 09:19:17 2002 +0000 + + Added include file eoHowMany for self-consistency + +Author: evomarc +Date: Mon Jun 17 09:18:37 2002 +0000 + + Removed eoSequentialSelect + +Author: evomarc +Date: Mon Jun 17 09:13:47 2002 +0000 + + Added the Truncation embedders, and the separate eoSequentialSelect file + +Author: evomarc +Date: Mon Jun 17 09:12:08 2002 +0000 + + Separated eoSequentialSelect from eoRandomSelect.h file + Added eoEliteSequentialSelect, where best is always selected first, useful for + G3 engine + +Author: evomarc +Date: Mon Jun 17 04:51:34 2002 +0000 + + Reshaped the whole code + Added the SequentialSelect selectors + THe generated files are now "hidden" in ResSelect dir (hardcoded!) + +Author: evomarc +Date: Mon Jun 17 04:13:45 2002 +0000 + + Adding the truncation selectors. + 2 versions: eoTruncatedSelectOne is an eoSelectOne, and + eoTruncatedSelectMany works like an eoSelectMany (but is NOT) + +Author: jeggermo +Date: Mon Jun 10 14:10:35 2002 +0000 + + all .dsp files converted from unix to dos format + +Author: evomarc +Date: Wed May 22 02:13:06 2002 +0000 + + I had forgotten the real_value.h - SecondRealEA did not compile! + +Author: jeggermo +Date: Mon May 13 11:31:32 2002 +0000 + + EO::printOn has been changed so that the printOn function will + always print a valid fitness value even if the fitness is invalid + + Jeroen + +Author: jeggermo +Date: Thu May 9 15:43:01 2002 +0000 + + ramped half and half initialization has been added to eoParseTreeDepthInit + +Author: evomarc +Date: Thu May 9 06:35:34 2002 +0000 + + Still introducing ParadisEO + +Author: evomarc +Date: Thu May 9 06:28:34 2002 +0000 + + Added references to ParadisEO and Lesson5 + +Author: evomarc +Date: Wed May 8 06:55:21 2002 +0000 + + Added Lesson5 + +Author: evomarc +Date: Wed May 8 06:52:37 2002 +0000 + + Updated version number + +Author: evomarc +Date: Wed May 8 06:50:58 2002 +0000 + + Adding the Lesson5 - how to create your own genotype + +Author: evomarc +Date: Wed May 8 06:47:50 2002 +0000 + + Added the MyStructLibEA.cpp+make_MyStruct.cpp that allow separate + compilation of representation-indenepent stuff. Modified create.sh script + and Makefile accordingly. See Lesson5 of the tutorial + +Author: evomarc +Date: Wed May 8 06:44:04 2002 +0000 + + an example of how to make a new genotype within EO - see HTML doc + +Author: evomarc +Date: Wed May 8 06:31:18 2002 +0000 + + Replacing Paradiseo(jet7).pdf with paradiseoJet7.pdf because of Unix problems + with names containing commas + +Author: evomarc +Date: Wed May 8 06:14:23 2002 +0000 + + Removed the template_depth argument (since we are finally NOT going for + the fitness_trait stuff). + +Author: evomarc +Date: Fri May 3 05:12:32 2002 +0000 + + Replaced the eoParameterLoader parameter by an eoParser (used everywhere now) + +Author: evomarc +Date: Wed May 1 04:04:15 2002 +0000 + + eoParameterLoader -> eoParser + +Author: evomarc +Date: Wed May 1 02:44:54 2002 +0000 + + THe code for the 1/5th mutation was completely wrong! + +Author: evomarc +Date: Tue Apr 30 05:10:49 2002 +0000 + + Turned the power function to sum - was untractable with long bitstrings + +Author: evomarc +Date: Tue Apr 30 05:07:52 2002 +0000 + + Added the calls to EO::printOn and EO::readFrom in the corresponding methods + so th euser does not forget to use these before writing/reading the actual eo + +Author: evomarc +Date: Tue Apr 30 04:56:39 2002 +0000 + + Added utils/eoUniformInit.h + +Author: evomarc +Date: Tue Apr 30 04:54:25 2002 +0000 + + Copied from eoRndGenerators here is eoUniformInit, same thing but in the eoInit + hierarchy. + Useful to embed into higher levels eoInit + +Author: evomarc +Date: Sun Apr 28 05:04:24 2002 +0000 + + Adding SecondRealEA + +Author: evomarc +Date: Sun Apr 28 04:38:38 2002 +0000 + + Adding SecongRealEA - mainly to prepare Lesson5 about adaptive parameters + +Author: evomarc +Date: Fri Apr 26 03:17:37 2002 +0000 + + Added explanation and examples of getORcreateParam usage + +Author: evomarc +Date: Fri Apr 26 02:39:10 2002 +0000 + + Turned the code that was testing for the existence of the size parameter + in to the call to getORcreateParam (actually, this was where this code + has been tested the first time) + +Author: evomarc +Date: Fri Apr 26 02:37:40 2002 +0000 + + Added the negative argument in Ctor to say that you want number + popSize - some fixed number + +Author: evomarc +Date: Fri Apr 26 02:28:19 2002 +0000 + + Turned the createParam into getORcreateParam so that you can more easily + define them before (e.g. from the problem at hand). + This is useful specially for vecSize as some problems have predefined values + +Author: cahon +Date: Thu Apr 25 14:26:02 2002 +0000 + + *** empty log message *** + +Author: cahon +Date: Thu Apr 25 14:10:22 2002 +0000 + + Adding cellular E.A. + +Author: cahon +Date: Thu Apr 25 14:08:26 2002 +0000 + + A toric topology for cellular E.A. + +Author: cahon +Date: Thu Apr 25 14:06:43 2002 +0000 + + Cellular parallel easy algorithm + +Author: evomarc +Date: Tue Apr 23 09:56:49 2002 +0000 + + Updated the documentation (comments) + +Author: cahon +Date: Tue Apr 23 09:16:51 2002 +0000 + + Slides from Jet7, March 2002, ENSTA Paris + +Author: cahon +Date: Tue Apr 23 09:11:58 2002 +0000 + + *** empty log message *** + +Author: jeggermo +Date: Fri Apr 19 22:13:15 2002 +0000 + + A faulty constructor in eoParseTree caused some problems + +Author: cahon +Date: Fri Apr 19 15:24:07 2002 +0000 + + Slides from Jet7, ENSTA Paris (April 2002) + +Author: music_dev +Date: Fri Apr 19 14:42:47 2002 +0000 + + Multithreaded version. Changed name of lib to eo_lib[d].lib + +Author: evomarc +Date: Fri Apr 19 14:06:50 2002 +0000 + + Templatized apply + added a return statement + +Author: evomarc +Date: Fri Apr 19 14:04:25 2002 +0000 + + Replaced floats by doubles + +Author: jeggermo +Date: Thu Apr 18 13:56:36 2002 +0000 + + new printOn and readFrom functions + (they look more like the eoBit ones) + +Author: evomarc +Date: Thu Apr 18 03:23:24 2002 +0000 + + Ome explanations on how to launch the examples + +Author: evomarc +Date: Thu Apr 18 03:22:47 2002 +0000 + + Added the README, and modified the config files to remove the 127.0.0.1 + that was misleading + +Author: jeggermo +Date: Mon Apr 15 14:12:19 2002 +0000 + + *** empty log message *** + +Author: jeggermo +Date: Mon Apr 15 12:56:35 2002 +0000 + + eoParseTree printOn and readFrom functions changed for + compatibility with paradisEO + + The fitness is now printed in the same way as in eoBit + +Author: evomarc +Date: Fri Apr 12 16:17:02 2002 +0000 + + Changed name of target in all_lib.dsp + Added eoParetoFitness.cpp in sources of eo.dsp + +Author: evomarc +Date: Fri Apr 12 15:13:45 2002 +0000 + + A few changes for MSVC++ compatibility + +Author: evomarc +Date: Fri Apr 12 14:41:52 2002 +0000 + + Turned the specific compiler order mpiCC into a Macro + so it's easier to modify + We shall need to put this into the automatic configure one day ... + +Author: evomarc +Date: Fri Apr 12 14:39:58 2002 +0000 + + Changing the include file that contain all include from + eoparadiseo to eoparadiseo.h + because teh CVS tool in Microsoft Windaube doesn't make the difference + with the directory ParadisEO + +Author: evomarc +Date: Fri Apr 12 14:13:08 2002 +0000 + + Adding ParadisEO Tutorial examples + +Author: evomarc +Date: Fri Apr 12 13:38:08 2002 +0000 + + Added name of the Debug library + +Author: evomarc +Date: Tue Apr 9 08:48:44 2002 +0000 + + Modified the comments so they appear in doxygen doc (and updated them also) + +Author: evomarc +Date: Mon Apr 8 18:04:32 2002 +0000 + + Modified my E-mail address (the old one at Polytechnique will soon be obsolete) + +Author: evomarc +Date: Mon Apr 8 18:03:35 2002 +0000 + + I suddenly realized that BitEA.html was NOT in the repository! + +Author: evomarc +Date: Mon Apr 8 08:50:27 2002 +0000 + + Added the eoIncrementorParam - now ALL pointers allocated in make_checkpoint + are stored somewhere (the generation counter was not) + +Author: evomarc +Date: Mon Apr 8 08:42:46 2002 +0000 + + Check that size > 1 (otherwise division by 0) + +Author: evomarc +Date: Mon Apr 8 08:42:01 2002 +0000 + + Added a few "std::" before copy and ostream_iterator + +Author: evomarc +Date: Mon Apr 1 20:15:32 2002 +0000 + + After indoduction of paradisEO, eoEaseyEA was a subclass of class eoPopAlgo + and not eoAlgo. + I don't have time to investigate, so I went back to a subclass of eoAlgo. + We'll sort that out later (after EuroGP I guess). + +Author: cahon +Date: Fri Mar 29 15:38:15 2002 +0000 + + *** empty log message *** + +Author: cahon +Date: Fri Mar 29 15:36:04 2002 +0000 + + How to build an EA with a distributed evalaution process ? + +Author: cahon +Date: Fri Mar 29 15:30:55 2002 +0000 + + How to build an homo/heterogenous island model of EAs ? + +Author: cahon +Date: Fri Mar 29 15:16:11 2002 +0000 + + *** empty log message *** + +Author: cahon +Date: Fri Mar 29 15:10:04 2002 +0000 + + For any sending message + +Author: cahon +Date: Fri Mar 29 15:05:35 2002 +0000 + + The local communication layer + +Author: cahon +Date: Fri Mar 29 15:04:49 2002 +0000 + + The global communication layer + +Author: cahon +Date: Fri Mar 29 14:59:58 2002 +0000 + + An evaluator which sequentially values individuals making the pop. + +Author: cahon +Date: Fri Mar 29 14:57:30 2002 +0000 + + The slave evaluator node + +Author: cahon +Date: Fri Mar 29 14:56:18 2002 +0000 + + The master dispatcher evaluator + +Author: cahon +Date: Fri Mar 29 14:54:52 2002 +0000 + + An EA with a distributed evaluation process + +Author: cahon +Date: Fri Mar 29 14:50:11 2002 +0000 + + Each island is connected from/to only one neighbour + +Author: cahon +Date: Fri Mar 29 14:49:04 2002 +0000 + + Each island id connected to the whole considered islands + +Author: cahon +Date: Fri Mar 29 14:47:13 2002 +0000 + + A checkpoint to send/receive pop. to/from others islands + +Author: cahon +Date: Fri Mar 29 14:45:00 2002 +0000 + + The island EA model + +Author: cahon +Date: Fri Mar 29 14:41:01 2002 +0000 + + A continuator which periodically returns false + +Author: cahon +Date: Fri Mar 29 14:38:36 2002 +0000 + + A tool to apply a process to any incoming EO ... + +Author: cahon +Date: Fri Mar 29 10:34:16 2002 +0000 + + *** empty log message *** + +Author: cahon +Date: Fri Mar 29 10:26:36 2002 +0000 + + *** empty log message *** + +Author: cahon +Date: Fri Mar 29 10:02:47 2002 +0000 + + The paradiseo interface + +Author: cahon +Date: Wed Mar 27 17:31:05 2002 +0000 + + Some changes for the use in paradisEO + +Author: cahon +Date: Wed Mar 27 17:28:04 2002 +0000 + + Defines any population-based algorithm. + +Author: cahon +Date: Wed Mar 27 17:19:25 2002 +0000 + + Any EO with an invalid fitness should be printable ! + +Author: evomarc +Date: Fri Mar 22 11:01:30 2002 +0000 + + Added the time counter in make_checkpoint + +Author: evomarc +Date: Fri Mar 22 10:57:37 2002 +0000 + + Added the eoTimeCounter that allows to use time as a base counter + for statistics (when you compare things that are not using the same + evaluation function for instance) + +Author: evomarc +Date: Fri Mar 15 06:41:54 2002 +0000 + + Added the lonk to SourceForge in the title, and to README in the "install" section + +Author: evomarc +Date: Fri Mar 15 06:28:25 2002 +0000 + + The source file names had changed, some day, in doxygen-genertaed doc ... + +Author: evomarc +Date: Fri Mar 15 06:06:22 2002 +0000 + + Corrected a few linkgs to the documentation + Reaplced eoBin with eiBit (about time!!!) + +Author: evomarc +Date: Wed Mar 6 06:54:00 2002 +0000 + + More on parameter input (getORcreateParam explained) + +Author: evomarc +Date: Wed Mar 6 06:28:27 2002 +0000 + + Added the tags to generate html nice output + +Author: evomarc +Date: Wed Mar 6 06:25:40 2002 +0000 + + Added some explanations about the memory mangement (through eoFunctorStore) + +Author: evomarc +Date: Tue Mar 5 05:46:55 2002 +0000 + + Corrected a sligth error in eoParamParam reading that resulted in making the comma + part of the stored string value + +Author: evomarc +Date: Tue Mar 5 05:38:21 2002 +0000 + + Adding class eoParetoOneConstraintFitness, multi-valued fitness + 1 constraint + This file shoudl contain the general Pareto+contraint class - but + I'm in a big hurry. + +Author: evomarc +Date: Tue Mar 5 05:34:27 2002 +0000 + + Changed the reading of parameter resDir from createParam to getORcreateParam + so it can be used in other parts of hte program (it's handy to put all + disk outputs in one dir). + +Author: evomarc +Date: Mon Feb 11 06:28:52 2002 +0000 + + Added file monitors for the population in the Pareto space (were ony available as + eoGnulpot1DSnapshors before) + +Author: evomarc +Date: Mon Feb 11 06:27:44 2002 +0000 + + Added a title (Gen. X) to the plot so you can follow what's going on + +Author: evomarc +Date: Mon Feb 11 06:26:48 2002 +0000 + + Added the getCounter() method so subclasses have a hand on the generation nb + +Author: evomarc +Date: Sat Feb 9 05:01:48 2002 +0000 + + Corrected a serious bug in eoUniformMutation (double declaration of bool HasChanged) + The consequence was that if that mutation was the only operator called on some + individual, it was not invalidated, and hence its fitness not recomputed!!! + +Author: evomarc +Date: Sat Feb 9 04:58:33 2002 +0000 + + First instances of the make_xxx_pareto, where xxx is algo, continue and checkpoint + +Author: evomarc +Date: Fri Feb 8 07:51:59 2002 +0000 + + Added the constructor from a string + +Author: evomarc +Date: Fri Feb 8 07:49:32 2002 +0000 + + Added the method getORcreateParam. + It has exactly the same syntax than the createParam method + but it first checks whether the param has been laready entered before creating it + +Author: evomarc +Date: Fri Feb 8 07:48:03 2002 +0000 + + Added a constructor from a vector - mandatory in all applications + +Author: evomarc +Date: Fri Feb 8 07:47:03 2002 +0000 + + Removed the const in method eoInit & atomInit() + +Author: jeggermo +Date: Mon Feb 4 14:28:00 2002 +0000 + + the gpsymreg code has been slightly altered to allow compilation using the + Intel C++ Compiler for Linux. + + Other compilers should not be affected. + + A slightly different makefile is needed + +Author: jeggermo +Date: Mon Feb 4 13:16:50 2002 +0000 + + Fixed some compatibility issues with GCC 3.0.1 and the Intel C++ Compiler + for Linux v5. + +Author: evomarc +Date: Sat Feb 2 07:37:54 2002 +0000 + + Added warning in case number of objective is changed (and not set) + +Author: evomarc +Date: Sat Feb 2 07:36:58 2002 +0000 + + Suppressed the lt_arity fn that was added for MSVC - and now seems unnecessary + +Author: evomarc +Date: Sat Feb 2 07:36:12 2002 +0000 + + Added warning test + +Author: evomarc +Date: Sat Feb 2 07:34:13 2002 +0000 + + Added newline at end of file (to suppress g+ warning) + +Author: evomarc +Date: Sat Feb 2 07:05:31 2002 +0000 + + Added the eoVariableParetoTraits (setup number of objcetives and min/max + at run time). + +Author: evomarc +Date: Sat Feb 2 06:43:46 2002 +0000 + + Moved the static variables of class eoVariableParetoTraits + into a separate .cpp file (eoParetoFitness.cpp) - and modified Makefile.am + +Author: evomarc +Date: Sat Feb 2 05:59:05 2002 +0000 + + Added default value for bool arg in testDirRes function + +Author: evomarc +Date: Sat Feb 2 05:51:31 2002 +0000 + + Removed comment after #endif (warning in gcc 1.96+) + +Author: evomarc +Date: Thu Jan 31 17:42:03 2002 +0000 + + Added the eoVariableParetoTraits that allows to specify the number + of objectives and the max/min for each one at run-time + +Author: evomarc +Date: Thu Jan 31 17:32:27 2002 +0000 + + Updated the comments + +Author: evomarc +Date: Wed Jan 30 12:24:42 2002 +0000 + + Added Ranking (God knows why it was mnissing!) + +Author: evomarc +Date: Thu Jan 17 17:57:55 2002 +0000 + + Added the move from Release and DEbug into the lib dir + +Author: evomarc +Date: Thu Jan 17 17:54:56 2002 +0000 + + Removed the #ifdef that protected the lt_arity avaints MSVC (!!!) + +Author: evomarc +Date: Thu Jan 17 17:51:58 2002 +0000 + + apply -> apply for MSVC + +Author: evomarc +Date: Thu Jan 17 17:51:02 2002 +0000 + + Protexted all calls to gnuplot for MSVC + +Author: evomarc +Date: Thu Jan 17 15:24:44 2002 +0000 + + Adding tutorial files + +Author: evomarc +Date: Thu Jan 17 15:21:44 2002 +0000 + + New versio of dsp files + +Author: maartenkeijzer +Date: Wed Jan 16 14:52:11 2002 +0000 + + Increased template depth + +Author: evomarc +Date: Thu Dec 20 18:04:52 2001 +0000 + + There was an error in the type of the first parameter of make_checkpoint and + make_algo_scalar (changed from eoParameterLOader to eoParser) + +Author: evomarc +Date: Fri Dec 7 06:28:38 2001 +0000 + + COnverted t_eoesall to CRLF line terminators (otherwise MSDEV cannot read properly) + +Author: evomarc +Date: Fri Dec 7 06:23:15 2001 +0000 + + Adding t_eoesall that somehow ahd managed to escape until now + + corrected the template test_dsp.tmpl + +Author: evomarc +Date: Fri Dec 7 06:14:11 2001 +0000 + + Adding the tutorials in MSVC project files + +Author: evomarc +Date: Fri Dec 7 05:51:36 2001 +0000 + + Removed all references to CrtDebug blabla that were supposed to be + MSVC specific but generated an error with MSVC 6.0 + +Author: evomarc +Date: Thu Dec 6 14:33:42 2001 +0000 + + Need to put the \r\n at end of all files after modifications!!! + +Author: evomarc +Date: Thu Dec 6 14:32:00 2001 +0000 + + Removed unknown CrtDebug directives from the MSVC version + +Author: evomarc +Date: Thu Dec 6 13:12:24 2001 +0000 + + Removed unnecessary dirs, added first Lesson of tutorial + +Author: evomarc +Date: Thu Dec 6 11:36:39 2001 +0000 + + Removed some sources that came here nobody know's how (thanks, MSDEV) + +Author: evomarc +Date: Thu Dec 6 07:02:07 2001 +0000 + + Changed ALL names of links to class files in the documentation due to the change in + Doxygen naming convention + +Author: evomarc +Date: Thu Dec 6 06:44:44 2001 +0000 + + A few corrections before the big name change + +Author: evomarc +Date: Thu Dec 6 06:38:17 2001 +0000 + + CHanged a few erroneaous comments + +Author: evomarc +Date: Wed Dec 5 06:54:38 2001 +0000 + + Added GNUPLOT protection for MSVC compiler + +Author: jeggermo +Date: Tue Dec 4 21:15:16 2001 +0000 + + some template classes and functions which did not need + to be templates have been changed to normal classes and functions + with hard coded typed + + This might help with M$VC++ 6.0 compatibility + +Author: jeggermo +Date: Tue Dec 4 11:49:25 2001 +0000 + + a different solution for lt_arity has been implemented (this time inside the + eoParseTreeDepthInit class + +Author: evomarc +Date: Mon Dec 3 16:40:32 2001 +0000 + + Renamed mastermind.cc into mastermind.cpp for MSVC + +Author: evomarc +Date: Mon Dec 3 16:38:52 2001 +0000 + + Renamed main.cc into main.cpp for MSVC + +Author: evomarc +Date: Mon Dec 3 16:35:51 2001 +0000 + + Renamed gprop.cc into gprop.cpp for MSVC + +Author: evomarc +Date: Mon Dec 3 16:28:30 2001 +0000 + + Modified the path of include eoVirus because MSVC did not find it. + Now it is assumed that src will be in the include search path, that's all. + +Author: evomarc +Date: Mon Dec 3 14:31:35 2001 +0000 + + MSVC didn't find (easily) the contrib/MGE dir. So now it's written in the code + and the Makefile.am does not have contrib in the include look path + +Author: evomarc +Date: Mon Dec 3 14:20:24 2001 +0000 + + Added partial specialization of lt_arity .. + +Author: evomarc +Date: Mon Dec 3 14:14:56 2001 +0000 + + Added the 2 fake "projects" all_lib.dsp and all_test.dsp that allow to compile + everything in 2 clics. + However, we still cannot run and watch the status output of the test executables + +Author: evomarc +Date: Mon Dec 3 11:08:17 2001 +0000 + + More details to make code MSVC-compatible + +Author: evomarc +Date: Mon Dec 3 06:59:17 2001 +0000 + + Added links to some examples in the comments + +Author: evomarc +Date: Mon Dec 3 06:56:43 2001 +0000 + + Removed dir win from list of subdirs (generated an error in make check) + +Author: evomarc +Date: Mon Dec 3 06:53:52 2001 +0000 + + Removed the trailing comment after #endif (Warning in MSVC) + +Author: jeggermo +Date: Thu Nov 22 15:01:11 2001 +0000 + + Fixed a small problem with eoPointMutation. + +Author: evomarc +Date: Sun Nov 18 07:18:11 2001 +0000 + + Introductory comment evolves ... + +Author: evomarc +Date: Sun Nov 18 06:54:13 2001 +0000 + + Added the names of the directories where the newly created files are stored. + +Author: evomarc +Date: Sat Nov 17 08:13:55 2001 +0000 + + Now the eo.dsw can be generated automatically from + eo.org + create_all_dsp.sh (that calls create_dsp.sh) + To add a new test program, simpy add 1 line in create_all_dsp.sh + and run it. + DO NOT TOUCH eo.org !!! + +Author: evomarc +Date: Sat Nov 17 07:58:16 2001 +0000 + + imply put all program names on one single line to ease bulding the win files + +Author: evomarc +Date: Sat Nov 17 07:55:39 2001 +0000 + + Bug in create_dsp when no additional library + +Author: evomarc +Date: Sat Nov 17 07:54:12 2001 +0000 + + Turned bonary_value into the onemax (not pow that exploded for even only + moderately small size of genome!) + Turned it into a double (it was a float) as floats are dead and should dissappear + +Author: evomarc +Date: Sat Nov 17 07:22:59 2001 +0000 + + Changes due to MSVC + +Author: evomarc +Date: Fri Nov 16 15:06:29 2001 +0000 + + Some error for MSVC that was not even a warning for g++ (but I'm sorry + to say that MSVC is right :-) + +Author: evomarc +Date: Fri Nov 16 15:05:41 2001 +0000 + + Changed the filenaming to comply with MacroHard + +Author: evomarc +Date: Fri Nov 16 15:02:35 2001 +0000 + + Error in argments check + +Author: evomarc +Date: Fri Nov 16 14:32:07 2001 +0000 + + The file eo.org is the base project file (no file in test involved). + It is upgraded by the create.sh script + +Author: evomarc +Date: Fri Nov 16 14:30:58 2001 +0000 + + Adding all test files for MSVC + +Author: evomarc +Date: Fri Nov 16 14:01:52 2001 +0000 + + Replaced the flat definitions of ncecessary classes (eoStatxxx and eoMonitor) + with the include of the corresponding .h file. as MSVC complained! + +Author: jeggermo +Date: Thu Nov 15 22:11:31 2001 +0000 + + small change in documentation + +Author: evomarc +Date: Mon Nov 12 16:27:37 2001 +0000 + + Announcing the MSVC++ compatibility revisited + +Author: evomarc +Date: Mon Nov 12 15:21:40 2001 +0000 + + A few more typename conditionally removed for MSVC++ + +Author: evomarc +Date: Mon Nov 12 14:59:32 2001 +0000 + + Adding Jeroen :-) + +Author: evomarc +Date: Mon Nov 12 14:51:51 2001 +0000 + + A readme for the win dir ... + +Author: evomarc +Date: Mon Nov 12 14:44:01 2001 +0000 + + Create.sh mdified to also add the new dsp file into eo.dsw + +Author: evomarc +Date: Mon Nov 12 14:27:12 2001 +0000 + + Template file for dsp project files (to be used within create_dsp.sh) + +Author: evomarc +Date: Mon Nov 12 14:17:58 2001 +0000 + + Some more small changes for MSVC++ compatibility + +Author: evomarc +Date: Sun Nov 11 06:59:42 2001 +0000 + + Adding the dsp file for t-eoReal - testing the create_dsp script. + Next step is to add them all from the test/Makefile file + +Author: evomarc +Date: Sun Nov 11 06:55:12 2001 +0000 + + Create_dsp.sh is a script that will create the .dsp file from a source file + name in the test dir + +Author: evomarc +Date: Sun Nov 11 06:43:45 2001 +0000 + + Improved the UI a lot (checking for already existing files, etc) + +Author: evomarc +Date: Sat Nov 10 14:13:21 2001 +0000 + + Files for MSVC++ generated by Olivier Meunier - Projet Fractales - INRIAC + +Author: evomarc +Date: Sat Nov 10 14:12:01 2001 +0000 + + Files for MSVC++ generated by Olivier Meunier - Projet Fractales - INRIA + +Author: evomarc +Date: Sat Nov 10 09:02:17 2001 +0000 + + Small modifications here and there to be MSVC++ compatible + Mainly, time.h -> ctime + definition of loop index out of loops when multiply used + no typename in declaration using template typename + +Author: evomarc +Date: Sat Nov 10 06:59:02 2001 +0000 + + Added the #pragma directive for MSVC++ in all .cpp + +Author: evomarc +Date: Sat Nov 10 06:32:05 2001 +0000 + + Added the invalidate() call - that bug was not seem before, because + we always used init on newborn genotypes! + +Author: maartenkeijzer +Date: Thu Nov 8 11:13:19 2001 +0000 + + Cleaned up + +Author: maartenkeijzer +Date: Thu Nov 8 10:17:52 2001 +0000 + + removed the return 1 in the main + +Author: evomarc +Date: Thu Nov 8 07:40:27 2001 +0000 + + Adding Distribution-based base abstract classes + +Author: evomarc +Date: Thu Nov 8 06:53:55 2001 +0000 + + Adding PBIL + +Author: evomarc +Date: Thu Nov 8 06:49:38 2001 +0000 + + Adding PBIL files - simple PBIL algorithm with simple additive update rule + +Author: evomarc +Date: Thu Nov 8 06:14:59 2001 +0000 + + I have changed all calls to use an eoParser rather than an eoParameterLoader + This is required if you want to use the method getParamWithLongName that allows + one to get a value of a parameter read somewhere else. + After changing 3 calls due to that, I decided to change ALL calls within + the make_xxx functions + +Author: evomarc +Date: Wed Nov 7 16:25:01 2001 +0000 + + Corrected a bug in the selector and replacement tournamemt parameter reading: + if you did not give the tournament sizes, the program either crashed or went + in some endless loop. + I also simplified the reading of those eoParamPram parameters! + +Author: maartenkeijzer +Date: Wed Nov 7 15:23:24 2001 +0000 + + Updated makefile.am such that "make check" will run all test programs. Fixed + a number of erronuous return values that made the script fail. What's left + is let Marc clean up the mess he made with t-eoReal and t-eoRealAllESAllAgain + +Author: maartenkeijzer +Date: Wed Nov 7 10:57:53 2001 +0000 + + Fixed call to inverse_stochastic inside eoDetTournament + +Author: evomarc +Date: Mon Nov 5 16:38:52 2001 +0000 + + Added method + eoParam* getParamWithLongName(std::string _name); + so now you can get a parameter in another place than where it was defined + just by giving its name + +Author: maartenkeijzer +Date: Mon Nov 5 14:28:14 2001 +0000 + + Just some comments + +Author: evomarc +Date: Mon Nov 5 08:24:59 2001 +0000 + + Small error in header + +Author: jeggermo +Date: Sat Nov 3 22:10:11 2001 +0000 + + the name of the eoGpDepthInitializer class (initializer for + parse_tree's has been changed to + + eoParseTreeDepthInit but backward compatibility is maintained by + using a #define statement: + + #define eoGpDepthInitializer eoParseTreeDepthInit + + The initializer for strongly typed GP has been changed to + eoStParseTreeDepthInit + + the gpsymreg application has been changed to use the new name + +Author: jeggermo +Date: Thu Oct 25 10:39:55 2001 +0000 + + Some changes for using EO with libstdc++V3 and gcc-3.01 + +Author: jeggermo +Date: Fri Oct 19 12:04:12 2001 +0000 + + The nameless union in node.h has been removed because not all compilers + support it. + +Author: evomarc +Date: Thu Oct 18 11:48:52 2001 +0000 + + Replaced pushd and popd with cd and cd .. - for Windows/Cygwin compatibility + +Author: jeggermo +Date: Thu Oct 18 08:52:40 2001 +0000 + + Some changes to make gpsymreg compile correctly on windows/cygwin systems + +Author: evomarc +Date: Thu Oct 18 05:30:45 2001 +0000 + + Added MAXFLOAT and MINFLOAT as it seems that Cygwin needs that ??? + +Author: evomarc +Date: Thu Oct 18 04:57:30 2001 +0000 + + iAdding a file config.cache as it seems that the defaults don't work + in Windows/Cygwin environement. Thanks to Sebastiao CORREIA and + Jerome JEAN-CHARLES for providing this file. + +Author: evomarc +Date: Thu Oct 18 04:37:14 2001 +0000 + + All files on one line in Makefile.am (for Windows) + +Author: evomarc +Date: Thu Oct 18 04:34:58 2001 +0000 + + Modified the Makefile.am in main dir, and Makefile in tutorial dir to remove + all pushd/popd as they don't exist in Windows/bash + +Author: evomarc +Date: Wed Oct 17 17:49:54 2001 +0000 + + Corrected a few small problems - including dependencies in Makefile + thanks to Sebastiao CORREIA for pointing them out + +Author: evomarc +Date: Wed Oct 17 17:48:50 2001 +0000 + + Corrected a few small problems - + thanks to Sebastiao CORREIA for pointing them out + +Author: evomarc +Date: Mon Oct 8 09:14:15 2001 +0000 + + Removed trailing text after #endif - causes warning on many compilers + +Author: jeggermo +Date: Fri Oct 5 12:39:30 2001 +0000 + + ramped half and half initialization procedure for eoParseTree populations + added. + +Author: jeggermo +Date: Fri Oct 5 09:32:49 2001 +0000 + + Since g++ 2.95.x on our solaris server doesn't have macros to check + for infinity and NaN these checks have been removed from the source code + and a protected divided function node is now used. + +Author: evomarc +Date: Fri Oct 5 03:56:21 2001 +0000 + + Forgot to double also the parameter to initialize in the Ctor! + +Author: evomarc +Date: Fri Oct 5 03:51:15 2001 +0000 + + Modified the reseed method in RNG class so two different seeds give different + sequences, after Jeroen's remark (jeggermo@liacs.nl) + +Author: evomarc +Date: Fri Oct 5 03:30:12 2001 +0000 + + Commented out the oeprator() default function in base class: I find it more secure + to be warned at compile time that one function is still pure virtual + than to look for the error after a run-time-error that gives no clue + +Author: evomarc +Date: Thu Oct 4 20:13:03 2001 +0000 + + eoMyStructEA.cpp has turned into MyStructEA.cpp + +Author: evomarc +Date: Thu Oct 4 20:12:19 2001 +0000 + + Big modifications - now the init and most important the operators + are handled in separate files make_genotype_xxx and make_op_xxx + as it was done in the examples of Lesson4 + +Author: evomarc +Date: Mon Sep 24 05:59:42 2001 +0000 + + Suppressed most warning (except some unused variables) if you don't modify anything + +Author: evomarc +Date: Mon Sep 24 05:59:13 2001 +0000 + + Suppressed most warning (except some unused variables) if you don't modify anythig + +Author: evomarc +Date: Sat Sep 8 05:59:17 2001 +0000 + + Removed trailing string after #endif - it generates a lot of useless warning + on some versions of g++ + +Author: evomarc +Date: Sat Sep 8 05:42:24 2001 +0000 + + Added newline at end of file (prevents a warning) + +Author: evomarc +Date: Sat Sep 8 05:41:19 2001 +0000 + + Added include math.h + +Author: evomarc +Date: Tue Sep 4 08:35:22 2001 +0000 + + Added many template files, and totally modified the comments in most other. + This was when preparing Evonet Summer School - though it finally was not used there! + +Author: evomarc +Date: Tue Sep 4 06:51:59 2001 +0000 + + Modified the className() method so that the Atom underlying operator is listed + +Author: evomarc +Date: Tue Sep 4 06:50:42 2001 +0000 + + Included apply.h for consistency (though in most cases it was included from eo file + +Author: evomarc +Date: Tue Sep 4 06:48:15 2001 +0000 + + Added a class that turns an eoInit into a generator of EOT + Also added a Ctor of variable length objects that take an eoInit. + Some day we might want to clean all that stuff ... unless we leave + the choice to the user (but then the documentation shoudl be as clear + as glass, which it is not at the moment!) + +Author: evomarc +Date: Tue Sep 4 06:45:14 2001 +0000 + + In case you are trying to assign a value to a vector of different size, + previous versions raised an exception. + Now a simple warning is written to stderr - as it might be something + you need to do. + +Author: evomarc +Date: Tue Sep 4 06:43:19 2001 +0000 + + Added make_help in checkpointing, included stdexcept in eoParam. Comments + updates ... + +Author: evomarc +Date: Tue Sep 4 06:41:34 2001 +0000 + + Spotted and commented (but NOT corrected :-( a bug in case the ResDir + exists and is empty + +Author: evomarc +Date: Tue Sep 4 06:40:28 2001 +0000 + + Corrected wrong arguments for the 2D Ctor + +Author: evomarc +Date: Tue Sep 4 06:37:25 2001 +0000 + + Comments update + +Author: evomarc +Date: Tue Sep 4 06:35:58 2001 +0000 + + Changed the wrong #ifdef in make_algo_scalar (+ minor comments elsewhere) + +Author: jeggermo +Date: Tue Jul 17 13:06:28 2001 +0000 + + check for the existence of isinf didn't work the way it should so + it has been removed + +Author: jeggermo +Date: Tue Jul 17 08:58:52 2001 +0000 + + small documentation change for eoParseTree.h. + + added a depth initializer for strongly typed genetic programming + added subtree xover for strongly typed genetic programming + added branch mutation for strongly typed genetic programming + added point mutation for strongly typed genetic programming + added hoist mutation for strongly typed genetic programming + +Author: evomarc +Date: Wed Jul 11 06:26:11 2001 +0000 + + Suppressed the gene mutations, as they are now in eoFlOrMonOp.h + +Author: evomarc +Date: Wed Jul 4 04:59:02 2001 +0000 + + Oups! + +Author: evomarc +Date: Wed Jul 4 04:44:30 2001 +0000 + + Adding eoPopEvalFunc, that handles evaluation globally: it receives + two populations, parents and offspring, and does whatever necessary. + The subclass eoPopLoopEval does the simple loop on the offspring. + + eoEasyEA was subsequently modified to handle an eoPopEval passed in Ctor, + but also to encapsulate an eoEvalFunc into an eoPopLoopEval tranparently. + +Author: evomarc +Date: Tue Jul 3 12:56:44 2001 +0000 + + Added the eoPopEvalFunc class: gets the full parents + offspring populations + in order to evaluate them. + Modified eoEaseyEA accordingly - you can either pass an eoEvalFunc, as + before (it is then encapsulated into an eoPopLoopEval that does the good + old loop on the offspring - or directly pass a full eoPopEvalFunc + + Small modification also in make_op_es -> keyword "none" is now recognized + for one of the crossover of either object variables or stdev's + +Author: jeggermo +Date: Mon Jul 2 13:31:04 2001 +0000 + + Changed the directory structure for gp + now: eoParseTree <-- the eoParseTree class + eoParseTreeDepthInit <-- the eoParseTree depth initializer (eoGpDepthInitializer) + eoParseTreeOp <-- the operators (xover and mutation) + + base documentation written for: + * eoParseTree + * eoGpDepthInitializer + * eoSubtreeXOver + * eoBranchMutation + * eoPointMutation + * eoExpansionMutation + * eoCollapseSubtreeMutation + * eoHoistMutation + + I also created a group ParseTree which contains all classes related to eoParseTree + + eoGpMutate.h has been removed (merged with eoParseTree operators into eoParseTreeOp + +Author: jeggermo +Date: Mon Jul 2 11:38:27 2001 +0000 + + The constructor for the eoGpDepthInitializer has been extended with a + sort of the initializor vector containing all possible nodes. This sort + assures that the terminals are in the front of vector. Untill now this + was assumed but not checked or enforced. + +Author: jeggermo +Date: Mon Jul 2 08:28:40 2001 +0000 + + eoSubtreeXOver fixed + +Author: evomarc +Date: Sat Jun 30 05:59:26 2001 +0000 + + Added random selection + +Author: evomarc +Date: Sat Jun 30 05:57:10 2001 +0000 + + Corrected a wrong comment + +Author: maartenkeijzer +Date: Fri Jun 29 18:06:10 2001 +0000 + + oops, thanks jeroen + +Author: jeggermo +Date: Fri Jun 29 12:15:15 2001 +0000 + + checks for the existence of finite(x) and isinf(x) built into app/gpsymreg. + Linux gcc compilers have the 'macros ??' but solaris gcc does not + +Author: jeggermo +Date: Fri Jun 29 09:22:26 2001 +0000 + + app/gpsymreg/Makefile added to configure.in + +Author: jeggermo +Date: Thu Jun 28 15:03:53 2001 +0000 + + app/gpsymreg/Makefile added to configure.in + +Author: jeggermo +Date: Thu Jun 28 14:39:36 2001 +0000 + + addition file for parameters for symreg gp + +Author: jeggermo +Date: Thu Jun 28 14:38:00 2001 +0000 + + node.h containing Tree-node classes for symreg gp + +Author: jeggermo +Date: Thu Jun 28 14:33:51 2001 +0000 + + main.cc for symreg gp + +Author: jeggermo +Date: Thu Jun 28 14:26:35 2001 +0000 + + gp symbolic regression trees added + +Author: jeggermo +Date: Thu Jun 28 14:18:47 2001 +0000 + + eoGpMutate.h added containing 4 new mutation operators for eoParseTree class + +Author: jeggermo +Date: Thu Jun 28 14:11:04 2001 +0000 + + Symbolic Regression GP added app-dir + +Author: jeggermo +Date: Thu Jun 28 14:03:59 2001 +0000 + + new Mutation operators for eoParseTree in src/gp/eoGpMutate.h + + a symbolic regression example program added to the app-dir + + configure.in and Makefile(s).am changed + +Author: jeggermo +Date: Thu Jun 28 13:55:14 2001 +0000 + + Additional mutation operators for eoParseTree + + * Point Mutation + * Expansion Mutation + * Collapse Subtree Mutation + * Hoist + +Author: jmerelo +Date: Thu Jun 21 12:03:17 2001 +0000 + + Updating Royal Road + +Author: maartenkeijzer +Date: Mon Jun 11 12:37:21 2001 +0000 + + Added a check for an empty initializor + +Author: evomarc +Date: Fri May 25 16:27:59 2001 +0000 + + Added a frequency parameter to eoPopStat (dump pop every N gen) + +Author: evomarc +Date: Mon May 21 06:13:56 2001 +0000 + + Forgot to update ESEA with crossover + +Author: evomarc +Date: Mon May 21 04:16:26 2001 +0000 + + ? + +Author: evomarc +Date: Mon May 21 04:15:36 2001 +0000 + + Added libes in Makefile + +Author: evomarc +Date: Mon May 21 04:14:36 2001 +0000 + + Modifs in es (crossover added in make_op_es). + Added a dummy selector in eoReandomSelect that does work even with invalid EOs + +Author: evomarc +Date: Mon May 21 04:13:10 2001 +0000 + + Added the crossover in make_op_es (parameters were read, but that's all! + +Author: evomarc +Date: Mon May 21 04:10:55 2001 +0000 + + Normalized real_value + +Author: evomarc +Date: Sat May 19 06:15:01 2001 +0000 + + Changed name of eoEsLocalXover to eoEsStandardXover and made it an eoBinOp + Removed obsolete eoEsStdevXOver.h (see eoEsStandardXover.h above) + +Author: evomarc +Date: Fri May 18 17:46:33 2001 +0000 + + Coreected a cut-and-paste bug :-( + +Author: jmerelo +Date: Fri May 18 07:33:12 2001 +0000 + + Added the missing file + +Author: evomarc +Date: Fri May 18 03:59:22 2001 +0000 + + Removed remaining debugging comment + +Author: jmerelo +Date: Thu May 17 10:08:25 2001 +0000 + + Changed MGE to the contrib dir. No need to change the prefix, I guess + +Author: jmerelo +Date: Thu May 17 07:29:50 2001 +0000 + + Added missing files and updated old MGE files + +Author: jmerelo +Date: Fri May 11 10:44:01 2001 +0000 + + Added Royal Road, MGE now work with it, small modifications to eoPopStat + +Author: jmerelo +Date: Thu May 10 12:16:00 2001 +0000 + + Added 'Viral' operators with test. Implements the Mobile Genetic Elements Technique + +Author: evomarc +Date: Tue May 8 04:44:30 2001 +0000 + + CHanged CXXFLAGS to nothing - so lib files remain of manageable size! + +Author: evomarc +Date: Tue May 8 04:41:51 2001 +0000 + + Bing change in eoRealBounds: it is now deriving from eoPersistent. + More important, the eoRealVectorBounds, vectorized version (a vector + has also become an eoPersistent object and now derives from an eoRealBaseVectorBounds + class. + A useful consequence (and actual motivatino) was to be able to have soem + eoValueParam with all possibilities for input + (see doc for Lesson4 in the tutorial for the syntax). + +Author: evomarc +Date: Tue May 8 03:49:35 2001 +0000 + + In eoParser::readFrom, added a test to avoid reading non-parser sections + as these generally contain many -xxx that generate a reading error + when xxx is not a keyword. + This allows to use State-savec files directly as parameter files + +Author: evomarc +Date: Mon May 7 07:13:36 2001 +0000 + + Replaced stupid eoRateParam by eoValueParam + Had to transform eoHowMany into an eoPersistent ... + +Author: evomarc +Date: Fri May 4 16:51:29 2001 +0000 + + A full working version of ES is now available in tutorial/Lesson4, + that makes full use of libes.a. + The user guide is in Lesson4 of the tutorial - programmer's guide + will come later. + Plus many small changes here and there + +Author: evomarc +Date: Fri May 4 16:13:37 2001 +0000 + + Removing old trash! + +Author: evomarc +Date: Thu May 3 17:20:27 2001 +0000 + + Corrected a problem in eoEsChromInit (it refused plain eoReal) + some + other minor modications (e.g. a dir in make_checkpoint where ALL file + will go). + +Author: evomarc +Date: Thu May 3 13:06:34 2001 +0000 + + Adding code to Lesson4 + +Author: evomarc +Date: Thu May 3 05:44:29 2001 +0000 + + Lesson4 advancing + +Author: evomarc +Date: Thu May 3 05:43:40 2001 +0000 + + Hange of comments and names + +Author: evomarc +Date: Wed May 2 11:13:40 2001 +0000 + + Updated main pages of doc and tutorial. Doc now points to tutorial + +Author: evomarc +Date: Wed May 2 11:12:55 2001 +0000 + + Date change + info about Lesson4 in main tutorial page + +Author: evomarc +Date: Wed May 2 11:09:57 2001 +0000 + + Adding test file for ES - note that it's completely different from old + eoESFull.cp - and hence has an other name, t-eoESAll.cpp. + Old eoESFull.cp is still there (and working) but is not in the test targets + +Author: evomarc +Date: Wed May 2 10:57:35 2001 +0000 + + Adding files in es for ES Crossovers + +Author: evomarc +Date: Wed May 2 10:54:17 2001 +0000 + + Forgotten file ... + +Author: evomarc +Date: Wed May 2 10:53:14 2001 +0000 + + Forgotten new file + +Author: evomarc +Date: Wed May 2 10:50:01 2001 +0000 + + Added the new eoEsXXXover.h in Malefile.am + +Author: evomarc +Date: Wed May 2 10:47:56 2001 +0000 + + Forgotten ES files + start of tutorial Lesson4 (about make_XXX) + +Author: evomarc +Date: Wed May 2 10:42:32 2001 +0000 + + Adding Evolution Strategies: + src/es/eoEsGlobalXover.h and src/es/eoEsLocalXover.h for crossover + src/es/make_XXX_es.h for user-input + test/t-eoEsAll.cpp to test + + However, an old bug appeared: className was not const in eoGenOp (and derived classes) + so I had to change that throughtout the hierarchy + +Author: evomarc +Date: Tue May 1 05:00:29 2001 +0000 + + Removing make_help.cpp + +Author: evomarc +Date: Mon Apr 30 13:24:42 2001 +0000 + + Some changes in names, before too many users have to modify their code :-) + Changed es.h in src/es into make_es.h (was ambiguous with src/es.h) + Changed the interface of make_genotype - now templatized by the EOT + and not the fitness - this is mandatory for ES genoptypes as it allows to + choose the type of gentype at run-time (from existing types, of course!) + + Also moved make_help.cpp into utils dir (otherwise you'd had to maintain + a copy into each representation dir!). + +Author: evomarc +Date: Mon Apr 30 13:01:07 2001 +0000 + + Some changes in names, before too many users have to modify their code :-) + Changed es.h in src/es into make_es.h (was ambiguous with src/es.h) + Changed the interface of make_genotype - now templatized by the EOT + and not the fitness - this is mandatory for ES genoptypes as it allows to + choose the type of gentype at run-time (from existing types, of course!) + + Also moved make_help.cpp into utils dir (otherwise you'd had to maintain + a copy into each representation dir!). + +Author: evomarc +Date: Mon Apr 30 12:26:31 2001 +0000 + + Some changes in names, before too many users have to modify their code :-) + Changed ga.h in src/ga into make_ga.h (was ambiguous with src/ga.h) + Chenged the interface of make_genotype - now templatized by the EOT + and not the fitness - this is mandatory for ES genoptypes as it allows to + choose the type of gentype at run-time (from existing types, of course!) + +Author: evomarc +Date: Mon Apr 30 09:26:37 2001 +0000 + + Changed EA basic image: + - caption changed from population-parents to parents-genitors + - quality improved (now 177Ko instead of 53 :-( + +Author: evomarc +Date: Sun Apr 29 05:03:05 2001 +0000 + + Re-introduced the old ctors for the mutations (for backward compatibility + with the tutorial :-( + +Author: evomarc +Date: Sat Apr 28 06:06:21 2001 +0000 + + Declarations for make_xxx_real.cpp files - for eoReal genotypes + Was previously es.h - now es.h is specifically for ES genotypes + +Author: evomarc +Date: Sat Apr 28 05:53:37 2001 +0000 + + Adding first bricks of ES algorithm - make_XXX_es.cpp + +Author: evomarc +Date: Sat Apr 28 05:47:18 2001 +0000 + + Added bounds to the real operators in make_XXX (and hence in t-eoReal) + +Author: evomarc +Date: Fri Apr 27 04:03:16 2001 +0000 + + Removed the -O2 from ga and es dirs - it takes waaaaaaaaaaaaay too much time + at least with g++ 2.95.3 + +Author: evomarc +Date: Thu Apr 26 15:47:37 2001 +0000 + + The declaratio file for all make_* + +Author: evomarc +Date: Thu Apr 26 15:35:30 2001 +0000 + + Removing eoRealBounds from Makefile.am + +Author: evomarc +Date: Thu Apr 26 15:31:48 2001 +0000 + + An initializer of eoReal that uses bounds + +Author: evomarc +Date: Thu Apr 26 15:27:48 2001 +0000 + + Adding all make_*_real.* - similar to ga stuff for eoReal (not ES yet) + +Author: evomarc +Date: Thu Apr 26 15:24:53 2001 +0000 + + Doing libes.a in src/es and adding t-eoReal.cpp in test + I had to move eoRealBounds to utils dir because of global objects + Some domino consequences here and there ... + +Author: evomarc +Date: Tue Apr 24 09:42:01 2001 +0000 + + Changed obscure comment into more detailed one + +Author: evomarc +Date: Tue Apr 24 05:13:10 2001 +0000 + + CLeaning up + +Author: evomarc +Date: Tue Apr 24 05:08:08 2001 +0000 + + Forgot the 2 representation dependent make_XXX.h + +Author: evomarc +Date: Tue Apr 24 05:05:09 2001 +0000 + + Adding eoEvalContinue + +Author: evomarc +Date: Tue Apr 24 05:03:54 2001 +0000 + + Cleaning up + +Author: evomarc +Date: Tue Apr 24 04:56:12 2001 +0000 + + eoEvalFuncCounter is now in a separate file + +Author: evomarc +Date: Tue Apr 24 04:52:04 2001 +0000 + + The new libga + Apart from big changes in the src/ga dir, and the addition of the src/do dir + it also generated a few changes here and there, e.g. some include file still + missing. Also removed some warning from some test files. + +Author: evomarc +Date: Fri Apr 13 08:57:40 2001 +0000 + + Few cosmetic modifs: + put the #define of some boolean in eoData.h + added some include that were missing (unnoticed because of include) + some checks in eoXXXTournamentSelect + +Author: evomarc +Date: Thu Apr 12 16:46:55 2001 +0000 + + Added eoCloneOps.h that contains ... cloning instances of eoXXXOp (all in + 1 file, sorry JJ). + Modified eo - also added a few comments there + +Author: evomarc +Date: Thu Apr 12 05:35:05 2001 +0000 + + Modified the default behavior of eoCountedStateSaver to save the final population. + So if you don't want any population save, don't use any eoCountedStateSaver. + +Author: evomarc +Date: Thu Apr 12 05:29:34 2001 +0000 + + Added a new boolean argument to the ctor of eoBitMutation: + you can now specify a rate-per-bit that will be normalized by the chromSize + +Author: evomarc +Date: Thu Apr 12 05:28:23 2001 +0000 + + Added a few "virtual" that were missing + +Author: evomarc +Date: Wed Apr 11 12:01:51 2001 +0000 + + Changed all variables named howmany into combien (French for how many) + because of a silly problem on Solaris (howmany seems to be some macro???) + +Author: evomarc +Date: Wed Apr 11 04:44:39 2001 +0000 + + Modified printOn so that parameters that are not set explicitely by the user + are commented out - but still appear. Uses the (now public and pure virtual + in the base class eoParameterLoader) method isItThere. + +Author: evomarc +Date: Tue Apr 10 15:08:09 2001 +0000 + + Added the pure virtual isItThere method in base class eoParameterLoader + Also made the corresponding isItThere method in eoParser public. + This allows one to test if the user did actually input a given parameter + and thus not to write it in the output if not - as we want the output + of printOn to be "as identical as possible" to the actual user input + +Author: evomarc +Date: Mon Apr 9 16:03:18 2001 +0000 + + eoCtrlCcontinue had a few remaining errors :-( + +Author: evomarc +Date: Mon Apr 9 15:28:24 2001 +0000 + + Modified the eoCtrlCContinue - had to create the eoCtrlCContinue.cpp + to make t-eoGA work (you should NOT have separate functions in .h files!) + I also included everything related to Ctrl C handling in #ifndef _MSC_VER + until someone tells me how to do it in MSVC + +Author: evomarc +Date: Mon Apr 9 14:20:48 2001 +0000 + + Sorry, last check in was a mistake + +Author: evomarc +Date: Mon Apr 9 08:52:41 2001 +0000 + + Commented some ====== that resulted in error when running autogen.sh + +Author: evomarc +Date: Thu Apr 5 16:47:54 2001 +0000 + + Added the continue.tmpl template - and modified the html pages accordingly + (though eoCheckPoint.html is still a long way to complete). + Added some comments in all template files - and replaced + the protected by private (don't remember why these were protected!!!). + +Author: evomarc +Date: Wed Apr 4 03:47:33 2001 +0000 + + Added the signal handling - see eoCtrlCContinue.h + I've disabled it in case of MSC as I don't know if this works there ... + + Also added a couple of "virtual" in the ga dir + +Author: evomarc +Date: Tue Apr 3 17:14:53 2001 +0000 + + eoOperators now is in sync with the last modif of eoPopulator by Maarten! + +Author: evomarc +Date: Tue Apr 3 17:14:08 2001 +0000 + + Modified the tempaltes to take into account + - the last modifications of the eopopulator class + - the include files (were totally missing in the old templates) + - JJ's demand for one class - one file :-) + +Author: jmerelo +Date: Tue Apr 3 10:08:08 2001 +0000 + + In eoVector, changed printOn and readFrom to virtual + +Author: maartenkeijzer +Date: Wed Mar 28 09:00:54 2001 +0000 + + eoParam, added specialization for eoValueParam::getValue + FDCStat and FileSnapshot: better error messageing + Scalar fitness: is now a vector of doubles + exercise3.1 added gnuplot again + + Don't know about eoCombinedContinue + +Author: evomarc +Date: Tue Mar 27 16:27:15 2001 +0000 + + Modified the names in eoPopStat! + Hoever, the way it's done now, the string gets TRUNCATED - and I dont' know why + +Author: evomarc +Date: Tue Mar 27 16:02:00 2001 +0000 + + Adding Maarten's "snippet" to dump the whole pop to the screen: eoPopStat.h + Modified utils/checkpointing accordingly. + Tested in tutorial/Lesson3/exercise3.1 + BTW, the eoFileSnapShot does not work any more - I've commented it out + and will look at that later... + +Author: maartenkeijzer +Date: Mon Mar 26 10:09:40 2001 +0000 + + NDSorting: changed exact ranking values to make check for front easier + eoRNG: changed nothing (did some debugging) + +Author: maartenkeijzer +Date: Fri Mar 23 12:24:39 2001 +0000 + + added test for printing population + +Author: maartenkeijzer +Date: Fri Mar 23 08:54:31 2001 +0000 + + let doxygen look into this dir + +Author: maartenkeijzer +Date: Fri Mar 23 08:53:48 2001 +0000 + + added + +Author: maartenkeijzer +Date: Thu Mar 22 16:23:56 2001 +0000 + + updated project number + +Author: maartenkeijzer +Date: Thu Mar 22 11:22:31 2001 +0000 + + oops + +Author: maartenkeijzer +Date: Thu Mar 22 10:51:16 2001 +0000 + + Changed the single objective shortcut calculation + +Author: maartenkeijzer +Date: Thu Mar 22 09:00:30 2001 +0000 + + temporarily added fitness_traits to keep people up to date with this proposal + +Author: jmerelo +Date: Wed Mar 21 13:35:10 2001 +0000 + + Added a new xover to varlenxover + +Author: jmerelo +Date: Wed Mar 21 13:09:47 2001 +0000 + + Added a new atommutator to Variable Length, and corrected some headers which had problems + +Author: jmerelo +Date: Wed Mar 21 12:10:13 2001 +0000 + + Moved epAtom* out of the obsolete dir; added some CVS headers to some files, and made everything work with my elipse classes + +Author: maartenkeijzer +Date: Wed Mar 21 11:09:29 2001 +0000 + + test paretofitness class + +Author: maartenkeijzer +Date: Wed Mar 21 11:08:27 2001 +0000 + + Few changes in setting up the algorithms. It now gives an example of how to + write factory functions + +Author: maartenkeijzer +Date: Wed Mar 21 10:55:22 2001 +0000 + + Changed a few things in the eoPerf2Worth classes, EO.h and eoSelectOne.h are functionally unchanged + +Author: maartenkeijzer +Date: Tue Mar 20 14:34:07 2001 +0000 + + Updated eoStat.h to also "do the right thing" when confronted with pareto style fitness + +Author: maartenkeijzer +Date: Fri Mar 16 14:19:11 2001 +0000 + + added help + +Author: maartenkeijzer +Date: Fri Mar 16 14:09:55 2001 +0000 + + Now look how perty t-eoPareto has become (though it doesn't do a proper mo modelling yet) + +Author: maartenkeijzer +Date: Fri Mar 16 13:11:32 2001 +0000 + + Some bugfixing in MO optimization and added empty check: target in tutorial + +Author: maartenkeijzer +Date: Fri Mar 16 12:09:36 2001 +0000 + + oops, ngens is now the nice 10 + +Author: maartenkeijzer +Date: Fri Mar 16 12:08:26 2001 +0000 + + Ok, made an eoParetoFitness class, which meant that I could roll back a few changes in EO.h (phew). + Also changed eoSelectFromWorth etc. + +Author: maartenkeijzer +Date: Fri Mar 16 11:48:32 2001 +0000 + + added + +Author: maartenkeijzer +Date: Thu Mar 15 14:11:24 2001 +0000 + + added dist and distdir targets + +Author: maartenkeijzer +Date: Wed Mar 14 12:47:14 2001 +0000 + + Using nd-sorting now + +Author: maartenkeijzer +Date: Wed Mar 14 12:46:37 2001 +0000 + + First go, does not do niching yet + +Author: maartenkeijzer +Date: Wed Mar 14 11:58:47 2001 +0000 + + OOPS, that was a major bug, letting non-dominating individuals dominate one another. + +Author: maartenkeijzer +Date: Wed Mar 14 10:14:27 2001 +0000 + + t-eoPareto now plots the evolving population and t-eoRandom check is slightly more strict + +Author: maartenkeijzer +Date: Wed Mar 14 10:13:27 2001 +0000 + + Added support for printing vector as a fitness + +Author: maartenkeijzer +Date: Wed Mar 14 10:12:37 2001 +0000 + + Added Multi-objective fitness monitoring added support for vector > in eoParam + and made eoFileSnapshot type-safe + +Author: maartenkeijzer +Date: Tue Mar 13 08:25:05 2001 +0000 + + Swapped linking order of utility libs + +Author: evomarc +Date: Tue Mar 13 05:25:51 2001 +0000 + + Just modified an wrong comment (after a too quick cut-and-paste) + +Author: maartenkeijzer +Date: Mon Mar 12 16:07:55 2001 +0000 + + Production of binop back to 1 + +Author: maartenkeijzer +Date: Mon Mar 12 16:04:18 2001 +0000 + + Added first batch of pareto based stuff + +Author: maartenkeijzer +Date: Mon Mar 12 16:03:08 2001 +0000 + + Added pareto based stuff + +Author: maartenkeijzer +Date: Mon Mar 12 16:00:58 2001 +0000 + + EO: added overloaded printing of fitness (for vectors and pairs) + + Various bugs and ommissions in eoPerf2Worth and eoSelectFromWorth + +Author: maartenkeijzer +Date: Mon Mar 12 14:27:31 2001 +0000 + + invalidating supported now + +Author: maartenkeijzer +Date: Sat Mar 10 14:02:23 2001 +0000 + + Changed the populator to be a) more efficient and b) more useable + + It is no longer derived from eoPop, it now gets a destination population. + This saves a lot of copying. The semantics has changed a little as well. It is + now an _infinite_ iterator. operator++ will *not* dispense new individuals, but + will merely stay at the end. To get a new indy, use operator*() as before. + + eoEasyEA now checks the checkpoint *after* making a generation and clears the offspring + eoGeneralBreeder is changed to reflect the changes in eoPopulator + eoSequentialSelect now uses setup() rather than init() + +Author: maartenkeijzer +Date: Fri Mar 9 14:14:53 2001 +0000 + + Test for a ssga added. + +Author: maartenkeijzer +Date: Fri Mar 9 14:13:28 2001 +0000 + + Various bugs found and resolved. + +Author: maartenkeijzer +Date: Thu Mar 8 13:38:41 2001 +0000 + + radically simplified the Makefile.am, but this only works for headers (no idea what the problem is with sources) + +Author: maartenkeijzer +Date: Tue Feb 27 11:45:31 2001 +0000 + + put using eo::rng in top of file to help out gcc 2.91 + +Author: maartenkeijzer +Date: Tue Feb 27 11:44:28 2001 +0000 + + swapped order of libeo and libeoutils, gcc 2.91 did not like it + +Author: maartenkeijzer +Date: Tue Feb 27 11:43:06 2001 +0000 + + Made dtor virtual + +Author: evomarc +Date: Tue Feb 27 05:24:24 2001 +0000 + + Still modifying eoInit ... + +Author: evomarc +Date: Tue Feb 27 05:09:10 2001 +0000 + + Modified all init sequences in Lesson2 and Lesson3 - and all corresponding + files in html dir - after the return of eoRndGenerators and subsequent + modifications of eoInit + +Author: maartenkeijzer +Date: Mon Feb 19 12:23:13 2001 +0000 + + Modified eoInit so that it would use the eoRndGenerator base class. + To be able to use the primitive std::generate function, added a + set of wrappers in eoSTLFunctor.h that have the copy semantics most + STL functions expect (namely pass-by-value rather then pass-by-reference). + + Updated test/Makefile.am to also test t-eoRandom + +Author: evomarc +Date: Sun Feb 18 06:41:30 2001 +0000 + + Date and version number + +Author: evomarc +Date: Sun Feb 18 04:34:57 2001 +0000 + + Added the eo::rng (instead of rng) as default parameter to all calls. + Also t-eoRandom was abruptly aborting-> a min was greater than a max, and + exceptions were not being caught. + +Author: maartenkeijzer +Date: Sat Feb 17 10:51:31 2001 +0000 + + eoVector is back (eoFixedLength and eoVariableLength are gone) + + Also: introducing eoRndGenerators.h for eoRndGenerator derived classes: + + eoNormalGenerator + eoUniformGenerator + eoBooleanGenerator + eoNegExpGenerator + + Note the suffix that are added to aid in determining what these classes do + +Author: evomarc +Date: Sat Feb 17 08:22:53 2001 +0000 + + Now takes into account the last (and last!) modification of the operator interace: + no more invalidate, but a bool returned for simple operators, and a better description + of the eoPopulator/eoOpContainer links. + +Author: evomarc +Date: Sat Feb 17 06:47:31 2001 +0000 + + Forgot the selector in the ctor + +Author: evomarc +Date: Sat Feb 17 06:42:20 2001 +0000 + + Modified crossover and mutation to account for the new interface (bool ...) + Added the genop.tmpl, template for general op, 3 cases, growing pop, + shrinking pop through erase, thrinking pop through extra selector + +Author: evomarc +Date: Fri Feb 16 18:00:18 2001 +0000 + + Added oine star at start of comment to have Doxygen process it !!! + +Author: maartenkeijzer +Date: Fri Feb 16 09:39:06 2001 +0000 + + works for me + +Author: evomarc +Date: Fri Feb 16 08:21:25 2001 +0000 + + The perf2worth major check in + 2 new important classes: eoPerf2Worth and eoSelectFromWorth + Instances of eoPerf2Worth are eoRanking and eoLinearFitScaling. + Coming soon (piece of cake now) are the niching strategies (sharing, clearing) + +Author: evomarc +Date: Fri Feb 16 05:06:17 2001 +0000 + + Only names modifications, to comply to EO strict rules :-) + +Author: maartenkeijzer +Date: Thu Feb 15 08:31:38 2001 +0000 + + reverted the max-to-produce initializer + +Author: evomarc +Date: Thu Feb 15 05:36:28 2001 +0000 + + Changed the default values for popsize, vecsize and maxgen so + the user has a chance to see something even on Pentium 10GHz :-) + +Author: evomarc +Date: Thu Feb 15 05:35:31 2001 +0000 + + Modified the comments so that all callses are documented by Doxygen + (a comment starting with // before the class definition is not taken into account) + Also updated the initial overall comment - + and waouw, doxygen generates links there, too! Cool. + +Author: evomarc +Date: Thu Feb 15 04:47:18 2001 +0000 + + +Author: maartenkeijzer +Date: Wed Feb 14 18:05:36 2001 +0000 + + updated the dsp, dsw files for the library + +Author: maartenkeijzer +Date: Wed Feb 14 18:01:30 2001 +0000 + + no need to keep these test functions here, will start new project in /test + +Author: maartenkeijzer +Date: Wed Feb 14 14:09:16 2001 +0000 + + Changed the return value to return what it got in + +Author: maartenkeijzer +Date: Wed Feb 14 10:35:26 2001 +0000 + + + Changed the signature of eoMon, eoBin and eoQuadOp to return a bool, + without invalidating fitness. Added a set of invalidators to take over + that job (see for instance eoSGA and eoSGATransform how this can transparantly used) + + Derived eoState from eoFunctorStore (for convenience, from a design perspective this may sound wrong) + + Added a wrap_op function that does the wrapping for you (see eoOpContainer how this made this functor + exceedingly less hairy). Checked all the tests removed the eoGeneric*Op family (not needed anymore) + and of course changed all the operators to reflect the change (and found a few that didn't + invalidate the fitness, thus really pointing out the advantage of the current approach) + +Author: jmerelo +Date: Tue Feb 13 22:39:56 2001 +0000 + + Just playing with the CVS variables + +Author: jmerelo +Date: Tue Feb 13 22:38:23 2001 +0000 + + Just playing with the CVS variables + +Author: jmerelo +Date: Tue Feb 13 22:35:07 2001 +0000 + + Moved out of the 'obsolete' directory a couple of honest classes, which didn't harm anybody; activated also in Makefile.am the program that tested them + +Author: maartenkeijzer +Date: Tue Feb 13 14:43:54 2001 +0000 + + Added a bit more documentation, more to follow (I hope) + +Author: maartenkeijzer +Date: Tue Feb 13 12:38:19 2001 +0000 + + fixed a bug: the parser now correctly parses parameters of the form + + -Pvalue + + This will now produce 'value'. The buggy parser would parse 'alue' here. I am truly and deeply + ashamed to have created such an off-by-one error. + + Marc assumed this was wanted behaviour (so that it should read: -P=value) + I must admit that this is a logical conclusion, though it was merely a side-effect + of the error. To not force Marc to rewrite the tutorial and his way of working with + EO, I decided to make a feature out of the bug, so that now the parser will parse: + + -Pvalue + -P=value + + and of course the true and blue: + + -Parameter=value + + I will now go and check if I sent out some crappy papers caused by this bug (as I've been using eo!) + +Author: maartenkeijzer +Date: Tue Feb 13 10:35:47 2001 +0000 + + Just an update + +Author: maartenkeijzer +Date: Mon Feb 12 13:58:51 2001 +0000 + + Ok, updated the Makefile.am again to use the + + make check + + Command I picked up in the automake documentation (RTFM, you know) + + Tagged a lot of header functions in the GnuPlot files with 'inline', + so they can be used from more than one sourcefile. + + Ok, now the interesting news. Started a new library libga (not to be confused + with Matthew's GaLib). Here I suggest we put a fairly complete and configurable + genetic algorithm. Just to see how far we can stretch ourselves and also to have + a GA-componenent that can be used in other applications without having to rebuild + the entire thing. test/t-eoGA.cpp tests this library + +Author: maartenkeijzer +Date: Sun Feb 11 16:35:21 2001 +0000 + + run_tests is expanded to run everything (but only once yet, will have + to address this later). + t-eoSymreg is build to run for just a few generations, otherwise testing + it would be an excercise in patience. + +Author: maartenkeijzer +Date: Sun Feb 11 16:25:03 2001 +0000 + + Removed small bug in reading outside a buffer in eoParser::readFrom + + This caused the parser to crash when a simple flag of the form program -f + was given. + +Author: maartenkeijzer +Date: Sun Feb 11 16:01:47 2001 +0000 + + run_tests, add your own tests here + +Author: maartenkeijzer +Date: Sun Feb 11 15:58:55 2001 +0000 + + Test now is not build automatically, make test should be given explicitely, then a new script run_tests will be used to check if everything still works + +Author: maartenkeijzer +Date: Sun Feb 11 15:57:01 2001 +0000 + + Commented out the check for libtool, as we don't use it currently + +Author: evomarc +Date: Sat Feb 10 05:36:50 2001 +0000 + + Added matermind in SUBDIRS + +Author: jmerelo +Date: Fri Feb 9 16:52:06 2001 +0000 + + Minor bugs for Win quashed; fixed Win project files + +Author: maartenkeijzer +Date: Fri Feb 9 11:52:55 2001 +0000 + + Removed the -O2 flag from the makefile in the test directory. + Builds should go faster now. + +Author: evomarc +Date: Fri Feb 9 08:32:47 2001 +0000 + + Added a comment before eoPopulator class so it is documented! + +Author: evomarc +Date: Fri Feb 9 08:21:35 2001 +0000 + + Changed the first paragraph, added warning that it should be used on-line only + +Author: evomarc +Date: Fri Feb 9 05:52:44 2001 +0000 + + Big change in eoGeneralOp interface: left out! + +Author: evomarc +Date: Fri Feb 9 05:46:12 2001 +0000 + + Change in Makefile - but again it should be replaced with clean Makefile.am + +Author: evomarc +Date: Fri Feb 9 05:43:06 2001 +0000 + + The big GeneraoOp interface change - in test dir + +Author: evomarc +Date: Fri Feb 9 05:34:04 2001 +0000 + + Modified the Makefile of Lesson? to allow make all to also make the exercises + It need to be modified anyway into Makefile.am stuff + +Author: evomarc +Date: Fri Feb 9 05:28:33 2001 +0000 + + Removed eoEvolutionStrategy because it was based on eoGeneralOp old interface + +Author: evomarc +Date: Fri Feb 9 05:25:25 2001 +0000 + + Because it has not extension, I had forgotten to update the eo file itself! + Now reflects the change of eoGenOp interface and the changes of names in ga + +Author: evomarc +Date: Fri Feb 9 05:21:04 2001 +0000 + + Added the GnuPlotSnapshotMonitor, the eoScalarFitnessStat and eoFDCStat in checkpointing + +Author: evomarc +Date: Fri Feb 9 05:10:25 2001 +0000 + + Left-out from the big change of general op interface! + +Author: evomarc +Date: Fri Feb 9 05:09:26 2001 +0000 + + The BIG change of general operator interface + I also changed + - the eoQuadratic into eoQuad (as dicussed with Maarten) + - the eoBin into eoBit, with more appropriate names for the "binary" + operators (that can be unary!) as no one protested when I posted on + eodev list + +Author: evomarc +Date: Wed Feb 7 05:15:18 2001 +0000 + + Added the missing include of eoScalarFitness - mandatory due to + explicit specialization for eoParamValue > + +Author: evomarc +Date: Wed Feb 7 05:13:33 2001 +0000 + + Added the handling of generic operators in Combined Ops + +Author: evomarc +Date: Wed Feb 7 05:11:37 2001 +0000 + + Added the shuffle(vector) method + +Author: evomarc +Date: Wed Feb 7 05:04:24 2001 +0000 + + Added selection methods + eoBestSelect always return the best individual + eoSequentialSelect a selectOne version of eoDetSelect (uses an index to + return next offspring from sorted pop) + +Author: evomarc +Date: Thu Feb 1 05:27:36 2001 +0000 + + Forgotten a debug print + +Author: evomarc +Date: Thu Feb 1 05:17:16 2001 +0000 + + I had forgotten to add pipecom.h + Moreover, I got fed up with error due to const/non const, so I modified + PipeComSend to take a const argument. THe consequence is that it will not run + under plain C any more. + +Author: evomarc +Date: Wed Jan 31 18:38:39 2001 +0000 + + Added the monitoring facilities for snapshots (i.e. generating and plotting a new file + every generation) which is different from the continuous monitoring (same file/plot is + angemented every generation). + This lead to a number of modifications in many files in utils dir + + But now we can watch on-line + - fitness spreadout + - FDC plots + - multi-objective Pareto fronts (though the multi-objective sruff isn't there yet!) + +Author: evomarc +Date: Tue Jan 30 04:53:05 2001 +0000 + + Comments added to remove undocumented classes from Doxygen documentation + +Author: evomarc +Date: Mon Jan 29 10:25:44 2001 +0000 + + Added the truncate and the hasNoBoundAtAll methods in eoRealBounds. + The former simply set values to the boundary values in case they are out + The latter allows to short-cut all bound-checks when no need + + SOme day I will put this in utils, and have a eoRealBounds.cpp in the + pre-compiled library + +Author: evomarc +Date: Sun Jan 28 07:31:34 2001 +0000 + + Modified to use eoRealBounds rather than eoEsObjectiveBounds + +Author: evomarc +Date: Sun Jan 28 07:27:12 2001 +0000 + + Error in src/Makefile.am + +Author: evomarc +Date: Sun Jan 28 07:02:27 2001 +0000 + + Actually removed eoEsObjectiveBounds.h and evolution_strategies + +Author: evomarc +Date: Sun Jan 28 07:00:41 2001 +0000 + + Added the includes ga.h and es.h + Removed the old eoEsObjectiveBounds and evolutionar_strategies from es dir + +Author: evomarc +Date: Sat Jan 27 08:38:31 2001 +0000 + + Added some comments so eoRealVectorBounds is documented + +Author: evomarc +Date: Sat Jan 27 08:20:39 2001 +0000 + + Following the change in includes (added ga.h and es.h everywhere pfuhh) + +Author: evomarc +Date: Sat Jan 27 07:46:07 2001 +0000 + + Added eoGenericRealOp.h that are the exact copy of the operators of eoReaOp.h, + but in generic format. + They are used at the omoment only in eoEsStdevXOver.h that calls a crossover + on the object variables, then a crossover on teh stdev vectors! + A piece of cake :-) + +Author: evomarc +Date: Sat Jan 27 07:43:58 2001 +0000 + + I have separated the include files into + eo everything that is general to any representation + es.h everything about real representation (in es dir) + ga.h everything related to bitstring representation (in ga dir) + + To be continued by gp.h, and ... + + This has lead to some slight modifications in test file eobin and all tutorial + examples files... + + I've also added in utils eoDistance, generic functor to compute distances, + including also the generic Euclidian distance + +Author: evomarc +Date: Sat Jan 27 07:41:46 2001 +0000 + + I have separated the include files into + eo everything that is general to any representation + es.h everything about real representation (in es dir) + ga.h everything related to bitstring representation (in ga dir) + + To be continued by gp.h, and ... + + This has lead to some slight modifications in test file eobin and all tutorial + examples files... + +Author: evomarc +Date: Sat Jan 27 07:33:55 2001 +0000 + + A few mistakes corrected - and some comments on the setup method + +Author: evomarc +Date: Fri Jan 26 18:26:30 2001 +0000 + + Added the bounds to all eoRealOp operators (and to the eoNormalMutation). + The eoESObjectiveBounds should soon dissapear!! + +Author: evomarc +Date: Fri Jan 26 17:12:13 2001 +0000 + + Typos in comments + +Author: evomarc +Date: Fri Jan 26 17:09:33 2001 +0000 + + Some includes were missing in eoPop and eoOp that I had not noticed before + trying to compile test/t-eoSymreg.cpp + +Author: evomarc +Date: Fri Jan 26 04:06:09 2001 +0000 + + Added eoRandomReduce + +Author: evomarc +Date: Thu Jan 25 16:14:25 2001 +0000 + + Full t-eoSelect file, that allows to test all selectors + feature: generation of files suitable for gnuplot to see how individual spread out + +Author: evomarc +Date: Thu Jan 25 16:13:15 2001 +0000 + + Added ranking selection (eoRankingSelect) and (linear) fitness scaling in + proportional selection (a completely different file, eoFitnessScalingSelect.h) + +Author: evomarc +Date: Wed Jan 17 05:29:54 2001 +0000 + + Modified the link to EO pages so that users can download the development + version - as no example works with the current snapshot + +Author: evomarc +Date: Tue Jan 16 09:49:46 2001 +0000 + + Added the shuffle method + +Author: evomarc +Date: Tue Jan 16 07:20:48 2001 +0000 + + Added the normal mutation - and the 1/5 mutation in FirstRealEA in Lesson2 + +Author: evomarc +Date: Tue Jan 16 07:20:02 2001 +0000 + + Added the normal and 1/5 mutations (file es/eoNormalMutation.h) + +Author: evomarc +Date: Tue Jan 16 07:18:45 2001 +0000 + + Added the normal mutation - and the 1/5 mutation + +Author: evomarc +Date: Tue Jan 16 05:52:01 2001 +0000 + + Added the eoRandomReduce class - hence I also added the shuffle method + in eoPop (I had been postponing that for a long time!) which in turn required + another class of random generator (whose operator() takes an unsigned as argument) + +Author: evomarc +Date: Fri Jan 12 21:31:42 2001 +0000 + + Corrected some error in variable name after last changes in method append + +Author: evomarc +Date: Thu Jan 11 11:02:37 2001 +0000 + + New versions of bounds for real variables. + Should supersede eoEsObjectiveBounds, whose name was misleading anyway + as this can be used in any REal-ceded GA for isntance + +Author: evomarc +Date: Thu Jan 11 10:48:31 2001 +0000 + + GOing to the generic operators: some additions (eoGeneric*) + and some modifications in eoFixedLength and eoVariableLength. + +Author: evomarc +Date: Tue Jan 9 03:33:16 2001 +0000 + + Added the eoSurviveAndDie comments. + Should be complete!!! + +Author: evomarc +Date: Tue Jan 9 02:17:28 2001 +0000 + + Added the namespace in description of RNGs (and corrected a few broken links) + +Author: evomarc +Date: Mon Jan 8 10:07:27 2001 +0000 + + Added the namespace eo for the global variable rng in eoRNG.cpp + Also added "using eo::rng" in eoRNG.h so nothing has to be modified. + We should gradually move to write eo::rng everywhere, and remove that using + directive to be almost full-proofed against possible name collision. + +Author: evomarc +Date: Mon Jan 8 09:52:15 2001 +0000 + + Added the descrition of evolution engines in eoEngine + and links to SGAI STL Web site in eoTutorial and eoProgramming + +Author: evomarc +Date: Fri Jan 5 14:42:48 2001 +0000 + + Removed a forgotten comment :-) + +Author: evomarc +Date: Fri Jan 5 08:50:01 2001 +0000 + + I'm not sure about whether the sourceforge list is equivalent to the onelist list, + so I finally ut both in README! + +Author: evomarc +Date: Fri Jan 5 08:17:11 2001 +0000 + + Put the sourceforge name for the mailing list + +Author: evomarc +Date: Fri Jan 5 07:30:34 2001 +0000 + + Updating installation ... + +Author: evomarc +Date: Fri Jan 5 07:20:45 2001 +0000 + + Correcting my previous errors ... + +Author: evomarc +Date: Fri Jan 5 07:10:25 2001 +0000 + + Trying to make the installation lighter, but the doc and the src + would not compile, with make doc or make src ... + +Author: evomarc +Date: Fri Jan 5 06:55:16 2001 +0000 + + Removed Lesson4 from Makefile - it is not there yet, and generates an error + +Author: evomarc +Date: Fri Jan 5 06:25:26 2001 +0000 + + Added a message about generating the documentation if you have doxygen + +Author: evomarc +Date: Fri Jan 5 06:24:53 2001 +0000 + + Removed doc from the SUBDIRS as most people don't have doxygen installed. + Now you need to type in "make doc" to generate the doc + +Author: evomarc +Date: Fri Jan 5 06:23:54 2001 +0000 + + Updated Makefile.am to account for the change of names in selectors + +Author: evomarc +Date: Fri Jan 5 05:48:16 2001 +0000 + + Changed the names of the exercise files to exerciseN.p - N lesson nb, p exercise nb + +Author: evomarc +Date: Fri Jan 5 05:44:35 2001 +0000 + + eoHowMany is now included in utils dir + +Author: evomarc +Date: Fri Jan 5 05:42:08 2001 +0000 + + Checking in the name changes in selection procedures. + This impacts on many files, creating new entries in src (the old ones are moved + to obsolete dir), modifying t-eoSymreg.cpp and t-eobin.cpp in test, + as well as gprop.cc and mastermind.cc in app dir (not to mention almost all + files in tutorial:-( + +Author: evomarc +Date: Fri Jan 5 05:41:26 2001 +0000 + + Trying to ci eoTutorial.html (there is a sticky tag that keeps bothering me ...) + +Author: evomarc +Date: Thu Jan 4 15:23:14 2001 +0000 + + I had removed the wrong file!!! + +Author: evomarc +Date: Thu Jan 4 15:21:18 2001 +0000 + + removed redundant index.html in html dir + +Author: evomarc +Date: Thu Jan 4 05:06:09 2001 +0000 + + Sorry: removed eoSGATransform, that is in eoSGA.h ... + +Author: evomarc +Date: Thu Jan 4 05:00:40 2001 +0000 + + Adding the selectin and replacement procedures + +Author: evomarc +Date: Tue Jan 2 13:31:40 2001 +0000 + + Adding t-eoSelect.cpp to test selection procedures. Modified Makefile.am accordingly + +Author: evomarc +Date: Tue Jan 2 13:27:11 2001 +0000 + + Adding eoDetSelect, deterministic batch selection, that copies the individuals + one after the other. Should shuffle them in between (TODO). + +Author: evomarc +Date: Tue Jan 2 07:54:12 2001 +0000 + + A few deatils + +Author: evomarc +Date: Tue Jan 2 07:35:56 2001 +0000 + + Still the same !@#$$%% modif due to egcs problems ... + +Author: evomarc +Date: Tue Jan 2 07:23:35 2001 +0000 + + Follow-up to the modif of SecondBitEA.cpp due to egcs... + +Author: evomarc +Date: Tue Jan 2 07:19:55 2001 +0000 + + A few details in the comments + +Author: evomarc +Date: Tue Jan 2 07:03:57 2001 +0000 + + I had to change the whole way the parameters are read, because EGCS did not + allow the nice constructs I had imagined (and compiled with g++) + - I removed the createParam method in Parser class - that was creating the parameters + on the heap. Not allowed to have a templatized method ??? + - I removed the subroutine read_param in SecondBitEA, as you need to create + permanent parameters (eoParser only holds references), and egcs did not allow + to create them by reference, i.e. in the line + eoValueParam & blablaParam(...); + + So now everything is done in the main_function, and 3 lines are needed to create + and read every paramter (sigh ...) + +Author: evomarc +Date: Wed Dec 27 11:37:05 2000 +0000 + + A few additions and corrections ... + +Author: evomarc +Date: Tue Dec 26 10:28:27 2000 +0000 + + Modified the help message for the short name (added the missing =) + +Author: evomarc +Date: Tue Dec 26 08:33:48 2000 +0000 + + Moved eoSGATransform into a separate file and added the dynamic version + (where arguments can be passed by value or by reference). + Modified eo accordingly + +Author: evomarc +Date: Tue Dec 26 07:42:09 2000 +0000 + + Modified the include list after the big eoReplacement changes + +Author: evomarc +Date: Fri Dec 22 15:13:54 2000 +0000 + + Had forgotten the section name of the parser.processParam call in the + definition fo the parameter. + +Author: evomarc +Date: Fri Dec 22 14:59:10 2000 +0000 + + Back to the 3 lines to declare a parameter and read it within the parser: + some compiler (egcs) don't like the createParam method in eoParser.h + +Author: evomarc +Date: Fri Dec 22 14:56:12 2000 +0000 + + Back to the 3 lines to declare a parameter and read it within the parser: + some compiler (egcs) don't like the createParam method in eoParser.h + Also removed the reference in parameters declarations (a cut-and-paste error). + +Author: evomarc +Date: Thu Dec 21 06:49:41 2000 +0000 + + Augmented the functors and STL parts - but I still would appreciate + help on the STL part! + +Author: evomarc +Date: Thu Dec 21 05:35:01 2000 +0000 + + Removed the silly reference for all parameters (cut-and-paste error!). + But the funny thing is that my compiler did not complain ... + +Author: evomarc +Date: Tue Dec 19 22:14:29 2000 +0000 + + Updated INSTALL and README to EO-specific instructions! + +Author: evomarc +Date: Tue Dec 19 18:43:25 2000 +0000 + + Update after the change in replacements + +Author: evomarc +Date: Tue Dec 19 18:42:41 2000 +0000 + + Added t-eoRepalcement.cpp, that tests all new replacement procedures + +Author: evomarc +Date: Tue Dec 19 18:41:19 2000 +0000 + + THe big eoReplacement update: + The interface for eoReplacement is now eoPop&, eoPop& + (i.e. no const) and the result must be in the first argument in the end. + + Hence it is possible to do SSGA and all intermediate replacmeent procedures + + The classes derived from eoMergeReduce.h are now in a separate file + The SSGA-like replcaement procedures are in eoReduceMerge.h + A more general replacement can be found in eoSurviveAndDie.h + (it could be made a littel more general - still open for upgrades). + + Also some accessors have been added to the eoPop (best and worse individuals) + + And include file eo has been updated + +Author: evomarc +Date: Tue Dec 19 18:32:09 2000 +0000 + + A few errors + local TOC at top of eoEngine + +Author: evomarc +Date: Tue Dec 19 18:18:08 2000 +0000 + + Bottom-Up/Top-Down modifs + +Author: evomarc +Date: Tue Dec 19 18:09:10 2000 +0000 + + A new util class to handle the rate/integer argument to selectors/replacement + +Author: evomarc +Date: Tue Dec 19 18:02:19 2000 +0000 + + Changed NoReplacement to GenerationalReplacement + +Author: evomarc +Date: Tue Dec 19 10:17:39 2000 +0000 + + Changed the "to-down / bottom-up" to "algorithm-based / component-based" + Also added all replacement procedures in eoEngine.html + and the general operator interface in eoOperators.html + +Author: evomarc +Date: Tue Dec 19 05:31:54 2000 +0000 + + A small detail ... + +Author: evomarc +Date: Sun Dec 17 07:49:55 2000 +0000 + + Updated teh INSTALL and README files that were really minimal!!! + +Author: evomarc +Date: Fri Dec 15 18:09:08 2000 +0000 + + Corrected a bad link + +Author: evomarc +Date: Fri Dec 15 17:01:11 2000 +0000 + + deleted trash file lesson1.ps + CVS ---------------------------------------------------------------------- + +Author: evomarc +Date: Fri Dec 15 16:57:37 2000 +0000 + + Added utils/eoGnuplot1DMonitor.h ni the list of includes + +Author: gustavoromero +Date: Mon Dec 11 09:28:40 2000 +0000 + + adding .deps + +Author: evomarc +Date: Fri Dec 8 15:10:13 2000 +0000 + + Adding Templates in dir tutorial, to hold some simple files that + only need to be filled by the user to code new items. + At the moment, only eoMonOp (in mutation.tmpl), and + eoBinOp and eoQuadOp (in crossover.tmpl) + +Author: evomarc +Date: Fri Dec 8 14:16:13 2000 +0000 + + Corrected a few bugs after the first "public" presentation + +Author: evomarc +Date: Thu Dec 7 09:56:00 2000 +0000 + + New base class eoUpdatable.h - for objects that need upates in eoCheckPoints + Also contains the class eoDynUpdater. They are eoUpdater, they receive an eoUpdatable + at construct time, and call their upate() method in their operator() method + +Author: gustavoromero +Date: Tue Dec 5 13:46:21 2000 +0000 + + small change + +Author: evomarc +Date: Tue Dec 5 05:27:12 2000 +0000 + + Removed trash file + +Author: evomarc +Date: Tue Dec 5 05:22:55 2000 +0000 + + Added virtual and const keywords all around - as I tried to use a derived + class for adaptive rates (see eoDynProportionalCombinedOp.h, at the moment + in the tutorial) + +Author: gustavoromero +Date: Mon Dec 4 19:26:19 2000 +0000 + + erasing comments + +Author: gustavoromero +Date: Mon Dec 4 19:10:20 2000 +0000 + + small improvements + +Author: evomarc +Date: Mon Dec 4 16:49:42 2000 +0000 + + Added normal mutation for reals, and corrected error of segment-> arithmetic + for the crossover operators + +Author: evomarc +Date: Mon Dec 4 15:01:31 2000 +0000 + + omment of line apply(pop, eval) was found misleading ... + +Author: evomarc +Date: Mon Dec 4 14:55:18 2000 +0000 + + - added the #define for eo_verbose (true) and eo_no_verbose (false) + - added the eoNormMutation, simple normal mutation for simple real variables + +Author: evomarc +Date: Mon Dec 4 14:53:59 2000 +0000 + + - added the #define for eo_verbose (true) and eo_no_verbose (false) + - added the eoNormMutation, simple normal mutation for simple real variables + Modified Files: + src/eo src/es/eoRealOp.h tutorial/Lesson2/FirstRealEA.cpp + tutorial/Lesson3/SecondBitEA.cpp + +Author: evomarc +Date: Mon Dec 4 06:58:43 2000 +0000 + + Added the lastCall construct: if the stopping condition becomes true in eoCheckPoint, + a method called lastCall is called for everything contained in that checkpoint + (stats, updaters and monitors). This can be extremely useful + - for stateSavers (see below) + - for monitoring things like rates of success of operators, where what you + are interested in is the final result only. + Added of course a virtual method lastCall that does nothing by default in classes + eoBaseStat, eoBaseSortedStat, eoUpdater and eoMonitor + Added a boolean to control the save of the state in method eoCountedStateSaver::lastCall + so you can ask that the state is saved at final population, whatever happens. + I also added the corresponding constructor to take this into account. + +Author: evomarc +Date: Mon Dec 4 05:55:59 2000 +0000 + + Added a comment so Doxygen documents it + +Author: evomarc +Date: Sat Dec 2 08:35:42 2000 +0000 + + eoStdoutMonitor -> eoFileMonitor to correct an abusive cut-and-paste! + +Author: evomarc +Date: Sat Dec 2 08:29:45 2000 +0000 + + Suppressed the warning for the need to create a link - see html files log. + +Author: evomarc +Date: Sat Dec 2 08:27:30 2000 +0000 + + Changed the links to the EO doc - removed the need for a (Unix) link from + tutorial/html dir to doc/ dir: it's simpler, and I was not able to do + the same thing in Windows anyway! + +Author: evomarc +Date: Sat Dec 2 08:21:18 2000 +0000 + + Changed the (abstract) name for fitness from F to FitT so it matches + that of file eoFixedLength.h - it is far clearer in the documentation + diagrams this way. + +Author: gustavoromero +Date: Fri Dec 1 19:13:12 2000 +0000 + + initial version of mastermind + +Author: gustavoromero +Date: Fri Dec 1 19:09:34 2000 +0000 + + adding a new terminator and a monitor + +Author: evomarc +Date: Fri Dec 1 18:26:16 2000 +0000 + + Corrected the outState.regiserObject(parser) ommission (see SecondBitEA.html) + +Author: evomarc +Date: Fri Dec 1 18:03:17 2000 +0000 + + I had dropped the parser from the outState - so I had to modify also + read_param to get it back! + +Author: evomarc +Date: Fri Dec 1 17:56:52 2000 +0000 + + Used spell-checker!!! + +Author: gustavoromero +Date: Fri Dec 1 15:46:07 2000 +0000 + + adding a lot of includes + +Author: gustavoromero +Date: Thu Nov 30 17:11:53 2000 +0000 + + small fix for uniform + +Author: evomarc +Date: Thu Nov 30 06:38:15 2000 +0000 + + Corrected a small bug (!): the -C=value was not processed correctly + as somebody forgot one character when counting up to ... 3 :-))) + +Author: evomarc +Date: Thu Nov 30 06:20:20 2000 +0000 + + Reversed the priority between command-line and parameter file + +Author: evomarc +Date: Thu Nov 30 06:11:49 2000 +0000 + + Moved eoCopyElite.h to obsolete dir - was redundant with eoMerge.h + +Author: evomarc +Date: Thu Nov 30 06:04:09 2000 +0000 + + Removed eoCopyElite.h, redundant with eoMerge.h + +Author: evomarc +Date: Thu Nov 30 04:44:32 2000 +0000 + + Added the tutorial SUBDIR + It works fine ... for make clean + But of course it would require some Makefile.am in each subdir of tutorial + and I am not sure I know what to put there... + +Author: gustavoromero +Date: Wed Nov 29 18:36:13 2000 +0000 + + sorry, old version was right + +Author: evomarc +Date: Wed Nov 29 18:19:57 2000 +0000 + + Initial version of the tutorial. + Warning: all Makefile's are hand-made, and will only work in Linux + +Author: evomarc +Date: Wed Nov 29 18:19:18 2000 +0000 + + dded teh comment about the link to be made from html to ../../doc + +Author: evomarc +Date: Wed Nov 29 18:06:09 2000 +0000 + + Initial version of the tutorial. + Warning: the Makefil is hand-made, and only works in Linux + +Author: evomarc +Date: Wed Nov 29 17:20:16 2000 +0000 + + An include file was missing!!! + I've inserted it in teh file actually - but if we go on with gnuplot, + it will need to be taken out again, and used in all other monitors + we will write using gnuplot (e.g. eoGnuplotWithErrorbarsMonitor, + eoGnuplotHistogramMonitor, ...). + +Author: evomarc +Date: Tue Nov 28 17:42:53 2000 +0000 + + Added eoProportionalCombinedOp.h + +Author: evomarc +Date: Tue Nov 28 17:41:41 2000 +0000 + + I added this very simple instance of operator proportional selector + for the tutorial - it is consistent with all other xxxCombined constructs. + However, I am not sure that Occam's razor will not make it widely used... + +Author: evomarc +Date: Tue Nov 28 17:17:19 2000 +0000 + + Added the class eoSGATransform: I break the one file / one class rule + a lot, but both are supposed to be used mainly in the tutorial, not + in real life :-) + +Author: evomarc +Date: Tue Nov 28 15:40:39 2000 +0000 + + Added fstream in the include files - I had an error message at some point! + +Author: evomarc +Date: Tue Nov 28 15:35:09 2000 +0000 + + Added a comment to stdout upon termination - so we know why we stop in case + of multiple criteria + +Author: evomarc +Date: Tue Nov 28 15:31:38 2000 +0000 + + Minor change of the default label + +Author: gustavoromero +Date: Tue Nov 28 13:36:29 2000 +0000 + + now works + +Author: evomarc +Date: Tue Nov 28 08:20:01 2000 +0000 + + Added a few comments so Doxygen documents all classes + +Author: evomarc +Date: Tue Nov 28 06:58:06 2000 +0000 + + This is the first attempt to use gnuplot through a fork to plot statistics. + At the moment it is only tested for Linux! + Use with care + +Author: evomarc +Date: Tue Nov 28 06:46:37 2000 +0000 + + Modified the contructor: the default value for the delimiter is now " " + and I added a boolean argument to indicate whether or not we want to + overwrite an existing file with same name (default is overwrite). + Added the getFileName accessor. + +Author: evomarc +Date: Fri Nov 24 17:45:07 2000 +0000 + + Added eoSteadyGenContinue.h, es/eoReal.h and es/eoRealOp.h + +Author: evomarc +Date: Fri Nov 24 17:44:21 2000 +0000 + + Very simple classes for vectors of (unbounded) real numbers. + A few straightforward operators only (BLX-0, uniform mutation). + Mostly for tutorial reasons - though it might improve in usefull classes later + +Author: gustavoromero +Date: Fri Nov 24 17:43:02 2000 +0000 + + bug fix + +Author: evomarc +Date: Fri Nov 24 17:41:39 2000 +0000 + + An eoContinue class that allows a minimum number of generations, + then stops whenever a number of generations happens without fitness + improvement. + +Author: evomarc +Date: Fri Nov 24 17:36:03 2000 +0000 + + Added a verbose mode (the default behavior) which is as before. + But when in non-verbose mode, prints only one line per generation. + +Author: evomarc +Date: Fri Nov 24 17:30:37 2000 +0000 + + Turned the eoBestFitness into an eoStat (it was an eoSortedStat). + Alos added a few comments so that Doxygen documents all classes there. + +Author: evomarc +Date: Fri Nov 24 17:26:22 2000 +0000 + + Changed Maarten's 2-continuator construct into a vector of pointer, + as in all other Combined constructs in EO. + Kept the construtor with 2 eoCOntinue for backward compatibility. + Added of course the add method! + +Author: gustavoromero +Date: Fri Nov 24 12:33:44 2000 +0000 + + changing genetic operators + +Author: gustavoromero +Date: Fri Nov 24 11:52:49 2000 +0000 + + fix Fitness default construction value + +Author: gustavoromero +Date: Fri Nov 24 09:51:31 2000 +0000 + + adding new parameters + +Author: gustavoromero +Date: Thu Nov 23 19:45:49 2000 +0000 + + reordering Makefile creation + +Author: gustavoromero +Date: Thu Nov 23 19:45:13 2000 +0000 + + adding some files + +Author: gustavoromero +Date: Thu Nov 23 19:44:47 2000 +0000 + + initial release + +Author: gustavoromero +Date: Thu Nov 23 19:17:24 2000 +0000 + + initial version + +Author: gustavoromero +Date: Thu Nov 23 19:15:31 2000 +0000 + + adding Makefile.in + +Author: gustavoromero +Date: Thu Nov 23 19:14:09 2000 +0000 + + new application gprop + +Author: evomarc +Date: Fri Nov 17 17:50:08 2000 +0000 + + Made eoBestFitnessStat an eoStat, NOT an eoSortedStat + Cde VS: Committing in . + +Author: evomarc +Date: Fri Nov 17 17:06:53 2000 +0000 + + dded the className method for eoMon, eoBin and eoQuad classes + +Author: gustavoromero +Date: Mon Nov 13 12:12:14 2000 +0000 + + fixing template type + +Author: gustavoromero +Date: Mon Nov 13 12:09:53 2000 +0000 + + adding evaluation in some places + +Author: gustavoromero +Date: Fri Nov 10 09:55:10 2000 +0000 + + fix warning: no newline at end of file + +Author: gustavoromero +Date: Wed Nov 8 15:15:26 2000 +0000 + + fix no newline at end of file warning + +Author: gustavoromero +Date: Wed Nov 8 13:37:41 2000 +0000 + + choose a constructor + +Author: gustavoromero +Date: Wed Nov 8 13:26:03 2000 +0000 + + fix no newline at end of file warning + +Author: gustavoromero +Date: Wed Nov 8 12:56:14 2000 +0000 + + adding a include for apply.h + +Author: gustavoromero +Date: Wed Nov 8 12:55:26 2000 +0000 + + fix no newline at end of file warning + +Author: gustavoromero +Date: Wed Nov 8 12:38:13 2000 +0000 + + bug fix + +Author: gustavoromero +Date: Tue Nov 7 19:16:42 2000 +0000 + + adding old targets + +Author: gustavoromero +Date: Tue Nov 7 19:13:22 2000 +0000 + + removing a warning + +Author: gustavoromero +Date: Tue Nov 7 13:02:48 2000 +0000 + + adding targets + +Author: gustavoromero +Date: Mon Nov 6 12:38:54 2000 +0000 + + adding subdirectories + +Author: gustavoromero +Date: Mon Nov 6 12:37:58 2000 +0000 + + adding t-eoSymreg + +Author: gustavoromero +Date: Mon Nov 6 11:34:38 2000 +0000 + + adding target doc + +Author: gustavoromero +Date: Mon Nov 6 11:31:10 2000 +0000 + + adding doc target to all + +Author: evomarc +Date: Sun Nov 5 05:33:43 2000 +0000 + + Added constructors with 2 params _min and _max in generators + so you can now generate things in [_min, _max) instead of [0,_max) only + Modified the private data from maxim to {minim, range} accordingly. + +Author: evomarc +Date: Sun Nov 5 04:50:10 2000 +0000 + + Added a default value (0.5) to method flip + +Author: gustavoromero +Date: Fri Nov 3 21:23:09 2000 +0000 + + initial version + +Author: gustavoromero +Date: Fri Nov 3 20:03:26 2000 +0000 + + fixing autoconfiguration + +Author: evomarc +Date: Mon Oct 30 14:54:29 2000 +0000 + + Added some safety test in roulette_wheel procedures: + if total is zero, used to return iterator -1 - now returns uniform choice + +Author: evomarc +Date: Mon Oct 30 14:51:57 2000 +0000 + + Fine tuning of printOn: if fitness is invalid, now prints it + +Author: maartenkeijzer +Date: Fri Oct 27 09:13:06 2000 +0000 + + Another attempt in adding the flush + +Author: maartenkeijzer +Date: Fri Oct 27 09:12:31 2000 +0000 + + updated version info, added flush to stdoutmonitor and sprinkled a few typenames + in eoPop.h and eoGOpSelector.h (egcs 2.96 started complaining). + +Author: evomarc +Date: Fri Oct 27 04:38:29 2000 +0000 + + added a second ctor with more didactic ordering of parameters (for tutorial) + +Author: evomarc +Date: Fri Oct 27 04:07:21 2000 +0000 + + Added the member function append( unsigned _popSize, eoInit& _chromInit ) + who appends _popSize members to the population using an eoInit + +Author: evomarc +Date: Tue Oct 24 03:58:02 2000 +0000 + + dded Uniform Crossover (!) and "deterministic" bit-filp mutation + +Author: evomarc +Date: Tue Oct 24 03:57:10 2000 +0000 + + Added the calls to base class I/O routines in printOn and readFrom + +Author: maartenkeijzer +Date: Mon Oct 23 10:58:54 2000 +0000 + + It is using delim now + +Author: maartenkeijzer +Date: Mon Oct 9 16:13:20 2000 +0000 + + Changed functor base names and added to version + +Author: maartenkeijzer +Date: Fri Oct 6 10:41:38 2000 +0000 + + Added an eoSortedStatBase for more efficient statistic calculations + + updated a few makefiles to include the html and latex docs with the + distribution. + +Author: maartenkeijzer +Date: Fri Oct 6 07:50:10 2000 +0000 + + Updated authors and started a README + +Author: maartenkeijzer +Date: Fri Oct 6 07:32:26 2000 +0000 + + Changed ostream_iterator to use AtomType rather than double. + Stupid me! + +Author: mac +Date: Fri Sep 29 10:39:19 2000 +0000 + + Updated version no. to 0.9.1 + +Author: mac +Date: Wed Sep 20 13:32:28 2000 +0000 + + Error in random_generator removed. + +Author: mac +Date: Sat Sep 9 13:52:16 2000 +0000 + + Changed construction order as gcc was warning + +Author: mac +Date: Sat Sep 9 13:43:31 2000 +0000 + + eo: added some missing entries + Pop: error in nth_element_fitness + sga: error in eval + eoParseTree: oddities with gcc + checkpointing: added eoParser and eoState + eoParser: support for wrongly entered parameter names + rnd_generators: flip(0.5) -> flip(bias) in binary_generator + selectors.h: ??? + +Author: mac +Date: Wed Aug 23 14:56:04 2000 +0000 + + Added -O2 as compiler flag + +Author: mac +Date: Wed Aug 23 13:07:51 2000 +0000 + + ok, fixed this problem with typedefs in gcc-0.92 (strange....) + +Author: mac +Date: Wed Aug 23 12:52:48 2000 +0000 + + Yet another change in eoParseTree + +Author: mac +Date: Wed Aug 23 12:50:34 2000 +0000 + + eoParseTree-- changed typedef + +Author: mac +Date: Wed Aug 23 12:03:01 2000 +0000 + + eoCounter? + eoEasyEA -- made it copyable again + eoEvalFunc -- added specialized eoEvalFuncCounter + eoEvolutionStrategy -- nothing much + eoGenContinue -- nothing + eoPop -- fixed nth_element_fitness + eoBitOp -- fixed error in xover + eoFileMonitor -- now appends always + eoParam -- worked around memory leak in MSC's strstream + eoParser -- changed -pconfig_file to @config_file + eoParser -- added messages instead of exception when required param is missing + eoStat -- added eoDistanceStat + t-eoFunctor -- don't know + +Author: mac +Date: Fri Aug 18 08:59:20 2000 +0000 + + +Author: mac +Date: Fri Aug 18 08:57:26 2000 +0000 + + Oh, right, dangling pragma + +Author: mac +Date: Fri Aug 18 08:56:14 2000 +0000 + + some signed/unsigned comparisons removed + +Author: mac +Date: Fri Aug 18 08:44:22 2000 +0000 + + Added symbolic regression, which tests combined ops as well + +Author: root +Date: Tue Aug 15 21:15:36 2000 +0000 + + initial checkin + +Author: mac +Date: Mon Aug 14 11:18:34 2000 +0000 + + Removed a few dsp files and changed saving/loading eoPops a bit. + +Author: mac +Date: Thu Aug 10 16:43:39 2000 +0000 + + changed int to size_t + +Author: mac +Date: Thu Aug 10 16:42:37 2000 +0000 + + *** empty log message *** + +Author: mac +Date: Thu Aug 10 16:41:04 2000 +0000 + + Added binary_value.h + +Author: mac +Date: Thu Aug 10 16:36:55 2000 +0000 + + changed int compare to size_t + +Author: mac +Date: Thu Aug 10 16:35:15 2000 +0000 + + changed int compare to size_t + +Author: mac +Date: Thu Aug 10 16:34:05 2000 +0000 + + main should return int + +Author: mac +Date: Thu Aug 10 16:32:44 2000 +0000 + + changed int to size_t + +Author: mac +Date: Thu Aug 10 14:33:37 2000 +0000 + + Forgot to remove enum value init + +Author: mac +Date: Thu Aug 10 14:31:19 2000 +0000 + + Still part of extreme cleanup + +Author: mac +Date: Thu Aug 10 14:30:25 2000 +0000 + + Still part of extreme cleanup + +Author: mac +Date: Thu Aug 10 14:26:50 2000 +0000 + + Still part of extreme cleanup + +Author: mac +Date: Thu Aug 10 14:25:45 2000 +0000 + + Still part of extreme cleanup + +Author: mac +Date: Thu Aug 10 14:23:19 2000 +0000 + + no + +Author: mac +Date: Thu Aug 10 14:18:34 2000 +0000 + + Extreme cleanup, see src/obsolete for details + +Author: mac +Date: Thu Aug 3 20:00:39 2000 +0000 + + Temporarily added Makefile.am to prevent errors + +Author: mac +Date: Thu Aug 3 19:54:42 2000 +0000 + + Removed contrib dir reference + +Author: jmerelo +Date: Thu Aug 3 17:33:03 2000 +0000 + + More changes to Makefile.am + +Author: jmerelo +Date: Thu Aug 3 17:30:57 2000 +0000 + + More changes to Makefile.am + +Author: jmerelo +Date: Thu Aug 3 17:22:46 2000 +0000 + + More changes to Makefile.am + +Author: jmerelo +Date: Thu Aug 3 17:15:42 2000 +0000 + + Changes mostly to Makefile.ams here and there, to be able to do a clean distribution + +Author: mac +Date: Thu Aug 3 17:11:54 2000 +0000 + + New fresh ltconfig, works on my RedHat distr and also on geneura + +Author: mac +Date: Thu Aug 3 17:11:02 2000 +0000 + + Added a different libtool configure so it runs on more machines + +Author: jmerelo +Date: Thu Aug 3 16:37:51 2000 +0000 + + Changed some problems with Makefile.am + +Author: jmerelo +Date: Thu Aug 3 15:44:01 2000 +0000 + + Added missing files, and LICENSE + +Author: mac +Date: Fri Jul 28 10:26:44 2000 +0000 + + removed + +Author: mac +Date: Fri Jul 28 06:10:34 2000 +0000 + + testing if this configure is protable + +Author: gustavo +Date: Tue Jul 18 11:33:56 2000 +0000 + + ignore files created by examples + +Author: gustavo +Date: Tue Jul 18 11:30:39 2000 +0000 + + fix examples using binary_value + +Author: marc +Date: Thu Jun 22 03:23:15 2000 +0000 + + The initial individuals were evaluated directly using binary_value + This resulted in the fitness NOT being set, and some abort or segmentation fault later + Only eoEvalFunc shouydl be used to evaluate individuals!!! + +Author: gustavo +Date: Fri Jun 16 10:20:23 2000 +0000 + + changing version number + +Author: gustavo +Date: Fri Jun 16 09:38:43 2000 +0000 + + erasing LICENSE from test directory + +Author: gustavo +Date: Thu Jun 15 14:29:25 2000 +0000 + + *** empty log message *** + +Author: gustavo +Date: Wed Jun 14 16:29:00 2000 +0000 + + erasing warnings + +Author: mac +Date: Wed Jun 14 10:33:53 2000 +0000 + + Yet again some documentation change + +Author: mac +Date: Wed Jun 14 07:30:21 2000 +0000 + + Removed double reference to t-eoESFull + +Author: mac +Date: Wed Jun 14 07:27:51 2000 +0000 + + Removed double reference to t-eoESFull + +Author: mac +Date: Tue Jun 13 14:31:53 2000 +0000 + + Added ownership functionality and made the thing non-copyable + +Author: mac +Date: Tue Jun 13 14:31:22 2000 +0000 + + Some 'improvements' added + +Author: mac +Date: Tue Jun 13 14:30:47 2000 +0000 + + Added an ownership function to eoState + +Author: mac +Date: Tue Jun 13 10:27:10 2000 +0000 + + Changed base class eoEsBase to eoFixedLength + +Author: mac +Date: Tue Jun 13 10:25:53 2000 +0000 + + updated documentation + +Author: mac +Date: Tue Jun 13 09:48:24 2000 +0000 + + Fixed typedef Type error + +Author: mac +Date: Tue Jun 13 09:43:34 2000 +0000 + + Removed eoEsBase and created an eoFixedLength + +Author: mac +Date: Mon Jun 12 20:24:27 2000 +0000 + + Oh, right found some errors using gcc + +Author: mac +Date: Mon Jun 12 20:23:20 2000 +0000 + + Oh, right found some errors + +Author: mac +Date: Mon Jun 12 20:09:59 2000 +0000 + + New ES routines + +Author: mac +Date: Mon Jun 12 20:08:01 2000 +0000 + + Added a range member function to evaluate an iterator range + +Author: mac +Date: Mon Jun 12 20:07:25 2000 +0000 + + eoInit is a base class for making EO's, eoPop now has a constructor + for eoInit's + +Author: mac +Date: Sat Jun 10 13:22:53 2000 +0000 + + Removed dependence on eoUniform, changed it to use rng.random or rng.uniform directly + +Author: gustavo +Date: Fri May 26 17:18:06 2000 +0000 + + ignore t-eoExternalEO + +Author: mac +Date: Thu May 25 13:04:57 2000 +0000 + + Removed this ugly defaulting to 1 behaviour and solved it using template specialization + +Author: mac +Date: Thu May 25 12:21:06 2000 +0000 + + Added dummy case general: + +Author: gustavo +Date: Thu May 25 11:03:00 2000 +0000 + + warning hunting + +Author: mac +Date: Thu May 25 07:26:13 2000 +0000 + + Oops, corrected error in ctor(istream) + +Author: mac +Date: Thu May 25 07:23:24 2000 +0000 + + Oops, corrected error in adding t-eoExternalEO + +Author: mac +Date: Thu May 25 07:18:25 2000 +0000 + + eoExternalEO, support for using plain functions and structs in EO + +Author: mac +Date: Thu May 25 07:17:23 2000 +0000 + + Changed default printOn to have a trailing space instead of endl + +Author: mac +Date: Thu May 25 07:16:35 2000 +0000 + + Updated dsp, dsw and added t_eoExternalEO.dsp + +Author: mac +Date: Thu May 25 07:13:43 2000 +0000 + + Updated makefile and added t-eoExternalEO + +Author: mac +Date: Thu Apr 20 11:11:58 2000 +0000 + + removed reference to rint() (what does this function do anyway? it is not ANSI and defined nowhere in eo!) + +Author: mac +Date: Thu Apr 20 11:06:02 2000 +0000 + + Added a bias function next to bind(). This function will bias the selection to select certain specific guys... + +Author: mac +Date: Thu Apr 20 10:48:07 2000 +0000 + + Remove eoBinaryTerm, should not have been here in the first place + +Author: gustavo +Date: Wed Apr 12 09:51:50 2000 +0000 + + adding test to test/.cvsignore + +Author: gustavo +Date: Tue Apr 11 12:18:30 2000 +0000 + + some fix + +Author: mac +Date: Sun Apr 9 10:16:28 2000 +0000 + + getOp() should return a non-const reference + +Author: mac +Date: Sun Apr 9 10:13:27 2000 +0000 + + Changed int target to size_t target (produced warning) + +Author: mac +Date: Sun Apr 9 10:10:39 2000 +0000 + + eoFitTerm did not implement className + +Author: mac +Date: Sun Apr 9 10:09:32 2000 +0000 + + eoFitTerm did not implement className + +Author: mac +Date: Sun Apr 9 10:05:55 2000 +0000 + + Updated eoBreeder to use the even newer general operator interface + +Author: mac +Date: Sun Apr 9 10:00:55 2000 +0000 + + Updated eoBreeder to use the even newer general operator interface + +Author: mac +Date: Sun Apr 9 09:59:06 2000 +0000 + + Specialized it for bool, so that we don't get these MSVC warnings. + +Author: mac +Date: Sun Apr 9 09:54:25 2000 +0000 + + Oops, it's a pain to get the makefiles up to date when you are working on two machines.... + +Author: mac +Date: Sun Apr 9 09:50:44 2000 +0000 + + Oops, forgot to make operator() return an eoMonitor + +Author: mac +Date: Sun Apr 9 09:48:38 2000 +0000 + + Oops, forgot to make operator() return an eoMonitor + +Author: mac +Date: Sun Apr 9 09:46:20 2000 +0000 + + Updated documentation to give proper include file in doxygen and define a module selectors + Also added a load(stream) and save(stream) to eoState + +Author: mac +Date: Sun Apr 9 09:44:53 2000 +0000 + + Updated documentation to give proper include file in doxygen and define a module bitstring + +Author: mac +Date: Sun Apr 9 09:43:40 2000 +0000 + + Added t-eoGOpSel. + +Author: mac +Date: Sun Apr 9 09:41:29 2000 +0000 + + Changed the general operator interface to be consistent with the rest + of EO, updated some documentation. + +Author: mac +Date: Fri Apr 7 14:23:59 2000 +0000 + + updated Makefiles and removed a few unneeded files. note: ES files are pending + +Author: mac +Date: Fri Apr 7 09:04:50 2000 +0000 + + no message + +Author: gustavo +Date: Tue Apr 4 15:22:04 2000 +0000 + + changing include style from ... to <...> + +Author: gustavo +Date: Tue Apr 4 11:00:18 2000 +0000 + + initial .cvsignore + +Author: gustavo +Date: Mon Apr 3 15:52:31 2000 +0000 + + changing autonconfiguration to compile more examples and to create documentation + +Author: gustavo +Date: Mon Apr 3 15:27:56 2000 +0000 + + forgeting multiOps + +Author: gustavo +Date: Mon Apr 3 09:51:29 2000 +0000 + + too many EMPTY constructors + +Author: gustavo +Date: Mon Apr 3 09:32:43 2000 +0000 + + adding & modifying .cvsignore's + +Author: gustavo +Date: Fri Mar 31 16:23:16 2000 +0000 + + Maarten was right + +Author: gustavo +Date: Fri Mar 31 14:34:50 2000 +0000 + + Makefile.in don't need to be in cvs + +Author: gustavo +Date: Fri Mar 31 14:33:13 2000 +0000 + + more fix in makefiles + +Author: mac +Date: Fri Mar 31 10:14:15 2000 +0000 + + Added checkpointing to the makefile, but have to test it later on a Linux box + +Author: mac +Date: Fri Mar 31 10:04:39 2000 +0000 + + Finalized Checkpointing, renamed t-testSta.... to t-eoStateAndParser + added a checkpoint tester, but did not yet update the Makefiles as + I don't have automake on my machine + +Author: mac +Date: Fri Mar 31 10:02:18 2000 +0000 + + Finalized Checkpointing, see t-eoCheckpointing for a test + +Author: mac +Date: Fri Mar 31 10:00:22 2000 +0000 + + Added a className member + +Author: gustavo +Date: Thu Mar 30 18:15:14 2000 +0000 + + adding const... leaving as is + +Author: gustavo +Date: Thu Mar 30 18:02:03 2000 +0000 + + makefiles almost work + +Author: gustavo +Date: Thu Mar 30 17:11:20 2000 +0000 + + fixing makefiles + +Author: gustavo +Date: Thu Mar 30 14:20:25 2000 +0000 + + changing Makefile.am's to accept new subdiretory structure + +Author: mac +Date: Thu Mar 30 09:43:21 2000 +0000 + + changed erronuous classname() to className() + +Author: mac +Date: Thu Mar 23 14:41:12 2000 +0000 + + few minor mods + +Author: mac +Date: Wed Mar 22 18:55:12 2000 +0000 + + Adapted it for the poor stdc++ support of g++ + +Author: mac +Date: Wed Mar 22 17:10:07 2000 +0000 + + no message + +Author: mac +Date: Wed Mar 22 17:09:36 2000 +0000 + + Changed some includes for the new dir structure + +Author: mac +Date: Wed Mar 22 16:49:35 2000 +0000 + + Changed some includes for the new dir structure + +Author: mac +Date: Wed Mar 22 16:47:27 2000 +0000 + + test the state and the parser + +Author: mac +Date: Wed Mar 22 15:39:32 2000 +0000 + + Changed readFrom, which is no longer line based + +Author: mac +Date: Wed Mar 22 15:38:16 2000 +0000 + + Obsolete, now present in eoOp.h + +Author: mac +Date: Wed Mar 22 15:14:16 2000 +0000 + + Changed a few params in the configuration file + +Author: mac +Date: Wed Mar 22 15:00:38 2000 +0000 + + (re)moving... + +Author: mac +Date: Wed Mar 22 14:48:49 2000 +0000 + + (re)moving... + +Author: mac +Date: Wed Mar 22 14:38:10 2000 +0000 + + Configuration file for doxygen + +Author: mac +Date: Wed Mar 22 14:32:37 2000 +0000 + + (re)moving... + +Author: mac +Date: Wed Mar 22 14:30:57 2000 +0000 + + no message + +Author: mac +Date: Wed Mar 22 14:23:20 2000 +0000 + + moving... + +Author: mac +Date: Wed Mar 22 14:21:02 2000 +0000 + + moved old files here + +Author: mac +Date: Wed Mar 22 14:18:39 2000 +0000 + + Moved the es files to an es directory + +Author: mac +Date: Wed Mar 22 14:12:08 2000 +0000 + + no message + +Author: mac +Date: Wed Mar 22 14:04:03 2000 +0000 + + Added utilities directory, this contains state, parser etc. + +Author: mac +Date: Wed Mar 22 13:58:29 2000 +0000 + + Removed obsolete references + +Author: mac +Date: Wed Mar 22 13:57:57 2000 +0000 + + moved to utils + +Author: mac +Date: Mon Mar 20 17:35:24 2000 +0000 + + eoSelfEval was empty + +Author: mac +Date: Mon Mar 20 17:32:42 2000 +0000 + + Just changed a typo in the documentation + +Author: mac +Date: Mon Mar 20 16:13:32 2000 +0000 + + +Author: marc +Date: Mon Mar 13 10:17:12 2000 +0000 + + Put eoTerm into the eo hierarchy - it was in the air! + Added the className method + +Author: marc +Date: Mon Mar 13 10:14:20 2000 +0000 + + Changed some int into unsigned to avoid Gnu warnings + +Author: marc +Date: Mon Mar 13 10:10:00 2000 +0000 + + Removed extra {} in operator() + +Author: mac +Date: Mon Mar 6 16:28:37 2000 +0000 + + Removed the call to the istream ctor, replaced it with readFrom + +Author: mac +Date: Mon Mar 6 16:21:54 2000 +0000 + + Removed the call to the istream ctor, replaced it with readFrom + +Author: mac +Date: Mon Mar 6 16:09:46 2000 +0000 + + Removed the istream ctor + +Author: mac +Date: Mon Mar 6 16:05:47 2000 +0000 + + Fixed bug in eoGOpSelector (missing break!) + + eoOp.h: binOp's second arg is const once more + + all dsp and dsw files were touched by msvc, but did add some stuff (which + will be added to eo later) + + Hope this all works + +Author: mac +Date: Mon Mar 6 15:55:44 2000 +0000 + + Upgraded parse_tree a bit... + +Author: marc +Date: Thu Mar 2 05:54:01 2000 +0000 + + Removed extra () in method virtual const EOT& operator()(const eoPop& pop) + Changed the include of eoPop.h from <> to "" + +Author: marc +Date: Thu Mar 2 05:48:23 2000 +0000 + + - added the virtual destructors of all classes, + to suppress g++ annoying warnings when using -Wall option + +Author: marc +Date: Tue Feb 29 05:22:32 2000 +0000 + + Modified the order of base type and private data initializations + so the g++ does not complain when using the -Wall compile option + +Author: marc +Date: Tue Feb 29 05:14:40 2000 +0000 + + wherease the command "cvs ci" is OK. + + Here we go: + - added the virtual destructors of all classes, + to suppress g++ annoying warnings when using -Wall option + +Author: victor +Date: Mon Feb 21 18:21:58 2000 +0000 + + *** empty log message *** + +Author: victor +Date: Mon Feb 21 18:21:14 2000 +0000 + + A: has been fixed, ONCE MORE :-( + +Author: victor +Date: Mon Feb 21 18:03:31 2000 +0000 + + making the second parameter of the oprator() for binaria operators to be NON const + +Author: mac +Date: Sat Feb 19 18:21:47 2000 +0000 + + Changed double linefeeds, will undo this if it doesn't work + +Author: mac +Date: Sat Feb 19 17:37:18 2000 +0000 + + Removed double line feeds + +Author: mac +Date: Sat Feb 19 16:54:09 2000 +0000 + + Hi, just a simple test, I'm sorry to do it with the real repository, + but my machine here is not Unix + +Author: mac +Date: Sat Feb 19 16:32:12 2000 +0000 + + eoScalarFitness, 'envelope class' for making minimizing/maximizing fitness + +Author: mac +Date: Sat Feb 19 16:31:01 2000 +0000 + + Example file + +Author: mac +Date: Sat Feb 19 16:30:42 2000 +0000 + + Moved the static eoRNG rng to an extern eoRNG + This external object is now defined in eoPersistent.cpp + + This should change... + +Author: mac +Date: Sat Feb 19 16:27:38 2000 +0000 + + Added gp, example file in t-eoSymreg.cpp + +Author: victor +Date: Sat Feb 19 13:14:36 2000 +0000 + + Someone was using eoAltProportionalSelect.h only he/she knows whycd src + +Author: victor +Date: Sat Feb 19 12:50:48 2000 +0000 + + A: has been fixed , ONCE MORE :-( + +Author: victor +Date: Sat Feb 19 12:37:28 2000 +0000 + + Changing (ONCE MORE) eoEasyEA.h to allow 0 generation processes. + +Author: mac +Date: Wed Feb 16 15:17:43 2000 +0000 + + *** empty log message *** + +Author: mac +Date: Wed Feb 16 15:11:18 2000 +0000 + + *** empty log message *** + +Author: mac +Date: Wed Feb 16 15:05:19 2000 +0000 + + Mak: Added the eoQuadratic Op and more ... (and I hate VI) + +Author: mac +Date: Wed Feb 16 15:03:45 2000 +0000 + + *** empty log message *** + +Author: marc +Date: Wed Feb 16 04:40:20 2000 +0000 + + Changed all "float" to "double" + But more than that, this is a test of CVS for me + Marc + +Author: mac +Date: Tue Feb 15 15:08:00 2000 +0000 + + just a test + +Author: victor +Date: Fri Feb 11 12:05:07 2000 +0000 + + A: has been fixed :-)) + +Author: gustavo +Date: Wed Feb 9 19:50:02 2000 +0000 + + some test + +Author: jmerelo +Date: Mon Feb 7 17:16:16 2000 +0000 + + Added new files to the brew, mainly distance and new-op-interface related + +Author: gustavo +Date: Wed Jan 26 17:48:24 2000 +0000 + + *** empty log message *** + +Author: victor +Date: Tue Jan 25 08:20:22 2000 +0000 + + A very silly error has been fixed + +Author: gustavo +Date: Mon Jan 24 21:16:54 2000 +0000 + + some reviews + +Author: gustavo +Date: Mon Jan 24 21:13:21 2000 +0000 + + some reviews + +Author: victor +Date: Tue Jan 18 13:43:39 2000 +0000 + + I have change the do...while(terminator) into while(terminator){...}, because may be the termination condition is reached just atthe beginning (for instance 0 generations) + +Author: victor +Date: Tue Jan 11 13:25:32 2000 +0000 + + Another little bug fixed + +Author: gustavo +Date: Tue Jan 11 12:13:18 2000 +0000 + + bug fix in eoTournament + +Author: victor +Date: Tue Jan 4 13:04:00 2000 +0000 + + A little problem existed when the Parser tried to read a String because a \0 was inserted sometimes (no others) making imposible to add a new string to the one read and then turning the full string into a char* (understable? :-) + +Author: victor +Date: Tue Jan 4 10:43:06 2000 +0000 + + Changing the way parameters are shown to the user when the -h or --help flags are used + +Author: victor +Date: Tue Dec 21 13:39:42 1999 +0000 + + Minor changes in eoRNG.h + +Author: victor +Date: Tue Dec 21 12:12:29 1999 +0000 + + eoOpSelector has a method called getOp that HAD to return a non-constant reference to an operator; in fact it returned a CONST reference. Now, I've changed it + +Author: victor +Date: Tue Dec 21 11:41:19 1999 +0000 + + Updating the selectors: they inherited from eoSelect and noew the inherite from eoBinPopOp + +Author: victor +Date: Tue Dec 21 09:58:45 1999 +0000 + + Minor changes in eoParser.h + +Author: victor +Date: Fri Dec 17 12:04:06 1999 +0000 + + Moving function InitRamdom to eoParserUtils.h + +Author: jmerelo +Date: Fri Dec 17 09:19:13 1999 +0000 + + Changes + +Author: victor +Date: Wed Dec 15 16:47:41 1999 +0000 + + A little mistake has been corrected + +Author: victor +Date: Wed Dec 15 16:42:13 1999 +0000 + + The constants N,M and K are not declared twice when using RNG in different file of the same program + +Author: victor +Date: Wed Dec 15 13:57:09 1999 +0000 + + I have turned into comments the Pop constructor that used Type as the type of the gene, given that an EO can have NO genes + +Author: jmerelo +Date: Mon Nov 22 09:47:32 1999 +0000 + + Added changes mainly by Marc + +Author: jmerelo +Date: Mon Nov 15 09:26:33 1999 +0000 + + Added Marc's ES files and .dsp files for others + +Author: jmerelo +Date: Fri Oct 29 11:23:10 1999 +0000 + + Added eoParser + +Author: jmerelo +Date: Mon Oct 25 08:25:42 1999 +0000 + + Added new RNG and test files for it + +Author: jmerelo +Date: Tue Oct 19 11:47:15 1999 +0000 + + Small modifications + +Author: gustavo +Date: Fri Oct 15 13:16:50 1999 +0000 + + bug fix in eoBinBitflip + +Author: jmerelo +Date: Fri Oct 15 11:18:52 1999 +0000 + + Changed eoBinBitFlip thanks to Jacques suggestion + +Author: jmerelo +Date: Fri Oct 15 07:34:55 1999 +0000 + + Small changes to makefiles + +Author: jmerelo +Date: Wed Oct 13 08:38:33 1999 +0000 + + Changes in configure y makefiles to account for new version and new files + +Author: gustavo +Date: Mon Oct 11 10:20:39 1999 +0000 + + updating with new tests + +Author: gustavo +Date: Fri Oct 8 17:45:49 1999 +0000 + + adding more functions and tests for eoNonUniform + +Author: jmerelo +Date: Fri Oct 8 11:39:58 1999 +0000 + + Two files left over added to the repo + +Author: jmerelo +Date: Fri Oct 8 11:39:20 1999 +0000 + + Added a full algorithm to the new EO, with terminators, and things like that + +Author: jmerelo +Date: Fri Oct 8 09:52:31 1999 +0000 + + Added two more files + +Author: jmerelo +Date: Fri Oct 8 09:51:40 1999 +0000 + + Changed stuff to make eoGeneration work + +Author: jmerelo +Date: Fri Oct 8 07:40:34 1999 +0000 + + Cosmetic changes + +Author: gustavo +Date: Thu Oct 7 11:39:08 1999 +0000 + + adding t-eogeneration + +Author: gustavo +Date: Thu Oct 7 11:38:14 1999 +0000 + + putting eoNonUniform into a separate file + +Author: gustavo +Date: Tue Oct 5 11:32:17 1999 +0000 + + adding eoNonUniformOperator to eoOp.h + +Author: gustavo +Date: Mon Oct 4 11:17:19 1999 +0000 + + adding t-eogeneration.cpp + +Author: victor +Date: Fri Oct 1 17:00:38 1999 +0000 + + Updating Makefile.am to include eo2d.h and eo2dVector.h + +Author: victor +Date: Fri Oct 1 17:00:02 1999 +0000 + + Updating Makefile.am to compile t-eo2dVector.h + +Author: victor +Date: Fri Oct 1 16:36:04 1999 +0000 + + *** empty log message *** + +Author: victor +Date: Fri Oct 1 16:33:59 1999 +0000 + + All the methods have been implemented. Only three of them (asignement operator, read from and write to a stream) remain unfinished. + +Author: victor +Date: Fri Oct 1 16:32:46 1999 +0000 + + Final (or almost) version by now. + +Author: victor +Date: Wed Sep 29 11:43:34 1999 +0000 + + Adding an interface for 2-dimensional chromosomes + +Author: victor +Date: Wed Sep 29 11:41:34 1999 +0000 + + Fixing a little bug in the random generator. Variable size was used instead of _size, which is the parameter the method gets + +Author: gustavo +Date: Tue Sep 28 11:56:21 1999 +0000 + + testing and debugging eoGeneration + +Author: gustavo +Date: Tue Sep 28 10:26:39 1999 +0000 + + finish eoGeneration... still to be tested + +Author: gustavo +Date: Tue Sep 21 18:14:39 1999 +0000 + + fixing bugs in replacers and moving some code between files + +Author: gustavo +Date: Tue Sep 21 11:36:38 1999 +0000 + + pop need a reevaluation after breeding + +Author: gustavo +Date: Mon Sep 20 18:07:35 1999 +0000 + + fixing cvsignore + +Author: gustavo +Date: Mon Sep 20 11:48:52 1999 +0000 + + fixing tests + +Author: jmerelo +Date: Mon Sep 20 11:37:00 1999 +0000 + + Added LICENSE + +Author: jmerelo +Date: Mon Sep 20 11:35:01 1999 +0000 + + Changes to eo1d interface and bug fixes + +Author: gustavo +Date: Fri Sep 10 12:21:50 1999 +0000 + + *** empty log message *** + +Author: gustavo +Date: Fri Sep 10 12:13:53 1999 +0000 + + updating eo/test/.cvsignore for new eoBin tests + +Author: gustavo +Date: Fri Sep 10 12:11:11 1999 +0000 + + *** empty log message *** + +Author: gustavo +Date: Fri Sep 10 12:05:57 1999 +0000 + + *** empty log message *** + +Author: gustavo +Date: Fri Sep 10 12:03:51 1999 +0000 + + adding examples for eoBin & other stuff + +Author: gustavo +Date: Fri Sep 10 11:48:42 1999 +0000 + + adding examples for eoBin & other stuff + +Author: gustavo +Date: Fri Sep 10 11:07:46 1999 +0000 + + *** empty log message *** + +Author: gustavo +Date: Mon Feb 15 17:47:30 1999 +0000 + + adding eoGeneration + +Author: jmerelo +Date: Mon Feb 15 16:03:04 1999 +0000 + + New .dsp files for new test programs + +Author: jmerelo +Date: Mon Feb 15 16:01:35 1999 +0000 + + Compiled new stuff on VC++, changes to breeder + +Author: gustavo +Date: Mon Feb 15 11:55:59 1999 +0000 + + doing things work on VC++ + +Author: gustavo +Date: Fri Feb 12 17:56:55 1999 +0000 + + bux fix in t-eoinsertion.cpp + +Author: gustavo +Date: Fri Feb 12 17:43:28 1999 +0000 + + eoBreeder almost finished + +Author: jmerelo +Date: Wed Feb 10 17:14:08 1999 +0000 + + Added some files, compiled some stuff in VC++, and finished eoOpSelMason + +Author: gustavo +Date: Wed Feb 10 17:05:16 1999 +0000 + + adding eoBreeder + +Author: gustavo +Date: Wed Feb 10 13:39:48 1999 +0000 + + small bug fixes + +Author: gustavo +Date: Tue Feb 9 19:06:51 1999 +0000 + + *** empty log message *** + +Author: jmerelo +Date: Tue Feb 9 18:40:00 1999 +0000 + + Changes to makefiles and other things + +Author: gustavo +Date: Tue Feb 9 18:16:42 1999 +0000 + + *** empty log message *** + +Author: jmerelo +Date: Tue Feb 9 17:31:16 1999 +0000 + + New bitOp factories and things like that + +Author: gustavo +Date: Tue Feb 9 17:27:22 1999 +0000 + + new replacer + +Author: jmerelo +Date: Mon Feb 8 19:15:27 1999 +0000 + + Changed monopfactory to opfactory; changes in the examples + +Author: gustavo +Date: Mon Feb 8 18:47:07 1999 +0000 + + looking for a bug in eoInsertion + +Author: jmerelo +Date: Mon Feb 8 16:13:26 1999 +0000 + + New files added and fixes for VC++ + +Author: gustavo +Date: Mon Feb 8 16:11:55 1999 +0000 + + some bug fix + +Author: gustavo +Date: Mon Feb 8 14:15:11 1999 +0000 + + learning about autoconf: eoBin and bvector.h + +Author: gustavo +Date: Mon Feb 8 12:43:52 1999 +0000 + + eoBin/eoBinOp division + +Author: gustavo +Date: Fri Feb 5 18:25:28 1999 +0000 + + adding eoInsertion + +Author: gustavo +Date: Fri Feb 5 16:34:00 1999 +0000 + + eoLottery finished + +Author: gustavo +Date: Thu Feb 4 17:38:39 1999 +0000 + + adding acconfig.h + +Author: gustavo +Date: Wed Feb 3 20:42:57 1999 +0000 + + changes on eoLottery + +Author: jmerelo +Date: Wed Feb 3 18:34:20 1999 +0000 + + Changes to eo and opsel to quash compiling bugs + +Author: gustavo +Date: Wed Feb 3 17:28:07 1999 +0000 + + some changes to start, new work on eoLottery + +Author: jmerelo +Date: Wed Feb 3 17:26:52 1999 +0000 + + Chenges to EO + +Author: jmerelo +Date: Mon Feb 1 18:18:39 1999 +0000 + + Remove old eoObject.cpp + +Author: gustavo +Date: Fri Jan 29 12:23:55 1999 +0000 diff --git a/trunk/eo/CMakeLists.txt b/trunk/eo/CMakeLists.txt new file mode 100644 index 000000000..1c6d823be --- /dev/null +++ b/trunk/eo/CMakeLists.txt @@ -0,0 +1,146 @@ +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 +##################################################################################### + +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() + +INCLUDE(CMakeBackwardCompatibilityCXX) + +INCLUDE(FindDoxygen) + +INCLUDE(FindGnuplot) + +INCLUDE(CheckLibraryExists) + +IF(UNIX) + INCLUDE(ConfigureChecks.cmake) +ENDIF(UNIX) + +INCLUDE(Dart OPTIONNAL) + +# now create config headers +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) + +###################################################################################### + + +##################################################################################### +### 3) Manage the build type +##################################################################################### + +INCLUDE(BuildConfig.cmake) + +###################################################################################### + + +###################################################################################### +### compilation of examples? +###################################################################################### + +SET(ENABLE_CMAKE_EXAMPLE TRUE CACHE BOOL "Enable copy of benchs and parameters file?") + +###################################################################################### + + +###################################################################################### +### 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(test) +ADD_SUBDIRECTORY(tutorial) + +###################################################################################### + + +###################################################################################### +### 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) + +###################################################################################### diff --git a/trunk/eo/COPYING b/trunk/eo/COPYING new file mode 100644 index 000000000..b8df7fd44 --- /dev/null +++ b/trunk/eo/COPYING @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/trunk/paradiseo-mo/CTestConfig.cmake b/trunk/eo/CTestConfig.cmake similarity index 100% rename from trunk/paradiseo-mo/CTestConfig.cmake rename to trunk/eo/CTestConfig.cmake diff --git a/trunk/eo/ConfigureChecks.cmake b/trunk/eo/ConfigureChecks.cmake new file mode 100644 index 000000000..5fabc9c38 --- /dev/null +++ b/trunk/eo/ConfigureChecks.cmake @@ -0,0 +1,29 @@ +# NOTE: only add something here if it is really needed by EO + +INCLUDE(CheckIncludeFile) +INCLUDE(CheckIncludeFiles) +INCLUDE(CheckSymbolExists) +INCLUDE(CheckFunctionExists) +INCLUDE(CheckLibraryExists) + +CHECK_LIBRARY_EXISTS(m cos "/usr/lib" HAVE_LIBM) + +CHECK_INCLUDE_FILES(math.h "math.h" HAVE_MATH_H) +CHECK_INCLUDE_FILES(stdio.h "stdio.h" HAVE_STDIO_H) +CHECK_INCLUDE_FILES(stdlib.h "stdlib.h" HAVE_STDLIB_H) +CHECK_INCLUDE_FILES(string.h "string.h" HAVE_STRING_H) +CHECK_INCLUDE_FILES(strings.h "strings.h" HAVE_STRINGS_H) +CHECK_INCLUDE_FILES(malloc.h "malloc.h" HAVE_MALLOC_H) +CHECK_INCLUDE_FILES(limits.h "limits.h" HAVE_LIMITS_H) +CHECK_INCLUDE_FILES(unistd.h "unistd.h" HAVE_UNISTD_H) +CHECK_INCLUDE_FILES(stdint.h "stdint.h" HAVE_STDINT_H) + + +# Use check_symbol_exists to check for symbols in a reliable +# cross-platform manner. It accounts for different calling +# conventions and the possibility that the symbol is defined as a +# macro. Note that some symbols require multiple includes in a +# specific order. Refer to the man page for each symbol for which a +# check is to be added to get the proper set of headers. Example : + +#check_symbol_exists(asymbol "symbole.h" HAVE_SYMBOLE) diff --git a/trunk/eo/ForRelease b/trunk/eo/ForRelease new file mode 100644 index 000000000..290cfcb29 --- /dev/null +++ b/trunk/eo/ForRelease @@ -0,0 +1,45 @@ +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 + diff --git a/trunk/eo/INSTALL b/trunk/eo/INSTALL new file mode 100644 index 000000000..6264e4cea --- /dev/null +++ b/trunk/eo/INSTALL @@ -0,0 +1,86 @@ + +Basic Installation +================== + +The simplest way to compile the libraries or the provided softwares is to run +one of the script beginnig with "build_". Each script permits to build different +parts of the framework, with different options. + +To compile EO you will need CMake and a compiler for your system. + +So far the available scripts for posix systems using g++ are the following: + * build_gcc_linux_release : the most usefull script, build the core libraries in release mode + * build_gcc_linux_debug : build the core libraries with debugging informations in the binaries + * build_gcc_linux_tutorial : build the core libraries and the tutorials + * build_gcc_linux_unittest : build the core libraries and the tests executables + * build_gcc_linux_stl_parallel : build the core libraries enabling STL parallel algorithms (like sorting) + * build_gcc_linux_pyeo : build the core libraries and the python module + * distclean : remove the "release/" and "debug/" directories where the build scripts put the binaries + +For Windows systems using Visual Studio: + * build_vs2008_release.bat + You may need to adapt the ID to your version of Visual Studio, edit + the "Visual Studio 9 2008" string accordingly. + +The libraries are in the "release/lib/" or "debug/lib/" directories. + + +Compilers and Options +===================== + +The build scripts are really simple, take a look at them to see how to use the +build system. + +Basically, the steps are: + 0. remove any old build directory that's on the way: + rm -rf build/ + 1. create a directory in which to put build files: + mkdir build/ + 2. go in this directory: + cd build/ + 3. call cmake with the options you want, using the "-D" option and passing the + EO directory as an argument, for example: + cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_CMAKE_TESTING =1 .. + 4. now type your favorite "make" command, like: + make -j # use several processors at once when possible + 5. enjoy: + ./debug/test/t-eofitness + +Some of the available options are: + * CMAKE_BUILD_TYPE : + * "Debug" : embed debugging informations in the binaries) or + * "Release" : no debugging info and some optimizations (the default) + * ENABLE_EO_TUTORIAL : build the tutorial ("no" by default) + * ENABLE_CMAKE_TESTING : build the tests executables ("no" by default) + * ENABLE_PYEO : build the python module ("no" by default) + +You can pass generic options to the compiler, like: + * _GLIBCXX_PARALLEL : use the parallel version of the STL + + +Installation using packages +=========================== + +To construct a dummy template of the EO package you will need CPack. Be warned +that those do not guarantee correct dependencies and version management. + +Use the "package_*" scripts: + * package_deb : for debian-like systems + * package_rpm : for red-hat-like systems + +Or go through the following steps: + 1. go in the build directory where your binaries are: + cd build/ + 2. call CPack specifying the desired package system: + cpack -G DEB + 3. install the package: + sudo dpkg -i EO-1.1.1-Linux.deb + + +Basic installation +================== + +To install the framework system-wide, copy the "eo/" directory somewhere in your +path. The "lib/" directory should be reachable for the linker and the "src/" +directory must be in the compiler include path. + diff --git a/trunk/eo/LICENSE b/trunk/eo/LICENSE new file mode 100644 index 000000000..b8df7fd44 --- /dev/null +++ b/trunk/eo/LICENSE @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/trunk/eo/NEWS b/trunk/eo/NEWS new file mode 100644 index 000000000..f4625d6c3 --- /dev/null +++ b/trunk/eo/NEWS @@ -0,0 +1,54 @@ +* current version + +* release 1.2 (16. May. 2011) + - fixed the incremental allocation issue in variation operators which were + taking too much time for big population sizes + - new class eoParallel enabling parallelization in EO using OpenMP. At this + time, it only concerns the evaluation operator, for advanced details go to + the file test/t-eoParallel.cpp. The default parallelization mode is off, to + switch it on, see the parameters prefixed by --parallelize-* + - pyeo compatible with the last version of Boost and Python libraries + - script installing EO manually in using symbolic links + - evaluators that throw an exception if a maximum time has been reached + (wallclock and CPU user time for POSIX systems), independently of the number of generations + - merged parser and parser-logger + - some bugfixes for windows systems + +* release 1.1 (8. Nov. 2010) + - provide cmake build system, remove the old autotools one + - package generation system + - 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 + - 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 + - dual fitness class to handle feasibility of individual with guarantee that feasible fitness will always be better than unfeasible one + - feasible fitness ratio stat + - interquartile range stat + - average size of individuals stat + - uniform(min,max) random function + - compatibility macros for compiling paradiseo with CUDACC + - removed old multi-objective classes, deprecated by the Paradiseo-MOEO project + - new website, switch from CVS to GIT, and a cool logo! + +* release 1.0.1 (23. Jan. 2006) + - Templates/ improvements + +* release 1.0 (29. Dec. 2006) + - Implement CMA-ES. + - Update introductory pages of documentation and webpage. + - Add Microsoft Visual C++ project support files (for Visual Studio 2003 and 2005) + - Upgrade Teamplates/ script to create a complete standalone EO project (using autotools) + - Remove support for pre-standard C++ compiler (i.e. gcc-2.x), which allows to + clean up the code considerably. + Assume availability of sstream and limits. + +* release 0.9.3z.1 (1. Oct. 2005) + - Support gcc-3.4 and gcc.4.x. + - Provide full automake/autoconf/configure support. diff --git a/trunk/eo/PKGBUILD.cmake b/trunk/eo/PKGBUILD.cmake new file mode 100644 index 000000000..44f0b3687 --- /dev/null +++ b/trunk/eo/PKGBUILD.cmake @@ -0,0 +1,23 @@ +# $Id: pkgbuild-mode.el,v 1.23 2007/10/20 16:02:14 juergen Exp $ +# Maintainer: Caner Candan +pkgname=libeo +pkgver=@PROJECT_VERSION@ +pkgrel=1 +pkgdesc="Evolving Objects is a template-based, ANSI-C++ evolutionary computation library which helps you to write your own stochastic optimization algorithms insanely fast." +url="" +arch=('i686' 'x86_64') +license=('LGPL') +depends=() +makedepends=('make' 'cmake') +conflicts=() +replaces=() +backup=() +install= +source=($pkgname-$pkgver.tar.gz) +md5sums=() +build() { + cd $startdir/src/$pkgname-$pkgver + cmake -DCMAKE_INSTALL_PREFIX=/usr . + make || return 1 + make DESTDIR=$startdir/pkg install +} diff --git a/trunk/eo/Packaging.cmake b/trunk/eo/Packaging.cmake new file mode 100644 index 000000000..de81fadc3 --- /dev/null +++ b/trunk/eo/Packaging.cmake @@ -0,0 +1,84 @@ +###################################################################################### +### 1) Check dependencies +###################################################################################### + +IF (NOT DEFINED PROJECT_NAME OR + NOT DEFINED PROJECT_VERSION_MAJOR OR + NOT DEFINED PROJECT_VERSION_MINOR OR + NOT DEFINED PROJECT_VERSION_PATCH OR + NOT DEFINED PROJECT_VERSION) + MESSAGE(FATAL_ERROR "Be sure you have defined PROJECT_NAME and PROJECT_VERSION*.") +ENDIF() + +###################################################################################### + + +###################################################################################### +### 2) Set up components +###################################################################################### + +SET(CPACK_COMPONENTS_ALL libraries test examples) +SET(CPACK_ALL_INSTALL_TYPES Minimal Full) + +SET(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "${PACKAGE_NAME}") +SET(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "${PACKAGE_NAME} library") +SET(CPACK_COMPONENT_LIBRARIES_GROUP "Devel") +SET(CPACK_COMPONENT_LIBRARIES_INSTALL_TYPES Minimal Full) + +SET(CPACK_COMPONENT_TEST_DISPLAY_NAME "${PACKAGE_NAME}") +SET(CPACK_COMPONENT_TEST_DESCRIPTION "${PACKAGE_NAME} test") +SET(CPACK_COMPONENT_TEST_GROUP "Devel") +SET(CPACK_COMPONENT_TEST_INSTALL_TYPES Full) + +SET(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "${PACKAGE_NAME}") +SET(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "${PACKAGE_NAME} examples") +SET(CPACK_COMPONENT_EXAMPLES_GROUP "Devel") +SET(CPACK_COMPONENT_EXAMPLES_INSTALL_TYPES Full) + +###################################################################################### + + +###################################################################################### +### 3) Set up general information about packaging +###################################################################################### + +# For more details: http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack + +#cpack package information +SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") +SET(CPACK_PACKAGE_DESCRIPTION "${PACKAGE_NAME}") +SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PACKAGE_NAME}") +SET(CPACK_PACKAGE_VENDOR "${PACKAGE_NAME}") +SET(CPACK_PACKAGE_CONTACT "${PACKAGE_BUGREPORT}") +SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) +SET(CPACK_STRIP_FILES ${PROJECT_NAME}) +SET(CPACK_SOURCE_STRIP_FILES "bin/${PROJECT_NAME}") +SET(CPACK_PACKAGE_EXECUTABLES "${PROJECT_NAME}" "${PROJECT_NAME}") +SET(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") +SET(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}") +SET(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") +SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") + +###################################################################################### + + +###################################################################################### +### 4) Set up debian packaging information +###################################################################################### + +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libstdc++6, libgcc1, libc6, g++") + +SET(CPACK_DEBIAN_PACKAGE_SECTION "devel") +SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") + +###################################################################################### + + +###################################################################################### +### 5) And finally, include cpack, this is the last thing to do. +###################################################################################### + +INCLUDE(CPack) + +###################################################################################### diff --git a/trunk/eo/README b/trunk/eo/README new file mode 100644 index 000000000..d4268be0f --- /dev/null +++ b/trunk/eo/README @@ -0,0 +1,89 @@ + EO README FILE + +======================================================================= + check latest news at http://eodev.sourceforge.net/ +======================================================================= + +Welcome to EO, the Evolving Objects library. + +The latest news about EO can be found on the sourceforge repository at + http://eodev.sourceforge.net/ + +In case of any problem, please e-mail us at + eodev-main@lists.sourceforge.net + +To get started, take a look at the tutorial, starting with + ./tutorial/html/eoTutorial.html + +The easiest way to start programming a new genome with all EO +evolution engines handy is to create a new standalone EO project from +the tutorial/Templates/ directory. Read Lesson 5 of the tutorial for +an introduction ;) + + +================================================================== + BUILDING EO +================================================================== +The basic installation procedure goes the following: + +Go to the "eo/" and run one of the "build_*" script.  + +Using the "build_gcc_linux_release" script is generally what you want. The +binaries are then located in the "release/" directory. + +Now you should probably go to the tutorial and start learning about EO +features and programming. + +In case of problems or if you want advanced options, you can read the INSTALL file. + +=================================================================== + DIRECTORY STRUCTURE +=================================================================== +After unpacking the archive file, you should end up with the following +structure: + +.../ the MAIN EO dir, created when unpacking + | + +-- src SOURCE dir. Contains most EO .h files + | | + | +- utils general utilities (e.g. RNG-related source files) + | | + | +- ga bistring-genotypes source files + | | + | +- es real-valued-genotypes source files + | | + | +- gp Genetic Programming source files + | | + | +- obsolete files from old versions - for upward compatibility + | + | + | + +-- tutorial TUTORIAL dir (indeed :-) + | | + | +- html all html files - start by browsing index.html + | | + | +- LessonX for X=1, 2, 3, ... : example of increasing complexity + | + | + | + +-- doc DOCUMENTATION dir (generated by Doxygen) + | | + | +- html HTML files - start at index.html (see also tutorial) + | | + | +- latex latex files - use to generate Poatscript doc. + | | + | +- man Unix man format documentation + | + | + +-- test TEST files - for debugging purposes only + | + | + +-- app APPLICATIONS - one dir per separate application + | | + | +- gprop GA/backpropagation for neural nets + | | + | +- mastermind the wellknown MasterMind game + | + | + +-- win WINDOWS dir: project files for MS/VC5+ + diff --git a/trunk/eo/THANKS b/trunk/eo/THANKS new file mode 100644 index 000000000..e69de29bb diff --git a/trunk/eo/ToDo b/trunk/eo/ToDo new file mode 100644 index 000000000..f3da04f50 --- /dev/null +++ b/trunk/eo/ToDo @@ -0,0 +1,2 @@ +See the code-documentation for details. +General ToDos should be documented at the end of doc/index.h. diff --git a/trunk/paradiseo-peo/src/CMakeLists.txt b/trunk/eo/app/CMakeLists.txt similarity index 78% rename from trunk/paradiseo-peo/src/CMakeLists.txt rename to trunk/eo/app/CMakeLists.txt index 9752fb783..d13aac522 100644 --- a/trunk/paradiseo-peo/src/CMakeLists.txt +++ b/trunk/eo/app/CMakeLists.txt @@ -1,9 +1,8 @@ - ###################################################################################### ### 1) Where must cmake go now ? ###################################################################################### -ADD_SUBDIRECTORY(core) -ADD_SUBDIRECTORY(rmc) - +#ADD_SUBDIRECTORY(gprop) +#ADD_SUBDIRECTORY(gpsymreg) +ADD_SUBDIRECTORY(mastermind) ###################################################################################### diff --git a/trunk/eo/app/gprop/CMakeLists.txt b/trunk/eo/app/gprop/CMakeLists.txt new file mode 100644 index 000000000..e37af2e5f --- /dev/null +++ b/trunk/eo/app/gprop/CMakeLists.txt @@ -0,0 +1,31 @@ +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SOURCE_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) + +###################################################################################### +### 3) Define your target(s): just an executable here +###################################################################################### + +SET (GPROP_SOURCES gprop.cpp) + +# especially for Visual Studio +IF(NOT WIN32 OR CYGWIN) + ADD_EXECUTABLE(gprop ${GPROP_SOURCES}) + ADD_DEPENDENCIES(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) + +###################################################################################### diff --git a/trunk/eo/app/gprop/gprop.cpp b/trunk/eo/app/gprop/gprop.cpp new file mode 100644 index 000000000..3c8d17c44 --- /dev/null +++ b/trunk/eo/app/gprop/gprop.cpp @@ -0,0 +1,171 @@ +//----------------------------------------------------------------------------- +// gprop +//----------------------------------------------------------------------------- + +#include // EXIT_SUCCESS EXIT_FAILURE +#include // exception +#include // cerr cout +#include // ifstream +#include // string +#include // all usefull eo stuff +#include "gprop.h" // Chrom eoChromInit eoChromMutation eoChromXover eoChromEvaluator + +using namespace std; + +//----------------------------------------------------------------------------- +// global variables +//----------------------------------------------------------------------------- + +unsigned in, out, hidden; +mlp::set train, validate, test; + +//----------------------------------------------------------------------------- +// parameters +//----------------------------------------------------------------------------- + +eoValueParam pop_size(10, "pop_size", "population size", 'p'); +eoValueParam generations(10, "generations", "number of generation", 'g'); +eoValueParam mut_rate(0.25, "mut_rate", "mutation rate", 'm'); +eoValueParam xover_rate(0.25, "xover_rate", "default crossover rate", 'x'); +eoValueParam file("", "file", "common start of patterns filenames *.trn *.val and *.tst", 'f'); +eoValueParam hiddenp(0, "hidden", "number of neurons in hidden layer", 'd'); + +//----------------------------------------------------------------------------- +// auxiliar functions +//----------------------------------------------------------------------------- + +void arg(int argc, char** argv); +void load_file(mlp::set& s1, const string& s2); +void ga(); + +//----------------------------------------------------------------------------- +// main +//----------------------------------------------------------------------------- + +int main(int argc, char** argv) +{ + try + { + arg(argc, argv); + ga(); + } + catch (exception& e) + { + cerr << argv[0] << ": " << e.what() << endl; + exit(EXIT_FAILURE); + } + + return 0; +} + +//----------------------------------------------------------------------------- +// implementation +//----------------------------------------------------------------------------- + +void arg(int argc, char** argv) +{ + eoParser parser(argc, argv); + + parser.processParam(pop_size, "genetic operators"); + parser.processParam(generations, "genetic operators"); + parser.processParam(mut_rate, "genetic operators"); + parser.processParam(xover_rate, "genetic operators"); + parser.processParam(file, "files"); + parser.processParam(hiddenp, "genetic operators"); + + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + exit(EXIT_SUCCESS); + } + + load_file(train, "trn"); + load_file(validate, "val"); + load_file(test, "tst"); + + phenotype::trn_max = train.size(); + phenotype::val_max = validate.size(); + phenotype::tst_max = test.size(); + + in = train.front().input.size(); + out = train.front().output.size(); + gprop_use_datasets(&train, &validate, &test); + hidden = hiddenp.value(); +} + +//----------------------------------------------------------------------------- + +void load_file(mlp::set& set, const string& ext) +{ + string filename = file.value(); filename += "." + ext; + + ifstream ifs(filename.c_str()); + if (!ifs) + { + cerr << "can't open file \"" << filename << "\"" << endl; + exit(EXIT_FAILURE); + } + + ifs >> set; + + if (set.size() == 0) + { + cerr << filename << " data file is empty!"; + exit(EXIT_FAILURE); + } +} + +//----------------------------------------------------------------------------- + +void ga() +{ + // create population + eoInitChrom init; + eoPop pop(pop_size.value(), init); + + // evaluate population + eoEvalFuncPtr evaluator(eoChromEvaluator); + apply(evaluator, pop); + + // selector + eoStochTournamentSelect select; + + // genetic operators + eoChromMutation mutation; + eoChromXover xover; + + // stop condition + eoGenContinue continuator1(generations.value()); + phenotype p; p.val_ok = validate.size() - 1; p.mse_error = 0; + eoFitContinue continuator2(p); + eoCombinedContinue continuator(continuator1, continuator2); + + // checkpoint + eoCheckPoint checkpoint(continuator); + + // monitor + eoStdoutMonitor monitor; + checkpoint.add(monitor); + + // statistics + eoBestFitnessStat stats; + checkpoint.add(stats); + monitor.add(stats); + + // genetic algorithm + eoSGA sga(select, + xover, xover_rate.value(), + mutation, mut_rate.value(), + evaluator, + checkpoint); + + sga(pop); + + cout << "best: " << *max_element(pop.begin(), pop.end()) << endl; +} + +//----------------------------------------------------------------------------- + +// Local Variables: +// mode:C++ +// End: diff --git a/trunk/eo/app/gprop/gprop.h b/trunk/eo/app/gprop/gprop.h new file mode 100644 index 000000000..db67c1885 --- /dev/null +++ b/trunk/eo/app/gprop/gprop.h @@ -0,0 +1,239 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// gprop.h +// (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + + +#ifndef gprop_h +#define gprop_h + +//----------------------------------------------------------------------------- + +#include // istream ostream +#include // setprecision +#include // string +#include // EO +#include // eoMonOp eoQuadraticOp +#include // eoInit +#include // normal_generator +#include "mlp.h" // mlp::net mlp::set +#include "qp.h" // qp::set +#include "mse.h" // mse::error + +//----------------------------------------------------------------------------- +// phenotype +//----------------------------------------------------------------------------- + +struct phenotype +{ + int trn_ok, val_ok, tst_ok; + double mse_error; + + static int trn_max, val_max, tst_max; + + friend bool operator<(const phenotype& a, const phenotype& b) + { + return (a.val_ok < b.val_ok) || ((!(b.val_ok < a.val_ok)) && (b.mse_error < a.mse_error)); + } + + friend bool operator==(const phenotype& a, const phenotype& b) + { + return (a.val_ok == b.val_ok) && (b.mse_error == a.mse_error); + } + + friend bool operator>=(const phenotype& a, const phenotype& b) + { + return !(a < b); + } + + friend bool operator>(const phenotype& a, const phenotype& b) + { + return (!(a == b)) && (!(a < b)); + } + + + + friend std::ostream& operator<<(std::ostream& os, const phenotype& p) + { + return os << p.trn_ok << "/" << p.trn_max << " " + << p.val_ok << "/" << p.val_max << " " + << p.tst_ok << "/" << p.tst_max << " " + << p.mse_error; + } + + friend std::istream& operator>>(std::istream& is, phenotype& p) + { + return is; // complete me + } +}; + + +int phenotype::trn_max = 0, phenotype::val_max = 0, phenotype::tst_max = 0; + +//----------------------------------------------------------------------------- +// genotype +//----------------------------------------------------------------------------- +#ifndef GPROP_GENOTYPE +#define GPROP_GENOTYPE mlp::net +#endif + +typedef GPROP_GENOTYPE genotype; + +//----------------------------------------------------------------------------- +// Chrom +//----------------------------------------------------------------------------- + +extern unsigned in, out, hidden; + +class Chrom: public EO, public genotype +{ +public: + Chrom(): genotype(in, out, std::vector(hidden < 1 ? 0 : 1, hidden)) {} + + std::string className() const { return "Chrom"; } + + void printOn (std::ostream& os) const + { + os << std::setprecision(3) << static_cast(*this) << " \t" + << fitness(); + // os << fitness(); + } + + void readFrom (std::istream& is) + { + invalidate(); // complete me + } +}; + +//----------------------------------------------------------------------------- +// eoChromInit +//----------------------------------------------------------------------------- + +class eoInitChrom: public eoInit +{ +public: + void operator()(Chrom& chrom) + { + chrom.reset(); + chrom.invalidate(); + } +}; + +//----------------------------------------------------------------------------- +// global variables +//----------------------------------------------------------------------------- + +mlp::set *trn_set = 0, *val_set = 0, *tst_set = 0; + +void gprop_use_datasets(mlp::set *trn, mlp::set *val, mlp::set *tst) { + trn_set = trn; + val_set = val; + tst_set = tst; +} + +void ensure_datasets_initialized() { + if (!trn_set) { + std::cerr << "trn_set is not initialized. Must call gprop_use_datasets before training\n"; + std::cerr.flush(); + abort(); + } +} + +//----------------------------------------------------------------------------- +// eoChromMutation +//----------------------------------------------------------------------------- + +class eoChromMutation: public eoMonOp +{ +public: + bool operator()(Chrom& chrom) + { + mse::net tmp(chrom); + tmp.train(*trn_set, 10, 0, 0.001); + return true; + } +}; + +//----------------------------------------------------------------------------- +// eoChromXover +//----------------------------------------------------------------------------- + +class eoChromXover: public eoQuadOp +{ +public: + bool operator()(Chrom& chrom1, Chrom& chrom2) + { + chrom1.normalize(); + chrom2.desaturate(); + + mse::net tmp1(chrom1), tmp2(chrom2); + ensure_datasets_initialized(); + tmp1.train(*trn_set, 100, 0, 0.001); + tmp2.train(*trn_set, 100, 0, 0.001); + + return true; + } +}; + +//----------------------------------------------------------------------------- +// eoChromEvaluator +//----------------------------------------------------------------------------- + +int correct(const mlp::net& net, const mlp::set& set) +{ + int sum = 0; + + for (mlp::set::const_iterator s = set.begin(); s != set.end(); ++s) + { + unsigned partial = 0; + + for (unsigned i = 0; i < s->output.size(); ++i) + if ((s->output[i] < 0.5 && net(s->input)[i] < 0.5) || + (s->output[i] > 0.5 && net(s->input)[i] > 0.5)) + ++partial; + + if (partial == s->output.size()) + ++sum; + } + + return sum; +} + +phenotype eoChromEvaluator(const Chrom& chrom) +{ + phenotype p; + ensure_datasets_initialized(); + p.trn_ok = correct(chrom, *trn_set); + p.val_ok = correct(chrom, *val_set); + p.tst_ok = correct(chrom, *tst_set); + p.mse_error = mse::error(chrom, *val_set); + + return p; +} + +//----------------------------------------------------------------------------- + +#endif // gprop_h + +// Local Variables: +// mode:C++ +// End: diff --git a/trunk/eo/app/gprop/l2.h b/trunk/eo/app/gprop/l2.h new file mode 100644 index 000000000..cff4a67c3 --- /dev/null +++ b/trunk/eo/app/gprop/l2.h @@ -0,0 +1,140 @@ +//----------------------------------------------------------------------------- +// l2.h +//----------------------------------------------------------------------------- + +#ifndef l2_h +#define l2_h + +//----------------------------------------------------------------------------- + +#include // log +#include // neuron layer net set + +//----------------------------------------------------------------------------- + +namespace l2 +{ + //--------------------------------------------------------------------------- + // useful typedefs + //--------------------------------------------------------------------------- + + using qp::real; + using qp::vector; + using qp::max_real; + using qp::min_real; + using qp::set; + using qp::neuron; + using qp::layer; + + //--------------------------------------------------------------------------- + // error + //--------------------------------------------------------------------------- + + real error(const mlp::net& net, const set& ts) + { + real error_ = 0.0; + + for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) + { + vector out = net(s->input); + + for (unsigned i = 0; i < out.size(); ++i) + { + real target = s->output[i]; + real value = out[i]; + error_ -= target * log(value + min_real) + + (1.0 - target) * log(1.0 - value + min_real); + } + } + + return error_; + } + + //------------------------------------------------------------------------- + // l2 + //------------------------------------------------------------------------- + + class net: public qp::net + { + public: + net(mlp::net& n): qp::net(n) {} + + real error(const set& ts) + { + real error_ = 0; + + for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) + { + forward(s->input); + error_ -= backward(s->input, s->output); + } + + return error_; + } + + private: + real backward(const vector& input, const vector& output) + { + reverse_iterator current_layer = rbegin(); + reverse_iterator backward_layer = current_layer + 1; + real error_ = 0; + + // output layer + for (unsigned j = 0; j < current_layer->size(); ++j) + { + neuron& n = (*current_layer)[j]; + real out = output[j]; + n.ndelta += n.delta = (out - n.out) / + (n.out * (1.0 - n.out) + min_real) * n.out * (1.0 - n.out); + + if (size() == 1) // monolayer + n.dxo += n.delta * input; + else // multilayer + for (unsigned k = 0; k < n.dxo.size(); ++k) + n.dxo[k] += n.delta * (*backward_layer)[k].out; + + error_ += out * log(n.out + min_real) + + (1.0 - out) * log(1.0 - n.out + min_real); + } + + // hidden layers + while (++current_layer != rend()) + { + reverse_iterator forward_layer = current_layer - 1; + reverse_iterator backward_layer = current_layer + 1; + + for (unsigned j = 0; j < current_layer->size(); ++j) + { + neuron& n = (*current_layer)[j]; + real sum = 0; + for (unsigned k = 0; k < forward_layer->size(); ++k) + { + neuron& nf = (*forward_layer)[k]; + sum += nf.delta * (nf.n->weight[j] + nf.dweight1[j]); + } + n.delta = n.out * (1.0 - n.out) * sum; + n.ndelta += n.delta; + + if (backward_layer == rend()) // first hidden layer + n.dxo += n.delta * input; + else // rest of hidden layers + for (unsigned k = 0; k < n.dxo.size(); ++k) + n.dxo[k] += n.delta * (*backward_layer)[k].out; + } + } + + return error_; + } + }; + + //--------------------------------------------------------------------------- + +} // namespace l2 + +//----------------------------------------------------------------------------- + +#endif // l2_h + +// Local Variables: +// mode:C++ +// End: diff --git a/trunk/eo/app/gprop/mlp.h b/trunk/eo/app/gprop/mlp.h new file mode 100644 index 000000000..c7c612826 --- /dev/null +++ b/trunk/eo/app/gprop/mlp.h @@ -0,0 +1,513 @@ +//----------------------------------------------------------------------------- +// mlp.h +//----------------------------------------------------------------------------- + +#ifndef mlp_h +#define mlp_h + +#include // generate +#include // exp +#include +#include +#include +#include // invalid_argument +#include +#include +#include // eoRng +#include // normal_generator +#include // * + +#include +#include + +#ifdef HAVE_LIBYAML_CPP +#include +#endif // HAVE_LIBYAML_CPP + + +namespace mlp +{ + using namespace std; + + typedef double real; + typedef std::vector vector; +} + + +namespace std { + ostream& operator<<(ostream& os, const mlp::vector& v) + { + ostream_iterator oi(os, " "); + copy(v.begin(), v.end(), oi); + return os; + } + + istream& operator>>(istream& is, mlp::vector& v) + { + for (mlp::vector::iterator vi = v.begin() ; vi != v.end() ; vi++) { + is >> *vi; + } + return is; + } +} + +namespace mlp +{ + using namespace std; + + //--------------------------------------------------------------------------- + // useful typedefs + //--------------------------------------------------------------------------- + + + const real max_real = std::numeric_limits::max(); + const real min_real = std::numeric_limits::min(); + + + //--------------------------------------------------------------------------- + // sigmoid + //--------------------------------------------------------------------------- + + real sigmoid(const real& x) + { + return 1.0 / (1.0 + exp(-x)); + } + + + //--------------------------------------------------------------------------- + // neuron + //--------------------------------------------------------------------------- + + struct neuron + { + real bias; + vector weight; + + neuron(const unsigned& num_inputs = 0): weight(num_inputs) {} + + void reset() + { + normal_generator rnd(1.0); + bias = rnd(); + generate(weight.begin(), weight.end(), rnd); + } + + real operator()(const vector& input) const + { + return sigmoid(bias + weight * input); + } + + unsigned length() const { return weight.size() + 1; } + + void normalize() + { + real n = sqrt(bias * bias + weight * weight); + bias /= n; + weight /= n; + } + + void desaturate() + { + bias = -5.0 + 10.0 / (1.0 + exp(bias / -5.0)); + + for (vector::iterator w = weight.begin(); w != weight.end(); ++w) + *w = -5.0 + 10.0 / (1.0 + exp(*w / -5.0)); + } + + void perturb_num(double &num, double magnitude) { + double scale = max(num, 0.05) * magnitude; + double perturbation = scale * (rng.uniform() - 0.5); + num += perturbation; + } + + void perturb(double magnitude = 0.3, double probability = 1.0) + { + + for (vector::iterator w = weight.begin(); w != weight.end(); ++w) + if ( probability >= 1.0 || rng.uniform() < probability) + perturb_num(*w, magnitude); + if ( probability >= 1.0 || rng.uniform() < probability) + perturb_num(bias, magnitude); + } + + #ifdef HAVE_LIBYAML_CPP + YAML_SERIALIZABLE_AUTO(neuron) + void emit_yaml(YAML::Emitter&out) const { + out << YAML::BeginMap; + out << YAML::Key << "Class" << YAML::Value << "mlp::neuron"; + YAML_EMIT_MEMBER(out,bias); + YAML_EMIT_MEMBER(out,weight); + out << YAML::EndMap; + } + void load_yaml(const YAML::Node& node) { + YAML_LOAD_MEMBER(node, bias); + YAML_LOAD_MEMBER(node, weight); + } + #endif + }; +} + +namespace std { + + ostream& operator<<(ostream& os, const mlp::neuron& n) + { + return os << n.bias << " " << n.weight; + } + + istream& operator>>(istream& is, mlp::neuron& n) + { + return is >> n.bias >> n.weight; + } + + +} + + +namespace mlp { + + //--------------------------------------------------------------------------- + // layer + //--------------------------------------------------------------------------- + + class layer: public std::vector + { + public: + layer(const unsigned& num_inputs = 0, const unsigned& num_neurons = 0): + std::vector(num_neurons, neuron(num_inputs)) {} + + void reset() + { + normal_generator rnd(1.0); + for(iterator n = begin(); n != end(); ++n) + n->reset(); + } + + vector operator()(const vector& input) const + { + vector output(size()); + + for(unsigned i = 0; i < output.size(); ++i) + output[i] = (*this)[i](input); + + return output; + } + + unsigned length() const { return front().length() * size(); } + + void normalize() + { + for(iterator n = begin(); n != end(); ++n) + n->normalize(); + } + + void desaturate() + { + for(iterator n = begin(); n != end(); ++n) + n->desaturate(); + } + + void perturb(double magnitude = 0.3, double probability = 1.0) + { + for(iterator n = begin(); n != end(); ++n) + n->perturb(); + } + #ifdef HAVE_LIBYAML_CPP + friend ostream& operator<<(YAML::Emitter& e, const layer &l) { + e << ((std::vector)l); + } + + friend void operator>>(const YAML::Node& n, layer &l) { + // These temporary variable shenanegins are necessary because + // the compiler gets very confused about which template operator>> + // function to use. + // The following does not work: n >> l; + // So we use a temporary variable thusly: + std::vector *obviously_a_vector = &l; + n >> *obviously_a_vector; + } + #endif + + }; + +} + +namespace std { + + ostream& operator<<(ostream& os, const mlp::layer& l) + { + ostream_iterator oi(os, " "); + copy(l.begin(), l.end(), oi); + return os; + } + + istream& operator>>(istream& is, mlp::layer& l) + { + for (mlp::layer::iterator li = l.begin() ; li != l.end() ; li++) { + is >> *li; + } + return is; + } + +} + +namespace mlp { + + + //--------------------------------------------------------------------------- + // net + //--------------------------------------------------------------------------- + + class net: public std::vector + #ifdef HAVE_LIBYAML_CPP + , public YAML::Serializable + #endif + { + public: + net(const unsigned& num_inputs = 0, + const unsigned& num_outputs = 0, + const std::vector& hidden = std::vector()) + { + init(num_inputs,num_outputs,hidden); + } + + + net(istream &is) { + load(is); + } + #ifdef HAVE_LIBYAML_CPP + YAML_SERIALIZABLE_AUTO(net) + void emit_members(YAML::Emitter&out) const { + const std::vector* me_as_layer_vector = this; + out << YAML::Key << "layers" << YAML::Value << *me_as_layer_vector; + } + + void load_members(const YAML::Node& node) { + std::vector* me_as_layer_vector = this; + node["layers"] >> *me_as_layer_vector; + } + #endif // HAVE_LIBYAML_CPP + + /** Virtual destructor */ + virtual ~net() {}; + + void load(istream &is) { + unsigned num_inputs; + unsigned num_outputs; + unsigned num_hidden_layers; + + is >> num_inputs >> num_outputs >> num_hidden_layers; + + std::vector layer_sizes; + for (unsigned i=0; i> layer_size; + layer_sizes.push_back(layer_size); + } + unsigned check_outputs; + is >> check_outputs; + assert (check_outputs == num_outputs); + init (num_inputs,num_outputs,layer_sizes); + // skip forward to pass up opening '<' char + char c=' '; + while (c!='<' && !is.eof()) { is >> c;} + for (iterator l =begin() ; l != end(); l++) { + is >> *l; + } + do { is >> c; } while (c == ' ' && !is.eof()); + assert(c == '>'); + } + + void init( unsigned num_inputs, + unsigned num_outputs, + const std::vector& hidden ) { + clear(); + switch(hidden.size()) + { + case 0: + push_back(layer(num_inputs, num_outputs)); + break; + default: + push_back(layer(num_inputs, hidden.front())); + for (unsigned i = 0; i < hidden.size() - 1; ++i) + push_back(layer(hidden[i], hidden[i + 1])); + push_back(layer(hidden.back(), num_outputs)); + break; + } + } + + void reset() + { + normal_generator rnd(1.0); + for(iterator l = begin(); l != end(); ++l) + l->reset(); + } + + virtual vector operator()(const vector& input) const ; + + unsigned winner(const vector& input) const + { + vector tmp = (*this)(input); + return (max_element(tmp.begin(), tmp.end()) - tmp.begin()); + } + + void save(ostream &os) const { + // Save the number of inputs, number of outputs, and number of hidden layers + os << num_inputs() << "\n" << num_outputs() << "\n" << num_hidden_layers() << "\n"; + for(const_iterator l = begin(); l != end(); ++l) + os << l->size() << " "; + os << "\n"; + os << "< "; + for(const_iterator l = begin(); l != end(); ++l) + os << *l << " "; + os << ">\n"; + } + + + unsigned num_inputs() const { return front().front().length() - 1; } + unsigned num_outputs() const { return back().size(); } + unsigned num_hidden_layers() const { + signed s = (signed) size() -1; + return (s<0) ? 0 : s ; + } + + + unsigned length() + { + unsigned sum = 0; + + for(iterator l = begin(); l != end(); ++l) + sum += l->length(); + + return sum; + } + + void normalize() + { + for(iterator l = begin(); l != end(); ++l) + l->normalize(); + } + + void desaturate() + { + for(iterator l = begin(); l != end(); ++l) + l->desaturate(); + } + + void perturb(double magnitude = 0.3, double probability = 1.0) + { + for(iterator l = begin(); l != end(); ++l) + l->perturb(); + } + }; + +#ifndef NO_MLP_VIRTUALS + vector net::operator()(const vector& input) const + { + vector tmp = input; + + for(const_iterator l = begin(); l != end(); ++l) + tmp = (*l)(tmp); + + return tmp; + } +#endif + + + //--------------------------------------------------------------------------- + // sample + //--------------------------------------------------------------------------- + + struct sample + { + vector input, output; + + sample(unsigned input_size = 0, unsigned output_size = 0): + input(input_size), output(output_size) {} + }; + + istream& operator>>(istream& is, sample& s) + { + return is >> s.input >> s.output; + } + + ostream& operator<<(ostream& os, const sample& s) + { + return os << s.input << " " << s.output; + } + + + //--------------------------------------------------------------------------- + // set + //--------------------------------------------------------------------------- + + class set: public std::vector + { + public: + set(unsigned input_size = 0, unsigned output_size = 0, + unsigned num_samples = 0): + std::vector(num_samples, sample(input_size, output_size)) {} + + set(istream& is) : std::vector(0, sample(0, 0)) { + clear(); + load(is); + } + + void load(istream &is) { + unsigned input_size, output_size; + is >> input_size >> output_size; + sample samp(input_size, output_size);; + while (is >> samp) { push_back(samp); } + } + + void save(ostream &os) const { + os << front().input.size() << " " << front().output.size() << endl; + copy(begin(), end(), ostream_iterator(os,"\n")); + } + }; + + ostream& operator<<(ostream& os, const set& s) + { + os << "<" << endl; + for (unsigned i = 0; i < s.size(); ++i) + os << s[i] << endl; + return os << ">"; + } + + //--------------------------------------------------------------------------- + // euclidean_distance + //--------------------------------------------------------------------------- + + real euclidean_distance(const net& n1, const net& n2) + { + real sum = 0; + + for(net::const_reverse_iterator l1 = n1.rbegin(), l2 = n2.rbegin(); + l1 != n1.rend() && l2 != n2.rend(); ++l1, ++l2) + for(layer::const_iterator n1 = l1->begin(), n2 = l2->begin(); + n1 != l1->end() && n2 != l2->end(); ++n1, ++n2) + { + real b = n1->bias - n2->bias; + vector w = n1->weight - n2->weight; + sum += b * b + w * w; + } + /* + #include + std::ofstream file("dist.stat", ios::app); + file << sqrt(sum) << endl; + */ + return sqrt(sum); + } + + //--------------------------------------------------------------------------- + +} // namespace mlp + + + +#endif // mlp_h + + +// Local Variables: +// mode:C++ +// c-file-style: "Stroustrup" +// End: diff --git a/trunk/eo/app/gprop/mse.h b/trunk/eo/app/gprop/mse.h new file mode 100644 index 000000000..3fb62fa09 --- /dev/null +++ b/trunk/eo/app/gprop/mse.h @@ -0,0 +1,140 @@ +//----------------------------------------------------------------------------- +// mse.h +//----------------------------------------------------------------------------- + +#ifndef mse_h +#define mse_h + +//----------------------------------------------------------------------------- + +#include // neuron layer net set + +//----------------------------------------------------------------------------- + +namespace mse +{ + //--------------------------------------------------------------------------- + // useful typedefs + //--------------------------------------------------------------------------- + + using qp::real; + using qp::vector; + using qp::max_real; + using qp::min_real; + using qp::set; + using qp::neuron; + using qp::layer; + + //--------------------------------------------------------------------------- + // error + //--------------------------------------------------------------------------- + + real error(const mlp::net& net, const set& ts) + { + real error_ = 0.0; + + for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) + { + vector out = net(s->input); + + for (unsigned i = 0; i < out.size(); ++i) + { + real diff = s->output[i] - out[i]; + error_ += diff * diff; + } + } + + return error_ / ts.size(); + } + //------------------------------------------------------------------------- + // mse + //------------------------------------------------------------------------- + + class net: public qp::net + { + public: + net(mlp::net& n): qp::net(n) {} + + real error(const set& ts) + { + real error_ = 0; + + for (set::const_iterator s = ts.begin(); s != ts.end(); ++s) + { + forward(s->input); + error_ += backward(s->input, s->output); + } + error_ /= ts.size(); + + return error_; + } + + private: + real backward(const vector& input, const vector& output) + { + reverse_iterator current_layer = rbegin(); + reverse_iterator backward_layer = current_layer + 1; + real error_ = 0; + + // output layer + for (unsigned j = 0; j < current_layer->size(); ++j) + { + neuron& n = (*current_layer)[j]; + + real diff = output[j] - n.out; + n.ndelta += n.delta = diff * n.out * (1.0 - n.out); + + if (size() == 1) // monolayer + n.dxo += n.delta * input; + else // multilayer + for (unsigned k = 0; k < n.dxo.size(); ++k) + n.dxo[k] += n.delta * (*backward_layer)[k].out; + + error_ += diff * diff; + } + + // hidden layers + while (++current_layer != rend()) + { + reverse_iterator forward_layer = current_layer - 1; + reverse_iterator backward_layer = current_layer + 1; + + for (unsigned j = 0; j < current_layer->size(); ++j) + { + + neuron& n = (*current_layer)[j]; + real sum = 0; + + for (unsigned k = 0; k < forward_layer->size(); ++k) + { + neuron& nf = (*forward_layer)[k]; + sum += nf.delta * (nf.n->weight[j] + nf.dweight1[j]); + } + + n.delta = n.out * (1.0 - n.out) * sum; + n.ndelta += n.delta; + + + if (backward_layer == rend()) // first hidden layer + n.dxo += n.delta * input; + else // rest of hidden layers + for (unsigned k = 0; k < n.dxo.size(); ++k) + n.dxo[k] += n.delta * (*backward_layer)[k].out; + } + } + + return error_; + } + }; + + //--------------------------------------------------------------------------- + +} // namespace mse + +//----------------------------------------------------------------------------- + +#endif // mse_h + +// Local Variables: +// mode:C++ +// End: diff --git a/trunk/eo/app/gprop/qp.h b/trunk/eo/app/gprop/qp.h new file mode 100644 index 000000000..fb9836759 --- /dev/null +++ b/trunk/eo/app/gprop/qp.h @@ -0,0 +1,251 @@ +//----------------------------------------------------------------------------- +// qp.h +//----------------------------------------------------------------------------- + +#ifndef qp_h +#define qp_h + +//----------------------------------------------------------------------------- + +#include // istream ostream +#include // fill +#include // vector +#include // uniform_generator +#include // neuron layer net + +//----------------------------------------------------------------------------- + +namespace qp +{ + //--------------------------------------------------------------------------- + // useful typedefs + //--------------------------------------------------------------------------- + + using mlp::real; + using mlp::vector; + + using mlp::max_real; + using mlp::min_real; + + using mlp::set; + + //--------------------------------------------------------------------------- + // useful constants + //--------------------------------------------------------------------------- + + const real eta_default = 0.5; + const real eta_floor = 0.0001; + const real alpha_default = 0.9; + const real lambda_default = 0.5; + const real lambda0 = 0.1; + const real backtrack_step = 0.5; + const real me_floor = 0.0001; + const real mw_floor = 0.0001; + + + //--------------------------------------------------------------------------- + // neuron + //--------------------------------------------------------------------------- + + struct neuron + { + mlp::neuron* n; + real out, delta, ndelta, dbias1, dbias2; + vector dweight1, dweight2, dxo; + + neuron(mlp::neuron& _n): + n(&_n), out(0), delta(0), ndelta(0), dbias1(0), dbias2(0), + dweight1(n->weight.size(), 0), + dweight2(n->weight.size(), 0), + dxo(n->weight.size(), 0) {} + + void reset() + { + // underlaying neuron + n->reset(); + + // addons + out = delta = ndelta = dbias1 = dbias2 = 0; + fill(dweight1.begin(), dweight1.end(), 0); + fill(dweight2.begin(), dweight2.end(), 0); + fill(dxo.begin(), dxo.end(), 0); + } + + real operator()(const vector& input) + { + return out = mlp::sigmoid(n->bias + dbias1 + + (n->weight + dweight1) * input); + } + }; + + std::ostream& operator<<(std::ostream& os, const neuron& n) + { + return os << *n.n << " " << n.out << " " << n.delta << " " + << n.ndelta << " " << n.dbias1 << " " << n.dbias2 << " " + << n.dweight1 << " " << n.dweight2 << " " << n.dxo; + } + + + //--------------------------------------------------------------------------- + // layer + //--------------------------------------------------------------------------- + + class layer: public std::vector + { + public: + layer(mlp::layer& l)//: std::vector(l.begin(), l.end()) {} + { + for (mlp::layer::iterator n = l.begin(); n != l.end(); ++n) + push_back(neuron(*n)); + } + + void reset() + { + for(iterator n = begin(); n != end(); ++n) + n->reset(); + } + + vector operator()(const vector& input) + { + vector output(size()); + + for(unsigned i = 0; i < output.size(); ++i) + output[i] = (*this)[i](input); + + return output; + } + }; + + + //--------------------------------------------------------------------------- + // net + //--------------------------------------------------------------------------- + + class net: public std::vector + { + public: + net(mlp::net& n) //: std::vector(n.begin(), n.end()) { reset(); } + { + for (mlp::net::iterator l = n.begin(); l != n.end(); ++l) + push_back(*l); + } + + virtual ~net() {} + + void reset() + { + for(iterator l = begin(); l != end(); ++l) + l->reset(); + } + + real train(const set& ts, + unsigned epochs, + real target_error, + real tolerance, + real eta = eta_default, + real momentum = alpha_default, + real lambda = lambda_default) + { + real error_ = max_real; + + while (epochs-- && error_ > target_error) + { + real last_error = error_; + + init_delta(); + + error_ = error(ts); + + if (error_ < last_error + tolerance) + { + coeff_adapt(eta, momentum, lambda); + weight_update(ts.size(), true, eta, momentum); + } + else + { + eta *= backtrack_step; + eta = std::max(eta, eta_floor); + momentum = eta * lambda; + weight_update(ts.size(), false, eta, momentum); + error_ = last_error; + } + } + + return error_; + } + + virtual real error(const set& ts) = 0; + + // protected: + void forward(vector input) + { + for (iterator l = begin(); l != end(); ++l) + { + vector tmp = (*l)(input); + input.swap(tmp); + } + } + + // private: + void init_delta() + { + for (iterator l = begin(); l != end(); ++l) + for (layer::iterator n = l->begin(); n != l->end(); ++n) + fill(n->dxo.begin(), n->dxo.end(), n->ndelta = 0.0); + } + + void coeff_adapt(real& eta, real& momentum, real& lambda) + { + real me = 0, mw = 0, ew = 0; + + for (iterator l = begin(); l != end(); ++l) + for (layer::iterator n = l->begin(); n != l->end(); ++n) + { + me += n->dxo * n->dxo; + mw += n->dweight1 * n->dweight1; + ew += n->dxo * n->dweight1; + } + + me = std::max(static_cast(sqrt(me)), me_floor); + mw = std::max(static_cast(sqrt(mw)), mw_floor); + eta *= (1.0 + 0.5 * ew / ( me * mw)); + eta = std::max(eta, eta_floor); + lambda = lambda0 * me / mw; + momentum = eta * lambda; +#ifdef DEBUG + std::cout << me << " \t" << mw << " \t" << ew << " \t" + << eta << " \t" << momentum << " \t" << lambda << std::endl; +#endif // DEBUG + } + + void weight_update(unsigned size, bool fire, real eta, real momentum) + { + for (iterator l = begin(); l != end(); ++l) + for (layer::iterator n = l->begin(); n != l->end(); ++n) + { + n->ndelta /= size; + n->dxo /= size; + if (fire) + { + n->n->weight += n->dweight1; + n->dweight2 = n->dweight1; + n->n->bias += n->dbias1; + n->dbias2 = n->dbias1; + } + n->dweight1 = eta * n->dxo + momentum * n->dweight2; + n->dbias1 = eta * n->ndelta + momentum * n->dbias2; + } + } + }; + + //--------------------------------------------------------------------------- + +} // namespace qp + +//----------------------------------------------------------------------------- + +#endif // qp_h + +// Local Variables: +// mode:C++ +// End: diff --git a/trunk/eo/app/gprop/vecop.h b/trunk/eo/app/gprop/vecop.h new file mode 100644 index 000000000..dd4a23a8a --- /dev/null +++ b/trunk/eo/app/gprop/vecop.h @@ -0,0 +1,213 @@ +//----------------------------------------------------------------------------- +// vecop.h +//----------------------------------------------------------------------------- + +#ifndef VECOP_H +#define VECOP_H + +//----------------------------------------------------------------------------- + +#include // ostream istream +#include // vector +#include // plus minus multiplies divides +#include // inner_product + +//----------------------------------------------------------------------------- +// std::vector + std::vector +//----------------------------------------------------------------------------- + +template std::vector operator+(const std::vector& v1, const std::vector& v2) +{ + std::vector tmp = v1; + std::transform(tmp.begin(), tmp.end(), v2.begin(), tmp.begin(), std::plus()); + return tmp; +} + +template std::vector operator-(const std::vector& v1, const std::vector& v2) +{ + std::vector tmp = v1; + std::transform(tmp.begin(), tmp.end(), v2.begin(), tmp.begin(), std::minus()); + return tmp; +} + +template T operator*(const std::vector& v1, const std::vector& v2) +{ + return inner_product(v1.begin(), v1.end(), v2.begin(), static_cast(0)); +} + +template T operator/(const std::vector& v1, const std::vector& v2) +{ + return inner_product(v1.begin(), v1.end(), v2.begin(), static_cast(0), + std::plus(), std::divides()); +} + +//----------------------------------------------------------------------------- +// std::vector += std::vector +//----------------------------------------------------------------------------- + +template std::vector& operator+=(std::vector& v1, const std::vector& v2) +{ + std::transform(v1.begin(), v1.end(), v2.begin(), v1.begin(), std::plus()); + return v1; +} + +template std::vector& operator-=(std::vector& v1, const std::vector& v2) +{ + std::transform(v1.begin(), v1.end(), v2.begin(), v1.begin(), std::minus()); + return v1; +} + +//----------------------------------------------------------------------------- +// std::vector + number +//----------------------------------------------------------------------------- + +template std::vector operator+(const std::vector& a, const B& b) +{ + std::vector tmp = a; + std::transform(tmp.begin(), tmp.end(), tmp.begin(), std::bind2nd(std::plus(), b)); + return tmp; +} + +template std::vector operator-(const std::vector& a, const B& b) +{ + std::vector tmp = a; + std::transform(tmp.begin(), tmp.end(), tmp.begin(), std::bind2nd(std::minus(), b)); + return tmp; +} + +template std::vector operator*(const std::vector& a, const B& b) +{ + std::vector tmp = a; + std::transform(tmp.begin(), tmp.end(), tmp.begin(), std::bind2nd(std::multiplies(), b)); + return tmp; +} + +template std::vector operator/(const std::vector& a, const B& b) +{ + std::vector tmp = a; + std::transform(tmp.begin(), tmp.end(), tmp.begin(), std::bind2nd(std::divides(), b)); + return tmp; +} + +//----------------------------------------------------------------------------- +// number + std::vector +//----------------------------------------------------------------------------- + +template std::vector operator+(const B& b, const std::vector& a) +{ + std::vector tmp = a; + std::transform(tmp.begin(), tmp.end(), tmp.begin(), std::bind2nd(std::plus(), b)); + return tmp; +} + +template std::vector operator-(const B& b, const std::vector& a) +{ + std::vector tmp(a.size(), b); + std::transform(tmp.begin(), tmp.end(), a.begin(), tmp.begin(), std::minus()); + return tmp; +} + +template std::vector operator*(const B& b, const std::vector& a) +{ + std::vector tmp = a; + std::transform(tmp.begin(), tmp.end(), tmp.begin(), bind2nd(std::multiplies(), b)); + return tmp; +} + +template std::vector operator/(const B& b, const std::vector& a) +{ + std::vector tmp(a.size(), b); + std::transform(tmp.begin(), tmp.end(), a.begin(), tmp.begin(), std::divides()); + return tmp; +} + +//----------------------------------------------------------------------------- +// std::vector += number +//----------------------------------------------------------------------------- + +template std::vector& operator+=(std::vector& a, const B& b) +{ + std::transform(a.begin(), a.end(), a.begin(), std::bind2nd(std::plus(), b)); + return a; +} + +template std::vector& operator-=(std::vector& a, const B& b) +{ + std::transform(a.begin(), a.end(), a.begin(), std::bind2nd(std::minus(), b)); + return a; +} + +template std::vector& operator*=(std::vector& a, const B& b) +{ + std::transform(a.begin(), a.end(), a.begin(), std::bind2nd(std::multiplies(), b)); + return a; +} + +template std::vector& operator/=(std::vector& a, const B& b) +{ + std::transform(a.begin(), a.end(), a.begin(), std::bind2nd(std::divides(), b)); + return a; +} + +//----------------------------------------------------------------------------- +// I/O +//----------------------------------------------------------------------------- + +template std::ostream& operator<<(std::ostream& os, const std::vector& v) +{ + os << '<'; + if (v.size()) + { + std::copy(v.begin(), v.end() - 1, std::ostream_iterator(os, " ")); + os << v.back(); + } + return os << '>'; +} + +template std::istream& operator>>(std::istream& is, std::vector& v) +{ + v.clear(); + + char c; + is >> c; + if (!is || c != '<') + is.setstate(std::ios::failbit); + else + { + T t; + do { + is >> c; + if (is && c!= '>') + { + is.putback(c); + is >> t; + if (is) + v.push_back(t); + } + } while (is && c != '>'); + } + + return is; +} + +//----------------------------------------------------------------------------- +// euclidean_distance +//----------------------------------------------------------------------------- + +template T euclidean_distance(const std::vector& v1, + const std::vector& v2) +{ + T sum = 0, tmp; + + for (unsigned i = 0; i < v1.size(); ++i) + { + tmp = v1[i] - v2[i]; + sum += tmp * tmp; + } + + return sqrt(sum); +} + +//----------------------------------------------------------------------------- + +#endif diff --git a/trunk/paradiseo-old-mo/tutorial/OldLesson/CMakeLists.txt b/trunk/eo/app/gpsymreg/CMakeLists.txt similarity index 67% rename from trunk/paradiseo-old-mo/tutorial/OldLesson/CMakeLists.txt rename to trunk/eo/app/gpsymreg/CMakeLists.txt index 3f9a52ab7..1bb258678 100644 --- a/trunk/paradiseo-old-mo/tutorial/OldLesson/CMakeLists.txt +++ b/trunk/eo/app/gpsymreg/CMakeLists.txt @@ -2,35 +2,37 @@ ### 1) Include the sources ###################################################################################### -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src/utils) -INCLUDE_DIRECTORIES(${OLDMO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${FUNCTION_SRC_DIR}) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ###################################################################################### -### 2) Specify where CMake can find the libraries +### 2) Specify where CMake can find the libraries (mandatory: before 3) ) ###################################################################################### -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${FUNCTION_BIN_DIR}/lib) +LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) ###################################################################################### ### 3) Define your target(s): just an executable here ###################################################################################### -ADD_EXECUTABLE(minimize_function -ADD_DEPENDENCIES(minimize_function function) +SET (GPSYMREG_SOURCES main.cpp) + +# no matter what is the OS, hopefully +ADD_EXECUTABLE(gpsymreg ${GPSYMREG_SOURCES}) + +ADD_DEPENDENCIES(gpsymreg eo eoutils) ###################################################################################### ### 4) Optionnal: define your target(s)'s version: no effect for windows ###################################################################################### -SET(MINIMIZEFUNCTION_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(minimize_function PROPERTIES VERSION "${MINIMIZEFUNCTION_VERSION}") +SET(GPSYMREG_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(gpsymreg PROPERTIES VERSION "${GPSYMREG_VERSION}") ###################################################################################### ### 5) Link the librairies for your target(s) ###################################################################################### -TARGET_LINK_LIBRARIES(minimize_function function eo eoutils) +TARGET_LINK_LIBRARIES(gpsymreg eo eoutils) ###################################################################################### diff --git a/trunk/eo/app/gpsymreg/fitness.h b/trunk/eo/app/gpsymreg/fitness.h new file mode 100644 index 000000000..d4fdb5056 --- /dev/null +++ b/trunk/eo/app/gpsymreg/fitness.h @@ -0,0 +1,227 @@ +/* + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + jeggermo@liacs.nl +*/ + +#ifndef _FITNESS_FUNCTION_H +#define _FITNESS_FUNCTION_H + +#include +#include + +#include +#include "parameters.h" +#include "node.h" + +using namespace gp_parse_tree; +using namespace std; + + + +// the first fitness is the normal goal fitness +// the second fitness is the tree size (we prefer smaller trees) +// lets use names to define the different fitnesses +#define NORMAL 0 // Stepwise Adaptation of Weights Fitness +#define SMALLESTSIZE 1 // The size of the tree, we want to minimize this one -- statistics will tell us the smallest tree size + + +// Look: overloading the maximization without overhead (thing can be inlined) +class MinimizingFitnessTraits : public eoParetoFitnessTraits +{ + public : + static bool maximizing(int which) { return false;} // we want to minimize both fitnesses + static unsigned nObjectives() { return 2;} // the number of fitnesses } +}; + +// Lets define our MultiObjective FitnessType +typedef eoParetoFitness FitnessType; + + +// John Koza's sextic polynomial (our example problem) + +double sextic_polynomial(double x) +{ + double result=0; + result = pow(x,6) - (2*pow(x,4)) + pow(x,2); + return result; +} + +// we use the following functions for the basic math functions + +double _plus(double arg1, double arg2) +{ + return arg1 + arg2; +} + +double _minus(double arg1, double arg2) +{ + return arg1 - arg2; +} + +double _multiplies(double arg1, double arg2) +{ + return arg1 * arg2; +} + +// the function for a protected divide looks a little bit different +double _divides(double arg1, double arg2) +{ + if (arg2 ==0) + return 0; + else + return arg1 / arg2; +} + +double _negate(double arg1) +{ + return -arg1; +} + + + +// now let's define our tree nodes + +void init(vector &initSequence) +{ + + // we have only one variable (X) + Operation varX( (unsigned int) 0, string("X") ); + + + // the main binary operators + Operation OpPLUS ( _plus, string("+")); + Operation OpMINUS( _minus,string("-")); + Operation OpMULTIPLIES(_multiplies,string("*")); + // We can use a protected divide function. + Operation OpDIVIDE( _divides, string("/") ); + + + // Now the functions as binary functions + Operation PLUS( string("plus"), _plus); + Operation MINUS( string("minus"), _minus); + Operation MULTIPLIES( string("multiply"), _multiplies); + Operation DIVIDE( string("divide"), _divides); + + + // and some unary functions + Operation NEGATE( _negate,string("-")); + Operation SIN ( sin, string("sin")); + Operation COS ( cos, string("cos")); + + // Now we are ready to add the possible nodes to our initSequence (which is used by the eoDepthInitializer) + + // so lets start with our variable + initSequence.push_back(varX); + + // followed by the constants 2, 4, 6 + for(unsigned int i=2; i <= 6; i+=2) + { + char text[255]; + sprintf(text, "%i", i); + Operation op(i*1.0, text); + initSequence.push_back( op ); + // and we add the variable again (so we have get lots of variables); + initSequence.push_back( varX ); + } + + // next we add the unary functions + + initSequence.push_back( NEGATE ); + initSequence.push_back( SIN ); + initSequence.push_back( COS ); + + // and the binary functions + initSequence.push_back( PLUS); + initSequence.push_back( MINUS ); + initSequence.push_back( MULTIPLIES ); + initSequence.push_back( DIVIDE ); + + // and the binary operators + initSequence.push_back( OpPLUS); + initSequence.push_back( OpMINUS ); + + initSequence.push_back( OpMULTIPLIES ); + initSequence.push_back( OpDIVIDE ); + + +} + + + +class RegFitness: public eoEvalFunc< eoParseTree > +{ + public: + + typedef eoParseTree EoType; + + void operator()(EoType &_eo) + { + + vector< double > input(1); // the input variable(s) + double output(0.); + double target; + FitnessType fitness; + + + float x=0; + double fit=0; + for(x=-1; x <= 1; x+=0.1) + { + input[0] = x; + target = sextic_polynomial(x); + _eo.apply(output,input); + + fit += pow(target - output, 2); + } + + fitness[NORMAL] = fit; + + fitness[SMALLESTSIZE] = _eo.size() / (1.0*parameter.MaxSize); + _eo.fitness(fitness); + + if (fitness[NORMAL] < best[NORMAL]) + { + best[NORMAL] = fitness[NORMAL]; + tree=""; + _eo.apply(tree); + } + + } + + + + RegFitness(eoValueParam &_generationCounter, vector< Node > &initSequence, Parameters &_parameter) : eoEvalFunc(), generationCounter(_generationCounter), parameter(_parameter) + { + init(initSequence); + best[NORMAL] = 1000; + tree= "not found"; + }; + + ~RegFitness() + { + cerr << "Best Fitness= " << best[NORMAL] << endl; + cerr << tree << endl; + }; + + private: + eoValueParam &generationCounter; // so we know the current generation + Parameters ¶meter; // the parameters + FitnessType best; // the best found fitness + string tree; +}; + +#endif diff --git a/trunk/eo/app/gpsymreg/main.cpp b/trunk/eo/app/gpsymreg/main.cpp new file mode 100644 index 000000000..6d3318ff6 --- /dev/null +++ b/trunk/eo/app/gpsymreg/main.cpp @@ -0,0 +1,337 @@ +/* + + This program is free software; you can redistribute it and/or modify + + it under the terms of the GNU General Public License as published by + + the Free Software Foundation; either version 2 of the License, or + + (at your option) any later version. + + + + This library is distributed in the hope that it will be useful, + + but WITHOUT ANY WARRANTY; without even the implied warranty of + + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + + Lesser General Public License for more details. + + + + You should have received a copy of the GNU General Public License + + along with this library; if not, write to the Free Software + + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + + jeggermo@liacs.nl + +*/ + + + +#ifdef _MSC_VER + +#pragma warning(disable:4786) + +#endif + + + +#ifdef HAVE_CONFIG_H + +#include + +#endif + + + +#include + +#include "gp/eoParseTree.h" + +#include "eo" + + + +using namespace gp_parse_tree; + +using namespace std; + + + +//----------------------------------------------------------------------------- + + + +#include "node.h" + +#include "parameters.h" + +#include "fitness.h" + + + + + +// TYPE DECLARATIONS FOR GP + + + + + +typedef eoParseTree EoType; + +typedef eoPop Pop; + + + +//----------------------------------------------------------------------------- + + + +int main(int argc, char *argv[]) + +{ + + + + // the vector containing the possible nodes + + vector initSequence; + + + + // initialise parameters + + Parameters parameter(argc, argv); + + + + // set the randomseed + + rng.reseed(parameter.randomseed); + + + + // Create a generation counter + + eoValueParam generationCounter(0, "Gen."); + + + + // Create an incrementor (sub-class of eoUpdater). Note that the + + // parameter's value is passed by reference, + + // so every time the incrementer is updated (every generation), + + // the data in generationCounter will change. + + eoIncrementor increment(generationCounter.value()); + + + + + + // create an instantiation of the fitness/evaluation function + + // it initializes the initSequence vector + + // the parameters are passed on as well + + RegFitness eval(generationCounter, initSequence, parameter); + + + + // Depth Initializor, set for Ramped Half and Half Initialization + + eoParseTreeDepthInit initializer(parameter.InitMaxDepth, initSequence, true, true); + + + + // create the initial population + + Pop pop(parameter.population_size, initializer); + + + + // and evaluate the individuals + + apply(eval, pop); + + + + generationCounter.value()++; // set the generationCounter to 1 + + + + + + // define X-OVER + + + + eoSubtreeXOver xover(parameter.MaxSize); + + + + // define MUTATION + + eoBranchMutation mutation(initializer, parameter.MaxSize); + +// eoExpansionMutation mutation(initializer, parameter.MaxSize); + +// eoCollapseSubtreeMutation mutation(initializer, parameter.MaxSize); + +// eoPointMutation mutation(initSequence); + +// eoHoistMutation mutation; + + + + // The operators are encapsulated into an eoTRansform object, + + // that performs sequentially crossover and mutation + + eoSGATransform transform(xover, parameter.xover_rate, mutation, parameter.mutation_rate); + + + + // The robust tournament selection + + // in our case 5-tournament selection + + eoDetTournamentSelect selectOne(parameter.tournamentsize); + + // is now encapsulated in a eoSelectMany + + eoSelectMany select(selectOne, parameter.offspring_size, eo_is_an_integer); + + + + // and the generational replacement + + //eoGenerationalReplacement replace; + + // or the SteadtState replacment + + //eoSSGAWorseReplacement replace; + + // or comma selection + + eoCommaReplacement replace; + + + + // Terminators + + eoGenContinue term(parameter.nGenerations); + + + + eoCheckPoint checkPoint(term); + + + + // STATISTICS + + eoAverageStat avg; + + eoBestFitnessStat best; + + + + + + // Add it to the checkpoint, + + // so the counter is updated (here, incremented) every generation + + checkPoint.add(increment); + + checkPoint.add(avg); + + checkPoint.add(best); + + + +#ifdef HAVE_GNUPLOT + + eoGnuplot1DMonitor gnuplotmonitor("gnuplotBestStats"); + + gnuplotmonitor.add(generationCounter); + + gnuplotmonitor.add(best); + + // we need to add a empty string variable if we want to seed the second fitness value + + eoValueParam dummy1("", "Smallest Tree Size"); + + gnuplotmonitor.add(dummy1); + + + + eoGnuplot1DMonitor gnuplotAvgmonitor("gnuplotAvgStats"); + + gnuplotAvgmonitor.add(generationCounter); + + gnuplotAvgmonitor.add(avg); + + // we need to add a empty string variable if we want to seed the second fitness value + + eoValueParam dummy2("", "Average Tree Size"); + + gnuplotAvgmonitor.add(dummy2); + + + + checkPoint.add(gnuplotmonitor); + + checkPoint.add(gnuplotAvgmonitor); + +#endif + + // GP Generation + + eoEasyEA gp(checkPoint, eval, select, transform, replace); + + + + cout << "Initialization done" << endl; + + + + + + try + + { + + gp(pop); + + } + + catch (exception& e) + + { + + cout << "exception: " << e.what() << endl;; + + exit(EXIT_FAILURE); + + } + + + + return 1; + + + +} diff --git a/trunk/eo/app/gpsymreg/node.h b/trunk/eo/app/gpsymreg/node.h new file mode 100644 index 000000000..02b0279b1 --- /dev/null +++ b/trunk/eo/app/gpsymreg/node.h @@ -0,0 +1,248 @@ +/* + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + jeggermo@liacs.nl +*/ + +#ifndef _NODE_H +#define _NODE_H + + + +#include +#include +#include // for finite(double) function + +using namespace gp_parse_tree; +using namespace std; + + +/* A new Operation and Node class for even more flexibility. + + Improvements over the t-eoSymreg code are: + + * No hardcoded functions or operators. The Operation and Node class below + allow you to specify your own unary and binary functions as well as + binary operators (like +,-,*,/). Moreover you can detemine if you want + to allow primitve subroutines with either one or two arguments. + + If a Node has a subroutine Operation it will take evaluate the first + (and possible second) child branch and use them as input variables for + the remaining second (or third) child branch. +*/ + + +typedef enum {Variable, UFunction, BFunction, BOperator, Const} Type; + +typedef double (*BinaryFunction)(const double,const double); +typedef double (*UnaryFunction)(const double); + +struct Operation +{ + public: + + typedef unsigned int VariableID; + typedef string Label; + + + // if your compiler allows you to have nameless unions you can make this a + // union by removing the //'s below + + //union + //{ + UnaryFunction uFunction; + BinaryFunction bFunction; + VariableID id; + double constant; + //}; + + + + Label label; + Type type; + + // the default constructor results in a constant with value 0 + Operation() : constant(0), label("0"), type(Const){}; + // two possible constructors for Unary Functions + Operation(UnaryFunction _uf, Label _label): uFunction(_uf), label(_label), type(UFunction) {}; + Operation(Label _label, UnaryFunction _uf): uFunction(_uf), label(_label), type(UFunction) {}; + + // Watch out there are two constructors using pointers two binary functions: + // Binary Function (printed as label(subtree0,subtree1) (e.g. pow(x,y)) + // Binary Operator (printed as (subtree0 label subtree1) (e.g. x^y) + // The difference is purely cosmetic. + + // If you specify the label before the function pointer -> Binary Function + Operation(Label _label, BinaryFunction _bf): bFunction(_bf), label(_label), type(BFunction) {}; + // If you specify the function pointer before the label -> Binary Operator + Operation(BinaryFunction _bf, Label _label): bFunction(_bf), label(_label), type(BOperator) {}; + + // A constructor for variables + Operation(VariableID _id, Label _label): id(_id), label(_label), type(Variable) {}; + // A constructor for constants + Operation(double _constant, Label _label): constant(_constant), label(_label), type(Const) {}; + + + Operation(const Operation &_op) + { + switch(_op.type) + { + case Variable: id = _op.id; break; + case UFunction: uFunction = _op.uFunction; break; + case BFunction: bFunction = _op.bFunction; break; + case BOperator: bFunction = _op.bFunction; break; + case Const: constant = _op.constant; break; + } + type = _op.type; + label = _op.label; + }; + virtual ~Operation(){}; + +}; + + +class Node +{ + private: + Operation op; + + public: + + Node(void): op(Operation()){}; + Node(Operation &_op) : op(_op){}; + virtual ~Node(void) {} + + int arity(void) const + { + switch(op.type) + { + case Variable: return 0; + case UFunction: return 1; + case BFunction: return 2; + case BOperator: return 2; + case Const: return 0; + } + return 0; + } + + void randomize(void) {} + + template + void operator()(double& result, Children args, vector &var) const + { + double result0; + double result1; + + + switch(op.type) + { + case Variable: result = var[op.id%var.size()]; //%var.size() used in the case of Subroutines and as a security measure + break; + case UFunction: args[0].apply(result0, var); + result = op.uFunction(result0); + break; + case BFunction: + case BOperator: args[0].apply(result0, var); + args[1].apply(result1, var); + result = op.bFunction(result0,result1); + break; + case Const: result = op.constant; + break; + + } + + } + + template + void operator()(string& result, Children args) const + { + + string subtree0; + string subtree1; + string subtree2; + + switch(op.type) + { + + case Variable: + case Const: result += op.label; + break; + + case UFunction: result += op.label; + result += "("; + args[0].apply(subtree0); + result += subtree0; + result += ")"; + break; + case BFunction: result += op.label; + result += "("; + args[0].apply(subtree0); + result += subtree0; + result += ","; + args[1].apply(subtree1); + result += subtree1; + result += ")"; + break; + case BOperator: result += "("; + args[0].apply(subtree0); + result += subtree0; + result += op.label; + args[1].apply(subtree1); + result += subtree1; + result += ")"; + break; + default: result += "ERROR in Node::operator(string,...) \n"; break; + } + } + + Operation getOp(void) const {return op;} + +}; + + + + + + + + + + + +//----------------------------------------------------------- +// saving, loading LETS LEAVE IT OUT FOR NOW + + + +std::ostream& operator<<(std::ostream& os, const Node& eot) +{ + Operation op(eot.getOp()); + + os << (eot.getOp()).label; + return os; +} + + +// we can't load because we are using function pointers. Instead we prevent a compiler warning by calling the arity() function. +std::istream& operator>>(std::istream& is, Node& eot) +{ + eot.arity(); + return is; +} + + + +#endif diff --git a/trunk/eo/app/gpsymreg/parameters.h b/trunk/eo/app/gpsymreg/parameters.h new file mode 100644 index 000000000..ed9a02577 --- /dev/null +++ b/trunk/eo/app/gpsymreg/parameters.h @@ -0,0 +1,112 @@ +/* + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + jeggermo@liacs.nl +*/ + +#ifndef _PARAMETERS_FUNCTION_H +#define _PARAMETERS_FUNCTION_H + +#include +#include + +using namespace gp_parse_tree; +using namespace std; + +struct Parameters{ + unsigned int nGenerations; // -G + unsigned population_size; // -P + unsigned offspring_size; // -O + unsigned int MaxSize; // -S + unsigned int InitMaxDepth; // -D + unsigned int randomseed; // -R + double xover_rate; // -x + double mutation_rate; // -y + unsigned int tournamentsize; // -t + + + Parameters(int argc, char **argv) + { + eoParser parser(argc,argv); + + // generations + eoValueParam paramGenerations(1, "generations", "Generations", 'G', false); + parser.processParam( paramGenerations ); + nGenerations = paramGenerations.value(); + cerr << "nGenerations= " << nGenerations << endl; + + // populationsize + eoValueParam paramPopulationSize(10, "populationsize", "PopulationSize", 'P', false); + parser.processParam( paramPopulationSize ); + population_size = paramPopulationSize.value(); + cerr << "population_size= " << population_size << endl; + + // offspringsize + eoValueParam paramOffspringSize(population_size, "offspringsize", "OffspringSize", 'O', false); + parser.processParam( paramOffspringSize ); + offspring_size = paramOffspringSize.value(); + cerr << "offspring_size= " << offspring_size << endl; + + // maxsize + eoValueParam paramMaxSize(15, "maxsize", "MaxSize", 'S', false); + parser.processParam( paramMaxSize ); + MaxSize = paramMaxSize.value(); + cerr << "MaxSize= " << MaxSize << endl; + + // initialmaxdepth + eoValueParam paramInitialMaxDepth(4, "initialmaxdepth", "InitialMaxDepth", 'D', false); + parser.processParam( paramInitialMaxDepth ); + InitMaxDepth = paramInitialMaxDepth.value(); + cerr << "InitMaxDepth= " << InitMaxDepth << endl; + + // randomseed + eoValueParam paramRandomSeed(1, "randomseed", "Random Seed", 'R', false); + parser.processParam( paramRandomSeed ); + randomseed = paramRandomSeed.value(); + cerr << "randomseed= " << randomseed << endl; + + + // crossover-rate + eoValueParam paramXover(0.75, "crossoverrate", "crossover rate", 'x', false); + parser.processParam(paramXover ); + xover_rate = paramXover.value(); + cerr << "xover_rate= " << xover_rate << endl; + + //mutation-rate + eoValueParam paramMutation(0.25, "mutationrate", "mutation rate", 'm', false); + parser.processParam(paramMutation ); + mutation_rate = paramMutation.value(); + cerr << "mutation_rate= " << mutation_rate << endl; + + //tournament size + eoValueParam paramTournamentSize(5, "tournamentsize", "tournament size", 't', false); + parser.processParam(paramTournamentSize ); + tournamentsize = paramTournamentSize.value(); + cerr << "Tournament Size= " << tournamentsize << endl; + + + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + exit(1); + } + + }; + + ~Parameters(){}; +}; + +#endif diff --git a/trunk/paradiseo-moeo/src/CMakeLists.txt b/trunk/eo/app/mastermind/CMakeLists.txt similarity index 51% rename from trunk/paradiseo-moeo/src/CMakeLists.txt rename to trunk/eo/app/mastermind/CMakeLists.txt index 8006b8998..6fde0887c 100644 --- a/trunk/paradiseo-moeo/src/CMakeLists.txt +++ b/trunk/eo/app/mastermind/CMakeLists.txt @@ -1,35 +1,38 @@ - ###################################################################################### ### 1) Include the sources ###################################################################################### -INCLUDE_DIRECTORIES(${EO_SRC_DIR}) -INCLUDE_DIRECTORIES(${MO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${OLDMO_SRC_DIR}/src) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ###################################################################################### - - -###################################################################################### -### 2) Define your target(s): just the moeo lib here. +### 2) Specify where CMake can find the libraries (mandatory: before 3) ) ###################################################################################### -SET(MOEO_LIB_OUTPUT_PATH ${ParadisEO-MOEO_BINARY_DIR}/lib) -SET(LIBRARY_OUTPUT_PATH ${MOEO_LIB_OUTPUT_PATH}) - -SET (MOEO_SOURCES core/moeoObjectiveVectorTraits.cpp) - -ADD_LIBRARY(moeo STATIC ${MOEO_SOURCES}) +LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) ###################################################################################### - - -###################################################################################### -### 3) Optionnal: define your target(s)'s version: no effect for windows +### 3) Define your target(s): just an executable here ###################################################################################### -SET(MOEO_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(moeo PROPERTIES VERSION "${MOEO_VERSION}") +SET (MASTERMIND_SOURCES mastermind.cpp) + +# no matter what is the OS, hopefully +ADD_EXECUTABLE(mastermind ${MASTERMIND_SOURCES}) + +ADD_DEPENDENCIES(mastermind eo eoutils) + +###################################################################################### +### 4) Optionnal: define your target(s)'s version: no effect for windows ###################################################################################### +SET(MASTERMIND_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(mastermind PROPERTIES VERSION "${MASTERMIND_VERSION}") + +###################################################################################### +### 5) Link the librairies for your target(s) +###################################################################################### + +TARGET_LINK_LIBRARIES(mastermind eo eoutils) + +###################################################################################### diff --git a/trunk/eo/app/mastermind/mastermind.cpp b/trunk/eo/app/mastermind/mastermind.cpp new file mode 100644 index 000000000..c17889913 --- /dev/null +++ b/trunk/eo/app/mastermind/mastermind.cpp @@ -0,0 +1,138 @@ +//----------------------------------------------------------------------------- +// mastermind +//----------------------------------------------------------------------------- + +#include // EXIT_SUCCESS EXIT_FAILURE +#include // exception +#include // cerr cout +#include // ifstream +#include // string +#include // all usefull eo stuff + +#include "mastermind.h" // Chrom eoChromInit eoChromMutation eoChromXover eoChromEvaluator + +using namespace std; + +//----------------------------------------------------------------------------- +// global variables +//----------------------------------------------------------------------------- + +unsigned in, out, hidden; + +//----------------------------------------------------------------------------- +// parameters +//----------------------------------------------------------------------------- + +eoValueParam pop_size(16, "pop_size", "population size", 'p'); +eoValueParam generations(100, "generations", "number of generation", 'g'); +eoValueParam mut_rate(0.1, "mut_rate", "mutation rate", 'm'); +eoValueParam xover_rate(0.5, "xover_rate", "default crossover rate", 'x'); +eoValueParam col_p(default_colors, "colors", "number of colors", 'c'); +eoValueParam len_p(default_length, "legth", "solution legth", 'l'); +eoValueParam sol_p(default_solution, "solution", "problem solution", 's'); + +//----------------------------------------------------------------------------- +// auxiliar functions +//----------------------------------------------------------------------------- + +void arg(int argc, char** argv); +void ga(); + +//----------------------------------------------------------------------------- +// main +//----------------------------------------------------------------------------- + +int main(int argc, char** argv) +{ + try + { + arg(argc, argv); + ga(); + } + catch (exception& e) + { + cerr << argv[0] << ": " << e.what() << endl; + exit(EXIT_FAILURE); + } + + return 0; +} + +//----------------------------------------------------------------------------- +// implementation +//----------------------------------------------------------------------------- + +void arg(int argc, char** argv) +{ + eoParser parser(argc, argv); + + parser.processParam(pop_size, "genetic operators"); + parser.processParam(generations, "genetic operators"); + parser.processParam(mut_rate, "genetic operators"); + parser.processParam(xover_rate, "genetic operators"); + parser.processParam(col_p, "problem"); + parser.processParam(len_p, "problem"); + parser.processParam(sol_p, "problem"); + + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + exit(EXIT_SUCCESS); + } + + init_eoChromEvaluator(col_p.value(), len_p.value(), sol_p.value()); +} + +//----------------------------------------------------------------------------- + +void ga() +{ + // create population + eoInitChrom init; + eoPop pop(pop_size.value(), init); + + // evaluate population + eoEvalFuncPtr evaluator(eoChromEvaluator); + apply(evaluator, pop); + + // selector + eoProportionalSelect select(pop); + + // genetic operators + eoChromMutation mutation; + eoChromXover xover; + + // stop condition + eoGenContinue continuator1(generations.value()); + eoFitContinue continuator2(solution.fitness()); + eoCombinedContinue continuator(continuator1, continuator2); + + // checkpoint + eoCheckPoint checkpoint(continuator); + + // monitor + eoStdoutMonitor monitor; + checkpoint.add(monitor); + + // statistics + eoBestFitnessStat stats; + checkpoint.add(stats); + monitor.add(stats); + + // genetic algorithm + eoSGA sga(select, + xover, xover_rate.value(), + mutation, mut_rate.value(), + evaluator, + checkpoint); + sga(pop); + + cout << "solution = " << solution << endl + << "best = " << *max_element(pop.begin(), pop.end()) << endl; +} + +//----------------------------------------------------------------------------- + +// Local Variables: +// mode:C++ +// End: diff --git a/trunk/eo/app/mastermind/mastermind.h b/trunk/eo/app/mastermind/mastermind.h new file mode 100644 index 000000000..13066036e --- /dev/null +++ b/trunk/eo/app/mastermind/mastermind.h @@ -0,0 +1,199 @@ +//----------------------------------------------------------------------------- +// mastermind.h +//----------------------------------------------------------------------------- + +#ifndef mastermind_h +#define mastermind_h + +//----------------------------------------------------------------------------- + +#include // exit EXIT_FAILURE +#include // eoVectorLength +#include // eoMonOp eoQuadraticOp +#include // eoInit +#include "utils/rnd_generators.h" // uniform_generator + +//----------------------------------------------------------------------------- +// phenotype +//----------------------------------------------------------------------------- + +typedef float phenotype; + +//----------------------------------------------------------------------------- +// genotype +//----------------------------------------------------------------------------- + +typedef std::vector genotype; + +//----------------------------------------------------------------------------- +// Chrom +//----------------------------------------------------------------------------- + +typedef eoVector Chrom; + +//----------------------------------------------------------------------------- +// eoChromEvaluator +//----------------------------------------------------------------------------- + +// const unsigned points_per_black = 3, points_per_white = 1; +Chrom solution; + +phenotype eoChromEvaluator(const Chrom& chrom) +{ + Chrom tmp = solution; + unsigned black = 0, white = 0; + + // look for blacks + for (unsigned i = 0; i < chrom.size(); ++i) + if (chrom[i] == tmp[i]) + { + ++black; + tmp[i] = -1; + } + + // look for whites + for (unsigned i = 0; i < chrom.size(); ++i) + for (unsigned j = 0; j < tmp.size(); ++j) + if (chrom[i] == tmp[j]) + { + ++white; + tmp[j] = -1; + break; + } + + // return black * points_per_black + white * points_per_white; + return black * chrom.size() + white; +} + +const unsigned default_length = 8; +const unsigned default_colors = 8; +const std::string default_solution = "01234567"; + + +unsigned num_colors; + +void init_eoChromEvaluator(const unsigned& c, const unsigned& l, std::string s) +{ + num_colors = c; + + // check consistency between parameters + if (s != default_solution) + { + // check length + if (l != default_length && s.size() != l) + { + std::cerr << "solution length != length" << std::endl; + exit(EXIT_FAILURE); + } + + // check number of colors + if ((c != default_colors) && (c < unsigned(*max_element(s.begin(), s.end()) - '0'))) + { + std::cerr << "too high color number found!" << std::endl; + exit(EXIT_FAILURE); + } + } + else + if (l != default_length || c != default_colors ) + // generate a random solution + if(num_colors <= 10) + { + uniform_generator color('0', static_cast('0' + c)); + s.resize(l); + generate(s.begin(), s.end(), color); + } + + // put the solution parameter on the solution chromosome + if (num_colors <= 10) + { + solution.resize(s.size()); + for (unsigned i = 0; i < solution.size(); ++i) + solution[i] = s[i] - '0'; + } + else + { + solution.resize(l); + uniform_generator color(0, num_colors); + generate(solution.begin(), solution.end(), color); + } + + solution.fitness(eoChromEvaluator(solution)); +} + +//----------------------------------------------------------------------------- +// eoChromInit +//----------------------------------------------------------------------------- + +class eoInitChrom: public eoInit +{ +public: + void operator()(Chrom& chrom) + { + uniform_generator color(0, num_colors); + chrom.resize(solution.size()); + generate(chrom.begin(), chrom.end(), color); + chrom.invalidate(); + } +}; + +//----------------------------------------------------------------------------- +// eoChromMutation +//----------------------------------------------------------------------------- + +class eoChromMutation: public eoMonOp +{ + // many operators in one :( + bool operator()(Chrom& chrom) + { + uniform_generator what(0, 2); + uniform_generator position(0, chrom.size()); + + switch(what()) + { + case 0: + { + // mutation + uniform_generator color(0, num_colors); + chrom[position()] = color(); + break; + } + case 1: + { + // transposition + std::swap(chrom[position()], chrom[position()]); + break; + } + default: + { + std::cerr << "unknown operator!" << std::endl; + exit(EXIT_FAILURE); + break; + } + } + + return true; + } +}; + +//----------------------------------------------------------------------------- +// eoChromXover +//----------------------------------------------------------------------------- + +class eoChromXover: public eoQuadOp +{ +public: + bool operator()(Chrom& chrom1, Chrom& chrom2) + { + uniform_generator position(0, chrom1.size()); + swap_ranges(chrom1.begin(), chrom1.begin() + position(), chrom2.begin()); + return true; + } +}; + +//----------------------------------------------------------------------------- + +#endif // mastermind_h + +// Local Variables: +// mode:C++ +// End: diff --git a/trunk/eo/build_gcc_linux_debug b/trunk/eo/build_gcc_linux_debug new file mode 100755 index 000000000..144a5298a --- /dev/null +++ b/trunk/eo/build_gcc_linux_debug @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +mkdir -p debug +cd debug +cmake -DCMAKE_BUILD_TYPE=Debug .. +make +cd .. diff --git a/trunk/eo/build_gcc_linux_pyeo b/trunk/eo/build_gcc_linux_pyeo new file mode 100755 index 000000000..ec4927878 --- /dev/null +++ b/trunk/eo/build_gcc_linux_pyeo @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +mkdir -p release +cd release +cmake -DENABLE_PYEO=1 .. +make +cd .. diff --git a/trunk/eo/build_gcc_linux_release b/trunk/eo/build_gcc_linux_release new file mode 100755 index 000000000..fb220d044 --- /dev/null +++ b/trunk/eo/build_gcc_linux_release @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +mkdir -p release +cd release +cmake .. +make +cd .. diff --git a/trunk/eo/build_gcc_linux_stl_parallel b/trunk/eo/build_gcc_linux_stl_parallel new file mode 100755 index 000000000..7208c2f5a --- /dev/null +++ b/trunk/eo/build_gcc_linux_stl_parallel @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +mkdir -p release +cd release +cmake -D_GLIBCXX_PARALLEL=1 .. +make +cd .. diff --git a/trunk/eo/build_gcc_linux_tutorial b/trunk/eo/build_gcc_linux_tutorial new file mode 100755 index 000000000..2908e875a --- /dev/null +++ b/trunk/eo/build_gcc_linux_tutorial @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +mkdir -p release +cd release +cmake -DENABLE_EO_TUTORIAL=1 .. +make +cd .. diff --git a/trunk/eo/build_gcc_linux_unittest b/trunk/eo/build_gcc_linux_unittest new file mode 100755 index 000000000..c23049e80 --- /dev/null +++ b/trunk/eo/build_gcc_linux_unittest @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +mkdir -p debug +cd debug +cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_CMAKE_TESTING=1 .. +make +cd .. diff --git a/trunk/eo/build_vs2008_release.bat b/trunk/eo/build_vs2008_release.bat new file mode 100644 index 000000000..13513c147 --- /dev/null +++ b/trunk/eo/build_vs2008_release.bat @@ -0,0 +1,5 @@ +mkdir release +cd release +cmake -G "Visual Studio 9 2008" .. +cd .. +pause diff --git a/trunk/eo/cmake/modules/FindEO.cmake b/trunk/eo/cmake/modules/FindEO.cmake new file mode 100644 index 000000000..8bf3ac130 --- /dev/null +++ b/trunk/eo/cmake/modules/FindEO.cmake @@ -0,0 +1,100 @@ +# File: FindEO.cmake +# CMAKE commands to actually use the EO library +# Version: 0.0.1 +# +# The following variables are filled out: +# - EO_INCLUDE_DIRS +# - EO_LIBRARY_DIRS +# - EO_LIBRARIES +# - EO_FOUND +# +# Here are the components: +# - PyEO +# - es +# - ga +# - cma +# +# You can use FIND_PACKAGE( EO COMPONENTS ... ) to enable one or several components. +# + +# Default enabled components +SET(EO_LIBRARIES_TO_FIND eo eoutils) + +# Use FIND_PACKAGE( EO COMPONENTS ... ) to enable modules +IF(EO_FIND_COMPONENTS) + FOREACH(component ${EO_FIND_COMPONENTS}) + STRING(TOUPPER ${component} _COMPONENT) + SET(EO_USE_${_COMPONENT} 1) + ENDFOREACH(component) + + # To make sure we don't use PyEO, ES, GA, CMA when not in COMPONENTS + IF(NOT EO_USE_PYEO) + SET(EO_DONT_USE_PYEO 1) + ELSE(NOT EO_USE_PYEO) + SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} PyEO) + ENDIF(NOT EO_USE_PYEO) + + IF(NOT EO_USE_ES) + SET(EO_DONT_USE_ES 1) + ELSE(NOT EO_USE_ES) + SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} es) + ENDIF(NOT EO_USE_ES) + + IF(NOT EO_USE_GA) + SET(EO_DONT_USE_GA 1) + ELSE(NOT EO_USE_GA) + SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} ga) + ENDIF(NOT EO_USE_GA) + + IF(NOT EO_USE_CMA) + SET(EO_DONT_USE_CMA 1) + ELSE(NOT EO_USE_CMA) + SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} cma) + ENDIF(NOT EO_USE_CMA) +ENDIF(EO_FIND_COMPONENTS) + +IF(NOT EO_INCLUDE_DIRS) + FIND_PATH( + EO_INCLUDE_DIRS + EO.h + PATHS + /usr/include/eo + /usr/local/include/eo + ) +ENDIF(NOT EO_INCLUDE_DIRS) + +IF(NOT EO_LIBRARY_DIRS) + FIND_PATH( + EO_LIBRARY_DIRS + libeo.a + PATHS + /usr/lib + /usr/local/lib + ) +ENDIF(NOT EO_LIBRARY_DIRS) + +IF(NOT EO_LIBRARIES) + SET(EO_LIBRARIES) + FOREACH(component ${EO_LIBRARIES_TO_FIND}) + FIND_LIBRARY( + EO_${component}_LIBRARY + NAMES ${component} + PATHS + /usr/lib + /usr/local/lib + ) + IF(EO_${component}_LIBRARY) + SET(EO_LIBRARIES ${EO_LIBRARIES} ${EO_${component}_LIBRARY}) + ELSE(EO_${component}_LIBRARY) + MESSAGE(FATAL_ERROR "${component} component not found.") + ENDIF(EO_${component}_LIBRARY) + ENDFOREACH(component) +ENDIF(NOT EO_LIBRARIES) + +IF(EO_INCLUDE_DIRS AND EO_LIBRARY_DIRS AND EO_LIBRARIES) + SET(EO_FOUND 1) + MARK_AS_ADVANCED(EO_FOUND) + MARK_AS_ADVANCED(EO_INCLUDE_DIRS) + MARK_AS_ADVANCED(EO_LIBRARY_DIRS) + MARK_AS_ADVANCED(EO_LIBRARIES) +ENDIF(EO_INCLUDE_DIRS AND EO_LIBRARY_DIRS AND EO_LIBRARIES) diff --git a/trunk/eo/config.h.cmake b/trunk/eo/config.h.cmake new file mode 100644 index 000000000..24568be10 --- /dev/null +++ b/trunk/eo/config.h.cmake @@ -0,0 +1,73 @@ +/* config.h.cmake */ + +/* Debugging flag */ +#cmakedefine DEBUG + +/* gnuplot graphical display */ +#cmakedefine HAVE_GNUPLOT + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_INTTYPES_H + +/* Define to 1 if you have the `m' library (-lm). */ +#cmakedefine HAVE_LIBM + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TYPES_H + +/* Define to 1 if the system has the type `uint32_t'. */ +#cmakedefine HAVE_UINT32_T + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H + +/* no debugging */ +#cmakedefine NDEBUG + +/* no debugging */ +#cmakedefine NODEBUG + +/* Name of package */ +#cmakedefine PACKAGE "eo" + +/* Define to the address where bug reports for this package should be sent. */ +#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" + +/* Define to the full name of this package. */ +#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@" + +/* Define to the full name and version of this package. */ +#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@" + +/* Define to the one symbol short name of this package. */ +#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@" + +/* Define to the version of this package. */ +#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@" + +/* Define to 1 if you have the ANSI C header files. */ +#cmakedefine STDC_HEADERS + +/* Version number of package */ +#cmakedefine "@VERSION VERSION@" + +/* Define to `unsigned int' if does not define. */ +#cmakedefine size_t diff --git a/trunk/eo/contrib/MGE/ChangeLog b/trunk/eo/contrib/MGE/ChangeLog new file mode 100644 index 000000000..9e42e0b02 --- /dev/null +++ b/trunk/eo/contrib/MGE/ChangeLog @@ -0,0 +1,11 @@ +2006-12-02 Jochen Küpper + + * contrib/MGE/VirusOp.h (VirusShiftMutation::operator()): Fix test for + i>1. This makes t-MGE1bit pass on x86_64 using GCC. + + + * Local Variables: + * coding: iso-8859-1 + * mode: flyspell + * fill-column: 80 + * End: diff --git a/trunk/eo/contrib/MGE/VirusOp.h b/trunk/eo/contrib/MGE/VirusOp.h new file mode 100644 index 000000000..54d7b4aaf --- /dev/null +++ b/trunk/eo/contrib/MGE/VirusOp.h @@ -0,0 +1,145 @@ +/* + ViruOp.h + (c) GeNeura Team 2001, Marc Schoenauer 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: eodev-main@lists.sourceforge.net + old contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr +*/ + +#ifndef VirusOp_h +#define VirusOp_h + +//----------------------------------------------------------------------------- + +#include // ostream, istream +#include // bind2nd +#include // std::string + +#include +#include "eoVirus.h" + +/** VirusBitFlip --> changes 1 bit +*/ + +template +class VirusBitFlip: public eoMonOp > { + public: + /// The class name. + virtual std::string className() const { return "VirusBitFlip"; }; + + /** Change one bit. + + @param chrom The cromosome which one bit is going to be changed. + */ + bool operator()(eoVirus& _chrom) { + unsigned i = eo::rng.random(_chrom.size()); + _chrom.virusBitSet(i, _chrom.virusBit(i) ? false : true ); + return true; + } +}; + + +template +class VirusMutation: public eoMonOp > { +public: + /// The class name. + virtual std::string className() const { return "VirusMutation"; }; + + /** Change one bit. + + @param chrom The cromosome which one bit is going to be changed. + */ + bool operator()(eoVirus& _chrom) { + // Search for virus bits + std::vector bitsSet; + for ( unsigned i = 0; i < _chrom.size(); i ++ ) { + if ( _chrom.virusBit(i) ) { + bitsSet.push_back( i ); + } + } + if ( !bitsSet.size() ) { + return false; + } + unsigned flipSite = eo::rng.random(bitsSet.size()); + unsigned flipValue = bitsSet[ flipSite ]; + _chrom[flipValue] = _chrom[flipValue] ? false : true; + return true; + } +}; + + +/// Works for 1-bit virus; shifts the one to the right or left +template +class VirusShiftMutation: public eoMonOp > +{ +public: + + /// Ctor + VirusShiftMutation( ) {}; + + /// The class name. + virtual std::string className() const { return "VirusShiftMutation"; }; + + /** Change one bit. + + @param chrom The cromosome which one bit is going to be changed. + */ + bool operator()(eoVirus& _chrom) { + // Search for virus bits + eoBooleanGenerator gen; + for ( unsigned i = 0; i < _chrom.size(); i ++ ) { + if ( _chrom.virusBit(i) ) { + if ( gen() ) { + if ( i + 1 < _chrom.size() ) { + _chrom.virusBitSet(i+1,true); + _chrom.virusBitSet(i, false); + } + } else { + if ( i > 1 ) { + _chrom.virusBitSet(i-1,true); + _chrom.virusBitSet(i, false); + } + } + } + } + return true; + } +}; + + +template +class VirusTransmission: public eoBinOp > { + public: + /// The class name. + virtual std::string className() const { return "VirusTransmission"; }; + + /** + * Change one bit. + * @param _chrom The "receptor" chromosome + * @param _chrom2 The "donor" chromosome + */ + bool operator()(eoVirus& _chrom,const eoVirus& _chrom2) { + // Search for virus bits + for ( unsigned i = 0; i < _chrom.size(); i ++ ) { + _chrom.virusBitSet(i, _chrom2.virusBit(i) ); + } + return true; + } +}; + +#endif //VirusOp_h diff --git a/trunk/eo/contrib/MGE/eoInitVirus.h b/trunk/eo/contrib/MGE/eoInitVirus.h new file mode 100644 index 000000000..f4cb53072 --- /dev/null +++ b/trunk/eo/contrib/MGE/eoInitVirus.h @@ -0,0 +1,86 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoInit.h +// (c) Maarten Keijzer 2000, GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoInitVirus_H +#define _eoInitVirus_H + +#include + +#include +#include +#include +#include + +/** + Initializer for binary chromosome with MGE +*/ +template +class eoInitVirus: public eoInit< eoVirus > { +public: + + eoInitVirus(unsigned _combien, eoRndGenerator& _generator ) + : combien(_combien), generator(_generator) {} + + virtual void operator()( eoVirus& chrom) + { + chrom.resize(combien); + chrom.virResize(combien); + std::generate(chrom.begin(), chrom.end(), generator); + for ( unsigned i = 0; i < combien; i ++ ) { + chrom.virusBitSet(i, generator() ); + } + chrom.invalidate(); + } + +private : + unsigned combien; + /// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics + eoSTLF generator; +}; + +/// Inits the virus with one bit to the left set to one +template +class eoInitVirus1bit: public eoInit< eoVirus > { +public: + + eoInitVirus1bit(unsigned _combien, eoRndGenerator& _generator ) + : combien(_combien), generator(_generator) {} + + virtual void operator()( eoVirus& chrom) + { + chrom.resize(combien); + chrom.virResize(combien); + std::generate(chrom.begin(), chrom.end(), generator); + chrom.virusBitSet(0, true ); + chrom.invalidate(); + } + +private : + unsigned combien; + /// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics + eoSTLF generator; +}; +#endif diff --git a/trunk/eo/contrib/MGE/eoVirus.h b/trunk/eo/contrib/MGE/eoVirus.h new file mode 100644 index 000000000..a7c6aaeea --- /dev/null +++ b/trunk/eo/contrib/MGE/eoVirus.h @@ -0,0 +1,130 @@ +/* eoVirus.h + +(c) GeNeura Team 2001, Marc Schoenauer 2000 + +This library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +USA + +Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr +*/ + + +#ifndef eoVirus_h +#define eoVirus_h + +#include +#include +#include +#include + +#include "ga/eoBit.h" + +/** +\defgroup bitstring + + Various functions for a bitstring representation +*/ + +/** Implementation of bitstring chromosome. + +@class eoBit eoBit.h ga/eoBit.h +@ingroup bitstring + +Based on STL's vector specialization. +*/ +template +class eoVirus : public eoBit +{ +public: + + using eoBit::begin; + using eoBit::end; + using eoBit::size; + + + /** (Default) Constructor + + @param size Size of the binary std::string. + */ + eoVirus(unsigned _size = 0, bool _value = false, bool _virValue = false): + eoBit(_size, _value), virus( _size, _virValue) {} + + /// My class name + virtual std::string className() const { + return "eoVirus"; + } + + /// Access to virus features + void virResize( unsigned _i ) { + virus.resize(_i ); + } + + /// Access to virus features + bool virusBit( unsigned _i ) const { + return virus[_i]; + } + + /// Change virus features + void virusBitSet( unsigned _i, bool _bit ) { + virus[_i ] = _bit; + } + + /** To print me on a stream. + + @param os The ostream. + */ + virtual void printOn(std::ostream& os) const { + EO::printOn(os); + os << ' '; + os << size() << ' '; + std::copy(begin(), end(), std::ostream_iterator(os)); + std::cout << std::endl; + std::copy(virus.begin(), virus.end(), std::ostream_iterator(os)); + } + + /** To read me from a stream. + + @param is The istream. + */ + virtual void readFrom(std::istream& is){ + eoBit::readFrom(is); + unsigned s; + is >> s; + std::string bits; + is >> bits; + if (is) { + virus.resize(bits.size()); + std::transform(bits.begin(), bits.end(), virus.begin(), + std::bind2nd(std::equal_to(), '1')); + } + } + + +private: + + std::vector virus; +}; + +//----------------------------------------------------------------------------- + +#endif //eoBit_h + + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-style: "Stroustrup" +// End: diff --git a/trunk/eo/contrib/boost/config.hpp b/trunk/eo/contrib/boost/config.hpp new file mode 100644 index 000000000..176b4391c --- /dev/null +++ b/trunk/eo/contrib/boost/config.hpp @@ -0,0 +1,59 @@ +// Boost config.hpp configuration header file ------------------------------// + +// (C) Copyright John Maddock 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for most recent version. + +// Boost config.hpp policy and rationale documentation has been moved to +// http://www.boost.org/libs/config +// +// CAUTION: This file is intended to be completely stable - +// DO NOT MODIFY THIS FILE! +// + +#ifndef BOOST_CONFIG_HPP +#define BOOST_CONFIG_HPP + +// if we don't have a user config, then use the default location: +#if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG) +# define BOOST_USER_CONFIG +#endif +// include it first: +#ifdef BOOST_USER_CONFIG +# include BOOST_USER_CONFIG +#endif + +// if we don't have a compiler config set, try and find one: +#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG) +# include +#endif +// if we have a compiler config, include it now: +#ifdef BOOST_COMPILER_CONFIG +# include BOOST_COMPILER_CONFIG +#endif + +// if we don't have a std library config set, try and find one: +#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) +# include +#endif +// if we have a std library config, include it now: +#ifdef BOOST_STDLIB_CONFIG +# include BOOST_STDLIB_CONFIG +#endif + +// if we don't have a platform config set, try and find one: +#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG) +# include +#endif +// if we have a platform config, include it now: +#ifdef BOOST_PLATFORM_CONFIG +# include BOOST_PLATFORM_CONFIG +#endif + +// get config suffix code: +#include + +#endif // BOOST_CONFIG_HPP diff --git a/trunk/eo/contrib/boost/config/abi_prefix.hpp b/trunk/eo/contrib/boost/config/abi_prefix.hpp new file mode 100644 index 000000000..a1d93a2a5 --- /dev/null +++ b/trunk/eo/contrib/boost/config/abi_prefix.hpp @@ -0,0 +1,20 @@ +// abi_prefix header -------------------------------------------------------// + +// © Copyright John Maddock 2003 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). + +#ifndef BOOST_CONFIG_ABI_PREFIX_HPP +# define BOOST_CONFIG_ABI_PREFIX_HPP +#else +# error double inclusion of header boost/config/abi_prefix.hpp is an error +#endif + +#include + +// this must occur after all other includes and before any code appears: +#ifdef BOOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX +#endif diff --git a/trunk/eo/contrib/boost/config/abi_suffix.hpp b/trunk/eo/contrib/boost/config/abi_suffix.hpp new file mode 100644 index 000000000..f9eb493d9 --- /dev/null +++ b/trunk/eo/contrib/boost/config/abi_suffix.hpp @@ -0,0 +1,21 @@ +// abi_sufffix header -------------------------------------------------------// + +// © Copyright John Maddock 2003 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). + +// This header should be #included AFTER code that was preceded by a #include +// . + +#ifndef BOOST_CONFIG_ABI_PREFIX_HPP +# error Header boost/config/abi_prefix.hpp must only be used after boost/config/abi_prefix.hpp +#else +# undef BOOST_CONFIG_ABI_PREFIX_HPP +#endif + +// the suffix header occurs after all of our code: +#ifdef BOOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX +#endif diff --git a/trunk/eo/contrib/boost/config/auto_link.hpp b/trunk/eo/contrib/boost/config/auto_link.hpp new file mode 100644 index 000000000..8a3c2e194 --- /dev/null +++ b/trunk/eo/contrib/boost/config/auto_link.hpp @@ -0,0 +1,344 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + /* + * LOCATION: see http://www.boost.org for most recent version. + * FILE auto_link.hpp + * VERSION see + * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers. + */ + +/************************************************************************* + +USAGE: +~~~~~~ + +Before including this header you must define one or more of define the following macros: + +BOOST_LIB_NAME: Required: A string containing the basename of the library, + for example boost_regex. +BOOST_LIB_TOOLSET: Optional: the base name of the toolset. +BOOST_DYN_LINK: Optional: when set link to dll rather than static library. +BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name + of the library selected (useful for debugging). +BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib, + rather than a mangled-name version. + +These macros will be undef'ed at the end of the header, further this header +has no include guards - so be sure to include it only once from your library! + +Algorithm: +~~~~~~~~~~ + +Libraries for Borland and Microsoft compilers are automatically +selected here, the name of the lib is selected according to the following +formula: + +BOOST_LIB_PREFIX + + BOOST_LIB_NAME + + "_" + + BOOST_LIB_TOOLSET + + BOOST_LIB_THREAD_OPT + + BOOST_LIB_RT_OPT + "-" + + BOOST_LIB_VERSION + +These are defined as: + +BOOST_LIB_PREFIX: "lib" for static libraries otherwise "". + +BOOST_LIB_NAME: The base name of the lib ( for example boost_regex). + +BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc). + +BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing. + +BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used, + contains one or more of the following letters after + a hiphen: + + s static runtime (dynamic if not present). + d debug build (release if not present). + g debug/diagnostic runtime (release if not present). + p STLPort Build. + +BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. + + +***************************************************************************/ + +#ifdef __cplusplus +# ifndef BOOST_CONFIG_HPP +# include +# endif +#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__) +// +// C language compatability (no, honestly) +// +# define BOOST_MSVC _MSC_VER +# define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) +# define BOOST_DO_STRINGIZE(X) #X +#endif +// +// Only include what follows for known and supported compilers: +// +#if defined(BOOST_MSVC) \ + || defined(__BORLANDC__) \ + || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \ + || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) + +#ifndef BOOST_VERSION_HPP +# include +#endif + +#ifndef BOOST_LIB_NAME +# error "Macro BOOST_LIB_NAME not set (internal error)" +#endif + +// +// error check: +// +#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG) +# pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors") +# pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes") +# error "Incompatible build options" +#endif +// +// select toolset if not defined already: +// +#ifndef BOOST_LIB_TOOLSET +#if defined(BOOST_MSVC) && (BOOST_MSVC == 1200) + + // vc6: +# define BOOST_LIB_TOOLSET "vc6" + +#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300) + + // vc7: +# define BOOST_LIB_TOOLSET "vc7" + +#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310) + + // vc71: +# define BOOST_LIB_TOOLSET "vc71" + +#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) + + // vc80: +# define BOOST_LIB_TOOLSET "vc80" + +#elif defined(__BORLANDC__) + + // CBuilder 6: +# define BOOST_LIB_TOOLSET "bcb" + +#elif defined(__ICL) + + // Intel C++, no version number: +# define BOOST_LIB_TOOLSET "iw" + +#elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF ) + + // Metrowerks CodeWarrior 8.x +# define BOOST_LIB_TOOLSET "cw8" + +#elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF ) + + // Metrowerks CodeWarrior 9.x +# define BOOST_LIB_TOOLSET "cw9" + +#endif +#endif // BOOST_LIB_TOOLSET + +// +// select thread opt: +// +#if defined(_MT) || defined(__MT__) +# define BOOST_LIB_THREAD_OPT "-mt" +#else +# define BOOST_LIB_THREAD_OPT +#endif + +#if defined(_MSC_VER) || defined(__MWERKS__) + +# ifdef _DLL + +# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-gdp" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-gdp" +# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-p" +# endif + +# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-gdpn" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-gdpn" +# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-pn" +# endif + +# else + +# if defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-gd" +# else +# define BOOST_LIB_RT_OPT +# endif + +# endif + +# else + +# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-sgdp" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-sgdp" +# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-sp" +# endif + +# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) + +# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) +# define BOOST_LIB_RT_OPT "-sgdpn" +# elif defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-sgdpn" +# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1") +# error "Build options aren't compatible with pre-built libraries" +# else +# define BOOST_LIB_RT_OPT "-spn" +# endif + +# else + +# if defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-sgd" +# else +# define BOOST_LIB_RT_OPT "-s" +# endif + +# endif + +# endif + +#elif defined(__BORLANDC__) + +// +// figure out whether we want the debug builds or not: +// +#if __BORLANDC__ > 0x561 +#pragma defineonoption BOOST_BORLAND_DEBUG -v +#endif +// +// sanity check: +// +#if defined(__STL_DEBUG) || defined(_STLP_DEBUG) +#error "Pre-built versions of the Boost libraries are not provided in STLPort-debug form" +#endif + +# ifdef _RTLDLL + +# ifdef BOOST_BORLAND_DEBUG +# define BOOST_LIB_RT_OPT "-d" +# else +# define BOOST_LIB_RT_OPT +# endif + +# else + +# ifdef BOOST_BORLAND_DEBUG +# define BOOST_LIB_RT_OPT "-sd" +# else +# define BOOST_LIB_RT_OPT "-s" +# endif + +# endif + +#endif + +// +// select linkage opt: +// +#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK) +# define BOOST_LIB_PREFIX +#elif defined(BOOST_DYN_LINK) +# error "Mixing a dll boost library with a static runtime is a really bad idea..." +#else +# define BOOST_LIB_PREFIX "lib" +#endif + +// +// now include the lib: +// +#if defined(BOOST_LIB_NAME) \ + && defined(BOOST_LIB_PREFIX) \ + && defined(BOOST_LIB_TOOLSET) \ + && defined(BOOST_LIB_THREAD_OPT) \ + && defined(BOOST_LIB_RT_OPT) \ + && defined(BOOST_LIB_VERSION) + +#ifndef BOOST_AUTO_LINK_NOMANGLE +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") +# endif +#else +# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# endif +#endif + +#else +# error "some required macros where not defined (internal logic error)." +#endif + + +#endif // _MSC_VER || __BORLANDC__ + +// +// finally undef any macros we may have set: +// +#ifdef BOOST_LIB_PREFIX +# undef BOOST_LIB_PREFIX +#endif +#if defined(BOOST_LIB_NAME) +# undef BOOST_LIB_NAME +#endif +#if defined(BOOST_LIB_TOOLSET) +# undef BOOST_LIB_TOOLSET +#endif +#if defined(BOOST_LIB_THREAD_OPT) +# undef BOOST_LIB_THREAD_OPT +#endif +#if defined(BOOST_LIB_RT_OPT) +# undef BOOST_LIB_RT_OPT +#endif +#if defined(BOOST_LIB_LINK_OPT) +# undef BOOST_LIB_LINK_OPT +#endif +#if defined(BOOST_LIB_DEBUG_OPT) +# undef BOOST_LIB_DEBUG_OPT +#endif +#if defined(BOOST_DYN_LINK) +# undef BOOST_DYN_LINK +#endif +#if defined(BOOST_AUTO_LINK_NOMANGLE) +# undef BOOST_AUTO_LINK_NOMANGLE +#endif diff --git a/trunk/eo/contrib/boost/config/compiler/borland.hpp b/trunk/eo/contrib/boost/config/compiler/borland.hpp new file mode 100644 index 000000000..66769bec5 --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/borland.hpp @@ -0,0 +1,175 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Borland C++ compiler setup: + +// Version 5.0 and below: +# if __BORLANDC__ <= 0x0550 +// Borland C++Builder 4 and 5: +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# if __BORLANDC__ == 0x0550 +// Borland C++Builder 5, command-line compiler 5.5: +# define BOOST_NO_OPERATORS_IN_NAMESPACE +# endif +# endif + +// Version 5.51 and below: +#if (__BORLANDC__ <= 0x551) +# define BOOST_NO_CV_SPECIALIZATIONS +# define BOOST_NO_CV_VOID_SPECIALIZATIONS +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_NO_DEDUCED_TYPENAME +// workaround for missing WCHAR_MAX/WCHAR_MIN: +#include +#include +#ifndef WCHAR_MAX +# define WCHAR_MAX 0xffff +#endif +#ifndef WCHAR_MIN +# define WCHAR_MIN 0 +#endif +#endif + +// Version 7.0 (Kylix) and below: +#if (__BORLANDC__ <= 0x570) +# define BOOST_NO_SFINAE +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_PRIVATE_IN_AGGREGATE +# define BOOST_NO_USING_TEMPLATE +# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG +# define BOOST_NO_TEMPLATE_TEMPLATES +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS + // we shouldn't really need this - but too many things choke + // without it, this needs more investigation: +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# define BOOST_NO_IS_ABSTRACT +# ifdef NDEBUG + // fix broken so that Boost.test works: +# include +# undef strcmp +# endif + +// +// new bug in 5.61: +#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x570) + // this seems to be needed by the command line compiler, but not the IDE: +# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS +#endif + +# ifdef _WIN32 +# define BOOST_NO_SWPRINTF +# elif defined(linux) || defined(__linux__) || defined(__linux) + // we should really be able to do without this + // but the wcs* functions aren't imported into std:: +# define BOOST_NO_STDC_NAMESPACE + // _CPPUNWIND doesn't get automatically set for some reason: +# pragma defineonoption BOOST_CPPUNWIND -x +# endif +#endif + +// +// Post 0x561 we have long long and stdint.h: +#if __BORLANDC__ >= 0x561 +# ifndef __NO_LONG_LONG +# define BOOST_HAS_LONG_LONG +# endif + // On non-Win32 platforms let the platform config figure this out: +# ifdef _WIN32 +# define BOOST_HAS_STDINT_H +# endif +#endif + +// Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is +// defined, then we have 0x560 or greater with the Rogue Wave implementation +// which presumably has the std::DBL_MAX bug. +#if ((__BORLANDC__ >= 0x550) && (__BORLANDC__ < 0x560)) || defined(_USE_OLD_RW_STL) +// is partly broken, some macros define symbols that are really in +// namespace std, so you end up having to use illegal constructs like +// std::DBL_MAX, as a fix we'll just include float.h and have done with: +#include +#endif +// +// __int64: +// +#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__) +# define BOOST_HAS_MS_INT64 +#endif +// +// check for exception handling support: +// +#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif +// +// all versions have a : +// +#ifndef __STRICT_ANSI__ +# define BOOST_HAS_DIRENT_H +#endif +// +// all versions support __declspec: +// +#ifndef __STRICT_ANSI__ +# define BOOST_HAS_DECLSPEC +#endif +// +// ABI fixing headers: +// +#if __BORLANDC__ < 0x600 // not implemented for version 6 compiler yet +#ifndef BOOST_ABI_PREFIX +# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" +#endif +#ifndef BOOST_ABI_SUFFIX +# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" +#endif +#endif +// +// Disable Win32 support in ANSI mode: +// +#if __BORLANDC__ < 0x600 +# pragma defineonoption BOOST_DISABLE_WIN32 -A +#elif defined(__STRICT_ANSI__) +# define BOOST_DISABLE_WIN32 +#endif +// +// MSVC compatibility mode does some nasty things: +// +#if defined(_MSC_VER) && (_MSC_VER <= 1200) +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# define BOOST_NO_VOID_RETURNS +#endif + +#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) + +// +// versions check: +// we don't support Borland prior to version 5.4: +#if __BORLANDC__ < 0x540 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 1536 (Builder X preview): +#if (__BORLANDC__ > 1536) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# else +# pragma message( "Unknown compiler version - please run the configure tests and report the results") +# endif +#endif + + + + + + + + diff --git a/trunk/eo/contrib/boost/config/compiler/comeau.hpp b/trunk/eo/contrib/boost/config/compiler/comeau.hpp new file mode 100644 index 000000000..1b71008e0 --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/comeau.hpp @@ -0,0 +1,59 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Douglas Gregor 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright Aleksey Gurtovoy 2003. +// (C) Copyright Beman Dawes 2003. +// (C) Copyright Jens Maurer 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Comeau C++ compiler setup: + +#include "boost/config/compiler/common_edg.hpp" + +#if (__COMO_VERSION__ <= 4245) + +# if defined(_MSC_VER) && _MSC_VER <= 1300 +# if _MSC_VER > 100 + // only set this in non-strict mode: +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# endif +# endif + +// Void returns don't work when emulating VC 6 (Peter Dimov) + +# if defined(_MSC_VER) && (_MSC_VER == 1200) +# define BOOST_NO_VOID_RETURNS +# endif + +#endif // version 4245 + +// +// enable __int64 support in VC emulation mode +// +# if defined(_MSC_VER) && (_MSC_VER >= 1200) +# define BOOST_HAS_MS_INT64 +# endif + +#define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__) + +// +// versions check: +// we don't know Comeau prior to version 4245: +#if __COMO_VERSION__ < 4245 +# error "Compiler not configured - please reconfigure" +#endif +// +// last known and checked version is 4245: +#if (__COMO_VERSION__ > 4245) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + + diff --git a/trunk/eo/contrib/boost/config/compiler/common_edg.hpp b/trunk/eo/contrib/boost/config/compiler/common_edg.hpp new file mode 100644 index 000000000..0443be1ae --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/common_edg.hpp @@ -0,0 +1,62 @@ +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright Markus Schoepflin 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// +// Options common to all edg based compilers. +// +// This is included from within the individual compiler mini-configs. + +#ifndef __EDG_VERSION__ +# error This file requires that __EDG_VERSION__ be defined. +#endif + +#if (__EDG_VERSION__ <= 238) +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_SFINAE +#endif + +#if (__EDG_VERSION__ <= 240) +# define BOOST_NO_VOID_RETURNS +#endif + +#if (__EDG_VERSION__ <= 241) && !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +#endif + +#if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES) +# define BOOST_NO_TEMPLATE_TEMPLATES +#endif + +#if (__EDG_VERSION__ < 300) && !defined(BOOST_NO_IS_ABSTRACT) +# define BOOST_NO_IS_ABSTRACT +#endif + +#if (__EDG_VERSION__ <= 303) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#endif + +// See also kai.hpp which checks a Kai-specific symbol for EH +# if !defined(__KCC) && !defined(__EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +# endif + +# if !defined(__NO_LONG_LONG) +# define BOOST_HAS_LONG_LONG +# endif + +#ifdef c_plusplus +// EDG has "long long" in non-strict mode +// However, some libraries have insufficient "long long" support +// #define BOOST_HAS_LONG_LONG +#endif + + + diff --git a/trunk/eo/contrib/boost/config/compiler/compaq_cxx.hpp b/trunk/eo/contrib/boost/config/compiler/compaq_cxx.hpp new file mode 100644 index 000000000..a52e66a29 --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/compaq_cxx.hpp @@ -0,0 +1,19 @@ +// (C) Copyright John Maddock 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Dec Alpha True64 C++ compiler setup: + +#define BOOST_COMPILER "Dec Alpha True64 " BOOST_STRINGIZE(__DECCXX_VER) + +#include "boost/config/compiler/common_edg.hpp" + +// +// versions check: +// Nothing to do here? + + + diff --git a/trunk/eo/contrib/boost/config/compiler/digitalmars.hpp b/trunk/eo/contrib/boost/config/compiler/digitalmars.hpp new file mode 100644 index 000000000..32fc71faf --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/digitalmars.hpp @@ -0,0 +1,49 @@ +// Copyright (C) Christof Meerwald 2003 +// Copyright (C) Dan Watkins 2003 +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Digital Mars C++ compiler setup: +#define BOOST_COMPILER __DMC_VERSION_STRING__ + +#define BOOST_HAS_LONG_LONG +#define BOOST_HAS_PRAGMA_ONCE + +#if (__DMC__ <= 0x833) +#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#define BOOST_NO_TEMPLATE_TEMPLATES +#define BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING +#define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS +#define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +#endif +#if (__DMC__ <= 0x840) || !defined(BOOST_STRICT_CONFIG) +#define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +#define BOOST_NO_OPERATORS_IN_NAMESPACE +#define BOOST_NO_UNREACHABLE_RETURN_DETECTION +#define BOOST_NO_SFINAE +#define BOOST_NO_USING_TEMPLATE +#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#endif + +// +// has macros: +#if (__DMC__ >= 0x840) +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_WINTHREADS +#endif + + +// check for exception handling support: +#ifndef _CPPUNWIND +# define BOOST_NO_EXCEPTIONS +#endif + +#if (__DMC__ < 0x840) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif diff --git a/trunk/eo/contrib/boost/config/compiler/gcc.hpp b/trunk/eo/contrib/boost/config/compiler/gcc.hpp new file mode 100644 index 000000000..d94b16b76 --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/gcc.hpp @@ -0,0 +1,105 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Jens Maurer 2001 - 2002. +// (C) Copyright Beman Dawes 2001 - 2003. +// (C) Copyright Douglas Gregor 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Synge Todo 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// GNU C++ compiler setup: + +#if __GNUC__ < 3 +# if __GNUC_MINOR__ == 91 + // egcs 1.1 won't parse shared_ptr.hpp without this: +# define BOOST_NO_AUTO_PTR +# endif +# if __GNUC_MINOR__ < 95 + // + // Prior to gcc 2.95 member templates only partly + // work - define BOOST_MSVC6_MEMBER_TEMPLATES + // instead since inline member templates mostly work. + // +# define BOOST_NO_MEMBER_TEMPLATES +# if __GNUC_MINOR__ >= 9 +# define BOOST_MSVC6_MEMBER_TEMPLATES +# endif +# endif + +# if __GNUC_MINOR__ < 96 +# define BOOST_NO_SFINAE +# endif + +# if __GNUC_MINOR__ <= 97 +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_OPERATORS_IN_NAMESPACE +# endif + +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# define BOOST_NO_IS_ABSTRACT +#elif __GNUC__ == 3 + // + // gcc-3.x problems: + // + // Bug specific to gcc 3.1 and 3.2: + // +# if ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2)) +# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +# endif +# if __GNUC_MINOR__ < 4 +# define BOOST_NO_IS_ABSTRACT +# endif +#endif + +#ifndef __EXCEPTIONS +# define BOOST_NO_EXCEPTIONS +#endif + + +// +// Threading support: Turn this on unconditionally here (except for +// those platforms where we can know for sure). It will get turned off again +// later if no threading API is detected. +// +#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) +# define BOOST_HAS_THREADS +#endif + +// +// gcc has "long long" +// +#define BOOST_HAS_LONG_LONG + +// +// gcc implements the named return value optimization since version 3.1 +// +#if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 ) +#define BOOST_HAS_NRVO +#endif + +#define BOOST_COMPILER "GNU C++ version " __VERSION__ + +// +// versions check: +// we don't know gcc prior to version 2.90: +#if (__GNUC__ == 2) && (__GNUC_MINOR__ < 90) +# error "Compiler not configured - please reconfigure" +#endif +// +// last known and checked version is 4.0 (Pre-release): +#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 0)) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# else +// we don't emit warnings here anymore since there are no defect macros defined for +// gcc post 3.4, so any failures are gcc regressions... +//# warning "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + diff --git a/trunk/eo/contrib/boost/config/compiler/greenhills.hpp b/trunk/eo/contrib/boost/config/compiler/greenhills.hpp new file mode 100644 index 000000000..038b6b2b5 --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/greenhills.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Greenhills C++ compiler setup: + +#define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs) + +#include "boost/config/compiler/common_edg.hpp" + +// +// versions check: +// we don't support Greenhills prior to version 0: +#if __ghs < 0 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 0: +#if (__ghs > 0) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + diff --git a/trunk/eo/contrib/boost/config/compiler/hp_acc.hpp b/trunk/eo/contrib/boost/config/compiler/hp_acc.hpp new file mode 100644 index 000000000..3d05ba563 --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/hp_acc.hpp @@ -0,0 +1,70 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Toon Knapen 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// HP aCC C++ compiler setup: + +#if (__HP_aCC <= 33100) +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_OPERATORS_IN_NAMESPACE +# if !defined(_NAMESPACE_STD) +# define BOOST_NO_STD_LOCALE +# define BOOST_NO_STRINGSTREAM +# endif +#endif + +#if (__HP_aCC <= 33300) +// member templates are sufficiently broken that we disable them for now +# define BOOST_NO_MEMBER_TEMPLATES +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE +#endif + +#if (__HP_aCC <= 33900) || !defined(BOOST_STRICT_CONFIG) +# define BOOST_NO_UNREACHABLE_RETURN_DETECTION +# define BOOST_NO_TEMPLATE_TEMPLATES +# define BOOST_NO_SWPRINTF +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_IS_ABSTRACT +// std lib config should set this one already: +//# define BOOST_NO_STD_ALLOCATOR +#endif + +// optional features rather than defects: +#if (__HP_aCC >= 33900) +# define BOOST_HAS_LONG_LONG +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +#endif + +#if (__HP_aCC >= 50000 ) && (__HP_aCC <= 53800 ) || (__HP_aCC < 31300 ) +# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD +#endif + +#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS + +#define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC) + +// +// versions check: +// we don't support HP aCC prior to version 0: +#if __HP_aCC < 33000 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 0: +#if (__HP_aCC > 53800) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + + diff --git a/trunk/eo/contrib/boost/config/compiler/intel.hpp b/trunk/eo/contrib/boost/config/compiler/intel.hpp new file mode 100644 index 000000000..652557766 --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/intel.hpp @@ -0,0 +1,146 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002 - 2003. +// (C) Copyright Guillaume Melquiond 2002 - 2003. +// (C) Copyright Beman Dawes 2003. +// (C) Copyright Martin Wille 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Intel compiler setup: + +#include "boost/config/compiler/common_edg.hpp" + +#if defined(__INTEL_COMPILER) +# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER +#elif defined(__ICL) +# define BOOST_INTEL_CXX_VERSION __ICL +#elif defined(__ICC) +# define BOOST_INTEL_CXX_VERSION __ICC +#elif defined(__ECC) +# define BOOST_INTEL_CXX_VERSION __ECC +#endif + +#define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +#define BOOST_INTEL BOOST_INTEL_CXX_VERSION + +#if defined(_WIN32) || defined(_WIN64) +# define BOOST_INTEL_WIN BOOST_INTEL +#else +# define BOOST_INTEL_LINUX BOOST_INTEL +#endif + +#if (BOOST_INTEL_CXX_VERSION <= 500) && defined(_MSC_VER) +# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +# define BOOST_NO_TEMPLATE_TEMPLATES +#endif + +#if (BOOST_INTEL_CXX_VERSION <= 600) + +# if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov) + +// Boost libraries assume strong standard conformance unless otherwise +// indicated by a config macro. As configured by Intel, the EDG front-end +// requires certain compiler options be set to achieve that strong conformance. +// Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt) +// and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for +// details as they apply to particular versions of the compiler. When the +// compiler does not predefine a macro indicating if an option has been set, +// this config file simply assumes the option has been set. +// Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if +// the compiler option is not enabled. + +# define BOOST_NO_SWPRINTF +# endif + +// Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov) + +# if defined(_MSC_VER) && (_MSC_VER <= 1200) +# define BOOST_NO_VOID_RETURNS +# define BOOST_NO_INTEGRAL_INT64_T +# endif + +#endif + +#if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32) +# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS +#endif + +// See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864 +#if BOOST_INTEL_CXX_VERSION < 600 +# define BOOST_NO_INTRINSIC_WCHAR_T +#else +// We should test the macro _WCHAR_T_DEFINED to check if the compiler +// supports wchar_t natively. *BUT* there is a problem here: the standard +// headers define this macro if they typedef wchar_t. Anyway, we're lucky +// because they define it without a value, while Intel C++ defines it +// to 1. So we can check its value to see if the macro was defined natively +// or not. +// Under UNIX, the situation is exactly the same, but the macro _WCHAR_T +// is used instead. +# if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0) +# define BOOST_NO_INTRINSIC_WCHAR_T +# endif +#endif + +// +// Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T +// set correctly, if we don't do this now, we will get errors later +// in type_traits code among other things, getting this correct +// for the Intel compiler is actually remarkably fragile and tricky: +// +#if defined(BOOST_NO_INTRINSIC_WCHAR_T) +#include +template< typename T > struct assert_no_intrinsic_wchar_t; +template<> struct assert_no_intrinsic_wchar_t { typedef void type; }; +// if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T +// where it is defined above: +typedef assert_no_intrinsic_wchar_t::type assert_no_intrinsic_wchar_t_; +#else +template< typename T > struct assert_intrinsic_wchar_t; +template<> struct assert_intrinsic_wchar_t {}; +// if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line: +template<> struct assert_intrinsic_wchar_t {}; +#endif + +#if _MSC_VER+0 >= 1000 +# if _MSC_VER >= 1200 +# define BOOST_HAS_MS_INT64 +# endif +# define BOOST_NO_SWPRINTF +#elif defined(_WIN32) +# define BOOST_DISABLE_WIN32 +#endif + +// I checked version 6.0 build 020312Z, it implements the NRVO. +// Correct this as you find out which version of the compiler +// implemented the NRVO first. (Daniel Frey) +#if (BOOST_INTEL_CXX_VERSION >= 600) +# define BOOST_HAS_NRVO +#endif + +// +// versions check: +// we don't support Intel prior to version 5.0: +#if BOOST_INTEL_CXX_VERSION < 500 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version: +#if (BOOST_INTEL_CXX_VERSION > 900) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# elif defined(_MSC_VER) +# pragma message("Unknown compiler version - please run the configure tests and report the results") +# endif +#endif + + + + + diff --git a/trunk/eo/contrib/boost/config/compiler/kai.hpp b/trunk/eo/contrib/boost/config/compiler/kai.hpp new file mode 100644 index 000000000..de16f1a67 --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/kai.hpp @@ -0,0 +1,35 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Kai C++ compiler setup: + +#include "boost/config/compiler/common_edg.hpp" + +# if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG) + // at least on Sun, the contents of is not in namespace std +# define BOOST_NO_STDC_NAMESPACE +# endif + +// see also common_edg.hpp which needs a special check for __KCC +# if !defined(_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +# endif + +#define BOOST_COMPILER "Kai C++ version " BOOST_STRINGIZE(__KCC_VERSION) + +// +// last known and checked version is 4001: +#if (__KCC_VERSION > 4001) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + diff --git a/trunk/eo/contrib/boost/config/compiler/metrowerks.hpp b/trunk/eo/contrib/boost/config/compiler/metrowerks.hpp new file mode 100644 index 000000000..f173295eb --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/metrowerks.hpp @@ -0,0 +1,104 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright David Abrahams 2001 - 2002. +// (C) Copyright Beman Dawes 2001 - 2003. +// (C) Copyright Stefan Slapeta 2004. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Metrowerks C++ compiler setup: + +// locale support is disabled when linking with the dynamic runtime +# ifdef _MSL_NO_LOCALE +# define BOOST_NO_STD_LOCALE +# endif + +# if __MWERKS__ <= 0x2301 // 5.3 +# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# define BOOST_NO_POINTER_TO_MEMBER_CONST +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD +# endif + +# if __MWERKS__ <= 0x2401 // 6.2 +//# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# endif + +# if(__MWERKS__ <= 0x2407) // 7.x +# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS +# define BOOST_NO_UNREACHABLE_RETURN_DETECTION +# endif + +# if(__MWERKS__ <= 0x3003) // 8.x +# define BOOST_NO_SFINAE +# endif + +// the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last +// tested version *only*: +# if(__MWERKS__ <= 0x3206) || !defined(BOOST_STRICT_CONFIG) // 9.5 +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_IS_ABSTRACT +# endif + +#if !__option(wchar_type) +# define BOOST_NO_INTRINSIC_WCHAR_T +#endif + +#if !__option(exceptions) +# define BOOST_NO_EXCEPTIONS +#endif + +#if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh) +# if __MWERKS__ == 0x3000 +# define BOOST_COMPILER_VERSION 8.0 +# elif __MWERKS__ == 0x3001 +# define BOOST_COMPILER_VERSION 8.1 +# elif __MWERKS__ == 0x3002 +# define BOOST_COMPILER_VERSION 8.2 +# elif __MWERKS__ == 0x3003 +# define BOOST_COMPILER_VERSION 8.3 +# elif __MWERKS__ == 0x3200 +# define BOOST_COMPILER_VERSION 9.0 +# elif __MWERKS__ == 0x3201 +# define BOOST_COMPILER_VERSION 9.1 +# elif __MWERKS__ == 0x3202 +# define BOOST_COMPILER_VERSION 9.2 +# elif __MWERKS__ == 0x3204 +# define BOOST_COMPILER_VERSION 9.3 +# elif __MWERKS__ == 0x3205 +# define BOOST_COMPILER_VERSION 9.4 +# elif __MWERKS__ == 0x3206 +# define BOOST_COMPILER_VERSION 9.5 +# else +# define BOOST_COMPILER_VERSION __MWERKS__ +# endif +#else +# define BOOST_COMPILER_VERSION __MWERKS__ +#endif + +#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) + +// +// versions check: +// we don't support Metrowerks prior to version 5.3: +#if __MWERKS__ < 0x2301 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version: +#if (__MWERKS__ > 0x3205) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + + + + + diff --git a/trunk/eo/contrib/boost/config/compiler/mpw.hpp b/trunk/eo/contrib/boost/config/compiler/mpw.hpp new file mode 100644 index 000000000..8ab2aacb6 --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/mpw.hpp @@ -0,0 +1,51 @@ +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Aleksey Gurtovoy 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// MPW C++ compilers setup: + +# if defined(__SC__) +# define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__) +# elif defined(__MRC__) +# define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__) +# else +# error "Using MPW compiler configuration by mistake. Please update." +# endif + +// +// MPW 8.90: +// +#if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG) +# define BOOST_NO_CV_SPECIALIZATIONS +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_INTRINSIC_WCHAR_T +# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# define BOOST_NO_USING_TEMPLATE + +# define BOOST_NO_CWCHAR +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + +# define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */ +#endif + +// +// versions check: +// we don't support MPW prior to version 8.9: +#if MPW_CPLUS < 0x890 +# error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 0x890: +#if (MPW_CPLUS > 0x890) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + diff --git a/trunk/eo/contrib/boost/config/compiler/sgi_mipspro.hpp b/trunk/eo/contrib/boost/config/compiler/sgi_mipspro.hpp new file mode 100644 index 000000000..689b67eeb --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/sgi_mipspro.hpp @@ -0,0 +1,24 @@ +// (C) Copyright John Maddock 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// SGI C++ compiler setup: + +#define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION) + +#include "boost/config/compiler/common_edg.hpp" + +// +// Threading support: +// Turn this on unconditionally here, it will get turned off again later +// if no threading API is detected. +// +#define BOOST_HAS_THREADS +// +// version check: +// probably nothing to do here? + + diff --git a/trunk/eo/contrib/boost/config/compiler/sunpro_cc.hpp b/trunk/eo/contrib/boost/config/compiler/sunpro_cc.hpp new file mode 100644 index 000000000..eca19feb0 --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/sunpro_cc.hpp @@ -0,0 +1,90 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright Peter Dimov 2002. +// (C) Copyright Aleksey Gurtovoy 2002 - 2003. +// (C) Copyright David Abrahams 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Sun C++ compiler setup: + +# if __SUNPRO_CC <= 0x500 +# define BOOST_NO_MEMBER_TEMPLATES +# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# endif + +# if (__SUNPRO_CC <= 0x520) + // + // Sunpro 5.2 and earler: + // + // although sunpro 5.2 supports the syntax for + // inline initialization it often gets the value + // wrong, especially where the value is computed + // from other constants (J Maddock 6th May 2001) +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION + + // Although sunpro 5.2 supports the syntax for + // partial specialization, it often seems to + // bind to the wrong specialization. Better + // to disable it until suppport becomes more stable + // (J Maddock 6th May 2001). +# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# endif + +# if (__SUNPRO_CC <= 0x530) + // Requesting debug info (-g) with Boost.Python results + // in an internal compiler error for "static const" + // initialized in-class. + // >> Assertion: (../links/dbg_cstabs.cc, line 611) + // while processing ../test.cpp at line 0. + // (Jens Maurer according to Gottfried Ganßauge 04 Mar 2002) +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION + + // SunPro 5.3 has better support for partial specialization, + // but breaks when compiling std::less > + // (Jens Maurer 4 Nov 2001). + + // std::less specialization fixed as reported by George + // Heintzelman; partial specialization re-enabled + // (Peter Dimov 17 Jan 2002) + +//# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // integral constant expressions with 64 bit numbers fail +# define BOOST_NO_INTEGRAL_INT64_T +# endif + +# if (__SUNPRO_CC < 0x570) +# define BOOST_NO_TEMPLATE_TEMPLATES + // see http://lists.boost.org/MailArchives/boost/msg47184.php + // and http://lists.boost.org/MailArchives/boost/msg47220.php +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_SFINAE +# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS +# define BOOST_NO_IS_ABSTRACT +# endif + +#define BOOST_COMPILER "Sun compiler version " BOOST_STRINGIZE(__SUNPRO_CC) + +// +// versions check: +// we don't support sunpro prior to version 4: +#if __SUNPRO_CC < 0x400 +#error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 0x570: +#if (__SUNPRO_CC > 0x570) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + + + + diff --git a/trunk/eo/contrib/boost/config/compiler/vacpp.hpp b/trunk/eo/contrib/boost/config/compiler/vacpp.hpp new file mode 100644 index 000000000..4cf0de7c1 --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/vacpp.hpp @@ -0,0 +1,58 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Toon Knapen 2001 - 2003. +// (C) Copyright Lie-Quan Lee 2001. +// (C) Copyright Markus Schöpflin 2002 - 2003. +// (C) Copyright Beman Dawes 2002 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Visual Age (IBM) C++ compiler setup: + +#if __IBMCPP__ <= 501 +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS +#endif + +#if (__IBMCPP__ <= 502) +// Actually the compiler supports inclass member initialization but it +// requires a definition for the class member and it doesn't recognize +// it as an integral constant expression when used as a template argument. +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD +#endif + +#if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG) +# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS +# define BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES 1 +#endif + +// +// On AIX thread support seems to be indicated by _THREAD_SAFE: +// +#ifdef _THREAD_SAFE +# define BOOST_HAS_THREADS +#endif + +#define BOOST_COMPILER "IBM Visual Age version " BOOST_STRINGIZE(__IBMCPP__) + +// +// versions check: +// we don't support Visual age prior to version 5: +#if __IBMCPP__ < 500 +#error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 600: +#if (__IBMCPP__ > 600) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + + + + diff --git a/trunk/eo/contrib/boost/config/compiler/visualc.hpp b/trunk/eo/contrib/boost/config/compiler/visualc.hpp new file mode 100644 index 000000000..1ce600ccf --- /dev/null +++ b/trunk/eo/contrib/boost/config/compiler/visualc.hpp @@ -0,0 +1,147 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Beman Dawes 2002 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Microsoft Visual C++ compiler setup: + +#define BOOST_MSVC _MSC_VER + +// turn off the warnings before we #include anything +#pragma warning( disable : 4503 ) // warning: decorated name length exceeded + +#if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1201 == EVC4.2 +#pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_VOID_RETURNS +# define BOOST_NO_EXCEPTION_STD_NAMESPACE + // disable min/max macro defines on vc6: + // +#endif + +#if (_MSC_VER <= 1300) // 1300 == VC++ 7.0 + +#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +#endif + +# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_PRIVATE_IN_AGGREGATE +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# define BOOST_NO_INTEGRAL_INT64_T +# define BOOST_NO_DEDUCED_TYPENAME +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE + +// VC++ 6/7 has member templates but they have numerous problems including +// cases of silent failure, so for safety we define: +# define BOOST_NO_MEMBER_TEMPLATES +// For VC++ experts wishing to attempt workarounds, we define: +# define BOOST_MSVC6_MEMBER_TEMPLATES + +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# define BOOST_NO_CV_VOID_SPECIALIZATIONS +# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# define BOOST_NO_USING_TEMPLATE +# define BOOST_NO_SWPRINTF +# define BOOST_NO_TEMPLATE_TEMPLATES +# define BOOST_NO_SFINAE +# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS +# define BOOST_NO_IS_ABSTRACT +# if (_MSC_VER > 1200) +# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS +# endif + +#endif + +#if _MSC_VER < 1310 // 1310 == VC++ 7.1 +# define BOOST_NO_SWPRINTF +#endif + +#if _MSC_VER <= 1400 // 1400 == VC++ 8.0 +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +#endif + +#ifndef _NATIVE_WCHAR_T_DEFINED +# define BOOST_NO_INTRINSIC_WCHAR_T +#endif + +#ifdef _WIN32_WCE +# define BOOST_NO_THREADEX +# define BOOST_NO_GETSYSTEMTIMEASFILETIME +#endif + +// +// check for exception handling support: +#ifndef _CPPUNWIND +# define BOOST_NO_EXCEPTIONS +#endif + +// +// __int64 support: +// +#if (_MSC_VER >= 1200) +# define BOOST_HAS_MS_INT64 +#endif +#if (_MSC_VER >= 1310) && defined(_MSC_EXTENSIONS) +# define BOOST_HAS_LONG_LONG +#endif +// +// disable Win32 API's if compiler extentions are +// turned off: +// +#ifndef _MSC_EXTENSIONS +# define BOOST_DISABLE_WIN32 +#endif + +// +// all versions support __declspec: +// +#define BOOST_HAS_DECLSPEC +// +// prefix and suffix headers: +// +#ifndef BOOST_ABI_PREFIX +# define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp" +#endif +#ifndef BOOST_ABI_SUFFIX +# define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp" +#endif + +# if _MSC_VER == 1200 +# define BOOST_COMPILER_VERSION 6.0 +# elif _MSC_VER == 1300 +# define BOOST_COMPILER_VERSION 7.0 +# elif _MSC_VER == 1310 +# define BOOST_COMPILER_VERSION 7.1 +# elif _MSC_VER == 1400 +# define BOOST_COMPILER_VERSION 8.0 +# else +# define BOOST_COMPILER_VERSION _MSC_VER +# endif + +#define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) + +// +// versions check: +// we don't support Visual C++ prior to version 6: +#if _MSC_VER < 1200 +#error "Compiler not supported or configured - please reconfigure" +#endif +// +// last known and checked version is 1310: +#if (_MSC_VER > 1400) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# else +# pragma message("Unknown compiler version - please run the configure tests and report the results") +# endif +#endif diff --git a/trunk/eo/contrib/boost/config/platform/aix.hpp b/trunk/eo/contrib/boost/config/platform/aix.hpp new file mode 100644 index 000000000..894ef42ce --- /dev/null +++ b/trunk/eo/contrib/boost/config/platform/aix.hpp @@ -0,0 +1,33 @@ +// (C) Copyright John Maddock 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// IBM/Aix specific config options: + +#define BOOST_PLATFORM "IBM Aix" + +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_NL_TYPES_H +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_CLOCK_GETTIME + +// This needs support in "boost/cstdint.hpp" exactly like FreeBSD. +// This platform has header named which includes all +// the things needed. +#define BOOST_HAS_STDINT_H + +// Threading API's: +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_PTHREAD_DELAY_NP +#define BOOST_HAS_SCHED_YIELD +//#define BOOST_HAS_PTHREAD_YIELD + +// boilerplate code: +#include + + + + diff --git a/trunk/eo/contrib/boost/config/platform/amigaos.hpp b/trunk/eo/contrib/boost/config/platform/amigaos.hpp new file mode 100644 index 000000000..34bcf4128 --- /dev/null +++ b/trunk/eo/contrib/boost/config/platform/amigaos.hpp @@ -0,0 +1,15 @@ +// (C) Copyright John Maddock 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +#define BOOST_PLATFORM "AmigaOS" + +#define BOOST_DISABLE_THREADS +#define BOOST_NO_CWCHAR +#define BOOST_NO_STD_WSTRING +#define BOOST_NO_INTRINSIC_WCHAR_T + + diff --git a/trunk/eo/contrib/boost/config/platform/beos.hpp b/trunk/eo/contrib/boost/config/platform/beos.hpp new file mode 100644 index 000000000..48c3d8dc5 --- /dev/null +++ b/trunk/eo/contrib/boost/config/platform/beos.hpp @@ -0,0 +1,26 @@ +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// BeOS specific config options: + +#define BOOST_PLATFORM "BeOS" + +#define BOOST_NO_CWCHAR +#define BOOST_NO_CWCTYPE +#define BOOST_HAS_UNISTD_H + +#define BOOST_HAS_BETHREADS + +#ifndef BOOST_DISABLE_THREADS +# define BOOST_HAS_THREADS +#endif + +// boilerplate code: +#include + + + diff --git a/trunk/eo/contrib/boost/config/platform/bsd.hpp b/trunk/eo/contrib/boost/config/platform/bsd.hpp new file mode 100644 index 000000000..09988e0ca --- /dev/null +++ b/trunk/eo/contrib/boost/config/platform/bsd.hpp @@ -0,0 +1,71 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Douglas Gregor 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// generic BSD config options: + +#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) +#error "This platform is not BSD" +#endif + +#ifdef __FreeBSD__ +#define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__) +#elif defined(__NetBSD__) +#define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__) +#elif defined(__OpenBSD__) +#define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__) +#endif + +// +// is this the correct version check? +// FreeBSD has but does not +// advertise the fact in : +// +#if defined(__FreeBSD__) && (__FreeBSD__ >= 3) +# define BOOST_HAS_NL_TYPES_H +#endif + +// +// FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in +// and not in +// +#if defined(__FreeBSD__) && (__FreeBSD__ <= 3) +# define BOOST_HAS_PTHREADS +#endif + +// +// No wide character support in the BSD header files: +// +#if !(defined(__FreeBSD__) && (__FreeBSD__ >= 5)) +# define BOOST_NO_CWCHAR +#endif +// +// The BSD has macros only, no functions: +// +#if !defined(__OpenBSD__) +# define BOOST_NO_CTYPE_FUNCTIONS +#endif + +// +// thread API's not auto detected: +// +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#define BOOST_HAS_SIGACTION + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + + + + + + diff --git a/trunk/eo/contrib/boost/config/platform/cygwin.hpp b/trunk/eo/contrib/boost/config/platform/cygwin.hpp new file mode 100644 index 000000000..0fd2ebe2d --- /dev/null +++ b/trunk/eo/contrib/boost/config/platform/cygwin.hpp @@ -0,0 +1,48 @@ +// (C) Copyright John Maddock 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// cygwin specific config options: + +#define BOOST_PLATFORM "Cygwin" +#define BOOST_NO_CWCTYPE +#define BOOST_NO_CWCHAR +#define BOOST_NO_SWPRINTF +#define BOOST_HAS_DIRENT_H + +// +// Threading API: +// See if we have POSIX threads, if we do use them, otherwise +// revert to native Win threads. +#define BOOST_HAS_UNISTD_H +#include +#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) +# define BOOST_HAS_PTHREADS +# define BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_SIGACTION +#else +# if !defined(BOOST_HAS_WINTHREADS) +# define BOOST_HAS_WINTHREADS +# endif +# define BOOST_HAS_FTIME +#endif + +// +// find out if we have a stdint.h, there should be a better way to do this: +// +#include +#ifdef _STDINT_H +#define BOOST_HAS_STDINT_H +#endif + +// boilerplate code: +#include + + + + diff --git a/trunk/eo/contrib/boost/config/platform/hpux.hpp b/trunk/eo/contrib/boost/config/platform/hpux.hpp new file mode 100644 index 000000000..fa773aa79 --- /dev/null +++ b/trunk/eo/contrib/boost/config/platform/hpux.hpp @@ -0,0 +1,68 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Toon Knapen 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// hpux specific config options: + +#define BOOST_PLATFORM "HP-UX" + +// In principle, HP-UX has a nice under the name +// However, it has the following problem: +// Use of UINT32_C(0) results in "0u l" for the preprocessed source +// (verifyable with gcc 2.95.3, assumed for HP aCC) +// #define BOOST_HAS_STDINT_H + +#define BOOST_NO_SWPRINTF +#define BOOST_NO_CWCTYPE + +#if defined(__GNUC__) +# if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)) + // GNU C on HP-UX does not support threads (checked up to gcc 3.3) +# define BOOST_DISABLE_THREADS +# elif !defined(BOOST_DISABLE_THREADS) + // threads supported from gcc-3.3 onwards: +# define BOOST_HAS_THREADS +# define BOOST_HAS_PTHREADS +# endif +#endif + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + +// the following are always available: +#ifndef BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_GETTIMEOFDAY +#endif +#ifndef BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_SCHED_YIELD +#endif +#ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#endif +#ifndef BOOST_HAS_NL_TYPES_H +# define BOOST_HAS_NL_TYPES_H +#endif +#ifndef BOOST_HAS_NANOSLEEP +# define BOOST_HAS_NANOSLEEP +#endif +#ifndef BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_GETTIMEOFDAY +#endif +#ifndef BOOST_HAS_DIRENT_H +# define BOOST_HAS_DIRENT_H +#endif +#ifndef BOOST_HAS_CLOCK_GETTIME +# define BOOST_HAS_CLOCK_GETTIME +#endif +#ifndef BOOST_HAS_SIGACTION +# define BOOST_HAS_SIGACTION +#endif + + diff --git a/trunk/eo/contrib/boost/config/platform/irix.hpp b/trunk/eo/contrib/boost/config/platform/irix.hpp new file mode 100644 index 000000000..aeae49c8b --- /dev/null +++ b/trunk/eo/contrib/boost/config/platform/irix.hpp @@ -0,0 +1,31 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +// See http://www.boost.org for most recent version. + +// SGI Irix specific config options: + +#define BOOST_PLATFORM "SGI Irix" + +#define BOOST_NO_SWPRINTF +// +// these are not auto detected by POSIX feature tests: +// +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE + +#ifdef __GNUC__ + // GNU C on IRIX does not support threads (checked up to gcc 3.3) +# define BOOST_DISABLE_THREADS +#endif + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + + + diff --git a/trunk/eo/contrib/boost/config/platform/linux.hpp b/trunk/eo/contrib/boost/config/platform/linux.hpp new file mode 100644 index 000000000..51ae13347 --- /dev/null +++ b/trunk/eo/contrib/boost/config/platform/linux.hpp @@ -0,0 +1,98 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// linux specific config options: + +#define BOOST_PLATFORM "linux" + +// make sure we have __GLIBC_PREREQ if available at all +#include + +// +// added to glibc 2.1.1 +// We can only test for 2.1 though: +// +#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1))) + // defines int64_t unconditionally, but defines + // int64_t only if __GNUC__. Thus, assume a fully usable + // only when using GCC. +# if defined __GNUC__ +# define BOOST_HAS_STDINT_H +# endif +#endif + +#if defined(__LIBCOMO__) + // + // como on linux doesn't have std:: c functions: + // NOTE: versions of libcomo prior to beta28 have octal version numbering, + // e.g. version 25 is 21 (dec) + // +# if __LIBCOMO_VERSION__ <= 20 +# define BOOST_NO_STDC_NAMESPACE +# endif + +# if __LIBCOMO_VERSION__ <= 21 +# define BOOST_NO_SWPRINTF +# endif + +#endif + +// +// If glibc is past version 2 then we definitely have +// gettimeofday, earlier versions may or may not have it: +// +#if defined(__GLIBC__) && (__GLIBC__ >= 2) +# define BOOST_HAS_GETTIMEOFDAY +#endif + +#ifdef __USE_POSIX199309 +# define BOOST_HAS_NANOSLEEP +#endif + +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) +// __GLIBC_PREREQ is available since 2.1.2 + + // swprintf is available since glibc 2.2.0 +# if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98)) +# define BOOST_NO_SWPRINTF +# endif +#else +# define BOOST_NO_SWPRINTF +#endif + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + +#ifndef __GNUC__ +// +// if the compiler is not gcc we still need to be able to parse +// the GNU system headers, some of which (mainly ) +// use GNU specific extensions: +// +# ifndef __extension__ +# define __extension__ +# endif +# ifndef __const__ +# define __const__ const +# endif +# ifndef __volatile__ +# define __volatile__ volatile +# endif +# ifndef __signed__ +# define __signed__ signed +# endif +# ifndef __typeof__ +# define __typeof__ typeof +# endif +# ifndef __inline__ +# define __inline__ inline +# endif +#endif + + diff --git a/trunk/eo/contrib/boost/config/platform/macos.hpp b/trunk/eo/contrib/boost/config/platform/macos.hpp new file mode 100644 index 000000000..d6877d311 --- /dev/null +++ b/trunk/eo/contrib/boost/config/platform/macos.hpp @@ -0,0 +1,78 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Bill Kempf 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Mac OS specific config options: + +#define BOOST_PLATFORM "Mac OS" + +#if __MACH__ && !defined(_MSL_USING_MSL_C) + +// Using the Mac OS X system BSD-style C library. + +# ifndef BOOST_HAS_UNISTD_H +# define BOOST_HAS_UNISTD_H +# endif +// +// Begin by including our boilerplate code for POSIX +// feature detection, this is safe even when using +// the MSL as Metrowerks supply their own +// to replace the platform-native BSD one. G++ users +// should also always be able to do this on MaxOS X. +// +# include +# ifndef BOOST_HAS_STDINT_H +# define BOOST_HAS_STDINT_H +# endif + +// +// BSD runtime has pthreads, sigaction, sched_yield and gettimeofday, +// of these only pthreads are advertised in , so set the +// other options explicitly: +// +# define BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_SIGACTION + +# if (__GNUC__ < 3) && !defined( __APPLE_CC__) + +// GCC strange "ignore std" mode works better if you pretend everything +// is in the std namespace, for the most part. + +# define BOOST_NO_STDC_NAMESPACE +# endif + +#else + +// Using the MSL C library. + +// We will eventually support threads in non-Carbon builds, but we do +// not support this yet. +# if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON ) + +# if !defined(BOOST_HAS_PTHREADS) +# define BOOST_HAS_MPTASKS +# elif ( __dest_os == __mac_os_x ) +// We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the +// gettimeofday and no posix. +# define BOOST_HAS_GETTIMEOFDAY +# endif + +// The MP task implementation of Boost Threads aims to replace MP-unsafe +// parts of the MSL, so we turn on threads unconditionally. +# define BOOST_HAS_THREADS + +// The remote call manager depends on this. +# define BOOST_BIND_ENABLE_PASCAL + +# endif + +#endif + + + diff --git a/trunk/eo/contrib/boost/config/platform/solaris.hpp b/trunk/eo/contrib/boost/config/platform/solaris.hpp new file mode 100644 index 000000000..700dc3ce6 --- /dev/null +++ b/trunk/eo/contrib/boost/config/platform/solaris.hpp @@ -0,0 +1,21 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// sun specific config options: + +#define BOOST_PLATFORM "Sun Solaris" + +#define BOOST_HAS_GETTIMEOFDAY + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + + + + diff --git a/trunk/eo/contrib/boost/config/platform/win32.hpp b/trunk/eo/contrib/boost/config/platform/win32.hpp new file mode 100644 index 000000000..548bff280 --- /dev/null +++ b/trunk/eo/contrib/boost/config/platform/win32.hpp @@ -0,0 +1,50 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Bill Kempf 2001. +// (C) Copyright Aleksey Gurtovoy 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Win32 specific config options: + +#define BOOST_PLATFORM "Win32" + +#if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF) +# define BOOST_NO_SWPRINTF +#endif + +#if !defined(__GNUC__) && !defined(BOOST_HAS_DECLSPEC) +# define BOOST_HAS_DECLSPEC +#endif + +#if defined(__MINGW32__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 2))) +# define BOOST_HAS_STDINT_H +# define __STDC_LIMIT_MACROS +#endif + +// +// Win32 will normally be using native Win32 threads, +// but there is a pthread library avaliable as an option, +// we used to disable this when BOOST_DISABLE_WIN32 was +// defined but no longer - this should allow some +// files to be compiled in strict mode - while maintaining +// a consistent setting of BOOST_HAS_THREADS across +// all translation units (needed for shared_ptr etc). +// + +#ifdef _WIN32_WCE +# define BOOST_NO_ANSI_APIS +#endif + +#ifndef BOOST_HAS_PTHREADS +# define BOOST_HAS_WINTHREADS +#endif + +#ifndef BOOST_DISABLE_WIN32 +// WEK: Added +#define BOOST_HAS_FTIME +#define BOOST_WINDOWS 1 + +#endif diff --git a/trunk/eo/contrib/boost/config/posix_features.hpp b/trunk/eo/contrib/boost/config/posix_features.hpp new file mode 100644 index 000000000..4afb476b7 --- /dev/null +++ b/trunk/eo/contrib/boost/config/posix_features.hpp @@ -0,0 +1,87 @@ +// (C) Copyright John Maddock 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +// See http://www.boost.org for most recent version. + +// All POSIX feature tests go in this file, +// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well +// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's +// may be present but none-functional unless _POSIX_C_SOURCE and +// _XOPEN_SOURCE have been defined to the right value (it's up +// to the user to do this *before* including any header, although +// in most cases the compiler will do this for you). + +# if defined(BOOST_HAS_UNISTD_H) +# include + + // XOpen has , but is this the correct version check? +# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3) +# define BOOST_HAS_NL_TYPES_H +# endif + + // POSIX version 6 requires +# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100) +# define BOOST_HAS_STDINT_H +# endif + + // POSIX version 2 requires +# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L) +# define BOOST_HAS_DIRENT_H +# endif + + // POSIX version 3 requires to have sigaction: +# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L) +# define BOOST_HAS_SIGACTION +# endif + // POSIX defines _POSIX_THREADS > 0 for pthread support, + // however some platforms define _POSIX_THREADS without + // a value, hence the (_POSIX_THREADS+0 >= 0) check. + // Strictly speaking this may catch platforms with a + // non-functioning stub , but such occurrences should + // occur very rarely if at all. +# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS) +# define BOOST_HAS_PTHREADS +# endif + + // BOOST_HAS_NANOSLEEP: + // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME: +# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \ + || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) +# define BOOST_HAS_NANOSLEEP +# endif + + // BOOST_HAS_CLOCK_GETTIME: + // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME + // but at least one platform - linux - defines that flag without + // defining clock_gettime): +# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) +# define BOOST_HAS_CLOCK_GETTIME +# endif + + // BOOST_HAS_SCHED_YIELD: + // This is predicated on _POSIX_PRIORITY_SCHEDULING or + // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME. +# if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\ + || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\ + || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) +# define BOOST_HAS_SCHED_YIELD +# endif + + // BOOST_HAS_GETTIMEOFDAY: + // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE: + // These are predicated on _XOPEN_VERSION, and appears to be first released + // in issue 4, version 2 (_XOPEN_VERSION > 500). +# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500) +# define BOOST_HAS_GETTIMEOFDAY +# if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500) +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# endif +# endif + +# endif + + + diff --git a/trunk/eo/contrib/boost/config/requires_threads.hpp b/trunk/eo/contrib/boost/config/requires_threads.hpp new file mode 100644 index 000000000..cfaff2302 --- /dev/null +++ b/trunk/eo/contrib/boost/config/requires_threads.hpp @@ -0,0 +1,92 @@ +// (C) Copyright John Maddock 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +#ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP +#define BOOST_CONFIG_REQUIRES_THREADS_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif + +#if defined(BOOST_DISABLE_THREADS) + +// +// special case to handle versions of gcc which don't currently support threads: +// +#if defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC_MINOR__ <= 3) || !defined(BOOST_STRICT_CONFIG)) +// +// this is checked up to gcc 3.3: +// +#if defined(__sgi) || defined(__hpux) +# error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)" +#endif + +#endif + +# error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" + +#elif !defined(BOOST_HAS_THREADS) + +# if defined __COMO__ +// Comeau C++ +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_MT (Windows) or -D_REENTRANT (Unix)" + +#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) +// Intel +#ifdef _WIN32 +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" +#else +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp" +#endif + +# elif defined __GNUC__ +// GNU C++: +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" + +#elif defined __sgi +// SGI MIPSpro C++ +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE" + +#elif defined __DECCXX +// Compaq Tru64 Unix cxx +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread" + +#elif defined __BORLANDC__ +// Borland +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM" + +#elif defined __MWERKS__ +// Metrowerks CodeWarrior +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either -runtime sm, -runtime smd, -runtime dm, or -runtime dmd" + +#elif defined __SUNPRO_CC +// Sun Workshop Compiler C++ +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" + +#elif defined __HP_aCC +// HP aCC +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" + +#elif defined(__IBMCPP__) +// IBM Visual Age +# error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler" + +#elif defined _MSC_VER +// Microsoft Visual C++ +// +// Must remain the last #elif since some other vendors (Metrowerks, for +// example) also #define _MSC_VER +# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" + +#else + +# error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use" + +#endif // compilers + +#endif // BOOST_HAS_THREADS + +#endif // BOOST_CONFIG_REQUIRES_THREADS_HPP diff --git a/trunk/eo/contrib/boost/config/select_compiler_config.hpp b/trunk/eo/contrib/boost/config/select_compiler_config.hpp new file mode 100644 index 000000000..3453f1a35 --- /dev/null +++ b/trunk/eo/contrib/boost/config/select_compiler_config.hpp @@ -0,0 +1,83 @@ +// Boost compiler configuration selection header file + +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Martin Wille 2003. +// (C) Copyright Guillaume Melquiond 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// locate which compiler we are using and define +// BOOST_COMPILER_CONFIG as needed: + +# if defined __COMO__ +// Comeau C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp" + +#elif defined __DMC__ +// Digital Mars C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp" + +#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) +// Intel +# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" + +# elif defined __GNUC__ +// GNU C++: +# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp" + +#elif defined __KCC +// Kai C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp" + +#elif defined __sgi +// SGI MIPSpro C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp" + +#elif defined __DECCXX +// Compaq Tru64 Unix cxx +# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp" + +#elif defined __ghs +// Greenhills C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp" + +#elif defined __BORLANDC__ +// Borland +# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp" + +#elif defined __MWERKS__ +// Metrowerks CodeWarrior +# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp" + +#elif defined __SUNPRO_CC +// Sun Workshop Compiler C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp" + +#elif defined __HP_aCC +// HP aCC +# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp" + +#elif defined(__MRC__) || defined(__SC__) +// MPW MrCpp or SCpp +# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp" + +#elif defined(__IBMCPP__) +// IBM Visual Age +# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp" + +#elif defined _MSC_VER +// Microsoft Visual C++ +// +// Must remain the last #elif since some other vendors (Metrowerks, for +// example) also #define _MSC_VER +# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp" + +#elif defined (BOOST_ASSERT_CONFIG) +// this must come last - generate an error if we don't +// recognise the compiler: +# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)" + +#endif diff --git a/trunk/eo/contrib/boost/config/select_platform_config.hpp b/trunk/eo/contrib/boost/config/select_platform_config.hpp new file mode 100644 index 000000000..60bfa5095 --- /dev/null +++ b/trunk/eo/contrib/boost/config/select_platform_config.hpp @@ -0,0 +1,86 @@ +// Boost compiler configuration selection header file + +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed. +// Note that we define the headers to include using "header_name" not +// in order to prevent macro expansion within the header +// name (for example "linux" is a macro on linux systems). + +#if defined(linux) || defined(__linux) || defined(__linux__) +// linux: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp" + +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) +// BSD: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp" + +#elif defined(sun) || defined(__sun) +// solaris: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp" + +#elif defined(__sgi) +// SGI Irix: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp" + +#elif defined(__hpux) +// hp unix: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp" + +#elif defined(__CYGWIN__) +// cygwin is not win32: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +// win32: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp" + +#elif defined(__BEOS__) +// BeOS +# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp" + +#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) +// MacOS +# define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp" + +#elif defined(__IBMCPP__) || defined(_AIX) +// IBM +# define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp" + +#elif defined(__amigaos__) +// AmigaOS +# define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp" + +#else + +# if defined(unix) \ + || defined(__unix) \ + || defined(_XOPEN_SOURCE) \ + || defined(_POSIX_SOURCE) + + // generic unix platform: + +# ifndef BOOST_HAS_UNISTD_H +# define BOOST_HAS_UNISTD_H +# endif + +# include + +# endif + +# if defined (BOOST_ASSERT_CONFIG) + // this must come last - generate an error if we don't + // recognise the platform: +# error "Unknown platform - please configure and report the results to boost.org" +# endif + +#endif + + + diff --git a/trunk/eo/contrib/boost/config/select_stdlib_config.hpp b/trunk/eo/contrib/boost/config/select_stdlib_config.hpp new file mode 100644 index 000000000..b7bf59143 --- /dev/null +++ b/trunk/eo/contrib/boost/config/select_stdlib_config.hpp @@ -0,0 +1,68 @@ +// Boost compiler configuration selection header file + +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +// See http://www.boost.org for most recent version. + +// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed: + +// we need to include a std lib header here in order to detect which +// library is in use, use as it's about the smallest +// of the std lib headers - do not rely on this header being included - +// users can short-circuit this header if they know whose std lib +// they are using. + +#include + +#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) +// STLPort library; this _must_ come first, otherwise since +// STLport typically sits on top of some other library, we +// can end up detecting that first rather than STLport: +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp" + +#elif defined(__LIBCOMO__) +// Comeau STL: +#define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp" + +#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) +// Rogue Wave library: +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp" + +#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) +// GNU libstdc++ 3 +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp" + +#elif defined(__STL_CONFIG_H) +// generic SGI STL +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp" + +#elif defined(__MSL_CPP__) +// MSL standard lib: +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp" + +#elif defined(__IBMCPP__) +// take the default VACPP std lib +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp" + +#elif defined(MSIPL_COMPILE_H) +// Modena C++ standard library +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp" + +#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) +// Dinkumware Library (this has to appear after any possible replacement libraries): +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp" + +#elif defined (BOOST_ASSERT_CONFIG) +// this must come last - generate an error if we don't +// recognise the library: +# error "Unknown standard library - please configure and report the results to boost.org" + +#endif + + + diff --git a/trunk/eo/contrib/boost/config/stdlib/dinkumware.hpp b/trunk/eo/contrib/boost/config/stdlib/dinkumware.hpp new file mode 100644 index 000000000..aa214fc1b --- /dev/null +++ b/trunk/eo/contrib/boost/config/stdlib/dinkumware.hpp @@ -0,0 +1,106 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Guillaume Melquiond 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Dinkumware standard library config: + +#if !defined(_YVALS) && !defined(_CPPLIB_VER) +#include +#if !defined(_YVALS) && !defined(_CPPLIB_VER) +#error This is not the Dinkumware lib! +#endif +#endif + + +#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306) + // full dinkumware 3.06 and above + // fully conforming provided the compiler supports it: +# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h +# define BOOST_NO_STDC_NAMESPACE +# endif +# if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC) +# define BOOST_NO_STD_ALLOCATOR +# endif +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +# if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) + // if this lib version is set up for vc6 then there is no std::use_facet: +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_TWO_ARG_USE_FACET + // C lib functions aren't in namespace std either: +# define BOOST_NO_STDC_NAMESPACE + // and nor is +# define BOOST_NO_EXCEPTION_STD_NAMESPACE +# endif +// There's no numeric_limits support unless _LONGLONG is defined: +# if !defined(_LONGLONG) && (_CPPLIB_VER <= 310) +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# endif +// 3.06 appears to have (non-sgi versions of) & , +// and no at all +#else +# define BOOST_MSVC_STD_ITERATOR 1 +# define BOOST_NO_STD_ITERATOR +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# define BOOST_NO_STD_ALLOCATOR +# define BOOST_NO_STDC_NAMESPACE +# define BOOST_NO_STD_USE_FACET +# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN +# define BOOST_HAS_MACRO_USE_FACET +# ifndef _CPPLIB_VER + // Updated Dinkum library defines this, and provides + // its own min and max definitions. +# define BOOST_NO_STD_MIN_MAX +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# endif +#endif + +// +// std extension namespace is stdext for vc7.1 and later, +// the same applies to other compilers that sit on top +// of vc7.1 (Intel and Comeau): +// +#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__) +# define BOOST_STD_EXTENSION_NAMESPACE stdext +#endif + + +#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306) + // if we're using a dinkum lib that's + // been configured for VC6/7 then there is + // no iterator traits (true even for icl) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +#if defined(__ICL) && (__ICL < 800) && defined(_CPPLIB_VER) && (_CPPLIB_VER <= 310) +// Intel C++ chokes over any non-trivial use of +// this may be an overly restrictive define, but regex fails without it: +# define BOOST_NO_STD_LOCALE +#endif + +#ifdef _CPPLIB_VER +# define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER +#else +# define BOOST_DINKUMWARE_STDLIB 1 +#endif + +#ifdef _CPPLIB_VER +# define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER) +#else +# define BOOST_STDLIB "Dinkumware standard library version 1.x" +#endif + + + + + + + + + diff --git a/trunk/eo/contrib/boost/config/stdlib/libcomo.hpp b/trunk/eo/contrib/boost/config/stdlib/libcomo.hpp new file mode 100644 index 000000000..b2c8e4400 --- /dev/null +++ b/trunk/eo/contrib/boost/config/stdlib/libcomo.hpp @@ -0,0 +1,46 @@ +// (C) Copyright John Maddock 2002 - 2003. +// (C) Copyright Jens Maurer 2002 - 2003. +// (C) Copyright Beman Dawes 2002 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Comeau STL: + +#if !defined(__LIBCOMO__) +# include +# if !defined(__LIBCOMO__) +# error "This is not the Comeau STL!" +# endif +#endif + +// +// std::streambuf is non-standard +// NOTE: versions of libcomo prior to beta28 have octal version numbering, +// e.g. version 25 is 21 (dec) +#if __LIBCOMO_VERSION__ <= 22 +# define BOOST_NO_STD_WSTREAMBUF +#endif + +#if (__LIBCOMO_VERSION__ <= 31) && defined(_WIN32) +#define BOOST_NO_SWPRINTF +#endif + +#if __LIBCOMO_VERSION__ >= 31 +# define BOOST_HAS_HASH +# define BOOST_HAS_SLIST +#endif + +// +// Intrinsic type_traits support. +// The SGI STL has it's own __type_traits class, which +// has intrinsic compiler support with SGI's compilers. +// Whatever map SGI style type traits to boost equivalents: +// +#define BOOST_HAS_SGI_TYPE_TRAITS + +#define BOOST_STDLIB "Comeau standard library " BOOST_STRINGIZE(__LIBCOMO_VERSION__) + + diff --git a/trunk/eo/contrib/boost/config/stdlib/libstdcpp3.hpp b/trunk/eo/contrib/boost/config/stdlib/libstdcpp3.hpp new file mode 100644 index 000000000..f367fa0f1 --- /dev/null +++ b/trunk/eo/contrib/boost/config/stdlib/libstdcpp3.hpp @@ -0,0 +1,61 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// config for libstdc++ v3 +// not much to go in here: + +#ifdef __GLIBCXX__ +#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__) +#else +#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__) +#endif + +#if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T) +# define BOOST_NO_CWCHAR +# define BOOST_NO_CWCTYPE +# define BOOST_NO_STD_WSTRING +# define BOOST_NO_STD_WSTREAMBUF +#endif + +#if defined(__osf__) && !defined(_REENTRANT) \ + && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) ) +// GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header +// file is included, therefore for consistency we define it here as well. +# define _REENTRANT +#endif + +#ifdef __GLIBCXX__ // gcc 3.4 and greater: +# ifdef _GLIBCXX_HAVE_GTHR_DEFAULT + // + // If the std lib has thread support turned on, then turn it on in Boost + // as well. We do this because some gcc-3.4 std lib headers define _REENTANT + // while others do not... + // +# define BOOST_HAS_THREADS +# else +# define BOOST_DISABLE_THREADS +# endif +#elif defined(__GLIBCPP__) && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) + // disable thread support if the std lib was built single threaded: +# define BOOST_DISABLE_THREADS +#endif + +#if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT) +// linux on arm apparently doesn't define _REENTRANT +// so just turn on threading support whenever the std lib is thread safe: +# define BOOST_HAS_THREADS +#endif + + +#if !defined(_GLIBCPP_USE_LONG_LONG) \ + && !defined(_GLIBCXX_USE_LONG_LONG)\ + && defined(BOOST_HAS_LONG_LONG) +// May have been set by compiler/*.hpp, but "long long" without library +// support is useless. +# undef BOOST_HAS_LONG_LONG +#endif diff --git a/trunk/eo/contrib/boost/config/stdlib/modena.hpp b/trunk/eo/contrib/boost/config/stdlib/modena.hpp new file mode 100644 index 000000000..61e31b7d1 --- /dev/null +++ b/trunk/eo/contrib/boost/config/stdlib/modena.hpp @@ -0,0 +1,30 @@ +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Modena C++ standard library (comes with KAI C++) + +#if !defined(MSIPL_COMPILE_H) +# include +# if !defined(__MSIPL_COMPILE_H) +# error "This is not the Modena C++ library!" +# endif +#endif + +#ifndef MSIPL_NL_TYPES +#define BOOST_NO_STD_MESSAGES +#endif + +#ifndef MSIPL_WCHART +#define BOOST_NO_STD_WSTRING +#endif + +#define BOOST_STDLIB "Modena C++ standard library" + + + + + diff --git a/trunk/eo/contrib/boost/config/stdlib/msl.hpp b/trunk/eo/contrib/boost/config/stdlib/msl.hpp new file mode 100644 index 000000000..0df8e0e3b --- /dev/null +++ b/trunk/eo/contrib/boost/config/stdlib/msl.hpp @@ -0,0 +1,59 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Darin Adler 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Metrowerks standard library: + +#ifndef __MSL_CPP__ +# include +# ifndef __MSL_CPP__ +# error This is not the MSL standard library! +# endif +#endif + +#if __MSL_CPP__ >= 0x6000 // Pro 6 +# define BOOST_HAS_HASH +# define BOOST_STD_EXTENSION_NAMESPACE Metrowerks +#endif +#define BOOST_HAS_SLIST + +#if __MSL_CPP__ < 0x6209 +# define BOOST_NO_STD_MESSAGES +#endif + +// check C lib version for +#include + +#if defined(__MSL__) && (__MSL__ >= 0x5000) +# define BOOST_HAS_STDINT_H +# if !defined(__PALMOS_TRAPS__) +# define BOOST_HAS_UNISTD_H +# endif + // boilerplate code: +# include +#endif + +#if defined(_MWMT) || _MSL_THREADSAFE +# define BOOST_HAS_THREADS +#endif + +#ifdef _MSL_NO_EXPLICIT_FUNC_TEMPLATE_ARG +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_TWO_ARG_USE_FACET +#endif + + +#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__) + + + + + + + + + diff --git a/trunk/eo/contrib/boost/config/stdlib/roguewave.hpp b/trunk/eo/contrib/boost/config/stdlib/roguewave.hpp new file mode 100644 index 000000000..b331f6538 --- /dev/null +++ b/trunk/eo/contrib/boost/config/stdlib/roguewave.hpp @@ -0,0 +1,127 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright David Abrahams 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Rogue Wave std lib: + +#if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) +# include +# if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) +# error This is not the Rogue Wave standard library +# endif +#endif +// +// figure out a consistent version number: +// +#ifndef _RWSTD_VER +# define BOOST_RWSTD_VER 0x010000 +#elif _RWSTD_VER < 0x010000 +# define BOOST_RWSTD_VER (_RWSTD_VER << 8) +#else +# define BOOST_RWSTD_VER _RWSTD_VER +#endif + +#ifndef _RWSTD_VER +# define BOOST_STDLIB "Rogue Wave standard library version (Unknown version)" +#else +# define BOOST_STDLIB "Rogue Wave standard library version " BOOST_STRINGIZE(_RWSTD_VER) +#endif + +// +// Prior to version 2.2.0 the primary template for std::numeric_limits +// does not have compile time constants, even though specializations of that +// template do: +// +#if BOOST_RWSTD_VER < 0x020200 +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +#endif + +// Sun CC 5.5 patch 113817-07 adds long long specialization, but does not change the +// library version number (http://sunsolve6.sun.com/search/document.do?assetkey=1-21-113817): +#if BOOST_RWSTD_VER <= 0x020101 && (!defined(__SUNPRO_CC) || (__SUNPRO_CC < 0x550)) +# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS +# endif + +// +// Borland version of numeric_limits lacks __int64 specialisation: +// +#ifdef __BORLANDC__ +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +#endif + +// +// No std::iterator if it can't figure out default template args: +// +#if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || (BOOST_RWSTD_VER < 0x020000) +# define BOOST_NO_STD_ITERATOR +#endif + +// +// No iterator traits without partial specialization: +// +#if defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) || defined(RWSTD_NO_CLASS_PARTIAL_SPEC) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +// +// Prior to version 2.0, std::auto_ptr was buggy, and there were no +// new-style iostreams, and no conformant std::allocator: +// +#if (BOOST_RWSTD_VER < 0x020000) +# define BOOST_NO_AUTO_PTR +# define BOOST_NO_STRINGSTREAM +# define BOOST_NO_STD_ALLOCATOR +# define BOOST_NO_STD_LOCALE +#endif + +// +// No template iterator constructors without member template support: +// +#if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(_RWSTD_NO_MEMBER_TEMPLATES) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +#endif + +// +// RW defines _RWSTD_ALLOCATOR if the allocator is conformant and in use +// (the or _HPACC_ part is a hack - the library seems to define _RWSTD_ALLOCATOR +// on HP aCC systems even though the allocator is in fact broken): +// +#if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100) +# define BOOST_NO_STD_ALLOCATOR +#endif + +// +// If we have a std::locale, we still may not have std::use_facet: +// +#if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(BOOST_NO_STD_LOCALE) +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_TWO_ARG_USE_FACET +#endif + +// +// There's no std::distance prior to version 2, or without +// partial specialization support: +// +#if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) + #define BOOST_NO_STD_DISTANCE +#endif + +// +// Some versions of the rogue wave library don't have assignable +// OutputIterators: +// +#if BOOST_RWSTD_VER < 0x020100 +# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN +#endif + +// +// Disable BOOST_HAS_LONG_LONG when the library has no support for it. +// +#if !defined(_RWSTD_LONG_LONG) && defined(BOOST_HAS_LONG_LONG) +# undef BOOST_HAS_LONG_LONG +#endif diff --git a/trunk/eo/contrib/boost/config/stdlib/sgi.hpp b/trunk/eo/contrib/boost/config/stdlib/sgi.hpp new file mode 100644 index 000000000..67f7a0a4b --- /dev/null +++ b/trunk/eo/contrib/boost/config/stdlib/sgi.hpp @@ -0,0 +1,111 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Jens Maurer 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// generic SGI STL: + +#if !defined(__STL_CONFIG_H) +# include +# if !defined(__STL_CONFIG_H) +# error "This is not the SGI STL!" +# endif +#endif + +// +// No std::iterator traits without partial specialisation: +// +#if !defined(__STL_CLASS_PARTIAL_SPECIALIZATION) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +// +// No std::stringstream with gcc < 3 +// +#if defined(__GNUC__) && (__GNUC__ < 3) && \ + ((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)) && \ + !defined(__STL_USE_NEW_IOSTREAMS) || \ + defined(__APPLE_CC__) + // Note that we only set this for GNU C++ prior to 2.95 since the + // latest patches for that release do contain a minimal + // If you are running a 2.95 release prior to 2.95.3 then this will need + // setting, but there is no way to detect that automatically (other + // than by running the configure script). + // Also, the unofficial GNU C++ 2.96 included in RedHat 7.1 doesn't + // have . +# define BOOST_NO_STRINGSTREAM +#endif + +// +// Assume no std::locale without own iostreams (this may be an +// incorrect assumption in some cases): +// +#if !defined(__SGI_STL_OWN_IOSTREAMS) && !defined(__STL_USE_NEW_IOSTREAMS) +# define BOOST_NO_STD_LOCALE +#endif + +// +// Original native SGI streams have non-standard std::messages facet: +// +#if defined(__sgi) && (_COMPILER_VERSION <= 650) && !defined(__SGI_STL_OWN_IOSTREAMS) +# define BOOST_NO_STD_LOCALE +#endif + +// +// SGI's new iostreams have missing "const" in messages<>::open +// +#if defined(__sgi) && (_COMPILER_VERSION <= 740) && defined(__STL_USE_NEW_IOSTREAMS) +# define BOOST_NO_STD_MESSAGES +#endif + +// +// No template iterator constructors, or std::allocator +// without member templates: +// +#if !defined(__STL_MEMBER_TEMPLATES) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# define BOOST_NO_STD_ALLOCATOR +#endif + +// +// We always have SGI style hash_set, hash_map, and slist: +// +#define BOOST_HAS_HASH +#define BOOST_HAS_SLIST + +// +// If this is GNU libstdc++2, then no and no std::wstring: +// +#if (defined(__GNUC__) && (__GNUC__ < 3)) +# include +# if defined(__BASTRING__) +# define BOOST_NO_LIMITS +// Note: will provide compile-time constants +# undef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_NO_STD_WSTRING +# endif +#endif + +// +// There is no standard iterator unless we have namespace support: +// +#if !defined(__STL_USE_NAMESPACES) +# define BOOST_NO_STD_ITERATOR +#endif + +// +// Intrinsic type_traits support. +// The SGI STL has it's own __type_traits class, which +// has intrinsic compiler support with SGI's compilers. +// Whatever map SGI style type traits to boost equivalents: +// +#define BOOST_HAS_SGI_TYPE_TRAITS + +#define BOOST_STDLIB "SGI standard library" + + + diff --git a/trunk/eo/contrib/boost/config/stdlib/stlport.hpp b/trunk/eo/contrib/boost/config/stdlib/stlport.hpp new file mode 100644 index 000000000..4843ea59b --- /dev/null +++ b/trunk/eo/contrib/boost/config/stdlib/stlport.hpp @@ -0,0 +1,201 @@ +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Jens Maurer 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// STLPort standard library config: + +#if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) +# include +# if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) +# error "This is not STLPort!" +# endif +#endif + +// +// __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +// for versions prior to 4.1(beta) +// +#if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400) +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +#endif + +// +// If STLport thinks that there is no partial specialisation, then there is no +// std::iterator traits: +// +#if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION)) +# define BOOST_NO_STD_ITERATOR_TRAITS +#endif + +// +// No new style iostreams on GCC without STLport's iostreams enabled: +// +#if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS)) +# define BOOST_NO_STRINGSTREAM +#endif + +// +// No new iostreams implies no std::locale, and no std::stringstream: +// +#if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS) +# define BOOST_NO_STD_LOCALE +# define BOOST_NO_STRINGSTREAM +#endif + +// +// If the streams are not native, and we have a "using ::x" compiler bug +// then the io stream facets are not available in namespace std:: +// +#ifdef _STLPORT_VERSION +# if !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) +# define BOOST_NO_STD_LOCALE +# endif +#else +# if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) +# define BOOST_NO_STD_LOCALE +# endif +#endif + +// +// Without member template support enabled, their are no template +// iterate constructors, and no std::allocator: +// +#if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES)) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# define BOOST_NO_STD_ALLOCATOR +#endif +// +// however we always have at least a partial allocator: +// +#define BOOST_HAS_PARTIAL_STD_ALLOCATOR + +#if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) +# define BOOST_NO_STD_ALLOCATOR +#endif + +#if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) +# define BOOST_NO_STD_ALLOCATOR +#endif + +// +// If STLport thinks there is no wchar_t at all, then we have to disable +// the support for the relevant specilazations of std:: templates. +// +#if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT) +# ifndef BOOST_NO_STD_WSTRING +# define BOOST_NO_STD_WSTRING +# endif +# ifndef BOOST_NO_STD_WSTREAMBUF +# define BOOST_NO_STD_WSTREAMBUF +# endif +#endif + +// +// We always have SGI style hash_set, hash_map, and slist: +// +#define BOOST_HAS_HASH +#define BOOST_HAS_SLIST + +// +// STLport does a good job of importing names into namespace std::, +// but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our +// workaround does not conflict with STLports: +// +// +// Harold Howe says: +// Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with +// BCB6 does cause problems. If we detect C++ Builder, then don't define +// BOOST_NO_STDC_NAMESPACE +// +#if !defined(__BORLANDC__) && !defined(__DMC__) +// +// If STLport is using it's own namespace, and the real names are in +// the global namespace, then we duplicate STLport's using declarations +// (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't +// necessarily import all the names we need into namespace std:: +// +# if (defined(__STL_IMPORT_VENDOR_CSTD) \ + || defined(__STL_USE_OWN_NAMESPACE) \ + || defined(_STLP_IMPORT_VENDOR_CSTD) \ + || defined(_STLP_USE_OWN_NAMESPACE)) \ + && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD)) +# define BOOST_NO_STDC_NAMESPACE +# define BOOST_NO_EXCEPTION_STD_NAMESPACE +# endif +#elif defined(__BORLANDC__) && __BORLANDC__ < 0x560 +// STLport doesn't import std::abs correctly: +#include +namespace std { using ::abs; } +// and strcmp/strcpy don't get imported either ('cos they are macros) +#include +#ifdef strcpy +# undef strcpy +#endif +#ifdef strcmp +# undef strcmp +#endif +#ifdef _STLP_VENDOR_CSTD +namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; } +#endif +#endif + +// +// std::use_facet may be non-standard, uses a class instead: +// +#if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS) +# define BOOST_NO_STD_USE_FACET +# define BOOST_HAS_STLP_USE_FACET +#endif + +// +// If STLport thinks there are no wide functions, etc. is not working; but +// only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import +// into std:: ourselves). +// +#if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE) +# define BOOST_NO_CWCHAR +# define BOOST_NO_CWCTYPE +#endif + +// +// If STLport for some reason was configured so that it thinks that wchar_t +// is not an intrinsic type, then we have to disable the support for it as +// well (we would be missing required specializations otherwise). +// +#if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT) +# undef BOOST_NO_INTRINSIC_WCHAR_T +# define BOOST_NO_INTRINSIC_WCHAR_T +#endif + +// +// Borland ships a version of STLport with C++ Builder 6 that lacks +// hashtables and the like: +// +#if defined(__BORLANDC__) && (__BORLANDC__ == 0x560) +# undef BOOST_HAS_HASH +#endif + +// +// gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max +// +#if defined(__GNUC__) && (__GNUC__ < 3) +# include // for std::min and std::max +# define BOOST_USING_STD_MIN() ((void)0) +# define BOOST_USING_STD_MAX() ((void)0) +namespace boost { using std::min; using std::max; } +#endif + +#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT) + + + + + + + + diff --git a/trunk/eo/contrib/boost/config/stdlib/vacpp.hpp b/trunk/eo/contrib/boost/config/stdlib/vacpp.hpp new file mode 100644 index 000000000..8321ee0cc --- /dev/null +++ b/trunk/eo/contrib/boost/config/stdlib/vacpp.hpp @@ -0,0 +1,18 @@ +// (C) Copyright John Maddock 2001 - 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +#if __IBMCPP__ <= 501 +# define BOOST_NO_STD_ALLOCATOR +#endif + +#define BOOST_HAS_MACRO_USE_FACET +#define BOOST_NO_STD_MESSAGES + +#define BOOST_STDLIB "Visual Age default standard library" + + + diff --git a/trunk/eo/contrib/boost/config/suffix.hpp b/trunk/eo/contrib/boost/config/suffix.hpp new file mode 100644 index 000000000..d4d9502d4 --- /dev/null +++ b/trunk/eo/contrib/boost/config/suffix.hpp @@ -0,0 +1,547 @@ +// Boost config.hpp configuration header file ------------------------------// + +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright Bill Kempf 2002. +// (C) Copyright Jens Maurer 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Gennaro Prota 2003. +// (C) Copyright Eric Friedman 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Boost config.hpp policy and rationale documentation has been moved to +// http://www.boost.org/libs/config +// +// This file is intended to be stable, and relatively unchanging. +// It should contain boilerplate code only - no compiler specific +// code unless it is unavoidable - no changes unless unavoidable. + +#ifndef BOOST_CONFIG_SUFFIX_HPP +#define BOOST_CONFIG_SUFFIX_HPP + +// +// look for long long by looking for the appropriate macros in . +// Note that we use limits.h rather than climits for maximal portability, +// remember that since these just declare a bunch of macros, there should be +// no namespace issues from this. +// +#include +# if !defined(BOOST_HAS_LONG_LONG) \ + && !defined(BOOST_MSVC) && !defined(__BORLANDC__) \ + && (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) +# define BOOST_HAS_LONG_LONG +#endif + +// TODO: Remove the following lines after the 1.33 release because the presence +// of an integral 64 bit type has nothing to do with support for long long. + +#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(__DECCXX_VER) +# define BOOST_NO_INTEGRAL_INT64_T +#endif + +// GCC 3.x will clean up all of those nasty macro definitions that +// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine +// it under GCC 3.x. +#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS) +# undef BOOST_NO_CTYPE_FUNCTIONS +#endif + + +// +// Assume any extensions are in namespace std:: unless stated otherwise: +// +# ifndef BOOST_STD_EXTENSION_NAMESPACE +# define BOOST_STD_EXTENSION_NAMESPACE std +# endif + +// +// If cv-qualified specializations are not allowed, then neither are cv-void ones: +// +# if defined(BOOST_NO_CV_SPECIALIZATIONS) \ + && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) +# define BOOST_NO_CV_VOID_SPECIALIZATIONS +# endif + +// +// If there is no numeric_limits template, then it can't have any compile time +// constants either! +// +# if defined(BOOST_NO_LIMITS) \ + && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS +# endif + +// +// if there is no long long then there is no specialisation +// for numeric_limits either: +// +#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS) +# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS +#endif + +// +// if there is no __int64 then there is no specialisation +// for numeric_limits<__int64> either: +// +#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS) +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +#endif + +// +// if member templates are supported then so is the +// VC6 subset of member templates: +// +# if !defined(BOOST_NO_MEMBER_TEMPLATES) \ + && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) +# define BOOST_MSVC6_MEMBER_TEMPLATES +# endif + +// +// Without partial specialization, can't test for partial specialisation bugs: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) +# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG +# endif + +// +// Without partial specialization, we can't have array-type partial specialisations: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS +# endif + +// +// Without partial specialization, std::iterator_traits can't work: +// +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_NO_STD_ITERATOR_TRAITS) +# define BOOST_NO_STD_ITERATOR_TRAITS +# endif + +// +// Without member template support, we can't have template constructors +// in the standard library either: +// +# if defined(BOOST_NO_MEMBER_TEMPLATES) \ + && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ + && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS) +# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS +# endif + +// +// Without member template support, we can't have a conforming +// std::allocator template either: +// +# if defined(BOOST_NO_MEMBER_TEMPLATES) \ + && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ + && !defined(BOOST_NO_STD_ALLOCATOR) +# define BOOST_NO_STD_ALLOCATOR +# endif + +// +// without ADL support then using declarations will break ADL as well: +// +#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#endif + +// +// If we have a standard allocator, then we have a partial one as well: +// +#if !defined(BOOST_NO_STD_ALLOCATOR) +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +#endif + +// +// We can't have a working std::use_facet if there is no std::locale: +// +# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET) +# define BOOST_NO_STD_USE_FACET +# endif + +// +// We can't have a std::messages facet if there is no std::locale: +// +# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES) +# define BOOST_NO_STD_MESSAGES +# endif + +// +// We can't have a working std::wstreambuf if there is no std::locale: +// +# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF) +# define BOOST_NO_STD_WSTREAMBUF +# endif + +// +// We can't have a if there is no : +// +# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE) +# define BOOST_NO_CWCTYPE +# endif + +// +// We can't have a swprintf if there is no : +// +# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF) +# define BOOST_NO_SWPRINTF +# endif + +// +// If Win32 support is turned off, then we must turn off +// threading support also, unless there is some other +// thread API enabled: +// +#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \ + && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS) +# define BOOST_DISABLE_THREADS +#endif + +// +// Turn on threading support if the compiler thinks that it's in +// multithreaded mode. We put this here because there are only a +// limited number of macros that identify this (if there's any missing +// from here then add to the appropriate compiler section): +// +#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \ + || defined(_PTHREADS)) && !defined(BOOST_HAS_THREADS) +# define BOOST_HAS_THREADS +#endif + +// +// Turn threading support off if BOOST_DISABLE_THREADS is defined: +// +#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS) +# undef BOOST_HAS_THREADS +#endif + +// +// Turn threading support off if we don't recognise the threading API: +// +#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\ + && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\ + && !defined(BOOST_HAS_MPTASKS) +# undef BOOST_HAS_THREADS +#endif + +// +// Turn threading detail macros off if we don't (want to) use threading +// +#ifndef BOOST_HAS_THREADS +# undef BOOST_HAS_PTHREADS +# undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# undef BOOST_HAS_WINTHREADS +# undef BOOST_HAS_BETHREADS +# undef BOOST_HAS_MPTASKS +#endif + +// +// If the compiler claims to be C99 conformant, then it had better +// have a : +// +# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) +# define BOOST_HAS_STDINT_H +# endif + +// +// Define BOOST_NO_SLIST and BOOST_NO_HASH if required. +// Note that this is for backwards compatibility only. +// +# ifndef BOOST_HAS_SLIST +# define BOOST_NO_SLIST +# endif + +# ifndef BOOST_HAS_HASH +# define BOOST_NO_HASH +# endif + +// BOOST_HAS_ABI_HEADERS +// This macro gets set if we have headers that fix the ABI, +// and prevent ODR violations when linking to external libraries: +#if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS) +# define BOOST_HAS_ABI_HEADERS +#endif + +#if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS) +# undef BOOST_HAS_ABI_HEADERS +#endif + +// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------// +// Because std::size_t usage is so common, even in boost headers which do not +// otherwise use the C library, the workaround is included here so +// that ugly workaround code need not appear in many other boost headers. +// NOTE WELL: This is a workaround for non-conforming compilers; +// must still be #included in the usual places so that inclusion +// works as expected with standard conforming compilers. The resulting +// double inclusion of is harmless. + +# ifdef BOOST_NO_STDC_NAMESPACE +# include + namespace std { using ::ptrdiff_t; using ::size_t; } +# endif + +// Workaround for the unfortunate min/max macros defined by some platform headers + +#define BOOST_PREVENT_MACRO_SUBSTITUTION + +#ifndef BOOST_USING_STD_MIN +# define BOOST_USING_STD_MIN() using std::min +#endif + +#ifndef BOOST_USING_STD_MAX +# define BOOST_USING_STD_MAX() using std::max +#endif + +// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------// + +# ifdef BOOST_NO_STD_MIN_MAX + +namespace std { + template + inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { + return __b < __a ? __b : __a; + } + template + inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { + return __a < __b ? __b : __a; + } +} + +# endif + +// BOOST_STATIC_CONSTANT workaround --------------------------------------- // +// On compilers which don't allow in-class initialization of static integral +// constant members, we must use enums as a workaround if we want the constants +// to be available at compile-time. This macro gives us a convenient way to +// declare such constants. + +# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment } +# else +# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment +# endif + +// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------// +// When the standard library does not have a conforming std::use_facet there +// are various workarounds available, but they differ from library to library. +// The same problem occurs with has_facet. +// These macros provide a consistent way to access a locale's facets. +// Usage: +// replace +// std::use_facet(loc); +// with +// BOOST_USE_FACET(Type, loc); +// Note do not add a std:: prefix to the front of BOOST_USE_FACET! +// Use for BOOST_HAS_FACET is analagous. + +#if defined(BOOST_NO_STD_USE_FACET) +# ifdef BOOST_HAS_TWO_ARG_USE_FACET +# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast(0)) +# define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast(0)) +# elif defined(BOOST_HAS_MACRO_USE_FACET) +# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type) +# define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type) +# elif defined(BOOST_HAS_STLP_USE_FACET) +# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet(loc)) +# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) +# endif +#else +# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc) +# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) +#endif + +// BOOST_NESTED_TEMPLATE workaround ------------------------------------------// +// Member templates are supported by some compilers even though they can't use +// the A::template member syntax, as a workaround replace: +// +// typedef typename A::template rebind binder; +// +// with: +// +// typedef typename A::BOOST_NESTED_TEMPLATE rebind binder; + +#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD +# define BOOST_NESTED_TEMPLATE template +#else +# define BOOST_NESTED_TEMPLATE +#endif + +// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------// +// Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION +// is defined, in which case it evaluates to return x; Use when you have a return +// statement that can never be reached. + +#ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION +# define BOOST_UNREACHABLE_RETURN(x) return x; +#else +# define BOOST_UNREACHABLE_RETURN(x) +#endif + +// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------// +// +// Some compilers don't support the use of `typename' for dependent +// types in deduced contexts, e.g. +// +// template void f(T, typename T::type); +// ^^^^^^^^ +// Replace these declarations with: +// +// template void f(T, BOOST_DEDUCED_TYPENAME T::type); + +#ifndef BOOST_NO_DEDUCED_TYPENAME +# define BOOST_DEDUCED_TYPENAME typename +#else +# define BOOST_DEDUCED_TYPENAME +#endif + +// long long workaround ------------------------------------------// +// On gcc (and maybe other compilers?) long long is alway supported +// but it's use may generate either warnings (with -ansi), or errors +// (with -pedantic -ansi) unless it's use is prefixed by __extension__ +// +#if defined(BOOST_HAS_LONG_LONG) +namespace boost{ +# ifdef __GNUC__ + __extension__ typedef long long long_long_type; + __extension__ typedef unsigned long long ulong_long_type; +# else + typedef long long long_long_type; + typedef unsigned long long ulong_long_type; +# endif +} +#endif + +// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// +// +// Some compilers have problems with function templates whose +// template parameters don't appear in the function parameter +// list (basically they just link one instantiation of the +// template in the final executable). These macros provide a +// uniform way to cope with the problem with no effects on the +// calling syntax. + +// Example: +// +// #include +// #include +// #include +// +// template +// void f() { std::cout << n << ' '; } +// +// template +// void g() { std::cout << typeid(T).name() << ' '; } +// +// int main() { +// f<1>(); +// f<2>(); +// +// g(); +// g(); +// } +// +// With VC++ 6.0 the output is: +// +// 2 2 double double +// +// To fix it, write +// +// template +// void f(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, n)) { ... } +// +// template +// void g(BOOST_EXPLICIT_TEMPLATE_TYPE(T)) { ... } +// + + +#if defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS + +# include "boost/type.hpp" +# include "boost/non_type.hpp" + +# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) boost::type* = 0 +# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type* +# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type* = 0 +# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type* + +# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \ + , BOOST_EXPLICIT_TEMPLATE_TYPE(t) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \ + , BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \ + , BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \ + , BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) + +#else + +// no workaround needed: expand to nothing + +# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) +# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) +# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) +# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) + +# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) +# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) + + +#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS + + +// ---------------------------------------------------------------------------// + +// +// Helper macro BOOST_STRINGIZE: +// Converts the parameter X to a string after macro replacement +// on X has been performed. +// +#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) +#define BOOST_DO_STRINGIZE(X) #X + +// +// Helper macro BOOST_JOIN: +// The following piece of macro magic joins the two +// arguments together, even when one of the arguments is +// itself a macro (see 16.3.1 in C++ standard). The key +// is that macro expansion of macro arguments does not +// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN. +// +#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y ) +#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y) +#define BOOST_DO_JOIN2( X, Y ) X##Y + +// +// Set some default values for compiler/library/platform names. +// These are for debugging config setup only: +// +# ifndef BOOST_COMPILER +# define BOOST_COMPILER "Unknown ISO C++ Compiler" +# endif +# ifndef BOOST_STDLIB +# define BOOST_STDLIB "Unknown ISO standard library" +# endif +# ifndef BOOST_PLATFORM +# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \ + || defined(_POSIX_SOURCE) +# define BOOST_PLATFORM "Generic Unix" +# else +# define BOOST_PLATFORM "Unknown" +# endif +# endif + +#endif + + + diff --git a/trunk/eo/contrib/boost/config/user.hpp b/trunk/eo/contrib/boost/config/user.hpp new file mode 100644 index 000000000..5a4a9d477 --- /dev/null +++ b/trunk/eo/contrib/boost/config/user.hpp @@ -0,0 +1,124 @@ +// boost/config/user.hpp ---------------------------------------------------// + +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Do not check in modified versions of this file, +// This file may be customized by the end user, but not by boost. + +// +// Use this file to define a site and compiler specific +// configuration policy: +// + +// define this to locate a compiler config file: +// #define BOOST_COMPILER_CONFIG + +// define this to locate a stdlib config file: +// #define BOOST_STDLIB_CONFIG + +// define this to locate a platform config file: +// #define BOOST_PLATFORM_CONFIG + +// define this to disable compiler config, +// use if your compiler config has nothing to set: +// #define BOOST_NO_COMPILER_CONFIG + +// define this to disable stdlib config, +// use if your stdlib config has nothing to set: +// #define BOOST_NO_STDLIB_CONFIG + +// define this to disable platform config, +// use if your platform config has nothing to set: +// #define BOOST_NO_PLATFORM_CONFIG + +// define this to disable all config options, +// excluding the user config. Use if your +// setup is fully ISO compliant, and has no +// useful extensions, or for autoconf generated +// setups: +// #define BOOST_NO_CONFIG + +// define this to make the config "optimistic" +// about unknown compiler versions. Normally +// unknown compiler versions are assumed to have +// all the defects of the last known version, however +// setting this flag, causes the config to assume +// that unknown compiler versions are fully conformant +// with the standard: +// #define BOOST_STRICT_CONFIG + +// define this to cause the config to halt compilation +// with an #error if it encounters anything unknown -- +// either an unknown compiler version or an unknown +// compiler/platform/library: +// #define BOOST_ASSERT_CONFIG + + +// define if you want to disable threading support, even +// when available: +// #define BOOST_DISABLE_THREADS + +// define when you want to disable Win32 specific features +// even when available: +// #define BOOST_DISABLE_WIN32 + +// BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any +// prefix/suffix headers that normally control things like struct +// packing and alignment. +// #define BOOST_DISABLE_ABI_HEADERS + +// BOOST_ABI_PREFIX: A prefix header to include in place of whatever +// boost.config would normally select, any replacement should set up +// struct packing and alignment options as required. +// #define BOOST_ABI_PREFIX my-header-name + +// BOOST_ABI_SUFFIX: A suffix header to include in place of whatever +// boost.config would normally select, any replacement should undo +// the effects of the prefix header. +// #define BOOST_ABI_SUFFIX my-header-name + +// BOOST_ALL_DYN_LINK: Forces all libraries that have separate source, +// to be linked as dll's rather than static libraries on Microsoft Windows +// (this macro is used to turn on __declspec(dllimport) modifiers, so that +// the compiler knows which symbols to look for in a dll rather than in a +// static library). Note that there may be some libraries that can only +// be statically linked (Boost.Test for example) and others which may only +// be dynamically linked (Boost.Threads for example), in these cases this +// macro has no effect. +// #define BOOST_ALL_DYN_LINK + +// BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll +// rather than a static library on Microsoft Windows: replace the WHATEVER +// part of the macro name with the name of the library that you want to +// dynamically link to, for example use BOOST_DATE_TIME_DYN_LINK or +// BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport) +// modifiers, so that the compiler knows which symbols to look for in a dll +// rather than in a static library). +// Note that there may be some libraries that can only be statically linked +// (Boost.Test for example) and others which may only be dynamically linked +// (Boost.Threads for example), in these cases this macro is unsupported. +// #define BOOST_WHATEVER_DYN_LINK + +// BOOST_ALL_NO_LIB: Tells the config system not to automatically select +// which libraries to link against. +// Normally if a compiler supports #pragma lib, then the correct library +// build variant will be automatically selected and linked against, +// simply by the act of including one of that library's headers. +// This macro turns that feature off. +// #define BOOST_ALL_NO_LIB + +// BOOST_WHATEVER_NO_LIB: Tells the config system not to automatically +// select which library to link against for library "whatever", +// replace WHATEVER in the macro name with the name of the library; +// for example BOOST_DATE_TIME_NO_LIB or BOOST_REGEX_NO_LIB. +// Normally if a compiler supports #pragma lib, then the correct library +// build variant will be automatically selected and linked against, simply +// by the act of including one of that library's headers. This macro turns +// that feature off. +// #define BOOST_WHATEVER_NO_LIB + + + diff --git a/trunk/eo/contrib/boost/limits.hpp b/trunk/eo/contrib/boost/limits.hpp new file mode 100644 index 000000000..856072085 --- /dev/null +++ b/trunk/eo/contrib/boost/limits.hpp @@ -0,0 +1,142 @@ +// (C) Copyright John maddock 1999. +// (C) David Abrahams 2002. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// use this header as a workaround for missing + +// See http://www.boost.org/libs/utility/limits.html for documentation. + +#ifndef BOOST_LIMITS +#define BOOST_LIMITS + +#include + +#ifdef BOOST_NO_LIMITS +# include +#else +# include +#endif + +#if (defined(BOOST_HAS_LONG_LONG) && defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)) \ + || (defined(BOOST_HAS_MS_INT64) && defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)) +// Add missing specializations for numeric_limits: +#ifdef BOOST_HAS_MS_INT64 +# define BOOST_LLT __int64 +# define BOOST_ULLT unsigned __int64 +#else +# define BOOST_LLT ::boost::long_long_type +# define BOOST_ULLT ::boost::ulong_long_type +#endif + +namespace std +{ + template<> + class numeric_limits + { + public: + + BOOST_STATIC_CONSTANT(bool, is_specialized = true); +#ifdef BOOST_HAS_MS_INT64 + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x8000000000000000i64; } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x7FFFFFFFFFFFFFFFi64; } +#elif defined(LLONG_MAX) + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MIN; } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MAX; } +#elif defined(LONGLONG_MAX) + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MIN; } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MAX; } +#else + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 1LL << (sizeof(BOOST_LLT) * CHAR_BIT - 1); } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~(min)(); } +#endif + BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT -1); + BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT) - 1) * 301L / 1000); + BOOST_STATIC_CONSTANT(bool, is_signed = true); + BOOST_STATIC_CONSTANT(bool, is_integer = true); + BOOST_STATIC_CONSTANT(bool, is_exact = true); + BOOST_STATIC_CONSTANT(int, radix = 2); + static BOOST_LLT epsilon() throw() { return 0; }; + static BOOST_LLT round_error() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(int, min_exponent = 0); + BOOST_STATIC_CONSTANT(int, min_exponent10 = 0); + BOOST_STATIC_CONSTANT(int, max_exponent = 0); + BOOST_STATIC_CONSTANT(int, max_exponent10 = 0); + + BOOST_STATIC_CONSTANT(bool, has_infinity = false); + BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_denorm = false); + BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false); + static BOOST_LLT infinity() throw() { return 0; }; + static BOOST_LLT quiet_NaN() throw() { return 0; }; + static BOOST_LLT signaling_NaN() throw() { return 0; }; + static BOOST_LLT denorm_min() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(bool, is_iec559 = false); + BOOST_STATIC_CONSTANT(bool, is_bounded = false); + BOOST_STATIC_CONSTANT(bool, is_modulo = false); + + BOOST_STATIC_CONSTANT(bool, traps = false); + BOOST_STATIC_CONSTANT(bool, tinyness_before = false); + BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); + + }; + + template<> + class numeric_limits + { + public: + + BOOST_STATIC_CONSTANT(bool, is_specialized = true); +#ifdef BOOST_HAS_MS_INT64 + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0ui64; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0xFFFFFFFFFFFFFFFFui64; } +#elif defined(ULLONG_MAX) && defined(ULLONG_MIN) + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MIN; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MAX; } +#elif defined(ULONGLONG_MAX) && defined(ULONGLONG_MIN) + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MIN; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MAX; } +#else + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0uLL; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~0uLL; } +#endif + BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT); + BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT)) * 301L / 1000); + BOOST_STATIC_CONSTANT(bool, is_signed = false); + BOOST_STATIC_CONSTANT(bool, is_integer = true); + BOOST_STATIC_CONSTANT(bool, is_exact = true); + BOOST_STATIC_CONSTANT(int, radix = 2); + static BOOST_ULLT epsilon() throw() { return 0; }; + static BOOST_ULLT round_error() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(int, min_exponent = 0); + BOOST_STATIC_CONSTANT(int, min_exponent10 = 0); + BOOST_STATIC_CONSTANT(int, max_exponent = 0); + BOOST_STATIC_CONSTANT(int, max_exponent10 = 0); + + BOOST_STATIC_CONSTANT(bool, has_infinity = false); + BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_denorm = false); + BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false); + static BOOST_ULLT infinity() throw() { return 0; }; + static BOOST_ULLT quiet_NaN() throw() { return 0; }; + static BOOST_ULLT signaling_NaN() throw() { return 0; }; + static BOOST_ULLT denorm_min() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(bool, is_iec559 = false); + BOOST_STATIC_CONSTANT(bool, is_bounded = false); + BOOST_STATIC_CONSTANT(bool, is_modulo = false); + + BOOST_STATIC_CONSTANT(bool, traps = false); + BOOST_STATIC_CONSTANT(bool, tinyness_before = false); + BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); + + }; +} +#endif + +#endif diff --git a/trunk/eo/contrib/boost/numeric/interval.hpp b/trunk/eo/contrib/boost/numeric/interval.hpp new file mode 100644 index 000000000..e6f976df0 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval.hpp @@ -0,0 +1,32 @@ +/* Boost interval.hpp header file + * + * Copyright 2000 Jens Maurer + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_HPP +#define BOOST_NUMERIC_INTERVAL_HPP + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#endif // BOOST_NUMERIC_INTERVAL_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/arith.hpp b/trunk/eo/contrib/boost/numeric/interval/arith.hpp new file mode 100644 index 000000000..64a8e97ee --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/arith.hpp @@ -0,0 +1,305 @@ +/* Boost interval/arith.hpp template implementation file + * + * Copyright 2000 Jens Maurer + * Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_ARITH_HPP +#define BOOST_NUMERIC_INTERVAL_ARITH_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace numeric { + +/* + * Basic arithmetic operators + */ + +template inline +const interval& operator+(const interval& x) +{ + return x; +} + +template inline +interval operator-(const interval& x) +{ + if (interval_lib::detail::test_input(x)) + return interval::empty(); + return interval(-x.upper(), -x.lower(), true); +} + +template inline +interval& interval::operator+=(const interval& r) +{ + if (interval_lib::detail::test_input(*this, r)) + set_empty(); + else { + typename Policies::rounding rnd; + set(rnd.add_down(low, r.low), rnd.add_up(up, r.up)); + } + return *this; +} + +template inline +interval& interval::operator+=(const T& r) +{ + if (interval_lib::detail::test_input(*this, r)) + set_empty(); + else { + typename Policies::rounding rnd; + set(rnd.add_down(low, r), rnd.add_up(up, r)); + } + return *this; +} + +template inline +interval& interval::operator-=(const interval& r) +{ + if (interval_lib::detail::test_input(*this, r)) + set_empty(); + else { + typename Policies::rounding rnd; + set(rnd.sub_down(low, r.up), rnd.sub_up(up, r.low)); + } + return *this; +} + +template inline +interval& interval::operator-=(const T& r) +{ + if (interval_lib::detail::test_input(*this, r)) + set_empty(); + else { + typename Policies::rounding rnd; + set(rnd.sub_down(low, r), rnd.sub_up(up, r)); + } + return *this; +} + +template inline +interval& interval::operator*=(const interval& r) +{ + return *this = *this * r; +} + +template inline +interval& interval::operator*=(const T& r) +{ + return *this = r * *this; +} + +template inline +interval& interval::operator/=(const interval& r) +{ + return *this = *this / r; +} + +template inline +interval& interval::operator/=(const T& r) +{ + return *this = *this / r; +} + +template inline +interval operator+(const interval& x, + const interval& y) +{ + if (interval_lib::detail::test_input(x, y)) + return interval::empty(); + typename Policies::rounding rnd; + return interval(rnd.add_down(x.lower(), y.lower()), + rnd.add_up (x.upper(), y.upper()), true); +} + +template inline +interval operator+(const T& x, const interval& y) +{ + if (interval_lib::detail::test_input(x, y)) + return interval::empty(); + typename Policies::rounding rnd; + return interval(rnd.add_down(x, y.lower()), + rnd.add_up (x, y.upper()), true); +} + +template inline +interval operator+(const interval& x, const T& y) +{ return y + x; } + +template inline +interval operator-(const interval& x, + const interval& y) +{ + if (interval_lib::detail::test_input(x, y)) + return interval::empty(); + typename Policies::rounding rnd; + return interval(rnd.sub_down(x.lower(), y.upper()), + rnd.sub_up (x.upper(), y.lower()), true); +} + +template inline +interval operator-(const T& x, const interval& y) +{ + if (interval_lib::detail::test_input(x, y)) + return interval::empty(); + typename Policies::rounding rnd; + return interval(rnd.sub_down(x, y.upper()), + rnd.sub_up (x, y.lower()), true); +} + +template inline +interval operator-(const interval& x, const T& y) +{ + if (interval_lib::detail::test_input(x, y)) + return interval::empty(); + typename Policies::rounding rnd; + return interval(rnd.sub_down(x.lower(), y), + rnd.sub_up (x.upper(), y), true); +} + +template inline +interval operator*(const interval& x, + const interval& y) +{ + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); + typedef interval I; + if (interval_lib::detail::test_input(x, y)) + return I::empty(); + typename Policies::rounding rnd; + const T& xl = x.lower(); + const T& xu = x.upper(); + const T& yl = y.lower(); + const T& yu = y.upper(); + + if (interval_lib::user::is_neg(xl)) + if (interval_lib::user::is_pos(xu)) + if (interval_lib::user::is_neg(yl)) + if (interval_lib::user::is_pos(yu)) // M * M + return I(min BOOST_PREVENT_MACRO_SUBSTITUTION(rnd.mul_down(xl, yu), rnd.mul_down(xu, yl)), + max BOOST_PREVENT_MACRO_SUBSTITUTION(rnd.mul_up (xl, yl), rnd.mul_up (xu, yu)), true); + else // M * N + return I(rnd.mul_down(xu, yl), rnd.mul_up(xl, yl), true); + else + if (interval_lib::user::is_pos(yu)) // M * P + return I(rnd.mul_down(xl, yu), rnd.mul_up(xu, yu), true); + else // M * Z + return I(static_cast(0), static_cast(0), true); + else + if (interval_lib::user::is_neg(yl)) + if (interval_lib::user::is_pos(yu)) // N * M + return I(rnd.mul_down(xl, yu), rnd.mul_up(xl, yl), true); + else // N * N + return I(rnd.mul_down(xu, yu), rnd.mul_up(xl, yl), true); + else + if (interval_lib::user::is_pos(yu)) // N * P + return I(rnd.mul_down(xl, yu), rnd.mul_up(xu, yl), true); + else // N * Z + return I(static_cast(0), static_cast(0), true); + else + if (interval_lib::user::is_pos(xu)) + if (interval_lib::user::is_neg(yl)) + if (interval_lib::user::is_pos(yu)) // P * M + return I(rnd.mul_down(xu, yl), rnd.mul_up(xu, yu), true); + else // P * N + return I(rnd.mul_down(xu, yl), rnd.mul_up(xl, yu), true); + else + if (interval_lib::user::is_pos(yu)) // P * P + return I(rnd.mul_down(xl, yl), rnd.mul_up(xu, yu), true); + else // P * Z + return I(static_cast(0), static_cast(0), true); + else // Z * ? + return I(static_cast(0), static_cast(0), true); +} + +template inline +interval operator*(const T& x, const interval& y) +{ + typedef interval I; + if (interval_lib::detail::test_input(x, y)) + return I::empty(); + typename Policies::rounding rnd; + const T& yl = y.lower(); + const T& yu = y.upper(); + // x is supposed not to be infinite + if (interval_lib::user::is_neg(x)) + return I(rnd.mul_down(x, yu), rnd.mul_up(x, yl), true); + else if (interval_lib::user::is_zero(x)) + return I(static_cast(0), static_cast(0), true); + else + return I(rnd.mul_down(x, yl), rnd.mul_up(x, yu), true); +} + +template inline +interval operator*(const interval& x, const T& y) +{ return y * x; } + +template inline +interval operator/(const interval& x, + const interval& y) +{ + if (interval_lib::detail::test_input(x, y)) + return interval::empty(); + if (in_zero(y)) + if (!interval_lib::user::is_zero(y.lower())) + if (!interval_lib::user::is_zero(y.upper())) + return interval_lib::detail::div_zero(x); + else + return interval_lib::detail::div_negative(x, y.lower()); + else + if (!interval_lib::user::is_zero(y.upper())) + return interval_lib::detail::div_positive(x, y.upper()); + else + return interval::empty(); + else + return interval_lib::detail::div_non_zero(x, y); +} + +template inline +interval operator/(const T& x, const interval& y) +{ + if (interval_lib::detail::test_input(x, y)) + return interval::empty(); + if (in_zero(y)) + if (!interval_lib::user::is_zero(y.lower())) + if (!interval_lib::user::is_zero(y.upper())) + return interval_lib::detail::div_zero(x); + else + return interval_lib::detail::div_negative(x, y.lower()); + else + if (!interval_lib::user::is_zero(y.upper())) + return interval_lib::detail::div_positive(x, y.upper()); + else + return interval::empty(); + else + return interval_lib::detail::div_non_zero(x, y); +} + +template inline +interval operator/(const interval& x, const T& y) +{ + if (interval_lib::detail::test_input(x, y) || interval_lib::user::is_zero(y)) + return interval::empty(); + typename Policies::rounding rnd; + const T& xl = x.lower(); + const T& xu = x.upper(); + if (interval_lib::user::is_neg(y)) + return interval(rnd.div_down(xu, y), rnd.div_up(xl, y), true); + else + return interval(rnd.div_down(xl, y), rnd.div_up(xu, y), true); +} + +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_ARITH_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/arith2.hpp b/trunk/eo/contrib/boost/numeric/interval/arith2.hpp new file mode 100644 index 000000000..274a68119 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/arith2.hpp @@ -0,0 +1,212 @@ +/* Boost interval/arith2.hpp template implementation file + * + * This header provides some auxiliary arithmetic + * functions: fmod, sqrt, square, pov, inverse and + * a multi-interval division. + * + * Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_ARITH2_HPP +#define BOOST_NUMERIC_INTERVAL_ARITH2_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace numeric { + +template inline +interval fmod(const interval& x, + const interval& y) +{ + if (interval_lib::detail::test_input(x, y)) + return interval::empty(); + typename Policies::rounding rnd; + typedef typename interval_lib::unprotect >::type I; + T const &yb = interval_lib::user::is_neg(x.lower()) ? y.lower() : y.upper(); + T n = rnd.int_down(rnd.div_down(x.lower(), yb)); + return (const I&)x - n * (const I&)y; +} + +template inline +interval fmod(const interval& x, const T& y) +{ + if (interval_lib::detail::test_input(x, y)) + return interval::empty(); + typename Policies::rounding rnd; + typedef typename interval_lib::unprotect >::type I; + T n = rnd.int_down(rnd.div_down(x.lower(), y)); + return (const I&)x - n * I(y); +} + +template inline +interval fmod(const T& x, const interval& y) +{ + if (interval_lib::detail::test_input(x, y)) + return interval::empty(); + typename Policies::rounding rnd; + typedef typename interval_lib::unprotect >::type I; + T const &yb = interval_lib::user::is_neg(x) ? y.lower() : y.upper(); + T n = rnd.int_down(rnd.div_down(x, yb)); + return x - n * (const I&)y; +} + +namespace interval_lib { + +template inline +interval division_part1(const interval& x, + const interval& y, bool& b) +{ + typedef interval I; + b = false; + if (detail::test_input(x, y)) + return I::empty(); + if (in_zero(y)) + if (!user::is_zero(y.lower())) + if (!user::is_zero(y.upper())) + return detail::div_zero_part1(x, y, b); + else + return detail::div_negative(x, y.lower()); + else + if (!user::is_zero(y.upper())) + return detail::div_positive(x, y.upper()); + else + return I::empty(); + else + return detail::div_non_zero(x, y); +} + +template inline +interval division_part2(const interval& x, + const interval& y, bool b = true) +{ + if (!b) return interval::empty(); + return detail::div_zero_part2(x, y); +} + +template inline +interval multiplicative_inverse(const interval& x) +{ + typedef interval I; + if (detail::test_input(x)) + return I::empty(); + T one = static_cast(1); + typename Policies::rounding rnd; + if (in_zero(x)) { + typedef typename Policies::checking checking; + if (!user::is_zero(x.lower())) + if (!user::is_zero(x.upper())) + return I::whole(); + else + return I(checking::neg_inf(), rnd.div_up(one, x.lower()), true); + else + if (!user::is_zero(x.upper())) + return I(rnd.div_down(one, x.upper()), checking::pos_inf(), true); + else + return I::empty(); + } else + return I(rnd.div_down(one, x.upper()), rnd.div_up(one, x.lower()), true); +} + +namespace detail { + +template inline +T pow_aux(const T& x_, int pwr, Rounding& rnd) // x and pwr are positive +{ + T x = x_; + T y = (pwr & 1) ? x_ : static_cast(1); + pwr >>= 1; + while (pwr > 0) { + x = rnd.mul_up(x, x); + if (pwr & 1) y = rnd.mul_up(x, y); + pwr >>= 1; + } + return y; +} + +} // namespace detail +} // namespace interval_lib + +template inline +interval pow(const interval& x, int pwr) +{ + BOOST_USING_STD_MAX(); + using interval_lib::detail::pow_aux; + typedef interval I; + + if (interval_lib::detail::test_input(x)) + return I::empty(); + + if (pwr == 0) + if (interval_lib::user::is_zero(x.lower()) + && interval_lib::user::is_zero(x.upper())) + return I::empty(); + else + return I(static_cast(1)); + else if (pwr < 0) + return interval_lib::multiplicative_inverse(pow(x, -pwr)); + + typename Policies::rounding rnd; + + if (interval_lib::user::is_neg(x.upper())) { // [-2,-1] + T yl = pow_aux(-x.upper(), pwr, rnd); + T yu = pow_aux(-x.lower(), pwr, rnd); + if (pwr & 1) // [-2,-1]^1 + return I(-yu, -yl, true); + else // [-2,-1]^2 + return I(yl, yu, true); + } else if (interval_lib::user::is_neg(x.lower())) { // [-1,1] + if (pwr & 1) { // [-1,1]^1 + return I(-pow_aux(-x.lower(), pwr, rnd), pow_aux(x.upper(), pwr, rnd), true); + } else { // [-1,1]^2 + return I(static_cast(0), pow_aux(max BOOST_PREVENT_MACRO_SUBSTITUTION(-x.lower(), x.upper()), pwr, rnd), true); + } + } else { // [1,2] + return I(pow_aux(x.lower(), pwr, rnd), pow_aux(x.upper(), pwr, rnd), true); + } +} + +template inline +interval sqrt(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x) || interval_lib::user::is_neg(x.upper())) + return I::empty(); + typename Policies::rounding rnd; + T l = !interval_lib::user::is_pos(x.lower()) ? static_cast(0) : rnd.sqrt_down(x.lower()); + return I(l, rnd.sqrt_up(x.upper()), true); +} + +template inline +interval square(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x)) + return I::empty(); + typename Policies::rounding rnd; + const T& xl = x.lower(); + const T& xu = x.upper(); + if (interval_lib::user::is_neg(xu)) + return I(rnd.mul_down(xu, xu), rnd.mul_up(xl, xl), true); + else if (interval_lib::user::is_pos(x.lower())) + return I(rnd.mul_down(xl, xl), rnd.mul_up(xu, xu), true); + else + return I(static_cast(0), (-xl > xu ? rnd.mul_up(xl, xl) : rnd.mul_up(xu, xu)), true); +} + +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_ARITH2_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/arith3.hpp b/trunk/eo/contrib/boost/numeric/interval/arith3.hpp new file mode 100644 index 000000000..518e6182f --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/arith3.hpp @@ -0,0 +1,69 @@ +/* Boost interval/arith3.hpp template implementation file + * + * This headers provides arithmetical functions + * which compute an interval given some base + * numbers. The resulting interval encloses the + * real result of the arithmetic operation. + * + * Copyright 2003 Guillaume Melquiond + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_ARITH3_HPP +#define BOOST_NUMERIC_INTERVAL_ARITH3_HPP + +#include +#include + +namespace boost { +namespace numeric { +namespace interval_lib { + +template inline +I add(const typename I::base_type& x, const typename I::base_type& y) +{ + typedef typename I::traits_type Policies; + if (detail::test_input(x, y)) + return I::empty(); + typename Policies::rounding rnd; + return I(rnd.add_down(x, y), rnd.add_up(x, y), true); +} + +template inline +I sub(const typename I::base_type& x, const typename I::base_type& y) +{ + typedef typename I::traits_type Policies; + if (detail::test_input(x, y)) + return I::empty(); + typename Policies::rounding rnd; + return I(rnd.sub_down(x, y), rnd.sub_up(x, y), true); +} + +template inline +I mul(const typename I::base_type& x, const typename I::base_type& y) +{ + typedef typename I::traits_type Policies; + if (detail::test_input(x, y)) + return I::empty(); + typename Policies::rounding rnd; + return I(rnd.mul_down(x, y), rnd.mul_up(x, y), true); +} + +template inline +I div(const typename I::base_type& x, const typename I::base_type& y) +{ + typedef typename I::traits_type Policies; + if (detail::test_input(x, y) || user::is_zero(y)) + return I::empty(); + typename Policies::rounding rnd; + return I(rnd.div_down(x, y), rnd.div_up(x, y), true); +} + +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_ARITH3_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/checking.hpp b/trunk/eo/contrib/boost/numeric/interval/checking.hpp new file mode 100644 index 000000000..2db486a0b --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/checking.hpp @@ -0,0 +1,130 @@ +/* Boost interval/checking.hpp template implementation file + * + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_CHECKING_HPP +#define BOOST_NUMERIC_INTERVAL_CHECKING_HPP + +#include +#include +#include +#include + +namespace boost { +namespace numeric { +namespace interval_lib { + +struct exception_create_empty +{ + void operator()() + { + throw std::runtime_error("boost::interval: empty interval created"); + } +}; + +struct exception_invalid_number +{ + void operator()() + { + throw std::invalid_argument("boost::interval: invalid number"); + } +}; + +template +struct checking_base +{ + static T pos_inf() + { + assert(std::numeric_limits::has_infinity); + return std::numeric_limits::infinity(); + } + static T neg_inf() + { + assert(std::numeric_limits::has_infinity); + return -std::numeric_limits::infinity(); + } + static T nan() + { + assert(std::numeric_limits::has_quiet_NaN); + return std::numeric_limits::quiet_NaN(); + } + static bool is_nan(const T& x) + { + return std::numeric_limits::has_quiet_NaN && (x != x); + } + static T empty_lower() + { + return (std::numeric_limits::has_quiet_NaN ? + std::numeric_limits::quiet_NaN() : static_cast(1)); + } + static T empty_upper() + { + return (std::numeric_limits::has_quiet_NaN ? + std::numeric_limits::quiet_NaN() : static_cast(0)); + } + static bool is_empty(const T& l, const T& u) + { + return !(l <= u); // safety for partial orders + } +}; + +template, + class Exception = exception_create_empty> +struct checking_no_empty: Checking +{ + static T nan() + { + assert(false); + return Checking::nan(); + } + static T empty_lower() + { + Exception()(); + return Checking::empty_lower(); + } + static T empty_upper() + { + Exception()(); + return Checking::empty_upper(); + } + static bool is_empty(const T&, const T&) + { + return false; + } +}; + +template > +struct checking_no_nan: Checking +{ + static bool is_nan(const T&) + { + return false; + } +}; + +template, + class Exception = exception_invalid_number> +struct checking_catch_nan: Checking +{ + static bool is_nan(const T& x) + { + if (Checking::is_nan(x)) Exception()(); + return false; + } +}; + +template +struct checking_strict: + checking_no_nan > +{}; + +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_CHECKING_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/compare.hpp b/trunk/eo/contrib/boost/numeric/interval/compare.hpp new file mode 100644 index 000000000..f21753e71 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/compare.hpp @@ -0,0 +1,19 @@ +/* Boost interval/compare.hpp template implementation file + * + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_HPP +#define BOOST_NUMERIC_INTERVAL_COMPARE_HPP + +#include +#include +#include +#include +#include + +#endif // BOOST_NUMERIC_INTERVAL_COMPARE_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/compare/certain.hpp b/trunk/eo/contrib/boost/numeric/interval/compare/certain.hpp new file mode 100644 index 000000000..9232d5cd8 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/compare/certain.hpp @@ -0,0 +1,113 @@ +/* Boost interval/compare/certain.hpp template implementation file + * + * Copyright 2003 Guillaume Melquiond + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_CERTAIN_HPP +#define BOOST_NUMERIC_INTERVAL_COMPARE_CERTAIN_HPP + +#include +#include + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace compare { +namespace certain { + +template inline +bool operator<(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.upper() < y.lower(); +} + +template inline +bool operator<(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.upper() < y; +} + +template inline +bool operator<=(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.upper() <= y.lower(); +} + +template inline +bool operator<=(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.upper() <= y; +} + +template inline +bool operator>(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() > y.upper(); +} + +template inline +bool operator>(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() > y; +} + +template inline +bool operator>=(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() >= y.upper(); +} + +template inline +bool operator>=(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() >= y; +} + +template inline +bool operator==(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.upper() == y.lower() && x.lower() == y.upper(); +} + +template inline +bool operator==(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.upper() == y && x.lower() == y; +} + +template inline +bool operator!=(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.upper() < y.lower() || x.lower() > y.upper(); +} + +template inline +bool operator!=(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.upper() < y || x.lower() > y; +} + +} // namespace certain +} // namespace compare +} // namespace interval_lib +} // namespace numeric +} // namespace boost + + +#endif // BOOST_NUMERIC_INTERVAL_COMPARE_CERTAIN_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/compare/explicit.hpp b/trunk/eo/contrib/boost/numeric/interval/compare/explicit.hpp new file mode 100644 index 000000000..8c68be891 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/compare/explicit.hpp @@ -0,0 +1,248 @@ +/* Boost interval/compare/explicit.hpp template implementation file + * + * Copyright 2000 Jens Maurer + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_EXPLICIT_HPP +#define BOOST_NUMERIC_INTERVAL_COMPARE_EXPLICIT_HPP + +#include + +namespace boost { +namespace numeric { +namespace interval_lib { + +/* + * Certainly... operations + */ + +template inline +bool cerlt(const interval& x, const interval& y) +{ + return x.upper() < y.lower(); +} + +template inline +bool cerlt(const interval& x, const T& y) +{ + return x.upper() < y; +} + +template inline +bool cerlt(const T& x, const interval& y) +{ + return x < y.lower(); +} + +template inline +bool cerle(const interval& x, const interval& y) +{ + return x.upper() <= y.lower(); +} + +template inline +bool cerle(const interval& x, const T& y) +{ + return x.upper() <= y; +} + +template inline +bool cerle(const T& x, const interval& y) +{ + return x <= y.lower(); +} + +template inline +bool cergt(const interval& x, const interval& y) +{ + return x.lower() > y.upper(); +} + +template inline +bool cergt(const interval& x, const T& y) +{ + return x.lower() > y; +} + +template inline +bool cergt(const T& x, const interval& y) +{ + return x > y.upper(); +} + +template inline +bool cerge(const interval& x, const interval& y) +{ + return x.lower() >= y.upper(); +} + +template inline +bool cerge(const interval& x, const T& y) +{ + return x.lower() >= y; +} + +template inline +bool cerge(const T& x, const interval& y) +{ + return x >= y.upper(); +} + +template inline +bool cereq(const interval& x, const interval& y) +{ + return x.lower() == y.upper() && y.lower() == x.upper(); +} + +template inline +bool cereq(const interval& x, const T& y) +{ + return x.lower() == y && x.upper() == y; +} + +template inline +bool cereq(const T& x, const interval& y) +{ + return x == y.lower() && x == y.upper(); +} + +template inline +bool cerne(const interval& x, const interval& y) +{ + return x.upper() < y.lower() || y.upper() < x.lower(); +} + +template inline +bool cerne(const interval& x, const T& y) +{ + return x.upper() < y || y < x.lower(); +} + +template inline +bool cerne(const T& x, const interval& y) +{ + return x < y.lower() || y.upper() < x; +} + +/* + * Possibly... comparisons + */ + +template inline +bool poslt(const interval& x, const interval& y) +{ + return x.lower() < y.upper(); +} + +template inline +bool poslt(const interval& x, const T& y) +{ + return x.lower() < y; +} + +template inline +bool poslt(const T& x, const interval& y) +{ + return x < y.upper(); +} + +template inline +bool posle(const interval& x, const interval& y) +{ + return x.lower() <= y.upper(); +} + +template inline +bool posle(const interval& x, const T& y) +{ + return x.lower() <= y; +} + +template inline +bool posle(const T& x, const interval& y) +{ + return x <= y.upper(); +} + +template inline +bool posgt(const interval& x, const interval& y) +{ + return x.upper() > y.lower(); +} + +template inline +bool posgt(const interval& x, const T& y) +{ + return x.upper() > y; +} + +template inline +bool posgt(const T& x, const interval & y) +{ + return x > y.lower(); +} + +template inline +bool posge(const interval& x, const interval& y) +{ + return x.upper() >= y.lower(); +} + +template inline +bool posge(const interval& x, const T& y) +{ + return x.upper() >= y; +} + +template inline +bool posge(const T& x, const interval& y) +{ + return x >= y.lower(); +} + +template inline +bool poseq(const interval& x, const interval& y) +{ + return x.upper() >= y.lower() && y.upper() >= x.lower(); +} + +template inline +bool poseq(const interval& x, const T& y) +{ + return x.upper() >= y && y >= x.lower(); +} + +template inline +bool poseq(const T& x, const interval& y) +{ + return x >= y.lower() && y.upper() >= x; +} + +template inline +bool posne(const interval& x, const interval& y) +{ + return x.upper() != y.lower() || y.upper() != x.lower(); +} + +template inline +bool posne(const interval& x, const T& y) +{ + return x.upper() != y || y != x.lower(); +} + +template inline +bool posne(const T& x, const interval& y) +{ + return x != y.lower() || y.upper() != x; +} + +} // namespace interval_lib +} // namespace numeric +} //namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_COMPARE_EXPLICIT_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/compare/lexicographic.hpp b/trunk/eo/contrib/boost/numeric/interval/compare/lexicographic.hpp new file mode 100644 index 000000000..03f6036d2 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/compare/lexicographic.hpp @@ -0,0 +1,122 @@ +/* Boost interval/compare/lexicographic.hpp template implementation file + * + * Copyright 2002-2003 Guillaume Melquiond + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_LEXICOGRAPHIC_HPP +#define BOOST_NUMERIC_INTERVAL_COMPARE_LEXICOGRAPHIC_HPP + +#include +#include + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace compare { +namespace lexicographic { + +template inline +bool operator<(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + const T& xl = x.lower(); + const T& yl = y.lower(); + return xl < yl || (xl == yl && x.upper() < y.upper()); +} + +template inline +bool operator<(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() < y; +} + +template inline +bool operator<=(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + const T& xl = x.lower(); + const T& yl = y.lower(); + return xl < yl || (xl == yl && x.upper() <= y.upper()); +} + +template inline +bool operator<=(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + const T& xl = x.lower(); + return xl < y || (xl == y && x.upper() <= y); +} + +template inline +bool operator>(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + const T& xl = x.lower(); + const T& yl = y.lower(); + return xl > yl || (xl == yl && x.upper() > y.upper()); +} + +template inline +bool operator>(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + const T& xl = x.lower(); + return xl > y || (xl == y && x.upper() > y); +} + +template inline +bool operator>=(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + const T& xl = x.lower(); + const T& yl = y.lower(); + return xl > yl || (xl == yl && x.upper() >= y.upper()); +} + +template inline +bool operator>=(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() >= y; +} + +template inline +bool operator==(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() == y.lower() && x.upper() == y.upper(); +} + +template inline +bool operator==(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() == y && x.upper() == y; +} + +template inline +bool operator!=(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() != y.lower() || x.upper() != y.upper(); +} + +template inline +bool operator!=(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() != y || x.upper() != y; +} + +} // namespace lexicographic +} // namespace compare +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_COMPARE_LEXICOGRAPHIC_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/compare/possible.hpp b/trunk/eo/contrib/boost/numeric/interval/compare/possible.hpp new file mode 100644 index 000000000..59bec31b9 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/compare/possible.hpp @@ -0,0 +1,113 @@ +/* Boost interval/compare/possible.hpp template implementation file + * + * Copyright 2003 Guillaume Melquiond + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_POSSIBLE_HPP +#define BOOST_NUMERIC_INTERVAL_COMPARE_POSSIBLE_HPP + +#include +#include + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace compare { +namespace possible { + +template inline +bool operator<(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() < y.upper(); +} + +template inline +bool operator<(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() < y; +} + +template inline +bool operator<=(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() <= y.upper(); +} + +template inline +bool operator<=(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() <= y; +} + +template inline +bool operator>(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.upper() > y.lower(); +} + +template inline +bool operator>(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.upper() > y; +} + +template inline +bool operator>=(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.upper() >= y.lower(); +} + +template inline +bool operator>=(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.upper() >= y; +} + +template inline +bool operator==(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() <= y.upper() && x.upper() >= y.lower(); +} + +template inline +bool operator==(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() <= y && x.upper() >= y; +} + +template inline +bool operator!=(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() != y.upper() || x.upper() != y.lower(); +} + +template inline +bool operator!=(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + return x.lower() != y || x.upper() != y; +} + +} // namespace possible +} // namespace compare +} // namespace interval_lib +} // namespace numeric +} // namespace boost + + +#endif // BOOST_NUMERIC_INTERVAL_COMPARE_POSSIBLE_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/compare/set.hpp b/trunk/eo/contrib/boost/numeric/interval/compare/set.hpp new file mode 100644 index 000000000..aa4f1716b --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/compare/set.hpp @@ -0,0 +1,101 @@ +/* Boost interval/compare/set.hpp template implementation file + * + * Copyright 2002-2003 Guillaume Melquiond + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_SET_HPP +#define BOOST_NUMERIC_INTERVAL_COMPARE_SET_HPP + +#include +#include +#include + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace compare { +namespace set { + +template inline +bool operator<(const interval& x, const interval& y) +{ + return proper_subset(x, y); +} + +template inline +bool operator<(const interval& x, const T& y) +{ + throw comparison_error(); +} + +template inline +bool operator<=(const interval& x, const interval& y) +{ + return subset(x, y); +} + +template inline +bool operator<=(const interval& x, const T& y) +{ + throw comparison_error(); +} + +template inline +bool operator>(const interval& x, const interval& y) +{ + return proper_subset(y, x); +} + +template inline +bool operator>(const interval& x, const T& y) +{ + throw comparison_error(); +} + +template inline +bool operator>=(const interval& x, const interval& y) +{ + return subset(y, x); +} + +template inline +bool operator>=(const interval& x, const T& y) +{ + throw comparison_error(); +} + +template inline +bool operator==(const interval& x, const interval& y) +{ + return equal(y, x); +} + +template inline +bool operator==(const interval& x, const T& y) +{ + throw comparison_error(); +} + +template inline +bool operator!=(const interval& x, const interval& y) +{ + return !equal(y, x); +} + +template inline +bool operator!=(const interval& x, const T& y) +{ + throw comparison_error(); +} + +} // namespace set +} // namespace compare +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_COMPARE_SET_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/compare/tribool.hpp b/trunk/eo/contrib/boost/numeric/interval/compare/tribool.hpp new file mode 100644 index 000000000..6e4a83e27 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/compare/tribool.hpp @@ -0,0 +1,138 @@ +/* Boost interval/compare/tribool.hpp template implementation file + * + * Copyright 2002-2003 Guillaume Melquiond + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_TRIBOOL_HPP +#define BOOST_NUMERIC_INTERVAL_COMPARE_TRIBOOL_HPP + +#include +#include +#include + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace compare { +namespace tribool { + +template inline +logic::tribool operator<(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + if (x.upper() < y.lower()) return true; + if (x.lower() >= y.upper()) return false; + return logic::indeterminate; +} + +template inline +logic::tribool operator<(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + if (x.upper() < y) return true; + if (x.lower() >= y) return false; + return logic::indeterminate; +} + +template inline +logic::tribool operator<=(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + if (x.upper() <= y.lower()) return true; + if (x.lower() > y.upper()) return false; + return logic::indeterminate; +} + +template inline +logic::tribool operator<=(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + if (x.upper() <= y) return true; + if (x.lower() > y) return false; + return logic::indeterminate; +} + +template inline +logic::tribool operator>(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + if (x.lower() > y.upper()) return true; + if (x.upper() <= y.lower()) return false; + return logic::indeterminate; +} + +template inline +logic::tribool operator>(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + if (x.lower() > y) return true; + if (x.upper() <= y) return false; + return logic::indeterminate; +} + +template inline +logic::tribool operator>=(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + if (x.lower() >= y.upper()) return true; + if (x.upper() < y.lower()) return false; + return logic::indeterminate; +} + +template inline +logic::tribool operator>=(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + if (x.lower() >= y) return true; + if (x.upper() < y) return false; + return logic::indeterminate; +} + +template inline +logic::tribool operator==(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + if (x.upper() == y.lower() && x.lower() == y.upper()) return true; + if (x.upper() < y.lower() || x.lower() > y.upper()) return false; + return logic::indeterminate; +} + +template inline +logic::tribool operator==(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + if (x.upper() == y && x.lower() == y) return true; + if (x.upper() < y || x.lower() > y) return false; + return logic::indeterminate; +} + +template inline +logic::tribool operator!=(const interval& x, const interval& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + if (x.upper() < y.lower() || x.lower() > y.upper()) return true; + if (x.upper() == y.lower() && x.lower() == y.upper()) return false; + return logic::indeterminate; +} + +template inline +logic::tribool operator!=(const interval& x, const T& y) +{ + if (detail::test_input(x, y)) throw comparison_error(); + if (x.upper() < y || x.lower() > y) return true; + if (x.upper() == y && x.lower() == y) return false; + return logic::indeterminate; +} + +} // namespace tribool +} // namespace compare +} // namespace interval_lib +} // namespace numeric +} // namespace boost + + +#endif // BOOST_NUMERIC_INTERVAL_COMPARE_TRIBOOL_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/constants.hpp b/trunk/eo/contrib/boost/numeric/interval/constants.hpp new file mode 100644 index 000000000..a3a42efec --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/constants.hpp @@ -0,0 +1,85 @@ +/* Boost interval/constants.hpp template implementation file + * + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_CONSTANTS_HPP +#define BOOST_NUMERIC_INTERVAL_CONSTANTS_HPP + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace constants { + +// These constants should be exactly computed. +// Decimal representations wouldn't do it since the standard doesn't +// specify the rounding (even nearest) that should be used. + +static const float pi_f_l = 13176794.0f/(1<<22); +static const float pi_f_u = 13176795.0f/(1<<22); +static const double pi_d_l = (3373259426.0 + 273688.0 / (1<<21)) / (1<<30); +static const double pi_d_u = (3373259426.0 + 273689.0 / (1<<21)) / (1<<30); + +template inline T pi_lower() { return 3; } +template inline T pi_upper() { return 4; } +template inline T pi_half_lower() { return 1; } +template inline T pi_half_upper() { return 2; } +template inline T pi_twice_lower() { return 6; } +template inline T pi_twice_upper() { return 7; } + +template<> inline float pi_lower() { return pi_f_l; } +template<> inline float pi_upper() { return pi_f_u; } +template<> inline float pi_half_lower() { return pi_f_l / 2; } +template<> inline float pi_half_upper() { return pi_f_u / 2; } +template<> inline float pi_twice_lower() { return pi_f_l * 2; } +template<> inline float pi_twice_upper() { return pi_f_u * 2; } + +template<> inline double pi_lower() { return pi_d_l; } +template<> inline double pi_upper() { return pi_d_u; } +template<> inline double pi_half_lower() { return pi_d_l / 2; } +template<> inline double pi_half_upper() { return pi_d_u / 2; } +template<> inline double pi_twice_lower() { return pi_d_l * 2; } +template<> inline double pi_twice_upper() { return pi_d_u * 2; } + +template<> inline long double pi_lower() { return pi_d_l; } +template<> inline long double pi_upper() { return pi_d_u; } +template<> inline long double pi_half_lower() { return pi_d_l / 2; } +template<> inline long double pi_half_upper() { return pi_d_u / 2; } +template<> inline long double pi_twice_lower() { return pi_d_l * 2; } +template<> inline long double pi_twice_upper() { return pi_d_u * 2; } + +} // namespace constants + +template inline +I pi() +{ + typedef typename I::base_type T; + return I(constants::pi_lower(), + constants::pi_upper(), true); +} + +template inline +I pi_half() +{ + typedef typename I::base_type T; + return I(constants::pi_half_lower(), + constants::pi_half_upper(), true); +} + +template inline +I pi_twice() +{ + typedef typename I::base_type T; + return I(constants::pi_twice_lower(), + constants::pi_twice_upper(), true); +} + +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_CONSTANTS_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/detail/bcc_rounding_control.hpp b/trunk/eo/contrib/boost/numeric/interval/detail/bcc_rounding_control.hpp new file mode 100644 index 000000000..e3aaf046c --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/detail/bcc_rounding_control.hpp @@ -0,0 +1,57 @@ +/* Boost interval/detail/bcc_rounding_control.hpp file + * + * Copyright 2000 Jens Maurer + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_BCC_ROUNDING_CONTROL_HPP +#define BOOST_NUMERIC_INTERVAL_DETAIL_BCC_ROUNDING_CONTROL_HPP + +#ifndef __BORLANDC__ +# error This header is only intended for Borland C++. +#endif + +#ifndef _M_IX86 +# error This header only works on x86 CPUs. +#endif + +#include // Borland C++ rounding control + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace detail { + +#ifndef BOOST_NUMERIC_INTERVAL_KEEP_EXCEPTIONS_FOR_BCC +extern "C" { unsigned int _RTLENTRY _fm_init(void); } + +struct borland_workaround { + borland_workaround() { _fm_init(); } +}; + +static borland_workaround borland_workaround_exec; +#endif // BOOST_NUMERIC_INTERVAL_KEEP_EXCEPTIONS_FOR_BCC + +__inline double rint(double) +{ __emit__(0xD9); __emit__(0xFC); /* asm FRNDINT */ } + +struct x86_rounding +{ + typedef unsigned int rounding_mode; + static void get_rounding_mode(rounding_mode& mode) + { mode = _control87(0, 0); } + static void set_rounding_mode(const rounding_mode mode) + { _control87(mode, 0xffff); } + static double to_int(const double& x) { return rint(x); } +}; + +} // namespace detail +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif /* BOOST_NUMERIC_INTERVAL_DETAIL_BCC_ROUNDING_CONTROL_HPP */ diff --git a/trunk/eo/contrib/boost/numeric/interval/detail/bugs.hpp b/trunk/eo/contrib/boost/numeric/interval/detail/bugs.hpp new file mode 100644 index 000000000..2058b9aee --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/detail/bugs.hpp @@ -0,0 +1,79 @@ +/* Boost interval/detail/bugs.hpp file + * + * Copyright 2000 Jens Maurer + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_BUGS +#define BOOST_NUMERIC_INTERVAL_DETAIL_BUGS + +#include + +#if defined(__GLIBC__) && (defined(__USE_MISC) || defined(__USE_XOPEN_EXTENDED) || defined(__USE_ISOC99)) && !defined(__ICC) +# define BOOST_HAS_INV_HYPERBOLIC +#endif + +#ifdef BOOST_NO_STDC_NAMESPACE +# define BOOST_NUMERIC_INTERVAL_using_math(a) using ::a +# ifdef BOOST_HAS_INV_HYPERBOLIC +# define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using ::a +# endif +#else +# define BOOST_NUMERIC_INTERVAL_using_math(a) using std::a +# if defined(BOOST_HAS_INV_HYPERBOLIC) +# if defined(__GLIBCPP__) || defined(__GLIBCXX__) +# define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using ::a +# else +# define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using std::a +# endif +# endif +#endif + +#if defined(__COMO__) || defined(BOOST_INTEL) +# define BOOST_NUMERIC_INTERVAL_using_max(a) using std::a +#elif defined(BOOST_NO_STDC_NAMESPACE) +# define BOOST_NUMERIC_INTERVAL_using_max(a) using ::a +#else +# define BOOST_NUMERIC_INTERVAL_using_max(a) using std::a +#endif + +#ifndef BOOST_NUMERIC_INTERVAL_using_ahyp +# define BOOST_NUMERIC_INTERVAL_using_ahyp(a) +#endif + +#if defined(__GNUC__) && (__GNUC__ <= 2) +// cf PR c++/1981 for a description of the bug +#include +#include +namespace boost { +namespace numeric { + using std::min; + using std::max; + using std::sqrt; + using std::exp; + using std::log; + using std::cos; + using std::tan; + using std::asin; + using std::acos; + using std::atan; + using std::ceil; + using std::floor; + using std::sinh; + using std::cosh; + using std::tanh; +# undef BOOST_NUMERIC_INTERVAL_using_max +# undef BOOST_NUMERIC_INTERVAL_using_math +# define BOOST_NUMERIC_INTERVAL_using_max(a) +# define BOOST_NUMERIC_INTERVAL_using_math(a) +# undef BOOST_NUMERIC_INTERVAL_using_ahyp +# define BOOST_NUMERIC_INTERVAL_using_ahyp(a) +} // namespace numeric +} // namespace boost +#endif + +#endif // BOOST_NUMERIC_INTERVAL_DETAIL_BUGS diff --git a/trunk/eo/contrib/boost/numeric/interval/detail/c99_rounding_control.hpp b/trunk/eo/contrib/boost/numeric/interval/detail/c99_rounding_control.hpp new file mode 100644 index 000000000..181d28666 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/detail/c99_rounding_control.hpp @@ -0,0 +1,47 @@ +/* Boost interval/detail/c99_rounding_control.hpp file + * + * Copyright 2000 Jens Maurer + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP +#define BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP + +#include + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace detail { + +struct c99_rounding_control: c99_rounding +{ + template + static T force_rounding(const T& r) { volatile T r_ = r; return r_; } +}; + +} // namespace detail + +template<> +struct rounding_control: + detail::c99_rounding_control { }; + +template<> +struct rounding_control: + detail::c99_rounding_control { }; + +template<> +struct rounding_control: + detail::c99_rounding_control { }; + +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE + +#endif // BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/detail/c99sub_rounding_control.hpp b/trunk/eo/contrib/boost/numeric/interval/detail/c99sub_rounding_control.hpp new file mode 100644 index 000000000..571c51fcc --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/detail/c99sub_rounding_control.hpp @@ -0,0 +1,43 @@ +/* Boost interval/detail/c99sub_rounding_control.hpp file + * + * Copyright 2000 Jens Maurer + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_C99SUB_ROUNDING_CONTROL_HPP +#define BOOST_NUMERIC_INTERVAL_DETAIL_C99SUB_ROUNDING_CONTROL_HPP + +#include // ISO C 99 rounding mode control + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace detail { + +extern "C" { double rint(double); } + +struct c99_rounding +{ + typedef int rounding_mode; + + static void set_rounding_mode(const rounding_mode mode) { fesetround(mode); } + static void get_rounding_mode(rounding_mode &mode) { mode = fegetround(); } + static void downward() { set_rounding_mode(FE_DOWNWARD); } + static void upward() { set_rounding_mode(FE_UPWARD); } + static void to_nearest() { set_rounding_mode(FE_TONEAREST); } + static void toward_zero() { set_rounding_mode(FE_TOWARDZERO); } + + template + static T to_int(const T& r) { return rint(r); } +}; + +} // namespace detail +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_DETAIL_C99SUB_ROUBDING_CONTROL_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/detail/division.hpp b/trunk/eo/contrib/boost/numeric/interval/detail/division.hpp new file mode 100644 index 000000000..24fb025ad --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/detail/division.hpp @@ -0,0 +1,194 @@ +/* Boost interval/detail/division.hpp file + * + * Copyright 2003 Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_DIVISION_HPP +#define BOOST_NUMERIC_INTERVAL_DETAIL_DIVISION_HPP + +#include +#include +#include +#include +#include + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace detail { + +template inline +interval div_non_zero(const interval& x, + const interval& y) +{ + // assert(!in_zero(y)); + typename Policies::rounding rnd; + typedef interval I; + const T& xl = x.lower(); + const T& xu = x.upper(); + const T& yl = y.lower(); + const T& yu = y.upper(); + if (::boost::numeric::interval_lib::user::is_neg(xu)) + if (::boost::numeric::interval_lib::user::is_neg(yu)) + return I(rnd.div_down(xu, yl), rnd.div_up(xl, yu), true); + else + return I(rnd.div_down(xl, yl), rnd.div_up(xu, yu), true); + else if (::boost::numeric::interval_lib::user::is_neg(xl)) + if (::boost::numeric::interval_lib::user::is_neg(yu)) + return I(rnd.div_down(xu, yu), rnd.div_up(xl, yu), true); + else + return I(rnd.div_down(xl, yl), rnd.div_up(xu, yl), true); + else + if (::boost::numeric::interval_lib::user::is_neg(yu)) + return I(rnd.div_down(xu, yu), rnd.div_up(xl, yl), true); + else + return I(rnd.div_down(xl, yu), rnd.div_up(xu, yl), true); +} + +template inline +interval div_non_zero(const T& x, const interval& y) +{ + // assert(!in_zero(y)); + typename Policies::rounding rnd; + typedef interval I; + const T& yl = y.lower(); + const T& yu = y.upper(); + if (::boost::numeric::interval_lib::user::is_neg(x)) + return I(rnd.div_down(x, yl), rnd.div_up(x, yu), true); + else + return I(rnd.div_down(x, yu), rnd.div_up(x, yl), true); +} + +template inline +interval div_positive(const interval& x, const T& yu) +{ + // assert(::boost::numeric::interval_lib::user::is_pos(yu)); + if (::boost::numeric::interval_lib::user::is_zero(x.lower()) && + ::boost::numeric::interval_lib::user::is_zero(x.upper())) + return x; + typename Policies::rounding rnd; + typedef interval I; + const T& xl = x.lower(); + const T& xu = x.upper(); + typedef typename Policies::checking checking; + if (::boost::numeric::interval_lib::user::is_neg(xu)) + return I(checking::neg_inf(), rnd.div_up(xu, yu), true); + else if (::boost::numeric::interval_lib::user::is_neg(xl)) + return I(checking::neg_inf(), checking::pos_inf(), true); + else + return I(rnd.div_down(xl, yu), checking::pos_inf(), true); +} + +template inline +interval div_positive(const T& x, const T& yu) +{ + // assert(::boost::numeric::interval_lib::user::is_pos(yu)); + typedef interval I; + if (::boost::numeric::interval_lib::user::is_zero(x)) + return I(static_cast(0), static_cast(0), true); + typename Policies::rounding rnd; + typedef typename Policies::checking checking; + if (::boost::numeric::interval_lib::user::is_neg(x)) + return I(checking::neg_inf(), rnd.div_up(x, yu), true); + else + return I(rnd.div_down(x, yu), checking::pos_inf(), true); +} + +template inline +interval div_negative(const interval& x, const T& yl) +{ + // assert(::boost::numeric::interval_lib::user::is_neg(yl)); + if (::boost::numeric::interval_lib::user::is_zero(x.lower()) && + ::boost::numeric::interval_lib::user::is_zero(x.upper())) + return x; + typename Policies::rounding rnd; + typedef interval I; + const T& xl = x.lower(); + const T& xu = x.upper(); + typedef typename Policies::checking checking; + if (::boost::numeric::interval_lib::user::is_neg(xu)) + return I(rnd.div_down(xu, yl), checking::pos_inf(), true); + else if (::boost::numeric::interval_lib::user::is_neg(xl)) + return I(checking::neg_inf(), checking::pos_inf(), true); + else + return I(checking::neg_inf(), rnd.div_up(xl, yl), true); +} + +template inline +interval div_negative(const T& x, const T& yl) +{ + // assert(::boost::numeric::interval_lib::user::is_neg(yl)); + typedef interval I; + if (::boost::numeric::interval_lib::user::is_zero(x)) + return I(static_cast(0), static_cast(0), true); + typename Policies::rounding rnd; + typedef typename Policies::checking checking; + if (::boost::numeric::interval_lib::user::is_neg(x)) + return I(rnd.div_down(x, yl), checking::pos_inf(), true); + else + return I(checking::neg_inf(), rnd.div_up(x, yl), true); +} + +template inline +interval div_zero(const interval& x) +{ + if (::boost::numeric::interval_lib::user::is_zero(x.lower()) && + ::boost::numeric::interval_lib::user::is_zero(x.upper())) + return x; + else return interval::whole(); +} + +template inline +interval div_zero(const T& x) +{ + if (::boost::numeric::interval_lib::user::is_zero(x)) + return interval(static_cast(0), static_cast(0), true); + else return interval::whole(); +} + +template inline +interval div_zero_part1(const interval& x, + const interval& y, bool& b) +{ + // assert(::boost::numeric::interval_lib::user::is_neg(y.lower()) && ::boost::numeric::interval_lib::user::is_pos(y.upper())); + if (::boost::numeric::interval_lib::user::is_zero(x.lower()) && ::boost::numeric::interval_lib::user::is_zero(x.upper())) + { b = false; return x; } + typename Policies::rounding rnd; + typedef interval I; + const T& xl = x.lower(); + const T& xu = x.upper(); + const T& yl = y.lower(); + const T& yu = y.upper(); + typedef typename Policies::checking checking; + if (::boost::numeric::interval_lib::user::is_neg(xu)) + { b = true; return I(checking::neg_inf(), rnd.div_up(xu, yu), true); } + else if (::boost::numeric::interval_lib::user::is_neg(xl)) + { b = false; return I(checking::neg_inf(), checking::pos_inf(), true); } + else + { b = true; return I(checking::neg_inf(), rnd.div_up(xl, yl), true); } +} + +template inline +interval div_zero_part2(const interval& x, + const interval& y) +{ + // assert(::boost::numeric::interval_lib::user::is_neg(y.lower()) && ::boost::numeric::interval_lib::user::is_pos(y.upper()) && (div_zero_part1(x, y, b), b)); + typename Policies::rounding rnd; + typedef interval I; + typedef typename Policies::checking checking; + if (::boost::numeric::interval_lib::user::is_neg(x.upper())) + return I(rnd.div_down(x.upper(), y.lower()), checking::pos_inf(), true); + else + return I(rnd.div_down(x.lower(), y.upper()), checking::pos_inf(), true); +} + +} // namespace detail +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_DETAIL_DIVISION_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/detail/interval_prototype.hpp b/trunk/eo/contrib/boost/numeric/interval/detail/interval_prototype.hpp new file mode 100644 index 000000000..ac9029b70 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/detail/interval_prototype.hpp @@ -0,0 +1,41 @@ +/* Boost interval/detail/interval_prototype.hpp file + * + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_INTERVAL_PROTOTYPE_HPP +#define BOOST_NUMERIC_INTERVAL_DETAIL_INTERVAL_PROTOTYPE_HPP + +namespace boost { +namespace numeric { + +namespace interval_lib { + +template struct rounded_math; +template struct checking_strict; +class comparison_error; +template struct policies; + +/* + * default policies class + */ + +template +struct default_policies +{ + typedef policies, checking_strict > type; +}; + +} // namespace interval_lib + +template::type > +class interval; + +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_DETAIL_INTERVAL_PROTOTYPE_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/detail/msvc_rounding_control.hpp b/trunk/eo/contrib/boost/numeric/interval/detail/msvc_rounding_control.hpp new file mode 100644 index 000000000..2068c934c --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/detail/msvc_rounding_control.hpp @@ -0,0 +1,88 @@ +/* Boost interval/detail/msvc_rounding_control.hpp file + * + * Copyright 2000 Maarten Keijzer + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_MSVC_ROUNDING_CONTROL_HPP +#define BOOST_NUMERIC_INTERVAL_DETAIL_MSVC_ROUNDING_CONTROL_HPP + +#ifndef _MSC_VER +# error This header is only intended for MSVC, but might work for Borland as well +#endif + +#include // MSVC rounding control + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace detail { + +extern "C" { double rint(double); } + +struct x86_rounding +{ + static unsigned int hard2msvc(unsigned short m) { + unsigned int n = 0; + if (m & 0x01) n |= _EM_INVALID; + if (m & 0x02) n |= _EM_DENORMAL; + if (m & 0x04) n |= _EM_ZERODIVIDE; + if (m & 0x08) n |= _EM_OVERFLOW; + if (m & 0x10) n |= _EM_UNDERFLOW; + if (m & 0x20) n |= _EM_INEXACT; + switch (m & 0x300) { + case 0x000: n |= _PC_24; break; + case 0x200: n |= _PC_53; break; + case 0x300: n |= _PC_64; break; + } + switch (m & 0xC00) { + case 0x000: n |= _RC_NEAR; break; + case 0x400: n |= _RC_DOWN; break; + case 0x800: n |= _RC_UP; break; + case 0xC00: n |= _RC_CHOP; break; + } + if (m & 0x1000) n |= _IC_AFFINE; // only useful on 287 + return n; + } + + static unsigned short msvc2hard(unsigned int n) { + unsigned short m = 0; + if (n & _EM_INVALID) m |= 0x01; + if (n & _EM_DENORMAL) m |= 0x02; + if (n & _EM_ZERODIVIDE) m |= 0x04; + if (n & _EM_OVERFLOW) m |= 0x08; + if (n & _EM_UNDERFLOW) m |= 0x10; + if (n & _EM_INEXACT) m |= 0x20; + switch (n & _MCW_RC) { + case _RC_NEAR: m |= 0x000; break; + case _RC_DOWN: m |= 0x400; break; + case _RC_UP: m |= 0x800; break; + case _RC_CHOP: m |= 0xC00; break; + } + switch (n & _MCW_PC) { + case _PC_24: m |= 0x000; break; + case _PC_53: m |= 0x200; break; + case _PC_64: m |= 0x300; break; + } + if ((n & _MCW_IC) == _IC_AFFINE) m |= 0x1000; + return m; + } + + typedef unsigned short rounding_mode; + static void get_rounding_mode(rounding_mode& mode) + { mode = msvc2hard(_control87(0, 0)); } + static void set_rounding_mode(const rounding_mode mode) + { _control87(hard2msvc(mode), _MCW_EM | _MCW_RC | _MCW_PC | _MCW_IC); } + static double to_int(const double& x) { return rint(x); } +}; + +} // namespace detail +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif /* BOOST_NUMERIC_INTERVAL_DETAIL_MSVC_ROUNDING_CONTROL_HPP */ diff --git a/trunk/eo/contrib/boost/numeric/interval/detail/ppc_rounding_control.hpp b/trunk/eo/contrib/boost/numeric/interval/detail/ppc_rounding_control.hpp new file mode 100644 index 000000000..400522a75 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/detail/ppc_rounding_control.hpp @@ -0,0 +1,95 @@ +/* Boost interval/detail/ppc_rounding_control.hpp file + * + * Copyright 2000 Jens Maurer + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * Copyright 2005 Guillaume Melquiond + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_PPC_ROUNDING_CONTROL_HPP +#define BOOST_NUMERIC_INTERVAL_DETAIL_PPC_ROUNDING_CONTROL_HPP + +#if !defined(powerpc) && !defined(__powerpc__) && !defined(__ppc__) +#error This header only works on PPC CPUs. +#endif + +#if defined(__GNUC__ ) || (__IBMCPP__ >= 700) + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace detail { + +typedef union { + ::boost::long_long_type imode; + double dmode; +} rounding_mode_struct; + +static const rounding_mode_struct mode_upward = { 0xFFF8000000000002LL }; +static const rounding_mode_struct mode_downward = { 0xFFF8000000000003LL }; +static const rounding_mode_struct mode_to_nearest = { 0xFFF8000000000001LL }; +static const rounding_mode_struct mode_toward_zero = { 0xFFF8000000000000LL }; + +struct ppc_rounding_control +{ + typedef double rounding_mode; + + static void set_rounding_mode(const rounding_mode mode) + { __asm__ __volatile__ ("mtfsf 255,%0" : : "f"(mode)); } + + static void get_rounding_mode(rounding_mode& mode) + { __asm__ __volatile__ ("mffs %0" : "=f"(mode)); } + + static void downward() { set_rounding_mode(mode_downward.dmode); } + static void upward() { set_rounding_mode(mode_upward.dmode); } + static void to_nearest() { set_rounding_mode(mode_to_nearest.dmode); } + static void toward_zero() { set_rounding_mode(mode_toward_zero.dmode); } +}; + +} // namespace detail + +extern "C" { + float rintf(float); + double rint(double); +} + +template<> +struct rounding_control: + detail::ppc_rounding_control +{ + static float force_rounding(const float r) + { + float tmp; + __asm__ __volatile__ ("frsp %0, %1" : "=f" (tmp) : "f" (r)); + return tmp; + } + static float to_int(const float& x) { return rintf(x); } +}; + +template<> +struct rounding_control: + detail::ppc_rounding_control +{ + static const double & force_rounding(const double& r) { return r; } + static double to_int(const double& r) { return rint(r); } +}; + +template<> +struct rounding_control: + detail::ppc_rounding_control +{ + static const long double & force_rounding(const long double& r) { return r; } + static long double to_int(const long double& r) { return rint(r); } +}; + +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE +#endif + +#endif /* BOOST_NUMERIC_INTERVAL_DETAIL_PPC_ROUNDING_CONTROL_HPP */ diff --git a/trunk/eo/contrib/boost/numeric/interval/detail/sparc_rounding_control.hpp b/trunk/eo/contrib/boost/numeric/interval/detail/sparc_rounding_control.hpp new file mode 100644 index 000000000..6ba5baf03 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/detail/sparc_rounding_control.hpp @@ -0,0 +1,112 @@ +/* Boost interval/detail/sparc_rounding_control.hpp file + * + * Copyright 2000 Jens Maurer + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + * + * The basic code in this file was kindly provided by Jeremy Siek. + */ + +#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_SPARC_ROUNDING_CONTROL_HPP +#define BOOST_NUMERIC_INTERVAL_DETAIL_SPARC_ROUNDING_CONTROL_HPP + +#if !defined(sparc) && !defined(__sparc__) +# error This header is only intended for SPARC CPUs. +#endif + +#ifdef __SUNPRO_CC +# include +#endif + + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace detail { + +struct sparc_rounding_control +{ + typedef unsigned int rounding_mode; + + static void set_rounding_mode(const rounding_mode& mode) + { +# if defined(__GNUC__) + __asm__ __volatile__("ld %0, %%fsr" : : "m"(mode)); +# elif defined (__SUNPRO_CC) + fpsetround(fp_rnd(mode)); +# elif defined(__KCC) + asm("sethi %hi(mode), %o1"); + asm("ld [%o1+%lo(mode)], %fsr"); +# else +# error Unsupported compiler for Sparc rounding control. +# endif + } + + static void get_rounding_mode(rounding_mode& mode) + { +# if defined(__GNUC__) + __asm__ __volatile__("st %%fsr, %0" : "=m"(mode)); +# elif defined (__SUNPRO_CC) + mode = fpgetround(); +# elif defined(__KCC) +# error KCC on Sun SPARC get_round_mode: please fix me + asm("st %fsr, [mode]"); +# else +# error Unsupported compiler for Sparc rounding control. +# endif + } + +#if defined(__SUNPRO_CC) + static void downward() { set_rounding_mode(FP_RM); } + static void upward() { set_rounding_mode(FP_RP); } + static void to_nearest() { set_rounding_mode(FP_RN); } + static void toward_zero() { set_rounding_mode(FP_RZ); } +#else + static void downward() { set_rounding_mode(0xc0000000); } + static void upward() { set_rounding_mode(0x80000000); } + static void to_nearest() { set_rounding_mode(0x00000000); } + static void toward_zero() { set_rounding_mode(0x40000000); } +#endif +}; + +} // namespace detail + +extern "C" { + float rintf(float); + double rint(double); +} + +template<> +struct rounding_control: + detail::sparc_rounding_control +{ + static const float& force_rounding(const float& x) { return x; } + static float to_int(const float& x) { return rintf(x); } +}; + +template<> +struct rounding_control: + detail::sparc_rounding_control +{ + static const double& force_rounding(const double& x) { return x; } + static double to_int(const double& x) { return rint(x); } +}; + +template<> +struct rounding_control: + detail::sparc_rounding_control +{ + static const long double& force_rounding(const long double& x) { return x; } + static long double to_int(const long double& x) { return rint(x); } +}; + +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE + +#endif /* BOOST_NUMERIC_INTERVAL_DETAIL_SPARC_ROUNDING_CONTROL_HPP */ diff --git a/trunk/eo/contrib/boost/numeric/interval/detail/test_input.hpp b/trunk/eo/contrib/boost/numeric/interval/detail/test_input.hpp new file mode 100644 index 000000000..58695fec3 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/detail/test_input.hpp @@ -0,0 +1,76 @@ +/* Boost interval/detail/test_input.hpp file + * + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_TEST_INPUT_HPP +#define BOOST_NUMERIC_INTERVAL_DETAIL_TEST_INPUT_HPP + +#include + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace user { + +template inline +bool is_zero(T const &v) { return v == static_cast(0); } + +template inline +bool is_neg (T const &v) { return v < static_cast(0); } + +template inline +bool is_pos (T const &v) { return v > static_cast(0); } + +} // namespace user + +namespace detail { + +template inline +bool test_input(const interval& x) { + typedef typename Policies::checking checking; + return checking::is_empty(x.lower(), x.upper()); +} + +template inline +bool test_input(const interval& x, const interval& y) { + typedef typename Policies1::checking checking1; + typedef typename Policies2::checking checking2; + return checking1::is_empty(x.lower(), x.upper()) || + checking2::is_empty(y.lower(), y.upper()); +} + +template inline +bool test_input(const T& x, const interval& y) { + typedef typename Policies::checking checking; + return checking::is_nan(x) || checking::is_empty(y.lower(), y.upper()); +} + +template inline +bool test_input(const interval& x, const T& y) { + typedef typename Policies::checking checking; + return checking::is_empty(x.lower(), x.upper()) || checking::is_nan(y); +} + +template inline +bool test_input(const T& x) { + typedef typename Policies::checking checking; + return checking::is_nan(x); +} + +template inline +bool test_input(const T& x, const T& y) { + typedef typename Policies::checking checking; + return checking::is_nan(x) || checking::is_nan(y); +} + +} // namespace detail +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_DETAIL_TEST_INPUT_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/detail/x86_rounding_control.hpp b/trunk/eo/contrib/boost/numeric/interval/detail/x86_rounding_control.hpp new file mode 100644 index 000000000..3eebdbac5 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/detail/x86_rounding_control.hpp @@ -0,0 +1,108 @@ +/* Boost interval/detail/x86_rounding_control.hpp file + * + * Copyright 2000 Jens Maurer + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_X86_ROUNDING_CONTROL_HPP +#define BOOST_NUMERIC_INTERVAL_DETAIL_X86_ROUNDING_CONTROL_HPP + +#ifdef __GNUC__ +# include +#elif defined(__BORLANDC__) +# include +#elif defined(_MSC_VER) +# include +#elif defined(__MWERKS__) || defined(__ICC) +# define BOOST_NUMERIC_INTERVAL_USE_C99_SUBSYSTEM +# include +#else +# error Unsupported C++ compiler. +#endif + +namespace boost { +namespace numeric { +namespace interval_lib { + +namespace detail { + +#ifdef BOOST_NUMERIC_INTERVAL_USE_C99_SUBSYSTEM +typedef c99_rounding x86_rounding_control; +#undef BOOST_NUMERIC_INTERVAL_USE_C99_SUBSYSTEM +#else +struct fpu_rounding_modes +{ + unsigned short to_nearest; + unsigned short downward; + unsigned short upward; + unsigned short toward_zero; +}; + +// exceptions masked, extended precision +// hardware default is 0x037f (0x1000 only has a meaning on 287) +static const fpu_rounding_modes rnd_mode = { 0x137f, 0x177f, 0x1b7f, 0x1f7f }; + +struct x86_rounding_control: x86_rounding +{ + static void to_nearest() { set_rounding_mode(rnd_mode.to_nearest); } + static void downward() { set_rounding_mode(rnd_mode.downward); } + static void upward() { set_rounding_mode(rnd_mode.upward); } + static void toward_zero() { set_rounding_mode(rnd_mode.toward_zero); } +}; +#endif // BOOST_NUMERIC_INTERVAL_USE_C99_SUBSYSTEM + +} // namespace detail + +template<> +struct rounding_control: detail::x86_rounding_control +{ + static float force_rounding(const float& r) + { volatile float r_ = r; return r_; } +}; + +template<> +struct rounding_control: detail::x86_rounding_control +{ + /*static double force_rounding(double r) + { asm volatile ("" : "+m"(r) : ); return r; }*/ + static double force_rounding(const double& r) + { volatile double r_ = r; return r_; } +}; + +namespace detail { + +template +struct x86_rounding_control_long_double; + +template<> +struct x86_rounding_control_long_double: x86_rounding_control +{ + static long double force_rounding(long double const &r) + { volatile long double r_ = r; return r_; } +}; + +template<> +struct x86_rounding_control_long_double: x86_rounding_control +{ + static long double const &force_rounding(long double const &r) + { return r; } +}; + +} // namespace detail + +template<> +struct rounding_control: + detail::x86_rounding_control_long_double< (sizeof(long double) >= 10) > +{}; + +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE + +#endif /* BOOST_NUMERIC_INTERVAL_DETAIL_X86_ROUNDING_CONTROL_HPP */ diff --git a/trunk/eo/contrib/boost/numeric/interval/detail/x86gcc_rounding_control.hpp b/trunk/eo/contrib/boost/numeric/interval/detail/x86gcc_rounding_control.hpp new file mode 100644 index 000000000..079d681df --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/detail/x86gcc_rounding_control.hpp @@ -0,0 +1,51 @@ +/* Boost interval/detail/x86gcc_rounding_control.hpp file + * + * Copyright 2000 Jens Maurer + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_X86GCC_ROUNDING_CONTROL_HPP +#define BOOST_NUMERIC_INTERVAL_DETAIL_X86GCC_ROUNDING_CONTROL_HPP + +#ifndef __GNUC__ +# error This header only works with GNU CC. +#endif + +#ifndef __i386__ +# error This header only works on x86 CPUs. +#endif + +namespace boost { +namespace numeric { +namespace interval_lib { +namespace detail { + +struct x86_rounding +{ + typedef unsigned short rounding_mode; + + static void set_rounding_mode(const rounding_mode& mode) + { __asm__ __volatile__ ("fldcw %0" : : "m"(mode)); } + + static void get_rounding_mode(rounding_mode& mode) + { __asm__ __volatile__ ("fnstcw %0" : "=m"(mode)); } + + template + static T to_int(T r) + { + T r_; + __asm__ ("frndint" : "=&t"(r_) : "0"(r)); + return r_; + } +}; + +} // namespace detail +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif /* BOOST_NUMERIC_INTERVAL_DETAIL_X86GCC_ROUNDING_CONTROL_HPP */ diff --git a/trunk/eo/contrib/boost/numeric/interval/ext/integer.hpp b/trunk/eo/contrib/boost/numeric/interval/ext/integer.hpp new file mode 100644 index 000000000..628a343ac --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/ext/integer.hpp @@ -0,0 +1,70 @@ +/* Boost interval/ext/integer.hpp template implementation file + * + * Copyright 2003 Guillaume Melquiond + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_EXT_INTEGER_HPP +#define BOOST_NUMERIC_INTERVAL_EXT_INTEGER_HPP + +#include +#include + +namespace boost { +namespace numeric { + +template inline +interval operator+ (const interval& x, int y) +{ + return x + static_cast(y); +} + +template inline +interval operator+ (int x, const interval& y) +{ + return static_cast(x) + y; +} + +template inline +interval operator- (const interval& x, int y) +{ + return x - static_cast(y); +} + +template inline +interval operator- (int x, const interval& y) +{ + return static_cast(x) - y; +} + +template inline +interval operator* (const interval& x, int y) +{ + return x * static_cast(y); +} + +template inline +interval operator* (int x, const interval& y) +{ + return static_cast(x) * y; +} + +template inline +interval operator/ (const interval& x, int y) +{ + return x / static_cast(y); +} + +template inline +interval operator/ (int x, const interval& y) +{ + return static_cast(x) / y; +} + +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_EXT_INTEGER_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/ext/x86_fast_rounding_control.hpp b/trunk/eo/contrib/boost/numeric/interval/ext/x86_fast_rounding_control.hpp new file mode 100644 index 000000000..7f89a4e54 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/ext/x86_fast_rounding_control.hpp @@ -0,0 +1,70 @@ +/* Boost interval/detail/x86gcc_rounding_control.hpp file + * + * This header provides a rounding control policy + * that avoids flushing results to memory. In + * order for this optimization to be reliable, it + * should be used only when no underflow or + * overflow would happen without it. Indeed, only + * values in range are correctly rounded. + * + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_EXT_X86_FAST_ROUNDING_CONTROL_HPP +#define BOOST_NUMERIC_INTERVAL_EXT_X86_FAST_ROUNDING_CONTROL_HPP + +namespace boost { +namespace numeric { +namespace interval_lib { + +namespace detail { + +// exceptions masked, expected precision (the mask is 0x0300) +static const fpu_rounding_modes rnd_mode_f = { 0x107f, 0x147f, 0x187f, 0x1c7f }; +static const fpu_rounding_modes rnd_mode_d = { 0x127f, 0x167f, 0x1a7f, 0x1e7f }; +static const fpu_rounding_modes rnd_mode_l = { 0x137f, 0x177f, 0x1b7f, 0x1f7f }; + +} // namespace detail + +template +struct x86_fast_rounding_control; + +template<> +struct x86_fast_rounding_control: detail::x86_rounding +{ + static void to_nearest() { set_rounding_mode(detail::rnd_mode_f.to_nearest); } + static void downward() { set_rounding_mode(detail::rnd_mode_f.downward); } + static void upward() { set_rounding_mode(detail::rnd_mode_f.upward); } + static void toward_zero() { set_rounding_mode(detail::rnd_mode_f.toward_zero); } + static const float& force_rounding(const float& r) { return r; } +}; + +template<> +struct x86_fast_rounding_control: detail::x86_rounding +{ + static void to_nearest() { set_rounding_mode(detail::rnd_mode_d.to_nearest); } + static void downward() { set_rounding_mode(detail::rnd_mode_d.downward); } + static void upward() { set_rounding_mode(detail::rnd_mode_d.upward); } + static void toward_zero() { set_rounding_mode(detail::rnd_mode_d.toward_zero); } + static const double& force_rounding(const double& r) { return r; } +}; + +template<> +struct x86_fast_rounding_control: detail::x86_rounding +{ + static void to_nearest() { set_rounding_mode(detail::rnd_mode_l.to_nearest); } + static void downward() { set_rounding_mode(detail::rnd_mode_l.downward); } + static void upward() { set_rounding_mode(detail::rnd_mode_l.upward); } + static void toward_zero() { set_rounding_mode(detail::rnd_mode_l.toward_zero); } + static const long double& force_rounding(const long double& r) { return r; } +}; + +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_EXT_X86_FAST_ROUNDING_CONTROL_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/hw_rounding.hpp b/trunk/eo/contrib/boost/numeric/interval/hw_rounding.hpp new file mode 100644 index 000000000..ed225d405 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/hw_rounding.hpp @@ -0,0 +1,64 @@ +/* Boost interval/hw_rounding.hpp template implementation file + * + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * Copyright 2005 Guillaume Melquiond + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP +#define BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP + +#include +#include + +#define BOOST_NUMERIC_INTERVAL_NO_HARDWARE + +// define appropriate specialization of rounding_control for built-in types +#if defined(__i386__) || defined(_M_IX86) || defined(__BORLANDC__) +# include +#elif defined(powerpc) || defined(__powerpc__) || defined(__ppc__) +# include +#elif defined(sparc) || defined(__sparc__) +# include +#endif + +#if defined(BOOST_NUMERIC_INTERVAL_NO_HARDWARE) && (defined(__USE_ISOC99) || defined(__MSL__)) +# include +#endif + +#if defined(BOOST_NUMERIC_INTERVAL_NO_HARDWARE) +# undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE +# error Boost.Numeric.Interval: Please specify rounding control mechanism. +#endif + +namespace boost { +namespace numeric { +namespace interval_lib { + +/* + * Three specializations of rounded_math + */ + +template<> +struct rounded_math + : save_state > +{}; + +template<> +struct rounded_math + : save_state > +{}; + +template<> +struct rounded_math + : save_state > +{}; + +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/interval.hpp b/trunk/eo/contrib/boost/numeric/interval/interval.hpp new file mode 100644 index 000000000..0b2d0eec6 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/interval.hpp @@ -0,0 +1,450 @@ +/* Boost interval/interval.hpp header file + * + * Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_INTERVAL_HPP +#define BOOST_NUMERIC_INTERVAL_INTERVAL_HPP + +#include +#include +#include + +namespace boost { +namespace numeric { + +namespace interval_lib { + +class comparison_error + : public std::runtime_error +{ +public: + comparison_error() + : std::runtime_error("boost::interval: uncertain comparison") + { } +}; + +} // namespace interval_lib + +/* + * interval class + */ + +template +class interval +{ +private: + struct interval_holder; + struct number_holder; +public: + typedef T base_type; + typedef Policies traits_type; + + T const &lower() const; + T const &upper() const; + + interval(); + interval(T const &v); + template interval(T1 const &v); + interval(T const &l, T const &u); + template interval(T1 const &l, T2 const &u); + interval(interval const &r); + template interval(interval const &r); + template interval(interval const &r); + + interval &operator=(T const &v); + template interval &operator=(T1 const &v); + interval &operator=(interval const &r); + template interval &operator=(interval const &r); + template interval &operator=(interval const &r); + + void assign(const T& l, const T& u); + + static interval empty(); + static interval whole(); + static interval hull(const T& x, const T& y); + + interval& operator+= (const T& r); + interval& operator+= (const interval& r); + interval& operator-= (const T& r); + interval& operator-= (const interval& r); + interval& operator*= (const T& r); + interval& operator*= (const interval& r); + interval& operator/= (const T& r); + interval& operator/= (const interval& r); + + bool operator< (const interval_holder& r) const; + bool operator> (const interval_holder& r) const; + bool operator<= (const interval_holder& r) const; + bool operator>= (const interval_holder& r) const; + bool operator== (const interval_holder& r) const; + bool operator!= (const interval_holder& r) const; + + bool operator< (const number_holder& r) const; + bool operator> (const number_holder& r) const; + bool operator<= (const number_holder& r) const; + bool operator>= (const number_holder& r) const; + bool operator== (const number_holder& r) const; + bool operator!= (const number_holder& r) const; + + // the following is for internal use only, it is not a published interface + // nevertheless, it's public because friends don't always work correctly. + interval(const T& l, const T& u, bool): low(l), up(u) {} + void set_empty(); + void set_whole(); + void set(const T& l, const T& u); + +private: + struct interval_holder { + template + interval_holder(const interval& r) + : low(r.lower()), up(r.upper()) + { + typedef typename Policies2::checking checking2; + if (checking2::is_empty(low, up)) + throw interval_lib::comparison_error(); + } + + const T& low; + const T& up; + }; + + struct number_holder { + number_holder(const T& r) : val(r) + { + typedef typename Policies::checking checking; + if (checking::is_nan(r)) + throw interval_lib::comparison_error(); + } + + const T& val; + }; + + typedef typename Policies::checking checking; + typedef typename Policies::rounding rounding; + + T low; + T up; +}; + +template inline +interval::interval(): + low(static_cast(0)), up(static_cast(0)) +{} + +template inline +interval::interval(T const &v): low(v), up(v) +{ + if (checking::is_nan(v)) set_empty(); +} + +template template inline +interval::interval(T1 const &v) +{ + if (checking::is_nan(v)) set_empty(); + else { + rounding rnd; + low = rnd.conv_down(v); + up = rnd.conv_up (v); + } +} + +template template inline +interval::interval(T1 const &l, T2 const &u) +{ + if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u)) set_empty(); + else { + rounding rnd; + low = rnd.conv_down(l); + up = rnd.conv_up (u); + } +} + +template inline +interval::interval(T const &l, T const &u): low(l), up(u) +{ + if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u)) + set_empty(); +} + + +template inline +interval::interval(interval const &r): low(r.lower()), up(r.upper()) +{} + +template template inline +interval::interval(interval const &r): low(r.lower()), up(r.upper()) +{ + typedef typename Policies1::checking checking1; + if (checking1::is_empty(r.lower(), r.upper())) set_empty(); +} + +template template inline +interval::interval(interval const &r) +{ + typedef typename Policies1::checking checking1; + if (checking1::is_empty(r.lower(), r.upper())) set_empty(); + else { + rounding rnd; + low = rnd.conv_down(r.lower()); + up = rnd.conv_up (r.upper()); + } +} + +template inline +interval &interval::operator=(T const &v) +{ + if (checking::is_nan(v)) set_empty(); + else low = up = v; + return *this; +} + +template template inline +interval &interval::operator=(T1 const &v) +{ + if (checking::is_nan(v)) set_empty(); + else { + rounding rnd; + low = rnd.conv_down(v); + up = rnd.conv_up (v); + } + return *this; +} + +template inline +interval &interval::operator=(interval const &r) +{ + low = r.lower(); + up = r.upper(); + return *this; +} + +template template inline +interval &interval::operator=(interval const &r) +{ + typedef typename Policies1::checking checking1; + if (checking1::is_empty(r.lower(), r.upper())) set_empty(); + else { + low = r.lower(); + up = r.upper(); + } + return *this; +} + +template template inline +interval &interval::operator=(interval const &r) +{ + typedef typename Policies1::checking checking1; + if (checking1::is_empty(r.lower(), r.upper())) set_empty(); + else { + rounding rnd; + low = rnd.conv_down(r.lower()); + up = rnd.conv_up (r.upper()); + } + return *this; +} + +template inline +void interval::assign(const T& l, const T& u) +{ + if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u)) + set_empty(); + else set(l, u); +} + +template inline +void interval::set(const T& l, const T& u) +{ + low = l; + up = u; +} + +template inline +void interval::set_empty() +{ + low = checking::empty_lower(); + up = checking::empty_upper(); +} + +template inline +void interval::set_whole() +{ + low = checking::neg_inf(); + up = checking::pos_inf(); +} + +template inline +interval interval::hull(const T& x, const T& y) +{ + bool bad_x = checking::is_nan(x); + bool bad_y = checking::is_nan(y); + if (bad_x) + if (bad_y) return interval::empty(); + else return interval(y, y, true); + else + if (bad_y) return interval(x, x, true); + if (x <= y) return interval(x, y, true); + else return interval(y, x, true); +} + +template inline +interval interval::empty() +{ + return interval(checking::empty_lower(), + checking::empty_upper(), true); +} + +template inline +interval interval::whole() +{ + return interval(checking::neg_inf(), checking::pos_inf(), true); +} + +template inline +const T& interval::lower() const +{ + return low; +} + +template inline +const T& interval::upper() const +{ + return up; +} + +/* + * interval/interval comparisons + */ + +template inline +bool interval::operator< (const interval_holder& r) const +{ + if (!checking::is_empty(low, up)) { + if (up < r.low) return true; + else if (low >= r.up) return false; + } + throw interval_lib::comparison_error(); +} + +template inline +bool interval::operator> (const interval_holder& r) const +{ + if (!checking::is_empty(low, up)) { + if (low > r.up) return true; + else if (up <= r.low) return false; + } + throw interval_lib::comparison_error(); +} + +template inline +bool interval::operator<= (const interval_holder& r) const +{ + if (!checking::is_empty(low, up)) { + if (up <= r.low) return true; + else if (low > r.up) return false; + } + throw interval_lib::comparison_error(); +} + +template inline +bool interval::operator>= (const interval_holder& r) const +{ + if (!checking::is_empty(low, up)) { + if (low >= r.up) return true; + else if (up < r.low) return false; + } + throw interval_lib::comparison_error(); +} + +template inline +bool interval::operator== (const interval_holder& r) const +{ + if (!checking::is_empty(low, up)) { + if (up == r.low && low == r.up) return true; + else if (up < r.low || low > r.up) return false; + } + throw interval_lib::comparison_error(); +} + +template inline +bool interval::operator!= (const interval_holder& r) const +{ + if (!checking::is_empty(low, up)) { + if (up < r.low || low > r.up) return true; + else if (up == r.low && low == r.up) return false; + } + throw interval_lib::comparison_error(); +} + +/* + * interval/number comparisons + */ + +template inline +bool interval::operator< (const number_holder& r) const +{ + if (!checking::is_empty(low, up)) { + if (up < r.val) return true; + else if (low >= r.val) return false; + } + throw interval_lib::comparison_error(); +} + +template inline +bool interval::operator> (const number_holder& r) const +{ + if (!checking::is_empty(low, up)) { + if (low > r.val) return true; + else if (up <= r.val) return false; + } + throw interval_lib::comparison_error(); +} + +template inline +bool interval::operator<= (const number_holder& r) const +{ + if (!checking::is_empty(low, up)) { + if (up <= r.val) return true; + else if (low > r.val) return false; + } + throw interval_lib::comparison_error(); +} + +template inline +bool interval::operator>= (const number_holder& r) const +{ + if (!checking::is_empty(low, up)) { + if (low >= r.val) return true; + else if (up < r.val) return false; + } + throw interval_lib::comparison_error(); +} + +template inline +bool interval::operator== (const number_holder& r) const +{ + if (!checking::is_empty(low, up)) { + if (up == r.val && low == r.val) return true; + else if (up < r.val || low > r.val) return false; + } + throw interval_lib::comparison_error(); +} + +template inline +bool interval::operator!= (const number_holder& r) const +{ + if (!checking::is_empty(low, up)) { + if (up < r.val || low > r.val) return true; + else if (up == r.val && low == r.val) return false; + } + throw interval_lib::comparison_error(); +} + +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_INTERVAL_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/io.hpp b/trunk/eo/contrib/boost/numeric/interval/io.hpp new file mode 100644 index 000000000..dc4179e52 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/io.hpp @@ -0,0 +1,41 @@ +/* Boost interval/io.hpp header file + * + * This file is only meant to provide a quick + * implementation of the output operator. It is + * provided for test programs that aren't even + * interested in the precision of the results. + * A real progam should define its own operators + * and never include this header. + * + * Copyright 2003 Guillaume Melquiond + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_IO_HPP +#define BOOST_NUMERIC_INTERVAL_IO_HPP + +#include +#include +#include + +namespace boost { +namespace numeric { + +template +std::basic_ostream &operator<< + (std::basic_ostream &stream, + interval const &value) +{ + if (empty(value)) + return stream << "[]"; + else + return stream << '[' << lower(value) << ',' << upper(value) << ']'; +} + +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_IO_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/limits.hpp b/trunk/eo/contrib/boost/numeric/interval/limits.hpp new file mode 100644 index 000000000..d691ccee2 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/limits.hpp @@ -0,0 +1,51 @@ +/* Boost interval/limits.hpp template implementation file + * + * Copyright 2000 Jens Maurer + * Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_LIMITS_HPP +#define BOOST_NUMERIC_INTERVAL_LIMITS_HPP + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#include +#include +#include + +namespace std { + +template +class numeric_limits > + : public numeric_limits +{ +private: + typedef boost::numeric::interval I; + typedef numeric_limits bl; +public: + static I min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return I((bl::min)(), (bl::min)()); } + static I max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return I((bl::max)(), (bl::max)()); } + static I epsilon() throw() { return I(bl::epsilon(), bl::epsilon()); } + + BOOST_STATIC_CONSTANT(float_round_style, round_style = round_indeterminate); + BOOST_STATIC_CONSTANT(bool, is_iec559 = false); + + static I infinity () throw() { return I::whole(); } + static I quiet_NaN() throw() { return I::empty(); } + static I signaling_NaN() throw() + { return I(bl::signaling_NaN(), bl::signaling_Nan()); } + static I denorm_min() throw() + { return I(bl::denorm_min(), bl::denorm_min()); } +private: + static I round_error(); // hide this on purpose, not yet implemented +}; + +} // namespace std + +#endif + +#endif // BOOST_NUMERIC_INTERVAL_LIMITS_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/policies.hpp b/trunk/eo/contrib/boost/numeric/interval/policies.hpp new file mode 100644 index 000000000..70ad220d9 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/policies.hpp @@ -0,0 +1,75 @@ +/* Boost interval/policies.hpp template implementation file + * + * Copyright 2003 Guillaume Melquiond + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_POLICIES_HPP +#define BOOST_NUMERIC_INTERVAL_POLICIES_HPP + +#include + +namespace boost { +namespace numeric { +namespace interval_lib { + +/* + * policies class + */ + +template +struct policies +{ + typedef Rounding rounding; + typedef Checking checking; +}; + +/* + * policies switching classes + */ + +template +class change_rounding +{ + typedef typename OldInterval::base_type T; + typedef typename OldInterval::traits_type p; + typedef typename p::checking checking; +public: + typedef interval > type; +}; + +template +class change_checking +{ + typedef typename OldInterval::base_type T; + typedef typename OldInterval::traits_type p; + typedef typename p::rounding rounding; +public: + typedef interval > type; +}; + +/* + * Protect / unprotect: control whether the rounding mode is set/reset + * at each operation, rather than once and for all. + */ + +template +class unprotect +{ + typedef typename OldInterval::base_type T; + typedef typename OldInterval::traits_type p; + typedef typename p::rounding r; + typedef typename r::unprotected_rounding newRounding; +public: + typedef typename change_rounding::type type; +}; + +} // namespace interval_lib +} // namespace numeric +} // namespace boost + + +#endif // BOOST_NUMERIC_INTERVAL_POLICIES_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/rounded_arith.hpp b/trunk/eo/contrib/boost/numeric/interval/rounded_arith.hpp new file mode 100644 index 000000000..6ce5c7f7e --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/rounded_arith.hpp @@ -0,0 +1,120 @@ +/* Boost interval/rounded_arith.hpp template implementation file + * + * Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_ROUNDED_ARITH_HPP +#define BOOST_NUMERIC_INTERVAL_ROUNDED_ARITH_HPP + +#include +#include +#include + +namespace boost { +namespace numeric { +namespace interval_lib { + +/* + * Three classes of rounding: exact, std, opp + * See documentation for details. + */ + +template +struct rounded_arith_exact: Rounding { + void init() { } + template T conv_down(U const &v) { return v; } + template T conv_up (U const &v) { return v; } + T add_down (const T& x, const T& y) { return x + y; } + T add_up (const T& x, const T& y) { return x + y; } + T sub_down (const T& x, const T& y) { return x - y; } + T sub_up (const T& x, const T& y) { return x - y; } + T mul_down (const T& x, const T& y) { return x * y; } + T mul_up (const T& x, const T& y) { return x * y; } + T div_down (const T& x, const T& y) { return x / y; } + T div_up (const T& x, const T& y) { return x / y; } + T median (const T& x, const T& y) { return (x + y) / 2; } + T sqrt_down(const T& x) + { BOOST_NUMERIC_INTERVAL_using_math(sqrt); return sqrt(x); } + T sqrt_up (const T& x) + { BOOST_NUMERIC_INTERVAL_using_math(sqrt); return sqrt(x); } + T int_down (const T& x) + { BOOST_NUMERIC_INTERVAL_using_math(floor); return floor(x); } + T int_up (const T& x) + { BOOST_NUMERIC_INTERVAL_using_math(ceil); return ceil(x); } +}; + +template +struct rounded_arith_std: Rounding { +# define BOOST_DN(EXPR) this->downward(); return this->force_rounding(EXPR) +# define BOOST_NR(EXPR) this->to_nearest(); return this->force_rounding(EXPR) +# define BOOST_UP(EXPR) this->upward(); return this->force_rounding(EXPR) + void init() { } + template T conv_down(U const &v) { BOOST_DN(v); } + template T conv_up (U const &v) { BOOST_UP(v); } + T add_down(const T& x, const T& y) { BOOST_DN(x + y); } + T sub_down(const T& x, const T& y) { BOOST_DN(x - y); } + T mul_down(const T& x, const T& y) { BOOST_DN(x * y); } + T div_down(const T& x, const T& y) { BOOST_DN(x / y); } + T add_up (const T& x, const T& y) { BOOST_UP(x + y); } + T sub_up (const T& x, const T& y) { BOOST_UP(x - y); } + T mul_up (const T& x, const T& y) { BOOST_UP(x * y); } + T div_up (const T& x, const T& y) { BOOST_UP(x / y); } + T median(const T& x, const T& y) { BOOST_NR((x + y) / 2); } + T sqrt_down(const T& x) + { BOOST_NUMERIC_INTERVAL_using_math(sqrt); BOOST_DN(sqrt(x)); } + T sqrt_up (const T& x) + { BOOST_NUMERIC_INTERVAL_using_math(sqrt); BOOST_UP(sqrt(x)); } + T int_down(const T& x) { this->downward(); return to_int(x); } + T int_up (const T& x) { this->upward(); return to_int(x); } +# undef BOOST_DN +# undef BOOST_NR +# undef BOOST_UP +}; + +template +struct rounded_arith_opp: Rounding { + void init() { this->upward(); } +# define BOOST_DN(EXPR) \ + this->downward(); \ + T r = this->force_rounding(EXPR); \ + this->upward(); \ + return r +# define BOOST_NR(EXPR) \ + this->to_nearest(); \ + T r = this->force_rounding(EXPR); \ + this->upward(); \ + return r +# define BOOST_UP(EXPR) return this->force_rounding(EXPR) +# define BOOST_UP_NEG(EXPR) return -this->force_rounding(EXPR) + template T conv_down(U const &v) { BOOST_UP_NEG(-v); } + template T conv_up (U const &v) { BOOST_UP(v); } + T add_down(const T& x, const T& y) { BOOST_UP_NEG((-x) - y); } + T sub_down(const T& x, const T& y) { BOOST_UP_NEG(y - x); } + T mul_down(const T& x, const T& y) { BOOST_UP_NEG(x * (-y)); } + T div_down(const T& x, const T& y) { BOOST_UP_NEG(x / (-y)); } + T add_up (const T& x, const T& y) { BOOST_UP(x + y); } + T sub_up (const T& x, const T& y) { BOOST_UP(x - y); } + T mul_up (const T& x, const T& y) { BOOST_UP(x * y); } + T div_up (const T& x, const T& y) { BOOST_UP(x / y); } + T median (const T& x, const T& y) { BOOST_NR((x + y) / 2); } + T sqrt_down(const T& x) + { BOOST_NUMERIC_INTERVAL_using_math(sqrt); BOOST_DN(sqrt(x)); } + T sqrt_up (const T& x) + { BOOST_NUMERIC_INTERVAL_using_math(sqrt); BOOST_UP(sqrt(x)); } + T int_down(const T& x) { return -to_int(-x); } + T int_up (const T& x) { return to_int(x); } +# undef BOOST_DN +# undef BOOST_NR +# undef BOOST_UP +# undef BOOST_UP_NEG +}; + +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_ROUNDED_ARITH_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/rounded_transc.hpp b/trunk/eo/contrib/boost/numeric/interval/rounded_transc.hpp new file mode 100644 index 000000000..e1704f5f2 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/rounded_transc.hpp @@ -0,0 +1,140 @@ +/* Boost interval/rounded_transc.hpp template implementation file + * + * Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_ROUNDED_TRANSC_HPP +#define BOOST_NUMERIC_INTERVAL_ROUNDED_TRANSC_HPP + +#include +#include +#include + +namespace boost { +namespace numeric { +namespace interval_lib { + +template +struct rounded_transc_exact: Rounding +{ +# define BOOST_NUMERIC_INTERVAL_new_func(f) \ + T f##_down(const T& x) { BOOST_NUMERIC_INTERVAL_using_math(f); return f(x); } \ + T f##_up (const T& x) { BOOST_NUMERIC_INTERVAL_using_math(f); return f(x); } + BOOST_NUMERIC_INTERVAL_new_func(exp) + BOOST_NUMERIC_INTERVAL_new_func(log) + BOOST_NUMERIC_INTERVAL_new_func(sin) + BOOST_NUMERIC_INTERVAL_new_func(cos) + BOOST_NUMERIC_INTERVAL_new_func(tan) + BOOST_NUMERIC_INTERVAL_new_func(asin) + BOOST_NUMERIC_INTERVAL_new_func(acos) + BOOST_NUMERIC_INTERVAL_new_func(atan) + BOOST_NUMERIC_INTERVAL_new_func(sinh) + BOOST_NUMERIC_INTERVAL_new_func(cosh) + BOOST_NUMERIC_INTERVAL_new_func(tanh) +# undef BOOST_NUMERIC_INTERVAL_new_func +# define BOOST_NUMERIC_INTERVAL_new_func(f) \ + T f##_down(const T& x) { BOOST_NUMERIC_INTERVAL_using_ahyp(f); return f(x); } \ + T f##_up (const T& x) { BOOST_NUMERIC_INTERVAL_using_ahyp(f); return f(x); } + BOOST_NUMERIC_INTERVAL_new_func(asinh) + BOOST_NUMERIC_INTERVAL_new_func(acosh) + BOOST_NUMERIC_INTERVAL_new_func(atanh) +# undef BOOST_NUMERIC_INTERVAL_new_func +}; + +template +struct rounded_transc_std: Rounding +{ +# define BOOST_NUMERIC_INTERVAL_new_func(f) \ + T f##_down(const T& x) \ + { BOOST_NUMERIC_INTERVAL_using_math(f); \ + this->downward(); return this->force_rounding(f(x)); } \ + T f##_up (const T& x) \ + { BOOST_NUMERIC_INTERVAL_using_math(f); \ + this->upward(); return this->force_rounding(f(x)); } + BOOST_NUMERIC_INTERVAL_new_func(exp) + BOOST_NUMERIC_INTERVAL_new_func(log) + BOOST_NUMERIC_INTERVAL_new_func(sin) + BOOST_NUMERIC_INTERVAL_new_func(cos) + BOOST_NUMERIC_INTERVAL_new_func(tan) + BOOST_NUMERIC_INTERVAL_new_func(asin) + BOOST_NUMERIC_INTERVAL_new_func(acos) + BOOST_NUMERIC_INTERVAL_new_func(atan) + BOOST_NUMERIC_INTERVAL_new_func(sinh) + BOOST_NUMERIC_INTERVAL_new_func(cosh) + BOOST_NUMERIC_INTERVAL_new_func(tanh) +# undef BOOST_NUMERIC_INTERVAL_new_func +# define BOOST_NUMERIC_INTERVAL_new_func(f) \ + T f##_down(const T& x) \ + { BOOST_NUMERIC_INTERVAL_using_ahyp(f); \ + this->downward(); return this->force_rounding(f(x)); } \ + T f##_up (const T& x) \ + { BOOST_NUMERIC_INTERVAL_using_ahyp(f); \ + this->upward(); return this->force_rounding(f(x)); } + BOOST_NUMERIC_INTERVAL_new_func(asinh) + BOOST_NUMERIC_INTERVAL_new_func(acosh) + BOOST_NUMERIC_INTERVAL_new_func(atanh) +# undef BOOST_NUMERIC_INTERVAL_new_func +}; + +template +struct rounded_transc_opp: Rounding +{ +# define BOOST_NUMERIC_INTERVAL_new_func(f) \ + T f##_down(const T& x) \ + { BOOST_NUMERIC_INTERVAL_using_math(f); \ + this->downward(); T y = this->force_rounding(f(x)); \ + this->upward(); return y; } \ + T f##_up (const T& x) \ + { BOOST_NUMERIC_INTERVAL_using_math(f); \ + return this->force_rounding(f(x)); } + BOOST_NUMERIC_INTERVAL_new_func(exp) + BOOST_NUMERIC_INTERVAL_new_func(log) + BOOST_NUMERIC_INTERVAL_new_func(cos) + BOOST_NUMERIC_INTERVAL_new_func(acos) + BOOST_NUMERIC_INTERVAL_new_func(cosh) +# undef BOOST_NUMERIC_INTERVAL_new_func +# define BOOST_NUMERIC_INTERVAL_new_func(f) \ + T f##_down(const T& x) \ + { BOOST_NUMERIC_INTERVAL_using_math(f); \ + return -this->force_rounding(-f(x)); } \ + T f##_up (const T& x) \ + { BOOST_NUMERIC_INTERVAL_using_math(f); \ + return this->force_rounding(f(x)); } + BOOST_NUMERIC_INTERVAL_new_func(sin) + BOOST_NUMERIC_INTERVAL_new_func(tan) + BOOST_NUMERIC_INTERVAL_new_func(asin) + BOOST_NUMERIC_INTERVAL_new_func(atan) + BOOST_NUMERIC_INTERVAL_new_func(sinh) + BOOST_NUMERIC_INTERVAL_new_func(tanh) +# undef BOOST_NUMERIC_INTERVAL_new_func +# define BOOST_NUMERIC_INTERVAL_new_func(f) \ + T f##_down(const T& x) \ + { BOOST_NUMERIC_INTERVAL_using_ahyp(f); \ + this->downward(); T y = this->force_rounding(f(x)); \ + this->upward(); return y; } \ + T f##_up (const T& x) \ + { BOOST_NUMERIC_INTERVAL_using_ahyp(f); \ + return this->force_rounding(f(x)); } + BOOST_NUMERIC_INTERVAL_new_func(asinh) + BOOST_NUMERIC_INTERVAL_new_func(atanh) +# undef BOOST_NUMERIC_INTERVAL_new_func +# define BOOST_NUMERIC_INTERVAL_new_func(f) \ + T f##_down(const T& x) \ + { BOOST_NUMERIC_INTERVAL_using_ahyp(f); \ + return -this->force_rounding(-f(x)); } \ + T f##_up (const T& x) \ + { BOOST_NUMERIC_INTERVAL_using_ahyp(f); \ + return this->force_rounding(f(x)); } + BOOST_NUMERIC_INTERVAL_new_func(acosh) +# undef BOOST_NUMERIC_INTERVAL_new_func +}; + +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_ROUNDED_TRANSC_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/rounding.hpp b/trunk/eo/contrib/boost/numeric/interval/rounding.hpp new file mode 100644 index 000000000..f69e2e4b5 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/rounding.hpp @@ -0,0 +1,101 @@ +/* Boost interval/rounding.hpp template implementation file + * + * Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_ROUNDING_HPP +#define BOOST_NUMERIC_INTERVAL_ROUNDING_HPP + +namespace boost { +namespace numeric { +namespace interval_lib { + +/* + * Default rounding_control class (does nothing) + */ + +template +struct rounding_control +{ + typedef int rounding_mode; + static void get_rounding_mode(rounding_mode&) {} + static void set_rounding_mode(rounding_mode) {} + static void upward() {} + static void downward() {} + static void to_nearest() {} + static const T& to_int(const T& x) { return x; } + static const T& force_rounding(const T& x) { return x; } +}; + +/* + * A few rounding control classes (exact/std/opp: see documentation) + * rounded_arith_* control the rounding of the arithmetic operators + * rounded_transc_* control the rounding of the transcendental functions + */ + +template > +struct rounded_arith_exact; + +template > +struct rounded_arith_std; + +template > +struct rounded_arith_opp; + +template +struct rounded_transc_dummy; + +template > +struct rounded_transc_exact; + +template > +struct rounded_transc_std; + +template > +struct rounded_transc_opp; + +/* + * State-saving classes: allow to set and reset rounding control + */ + +namespace detail { + +template +struct save_state_unprotected: Rounding +{ + typedef save_state_unprotected unprotected_rounding; +}; + +} // namespace detail + +template +struct save_state: Rounding +{ + typename Rounding::rounding_mode mode; + save_state() { + this->get_rounding_mode(mode); + this->init(); + } + ~save_state() { this->set_rounding_mode(mode); } + typedef detail::save_state_unprotected unprotected_rounding; +}; + +template +struct save_state_nothing: Rounding +{ + typedef save_state_nothing unprotected_rounding; +}; + +template +struct rounded_math: save_state_nothing > +{}; + +} // namespace interval_lib +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_ROUNDING_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/transc.hpp b/trunk/eo/contrib/boost/numeric/interval/transc.hpp new file mode 100644 index 000000000..88aebd6b3 --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/transc.hpp @@ -0,0 +1,232 @@ +/* Boost interval/transc.hpp template implementation file + * + * Copyright 2000 Jens Maurer + * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_TRANSC_HPP +#define BOOST_NUMERIC_INTERVAL_TRANSC_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace numeric { + +template inline +interval exp(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x)) + return I::empty(); + typename Policies::rounding rnd; + return I(rnd.exp_down(x.lower()), rnd.exp_up(x.upper()), true); +} + +template inline +interval log(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x) || + !interval_lib::user::is_pos(x.upper())) + return I::empty(); + typename Policies::rounding rnd; + typedef typename Policies::checking checking; + T l = !interval_lib::user::is_pos(x.lower()) + ? checking::neg_inf() : rnd.log_down(x.lower()); + return I(l, rnd.log_up(x.upper()), true); +} + +template inline +interval cos(const interval& x) +{ + if (interval_lib::detail::test_input(x)) + return interval::empty(); + typename Policies::rounding rnd; + typedef interval I; + typedef typename interval_lib::unprotect::type R; + + // get lower bound within [0, pi] + const R pi2 = interval_lib::pi_twice(); + R tmp = fmod((const R&)x, pi2); + if (width(tmp) >= pi2.lower()) + return I(static_cast(-1), static_cast(1), true); // we are covering a full period + if (tmp.lower() >= interval_lib::constants::pi_upper()) + return -cos(tmp - interval_lib::pi()); + T l = tmp.lower(); + T u = tmp.upper(); + + BOOST_USING_STD_MIN(); + // separate into monotone subintervals + if (u <= interval_lib::constants::pi_lower()) + return I(rnd.cos_down(u), rnd.cos_up(l), true); + else if (u <= pi2.lower()) + return I(static_cast(-1), rnd.cos_up(min BOOST_PREVENT_MACRO_SUBSTITUTION(rnd.sub_down(pi2.lower(), u), l)), true); + else + return I(static_cast(-1), static_cast(1), true); +} + +template inline +interval sin(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x)) + return I::empty(); + typename Policies::rounding rnd; + typedef typename interval_lib::unprotect::type R; + I r = cos((const R&)x - interval_lib::pi_half()); + (void)&rnd; + return r; +} + +template inline +interval tan(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x)) + return I::empty(); + typename Policies::rounding rnd; + typedef typename interval_lib::unprotect::type R; + + // get lower bound within [-pi/2, pi/2] + const R pi = interval_lib::pi(); + R tmp = fmod((const R&)x, pi); + const T pi_half_d = interval_lib::constants::pi_half_lower(); + if (tmp.lower() >= pi_half_d) + tmp -= pi; + if (tmp.lower() <= -pi_half_d || tmp.upper() >= pi_half_d) + return I::whole(); + return I(rnd.tan_down(tmp.lower()), rnd.tan_up(tmp.upper()), true); +} + +template inline +interval asin(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x) + || x.upper() < static_cast(-1) || x.lower() > static_cast(1)) + return I::empty(); + typename Policies::rounding rnd; + T l = (x.lower() <= static_cast(-1)) + ? -interval_lib::constants::pi_half_upper() + : rnd.asin_down(x.lower()); + T u = (x.upper() >= static_cast(1) ) + ? interval_lib::constants::pi_half_upper() + : rnd.asin_up (x.upper()); + return I(l, u, true); +} + +template inline +interval acos(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x) + || x.upper() < static_cast(-1) || x.lower() > static_cast(1)) + return I::empty(); + typename Policies::rounding rnd; + T l = (x.upper() >= static_cast(1) ) + ? static_cast(0) + : rnd.acos_down(x.upper()); + T u = (x.lower() <= static_cast(-1)) + ? interval_lib::constants::pi_upper() + : rnd.acos_up (x.lower()); + return I(l, u, true); +} + +template inline +interval atan(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x)) + return I::empty(); + typename Policies::rounding rnd; + return I(rnd.atan_down(x.lower()), rnd.atan_up(x.upper()), true); +} + +template inline +interval sinh(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x)) + return I::empty(); + typename Policies::rounding rnd; + return I(rnd.sinh_down(x.lower()), rnd.sinh_up(x.upper()), true); +} + +template inline +interval cosh(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x)) + return I::empty(); + typename Policies::rounding rnd; + if (interval_lib::user::is_neg(x.upper())) + return I(rnd.cosh_down(x.upper()), rnd.cosh_up(x.lower()), true); + else if (!interval_lib::user::is_neg(x.lower())) + return I(rnd.cosh_down(x.lower()), rnd.cosh_up(x.upper()), true); + else + return I(static_cast(0), rnd.cosh_up(-x.lower() > x.upper() ? x.lower() : x.upper()), true); +} + +template inline +interval tanh(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x)) + return I::empty(); + typename Policies::rounding rnd; + return I(rnd.tanh_down(x.lower()), rnd.tanh_up(x.upper()), true); +} + +template inline +interval asinh(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x)) + return I::empty(); + typename Policies::rounding rnd; + return I(rnd.asinh_down(x.lower()), rnd.asinh_up(x.upper()), true); +} + +template inline +interval acosh(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x) || x.upper() < static_cast(1)) + return I::empty(); + typename Policies::rounding rnd; + T l = x.lower() <= static_cast(1) ? static_cast(0) : rnd.acosh_down(x.lower()); + return I(l, rnd.acosh_up(x.upper()), true); +} + +template inline +interval atanh(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x) + || x.upper() < static_cast(-1) || x.lower() > static_cast(1)) + return I::empty(); + typename Policies::rounding rnd; + typedef typename Policies::checking checking; + T l = (x.lower() <= static_cast(-1)) + ? checking::neg_inf() : rnd.atanh_down(x.lower()); + T u = (x.upper() >= static_cast(1) ) + ? checking::pos_inf() : rnd.atanh_up (x.upper()); + return I(l, u, true); +} + +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_TRANSC_HPP diff --git a/trunk/eo/contrib/boost/numeric/interval/utility.hpp b/trunk/eo/contrib/boost/numeric/interval/utility.hpp new file mode 100644 index 000000000..d24d84d7a --- /dev/null +++ b/trunk/eo/contrib/boost/numeric/interval/utility.hpp @@ -0,0 +1,331 @@ +/* Boost interval/utility.hpp template implementation file + * + * Copyright 2000 Jens Maurer + * Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or + * copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NUMERIC_INTERVAL_UTILITY_HPP +#define BOOST_NUMERIC_INTERVAL_UTILITY_HPP + +#include +#include +#include +#include +#include +#include + +/* + * Implementation of simple functions + */ + +namespace boost { +namespace numeric { + +/* + * Utility Functions + */ + +template inline +const T& lower(const interval& x) +{ + return x.lower(); +} + +template inline +const T& upper(const interval& x) +{ + return x.upper(); +} + +template inline +T checked_lower(const interval& x) +{ + if (empty(x)) { + typedef typename Policies::checking checking; + return checking::nan(); + } + return x.lower(); +} + +template inline +T checked_upper(const interval& x) +{ + if (empty(x)) { + typedef typename Policies::checking checking; + return checking::nan(); + } + return x.upper(); +} + +template inline +T width(const interval& x) +{ + if (interval_lib::detail::test_input(x)) return static_cast(0); + typename Policies::rounding rnd; + return rnd.sub_up(x.upper(), x.lower()); +} + +template inline +T median(const interval& x) +{ + if (interval_lib::detail::test_input(x)) { + typedef typename Policies::checking checking; + return checking::nan(); + } + typename Policies::rounding rnd; + return rnd.median(x.lower(), x.upper()); +} + +template inline +interval widen(const interval& x, const T& v) +{ + if (interval_lib::detail::test_input(x)) + return interval::empty(); + typename Policies::rounding rnd; + return interval(rnd.sub_down(x.lower(), v), + rnd.add_up (x.upper(), v), true); +} + +/* + * Set-like operations + */ + +template inline +bool empty(const interval& x) +{ + return interval_lib::detail::test_input(x); +} + +template inline +bool in_zero(const interval& x) +{ + if (interval_lib::detail::test_input(x)) return false; + return (!interval_lib::user::is_pos(x.lower())) && + (!interval_lib::user::is_neg(x.upper())); +} + +template inline +bool in(const T& x, const interval& y) +{ + if (interval_lib::detail::test_input(x, y)) return false; + return y.lower() <= x && x <= y.upper(); +} + +template inline +bool subset(const interval& x, + const interval& y) +{ + if (empty(x)) return true; + return !empty(y) && y.lower() <= x.lower() && x.upper() <= y.upper(); +} + +template inline +bool proper_subset(const interval& x, + const interval& y) +{ + if (empty(y)) return false; + if (empty(x)) return true; + return y.lower() <= x.lower() && x.upper() <= y.upper() && + (y.lower() != x.lower() || x.upper() != y.upper()); +} + +template inline +bool overlap(const interval& x, + const interval& y) +{ + if (interval_lib::detail::test_input(x, y)) return false; + return x.lower() <= y.lower() && y.lower() <= x.upper() || + y.lower() <= x.lower() && x.lower() <= y.upper(); +} + +template inline +bool singleton(const interval& x) +{ + return !empty(x) && x.lower() == x.upper(); +} + +template inline +bool equal(const interval& x, const interval& y) +{ + if (empty(x)) return empty(y); + return !empty(y) && x.lower() == y.lower() && x.upper() == y.upper(); +} + +template inline +interval intersect(const interval& x, + const interval& y) +{ + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); + if (interval_lib::detail::test_input(x, y)) + return interval::empty(); + const T& l = max BOOST_PREVENT_MACRO_SUBSTITUTION(x.lower(), y.lower()); + const T& u = min BOOST_PREVENT_MACRO_SUBSTITUTION(x.upper(), y.upper()); + if (l <= u) return interval(l, u, true); + else return interval::empty(); +} + +template inline +interval hull(const interval& x, + const interval& y) +{ + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); + bool bad_x = interval_lib::detail::test_input(x); + bool bad_y = interval_lib::detail::test_input(y); + if (bad_x) + if (bad_y) return interval::empty(); + else return y; + else + if (bad_y) return x; + return interval(min BOOST_PREVENT_MACRO_SUBSTITUTION(x.lower(), y.lower()), + max BOOST_PREVENT_MACRO_SUBSTITUTION(x.upper(), y.upper()), true); +} + +template inline +interval hull(const interval& x, const T& y) +{ + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); + bool bad_x = interval_lib::detail::test_input(x); + bool bad_y = interval_lib::detail::test_input(y); + if (bad_y) + if (bad_x) return interval::empty(); + else return x; + else + if (bad_x) return interval(y, y, true); + return interval(min BOOST_PREVENT_MACRO_SUBSTITUTION(x.lower(), y), + max BOOST_PREVENT_MACRO_SUBSTITUTION(x.upper(), y), true); +} + +template inline +interval hull(const T& x, const interval& y) +{ + BOOST_USING_STD_MIN(); + BOOST_USING_STD_MAX(); + bool bad_x = interval_lib::detail::test_input(x); + bool bad_y = interval_lib::detail::test_input(y); + if (bad_x) + if (bad_y) return interval::empty(); + else return y; + else + if (bad_y) return interval(x, x, true); + return interval(min BOOST_PREVENT_MACRO_SUBSTITUTION(x, y.lower()), + max BOOST_PREVENT_MACRO_SUBSTITUTION(x, y.upper()), true); +} + +template inline +interval hull(const T& x, const T& y) +{ + return interval::hull(x, y); +} + +template inline +std::pair, interval > +bisect(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x)) + return std::pair(I::empty(), I::empty()); + const T m = median(x); + return std::pair(I(x.lower(), m, true), I(m, x.upper(), true)); +} + +/* + * Elementary functions + */ + +template inline +T norm(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x)) { + typedef typename Policies::checking checking; + return checking::nan(); + } + BOOST_USING_STD_MAX(); + return max BOOST_PREVENT_MACRO_SUBSTITUTION(-x.lower(), x.upper()); +} + +template inline +interval abs(const interval& x) +{ + typedef interval I; + if (interval_lib::detail::test_input(x)) + return I::empty(); + if (!interval_lib::user::is_neg(x.lower())) return x; + if (!interval_lib::user::is_pos(x.upper())) return -x; + BOOST_USING_STD_MAX(); + return I(static_cast(0), max BOOST_PREVENT_MACRO_SUBSTITUTION(-x.lower(), x.upper()), true); +} + +template inline +interval max BOOST_PREVENT_MACRO_SUBSTITUTION (const interval& x, + const interval& y) +{ + typedef interval I; + if (interval_lib::detail::test_input(x, y)) + return I::empty(); + BOOST_USING_STD_MAX(); + return I(max BOOST_PREVENT_MACRO_SUBSTITUTION(x.lower(), y.lower()), max BOOST_PREVENT_MACRO_SUBSTITUTION(x.upper(), y.upper()), true); +} + +template inline +interval max BOOST_PREVENT_MACRO_SUBSTITUTION (const interval& x, const T& y) +{ + typedef interval I; + if (interval_lib::detail::test_input(x, y)) + return I::empty(); + BOOST_USING_STD_MAX(); + return I(max BOOST_PREVENT_MACRO_SUBSTITUTION(x.lower(), y), max BOOST_PREVENT_MACRO_SUBSTITUTION(x.upper(), y), true); +} + +template inline +interval max BOOST_PREVENT_MACRO_SUBSTITUTION (const T& x, const interval& y) +{ + typedef interval I; + if (interval_lib::detail::test_input(x, y)) + return I::empty(); + BOOST_USING_STD_MAX(); + return I(max BOOST_PREVENT_MACRO_SUBSTITUTION(x, y.lower()), max BOOST_PREVENT_MACRO_SUBSTITUTION(x, y.upper()), true); +} + +template inline +interval min BOOST_PREVENT_MACRO_SUBSTITUTION (const interval& x, + const interval& y) +{ + typedef interval I; + if (interval_lib::detail::test_input(x, y)) + return I::empty(); + BOOST_USING_STD_MIN(); + return I(min BOOST_PREVENT_MACRO_SUBSTITUTION(x.lower(), y.lower()), min BOOST_PREVENT_MACRO_SUBSTITUTION(x.upper(), y.upper()), true); +} + +template inline +interval min BOOST_PREVENT_MACRO_SUBSTITUTION (const interval& x, const T& y) +{ + typedef interval I; + if (interval_lib::detail::test_input(x, y)) + return I::empty(); + BOOST_USING_STD_MIN(); + return I(min BOOST_PREVENT_MACRO_SUBSTITUTION(x.lower(), y), min BOOST_PREVENT_MACRO_SUBSTITUTION(x.upper(), y), true); +} + +template inline +interval min BOOST_PREVENT_MACRO_SUBSTITUTION (const T& x, const interval& y) +{ + typedef interval I; + if (interval_lib::detail::test_input(x, y)) + return I::empty(); + BOOST_USING_STD_MIN(); + return I(min BOOST_PREVENT_MACRO_SUBSTITUTION(x, y.lower()), min BOOST_PREVENT_MACRO_SUBSTITUTION(x, y.upper()), true); +} + +} // namespace numeric +} // namespace boost + +#endif // BOOST_NUMERIC_INTERVAL_UTILITY_HPP diff --git a/trunk/eo/contrib/eo-pso-22062007.bz2 b/trunk/eo/contrib/eo-pso-22062007.bz2 new file mode 100755 index 000000000..a266198fe Binary files /dev/null and b/trunk/eo/contrib/eo-pso-22062007.bz2 differ diff --git a/trunk/eo/contrib/eoAged.h b/trunk/eo/contrib/eoAged.h new file mode 100644 index 000000000..0fa525ae8 --- /dev/null +++ b/trunk/eo/contrib/eoAged.h @@ -0,0 +1,108 @@ +// eoAged.h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAge.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOAGED_H +#define EOAGED_H + +//----------------------------------------------------------------------------- + +#include // istream, ostream +#include // para std::string + +using namespace std; + +//----------------------------------------------------------------------------- +// eoAge +//----------------------------------------------------------------------------- + +/** eoAge is a template class that adds an age to an object.\\ +Requisites for template instantiation are that the object must admit a default ctor +and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, +printOn, readFrom. +@see eoObject +*/ +template +class eoAged: public Object +{ + public: + /// Main ctor from an already built Object. + eoAged( const Object& _o): Object( _o ), age(0) {}; + + /// Copy constructor. + eoAged( const eoAged& _a): Object( _a ), age( _a.age ) {}; + + /// Virtual dtor. They are needed in virtual class hierarchies + virtual ~eoAged() {}; + + + ///returns the age of the object + unsigned long Age() const {return age;} + + /// Increments age + const eoAged& operator ++ () { age++; return *this;} + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ +//@{ + /** Return the class id. This should be redefined in each class; but + it's got code as an example of implementation. Only "leaf" classes + can be non-virtual. + */ + virtual std::string className() const { return std::string("eoAged")+Object::className(); }; + + /** + * Read object. + * @param _is A istream. + * @throw runtime_exception If a valid object can't be read. + */ + virtual void readFrom(istream& _is) { + Object::readFrom( _is ); + _is >> age; + } + + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A ostream. + */ + virtual void printOn(ostream& _os) const{ + Object::printOn( _os ); + _os << age; + } +//@} + + private: + + /** Default Constructor. \\ + It´s private so that it is not used anywhere; the right way of using this object + is to create an Object and passing it to an aged by means of the copy ctor; that way + it´s turned into an Aged object*/ + eoAged(): Object(), age(0) {}; + + unsigned long age; +}; + +#endif EOAGE_H diff --git a/trunk/eo/contrib/eoDrawable.h b/trunk/eo/contrib/eoDrawable.h new file mode 100644 index 000000000..a614042f0 --- /dev/null +++ b/trunk/eo/contrib/eoDrawable.h @@ -0,0 +1,64 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoDrawable.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EODRAWABLE_H +#define EODRAWABLE_H + +//----------------------------------------------------------------------------- + +using namespace std; + +//----------------------------------------------------------------------------- +// eoDrawable +//----------------------------------------------------------------------------- + +/** eoDrawable is a template class that adds a drawing interface to an object. +Requisites for template instantiation are that the object must admit a default ctor +and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className, +eoDrawables can be drawn on any two-dimensional surface; it can be added to any +object with above characteristics. +@see eoObject +*/ +template +class eoDrawable +{ + public: + /// Main ctor from an already built Object. + eoDrawable( const Object& _o): Object( _o ){}; + + /// Copy constructor. + eoDrawable( const eoDrawable& _d): Object( _d ){}; + + /// Virtual dtor. They are needed in virtual class hierarchies + virtual ~eoDrawable() {}; + + + /**Draws the object. It must be redefined in any subclass, it´s impossible + to have a general drawing method + @param _x, _y coorinates */ + virtual void draw( unsigned _x, unsigned _y) = 0; + +}; + +#endif //! EODRAWABLE_H diff --git a/trunk/eo/contrib/mathsym/COPYING b/trunk/eo/contrib/mathsym/COPYING new file mode 100644 index 000000000..d60c31a97 --- /dev/null +++ b/trunk/eo/contrib/mathsym/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/trunk/eo/contrib/mathsym/GNUmakefile b/trunk/eo/contrib/mathsym/GNUmakefile new file mode 100644 index 000000000..3bd5c7795 --- /dev/null +++ b/trunk/eo/contrib/mathsym/GNUmakefile @@ -0,0 +1,101 @@ +COMPILEFLAGS=-Wno-deprecated -g -Wall -mpreferred-stack-boundary=2 -falign-functions=0#-DINTERVAL_DEBUG +OPTFLAGS= #-O3 -DNDEBUG + +PROFILE_FLAGS=#-pg +LDFLAGS=#-a + +INCLUDES=-I. -Isym -Ifun -Igen -Ieval -Iregression -I../../src -Ieo_interface -I.. + +CPPFLAGS=$(COMPILEFLAGS) $(OPTFLAGS) $(INCLUDES) $(PROFILE_FLAGS) -D__I386__ -DSIZEOF_UNSIGNED_LONG=4 +EXTLIBS=tcc/libtcc.a tcc/libtcc1.a ../../src/libeo.a ../../src/utils/libeoutils.a + +LIBS=${EXTLIBS} -ldl + +SYMLIB=libsym.a + +VPATH=sym fun gen eval regression eo_interface + +CXXSOURCES=FunDef.cpp Sym.cpp SymImpl.cpp SymOps.cpp sym_compile.cpp TreeBuilder.cpp LanguageTable.cpp\ + Dataset.cpp ErrorMeasure.cpp Scaling.cpp TargetInfo.cpp BoundsCheck.cpp util.cpp NodeSelector.cpp\ + eoSymCrossover.cpp sym_operations.cpp eoSymMutate.cpp eoSymLambdaMutate.cpp MultiFunction.cpp + +TESTPROGRAMS=test/test_compile test/testeo test/test_simplify test/test_diff test/test_lambda test/test_mf test/test_interval + +OBJS= $(CXXSOURCES:.cpp=.o) c_compile.o + +all: tcc/ symreg + +include $(CXXSOURCES:.cpp=.d) symreg.d + +clean: + rm *.o *.d $(TESTPROGRAMS) $(SYMLIB) symreg test/*.o || true + +distclean: clean + rm -rf tcc + +symreg: libsym.a symreg.o $(EXTLIBS) + $(CXX) -o symreg symreg.o libsym.a $(LIBS) $(PROFILE_FLAGS) ${LDFLAGS} + +libsym.a: $(OBJS) + rm libsym.a; ar cq $(SYMLIB) $(OBJS) + +check: $(TESTPROGRAMS) + test/test_compile && test/test_interval && test/testeo && test/test_simplify && test/test_diff && test/test_lambda && echo "all tests succeeded" + +test/test_compile: test/test_compile.o ${SYMLIB} + $(CXX) -o test/test_compile test/test_compile.o $(SYMLIB) ${LIBS} + +test/testeo: test/testeo.o ${SYMLIB} + $(CXX) -o test/testeo test/testeo.o $(SYMLIB) ${LIBS} + +test/test_simplify: test/test_simplify.o $(SYMLIB) + $(CXX) -o test/test_simplify test/test_simplify.o $(SYMLIB) ${LIBS} + +test/test_diff: test/test_diff.o $(SYMLIB) + $(CXX) -o test/test_diff test/test_diff.o $(SYMLIB) ${LIBS} + +test/test_lambda: test/test_lambda.o $(SYMLIB) + $(CXX) -o test/test_lambda test/test_lambda.o $(SYMLIB) ${LIBS} + +test/test_mf: test/test_mf.o $(SYMLIB) + $(CXX) -o test/test_mf test/test_mf.o $(SYMLIB) ${LIBS} + +test/test_interval: test/test_interval.o + $(CXX) -o test/test_interval test/test_interval.o $(SYMLIB) ${LIBS} + + +# eo +../../src/libeo.a: + make -C ../../src libeo.a + +../../src/utils/libeoutils.a: + make -C ../../src/utils libeoutils.a + +# tiny cc +tcc/: tcc.tar.gz + tar xvfz tcc.tar.gz && cd tcc && ./configure && make + +tcc/Makefile: tcc/ + cd tcc && ./configure + +tcc/libtcc.a: tcc/Makefile + make -Ctcc + +tcc/libtcc1.a: tcc/Makefile + make -Ctcc + +#rules +c_compile.o: eval/c_compile.c + $(CC) -c eval/c_compile.c -I./tcc $(COMPILEFLAGS) $(OPTFLAGS) + +%.o:%.cpp + $(CXX) -o $@ -c $< $(CPPFLAGS) $(INCLUDE) + +%.d: %.cpp + $(SHELL) -ec '$(CXX) -M $(CPPFLAGS) $< | sed "s/$*.o/& $@/g" > $@ ' + + +%.d: %.c + $(SHELL) -ec '$(CXX) -M $(CPPFLAGS) $< | sed "s/$*.o/& $@/g" > $@ ' + + diff --git a/trunk/eo/contrib/mathsym/README b/trunk/eo/contrib/mathsym/README new file mode 100644 index 000000000..4660c8fd7 --- /dev/null +++ b/trunk/eo/contrib/mathsym/README @@ -0,0 +1,198 @@ + +This is not yet another gp system (nyagp). For one, it is not general. +It does one thing, find mathematical functions, and tries to do that well. + +So, if you're trying to steer ants on various New Mexico trails, or build your +own tiny block world, you're in the wrong place. However, if you're interested +in finding mathematical functions either through direct application on data or +running it through a simulator, you might find what you're looking for here. + +=== Representation (sym/ + gen/) ======== + +Mathsym has a few interesting characteristics. First and foremost is the +basic representation. It uses trees, but these trees are stored in a +reference counted hashtable. This means that every distinct subtree that is alive +is stored once and only once. +The reference counting mechanism takes care of memory management. + +The idea of using a hashtable (for offline analysis) comes from Walter Tackett, in his +1994 dissertation. The current system is just a real-time implementation of this +idea, adding the reference counting for ease of use. + +The hashtable brings overhead. It's still pretty fast, but a string based representation +would run circles around it. However, by virtue of it storing every subtree only once, it +is fairly tight on memory. This helps tremendously when confronted with excessively growing populations, bloat. +The hashtable implementation can not stop bloat, but does make it more manageable. In a typical +GP run, the number of distinct subtrees is only 10-20% of the total number of subtrees. + +Other advantages of the hashtable are in the ability to examine the run more thoroughly. It is easy +to check how many subtrees are present in the system, and for each subtree you can check the reference +count. + +The basic tree is called a Sym. A Sym is simply a tree, and has children, accessible through args(). +A Sym simply contains an iterator (== decorated pointer) to an entry in the hashtable. +Every time you create a Sym, it is either looked up in the hashtable or added to the hashtable. +A Sym has several members: size, depth, args, etc. One interesting member is the refcount(). +This returns the reference count of the Sym in the hashtable, and thus returns the number +of distinct contexts in which the Sym is used. + +Another nice thing of these hashtable Syms is that a check for equality reduces to a pointer comparison. + +The Sym nodes are identified by a simple token, of type token_t (usually an unsigned int). It +is completely generic and could conceivably be adapted to steer ants. The rest of the library +is however targeted at mathematical functions purely. + +sym/Sym.h is the file to look into for the functionality provided by Sym. The sym/ directory +is where the source files are stored that are relevant for the generic Sym functionality. The +'gen/' directory contains some generic functionality to build and traverse trees, independent of +the function and terminal set. + +The file sym/README.cpp documents the use of the sym library for general GP use. + +=== Function Set (fun/) === + +The standard GP function set of binary functions: addition, multiplication, subtraction and +division is NOT supported. + +What is however supported are the functions of: + +summation: arbitrary arity, arity zero meaning 0.0. Arity 2 is standard addition +product: arbitrary arity, arity zero meaning 1.0. Arity 2 is standard multiplication +inversion: 1.0 / x. Only arity 1 +unary minus: -x. Only arity 1 + +Plus a whole bunch of other functions (see "fun/FunDef.h") + +The reason for this is the observation (actually from a friend of mine, thanks Luuk), +that this set of functions is complete and slightly more orthogonal than a binary set. + +The directory 'fun' contains the functionality for the function and terminal set, together +with ERC's etc. fun/FunDef.cpp contains the definition of the functionality. Stuff can be +added here, but best to contact me if you miss particular functions. + +With the sym and the function set in place, some fairly nice overloading is possible. A quick tour: + +To create a variable that reads the first value from the inputs, do: + +Sym var = SymVar(0); + +To create a constant of value 0.4432, do + +Sym cnst = SymConst(0.4432); + +The constants are also stored uniquely so that: + +Sym cnst2 = SymConst(0.4432) + +will lead to: + +cnst == cnst2 + +to be true (this happens without value compare, they point to the same element in the hashtable) + +To add two values, do + +Sym sym = var + const; + +This will create a tree with three nodes. Other operators are overloaded similarily. + +=== Evaluation (eval/) === + +The second important thing is evaluation. Although Syms can be evaluated through an interpreter, +this is not the fastest way to go about with it. The standard way of evaluating a Sym is to +first *compile* it to a function, and then run it in your favourite environment. Compilation +is done through the use of the excellent tinycc compiler, which is blazingly fast and produces +pretty good functions. + +Compilation comes in several flavours: compile a single function and retrieve a pointer to a function +of signature: + +double func(const double* x); + +where x is the input array. Another option is to compile a bunch of functions in one go, and retrieve an array +of such function pointers. The Syms are simply printed and compiled. An example: + +double func(const double* x) { return x*x + x * 1./x; } + +The batch version proceeds significantly more quickly than calling compile every time. The function pointers +can be given to a simulation for extremely quick evaluation. + +A third option is to compile a complete population in one go, and return a single pointer of signature + +void func(const double* x, double* y); + +Where 'y' is the (preallocated) output array. This allows to evaluate a complete population in one function +call, storing the results in 'y'. It uses the hashtable to store every calculation only once. An example +for the two function x*x + x*1./x and x + sin(x*x) is: + +void func(const double* x, double* y) { + double a0 = x; + double a1 = a0 * a0; + double a2 = 1.0; + double a3 = a2 / a0; + double a4 = a2 * a3; + y[0] = a4; + double a5 = sin(a1); + double a6 = a0 + a5; + y[1] = a6; +} + +This is the fastest way to evaluate even humongous populations quickly. You might be surprised at +the amount of code re-use in a GP population. + +The three compilation functions can be found in eval/sym_compile.h + +A limiting factor in tinycc is that the struct TCCState that is used to hold the compilation context, +is not really self-contained. This unfortunately means that with every call to 'compile' ALL previous +pointers that have been produced become unsafe for use. I'm still looking at ways to circumvent this. + +To work with mathsym, a few small changes in tccelf.c were necessary, check README.TCC for details. + +=== Interval Arithmetic (eval/) === + +GP is pretty good at finding mathematical expressions that are numerically unsound. Take for instance +the function '1 / x'. This is well defined only when x is strictly positive, but will lead to problems +when x equals 0. The standard answer is to define some pseudo-arithmetical function called 'protected +division' that will return some value (usually 1) when a division by zero occurs. This leads to a number +of protected functions (sqrt, log, tan, etc.) which all need to be protected. Interpreting results from +GP using such functions is in general hard. + +Interval arithmetic (through another excellent library boost/numeric/interval) is used to calculate +if particular functions can conceivably produce problems. This completely annihilates the use for Koza-style +protected operators and is a more safe and sound method. For interval arithmetic to function, the bounds +on the input variables need to be known. As for every function we can calculate a guarenteed, +though not necessarily tight, output interval given the input intervals, we can check arbitrary functions +for possible problems. If, for example for division, the input interval contains 0, we know that a division +by zero is theoretically possible. It's then best to throw away the entire function. + +Interval Arithmetic is accessible through the class IntervalBoundsCheck (eval/BoundsCheck.h) + +=== More generic support (gen/) === + +The gen subdirectory contains some general utility classes for defining function sets and for +creating trees. The idea is that these functions are generic and only append on the sym/ part +of the library. Unfortunately, the language table currently needs an ERC function, a default +implementation is hidden inside fun/FunDef.cpp. Will fix at some point. + +gen/LanguageTable.cpp -> defines the functions/terminals that can be used +gen/TreeBuilder.cpp -> can create trees based on a LanguageTable + +=== Data and Errors (regression/) === + +The above classes are generic and apply for any type of problem where a mathematical function can be +used to steer some process, run a simulation, whatever. First check the intervals, then compile the +Sym(s) to a (set of) function pointer(s), and use the pointers in some way to evaluate for fitness. +One particular type of problem for which support is built in is 'symbolic regression'. This type of +problem involves finding an mathematical input/output relationship based on some data. + +To enable this, regression/ introduces the class Dataset to contain the data and ErrorMeasure to calculate +error. Currently supported: mean squared error, mean absolute error and mean squared error scaled (proportional +to correlation squared). They use some helper classes such as Scaling and TargetInfo. + +=== EO interface (eo_interface/) === + +Contains the classes to make it all work with EO. Check the root application 'symreg' for ways to use this + + + + diff --git a/trunk/eo/contrib/mathsym/README.TCC b/trunk/eo/contrib/mathsym/README.TCC new file mode 100644 index 000000000..8441c232f --- /dev/null +++ b/trunk/eo/contrib/mathsym/README.TCC @@ -0,0 +1,5 @@ + +To refrain tcc from searching for libtcc1.a in the path, uncomment +out the lines looking for that in 'tccelf.c'. Search for libtcc1 and uncomment +these two lines. All should be well. + diff --git a/trunk/eo/contrib/mathsym/eo_interface/eoSym.h b/trunk/eo/contrib/mathsym/eo_interface/eoSym.h new file mode 100644 index 000000000..98579308a --- /dev/null +++ b/trunk/eo/contrib/mathsym/eo_interface/eoSym.h @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef EOSYM_H_ +#define EOSYM_H_ + +#include +#include +#include + + +template +class EoSym : public EO, public Sym { + + public: + + void set(const Sym& sym) { + EO::invalidate(); + static_cast(this)->operator=(sym); + } + + Sym& get() { return static_cast(*this); }; + Sym get() const { return static_cast(*this); }; + + virtual void printOn(std::ostream& os) const; + virtual void readFrom(std::istream& is); +}; + + +template +void EoSym::printOn(std::ostream& os) const { + EO::printOn(os); + os << ' '; + write_raw(os, *this); +} + +template +void EoSym::readFrom(std::istream& is) { + EO::readFrom(is); + read_raw(is, *this); +} + +template +inline std::ostream& operator<<(std::ostream& os, const EoSym& f) { f.printOn(os); return os; } +template +inline std::istream& operator>>(std::istream& is, EoSym& f) { f.readFrom(is); return is; } + + +#endif + + diff --git a/trunk/eo/contrib/mathsym/eo_interface/eoSymCrossover.cpp b/trunk/eo/contrib/mathsym/eo_interface/eoSymCrossover.cpp new file mode 100644 index 000000000..983983794 --- /dev/null +++ b/trunk/eo/contrib/mathsym/eo_interface/eoSymCrossover.cpp @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#include +#include + +#include +#include +#include + +using namespace std; + +bool subtree_quad(Sym& a, Sym& b, NodeSelector& select) { + NodeSelector::NodeSelection sel_a = select.select_node(a); + NodeSelector::NodeSelection sel_b = select.select_node(b); + + Sym aprime = insert_subtree(a, sel_a.idx(), sel_b.subtree() ); + Sym bprime = insert_subtree(b, sel_b.idx(), sel_a.subtree() ); + + a = aprime; + b = bprime; + return true; +} + +bool subtree_bin(Sym& a, const Sym& b, NodeSelector& select) { + NodeSelector::NodeSelection sel_a = select.select_node(a); + NodeSelector::NodeSelection sel_b = select.select_node(b); + + a = insert_subtree(a, sel_a.idx(), sel_b.subtree()); + + return true; +} + +Sym homologous_binimpl(Sym a, Sym b) { + + if(a == b) { return a; } // no point + + bool use_a = rng.random(2); + + token_t head = (use_a? a : b).token(); + SymVec args = use_a?a.args() : b.args(); + + const SymVec& a_args = a.args(); + const SymVec& b_args = b.args(); + unsigned mn = std::min(a_args.size(), b_args.size()); + + bool changed = !use_a; + + for (unsigned i = 0; i < mn; ++i) { + args[i] = homologous_binimpl(a_args[i], b_args[i]); + if (args[i] != a_args[i]) { + changed = true; + } + } + + return changed? Sym(head, args) : a; +} + +bool homologous_bin(Sym& a, const Sym& b) { + if (a==b) return false; + Sym org = a; + a = homologous_binimpl(a,b); + return org != a; +} + +void set_size_levels(Sym sym, vector& l, vector& s, unsigned level = 1) { + l.push_back(level); + s.push_back(sym.size()); + + for (unsigned i = 0; i < sym.args().size(); ++i) { + set_size_levels(sym.args()[i], l, s, level+1); + } +} + + +bool size_level_xover(Sym& a, const Sym& b) { + + Sym org = a; + + vector levela; + vector sizesa; + vector levelb; + vector sizesb; + + set_size_levels(a, levela, sizesa); + set_size_levels(b, levelb, sizesb); + + unsigned p0; + unsigned p1; + + for (unsigned tries = 0;; ++tries) { + p0 = rng.random(a.size()); + p1 = rng.random(b.size()); + + if (tries < 5 && (sizesa[p0] != sizesb[p1] && levela[p0] != levelb[p1])) { + continue; + } + + break; + } + + a = insert_subtree(a, p0, get_subtree(b, p1)); + + return org != a; + +} + + diff --git a/trunk/eo/contrib/mathsym/eo_interface/eoSymCrossover.h b/trunk/eo/contrib/mathsym/eo_interface/eoSymCrossover.h new file mode 100644 index 000000000..5e95ab3d9 --- /dev/null +++ b/trunk/eo/contrib/mathsym/eo_interface/eoSymCrossover.h @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef EOSYMCROSSOVER_H +#define EOSYMCROSSOVER_H + +class NodeSelector; +class Sym; + +#include + +extern bool subtree_quad(Sym& a, Sym& b, NodeSelector& select); +template +class eoQuadSubtreeCrossover : public eoQuadOp { + NodeSelector& node_selector; + + public: + eoQuadSubtreeCrossover(NodeSelector& _node_selector) : node_selector(_node_selector) {} + + bool operator()(EoType& a, EoType& b) { return subtree_quad(a,b, node_selector); } +}; + + +extern bool subtree_bin(Sym& a, const Sym& b, NodeSelector& select); +template +class eoBinSubtreeCrossover : public eoBinOp { + NodeSelector& node_selector; + + public : + + eoBinSubtreeCrossover(NodeSelector& _node_selector) : node_selector(_node_selector) {} + + bool operator()(EoType& a, const EoType& b) { return subtree_bin(a, b, node_selector); } +}; + +/** Yet another homologous crossover, afaik not particularly + * defined in the literature + */ +extern bool homologous_bin(Sym& a, const Sym& b); +template +class eoBinHomologousCrossover : public eoBinOp { + public: + bool operator()(EoType& a, const EoType& b) { + return homologous_bin(a,b); + } +}; + + +extern bool size_level_xover(Sym& a, const Sym& b); +template +class eoSizeLevelCrossover : public eoBinOp { + public: + bool operator()(EoType& a, const EoType& b) { + return size_level_xover(a,b); + } +}; + +#endif + diff --git a/trunk/eo/contrib/mathsym/eo_interface/eoSymEval.h b/trunk/eo/contrib/mathsym/eo_interface/eoSymEval.h new file mode 100644 index 000000000..9eb5f15c2 --- /dev/null +++ b/trunk/eo/contrib/mathsym/eo_interface/eoSymEval.h @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef SYMEVAL_H +#define SYMEVAL_H + +#include +#include +#include +#include + +#include + +template +class eoSymPopEval : public eoPopEvalFunc { + + BoundsCheck& check; + ErrorMeasure& measure; + unsigned size_cap; + + public: + + eoSymPopEval(BoundsCheck& _check, ErrorMeasure& _measure, unsigned _size_cap) : + check(_check), measure(_measure), size_cap(_size_cap) {} + + /** apparently this thing works on two populations, + * + * In any case, currently only implemented the population wide + * evaluation version, as that one is much faster. This because the + * compile going on behind the scenes is much faster when done in one + * go (and using subtree similarity) then when done on a case by case + * basis. + */ + void operator()(eoPop& p1, eoPop& p2) { + + std::vector unevaluated; + std::vector tmppop; + + for (unsigned i = 0; i < p1.size(); ++i) { + if (p1[i].invalid()) { + + if (expand_all(p1[i]).size() < size_cap && check.in_bounds(p1[i])) { + unevaluated.push_back(i); + tmppop.push_back( static_cast(p1[i]) ); + } else { + p1[i].fitness( measure.worst_performance() ); + } + } + } + + for (unsigned i = 0; i < p2.size(); ++i) { + if (p2[i].invalid()) { + + if (expand_all(p2[i]).size() < size_cap && check.in_bounds(p2[i])) { + + unevaluated.push_back(p1.size() + i); + tmppop.push_back( static_cast(p2[i]) ); + + } else { + p2[i].fitness( measure.worst_performance() ); // pretty bad error + } + } + } + + std::vector result = measure.calc_error(tmppop); + + for (unsigned i = 0; i < result.size(); ++i) { + unsigned idx = unevaluated[i]; + + if (idx < p1.size()) { + p1[idx].fitness(result[i].error); + } else { + idx -= p1.size(); + p2[idx].fitness(result[i].error); + } + } + } + +}; + + +#endif diff --git a/trunk/eo/contrib/mathsym/eo_interface/eoSymInit.h b/trunk/eo/contrib/mathsym/eo_interface/eoSymInit.h new file mode 100644 index 000000000..1f6318ed0 --- /dev/null +++ b/trunk/eo/contrib/mathsym/eo_interface/eoSymInit.h @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef EOSYMINIT_H +#define EOSYMINIT_H + +#include +#include + +/** Default initializer, Koza style */ +template +class eoSymInit : public eoInit { + + TreeBuilder& builder; + + double own_grow_prob; + unsigned own_max_depth; + + + double& grow_prob; + unsigned& max_depth; + + public: + + /** By default build ramped half and half with max depth 6 */ + eoSymInit(TreeBuilder& _builder) + : builder(_builder), + own_grow_prob(0.5), + own_max_depth(6), + grow_prob(own_grow_prob), + max_depth(own_max_depth) + {} + + /** Control the grow_prob and max_depth externally */ + eoSymInit(TreeBuilder& _builder, double& _grow_prob, unsigned& _max_depth) + : builder(_builder), + grow_prob(_grow_prob), + max_depth(_max_depth) + {} + + /** build the tree */ + void operator()(EoType& tree) { + int depth_to_use = rng.random(max_depth-2) + 2; // two levels minimum + builder.build_tree(tree, depth_to_use, rng.flip(grow_prob)); + } + +}; + +#endif + diff --git a/trunk/eo/contrib/mathsym/eo_interface/eoSymLambdaMutate.cpp b/trunk/eo/contrib/mathsym/eo_interface/eoSymLambdaMutate.cpp new file mode 100644 index 000000000..e7eeecf58 --- /dev/null +++ b/trunk/eo/contrib/mathsym/eo_interface/eoSymLambdaMutate.cpp @@ -0,0 +1,29 @@ +#include +#include "FunDef.h" +#include "NodeSelector.h" + +Sym compress(Sym sym, NodeSelector& sel) { + + return ::compress(sym); + + NodeSelector::NodeSelection s = sel.select_node(sym); + + Sym f = SymLambda( s.subtree()); + + if (f == s.subtree()) { return sym; } + + return insert_subtree(sym, s.idx(), f); +} + +extern Sym expand(Sym sym, NodeSelector& sel) { + + return ::expand_all(sym); + + NodeSelector::NodeSelection s = sel.select_node(sym); + + Sym f = SymUnlambda( s.subtree()); + + if (f == s.subtree()) { return sym; } + + return insert_subtree(sym, s.idx(), f); +} diff --git a/trunk/eo/contrib/mathsym/eo_interface/eoSymLambdaMutate.h b/trunk/eo/contrib/mathsym/eo_interface/eoSymLambdaMutate.h new file mode 100644 index 000000000..d29111521 --- /dev/null +++ b/trunk/eo/contrib/mathsym/eo_interface/eoSymLambdaMutate.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef SYMLAMBDAMUTATE_H +#define SYMLAMBDAMUTATE_H + +#include + +class NodeSelector; +class Sym; +extern Sym compress(Sym, NodeSelector&); +extern Sym expand(Sym, NodeSelector&); + + +template +class eoSymLambdaMutate : public eoMonOp { + NodeSelector& selector; + public : + eoSymLambdaMutate(NodeSelector& s) : selector(s) {} + + bool operator()(EoType& tomutate) { + if (rng.flip()) { + tomutate.set( expand(tomutate, selector)); + } else { + tomutate.set( compress(tomutate, selector)); + } + return true; + } + +}; + + +#endif diff --git a/trunk/eo/contrib/mathsym/eo_interface/eoSymMutate.cpp b/trunk/eo/contrib/mathsym/eo_interface/eoSymMutate.cpp new file mode 100644 index 000000000..55c786707 --- /dev/null +++ b/trunk/eo/contrib/mathsym/eo_interface/eoSymMutate.cpp @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include + +using namespace std; + +std::pair do_mutate(Sym sym, double p, const LanguageTable& table) { + + bool changed = false; + SymVec args = sym.args(); + if (rng.flip(p)) { + token_t new_token = table.get_random_function(sym.token(), args.size()); + if (new_token != sym.token()) { + changed = true; + sym = Sym(new_token, args); + } + } + + for (unsigned i = 0; i < args.size(); ++i) { + std::pair r = do_mutate(args[i], p, table); + changed |= r.second; + if (r.second) + args[i] = r.first; + } + + if (changed) + return std::make_pair(Sym(sym.token(), args), true); + // else + return std::make_pair(sym, false); +} + + +// these two can (should?) move to an impl file +bool mutate(Sym& sym, double p, const LanguageTable& table) { + std::pair r = do_mutate(sym, p, table); + sym = r.first; + return r.second; +} + + +bool mutate_constants(Sym& sym, double stdev) { + vector values = get_constants(sym); + + if (values.empty()) { + return false; + } + + for (unsigned i = 0; i < values.size(); ++i) { + values[i] += rng.normal() * stdev / values.size(); + } + + sym = set_constants(sym, values); + return true; +} + diff --git a/trunk/eo/contrib/mathsym/eo_interface/eoSymMutate.h b/trunk/eo/contrib/mathsym/eo_interface/eoSymMutate.h new file mode 100644 index 000000000..08e23315b --- /dev/null +++ b/trunk/eo/contrib/mathsym/eo_interface/eoSymMutate.h @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef SYMMUTATE_H +#define SYMMUTATE_H + +#include +#include + +#include +#include + +template +class eoSymSubtreeMutate : public eoMonOp { + + TreeBuilder& subtree_builder; + NodeSelector& node_selector; + public : + + eoSymSubtreeMutate(TreeBuilder& _subtree_builder, NodeSelector& _node_selector) + : subtree_builder(_subtree_builder), node_selector(_node_selector) {} + + + bool operator()(EoType& tomutate) { + unsigned xover_point = node_selector.select_node(tomutate).idx(); + // create subtree + Sym newtree = subtree_builder.build_tree(6, true); // TODO, parameterize + static_cast(tomutate) = insert_subtree(tomutate, xover_point, newtree); + return true; + } + +}; + +/** Class for doing node mutation + * Two parameters: + * + * mutation_rate (the rate at which to do mutation) + * is_rate_absolute : don't rescale the rate to the size of the tree + */ + +extern bool mutate(Sym& sym, double p, const LanguageTable& table); + +template +class eoSymNodeMutate : public eoMonOp { + + LanguageTable& table; + double own_mutation_rate; + bool own_is_rate_absolute; + + + public: + + double& mutation_rate; + bool& is_rate_absolute; + + eoSymNodeMutate(LanguageTable& _table) + : table(_table), + own_mutation_rate(1.0), + own_is_rate_absolute(false), // this means a probability of node mutation of 1/sym.size() + mutation_rate(own_mutation_rate), + is_rate_absolute(own_is_rate_absolute) + {} + + eoSymNodeMutate(LanguageTable& _table, double& _mutation_rate, bool& _is_rate_absolute) + : table(_table), + mutation_rate(_mutation_rate), + is_rate_absolute(_is_rate_absolute) + {} + + + bool operator()(EoType& _eo) { + double p = mutation_rate; + if (!is_rate_absolute) p /= _eo.size(); + + return mutate(_eo, p, table); + } + +}; + +/** + * Simple constant mutation class, adds gaussian noise (configurable variance) to the individuals + **/ +extern bool mutate_constants(Sym& sym, double stdev); +template +class eoSymConstantMutate : public eoMonOp { + + double& stdev; + + + public : + eoSymConstantMutate(double& _stdev) : stdev(_stdev) {} + + bool operator()(EoType& _eo) { + return mutate_constants(_eo, stdev); + } + + +}; + +#endif diff --git a/trunk/eo/contrib/mathsym/eval/BoundsCheck.cpp b/trunk/eo/contrib/mathsym/eval/BoundsCheck.cpp new file mode 100644 index 000000000..715ebf524 --- /dev/null +++ b/trunk/eo/contrib/mathsym/eval/BoundsCheck.cpp @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#include "BoundsCheck.h" +#include +#include +#include + +using namespace std; + +class IntervalBoundsCheckImpl { + public : + vector bounds; +}; + +IntervalBoundsCheck::IntervalBoundsCheck(const vector& mins, const vector& maxes) { + pimpl = new IntervalBoundsCheckImpl; + vector& b = pimpl->bounds; + + b.resize( mins.size()); + + for (unsigned i = 0; i < b.size(); ++i) { + b[i] = Interval(mins[i], maxes[i]); + } + +} + +IntervalBoundsCheck::~IntervalBoundsCheck() { delete pimpl; } +IntervalBoundsCheck::IntervalBoundsCheck(const IntervalBoundsCheck& that) { pimpl = new IntervalBoundsCheckImpl(*that.pimpl); } +IntervalBoundsCheck& IntervalBoundsCheck::operator=(const IntervalBoundsCheck& that) { *pimpl = *that.pimpl; return *this; } + +bool IntervalBoundsCheck::in_bounds(const Sym& sym) const { + Interval bounds; + + try { + bounds = eval(sym, pimpl->bounds); + if (!valid(bounds)) return false; + } catch (interval_error) { + return false; + } + return true; +} + +std::string IntervalBoundsCheck::get_bounds(const Sym& sym) const { + + try { + Interval bounds = eval(sym, pimpl->bounds); + if (!valid(bounds)) return "err"; + ostringstream os; + os << bounds; + return os.str(); + } catch (interval_error) { + return "err"; + } +} + + +std::pair IntervalBoundsCheck::calc_bounds(const Sym& sym) const { + + Interval bounds = eval(sym, pimpl->bounds); + return make_pair(bounds.lower(), bounds.upper()); +} + + diff --git a/trunk/eo/contrib/mathsym/eval/BoundsCheck.h b/trunk/eo/contrib/mathsym/eval/BoundsCheck.h new file mode 100644 index 000000000..d484d0293 --- /dev/null +++ b/trunk/eo/contrib/mathsym/eval/BoundsCheck.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef BOUNDS_CHECK_H_ +#define BOUNDS_CHECK_H_ + +#include + +class IntervalBoundsCheckImpl; +class Sym; + +class BoundsCheck { + public : + virtual ~BoundsCheck() {}; + virtual bool in_bounds(const Sym&) const = 0; + virtual std::string get_bounds(const Sym&) const = 0; +}; + +// checks if a formula keeps within bounds using interval arithmetic +class IntervalBoundsCheck : public BoundsCheck { + + IntervalBoundsCheckImpl* pimpl; + + public: + + IntervalBoundsCheck(const std::vector& minima, const std::vector& maxima); + ~IntervalBoundsCheck(); + IntervalBoundsCheck(const IntervalBoundsCheck&); + IntervalBoundsCheck& operator=(const IntervalBoundsCheck&); + + bool in_bounds(const Sym&) const; + std::string get_bounds(const Sym&) const; + + std::pair calc_bounds(const Sym&) const; +}; + +class NoBoundsCheck : public BoundsCheck { + bool in_bounds(const Sym&) const { return false; } + std::string get_bounds(const Sym&) const { return ""; } +}; + +#endif + + diff --git a/trunk/eo/contrib/mathsym/eval/Interval.h b/trunk/eo/contrib/mathsym/eval/Interval.h new file mode 100644 index 000000000..3b60121e3 --- /dev/null +++ b/trunk/eo/contrib/mathsym/eval/Interval.h @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef INTERVAL__H__ +#define INTERVAL__H__ + +#include +#include +#include + + +typedef boost::numeric::interval_lib::rounded_transc_exact RoundingTransc; +typedef boost::numeric::interval_lib::save_state Rounding; +typedef boost::numeric::interval_lib::checking_base Checking; +typedef boost::numeric::interval_lib::policies Policy; +typedef boost::numeric::interval Interval; + +struct interval_error{}; + +inline bool valid(const Interval& val) { + if (!finite(val.lower()) || !finite(val.upper())) return false; + + return val.lower() > -1e10 && val.upper() < 1e10; +} + +inline Interval sqrt(const Interval& val) { + if (val.lower() < 0.0) { + return Interval::whole(); + } + + return boost::numeric::sqrt(val); +} + +inline Interval sqr(const Interval& val) { + return square(val); +} + +inline Interval acos(const Interval& val) { + if (val.lower() < 1.0 || val.upper() > 1.0) { + return Interval::whole(); + } + + return boost::numeric::acos(val); +} + +inline Interval asin(const Interval& val) { + if (val.lower() < 1.0 || val.upper() > 1.0) { + return Interval::whole(); + } + + return boost::numeric::asin(val); +} + +inline Interval acosh(const Interval& val) { + if (val.lower() < 1.0) return Interval::whole(); + return boost::numeric::acosh(val); +} + +inline +std::ostream& operator<<(std::ostream& os, const Interval& val) { + os << '[' << val.lower() << ", " << val.upper() << ']'; + return os; +} + +#ifdef TEST_INTERVAL +#endif + +#endif diff --git a/trunk/eo/contrib/mathsym/eval/MultiFuncs.cpp b/trunk/eo/contrib/mathsym/eval/MultiFuncs.cpp new file mode 100644 index 000000000..a06be64a3 --- /dev/null +++ b/trunk/eo/contrib/mathsym/eval/MultiFuncs.cpp @@ -0,0 +1,26 @@ + +namespace multi_function { + +double plus(arg_ptr args) { + return *args[0] + *args[1]; +} + +double mult(arg_ptr args) { + return *args[0] * *args[1]; +} + +double min(arg_ptr args) { + return -**args; +} + +double inv(arg_ptr args) { + return 1 / **args; +} + +//template class F { public: double operator()(double a) { return f(a); } }; + +double exp(arg_ptr args) { + return ::exp(**args); +} + +} // namespace diff --git a/trunk/eo/contrib/mathsym/eval/MultiFunction.cpp b/trunk/eo/contrib/mathsym/eval/MultiFunction.cpp new file mode 100644 index 000000000..ec1929d29 --- /dev/null +++ b/trunk/eo/contrib/mathsym/eval/MultiFunction.cpp @@ -0,0 +1,341 @@ +#include + + +#include "MultiFunction.h" +#include "Sym.h" +#include "FunDef.h" + +using namespace std; + + +typedef vector::const_iterator data_ptr; +typedef vector data_ptrs; +typedef data_ptrs::const_iterator arg_ptr; + +#include "MultiFuncs.cpp" + +typedef double (*fptr)( arg_ptr ); + +string print_function( fptr f) { + if (f == multi_function::plus) return "+"; + if (f == multi_function::mult) return "*"; + if (f == multi_function::min) return "-"; + if (f == multi_function::inv) return "/"; + if (f == multi_function::exp) return "e"; + return "unknown"; +} + + +struct Function { + + fptr function; + arg_ptr args; + + double operator()() const { return function(args); } +}; + +static vector token_2_function; + +Sym make_binary(Sym sym) { + if (sym.args().size() == 2) return sym; + SymVec args = sym.args(); + Sym an = args.back(); + args.pop_back(); + Sym nw = make_binary( Sym( sym.token(), args) ); + args.resize(2); + args[0] = nw; + args[1] = an; + return Sym(sym.token(), args); +} + +class Compiler { + + public: + + enum func_type {constant, variable, function}; + + typedef pair entry; + +#if USE_TR1 + typedef std::tr1::unordered_map HashMap; +#else + typedef hash_map HashMap; +#endif + + HashMap map; + + vector constants; + vector variables; + vector< fptr > functions; + vector< vector > function_args; + + unsigned total_args; + + vector outputs; + + Compiler() : total_args(0) {} + + entry do_add(Sym sym) { + + HashMap::iterator it = map.find(sym); + + if (it == map.end()) { // new entry + + token_t token = sym.token(); + + if (is_constant(token)) { + constants.push_back( get_constant_value(token) ); // set value + entry e = make_pair(constant, constants.size()-1); + map.insert( make_pair(sym, e) ); + return e; + + } else if (is_variable(token)) { + unsigned idx = get_variable_index(token); + variables.push_back(idx); + entry e = make_pair(variable, variables.size()-1); + map.insert( make_pair(sym, e) ); + return e; + } // else + + fptr f; + vector vec; + const SymVec& args = sym.args(); + + switch (token) { + case sum_token: + { + if (args.size() == 0) { + return do_add( SymConst(0.0)); + } + if (args.size() == 1) { + return do_add(args[0]); + } + if (args.size() == 2) { + vec.push_back(do_add(args[0])); + vec.push_back(do_add(args[1])); + f = multi_function::plus; + //cout << "Adding + " << vec[0].second << ' ' << vec[1].second << endl; + break; + + } else { + return do_add( make_binary(sym) ); + } + + } + case prod_token: + { + if (args.size() == 0) { + return do_add( SymConst(1.0)); + } + if (args.size() == 1) { + return do_add(args[0]); + } + if (args.size() == 2) { + vec.push_back(do_add(args[0])); + vec.push_back(do_add(args[1])); + f = multi_function::mult; + //cout << "Adding * " << vec[0].second << ' ' << vec[1].second << endl; + break; + + + } else { + return do_add( make_binary(sym) ); + } + } + case sqr_token: + { + SymVec newargs(2); + newargs[0] = args[0]; + newargs[1] = args[0]; + return do_add( Sym(prod_token, newargs)); + } + default : + { + if (args.size() != 1) { + cerr << "Unknown function " << sym << " encountered" << endl; + exit(1); + } + + vec.push_back(do_add(args[0])); + + switch (token) { + case min_token: f = multi_function::min; break; + case inv_token: f = multi_function::inv; break; + case exp_token :f = multi_function::exp; break; + default : + { + cerr << "Unimplemented token encountered " << sym << endl; + exit(1); + } + } + + //cout << "Adding " << print_function(f) << ' ' << vec[0].second << endl; + + + } + + } + + total_args += vec.size(); + function_args.push_back(vec); + functions.push_back(f); + + entry e = make_pair(function, functions.size()-1); + map.insert( make_pair(sym, e) ); + return e; + + } + + return it->second; // entry + } + + void add(Sym sym) { + entry e = do_add(sym); + outputs.push_back(e); + } + +}; + +class MultiFunctionImpl { + public: + + // input mapping + vector input_idx; + + unsigned constant_offset; + unsigned var_offset; + + // evaluation + vector data; + vector funcs; + data_ptrs args; + + vector output_idx; + + MultiFunctionImpl() {} + + void clear() { + input_idx.clear(); + data.clear(); + funcs.clear(); + args.clear(); + output_idx.clear(); + constant_offset = 0; + } + + void eval(const double* x, double* y) { + unsigned i; + // evaluate variables + for (i = constant_offset; i < constant_offset + input_idx.size(); ++i) { + data[i] = x[input_idx[i-constant_offset]]; + } + + for(; i < data.size(); ++i) { + data[i] = funcs[i-var_offset](); + //cout << i << " " << data[i] << endl; + } + + for (i = 0; i < output_idx.size(); ++i) { + y[i] = data[output_idx[i]]; + } + } + + void eval(const vector& x, vector& y) { + eval(&x[0], &y[0]); + } + + void setup(const vector& pop) { + + clear(); + Compiler compiler; + + for (unsigned i = 0; i < pop.size(); ++i) { + Sym sym = (expand_all(pop[i])); + compiler.add(sym); + } + + // compiler is setup so get the data + constant_offset = compiler.constants.size(); + var_offset = constant_offset + compiler.variables.size(); + int n = var_offset + compiler.functions.size(); + + data.resize(n); + funcs.resize(compiler.functions.size()); + args.resize(compiler.total_args); + + // constants + for (unsigned i = 0; i < constant_offset; ++i) { + data[i] = compiler.constants[i]; + //cout << i << ' ' << data[i] << endl; + } + + // variables + input_idx = compiler.variables; + + //for (unsigned i = constant_offset; i < var_offset; ++i) { + //cout << i << " x" << input_idx[i-constant_offset] << endl; + //} + + // functions + unsigned which_arg = 0; + for (unsigned i = 0; i < funcs.size(); ++i) { + + Function f; + f.function = compiler.functions[i]; + + //cout << i+var_offset << ' ' << print_function(f.function); + + // interpret args + for (unsigned j = 0; j < compiler.function_args[i].size(); ++j) { + + Compiler::entry e = compiler.function_args[i][j]; + + unsigned idx = e.second; + + switch (e.first) { + case Compiler::function: idx += compiler.variables.size(); + case Compiler::variable: idx += compiler.constants.size(); + case Compiler::constant: {} + } + + args[which_arg + j] = data.begin() + idx; + //cout << ' ' << idx << "(" << e.second << ")"; + } + + //cout << endl; + + f.args = args.begin() + which_arg; + which_arg += compiler.function_args[i].size(); + funcs[i] = f; + } + + // output indices + output_idx.resize(compiler.outputs.size()); + for (unsigned i = 0; i < output_idx.size(); ++i) { + output_idx[i] = compiler.outputs[i].second; + switch(compiler.outputs[i].first) { + case Compiler::function: output_idx[i] += compiler.variables.size(); + case Compiler::variable: output_idx[i] += compiler.constants.size(); + case Compiler::constant: {} + } + //cout << "out " << output_idx[i] << endl; + } + } + +}; + + + +MultiFunction::MultiFunction(const std::vector& pop) : pimpl(new MultiFunctionImpl) { + pimpl->setup(pop); +} + +MultiFunction::~MultiFunction() { delete pimpl; } + +void MultiFunction::operator()(const std::vector& x, std::vector& y) { + pimpl->eval(x,y); +} + +void MultiFunction::operator()(const double* x, double* y) { + pimpl->eval(x,y); +} diff --git a/trunk/eo/contrib/mathsym/eval/MultiFunction.h b/trunk/eo/contrib/mathsym/eval/MultiFunction.h new file mode 100644 index 000000000..bc333915b --- /dev/null +++ b/trunk/eo/contrib/mathsym/eval/MultiFunction.h @@ -0,0 +1,26 @@ +#ifndef MULTIFUNCTION_H_ +#define MULTIFUNCTION_H_ + +#include + +class Sym; +class MultiFunctionImpl; + +class MultiFunction { + MultiFunction& operator=(const MultiFunction&); + MultiFunction(const MultiFunction&); + + MultiFunctionImpl* pimpl; + + public: + + MultiFunction(const std::vector& pop); + ~MultiFunction(); + + void operator()(const std::vector& x, std::vector& y); + void operator()(const double* x, double* y); + +}; + +#endif + diff --git a/trunk/eo/contrib/mathsym/eval/c_compile.c b/trunk/eo/contrib/mathsym/eval/c_compile.c new file mode 100644 index 000000000..36ad392a9 --- /dev/null +++ b/trunk/eo/contrib/mathsym/eval/c_compile.c @@ -0,0 +1,57 @@ +#include +#include +#include + +static TCCState* s = 0; + +extern void symc_init() { + if (s != 0) { + tcc_delete(s); + } + s = tcc_new(); + if (s == 0) { + fprintf(stderr, "Tiny cc doesn't function properly"); + exit(1); + } + + tcc_set_output_type(s, TCC_OUTPUT_MEMORY); +} + +extern int symc_compile(const char* func_str) { + //printf("Compiling %s\n", func_str); + int err = tcc_compile_string(s, func_str); + + if (err) { + fprintf(stderr,"Compile failed"); + } + return err; +} + +extern int symc_link() { + int err = tcc_relocate(s); + if (err) { + fprintf(stderr,"Compile failed"); + exit(1); + } + return err; +} + +extern void* symc_get_fun(const char* func_name) { + unsigned long val; + tcc_get_symbol(s, &val, func_name); + + if (val == 0) { + fprintf(stderr,"getfun failed"); + exit(1); + } + + return (void*) val; +} + +extern void* symc_make(const char* func_str, const char* func_name) { + symc_init(); + symc_compile(func_str); + symc_link(); + return symc_get_fun(func_name); +} + diff --git a/trunk/eo/contrib/mathsym/eval/sym_compile.cpp b/trunk/eo/contrib/mathsym/eval/sym_compile.cpp new file mode 100644 index 000000000..f75bbd5ce --- /dev/null +++ b/trunk/eo/contrib/mathsym/eval/sym_compile.cpp @@ -0,0 +1,219 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#include "Sym.h" +#include "FunDef.h" +#include "sym_compile.h" + +#include + +using namespace std; + +extern "C" { + void symc_init(); + int symc_compile(const char* func_str); + int symc_link(); + void* symc_get_fun(const char* func_name); + void* symc_make(const char* func_str, const char* func_name); +} + +string make_prototypes() { + string prot = get_prototypes(); + prot += "double sqr(double x) { return x*x; }"; + return prot; +} + +// contains variable names, like 'a0', 'a1', etc. or regular code + +#if USE_TR1 +typedef std::tr1::unordered_map HashMap; +#else +typedef hash_map HashMap; +#endif + +// prints 'num' in reverse notation. Does not matter as it's a unique id +string make_var(unsigned num) { + string str = "a"; + do { + str += char('0' + (num % 10)); + num /= 10; + } while (num); + return str; +} + +template +string to_string(T t) { + ostringstream os; + os << t; + return os.str(); +} + + +HashMap::iterator find_entry(const Sym& sym, string& str, HashMap& map) { + HashMap::iterator result = map.find(sym); + + if (result == map.end()) { // new entry + const SymVec& args = sym.args(); + + vector argstr(args.size()); + for (unsigned i = 0; i < args.size(); ++i) { + argstr[i] = find_entry(args[i], str, map)->second; + } + + string var = make_var(map.size()); // map.size(): unique id + string code; + // write out the code + const FunDef& fun = get_element(sym.token()); + code = fun.c_print(argstr, vector() ); + + str += "double " + var + "=" + code + ";\n"; + result = map.insert( make_pair(sym, var ) ).first; // only want iterator + } + + return result; +} + +void write_entry(const Sym& sym, string& str, HashMap& map, unsigned out) { + HashMap::iterator it = find_entry(sym, str, map); + + str += "y[" + to_string(out) + "]=" + it->second + ";\n"; + //cout << "wrote " << out << '\n'; +} + +#include +multi_function compile(const std::vector& syms) { + + //cout << "Multifunction " << syms.size() << endl; + // static stream to avoid fragmentation of these LARGE strings + static string str; + str.clear(); + str += make_prototypes(); + + str += "extern double func(const double* x, double* y) { \n "; + + multi_function result; + HashMap map(Sym::get_dag().size()); + + for (unsigned i = 0; i < syms.size(); ++i) { + write_entry(syms[i], str, map, i); + } + + str += ";}"; + + + /*static int counter = 0; + ostringstream nm; + nm << "cmp/compiled" << (counter++) << ".c"; + cout << "Saving as " << nm.str() << endl; + ofstream cmp(nm.str().c_str()); + cmp << str; + cmp.close(); + + //cout << "Multifunction " << syms.size() << endl; + cout << "Size of map " << map.size() << endl; +*/ + + result = (multi_function) symc_make(str.c_str(), "func"); + + if (result==0) { // error + cout << "Error in compile " << endl; + } + + return result; +} + +single_function compile(Sym sym) { + + ostringstream os; + + os << make_prototypes(); + os << "double func(const double* x) { return "; + + string code = c_print(sym); + os << code; + os << ";}"; + string func_str = os.str(); + + //cout << "compiling " << func_str << endl; + + return (single_function) symc_make(func_str.c_str(), "func"); +} + +/* finds and inserts the full code in a hashmap */ +HashMap::iterator find_code(Sym sym, HashMap& map) { + HashMap::iterator result = map.find(sym); + + if (result == map.end()) { // new entry + const SymVec& args = sym.args(); + vector argstr(args.size()); + for (unsigned i = 0; i < args.size(); ++i) { + argstr[i] = find_code(args[i], map)->second; + } + + // write out the code + const FunDef& fun = get_element(sym.token()); + string code = fun.c_print(argstr, vector()); + result = map.insert( make_pair(sym, code) ).first; // only want iterator + } + + return result; +} + +string print_code(Sym sym, HashMap& map) { + HashMap::iterator it = find_code(sym, map); + return it->second; +} + +void compile(const std::vector& syms, std::vector& functions) { + symc_init(); + + static ostringstream os; + os.str(""); + + os << make_prototypes(); + HashMap map(Sym::get_dag().size()); + for (unsigned i = 0; i < syms.size(); ++i) { + + os << "double func" << i << "(const double* x) { return "; + os << print_code(syms[i], map); //c_print(syms[i]); + os << ";}\n"; + + //symc_compile(os.str().c_str()); + //cout << "compiling " << os.str() << endl; + } + + os << ends; +#ifdef INTERVAL_DEBUG + //cout << "Compiling " << os.str() << endl; +#endif + + symc_compile(os.str().c_str()); + symc_link(); + + functions.resize(syms.size()); + for (unsigned i = 0; i < syms.size(); ++i) { + ostringstream os2; + os2 << "func" << i; + + functions[i] = (single_function) symc_get_fun(os2.str().c_str()); + } + +} + + + diff --git a/trunk/eo/contrib/mathsym/eval/sym_compile.h b/trunk/eo/contrib/mathsym/eval/sym_compile.h new file mode 100644 index 000000000..79a9d4977 --- /dev/null +++ b/trunk/eo/contrib/mathsym/eval/sym_compile.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef SYMCOMPILE_H_ +#define SYMCOMPILE_H_ + +#include +#include + +typedef double (*single_function)(const double []); +typedef double (*multi_function)(const double[], double[]); + +/* + * Important, after every call of the functions below, the function pointers of the previous + * call are invalidated. Sorry, but that's the way the cookie crumbles (in tcc) + * */ + +single_function compile(Sym sym); +multi_function compile(const std::vector& sym); +void compile(const std::vector& sym, std::vector& functions); + +#endif diff --git a/trunk/eo/contrib/mathsym/fun/FunDef.cpp b/trunk/eo/contrib/mathsym/fun/FunDef.cpp new file mode 100644 index 000000000..3e2e7faac --- /dev/null +++ b/trunk/eo/contrib/mathsym/fun/FunDef.cpp @@ -0,0 +1,891 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#include +#include "Sym.h" +#include "FunDef.h" +#include + +using namespace std; +using namespace boost::numeric; + +vector language; + +token_t add_function(FunDef* function) { + language.push_back(function); + return token_t(language.size()-1); +} + +const FunDef& get_element(token_t token) { return *language[token]; } + +/* Printing */ + +string c_print(const Sym& sym) { + return c_print(sym, vector()); +} + +string c_print(const Sym& sym, const vector& vars) { + const SymVec& args = sym.args(); + vector names(args.size()); + for (unsigned i = 0; i < args.size(); ++i) { + names[i] = c_print(args[i], vars); + } + return language[sym.token()]->c_print(names, vars); +} + +/* Evaluation */ + + +double eval(const Sym& sym, const std::vector& inputs) { + return language[sym.token()]->eval(sym.args(), inputs); +} + + +/* Interval Logic */ +Interval eval(const Sym& sym, const vector& inputs) { + const SymVec& args = sym.args(); + vector interv(args.size()); + for (unsigned i = 0; i < args.size(); ++i) { + interv[i] = eval(args[i], inputs); + + if (!valid(interv[i])) throw interval_error(); + } + return language[sym.token()]->eval(interv, inputs); +} + +/* */ +void add_function_to_table(LanguageTable& table, token_t token) { + const FunDef& fundef = *language[token]; + + if (fundef.has_varargs() == false) { + table.add_function(token, fundef.min_arity()); + } else { // sum or prod (or min or max) + table.add_function(token, 2); + } +} + + +// by default it is eager +double FunDef::eval(const SymVec& args, const vector& inputs) const { + vector values(args.size()); + for (unsigned i = 0; i < args.size(); ++i) { + values[i] = ::eval(args[i], inputs); + } + + return eval(values, inputs); +} + +/* Variable Handling */ +FunDef* make_var(int idx); // defined in FunDefs.h +static vector var_token; + +Sym SymVar(unsigned idx) { + if (var_token.size() <= idx) { + // it is new + var_token.resize(idx+1, token_t(-1)); + var_token[idx] = add_function( make_var(idx) ); + } else if (var_token[idx] == token_t(-1)) { + var_token[idx] = add_function( make_var(idx) ); + } + return Sym(var_token[idx]); +} + + +/* Constant Handling */ + +struct HashDouble{ + size_t operator()(double val) const { + unsigned long h = 0; + char* s = (char*)&val; + for (unsigned i=0 ; i DoubleSet; +typedef std::tr1::unordered_map LambdaSet; +#else +typedef hash_map DoubleSet; +typedef hash_map LambdaSet; +#endif + +static DoubleSet doubleSet; // for quick checking if a constant already exists +static vector token_value; + +static LambdaSet lambdaSet; +static vector token_lambda; + +static std::vector free_list; + +void delete_val(token_t token) { // clean up the information about this value + + if (is_constant(token)) { + //cout << "Deleting constant token " << token << endl; + double value = token_value[token]; + doubleSet.erase(value); + + delete language[token]; + language[token] = 0; + free_list.push_back(token); + } + else if (is_lambda(token)) { + //cout << "Deleting lambda token " << token << endl; + + Sym expression = token_lambda[token]; + lambdaSet.erase(expression); + + delete language[token]; + language[token] = 0; + free_list.push_back(token); + } +} + + +FunDef* make_const(double value); + +void extend_free_list(); + +Sym SymConst(double value) { + + DoubleSet::iterator it = doubleSet.find(value); + + if (it != doubleSet.end()) { + return Sym(it->second); // already exists + } + + + if (free_list.empty()) { // make space for tokens; + extend_free_list(); + } + + token_t token = free_list.back(); + free_list.pop_back(); + //cout << "Creating constant with token " << token << endl; + assert(language[token] == 0); + + language[token] = make_const(value); + + doubleSet[value] = token; + if (token_value.size() < token) token_value.resize(token+1); + token_value[token] = value; + + return Sym(token); +} + +/* LanguageTable depends on this one, XXX move somewhere safe.*/ +#include +extern Sym default_const() { return SymConst(rng.normal()); } + +/* The functions */ +namespace { + +class Var : public FunDef { + public : + unsigned idx; + string default_str; + + Var(unsigned _idx) : idx(_idx) { + ostringstream os; + os << "x[" << idx << ']'; // CompiledCode expects this form + default_str = os.str(); + } + + double eval(const vector& _, const vector& inputs) const { return inputs[idx]; } + double eval(const SymVec& _, const vector& inputs) const { return inputs[idx]; } + string c_print(const vector& _, const vector& names) const { + if (names.empty()) { + return default_str; + } + return names[idx]; + } + + Interval eval(const vector& _, const vector& inputs) const { + return inputs[idx]; + } + + unsigned min_arity() const { return 0; } + + string name() const { return "var"; } + +}; + +class Const : public FunDef { + public: + double value; + string value_str; + + Const(double _value) : value(_value) { + ostringstream os; + os.precision(17); + os.setf(ios::showpoint); + os << '(' << value << ')'; + value_str = os.str(); + } + + + double eval(const vector& _, const vector& inputs) const { return value; } + double eval(const SymVec& _, const vector& inputs) const { return value; } + string c_print(const vector& _, const vector& names) const { + return value_str; + } + + Interval eval(const vector& _, const vector& inputs) const { + return Interval(value); + } + + unsigned min_arity() const { return 0; } + + string name() const { return "parameter"; } +}; + +} // namespace + +void get_constants(Sym sym, vector& ret) { + token_t token = sym.token(); + if (is_constant(token)) { + double val = static_cast(language[token])->value; + ret.push_back(val); + } + + const SymVec& args = sym.args(); + for (unsigned i = 0; i < args.size(); ++i) { + get_constants(args[i], ret); + } + +} + +double get_constant_value(token_t token) { + return static_cast(language[token])->value; +} + +/** Get out the values for all constants in the expression */ +vector get_constants(Sym sym) { + vector retval; + get_constants(sym, retval); + return retval; +} + +/** Set the values for all constants in the expression. Vector needs to be the same size as the one get_constants returns + * The argument isn't touched, it will return a new sym with the constants set. */ +Sym set_constants(Sym sym, vector::const_iterator& it) { + + token_t token = sym.token(); + if (is_constant(token)) { + return SymConst(*it++); + } + + SymVec args = sym.args(); + for (unsigned i = 0; i < args.size(); ++i) { + args[i] = set_constants(args[i], it); + } + + return Sym(token, args); +} + +Sym set_constants(Sym sym, const vector& constants) { + vector::const_iterator it = constants.begin(); + return set_constants(sym, it); +} + +// Get functions out, excluding Const and Var +vector get_defined_functions() { + vector res; + for (unsigned i = 0; i < language.size(); ++i) { + res.push_back(language[i]); + + if (is_constant(i) || is_variable(i)) { + res.back() = 0; // erase + } + } + + return res; +} + +FunDef* make_var(int idx) { return new Var(idx); } +FunDef* make_const(double value) { return new Const(value); } + +bool is_constant(token_t token) { + const Const* cnst = dynamic_cast( language[token] ); + return cnst != 0; +} + +bool is_variable(token_t token) { + const Var* var = dynamic_cast( language[token] ); + return var != 0; +} + +unsigned get_variable_index(token_t token) { + const Var* var = static_cast( language[token] ); + return var->idx; +} + +namespace { +class Lambda : public FunDef { + public: + Sym expression; + int arity; + + Lambda(Sym expr, int arity_) : expression(expr), arity(arity_) {} + + double eval(const vector& vals, const vector& _) const { + return ::eval(expression, vals); + } + + string c_print(const vector& args, const vector& _) const { + return string("/*f*/") + ::c_print(expression, args) + string("/*eof*/"); + } + + Interval eval(const vector& args, const vector& _) const { + return ::eval(expression, args); + } + + unsigned min_arity() const { return arity; } + string name() const { return "F"; } + +}; + Sym normalize(Sym sym, SymVec& args) { + // check if it's a variable + token_t token = sym.token(); + const Var* var = dynamic_cast< const Var*>(language[token]); + + if (var != 0) { + for (unsigned i = 0; i < args.size(); ++i) { + if (sym == args[i]) { + return SymVar(i); // replace with reference to arg + } + } + + // not replaced, add it + args.push_back(sym); + return SymVar(args.size()-1); + + } + + SymVec a = sym.args(); + for (unsigned i = 0; i < a.size(); ++i) { + a[i] = normalize(a[i], args); + } + + return Sym(token, a); + } +} + +bool is_lambda(token_t token) { + const Lambda* lambda = dynamic_cast( language[token]); + return lambda != 0; +} + +std::ostream& print_list(Sym sym, ostream& os) { + os << sym.token() << ' '; + + const SymVec& args = sym.args(); + for (unsigned i = 0; i < args.size(); ++i) { + print_list(args[i], os); + } + return os; +} + +token_t new_lambda(Sym sym, int arity) { + // check if already present + + LambdaSet::iterator it = lambdaSet.find(sym); + if (it != lambdaSet.end()) { + return it->second; + } + + + // new, insert + Lambda* lambda = new Lambda(sym, arity); + + if (free_list.empty()) { + extend_free_list(); + } + + token_t token = free_list.back(); + free_list.pop_back(); + language[token] = lambda; + + lambdaSet[sym] = token; + if (token_lambda.size() <= token) token_lambda.resize(token+1); + token_lambda[token] = sym; + + return token; +} + +/* Compression */ +typedef hash_map OccMap; + +void count_occurances(Sym sym, OccMap& occ) { + occ[sym]++; + const SymVec& args = sym.args(); + for (unsigned i = 0; i < args.size(); ++i) { + count_occurances(args[i], occ); + } +} + +Sym create_lambda(Sym sym, OccMap& occ, unsigned nvars, vector& args) { + unsigned o = occ[sym]; + unsigned sz = sym.size(); + + if (o * sz > o + sz + nvars || is_variable(sym.token()) ) { + // check if it's already present + for (unsigned i = 0; i < args.size(); ++i) { + if (args[i] == sym) { + return SymVar(i); + } + } + // push_back + args.push_back(sym); + return SymVar(args.size()-1); + } + + SymVec sym_args = sym.args(); + for (unsigned i = 0; i < sym_args.size(); ++i) { + sym_args[i] = create_lambda(sym_args[i], occ, nvars, args); + } + + return Sym(sym.token(), sym_args); + +} + +Sym compress(Sym sym) { + OccMap occ(sym.size()); + count_occurances(sym, occ); + + unsigned nvars = 0; + for (OccMap::iterator it = occ.begin(); it != occ.end(); ++it) { + if (is_variable(it->first.token())) nvars++; + } + + SymVec args; + Sym body = create_lambda(sym, occ, nvars, args); + + + if (body.size() < sym.size()) { + // see if the body can be compressed some more + body = compress(body); + + token_t token = new_lambda(body, args.size()); + + for (unsigned i = 0; i < args.size(); ++i) { + args[i] = compress(args[i]); + } + + Sym result = Sym(token, args); + return compress(result); // see if it can be compressed some more + } + + return sym; +} + +Sym SymLambda(Sym expr) { return compress(expr); } + +Sym expand(Sym expr, const SymVec& args) { + + const Var* var = dynamic_cast( language[expr.token()] ); + if (var != 0) { + return args[var->idx]; + } + + SymVec expr_args = expr.args(); + for (unsigned i = 0; i < expr_args.size(); ++i) { + expr_args[i] = expand(expr_args[i], args); + } + + return Sym(expr.token(), expr_args); +} + +Sym SymUnlambda(Sym sym) { + Sym retval = sym; + const Lambda* lambda = dynamic_cast( language[sym.token()] ); + if (lambda != 0) { + retval = expand(lambda->expression, sym.args()); + } + + return retval; +} + +Sym expand_all(Sym sym) { + SymVec args = sym.args(); + for (unsigned i = 0; i < args.size(); ++i) { + args[i] = expand_all(args[i]); + } + + Sym nw = SymUnlambda( Sym(sym.token(), args) ); + + if (nw != sym) { + nw = expand_all(nw); + } + + return nw; +} + +namespace { + +class Sum : public FunDef { + + public : + + double eval(const vector& vals, const vector& _) const { + double res = 0; + for (unsigned i = 0; i < vals.size(); ++i) res += vals[i]; + return res; + } + + string c_print(const vector& args, const vector& _) const { + if (args.empty()) { return "0.0"; } + + ostringstream os; + os << "(" << args[0]; + for (unsigned i = 1; i < args.size(); ++i) { + os << "+" << args[i]; + } + os << ")"; + return os.str(); + } + + Interval eval(const vector& args, const vector& inputs) const { + Interval interv(0.0); + for (unsigned i = 0; i < args.size(); ++i) { + interv += args[i]; + } + return interv; + } + + unsigned min_arity() const { return 0; } + bool has_varargs() const { return true; } + + string name() const { return "sum"; } +}; + + +class Prod : public FunDef { + + public : + + double eval(const vector& vals, const vector& _) const { + double res = 1; + for (unsigned i = 0; i < vals.size(); ++i) res *= vals[i]; + return res; + } + + string c_print(const vector& args, const vector& _) const { + if (args.empty()) { return "1.0"; } + + ostringstream os; + os << "(" << args[0]; + for (unsigned i = 1; i < args.size(); ++i) { + os << "*" << args[i]; + } + os << ")"; + + return os.str(); + } + + Interval eval(const vector& args, const vector& inputs) const { + Interval interv(1.0); + for (unsigned i = 0; i < args.size(); ++i) { + interv *= args[i]; + } + return interv; + } + + unsigned min_arity() const { return 0; } + bool has_varargs() const { return true; } + + string name() const { return "prod"; } +}; + + +class Power : public FunDef { + public : + double eval(const vector& vals, const vector& _) const { + return pow(vals[0], vals[1]); + } + + string c_print(const vector& args, const vector& _) const { + return "pow(" + args[0] + ',' + args[1] + ')'; + } + + Interval eval(const vector& args, const vector& _) const { + Interval first = args[0]; + Interval second = args[1]; + Interval lg = log(first); + if (!valid(lg)) throw interval_error(); + return exp(second * lg); + } + + unsigned min_arity() const { return 2; } + + string name() const { return "pow"; } +}; + +class IsNeg : public FunDef { + + public: + double eval(const vector& vals, const vector& _) const { + if (vals[0] < 0.0) return vals[1]; + return vals[2]; + } + + double eval(const Sym& sym, const vector& inputs) const { + const SymVec& args = sym.args(); + double arg0 = ::eval(args[0], inputs); + if (arg0 < 0.0) { + return ::eval(args[1], inputs); + } + return ::eval(args[2], inputs); + } + + string c_print(const vector& args, const vector& _) const { + return "((" + args[0] + "<0.0)?" + args[1] + ":" + args[2]+")"; + } + + Interval eval(const vector& args, const vector& _) const { + Interval a0 = args[0]; + if (a0.upper() < 0.0) return args[1]; + if (a0.lower() >= 0.0) return args[2]; + + return Interval( std::min(args[1].lower(), args[2].lower()), std::max(args[1].upper(), args[2].upper())); + } + + unsigned min_arity() const { return 3; } + + string name() const { return "ifltz"; } +}; + +template +class Unary : public FunDef { + + Func un; + + double eval(const vector& vals, const vector& _) const { + return un(vals[0]); + } + + string c_print(const vector& args, const vector& _) const { + return un(args[0]); + } + + Interval eval(const vector& args, const vector& _) const { + return un(args[0]); + } + + unsigned min_arity() const { return 1; } + + string name() const { return un.name(); } + +}; + +struct Inv { + double operator()(double val) const { return 1.0 / val; } + string operator()(string v) const { return "(1./" + v + ")"; } + Interval operator()(Interval v) const { return 1.0 / v; } + + string name() const { return "inv"; } +}; + +struct Min { + double operator()(double val) const { return -val; } + string operator()(string v) const { return "(-" + v + ")"; } + Interval operator()(Interval v) const { return -v; } + + string name() const { return "min"; } +}; + +} // namespace + +string prototypes = "double pow(double, double);"; +string get_prototypes() { return prototypes; } +unsigned add_prototype(string str) { prototypes += string("double ") + str + "(double);"; return prototypes.size(); } + +token_t add_function(FunDef* function, token_t where) { + if (language.size() <= where) language.resize(where+1); + language[where] = function; + return 0; +} + +namespace { + +#define FUNCDEF(funcname) struct funcname##_struct { \ + double operator()(double val) const { return funcname(val); }\ + string operator()(string val) const { return string(#funcname) + '(' + val + ')'; }\ + Interval operator()(Interval val) const { return funcname(val); }\ + string name() const { return string(#funcname); }\ +};\ +static const token_t funcname##_token_static = add_function( new Unary, funcname##_token);\ +unsigned funcname##_size = add_prototype(#funcname); + +static token_t ssum_token = add_function( new Sum , sum_token); +static token_t sprod_token = add_function( new Prod, prod_token); +static token_t sinv_token = add_function( new Unary, inv_token); +static token_t smin_token = add_function( new Unary, min_token); +static token_t spow_token = add_function( new Power, pow_token); +static token_t sifltz_token = add_function( new IsNeg, ifltz_token); + +FUNCDEF(sin); +FUNCDEF(cos); +FUNCDEF(tan); +FUNCDEF(asin); +FUNCDEF(acos); +FUNCDEF(atan); + +FUNCDEF(sinh); +FUNCDEF(cosh); +FUNCDEF(tanh); +FUNCDEF(asinh); +FUNCDEF(acosh); +FUNCDEF(atanh); + +FUNCDEF(exp); +FUNCDEF(log); +} // namespace + +double sqr(double x) { return x*x; } + +namespace { +FUNCDEF(sqr); +FUNCDEF(sqrt); + +const int buildInFunctionOffset = language.size(); +} // namespace + +void add_tokens() { + unsigned sz = language.size(); + language.resize(sz + sz+1); // double + + for (unsigned i = sz; i < language.size(); ++i) { + free_list.push_back(i); + } +} + +void extend_free_list() { + // first check if we can clean up unused tokens; + const vector& refcount = Sym::token_refcount(); + for (unsigned i = buildInFunctionOffset; i < refcount.size(); ++i) { + if (language[i] == 0) continue; + + bool c = is_constant(i); + bool l = is_lambda(i); + + if (refcount[i] == 0 && (c || l)) { + + if (c) { + doubleSet.erase(token_value[i]); + } + + if (l) { + lambdaSet.erase(token_lambda[i]); + } + + delete language[i]; + language[i] = 0; + free_list.push_back(i); + } + } + + // if still empty, add new tokens + if (free_list.empty()) { + add_tokens(); + } +} + + +/* Serialization */ +void write_raw(ostream& os, const Sym& sym) { + token_t token = sym.token(); + const SymVec& args = sym.args(); + + if (is_constant(token)) { + os << "c" << language[token]->c_print(vector(), vector()); + } else { + + const Var* var = dynamic_cast( language[token] ); + + if (var != 0) { + os << "v" << var->idx; + } else { + os << "f" << token << ' ' << args.size(); + } + } + + for (unsigned i = 0; i < args.size(); ++i) { + write_raw(os, args[i]); + } +} + +string write_raw(const Sym& sym) { + + ostringstream os; + write_raw(os, sym); + + return os.str(); +} + +Sym read_raw(istream& is) { + char id = is.get(); + + switch (id) { + case 'c' : + { + double val; + is.get(); // skip '(' + is >> val; + is.get(); // skip ')' + return SymConst(val); + } + case 'v' : + { + unsigned idx; + is >> idx; + return SymVar(idx); + } + case 'f' : + { + token_t token; + unsigned arity; + is >> token; + is >> arity; + SymVec args(arity); + for (unsigned i = 0; i < arity; ++i) { + args[i] = read_raw(is); + } + + return Sym(token, args); + } + default : { + cerr << "Character = " << id << " Could not read formula from stream" << endl; + exit(1); + } + + } + + return Sym(); +} + +Sym read_raw(string str) { + istringstream is(str); + return read_raw(is); +} + +void read_raw(istream& is, Sym& sym) { + sym = read_raw(is); +} + diff --git a/trunk/eo/contrib/mathsym/fun/FunDef.h b/trunk/eo/contrib/mathsym/fun/FunDef.h new file mode 100644 index 000000000..d4ed95a1d --- /dev/null +++ b/trunk/eo/contrib/mathsym/fun/FunDef.h @@ -0,0 +1,186 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef FUNCTION_DEF_H_ +#define FUNCTION_DEF_H_ + +#include +#include +#include +#include + +#include "sym/Sym.h" +#include "eval/Interval.h" + +class FunDef { + public: + + virtual ~FunDef() {} + + // (possibly) lazy evaluation function, default implementation calls 'eager' eval + virtual double eval(const SymVec& args, const std::vector& inputs) const; + + // eager evaluation function + virtual double eval(const std::vector& args, const std::vector& inputs) const = 0; + + // interval evaluation + virtual Interval eval(const std::vector& args, const std::vector& inputs) const = 0; + + // prints 'c' like code + virtual std::string c_print(const std::vector& names, const std::vector& names) const = 0; + + virtual unsigned min_arity() const = 0; + virtual bool has_varargs() const { return false; } // sum, prod, min, max are variable arity + + virtual std::string name() const = 0; + + protected: + +}; + +/** Gets out all function that are defined (excluding constants and variables) */ +extern std::vector get_defined_functions(); + +/** Gets a specific function (including vars and constants) out */ +extern const FunDef& get_element(token_t token); + +/** Single case evaluation */ +extern double eval(const Sym& sym, const std::vector& inputs); + +/** Static analysis through interval arithmetic */ +extern Interval eval(const Sym& sym, const std::vector& inputs); + +/** Pretty printers, second version allows setting of variable names */ +extern std::string c_print(const Sym& sym); + +/** Pretty printers, allows setting of variable names */ +extern std::string c_print(const Sym& sym, const std::vector& var_names); + +/** Pretty printer streamer */ +inline std::ostream& operator<<(std::ostream& os, const Sym& sym) { return os << c_print(sym); } + +/* Support for Ephemeral Random Constants (ERC) */ + +/** Create constant with this value, memory is managed. If reference count drops to zero value is deleted. */ +extern Sym SymConst(double value); +/** Create variable */ +extern Sym SymVar(unsigned idx); + +/** Create 'lambda expression; + * This is a neutral operation. It will replace + * all variables in the expression by arguments, + * wrap the expression in a Lambda function + * and returns a tree applying the lambda function + * to the original variable. + * + * A call like SymLambda( SymVar(1) + SymVar(1) * 3.1) will result in + * a Lambda function (a0 + a0 * 3.1) with one argument: SymVar(1)*/ + +extern Sym SymLambda(Sym expression); + +extern Sym SymUnlambda(Sym sym); + +/** Expands all lambda expressions inline */ +extern Sym expand_all(Sym sym); +extern Sym compress(Sym sym); + +/** Get out the values for all constants in the expression */ +std::vector get_constants(Sym sym); + +/** Set the values for all constants in the expression. Vector needs to be the same size as the one get_constants returns + * The argument isn't touched, it will return a new sym with the constants set. */ +Sym set_constants(Sym sym, const std::vector& constants); + +/** check if a token is a constant */ +extern bool is_constant(token_t token); +extern double get_constant_value(token_t token); +/** check if a token is a variable */ +extern bool is_variable(token_t token); +extern unsigned get_variable_index(token_t token); + +/** check if a token is a user/automatically defined function */ +extern bool is_lambda(token_t token); + + +/** simplifies a sym (sym_operations.cpp) Currently only simplifies constants */ +extern Sym simplify(Sym sym); + +/** differentiates a sym to a token (sym_operations.cpp) + * The token can be a variable or a constant +*/ +extern Sym differentiate(Sym sym, token_t dx); +struct differentiation_error{}; // thrown in case of ifltz + +/* Add function to the language table (and take a guess at the arity) */ +class LanguageTable; +extern void add_function_to_table(LanguageTable& table, token_t token); + +enum { + sum_token, + prod_token, + inv_token, + min_token, + pow_token, + ifltz_token, + sin_token, cos_token, tan_token, + asin_token, acos_token, atan_token, + sinh_token, cosh_token, tanh_token, + acosh_token, asinh_token, atanh_token, + exp_token, log_token, + sqr_token, sqrt_token +}; + +/* Defition of function overloads: for example, this define the function 'Sym sin(Sym)' */ + +#define HEADERFUNC(name) inline Sym name(Sym arg) { return Sym(name##_token, arg); } + +/* This defines the tokens: sin_token, cos_token, etc. */ +HEADERFUNC(inv); +HEADERFUNC(sin); +HEADERFUNC(cos); +HEADERFUNC(tan); +HEADERFUNC(asin); +HEADERFUNC(acos); +HEADERFUNC(atan); + +HEADERFUNC(sinh); +HEADERFUNC(cosh); +HEADERFUNC(tanh); +HEADERFUNC(asinh); +HEADERFUNC(acosh); +HEADERFUNC(atanh); + +HEADERFUNC(exp); +HEADERFUNC(log); + +HEADERFUNC(sqr); +HEADERFUNC(sqrt); + +/* Get the prototype functions out, this is needed for compilation */ +extern std::string get_prototypes(); + +// reading and writing in internal format, no parser for symbolic functions implemented yet +extern std::string write_raw(const Sym& sym); +extern void write_raw(std::ostream& os, const Sym& sym); +extern Sym read_raw(std::string str); +extern Sym read_raw(std::istream& is); +extern void read_raw(std::istream& is, Sym& sym); + +#include "SymOps.h" + +#endif + diff --git a/trunk/eo/contrib/mathsym/fun/SymOps.cpp b/trunk/eo/contrib/mathsym/fun/SymOps.cpp new file mode 100644 index 000000000..2d66b0d05 --- /dev/null +++ b/trunk/eo/contrib/mathsym/fun/SymOps.cpp @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "FunDef.h" +#include "SymOps.h" +#include "Sym.h" + +using namespace std; + +void collect(token_t t, Sym a, SymVec& args) { + + if (a.token() == t) { + const SymVec& a_args = a.args(); + for (unsigned i = 0; i < a_args.size(); ++i) { + collect(t, a_args[i], args); + } + return; + } + + args.push_back(a); +} + +Sym operator+(Sym a, Sym b) { + + SymVec args; + + collect(sum_token, a, args); + collect(sum_token, b, args); + + return Sym(sum_token, args); +} + +Sym operator*(Sym a, Sym b) { + + SymVec args; + + collect(prod_token, a, args); + collect(prod_token, b, args); + + return Sym(prod_token, args); +} + +Sym operator/(Sym a, Sym b) { + + SymVec args; + + collect(prod_token, a, args); + + SymVec args2; + collect(prod_token, b, args2); + + SymVec inv; + inv.push_back(Sym(prod_token, args2)); + + args.push_back( Sym(inv_token, inv) ); + + return Sym(prod_token, args); +} + +Sym operator-(Sym a, Sym b) { + + SymVec args; + + collect(sum_token, a, args); + + SymVec args2; + collect(sum_token, b, args2); + + SymVec min; + min.push_back(Sym(sum_token, args2)); + + args.push_back( Sym(min_token, min) ); + + return Sym(sum_token, args); +} + +Sym operator-(Sym a) { + return Sym(min_token, a); +} + +Sym pow(Sym a, Sym b) { + SymVec args; + args.push_back(a); + args.push_back(b); + return Sym(pow_token, args); +} + +Sym ifltz(Sym a, Sym b, Sym c) { + SymVec args; + args.push_back(a); + args.push_back(b); + args.push_back(c); + return Sym(ifltz_token, args); +} + diff --git a/trunk/eo/contrib/mathsym/fun/SymOps.h b/trunk/eo/contrib/mathsym/fun/SymOps.h new file mode 100644 index 000000000..a11994ff6 --- /dev/null +++ b/trunk/eo/contrib/mathsym/fun/SymOps.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef SYMOPS_H +#define SYMOPS_H + +#include "sym/Sym.h" + +extern Sym operator+(Sym a, Sym b); +extern Sym operator*(Sym a, Sym b); +extern Sym operator/(Sym a, Sym b); +extern Sym operator-(Sym a, Sym b); +extern Sym pow(Sym a, Sym b); +extern Sym ifltz(Sym a, Sym b, Sym c); +extern Sym operator-(Sym a); + +#endif diff --git a/trunk/eo/contrib/mathsym/fun/sym_operations.cpp b/trunk/eo/contrib/mathsym/fun/sym_operations.cpp new file mode 100644 index 000000000..124c657ad --- /dev/null +++ b/trunk/eo/contrib/mathsym/fun/sym_operations.cpp @@ -0,0 +1,174 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +using namespace std; + +Sym simplify_constants(Sym sym) { + + SymVec args = sym.args(); + token_t token = sym.token(); + + bool has_changed = false; + bool all_constants = true; + + for (unsigned i = 0; i < args.size(); ++i) { + + Sym arg = simplify_constants(args[i]); + + if (arg != args[i]) { + has_changed = true; + } + args[i] = arg; + + all_constants &= is_constant(args[i].token()); + } + + if (args.size() == 0) { + + if (sym.token() == sum_token) return SymConst(0.0); + if (sym.token() == prod_token) return SymConst(1.0); + + return sym; // variable or constant + } + + if (all_constants) { + // evaluate + + vector dummy; + + double v = ::eval(sym, dummy); + + Sym result = SymConst(v); + + return result; + } + + if (has_changed) { + return Sym(token, args); + } + + return sym; + +} + +// currently only simplifies constants +Sym simplify(Sym sym) { + + return simplify_constants(sym); + +} + +Sym derivative(token_t token, Sym x) { + Sym one = Sym(prod_token); + + switch (token) { + case inv_token : return Sym(inv_token, sqr(x)); + + case sin_token : return -cos(x); + case cos_token : return sin(x); + case tan_token : return one + sqr(tan(x)); + + case asin_token : return inv( sqrt(one - sqr(x))); + case acos_token: return -inv( sqrt(one - sqr(x))); + case atan_token : return inv( sqrt(one + sqr(x))); + + case cosh_token : return -sinh(x); + case sinh_token : return cosh(x); + case tanh_token : return one - sqr( tanh(x) ); + + case asinh_token : return inv( sqrt( one + sqr(x) )); + case acosh_token : return inv( sqrt(x-one) * sqrt(x + one) ); + case atanh_token : return inv(one - sqr(x)); + + case exp_token : return exp(x); + case log_token : return inv(x); + + case sqr_token : return SymConst(2.0) * x; + case sqrt_token : return SymConst(0.5) * inv( sqrt(x)); + default : + throw differentiation_error(); + } + + return x; +} + +extern Sym differentiate(Sym sym, token_t dx) { + + token_t token = sym.token(); + + Sym zero = Sym(sum_token); + Sym one = Sym(prod_token); + + if (token == dx) { + return one; + } + + SymVec args = sym.args(); + + if (args.size() == 0) { // df/dx with f != x + return zero; + } + + switch (token) { + + case sum_token: + { + for (unsigned i = 0; i < args.size(); ++i) { + args[i] = differentiate(args[i], dx); + } + + if (args.size() == 1) return args[0]; + return Sym(sum_token, args); + } + case min_token : + { + return -differentiate(args[0],dx); + } + case prod_token: + { + if (args.size() == 1) return differentiate(args[0], dx); + + if (args.size() == 2) { + return args[0] * differentiate(args[1], dx) + args[1] * differentiate(args[0], dx); + } + // else + Sym c = args.back(); + args.pop_back(); + Sym f = Sym(prod_token, args); + Sym df = differentiate( f, dx); + + return c * df + f * differentiate(c,dx); + } + case pow_token : + { + return pow(args[0], args[1]) * args[1] * inv(args[0]); + } + case ifltz_token : + { // cannot be differentiated + throw differentiation_error(); // TODO define proper exception + } + + default: // unary function: apply chain rule + { + Sym arg = args[0]; + return derivative(token, arg) * differentiate(arg, dx); + } + } + +} diff --git a/trunk/eo/contrib/mathsym/fun/util.cpp b/trunk/eo/contrib/mathsym/fun/util.cpp new file mode 100644 index 000000000..83e751dec --- /dev/null +++ b/trunk/eo/contrib/mathsym/fun/util.cpp @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include + +using namespace std; + +double error(string errstr) { + cerr << "ERROR: " << errstr << endl; + exit(1); +} + diff --git a/trunk/eo/contrib/mathsym/gen/LanguageTable.cpp b/trunk/eo/contrib/mathsym/gen/LanguageTable.cpp new file mode 100644 index 000000000..293f6569b --- /dev/null +++ b/trunk/eo/contrib/mathsym/gen/LanguageTable.cpp @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#include "LanguageTable.h" +#include "Sym.h" + +#include + +using namespace std; + +extern Sym default_const(); + +class LanguageImpl { + public : + std::vector vars; + LanguageTable::erc_func erc; + + std::vector functions; + std::vector< std::vector > functions_per_arity; + + LanguageImpl() : erc(default_const) {} +}; + +LanguageTable::LanguageTable() { + pimpl = new LanguageImpl; +} + +LanguageTable::~LanguageTable() { + delete pimpl; +} + +LanguageTable::LanguageTable(const LanguageTable& that) { + pimpl = new LanguageImpl(*that.pimpl); +} + +LanguageTable& LanguageTable::operator=(const LanguageTable& that) { + *pimpl = *that.pimpl; + return *this; +} + +void LanguageTable::add_function(token_t token, unsigned arity) { + functor_t f = {token, arity}; + add_function( f ); +} + +void LanguageTable::add_function(functor_t f) { + + if (f.arity > 0) { + pimpl->functions.push_back(f); + + } else { + pimpl->vars.push_back(Sym(f.token)); + } + + if (pimpl->functions_per_arity.size() <= f.arity) pimpl->functions_per_arity.resize(f.arity+1); + pimpl->functions_per_arity[f.arity].push_back(f.token); + +} + +void LanguageTable::set_erc( erc_func func) { pimpl->erc = func; } + +/* Getting info out */ + +extern Sym SymConst(double val); + +Sym LanguageTable::get_random_var() const { return rng.choice(pimpl->vars); } +Sym LanguageTable::get_random_const() const { return pimpl->erc(); } + +functor_t LanguageTable::get_random_function() const +{ + return rng.choice(pimpl->functions); +} + +token_t LanguageTable::get_random_function(token_t token, unsigned arity) const +{ + if (pimpl->functions_per_arity.size() <= arity || pimpl->functions_per_arity[arity].empty()) { + return token; // return original token if no functions of this arity are found + } + return rng.choice(pimpl->functions_per_arity[arity]); +} + + + diff --git a/trunk/eo/contrib/mathsym/gen/LanguageTable.h b/trunk/eo/contrib/mathsym/gen/LanguageTable.h new file mode 100644 index 000000000..978ef3f5a --- /dev/null +++ b/trunk/eo/contrib/mathsym/gen/LanguageTable.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef LANGUAGE_TABLE_H +#define LANGUAGE_TABLE_H + +#include + +class LanguageImpl; +class Sym; + +class LanguageTable { + + LanguageImpl* pimpl; + + public: + + LanguageTable(); + ~LanguageTable(); + + LanguageTable(const LanguageTable& org); + + LanguageTable& operator=(const LanguageTable& org); + + /* setting it up */ + typedef Sym (*erc_func)(); + + void add_function(token_t token, unsigned arity); + void add_function(functor_t functor); + void set_erc(erc_func func); + + /* Getting info out */ + + Sym get_random_var() const; + Sym get_random_const() const; + + functor_t get_random_function() const; + token_t get_random_function(token_t org, unsigned arity) const; +}; + +#endif + diff --git a/trunk/eo/contrib/mathsym/gen/NodeSelector.cpp b/trunk/eo/contrib/mathsym/gen/NodeSelector.cpp new file mode 100644 index 000000000..aefa4dd6f --- /dev/null +++ b/trunk/eo/contrib/mathsym/gen/NodeSelector.cpp @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "NodeSelector.h" +#include "Sym.h" + +#include + +// If subtree is not set (by randomnodeselector for instance, find it now +Sym NodeSelector::NodeSelection::subtree() { + if (subtree_.empty()) { + subtree_ = get_subtree(root_, subtree_index_); + } + return subtree_; +} + +NodeSelector::NodeSelection RandomNodeSelector::select_node(Sym sym) const { + unsigned idx = rng.random(sym.size()); + return NodeSelection(sym, idx, Sym() ); // empty subtree, find it when needed +} + +NodeSelector::NodeSelection BiasedNodeSelector::select_node(Sym sym) const { + + unsigned p = rng.random(sym.size()); + Sym res; + for (unsigned i = 0; i < nRounds; ++i) { + res = get_subtree(sym, p); + + if (res.args().size() > 0) break; + + p = rng.random(sym.size()); + } + + return NodeSelection(sym, p, res); +} + diff --git a/trunk/eo/contrib/mathsym/gen/NodeSelector.h b/trunk/eo/contrib/mathsym/gen/NodeSelector.h new file mode 100644 index 000000000..c8b2ccf09 --- /dev/null +++ b/trunk/eo/contrib/mathsym/gen/NodeSelector.h @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef NODESELECTOR_H +#define NODESELECTOR_H + +#include + +/** Base class for selecting nodes */ +class NodeSelector { + public: + + class NodeSelection { + Sym root_; + unsigned subtree_index_; + Sym subtree_; + + public : + NodeSelection(Sym r, unsigned idx, Sym s) + : root_(r), subtree_index_(idx), subtree_(s) {} + + Sym root() const { return root_; } + unsigned idx() const { return subtree_index_; } + Sym subtree(); + + }; + + virtual ~NodeSelector() {} + + virtual NodeSelection select_node(Sym sym) const = 0; +}; + + +/** Select nodes uniformly */ +class RandomNodeSelector : public NodeSelector { + public: + NodeSelection select_node(Sym sym) const; +}; + +/** A node selector that does a specified number of rounds ignoring terminals */ +class BiasedNodeSelector : public NodeSelector { + public: + unsigned nRounds; + + BiasedNodeSelector() : nRounds(3) {} // 3: for binary trees 87.5% chance of selecting an internal node + BiasedNodeSelector(unsigned n) : nRounds(n) {} + + NodeSelection select_node(Sym sym) const; +}; + +#endif diff --git a/trunk/eo/contrib/mathsym/gen/TreeBuilder.cpp b/trunk/eo/contrib/mathsym/gen/TreeBuilder.cpp new file mode 100644 index 000000000..70b7ef53e --- /dev/null +++ b/trunk/eo/contrib/mathsym/gen/TreeBuilder.cpp @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include "TreeBuilder.h" + +Sym TreeBuilder::make_terminal() const { + if (rng.flip(vcprob)) { + return table.get_random_var(); + } + + return table.get_random_const(); +} + +Sym TreeBuilder::build_tree(unsigned max_depth, bool grow) const { + if (max_depth == 0 || grow && rng.random(2) == 0) { + return make_terminal(); + } + + // pick a random function, no matter what arity + + functor_t func = table.get_random_function(); + + SymVec args(func.arity); + + for (unsigned i = 0; i < args.size(); ++i) { + args[i] = build_tree(max_depth-1, grow); + } + + return Sym(func.token, args); +} + diff --git a/trunk/eo/contrib/mathsym/gen/TreeBuilder.h b/trunk/eo/contrib/mathsym/gen/TreeBuilder.h new file mode 100644 index 000000000..57cb54582 --- /dev/null +++ b/trunk/eo/contrib/mathsym/gen/TreeBuilder.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef TREEBUILDER_H_ +#define TREEBUILDER_H_ + +#include "sym/Sym.h" +#include "LanguageTable.h" + +class TreeBuilder { + const LanguageTable& table; + + // probability of selecting a var versus a const when the choice boils down to selecting a terminal + double vcprob; + + Sym make_terminal() const; + public: + + TreeBuilder(const LanguageTable& t) : table(t), vcprob(0.9) {}; + TreeBuilder(const LanguageTable& t, double vc) : table(t), vcprob(vc) {}; + + void set_var_vs_const_probability(double p) { vcprob = p; } + + Sym build_tree(unsigned max_depth, bool grow) const; + + void build_tree(Sym& tree, unsigned max_depth, bool grow) const { tree = build_tree(max_depth, grow); } + +}; + +#endif + diff --git a/trunk/eo/contrib/mathsym/header b/trunk/eo/contrib/mathsym/header new file mode 100644 index 000000000..a4ea44583 --- /dev/null +++ b/trunk/eo/contrib/mathsym/header @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + diff --git a/trunk/eo/contrib/mathsym/regression/Dataset.cpp b/trunk/eo/contrib/mathsym/regression/Dataset.cpp new file mode 100644 index 000000000..bdb314551 --- /dev/null +++ b/trunk/eo/contrib/mathsym/regression/Dataset.cpp @@ -0,0 +1,133 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "Dataset.h" +#include +#include + +#include + +using namespace std; + +class DataSetImpl { + public: + vector< vector > inputs; + vector targets; + + void read_data(vector strings) { + // find the number of inputs + + istringstream cnt(strings[0]); + unsigned n = 0; + for (;;) { + string s; + cnt >> s; + if (!cnt) break; + ++n; + } + + inputs.resize(strings.size(), vector(n-1)); + targets.resize(strings.size()); + + for (unsigned i = 0; i < strings.size(); ++i) { + istringstream is(strings[i]); + for (unsigned j = 0; j < n; ++j) { + + if (!is) { + cerr << "Too few targets in record " << i << endl; + exit(1); + } + + if (j < n-1) { + is >> inputs[i][j]; + } else { + is >> targets[i]; + } + + } + } + + } + +}; + +Dataset::Dataset() { pimpl = new DataSetImpl; } +Dataset::~Dataset() { delete pimpl; } +Dataset::Dataset(const Dataset& that) { pimpl = new DataSetImpl(*that.pimpl); } +Dataset& Dataset::operator=(const Dataset& that) { *pimpl = *that.pimpl; return *this; } + +unsigned Dataset::n_records() const { return pimpl->targets.size(); } +unsigned Dataset::n_fields() const { return pimpl->inputs[0].size(); } +const std::vector& Dataset::get_inputs(unsigned record) const { return pimpl->inputs[record]; } +double Dataset::get_target(unsigned record) const { return pimpl->targets[record]; } + +double error(string errstr); + +void Dataset::load_data(std::string filename) { + vector strings; // first load it in strings + + ifstream is(filename.c_str()); + + for(;;) { + string s; + getline(is, s); + if (!is) break; + + if (s[0] == '#') continue; // comment, skip + + strings.push_back(s); + } + + is.close(); + + if (strings.size() == 0) { + error("No data could be loaded"); + } + + pimpl->read_data(strings); + +} + +std::vector Dataset::input_minima() const { + vector >& in = pimpl->inputs; + + vector mn(in[0].size(), 1e+50); + for (unsigned i = 0; i < in.size(); ++i) { + for (unsigned j = 0; j < in[i].size(); ++j) { + mn[j] = std::min(mn[j], in[i][j]); + } + } + + return mn; +} + +vector Dataset::input_maxima() const { + vector >& in = pimpl->inputs; + + vector mx(in[0].size(), -1e+50); + for (unsigned i = 0; i < in.size(); ++i) { + for (unsigned j = 0; j < in[i].size(); ++j) { + mx[j] = std::max(mx[j], in[i][j]); + } + } + + return mx; +} + + + + diff --git a/trunk/eo/contrib/mathsym/regression/Dataset.h b/trunk/eo/contrib/mathsym/regression/Dataset.h new file mode 100644 index 000000000..395036db5 --- /dev/null +++ b/trunk/eo/contrib/mathsym/regression/Dataset.h @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef DATASET_H_ +#define DATASET_H_ + +#include +#include + +class DataSetImpl; + +class Dataset { + + DataSetImpl* pimpl; + + Dataset& operator=(const Dataset&); // cannot assign + public: + + Dataset(); + ~Dataset(); + Dataset(const Dataset&); + + void load_data(std::string filename); + + unsigned n_records() const; + unsigned n_fields() const; + + const std::vector& get_inputs(unsigned record) const; + double get_target(unsigned record) const; + + std::vector input_minima() const; + std::vector input_maxima() const; + +}; + +#endif + diff --git a/trunk/eo/contrib/mathsym/regression/ErrorMeasure.cpp b/trunk/eo/contrib/mathsym/regression/ErrorMeasure.cpp new file mode 100644 index 000000000..3a33d0d05 --- /dev/null +++ b/trunk/eo/contrib/mathsym/regression/ErrorMeasure.cpp @@ -0,0 +1,340 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#include +#include + +#include "MultiFunction.h" + +#include "ErrorMeasure.h" +#include "Dataset.h" +#include "Sym.h" +#include "FunDef.h" +#include "sym_compile.h" +#include "TargetInfo.h" +#include "stats.h" + +using namespace std; + +#ifdef INTERVAL_DEBUG + +#include +#include + +vector none; +IntervalBoundsCheck bounds(none, none); + +#endif + + + +static double not_a_number = atof("nan"); + +class ErrorMeasureImpl { + public: + const Dataset& data; + TargetInfo train_info; + + ErrorMeasure::measure measure; + + Scaling no_scaling; + + ErrorMeasureImpl(const Dataset& d, double t_p, ErrorMeasure::measure m) : data(d), measure(m) { + +#ifdef INTERVAL_DEBUG + bounds = IntervalBoundsCheck(d.input_minima(), d.input_maxima()); +#endif + + unsigned nrecords = d.n_records(); + unsigned cases = unsigned(t_p * nrecords); + + valarray t(cases); + + for (unsigned i = 0; i < cases; ++i) { + t[i] = data.get_target(i); + } + + train_info = TargetInfo(t); + no_scaling = Scaling(new NoScaling); + } + + ErrorMeasure::result eval(const valarray& y) { + + ErrorMeasure::result result; + result.scaling = no_scaling; + + + switch(measure) { + case ErrorMeasure::mean_squared: + result.error = pow(train_info.targets() - y, 2.0).sum() / y.size(); + return result; + case ErrorMeasure::absolute: + result.error = abs(train_info.targets() - y).sum() / y.size(); + return result; + case ErrorMeasure::mean_squared_scaled: + result.scaling = ols(y, train_info); + result.error = pow(train_info.targets() - result.scaling->transform(y), 2.0).sum() / y.size(); + return result; + default: + cerr << "Unknown measure encountered: " << measure << " " << __FILE__ << " " << __LINE__ << endl; + } + + return result; + } + + unsigned train_cases() const { + return train_info.targets().size(); + } + + vector multi_function_eval(const vector& pop) { + + if (pop.size() == 0) return vector(); + + multi_function all = compile(pop); + //MultiFunction all(pop); + std::vector y(pop.size()); + + Scaling noScaling = Scaling(new NoScaling); + + const std::valarray& t = train_info.targets(); + + cout << "Population size " << pop.size() << endl; + + if (measure == ErrorMeasure::mean_squared_scaled) { + std::vector var(pop.size()); + std::vector cov(pop.size()); + + Var vart; + + for (unsigned i = 0; i < t.size(); ++i) { + vart.update(t[i]); + + all(&data.get_inputs(i)[0], &y[0]); // evalutate + //all(data.get_inputs(i), y); // evalutate + + for (unsigned j = 0; j < pop.size(); ++j) { + var[j].update(y[j]); + cov[j].update(y[j], t[i]); + } + } + + std::vector result(pop.size()); + + for (unsigned i = 0; i < pop.size(); ++i) { + + // calculate scaling + double b = cov[i].get_cov() / var[i].get_var(); + + if (!finite(b)) { + result[i].scaling = noScaling; + result[i].error = vart.get_var(); // largest error + continue; + } + + double a = vart.get_mean() - b * var[i].get_mean(); + + result[i].scaling = Scaling( new LinearScaling(a,b)); + + // calculate error + double c = cov[i].get_cov(); + c *= c; + + double err = vart.get_var() - c / var[i].get_var(); + result[i].error = err; + if (!finite(err)) { + //cout << pop[i] << endl; + cout << "b " << b << endl; + cout << "var t " << vart.get_var() << endl; + cout << "var i " << var[i].get_var() << endl; + cout << "cov " << cov[i].get_cov() << endl; + + for (unsigned j = 0; j < t.size(); ++j) { + all(&data.get_inputs(i)[0], &y[0]); // evalutate + //all(data.get_inputs(j), y); // evalutate + + cout << y[i] << ' ' << ::eval(pop[i], data.get_inputs(j)) << endl; + } + + exit(1); + } + } + + return result; + } + + + std::vector err(pop.size()); + + for (unsigned i = 0; i < train_cases(); ++i) { + // evaluate + all(&data.get_inputs(i)[0], &y[0]); + //all(data.get_inputs(i), y); + + for (unsigned j = 0; j < pop.size(); ++j) { + double diff = y[j] - t[i]; + if (measure == ErrorMeasure::mean_squared) { // branch prediction will probably solve this inefficiency + err[j] += diff * diff; + } else { + err[j] += fabs(diff); + } + + } + + } + + std::vector result(pop.size()); + + double n = train_cases(); + for (unsigned i = 0; i < pop.size(); ++i) { + result[i].error = err[i] / n; + result[i].scaling = noScaling; + } + + return result; + + } + + vector single_function_eval(const vector & pop) { + + vector funcs(pop.size()); + compile(pop, funcs); // get one function pointer for each individual + + valarray y(train_cases()); + vector result(pop.size()); + for (unsigned i = 0; i < funcs.size(); ++i) { + for (unsigned j = 0; j < train_cases(); ++j) { + y[j] = funcs[i](&data.get_inputs(j)[0]); + } + +#ifdef INTERVAL_DEBUG + //cout << "eval func " << i << " " << pop[i] << endl; + pair b = bounds.calc_bounds(pop[i]); + + // check if y is in bounds + for (unsigned j = 0; j < y.size(); ++j) { + if (y[j] < b.first -1e-4 || y[j] > b.second + 1e-4 || !finite(y[j])) { + cout << "Error " << y[j] << " not in " << b.first << ' ' << b.second << endl; + cout << "Function " << pop[i] << endl; + exit(1); + } + } +#endif + + result[i] = eval(y); + } + + return result; + } + + vector calc_error(const vector& pop) { + + // first declone +#if USE_TR1 + typedef std::tr1::unordered_map HashMap; +#else + typedef hash_map HashMap; +#endif + HashMap clone_map; + vector decloned; + decloned.reserve(pop.size()); + + for (unsigned i = 0; i < pop.size(); ++i) { + HashMap::iterator it = clone_map.find(pop[i]); + + if (it == clone_map.end()) { // new + clone_map[ pop[i] ] = decloned.size(); + decloned.push_back(pop[i]); + } + + } + + // evaluate + vector dresult; + // currently we can only accumulate simple measures such as absolute and mean_squared + switch(measure) { + case ErrorMeasure::mean_squared: + case ErrorMeasure::absolute: + dresult = multi_function_eval(decloned); + break; + case ErrorMeasure::mean_squared_scaled: + dresult = multi_function_eval(decloned); + break; + } + + vector result(pop.size()); + for (unsigned i = 0; i < result.size(); ++i) { + result[i] = dresult[ clone_map[pop[i]] ]; + } + + return result; + } + +}; + +ErrorMeasure::result::result() { + error = 0.0; + scaling = Scaling(0); +} + +bool ErrorMeasure::result::valid() const { + return isfinite(error); +} + +ErrorMeasure::ErrorMeasure(const Dataset& data, double train_perc, measure meas) { + pimpl = new ErrorMeasureImpl(data, train_perc, meas); +} + +ErrorMeasure::~ErrorMeasure() { delete pimpl; } +ErrorMeasure::ErrorMeasure(const ErrorMeasure& that) { pimpl = new ErrorMeasureImpl(*that.pimpl); } + + +ErrorMeasure::result ErrorMeasure::calc_error(Sym sym) { + + single_function f = compile(sym); + + valarray y(pimpl->train_cases()); + + for (unsigned i = 0; i < y.size(); ++i) { + + y[i] = f(&pimpl->data.get_inputs(i)[0]); + + if (!finite(y[i])) { + result res; + res.scaling = Scaling(new NoScaling); + res.error = not_a_number; + return res; + } + } + + return pimpl->eval(y); +} + +vector ErrorMeasure::calc_error(const vector& syms) { + return pimpl->calc_error(syms); + +} + +double ErrorMeasure::worst_performance() const { + + if (pimpl->measure == mean_squared_scaled) { + return pimpl->train_info.tvar(); + } + + return 1e+20; +} + diff --git a/trunk/eo/contrib/mathsym/regression/ErrorMeasure.h b/trunk/eo/contrib/mathsym/regression/ErrorMeasure.h new file mode 100644 index 000000000..17619fe97 --- /dev/null +++ b/trunk/eo/contrib/mathsym/regression/ErrorMeasure.h @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef ERROR_MEASURE_H +#define ERROR_MEASURE_H + +#include "Scaling.h" + +class ErrorMeasureImpl; +class Sym; +class Dataset; + +class ErrorMeasure { + + ErrorMeasureImpl* pimpl; + + public : + + enum measure { + absolute, + mean_squared, + mean_squared_scaled, + }; + + struct result { + double error; + Scaling scaling; + + result(); + bool valid() const; + }; + + ErrorMeasure(const Dataset& data, double train_perc, measure meas = mean_squared); + + ~ErrorMeasure(); + ErrorMeasure(const ErrorMeasure& that); + ErrorMeasure& operator=(const ErrorMeasure& that); + + result calc_error(Sym sym); + + std::vector calc_error(const std::vector& sym); + + double worst_performance() const; +}; + +#endif + diff --git a/trunk/eo/contrib/mathsym/regression/Scaling.cpp b/trunk/eo/contrib/mathsym/regression/Scaling.cpp new file mode 100644 index 000000000..dd6b0d0fc --- /dev/null +++ b/trunk/eo/contrib/mathsym/regression/Scaling.cpp @@ -0,0 +1,417 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "Scaling.h" +#include "TargetInfo.h" + +using namespace std; + +Scaling slope(const std::valarray& x, const TargetInfo& targets) { + + double xx = 0.0; + double xy = 0.0; + + const valarray& y = targets.targets(); + + for (unsigned i = 0; i < x.size(); ++i) { + xx += x[i] * x[i]; + xy += x[i] * y[i]; + } + + if (xx < 1e-7) return Scaling(new LinearScaling(0.0,0.0)); + + double b = xy / xx; + + return Scaling(new LinearScaling(0.0, b)); + +} + +// Still needs proper testing with non-trivial lambda +Scaling regularized_least_squares(const std::valarray& inputs, const TargetInfo& targets, double lambda) { + + double n = inputs.size(); + + valarray x = inputs; + + double a,b,d; + a=b=d=0; + + for (unsigned i = 0; i < n; ++i) { + a += 1 + lambda; + b += x[i]; + d += x[i] * x[i] + lambda; + } + + //invert + + double ad_bc = a*d - b * b; + // if ad_bc equals zero there's a problem + + if (ad_bc < 1e-17) return Scaling(new LinearScaling); + + double ai = d/ad_bc; + double bi = -b/ad_bc; + double di = a/ad_bc; + double ci = bi; + + // Now multiply this inverted covariance matrix (C^-1) with x' * t + + std::valarray ones = x; + + // calculate C^-1 * x' ) + for (unsigned i = 0; i < n; ++i) + { + ones[i] = (ai + bi * x[i]); + x[i] = (ci + di * x[i]); + } + + // results are in [ones, x], now multiply with y + + a = 0.0; // intercept + b = 0.0; // slope + + const valarray& t = targets.targets(); + + for (unsigned i = 0; i < n; ++i) + { + a += ones[i] * t[i]; + b += x[i] * t[i]; + } + + return Scaling(new LinearScaling(a,b)); +} + +Scaling ols(const std::valarray& y, const std::valarray& t) { + double n = y.size(); + + double y_mean = y.sum() / n; + double t_mean = t.sum() / n; + + std::valarray y_var = (y - y_mean); + std::valarray t_var = (t - t_mean); + std::valarray cov = t_var * y_var; + + y_var *= y_var; + t_var *= t_var; + + double sumvar = y_var.sum(); + + if (sumvar == 0. || sumvar/n < 1e-7 || sumvar/n > 1e+7) // breakout when numerical problems are likely + return Scaling(new LinearScaling(t_mean,0.)); + + + double b = cov.sum() / sumvar; + double a = t_mean - b * y_mean; + + Scaling s = Scaling(new LinearScaling(a,b)); + + return s; +} + +Scaling ols(const std::valarray& y, const TargetInfo& targets) { + double n = y.size(); + + double y_mean = y.sum() / n; + + std::valarray y_var = (y - y_mean); + std::valarray cov = targets.tcov_part() * y_var; + + y_var *= y_var; + + double sumvar = y_var.sum(); + + if (sumvar == 0. || sumvar/n < 1e-7 || sumvar/n > 1e+7) // breakout when numerical problems are likely + return Scaling(new LinearScaling(targets.tmean(),0.)); + + + double b = cov.sum() / sumvar; + double a = targets.tmean() - b * y_mean; + + if (!finite(b)) { + + cout << a << ' ' << b << endl; + cout << sumvar << endl; + cout << y_mean << endl; + cout << cov.sum() << endl; + exit(1); + } + + Scaling s = Scaling(new LinearScaling(a,b)); + + return s; +} + + +Scaling wls(const std::valarray& inputs, const TargetInfo& targets) { + + std::valarray x = inputs; + const std::valarray& w = targets.weights(); + + unsigned n = x.size(); + // First calculate x'*W (as W is a diagonal matrix it's simply elementwise multiplication + std::valarray wx = targets.weights() * x; + + // Now x'*W is contained in [w,wx], calculate x' * W * x (the covariance) + double a,b,d; + a=b=d=0.0; + + for (unsigned i = 0; i < n; ++i) + { + a += w[i]; + b += wx[i]; + d += x[i] * wx[i]; + } + + //invert + + double ad_bc = a*d - b * b; + // if ad_bc equals zero there's a problem + + if (ad_bc < 1e-17) return Scaling(new LinearScaling); + + double ai = d/ad_bc; + double bi = -b/ad_bc; + double di = a/ad_bc; + double ci = bi; + + // Now multiply this inverted covariance matrix (C^-1) with x' * W * y + + // create alias to reuse the wx we do not need anymore + std::valarray& ones = wx; + + // calculate C^-1 * x' * W (using the fact that W is diagonal) + for (unsigned i = 0; i < n; ++i) + { + ones[i] = w[i]*(ai + bi * x[i]); + x[i] = w[i]*(ci + di * x[i]); + } + + // results are in [ones, x], now multiply with y + + a = 0.0; // intercept + b = 0.0; // slope + + const valarray& t = targets.targets(); + + for (unsigned i = 0; i < n; ++i) + { + a += ones[i] * t[i]; + b += x[i] * t[i]; + } + + return Scaling(new LinearScaling(a,b)); +} + + +//Scaling med(const std::valarray& inputs, const TargetInfo& targets); + +double mse(const std::valarray& y, const TargetInfo& t) { + + valarray residuals = t.targets()-y; + residuals *= residuals; + double sz = residuals.size(); + if (t.has_weights()) { + residuals *= t.weights(); + sz = 1.0; + } + + return residuals.sum() / sz; +} + +double rms(const std::valarray& y, const TargetInfo& t) { + return sqrt(mse(y,t)); +} + +double mae(const std::valarray& y, const TargetInfo& t) { + valarray residuals = abs(t.targets()-y); + if (t.has_weights()) residuals *= t.weights(); + return residuals.sum() / residuals.size(); +} + + +/* + double standard_error(const std::valarray& y, const std::pair& scaling) { + double a = scaling.first; + double b = scaling.second; + double n = y.size(); + double se = sqrt( pow(a+b*y-current_set->targets,2.0).sum() / (n-2)); + + double mean_y = y.sum() / n; + double sxx = pow( y - mean_y, 2.0).sum(); + + return se / sqrt(sxx); + } + + double scaled_mse(const std::valarray& y){ + std::pair scaling; + return scaled_mse(y,scaling); + } + + double scaled_mse(const std::valarray& y, std::pair& scaling) + { + scaling = scale(y); + + double a = scaling.first; + double b = scaling.second; + + std::valarray tmp = current_set->targets - a - b * y; + tmp *= tmp; + + if (weights.size()) + return (weights * tmp).sum(); + + return tmp.sum() / tmp.size(); + } + + double robust_mse(const std::valarray& ny, std::pair& scaling) { + + double smse = scaled_mse(ny,scaling); + + std::valarray y = ny; + // find maximum covariance case + double n = y.size(); + + int largest = 0; + + { + double y_mean = y.sum() / n; + + std::valarray y_var = (y - y_mean); + std::valarray cov = tcov * y_var; + + std::valarray maxcov = cov == cov.max(); + + for (unsigned i = 0; i < maxcov.size(); ++i) { + if (maxcov[i]) { + largest = i; + break; + } + } + } + + double y_mean = (y.sum() - y[largest]) / (n-1); + y[largest] = y_mean; // dissappears from covariance calculation + + std::valarray y_var = (y - y_mean); + std::valarray cov = tcov * y_var; + y_var *= y_var; + + double sumvar = y_var.sum(); + + if (sumvar == 0. || sumvar/n < 1e-7 || sumvar/n > 1e+7) // breakout when numerical problems are likely + return worst_performance(); + + double b = cov.sum() / sumvar; + double a = tmean - b * y_mean; + + std::valarray tmp = current_set->targets - a - b * y; + tmp[largest] = 0.0; + tmp *= tmp; + + double smse2 = tmp.sum() / (tmp.size()-1); + + static std::ofstream os("smse.txt"); + os << smse << ' ' << smse2 << '\n'; + + if (smse2 > smse) { + return worst_performance(); + //std::cerr << "overfit? " << smse << ' ' << smse2 << '\n'; + } + + scaling.first = a; + scaling.second = b; + + return smse2; + } + + class Sorter { + const std::valarray& scores; + public: + Sorter(const std::valarray& _scores) : scores(_scores) {} + + bool operator()(unsigned i, unsigned j) const { + return scores[i] < scores[j]; + } + }; + + double coc(const std::valarray& y) { + std::vector indices(y.size()); + for (unsigned i = 0; i < y.size(); ++i) indices[i] = i; + std::sort(indices.begin(), indices.end(), Sorter(y)); + + const std::valarray& targets = current_set->targets; + + double neg = 1.0 - targets[indices[0]]; + double pos = targets[indices[0]]; + + double cumpos = 0; + double cumneg = 0; + double sum=0; + + double last_score = y[indices[0]]; + + for(unsigned i = 1; i < targets.size(); ++i) { + + if (fabs(y[indices[i]] - last_score) < 1e-9) { // we call it tied + pos += targets[indices[i]]; + neg += 1.0 - targets[indices[i]]; + + if (i < targets.size()-1) + continue; + } + sum += pos * cumneg + (pos * neg) * 0.5; + cumneg += neg; + cumpos += pos; + pos = targets[indices[i]]; + neg = 1.0 - targets[indices[i]]; + last_score = y[indices[i]]; + } + + return sum / (cumneg * cumpos); + } + + // iterative re-weighted least squares (for parameters.classification) + double irls(const std::valarray& scores, std::pair& scaling) { + const std::valarray& t = current_set->targets; + + std::valarray e(scores.size()); + std::valarray u(scores.size()); + std::valarray w(scores.size()); + std::valarray z(scores.size()); + + parameters.use_irls = false; parameters.classification=false; + scaling = scale(scores); + parameters.use_irls=true;parameters.classification=true; + + if (scaling.second == 0.0) return worst_performance(); + + for (unsigned i = 0; i < 10; ++i) { + e = exp(scaling.first + scaling.second*scores); + u = e / (e + exp(-(scaling.first + scaling.second * scores))); + w = u*(1.-u); + z = (t-u)/w; + scaling = wls(scores, u, w); + //double ll = (log(u)*t + (1.-log(u))*(1.-t)).sum(); + //std::cout << "Scale " << i << ' ' << scaling.first << " " << scaling.second << " LL " << 2*ll << std::endl; + } + + // log-likelihood + u = exp(scaling.first + scaling.second*scores) / (1 + exp(scaling.first + scaling.second*scores)); + double ll = (log(u)*t + (1.-log(u))*(1.-t)).sum(); + return 2*ll; + } +*/ diff --git a/trunk/eo/contrib/mathsym/regression/Scaling.h b/trunk/eo/contrib/mathsym/regression/Scaling.h new file mode 100644 index 000000000..efa98a01a --- /dev/null +++ b/trunk/eo/contrib/mathsym/regression/Scaling.h @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef SCALING_H_ +#define SCALING_H_ + +#include "shared_ptr.h" + +#include +#include +#include + +class TargetInfo; + +class ScalingBase { + public: + + virtual ~ScalingBase() {} + + std::valarray apply(const std::valarray& x) { + std::valarray xtmp = x; + transform(xtmp); + return xtmp; + } + + virtual double transform(double input) const = 0; + virtual void transform(std::valarray& inputs) const = 0; + virtual std::ostream& print(std::ostream& os, std::string str) const = 0; + virtual std::valarray transform(const std::valarray& inputs) const = 0; +}; + +typedef shared_ptr Scaling; + +class LinearScaling : public ScalingBase { + + double a,b; + + public: + LinearScaling() : a(0.0), b(1.0) {} + LinearScaling(double _a, double _b) : a(_a), b(_b) {} + + double transform(double input) const { input *=b; input += a; return input; } + void transform(std::valarray& inputs) const { inputs *= b; inputs += a; } + std::valarray transform(const std::valarray& inputs) const { + std::valarray y = a + b * inputs; + return y; + } + + double intercept() const { return a; } + double slope() const { return b; } + + std::ostream& print(std::ostream& os, std::string str) const { + os.precision(16); + os << a << " + " << b << " * " << str; + return os; + } +}; + +class NoScaling : public ScalingBase{ + void transform(std::valarray&) const {} + double transform(double input) const { return input; } + std::valarray transform(const std::valarray& inputs) const { return inputs; } + std::ostream& print(std::ostream& os, std::string str) const { return os << str; } +}; + +extern Scaling slope(const std::valarray& inputs, const TargetInfo& targets); // slope only +extern Scaling ols(const std::valarray& inputs, const TargetInfo& targets); +extern Scaling wls(const std::valarray& inputs, const TargetInfo& targets); +extern Scaling med(const std::valarray& inputs, const TargetInfo& targets); + +extern Scaling ols(const std::valarray& inputs, const std::valarray& outputs); + +extern double mse(const std::valarray& y, const TargetInfo& t); +extern double rms(const std::valarray& y, const TargetInfo& t); +extern double mae(const std::valarray& y, const TargetInfo& t); + +// Todo Logistic Scaling + +#endif + + diff --git a/trunk/eo/contrib/mathsym/regression/TargetInfo.cpp b/trunk/eo/contrib/mathsym/regression/TargetInfo.cpp new file mode 100644 index 000000000..1d386e8c9 --- /dev/null +++ b/trunk/eo/contrib/mathsym/regression/TargetInfo.cpp @@ -0,0 +1,138 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "TargetInfo.h" + +using namespace std; + +TargetInfo::TargetInfo(const TargetInfo& org) { operator=(org); } + +TargetInfo& TargetInfo::operator=(const TargetInfo& org) { + _targets.resize(org._targets.size()); + _weights.resize(org._weights.size()); + _tcov_part.resize(org._tcov_part.size()); + + _targets = org._targets; + _weights = org._weights; + _tcov_part = org._tcov_part; + + _tmean = org._tmean; + _tvar = org._tvar; + _tstd = org._tstd; + _tmed = org._tmed; + return *this; +} + + +TargetInfo::TargetInfo(const std::valarray& t) { + _weights.resize(0); + _targets.resize(t.size()); + _targets = t; + + _tmean = _targets.sum()/_targets.size(); + + _tcov_part.resize(_targets.size()); + _tcov_part = _targets; + _tcov_part -= _tmean; + + std::valarray tmp = _tcov_part; + tmp = _tcov_part; + tmp *= tmp; + + _tvar = tmp.sum() / (tmp.size()-1); + _tstd = sqrt(_tvar); + _tmed = 0; +} + +TargetInfo::TargetInfo(const std::valarray& t, const std::valarray& w) { + + _targets.resize(t.size()); + _weights.resize(w.size()); + + _targets = t; + _weights = w; + + double sumw = _weights.sum(); + // scale weights so that they'll add up to 1 + _weights /= sumw; + + _tmean = (_targets * _weights).sum(); + _tcov_part.resize(_targets.size()); + _tcov_part = _targets; + _tcov_part -= _tmean; + + _tvar = (pow(_targets - _tmean, 2.0) * _weights).sum(); + _tstd = sqrt(_tvar); + _tmed = 0.; +} + +// calculate the members, now in the context of a mask +void TargetInfo::set_training_mask(const std::valarray& tmask) { + + TargetInfo tmp; + + if (has_weights() ) { + tmp = TargetInfo( _targets[tmask], _weights[tmask]); + } else { + tmp = TargetInfo( _targets[tmask] ); + } + + _tcov_part.resize(tmp._tcov_part.size()); + _tcov_part = tmp._tcov_part; + + _tmean = tmp._tmean; + _tvar = tmp._tvar; + _tstd = tmp._tstd; + _tmed = tmp._tmed; + + _training_mask.resize(tmask.size()); + _training_mask = tmask; +} + +struct SortOnTargets +{ + const valarray& t; + SortOnTargets(const valarray& v) : t(v) {} + + bool operator()(int i, int j) const { + return fabs(t[i]) < fabs(t[j]); + } +}; + +vector TargetInfo::sort() { + + vector ind(_targets.size()); + for (unsigned i = 0; i < ind.size(); ++i) { ind[i] = i; } + + std::sort(ind.begin(), ind.end(), SortOnTargets(_targets)); + + valarray tmptargets = _targets; + valarray tmpweights = _weights; + valarray tmpcov = _tcov_part; + + for (unsigned i = 0; i < ind.size(); ++i) + { + _targets[i] = tmptargets[ ind[i] ]; + _tcov_part[i] = tmpcov[ ind[i] ]; + if (_weights.size()) _weights[i] = tmpweights[ ind[i] ]; + } + + return ind; +} + + + diff --git a/trunk/eo/contrib/mathsym/regression/TargetInfo.h b/trunk/eo/contrib/mathsym/regression/TargetInfo.h new file mode 100644 index 000000000..ee9a307ff --- /dev/null +++ b/trunk/eo/contrib/mathsym/regression/TargetInfo.h @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef TARGETINFO_H_ +#define TARGETINFO_H_ + +#include +#include + +class TargetInfo { + std::valarray _targets; + std::valarray _weights; + std::valarray _training_mask; + + // some stuff for ols + std::valarray _tcov_part; + double _tmean; + double _tvar; + double _tstd; + double _tmed; + + public: + TargetInfo() {} + + TargetInfo(const std::valarray& t); + TargetInfo(const std::valarray& t, const std::valarray& w); + + TargetInfo(const TargetInfo& org); + TargetInfo& operator=(const TargetInfo& org); + ~TargetInfo() {} + + const std::valarray& targets() const { return _targets; } + const std::valarray& weights() const { return _weights; } + const std::valarray& mask() const { return _training_mask; } + + void set_training_mask(const std::valarray& mask); + + bool has_weights() const { return _weights.size(); } + bool has_mask() const { return _training_mask.size(); } + + std::vector sort(); + + const std::valarray& tcov_part() const { return _tcov_part; } + double tmean() const { return _tmean; } + double tvar() const { return _tvar; } + double tstd() const { return _tstd; } + double devmedian() const { return _tmed; } +}; + +#endif + diff --git a/trunk/eo/contrib/mathsym/regression/stats.h b/trunk/eo/contrib/mathsym/regression/stats.h new file mode 100644 index 000000000..0ead60685 --- /dev/null +++ b/trunk/eo/contrib/mathsym/regression/stats.h @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +class Mean { + + double n; + double mean; + + public: + Mean() : n(0), mean(0) {} + + void update(double v) { + n++; + double d = v - mean; + mean += 1/n * d; + } + + double get_mean() const { return mean; } +}; + +class Var { + double n; + double mean; + double sumvar; + + public: + Var() : n(0), mean(0), sumvar(0) {} + + void update(double v) { + n++; + double d = v - mean; + mean += 1/n * d; + sumvar += (n-1)/n * d * d; + } + + double get_mean() const { return mean; } + double get_var() const { return sumvar / (n-1); } + double get_std() const { return sqrt(get_var()); } +}; + +/** Single covariance between two variates */ +class Cov { + double n; + double meana; + double meanb; + double sumcov; + + public: + Cov() : n(0), meana(0), meanb(0), sumcov(0) {} + + void update(double a, double b) { + ++n; + double da = a - meana; + double db = b - meanb; + + meana += 1/n * da; + meanb += 1/n * db; + + sumcov += (n-1)/n * da * db; + } + + double get_meana() const { return meana; } + double get_meanb() const { return meanb; } + double get_cov() const { return sumcov / (n-1); } +}; + +class CovMatrix { + double n; + std::vector mean; + std::vector< std::vector > sumcov; + + public: + CovMatrix(unsigned dim) : n(0), mean(dim), sumcov(dim , std::vector(dim)) {} + + void update(const std::vector& v) { + n++; + + for (unsigned i = 0; i < v.size(); ++i) { + double d = v[i] - mean[i]; + mean[i] += 1/n * d; + + sumcov[i][i] += (n-1)/n * d * d; + + for (unsigned j = i; j < v.size(); ++j) { + double e = v[j] - mean[j]; // mean[j] is not updated yet + + double upd = (n-1)/n * d * e; + + sumcov[i][j] += upd; + sumcov[j][i] += upd; + + } + } + + } + + double get_mean(int i) const { return mean[i]; } + double get_var(int i ) const { return sumcov[i][i] / (n-1); } + double get_std(int i) const { return sqrt(get_var(i)); } + double get_cov(int i, int j) const { return sumcov[i][j] / (n-1); } + +}; + diff --git a/trunk/eo/contrib/mathsym/shared_ptr.h b/trunk/eo/contrib/mathsym/shared_ptr.h new file mode 100644 index 000000000..58353fe91 --- /dev/null +++ b/trunk/eo/contrib/mathsym/shared_ptr.h @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _SHARED_PTR_H +#define _SHARED_PTR_H + + +template class weak_ptr; + +template +class shared_ptr { + private: + T* ptr; + unsigned* count; // + + /* special case, null pointer (nil-code) */ + static unsigned* nil() { static unsigned nil_counter(1); return &nil_counter; } + + void decref() { if (--(*count) == 0) { delete ptr; delete count; }} + void incref() { ++(*count); } + + friend class weak_ptr; + + public: + + shared_ptr() : ptr(0), count(nil()) { incref(); } + ~shared_ptr() { decref(); } + + shared_ptr(const shared_ptr& o) : ptr(o.ptr), count(o.count) { incref(); } + shared_ptr(T* p) : ptr(p), count(new unsigned(1)) {} + explicit shared_ptr(const weak_ptr& w) : ptr(w.ptr), count(w.count) { incref(); } + + shared_ptr& operator=(const shared_ptr& o) { + if (ptr == o.ptr) return *this; + decref(); + ptr = o.ptr; + count = o.count; + incref(); + return *this; + } + + T* get() { return ptr; } + T* operator->() { return ptr; } + T& operator*() { return *ptr; } + + const T* get() const { return ptr; } + const T* operator->() const { return ptr; } + const T& operator*() const { return *ptr; } + + bool operator==(const shared_ptr& o) const { return ptr == o.ptr; } + bool operator!=(const shared_ptr& o) const { return ptr != o.ptr; } + bool operator<(const shared_ptr& o) const { return ptr < o.ptr; } + + unsigned refcount() const { return *count; } +}; + +template +class weak_ptr { + T* ptr; + unsigned* count; + + friend class shared_ptr; + + public: + + weak_ptr() : ptr(0), count(shared_ptr::nil()) {} + explicit weak_ptr( const shared_ptr& s) : ptr(s.ptr), count(s.count) {} + + shared_ptr lock() const { return shared_ptr(*this); } + + + T* get() { return ptr; } + T* operator->() { return ptr; } + T& operator*() { return *ptr; } + + const T* get() const { return ptr; } + const T* operator->() const { return ptr; } + const T& operator*() const { return *ptr; } + + bool operator==(const shared_ptr& o) const { return ptr == o.ptr; } + bool operator!=(const shared_ptr& o) const { return ptr != o.ptr; } + bool operator<(const shared_ptr& o) const { return ptr < o.ptr; } + + unsigned refcount() const { return *count; } + +}; + +#endif diff --git a/trunk/eo/contrib/mathsym/sym/README.cpp b/trunk/eo/contrib/mathsym/sym/README.cpp new file mode 100644 index 000000000..c62e6cbac --- /dev/null +++ b/trunk/eo/contrib/mathsym/sym/README.cpp @@ -0,0 +1,364 @@ + +/* + DESCRIPTION: + + +The class 'Sym' in this package provides a reference counted, hashed tree structure that can be used in genetic programming. +The hash table behind the scenes makes sure that every subtree in the application is stored only once. +This has a couple of advantages: + +o Memory: all subtrees are stored only once +o Comparison: comparison for equality for two subtrees boils down to a pointer comparison +o Overview: by accessing the hashtable, you get an instant overview of the state of the population + + +The disadvantage of this method is the constant time overhead for computing hashes. In practice, +it seems to be fast enough. + + +===== How to Use this ========= + +In essence, the Sym data structure contains two important pieces of data, +the 'token' (of type token_t = int) and the children, a vector of Sym (called SymVec). +The token should contain all information to be able to figure out which +function/terminal is represented by the node in the tree. By retrieving this token value +and the SymVec it is possible to write recursive traversal routines for evaluation, printing, +etc. + +*/ + +#include +#include "Sym.h" + +using namespace std; + + +/* + * Suppose token value '0' designates our terminal, and token value '1' designates a binary function. + * Later on a ternary function will be used as well, designated with token value '2' + * The function below will create a tree of size three +*/ +Sym test1() { + + SymVec children; + children.push_back( Sym(0) ); // push_back is a member from std::vector, SymVec is derived from std::vector + children.push_back( Sym(0) ); + + Sym tree = Sym(token_t(1), children); // creates the tree + + /* Done, now print some information about the node */ + + cout << "Size = " << tree.size() << endl; // prints 3 + cout << "Depth = " << tree.depth() << endl; // prints 2 + cout << "Refcount = " << tree.refcount() << endl; // prints 1 + + Sym tree2 = tree; // make a copy (this only changes refcount) + + cout << "Refcount now = " << tree.refcount() << endl; // print 2 + + return tree; // tree2 will be deleted and reference count returns to 1 +} + +/* To actually use the tree, evaluate it, the following simple recursive function + * can be used +*/ + +int eval(const Sym& sym) { + if (sym.token() == 0) { // it's a terminal in this example + return 1; + } + // else it's the function + const SymVec& children = sym.args(); // get the children out, children.size() is the arity + + // let's assume that we've also got a ternary function designated by token '2' + + if (sym.token() == token_t(1)) + return eval(children[0]) + eval(children[1]); // evaluate + + return eval(children[0]) + eval(children[1]) * eval(children[2]); // a ternary function +} + +/* Note that you simply use the stored token that was defined above. Simply checking the size of SymVec in + * this particular example could have sufficed, but it's instructive to use the tokens. + * + * And to test this: +*/ + +void test_eval() { + + Sym tree = test1(); + + cout << "Evaluating tree1 returns " << eval(tree) << endl; +} + +/* Writing initialization functions. + * + * As the Sym class is recursive in nature, initialization can simply be done using + * recursive routines as above. As an example, the following code does 'full' initialization. + */ + +Sym init_full(int depth_left) { + if (depth_left == 0) return Sym(0); // create terminal + // else create either a binary or a ternary function + + depth_left--; + + if (rand() % 2 == 0) { // create binary + SymVec vec(2); + vec[0] = init_full(depth_left); + vec[1] = init_full(depth_left); + + return Sym(token_t(1), vec); + + } else { // create ternary tree + SymVec vec(3); + vec[0] = init_full(depth_left); + vec[1] = init_full(depth_left); + vec[2] = init_full(depth_left); + + return Sym(token_t(2), vec); // token value 2 designates a ternary now, even though the arity can simply be read from the size of the 'SymVec' + } + +} + + +/* Examining the hash table. + * + * The hash table is a static member of the Sym class, but can be obtained and inspected + * at any point during the run. The hash table follows the SGI implementation of hashmap (and effectively + * uses it in gcc). An example: + */ + +void inspect_hashtable() { + SymMap& dag = Sym::get_dag(); // get the hashmap + unsigned i = 0; + for (SymMap::iterator it = dag.begin(); it != dag.end(); ++it) { + Sym node(it); // initialize a 'sym' with the iterator + + cout << "Node " << i++ << " size " << node.size(); + cout << " refcount " << node.refcount()-1; // -1: note that by creating the Sym above the refcount is increased + cout << " depth " << node.depth(); + cout << '\n'; + } + +} + +/* The above code effectively examines all distinct subtrees in use in the application and prints some stats for the node */ + +/* Manipulating trees + * + * The Sym class is set up in such a way that you cannot change a Sym, so how do you perform crossover and mutation? + * + * Simple, you create new syms. The Sym class supports two functions to make this easier: 'get_subtree' and 'insert_subtree'. + * These traverse the tree by index, where 0 designates the root and other values are indexed depth first. + */ + +Sym subtree_xover(Sym a, Sym b) { + + Sym to_insert = get_subtree(a, rand() % a.size() ); // select random subtree, will crash if too high a value is given + + /* 'insert' it into b. This will not really insert, it will however create a new sym, + * equal to 'b' but with a's subtree inserted at the designated spot. */ + return insert_subtree(b, rand() % b.size(), to_insert); + +} + +/* Tying it together, we can create a simple genetic programming system. Mutation is not implemented here, + * but would be easy enough to add by using recursion and/or 'set'. */ + +void run_gp() { + + int ngens = 50; + int popsize = 1000; + + cout << "Starting running " << popsize << " individuals for " << ngens << " generations." << endl; + + vector pop(popsize); + + // init population + for (unsigned i = 0; i < pop.size(); ++i) { + pop[i] = init_full(5); + } + + double best = 0.0; + + // do a very simple steady state tournament + for (unsigned gen = 0; gen < ngens * pop.size(); ++gen) { + int sel1 = rand()% pop.size(); + int sel2 = rand() % pop.size(); + int sel3 = rand() % pop.size(); + + double ev1 = eval(pop[sel1]); + double ev3 = eval(pop[sel3]); + + double bst = max(ev1,ev3); + if (bst > best) { + best = bst; + } + + if (ev3 > ev1) { + sel1 = sel3; // selection pressure + } + + Sym child = subtree_xover(pop[sel1], pop[sel2]); + + // Check for uniqueness + if (child.refcount() == 1) pop[ rand() % pop.size() ] = child; + } + + // and at the end: + + inspect_hashtable(); + + // and also count number of nodes in the population + int sz = 0; + for (unsigned i = 0; i < pop.size(); ++i) { sz += pop[i].size(); } + cout << "Number of distinct nodes " << Sym::get_dag().size() << endl; + cout << "Nodes in population " << sz << endl; + cout << "ratio " << double(Sym::get_dag().size())/sz << endl; + cout << "Best fitness " << best << endl; + +} + +/* One extra mechanism is supported to add annotations to nodes. Something derived from + * 'UniqueNodeStats' can be used to attach new information to nodes. For this to function, + * we need to supply a 'factory' function that creates these node-stats; attach this function to the + * Sym class, so that it gets called whenever a new node is created. The constructors of the Sym class + * take care of this. + * + * IMPORTANT: + * in a realistic application, the factory function needs to be set BEFORE any Syms are created + * Mixing Syms creating with and without the factory can lead to unexpected results + * + * First we derive some structure from UniqueNodeStats: */ + +struct MyNodeStats : public UniqueNodeStats { + + int sumsize; + + ~MyNodeStats() { cout << "MyNodeStats::~MyNodeStats, sumsize = " << sumsize << endl; } +}; + +/* then define the factory function. It will get a Sym, which is just created. */ +UniqueNodeStats* create_stats(const Sym& sym) { + MyNodeStats* stats = new MyNodeStats; // Sym will take care of memory management + + int sumsize = sym.size(); + for (unsigned i = 0; i < sym.args().size(); ++i) { + // retrieve the extra node stats of the child + UniqueNodeStats* unique_stats = sym.args()[i].extra_stats(); // extra_stats retrieves the stats + MyNodeStats* child_stats = static_cast(unique_stats); // cast it to the right struct + sumsize += child_stats->sumsize; + } + + stats->sumsize = sumsize; + return stats; // now it will get attached to the node and deleted when its reference count goes to zero +} + +void test_node_stats() { + + if (Sym::get_dag().size() != 0) { + cerr << "Cannot mix nodes with and without factory functions" << endl; + exit(1); + } + + /* Very Important: attach the factory function to the Sym class */ + Sym::set_factory_function(create_stats); + + Sym tree = init_full(5); // create a tree + + // get extra node stats out + MyNodeStats* stats = static_cast( tree.extra_stats() ); + + cout << "Size = " << tree.size() << " SumSize = " << stats->sumsize << endl; + + Sym::clear_factory_function(); // reset +} + + +/* And run the code above */ + +int main() { + srand(time(0)); + cout << "********** TEST EVALUATION **************\n"; + test_eval(); + cout << "********** TEST ALGORITHM ***************\n"; + run_gp(); + + cout << "********** TEST FACTORY ****************\n"; + test_node_stats(); // can work because there are no live nodes + +} + +/* ********** Member function reference: ******************** + * + * Sym() The default constructor will create an undefined node (no token and no children), check for empty() to see if a node is undefined + * + * Sym(token_t) Create a terminal + * + * Sym(token_t, const SymVec&) + * Create a node with token and SymVec as the children + * + * Sym(SymIterator it) + * Create a sym from an iterator (taken from the hashtable directly, or from Sym::iterator) + * + * dtor, copy-ctor and assignment + * + * UniqueNodeStats* extra_stats() + * Returns an UniqueNodeStats pointer (= 0 if no factory is defined) + * + * + * int hashcode() returns the hashcode for the node + * + * int refcount() returns the reference count for the node + * + * bool operator== checks for equality (note that this is a pointer compare, really really fast) + * + * bool empty() returns whether the node is undefined, i.e. created through the default ctor + * + * int arity() shorthand for sym.args().size() + * + * token_t token() return identifying token for the node + * + * const SymVec& args() + * returns the children of the node (in a vector) + * + * unsigned size() returns the size, i.e., number of nodes + * + * unsigned depth() returns the depth + * + * iterator() returns the pointer to the node in the hashtable + * + * + ********** Static functions: ******************** + * + * + * + * SymMap& get_dag() returns the hash table containing all nodes. This should only be used for inspection, + * even though the dag itself is not const. This to enable the use of the ctor Sym(SymIterator) to inspect + * using the Sym interface (rather than the hash table interface). This does allow you to make destructive + * changes to the class, so use with care + * + * set_factory_function( UniqueNodeStats (*)(const Sym&) ) + * Set the factory function + * + * clear_factory_function() + * Clears the factory function, allocated UniqueNodeStats will still be deleted, but no new ones will be created. + * + ********** Utility Functions ******************** + * + * Sym get_subtree(const Sym& org, int i) + * Retreive the i-th subtree from the Sym. Standard depth first ordering, where root has index 0 and the + * rightmost terminal has index sym.size()-1 + * + * Sym insert_subtree(const Sym& org, int i, const Sym& subtree) + * Returns a Sym that is equal to 'org', for which the i-th subtree (same ordering as get_subtree) is replaced + * by the third argument subtree. + * + * Sym next(const Sym&) + * Returns the successor of the argument sym from the hashtable with wrap around. This is implemented just because + * it can be done. It may be an interesting way to mutate... + * + * */ + + diff --git a/trunk/eo/contrib/mathsym/sym/Sym.cpp b/trunk/eo/contrib/mathsym/sym/Sym.cpp new file mode 100644 index 000000000..4d3c2227d --- /dev/null +++ b/trunk/eo/contrib/mathsym/sym/Sym.cpp @@ -0,0 +1,155 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include + +#include "Sym.h" + +using namespace std; + +typedef UniqueNodeStats* (*NodeStatFunc)(Sym&); + +UniqueNodeStats* (*Sym::factory)(const Sym&) = 0; + +SymMap Sym::dag(100000); // reserve space for so many nodes +std::vector Sym::token_count; + + +size_t get_size(const SymVec& vec) { + size_t sz = 0; + for (unsigned i = 0; i < vec.size(); ++i) { + sz += vec[i].size(); + } + return sz; +} + +size_t get_depth(const SymVec& vec) { + size_t dp = 1; + for (unsigned i = 0; i < vec.size(); ++i) { + dp = std::max(dp, vec[i].depth()); + } + return dp; +} + +Sym::Sym(token_t tok, const SymVec& args_) : node(dag.end()) +{ + detail::SymKey key(tok, detail::SymArgs(args_)); + detail::SymValue val; + + node = dag.insert(pair(key, val)).first; + + if (__unchecked_refcount() == 0) { // new node, set some stats + node->second.size = 1 + get_size(args_); + node->second.depth = 1 + get_depth(args_); + + // token count + if (tok >= token_count.size()) { + token_count.resize(tok+1); + } + + incref(); + node->first.fixate(); + // call the factory function if available + if (factory) node->second.uniqueNodeStats = factory(*this); + + } + else incref(); +} + +Sym::Sym(token_t tok, const Sym& a) : node(dag.end()) { + SymVec args_; args_.push_back(a); + detail::SymKey key(tok, detail::SymArgs(args_)); + detail::SymValue val; + + node = dag.insert(pair(key, val)).first; + + if (__unchecked_refcount() == 0) { // new node, set some stats + node->second.size = 1 + get_size(args_); + node->second.depth = 1 + get_depth(args_); + + // token count + if (tok >= token_count.size()) { + token_count.resize(tok+1); + } + + incref(); + node->first.fixate(); + // call the factory function if available + if (factory) node->second.uniqueNodeStats = factory(*this); + } + else incref(); +} + +Sym::Sym(token_t tok) : node(dag.end()) { + detail::SymKey key(tok); + detail::SymValue val; + node = dag.insert(pair(key, val)).first; + + if (__unchecked_refcount() == 0) { // new node, set some stats + node->second.size = 1; + node->second.depth = 1; + + // token count + if (tok >= token_count.size()) { + token_count.resize(tok+1); + } + + incref(); + + // call the factory function if available + if (factory) node->second.uniqueNodeStats = factory(*this); + + } + else incref(); +} + +std::pair insert_subtree_impl(const Sym& cur, size_t w, const Sym& nw) { + if (w-- == 0) return make_pair(nw, !(nw == cur)); + + const SymVec& vec = cur.args(); + std::pair result; + unsigned i; + + for (i = 0; i < vec.size(); ++i) { + if (w < vec[i].size()) { + result = insert_subtree_impl(vec[i], w, nw); + if (result.second == false) return std::make_pair(cur, false); // unchanged + break; + } + w -= vec[i].size(); + } + SymVec newvec = cur.args(); + newvec[i] = result.first; + return make_pair(Sym(cur.token(), newvec), true); +} + +Sym insert_subtree(const Sym& cur, size_t w, const Sym& nw) { + return insert_subtree_impl(cur,w,nw).first; +} +Sym get_subtree(const Sym& cur, size_t w) { + if (w-- == 0) return cur; + + const SymVec& vec = cur.args(); + for (unsigned i = 0; i < vec.size(); ++i) { + if (w < vec[i].size()) return get_subtree(vec[i], w); + w-=vec[i].size(); + } + return cur; +} + + diff --git a/trunk/eo/contrib/mathsym/sym/Sym.h b/trunk/eo/contrib/mathsym/sym/Sym.h new file mode 100644 index 000000000..2eecc5985 --- /dev/null +++ b/trunk/eo/contrib/mathsym/sym/Sym.h @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef SYMNODE_H_ +#define SYMNODE_H_ + +#include + +#if __GNUC__ >= 3 +#include +#elif __GNUC__ < 3 +#include +using std::hash_map; +#endif + +/* Empty 'extra statistics' structure, derive from this to keep other characteristics of nodes */ +struct UniqueNodeStats { virtual ~UniqueNodeStats(){} }; + +#include "SymImpl.h" +#include "token.h" + +#if __GNUC__ == 4 +#define USE_TR1 1 +#else +#define USE_TR1 0 +#endif +// TR1 is buggy at times +#undef USE_TR1 +#define USE_TR1 0 + +#if USE_TR1 +#include +typedef std::tr1::unordered_map SymMap; +#else +typedef hash_map SymMap; +#endif + +typedef SymMap::iterator SymIterator; + +/* Sym is the tree, for which all the nodes are stored in a hash table. + * This makes checking for equality O(1) */ +class Sym +{ + public: + + Sym() : node(dag.end()) {} + explicit Sym(token_t token, const SymVec& args); + explicit Sym(token_t token, const Sym& args); + explicit Sym(token_t var); + + explicit Sym(SymIterator it) : node(it) { incref(); } + + Sym(const Sym& oth) : node(oth.node) { incref(); } + ~Sym() { decref(); } + + const Sym& operator=(const Sym& oth) { + if (oth.node == node) return *this; + decref(); + node = oth.node; + incref(); + return *this; + } + + /* Unique Stats are user defined */ + UniqueNodeStats* extra_stats() const { return empty()? 0 : node->second.uniqueNodeStats; } + + int hashcode() const { return node->first.get_hash_code(); } //detail::SymKey::Hash hash; return hash(node->first); } + + // Friends, need to touch the node + friend struct detail::SymKey::Hash; + friend struct detail::SymKey; + + unsigned refcount() const { return empty()? 0: node->second.refcount; } + + bool operator==(const Sym& other) const { + return node == other.node; + } + bool operator!=(const Sym& other) const { return !(*this == other); } + + bool empty() const { return node == dag.end(); } + + /* Support for traversing trees */ + unsigned arity() const { return node->first.arity(); } + token_t token() const { return node->first.token; } + + const SymVec& args() const { return node->first.vec(); } + + /* size() - depth */ + unsigned size() const { return empty()? 0 : node->second.size; } + unsigned depth() const { return empty()? 0 : node->second.depth; } + + SymMap::iterator iterator() const { return node; } + + /* Statics accessing some static members */ + static SymMap& get_dag() { return dag; } + + /* This function can be set to create some UniqueNodeStats derivative that can contain extra stats for a node, + * it can for instance be used to create ERC's and what not. */ + static void set_factory_function(UniqueNodeStats* (*f)(const Sym&)) { factory=f; } + static void clear_factory_function() { factory = 0; } + + static const std::vector& token_refcount() { return token_count; } + + unsigned address() const { return reinterpret_cast(&*node); } + + private : + + // implements getting subtrees + Sym private_get(size_t w) const; + + unsigned __unchecked_refcount() const { return node->second.refcount; } + + void incref() { + if (!empty()) { + ++(node->second.refcount); + ++token_count[token()]; + } + } + void decref() { + if (!empty()) { + --token_count[token()]; + if (--(node->second.refcount) == 0) { + dag.erase(node); + } + } + } + + // The one and only data member, an iterator into the static map below + SymIterator node; + + // A static hash_map that contains all live nodes.. + static SymMap dag; + + static std::vector token_count; + + // Factory function for creating extra node stats, default will be 0 + static UniqueNodeStats* (*factory)(const Sym&); + +}; + +/* Utility hash functor for syms */ +class HashSym { + public: + int operator()(const Sym& sym) const { return sym.hashcode(); } +}; + +/* Utility Functions */ + +// get_subtree retrieves a subtree by standard ordering (0=root, and then depth first) +Sym get_subtree(const Sym& org, size_t w); + +// insert_subtree uses the same ordering as get and inserts the second argument, returning a new tree +Sym insert_subtree(const Sym& org, size_t w, const Sym& nw); + +/* Get the successor from the hashtable, no particular purpose other than an interesting way to mutate */ +inline Sym next(const Sym& sym) { + SymIterator it = sym.iterator(); + ++it; + if (it == Sym::get_dag().end()) it = Sym::get_dag().begin(); + return Sym(it); +} + +#endif diff --git a/trunk/eo/contrib/mathsym/sym/SymImpl.cpp b/trunk/eo/contrib/mathsym/sym/SymImpl.cpp new file mode 100644 index 000000000..1e15e70a9 --- /dev/null +++ b/trunk/eo/contrib/mathsym/sym/SymImpl.cpp @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "Sym.h" + +using namespace std; +namespace detail { + +class SymArgsImpl { + public: + std::vector owned_args; +}; + +size_t SymArgs::len() const { + return vec().size(); +} + +SymArgs::SymArgs() : pimpl( new SymArgsImpl ) { + args_ptr = &pimpl->owned_args; +} + +SymArgs::SymArgs(const std::vector& v) : pimpl(0) { + args_ptr = &v; +} + +SymArgs::~SymArgs() { + delete pimpl; +} + +SymArgs::SymArgs(const SymArgs& args) : pimpl(0), args_ptr(args.args_ptr) { + if (args.pimpl && args.args_ptr == &args.pimpl->owned_args) { + pimpl = new SymArgsImpl(*args.pimpl); + args_ptr = &pimpl->owned_args; + } +} + +SymArgs& SymArgs::operator=(const SymArgs& args) { + if (args.pimpl && args.args_ptr == &args.pimpl->owned_args) { + pimpl = new SymArgsImpl(*args.pimpl); + args_ptr = &pimpl->owned_args; + } else { + args_ptr = args.args_ptr; + } + + return *this; +} + +void SymArgs::fixate() const { + assert(pimpl == 0); + pimpl = new SymArgsImpl; + pimpl->owned_args = *args_ptr; + args_ptr = &pimpl->owned_args; +} + +// For Tackett's hashcode +#define PRIMET 21523 +#define HASHMOD 277218551 + +const int nprimes = 4; +const unsigned long primes[] = {3221225473ul, 201326611ul, 1610612741ul, 805306457ul}; + +int SymKey::calc_hash() const { + unsigned long hash = unsigned(token); + hash *= PRIMET; + + const std::vector& v = args.vec(); + for (unsigned i = 0; i < v.size(); ++i) { + hash += ( (v[i].address() >> 3) * primes[i%nprimes]) % HASHMOD; + } + + return hash;// % HASHMOD; +} + +bool SymKey::operator==(const SymKey& other) const { + if (token != other.token) return false; + return args.vec() == other.args.vec(); +} + +/* Just to store this info somewhere: + * + * Address Based Hash Function Implementation + * uint32 address_hash(char* addr) + * { + * register uint32 key; + * key = (uint32) addr; + * return (key >> 3) * 2654435761; + * } + */ + +SymValue::SymValue() : refcount(0), size(0), depth(0), uniqueNodeStats(0) {} + +SymValue::~SymValue() { delete uniqueNodeStats; } + + + +} // namespace detail diff --git a/trunk/eo/contrib/mathsym/sym/SymImpl.h b/trunk/eo/contrib/mathsym/sym/SymImpl.h new file mode 100644 index 000000000..b5bf96371 --- /dev/null +++ b/trunk/eo/contrib/mathsym/sym/SymImpl.h @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __SYM_IMPL_H__ +#define __SYM_IMPL_H__ + +#include + +#include "token.h" + +class Sym; + +#if __GNUC__ > 4 +#include +typedef std::vector > std::vector; +//typedef std::vector SymVec; +#else +typedef std::vector SymVec; +#endif + + +namespace detail { + +class SymArgsImpl; +class SymArgs { + + mutable SymArgsImpl* pimpl; // contains circular reference to vector + mutable const std::vector* args_ptr; + + public: + + SymArgs(); + SymArgs(const std::vector& v); + ~SymArgs(); + + SymArgs(const SymArgs& args); + SymArgs& operator=(const SymArgs& other); + + size_t len() const; + const std::vector& vec() const { return *args_ptr; } + void fixate() const; +}; + +class SymKey +{ + public: + SymKey(token_t _token) : args(), token(_token), hash_code(calc_hash()) {} + SymKey(token_t _token, const detail::SymArgs& _args) : args(_args), token(_token), hash_code(calc_hash()) {} + + bool operator==(const SymKey& other) const; + + struct Hash + { + int operator()(const SymKey& k) const { return k.calc_hash(); }; + }; + + unsigned arity() const { return args.len(); } + const std::vector& vec() const { return args.vec(); } + + // fixates (i.e. claims memory) for the embedded vector of Syms + void fixate() const { args.fixate(); } + + int get_hash_code() const { return hash_code; } + + detail::SymArgs args; + token_t token; // identifies the function + + private: + int calc_hash() const; + int hash_code; +}; + +struct SymValue +{ + friend class Sym; + + SymValue(); + ~SymValue(); + + unsigned getRefCount() const { return refcount; } + unsigned getSize() const { return size; } + unsigned getDepth() const { return depth; } + + + + // for reference counting + unsigned refcount; + + // some simple stats + unsigned size; + unsigned depth; + UniqueNodeStats* uniqueNodeStats; + +}; + + +} // namespace detail + +#endif + diff --git a/trunk/eo/contrib/mathsym/sym/token.h b/trunk/eo/contrib/mathsym/sym/token.h new file mode 100644 index 000000000..68008959d --- /dev/null +++ b/trunk/eo/contrib/mathsym/sym/token.h @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef TOKEN_H +#define TOKEN_H + + +typedef unsigned token_t; + +struct functor_t { + token_t token; + unsigned arity; +}; + +#endif diff --git a/trunk/eo/contrib/mathsym/symreg.cpp b/trunk/eo/contrib/mathsym/symreg.cpp new file mode 100644 index 000000000..5e55196bf --- /dev/null +++ b/trunk/eo/contrib/mathsym/symreg.cpp @@ -0,0 +1,394 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#include +#include +#include +#include + +#include +#include +#include +#include +//#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +using namespace std; + +typedef EoSym EoType; + +static int functions_added = 0; + +void add_function(LanguageTable& table, eoParser& parser, string name, unsigned arity, token_t token, const FunDef& fun); +void setup_language(LanguageTable& table, eoParser& parser); + +template +T& select(bool check, T& a, T& b) { if (check) return a; return b; } + +class eoBestIndividualStat : public eoSortedStat { + public: + eoBestIndividualStat() : eoSortedStat("", "best individual") {} + + void operator()(const vector& _pop) { + ostringstream os; + os << (Sym) *_pop[0]; + value() = os.str(); + } + +}; + +class AverageSizeStat : public eoStat { + public: + AverageSizeStat() : eoStat(0.0, "Average size population") {} + + void operator()(const eoPop& _pop) { + double total = 0.0; + for (unsigned i = 0; i < _pop.size(); ++i) { + total += _pop[i].size(); + } + value() = total/_pop.size(); + } +}; + +class SumSizeStat : public eoStat { + public: + SumSizeStat() : eoStat(0u, "Number of subtrees") {} + + void operator()(const eoPop& _pop) { + unsigned total = 0; + for (unsigned i = 0; i < _pop.size(); ++i) { + total += _pop[i].size(); + } + value() = total; + } +}; + +class DagSizeStat : public eoStat { + public: + DagSizeStat() : eoStat(0u, "Number of distinct subtrees") {} + + void operator()(const eoPop& _pop) { + value() = Sym::get_dag().size(); + } +}; + +int main(int argc, char* argv[]) { + + eoParser parser(argc, argv); + + /* Language */ + LanguageTable table; + setup_language(table, parser); + + /* Data */ + + eoValueParam datafile = parser.createParam(string(""), "datafile", "Training data", 'd', string("Regression"), true); // mandatory + double train_percentage = parser.createParam(1.0, "trainperc", "Percentage of data used for training", 0, string("Regression")).value(); + + /* Population */ + + unsigned pop_size = parser.createParam(500u, "population-size", "Population Size", 'p', string("Population")).value(); + + uint32_t seed = parser.createParam( uint32_t(time(0)), "random-seed", "Seed for rng", 'D').value(); + + cout << "Seed " << seed << endl; + rng.reseed(seed); + + double var_prob = parser.createParam( + 0.9, + "var-prob", + "Probability of selecting a var vs. const when creating a terminal", + 0, + "Population").value(); + + + double grow_prob = parser.createParam( + 0.5, + "grow-prob", + "Probability of selecting 'grow' method instead of 'full' in initialization and mutation", + 0, + "Population").value(); + + unsigned max_depth = parser.createParam( + 8u, + "max-depth", + "Maximum depth used in initialization and mutation", + 0, + "Population").value(); + + + bool use_uniform = parser.createParam( + false, + "use-uniform", + "Use uniform node selection instead of bias towards internal nodes (functions)", + 0, + "Population").value(); + + double constant_mut_prob = parser.createParam( + 0.1, + "constant-mut-rate", + "Probability of performing constant mutation", + 0, + "Population").value(); + + + double subtree_mut_prob = parser.createParam( + 0.2, + "subtree-mut-rate", + "Probability of performing subtree mutation", + 0, + "Population").value(); + + double node_mut_prob = parser.createParam( + 0.2, + "node-mut-rate", + "Probability of performing node mutation", + 0, + "Population").value(); + +/* double lambda_mut_prob = parser.createParam( + 1.0, + "lambda-mut-rate", + "Probability of performing (neutral) lambda extraction/expansion", + 0, + "Population").value(); +*/ + double subtree_xover_prob = parser.createParam( + 0.4, + "xover-rate", + "Probability of performing subtree crossover", + 0, + "Population").value(); + + double homologous_prob = parser.createParam( + 0.4, + "homologous-rate", + "Probability of performing homologous crossover", + 0, + "Population").value(); + + unsigned max_gens = parser.createParam( + 50, + "max-gens", + "Maximum number of generations to run", + 'g', + "Population").value(); + + unsigned tournamentsize = parser.createParam( + 5, + "tournament-size", + "Tournament size used for selection", + 't', + "Population").value(); + + unsigned maximumSize = parser.createParam( + -1u, + "maximum-size", + "Maximum size after crossover", + 's', + "Population").value(); + + unsigned meas_param = parser.createParam( + 2u, + "measure", + "Error measure:\n\ + 0 -> absolute error\n\ + 1 -> mean squared error\n\ + 2 -> mean squared error scaled (equivalent with correlation)\n\ + ", + 'm', + "Regression").value(); + + + ErrorMeasure::measure meas = ErrorMeasure::mean_squared_scaled; + if (meas_param == 0) meas = ErrorMeasure::absolute; + if (meas_param == 1) meas = ErrorMeasure::mean_squared; + + + /* End parsing */ + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + return 1; + } + + if (functions_added == 0) { + cout << "ERROR: no functions defined" << endl; + exit(1); + } + + + Dataset dataset; + dataset.load_data(datafile.value()); + + cout << "Data " << datafile.value() << " loaded " << endl; + + /* Add Variables */ + unsigned nvars = dataset.n_fields(); + for (unsigned i = 0; i < nvars; ++i) { + table.add_function( SymVar(i).token(), 0); + } + + TreeBuilder builder(table, var_prob); + eoSymInit init(builder, grow_prob, max_depth); + + eoPop pop(pop_size, init); + + BiasedNodeSelector biased_sel; + RandomNodeSelector random_sel; + + NodeSelector& node_selector = select(use_uniform, random_sel, biased_sel); + + //eoProportionalOp genetic_operator; + eoSequentialOp genetic_operator; + + eoSymSubtreeMutate submutate(builder, node_selector); + genetic_operator.add( submutate, subtree_mut_prob); + + // todo, make this parameter, etc + double std = 1.0; + eoSymConstantMutate constmutate(std); + genetic_operator.add(constmutate, constant_mut_prob); + + eoSymNodeMutate nodemutate(table); + genetic_operator.add(nodemutate, node_mut_prob); + +// eoSymLambdaMutate lambda_mutate(node_selector); +// genetic_operator.add(lambda_mutate, lambda_mut_prob); // TODO: prob should be settable + + //eoQuadSubtreeCrossover quad(node_selector); + eoSizeLevelCrossover bin;//(node_selector); + //eoBinSubtreeCrossover bin(node_selector); + genetic_operator.add(bin, subtree_xover_prob); + + eoBinHomologousCrossover hom; + genetic_operator.add(hom, homologous_prob); + + + IntervalBoundsCheck check(dataset.input_minima(), dataset.input_maxima()); + ErrorMeasure measure(dataset, train_percentage, meas); + + eoSymPopEval evaluator(check, measure, maximumSize); + + eoDetTournamentSelect selectOne(tournamentsize); + eoGeneralBreeder breeder(selectOne, genetic_operator,1); + eoPlusReplacement replace; + + // Terminators + eoGenContinue term(max_gens); + eoCheckPoint checkpoint(term); + + eoBestFitnessStat beststat; + checkpoint.add(beststat); + + eoBestIndividualStat printer; + AverageSizeStat avgSize; + DagSizeStat dagSize; + SumSizeStat sumSize; + + checkpoint.add(printer); + checkpoint.add(avgSize); + checkpoint.add(dagSize); + checkpoint.add(sumSize); + + eoStdoutMonitor genmon; + genmon.add(beststat); + genmon.add(printer); + genmon.add(avgSize); + genmon.add(dagSize); + genmon.add(sumSize); + genmon.add(term); // add generation counter + + checkpoint.add(genmon); + + eoPop dummy; + evaluator(pop, dummy); + + eoEasyEA ea(checkpoint, evaluator, breeder, replace); + + ea(pop); // run + +} + +void add_function(LanguageTable& table, eoParser& parser, string name, unsigned arity, token_t token, const FunDef& fun, bool all) { + ostringstream desc; + desc << "Enable function " << name << " arity = " << arity; + bool enabled = parser.createParam(false, name, desc.str(), 0, "Language").value(); + + if (enabled || all) { + cout << "Func " << name << " enabled" << endl; + table.add_function(token, arity); + if (arity > 0) functions_added++; + } +} + +void setup_language(LanguageTable& table, eoParser& parser) { + + bool all = parser.createParam(false,"all", "Enable all functions").value(); + bool ratio = parser.createParam(false,"ratio","Enable rational functions (inv,min,sum,prod)").value(); + bool poly = parser.createParam(false,"poly","Enable polynomial functions (min,sum,prod)").value(); + + // assumes that at this point all tokens are defined (none are zeroed out, which can happen with ERCs) + vector lang = get_defined_functions(); + + for (token_t i = 0; i < lang.size(); ++i) { + + if (lang[i] == 0) continue; + + bool is_poly = false; + if (poly && (i == prod_token || i == sum_token || i == min_token) ) { + is_poly = true; + } + + bool is_ratio = false; + if (ratio && (is_poly || i == inv_token)) { + is_ratio = true; + } + + const FunDef& fun = *lang[i]; + + if (fun.has_varargs() ) { + + for (unsigned j = fun.min_arity(); j < fun.min_arity() + 8; ++j) { + if (j==1) continue; // prod 1 and sum 1 are useless + ostringstream nm; + nm << fun.name() << j; + bool addanyway = (all || is_ratio || is_poly) && j == 2; + add_function(table, parser, nm.str(), j, i, fun, addanyway); + } + } + else { + add_function(table, parser, fun.name(), fun.min_arity(), i, fun, all || is_ratio || is_poly); + } + } +} + + diff --git a/trunk/eo/contrib/mathsym/tcc.tar.gz b/trunk/eo/contrib/mathsym/tcc.tar.gz new file mode 100644 index 000000000..5b9354733 Binary files /dev/null and b/trunk/eo/contrib/mathsym/tcc.tar.gz differ diff --git a/trunk/eo/contrib/mathsym/tcc_patched.tar.gz b/trunk/eo/contrib/mathsym/tcc_patched.tar.gz new file mode 100644 index 000000000..9b82e54d8 Binary files /dev/null and b/trunk/eo/contrib/mathsym/tcc_patched.tar.gz differ diff --git a/trunk/eo/contrib/mathsym/test/test_compile.cpp b/trunk/eo/contrib/mathsym/test/test_compile.cpp new file mode 100644 index 000000000..adac41a9f --- /dev/null +++ b/trunk/eo/contrib/mathsym/test/test_compile.cpp @@ -0,0 +1,187 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include + +using namespace std; + +void test_xover(); + +int main() { + Dataset dataset; + dataset.load_data("test_data.txt"); + + cout << "Records/Fields " << dataset.n_records() << ' ' << dataset.n_fields() << endl; + + LanguageTable table; + table.add_function(sum_token, 2); + table.add_function(prod_token, 2); + table.add_function(sum_token, 0); + table.add_function(prod_token, 0); + table.add_function(inv_token, 1); + table.add_function(min_token, 1); + + for (unsigned i = 0; i < dataset.n_fields(); ++i) { + table.add_function( SymVar(i).token(), 0); + } + + TreeBuilder builder(table); + + IntervalBoundsCheck bounds(dataset.input_minima(), dataset.input_maxima() ); + ErrorMeasure measure(dataset, 1.0); + + + unsigned n = 1000; + unsigned k = 0; + + vector pop; + double sumsize = 0; + for (unsigned i = 0; i < n; ++i) { + + Sym sym = builder.build_tree(6, i%2); + pop.push_back(sym); + sumsize += sym.size(); + } + + cout << "Size " << sumsize/pop.size() << endl; + + // shuffle + for (unsigned gen = 0; gen < 10; ++gen) { + random_shuffle(pop.begin(), pop.end()); + for (unsigned i = 0; i < pop.size(); i+=2) { + + unsigned p1 = rng.random(pop[i].size()); + unsigned p2 = rng.random(pop[i+1].size()); + + Sym a = insert_subtree(pop[i], p1, get_subtree(pop[i+1], p2)); + Sym b = insert_subtree(pop[i+1], p2, get_subtree(pop[i], p1)); + + pop[i] = a; + pop[i+1] = b; + + } + cout << gen << ' ' << Sym::get_dag().size() << endl; + } + + vector oldpop; + swap(pop,oldpop); + for (unsigned i = 0; i < oldpop.size(); ++i) { + Sym sym = oldpop[i]; + if (!bounds.in_bounds(sym)) { + k++; + continue; + } + pop.push_back(sym); + } + + cout << "Done" << endl; + + // full compilation + + time_t start_time = time(0); + time_t compile_time; + { + multi_function f = compile(pop); + compile_time = time(0); + vector out(pop.size()); + + cout << "Compiled" << endl; + + for (unsigned j = 0; j < dataset.n_records(); ++j) { + f(&dataset.get_inputs(j)[0], &out[0]); + } + } + + time_t end_time = time(0); + + cout << "Evaluated " << n-k << " syms in " << end_time - start_time << " seconds, compile took " << compile_time - start_time << " seconds" << endl; + + start_time = time(0); + vector funcs; + compile(pop, funcs); + compile_time = time(0); + for (unsigned i = 0; i < pop.size(); ++i) { + + single_function f = funcs[i]; + for (unsigned j = 0; j < dataset.n_records(); ++j) { + f(&dataset.get_inputs(j)[0]); + } + + } + + end_time = time(0); + + cout << "Evaluated " << n-k << " syms in " << end_time - start_time << " seconds, compile took " << compile_time - start_time << " seconds" << endl; + return 0; // skip the 'slow' one-by-one method + start_time = time(0); + for (unsigned i = 0; i < pop.size(); ++i) { + + single_function f = compile(pop[i]); + for (unsigned j = 0; j < dataset.n_records(); ++j) { + f(&dataset.get_inputs(j)[0]); + } + + } + + end_time = time(0); + + cout << "Evaluated " << n-k << " syms in " << end_time - start_time << " seconds" << endl; + +} + +void test_xover() { + Sym c = SymVar(0); + Sym x = c + c * c + c; + + cout << c << endl; + cout << x << endl; + + vector pop; + for (unsigned i = 0; i < x.size(); ++i) { + for (unsigned j = 0; j < x.size(); ++j) { + + Sym s = insert_subtree(x, i, get_subtree(x, j)); + pop.push_back(s); + cout << i << ' ' << j << ' ' << s << endl; + } + } + + x = Sym(); + c = Sym(); + + SymMap& dag = Sym::get_dag(); + + for (SymMap::iterator it = dag.begin(); it != dag.end(); ++it) { + Sym s(it); + cout << s << ' ' << s.refcount() << endl; + } + + + +} + diff --git a/trunk/eo/contrib/mathsym/test/test_diff.cpp b/trunk/eo/contrib/mathsym/test/test_diff.cpp new file mode 100644 index 000000000..09dd292d4 --- /dev/null +++ b/trunk/eo/contrib/mathsym/test/test_diff.cpp @@ -0,0 +1,17 @@ +#include +#include +#include + +using namespace std; + +int main() { + + Sym v = SymConst(1.2); + + Sym g = exp(-sqr(v)); + + cout << g << endl; + cout << differentiate(g, v.token()) << endl; + +} + diff --git a/trunk/eo/contrib/mathsym/test/test_lambda.cpp b/trunk/eo/contrib/mathsym/test/test_lambda.cpp new file mode 100644 index 000000000..dc8e1ac70 --- /dev/null +++ b/trunk/eo/contrib/mathsym/test/test_lambda.cpp @@ -0,0 +1,34 @@ +#include + +using namespace std; + +int main() { + + Sym x = SymVar(0); + Sym y = SymVar(1); + + Sym f = y + x*x; + + Sym l = SymLambda(f); + + SymVec args = l.args(); + args[0] = x; + args[1] = y; + l = Sym(l.token(), args); + + vector v(3); + v[0] = 2.0; + v[1] = 3.0; + v[2] = 4.0; + + double v1 = eval(f,v); + double v2 = eval(l,v); + + cout << v1 << ' ' << v2 << endl; + cout << f << endl; + cout << l << endl; + + if (v1 != 7.0) return 1; + if (v2 != 11.0) return 1; +} + diff --git a/trunk/eo/contrib/mathsym/test/test_mf.cpp b/trunk/eo/contrib/mathsym/test/test_mf.cpp new file mode 100644 index 000000000..8cccfb128 --- /dev/null +++ b/trunk/eo/contrib/mathsym/test/test_mf.cpp @@ -0,0 +1,45 @@ + +#include "Sym.h" +#include "MultiFunction.h" +#include "FunDef.h" + +using namespace std; + +int main() { + + Sym v = SymVar(0); + Sym c = SymConst(0.1); + + Sym sym = inv(v) + c; + Sym a = sym; + + sym = sym * sym; + Sym b = sym; + sym = sym + sym; + + c = sym; + + vector pop; + pop.push_back(sym); + + MultiFunction m(pop); + + + vector vec(1); + vec[0] = 10.0; + cout << sym << endl; + + cout << "Eval " << eval(sym, vec); + + vector y(1); + + m(vec,y); + + cout << " " << y[0] << endl; + + cout << "3 " << eval(a,vec) << endl; + cout << "4 " << eval(b, vec) << endl; + cout << "5 " << eval(c, vec) << endl; + +} + diff --git a/trunk/eo/contrib/mathsym/test/test_simplify.cpp b/trunk/eo/contrib/mathsym/test/test_simplify.cpp new file mode 100644 index 000000000..73c920f2a --- /dev/null +++ b/trunk/eo/contrib/mathsym/test/test_simplify.cpp @@ -0,0 +1,21 @@ + +#include + +using namespace std; + +int main() { + + Sym c1 = SymConst(0.4); + Sym c2 = SymConst(0.3); + Sym v1 = SymVar(0); + + Sym expr = (c1 + c2) * ( (c1 + c2) * v1); + + cout << expr << endl; + cout << simplify(expr) << endl; + + Sym dv = differentiate( exp(expr) , v1.token()); + cout << dv << endl; + cout << simplify(dv) << endl; +} + diff --git a/trunk/eo/contrib/mathsym/test/testeo.cpp b/trunk/eo/contrib/mathsym/test/testeo.cpp new file mode 100644 index 000000000..a15303cb0 --- /dev/null +++ b/trunk/eo/contrib/mathsym/test/testeo.cpp @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2005 Maarten Keijzer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +typedef EoSym EoType; + +int main() { + + LanguageTable table; + table.add_function(sum_token, 2); + table.add_function(prod_token, 2); + table.add_function(inv_token, 1); + table.add_function(min_token, 1); + table.add_function( SymVar(0).token(), 0); + + table.add_function(tan_token, 1); + + table.add_function(sum_token, 0); + table.add_function(prod_token, 0); + + TreeBuilder builder(table); + + eoSymInit init(builder); + + eoPop pop(10, init); + + for (unsigned i = 0; i < pop.size(); ++i) { + // write out pretty printed + cout << (Sym) pop[i] << endl; + } + + BiasedNodeSelector node_selector; + eoSymSubtreeMutate mutate1(builder, node_selector); + eoSymNodeMutate mutate2(table); + + cout << "****** MUTATION ************" << endl; + + for (unsigned i = 0; i < pop.size(); ++i) { + + cout << "Before " << (Sym) pop[i] << endl; + mutate1(pop[i]); + cout << "After 1 " << (Sym) pop[i] << endl; + mutate2(pop[i]); + cout << "After 2 " << (Sym) pop[i] << endl; + } + + cout << "****** CROSSOVER ***********" << endl; + + eoQuadSubtreeCrossover quad(node_selector); + eoBinSubtreeCrossover bin(node_selector); + eoBinHomologousCrossover hom; + + for (unsigned i = 0; i < pop.size()-1; ++i) { + cout << "Before " << (Sym) pop[i] << endl; + cout << "Before " << (Sym) pop[i+1] << endl; + + hom(pop[i], pop[i+1]); + + cout << "After hom " << (Sym) pop[i] << endl; + cout << "After hom " << (Sym) pop[i+1] << endl; + + + quad(pop[i], pop[i+1]); + + cout << "After quad " << (Sym) pop[i] << endl; + cout << "After quad " << (Sym) pop[i+1] << endl; + + bin(pop[i], pop[i+1]); + + cout << "After bin " << (Sym) pop[i] << endl; + cout << "After bin " << (Sym) pop[i+1] << endl; + + cout << endl; + } + + cout << "****** Evaluation **********" << endl; + + Dataset dataset; + dataset.load_data("test_data.txt"); + IntervalBoundsCheck check(dataset.input_minima(), dataset.input_maxima()); + ErrorMeasure measure(dataset, 0.90, ErrorMeasure::mean_squared_scaled); + + eoSymPopEval evaluator(check, measure, 20000); + + eoPop dummy; + evaluator(pop, dummy); + + for (unsigned i = 0; i < pop.size(); ++i) { + cout << pop[i] << endl; + } + +} + diff --git a/trunk/eo/contrib/mathsym/test_data.txt b/trunk/eo/contrib/mathsym/test_data.txt new file mode 100644 index 000000000..754b1f0d1 --- /dev/null +++ b/trunk/eo/contrib/mathsym/test_data.txt @@ -0,0 +1,102 @@ +# 101 2 nan nan + 0.0 -0 + 0.1 -8.89903723981037e-05 + 0.2 -0.00122598240763888 + 0.3 -0.00517587564272387 + 0.4 -0.0132382052428645 + 0.5 -0.0254643081877282 + 0.6 -0.0407070337997998 + 0.7 -0.057285499199392 + 0.8 -0.0737562490233578 + 0.9 -0.0892727708954409 + 1 -0.103268200413493 + 1.1 -0.114577577792354 + 1.2 -0.120446083316857 + 1.3 -0.116000062935524 + 1.4 -0.0946298417869761 + 1.5 -0.0493963195458011 + 1.6 0.0248409598316732 + 1.7 0.129207388804052 + 1.8 0.259260510831339 + 1.9 0.404709502287215 + 2 0.550653582802201 + 2.1 0.680124882844178 + 2.2 0.777313232294796 + 2.3 0.830628236863242 + 2.4 0.834788256127692 + 2.5 0.79140362503436 + 2.6 0.707953643967287 + 2.7 0.595509207315954 + 2.8 0.46588939354196 + 2.9 0.329064872475183 + 3 0.191504886385553 + 3.1 0.0558518299407852 + 3.2 -0.0781019284912663 + 3.3 -0.211542824409141 + 3.4 -0.344524221510933 + 3.5 -0.474312294176053 + 3.6 -0.594727989459508 + 3.7 -0.696713721292122 + 3.8 -0.769988957905497 + 3.9 -0.805344773512717 + 4 -0.796949283133396 + 4.1 -0.744036874310458 + 4.2 -0.651525836186196 + 4.3 -0.529396820025977 + 4.4 -0.39098574050144 + 4.5 -0.250612439788816 + 4.6 -0.121113466670896 + 4.7 -0.0118426008551395 + 4.8 0.0724429930487275 + 4.9 0.13163323998176 + 5 0.169341449166714 + 5.1 0.191319990014267 + 5.2 0.203657703492626 + 5.3 0.211210264725322 + 5.4 0.216611758596317 + 5.5 0.220036646440173 + 5.6 0.219677788419796 + 5.7 0.212731354762643 + 5.8 0.196574232374672 + 5.9 0.169803441763318 + 6 0.132875383837662 + 6.1 0.0882099910986659 + 6.2 0.0397733622937463 + 6.3 -0.00771703924831375 + 6.4 -0.0497388405970527 + 6.5 -0.0828196592845663 + 6.6 -0.105101954751146 + 6.7 -0.116508794142315 + 6.8 -0.118508967610477 + 6.9 -0.113576955648085 + 7 -0.104507044103426 + 7.1 -0.0937591677397028 + 7.2 -0.0829871341075209 + 7.3 -0.0728391340503617 + 7.4 -0.0630443677389944 + 7.5 -0.0527284491080759 + 7.6 -0.0408508284036276 + 7.7 -0.0266394584962638 + 7.8 -0.00991225704809318 + 7.9 0.00878546797299183 + 8 0.0282459694154097 + 8.1 0.0468334978875681 + 8.2 0.0628175943181446 + 8.3 0.0747179317764707 + 8.4 0.0815794072993519 + 8.5 0.0831208473565567 + 8.6 0.0797359724522078 + 8.7 0.072361534724142 + 8.8 0.0622560784562081 + 8.9 0.0507477567273995 + 9 0.0390091892966309 + 9.1 0.0279034956336959 + 9.2 0.0179233472968783 + 9.3 0.00922050032813963 + 9.4 0.00170282350837218 + 9.5 -0.00483635091477891 + 9.6 -0.010593872761556 + 9.7 -0.0156676782318098 + 9.8 -0.020019888098685 + 9.9 -0.0234934811028401 + 10 -0.0258701880584331 diff --git a/trunk/eo/distclean b/trunk/eo/distclean new file mode 100755 index 000000000..e4a02bc44 --- /dev/null +++ b/trunk/eo/distclean @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +rm -rf debug +rm -rf release diff --git a/trunk/eo/doc/CMakeLists.txt b/trunk/eo/doc/CMakeLists.txt new file mode 100644 index 000000000..d7aa864b0 --- /dev/null +++ b/trunk/eo/doc/CMakeLists.txt @@ -0,0 +1,51 @@ +########################################################################################## +### EO Doc generation using Doxygen +########################################################################################## +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") + + # Copy necessary doc files + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/index.h ${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) + ENDFOREACH (file) + + # define the doc target + IF (DOXYGEN_EXECUTABLE) + # Creating the custom target + if(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) + add_custom_target(doc-eo + COMMAND ${DOXYGEN_EXECUTABLE} ${EO_DOC_CONFIG_FILE} 2> /dev/null > /dev/null + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + else(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) + ADD_CUSTOM_TARGET(doc-eo + COMMAND ${DOXYGEN_EXECUTABLE} ${EO_DOC_CONFIG_FILE} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + endif() + ENDIF (DOXYGEN_EXECUTABLE) + + # configure cfg file + CONFIGURE_FILE( + "${CMAKE_CURRENT_SOURCE_DIR}/${EO_DOC_CONFIG_FILE}.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/${EO_DOC_CONFIG_FILE}" + ) + + INSTALL( + DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DESTINATION share${INSTALL_SUB_DIR}/eo COMPONENT doc + PATTERN "CMakeFiles" EXCLUDE + PATTERN "cmake_install.cmake" EXCLUDE + PATTERN "Makefile" EXCLUDE + PATTERN "eo.cfg" EXCLUDE + PATTERN "eo.doxytag" EXCLUDE + ) +ELSE (DOXYGEN_FOUND) + MESSAGE(STATUS "Unable to generate the documentation, Doxygen package not found") +ENDIF (DOXYGEN_FOUND) diff --git a/trunk/eo/doc/ChangeLog b/trunk/eo/doc/ChangeLog new file mode 100644 index 000000000..10c4be341 --- /dev/null +++ b/trunk/eo/doc/ChangeLog @@ -0,0 +1,27 @@ +2007-01-23 Jochen Küpper + + * eo.cfg (PROJECT_NUMBER): Bump to 1.0.1 + +2006-12-18 Jochen Küpper + + * mainpage.html, publications.html: Update for release. + + * index.h: Add old ToDos + + * eo.cfg (PROJECT_NUMBER): Bump version to 1.0 + +2006-12-03 Jochen Küpper + + * mainpage.html: update, add link to Niko Hansen's comparison + +2006-12-01 Jochen Küpper + + * Makefile.am: Update for release-distribution. + + + + * Local Variables: + * coding: iso-8859-1 + * mode: flyspell + * fill-column: 80 + * End: diff --git a/trunk/eo/doc/EO_EA2001.pdf b/trunk/eo/doc/EO_EA2001.pdf new file mode 100644 index 000000000..2a3116f3d Binary files /dev/null and b/trunk/eo/doc/EO_EA2001.pdf differ diff --git a/trunk/eo/doc/LeCreusot.pdf b/trunk/eo/doc/LeCreusot.pdf new file mode 100644 index 000000000..7c0acb95c Binary files /dev/null and b/trunk/eo/doc/LeCreusot.pdf differ diff --git a/trunk/paradiseo-old-mo/doc/mo.doxyfile.cmake b/trunk/eo/doc/eo.cfg.cmake similarity index 61% rename from trunk/paradiseo-old-mo/doc/mo.doxyfile.cmake rename to trunk/eo/doc/eo.cfg.cmake index 60e84efda..e781ed5f6 100644 --- a/trunk/paradiseo-old-mo/doc/mo.doxyfile.cmake +++ b/trunk/eo/doc/eo.cfg.cmake @@ -1,4 +1,4 @@ -# Doxyfile 1.5.2 +# Doxyfile 1.6.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project @@ -14,193 +14,215 @@ # Project related configuration options #--------------------------------------------------------------------------- -# This tag specifies the encoding used for all characters in the config file that -# follow. The default is UTF-8 which is also the encoding used for all text before -# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into -# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of -# possible encodings. +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = @PACKAGE_NAME@ -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = @PACKAGE_VERSION@ -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doc +OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@ -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, -# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, -# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, -# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the +ABBREVIATE_BRIEF = -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip. -STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ +STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = YES -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to -# include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO @@ -210,360 +232,442 @@ BUILTIN_STL_SUPPORT = NO CPP_CLI_SUPPORT = NO -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = YES -# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. -HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. -HIDE_UNDOC_CLASSES = YES +HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = NO -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = NO -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the +# Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. -SHOW_DIRECTORIES = NO +SHOW_FILES = YES -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = NO -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = NO -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr. -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = @CMAKE_SOURCE_DIR@/src +INPUT = @CMAKE_SOURCE_DIR@ -# This tag can be used to specify the character encoding of the source files that -# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default -# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. -# See http://www.gnu.org/software/libiconv for the list of possible encodings. +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. INPUT_ENCODING = UTF-8 -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = *.cpp \ - *.h + *.h \ + NEWS \ + README -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = +EXCLUDE = @CMAKE_SOURCE_DIR@/src/obsolete @CMAKE_SOURCE_DIR@/test @CMAKE_SOURCE_DIR@/tutorial @CMAKE_SOURCE_DIR@/contrib @CMAKE_SOURCE_DIR@/app -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the output. -# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, -# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/test -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = * +EXAMPLE_PATTERNS = -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command). -IMAGE_PATH = +IMAGE_PATH = -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be # ignored. -INPUT_FILTER = +INPUT_FILTER = -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. -FILTER_PATTERNS = +FILTER_PATTERNS = -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO @@ -572,32 +676,32 @@ FILTER_SOURCE_FILES = NO # configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES -# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES @@ -605,20 +709,21 @@ REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentstion. +# link to the source code. +# Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES @@ -627,279 +732,383 @@ VERBATIM_HEADERS = YES # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 3 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. -IGNORE_PREFIX = mo +IGNORE_PREFIX = eo #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = +HTML_STYLESHEET = -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. -HTML_ALIGN_MEMBERS = YES +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory. -CHM_FILE = +CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. -HHC_LOCATION = +HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO -# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = YES -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) +# there is already a search function so this one should typically +# be disabled. + +SEARCHENGINE = YES + #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO +# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = -# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = YES -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO @@ -908,33 +1117,33 @@ MAN_LINKS = NO # configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_SCHEMA = +XML_SCHEMA = -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_DTD = +XML_DTD = -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES @@ -943,10 +1152,10 @@ XML_PROGRAMLISTING = YES # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO @@ -955,307 +1164,338 @@ GENERATE_AUTOGEN_DEF = NO # configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = +PREDEFINED = -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = @EO_BIN_DIR@/doc/eo.doxytag=http://eodev.sourceforge.net/eo/doc/html +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = @CMAKE_BINARY_DIR@/doc/mo.doxytag +GENERATE_TAGFILE = @CMAKE_CURRENT_BINARY_DIR@/eo.doxytag -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES -# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to -# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to -# specify the directory where the mscgen tool resides. If left empty the tool is assumed to -# be found in the default search path. +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. -MSCGEN_PATH = +MSCGEN_PATH = -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO -# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. CALL_GRAPH = NO -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a caller dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png -# The tag DOT_PATH can be used to specify the path where the dot tool can be +# The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. -DOT_PATH = +DOT_PATH = -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command). -DOTFILE_DIRS = +DOTFILE_DIRS = -# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen will always -# show the root nodes and its direct children regardless of this setting. +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = YES diff --git a/trunk/eo/doc/index.h b/trunk/eo/doc/index.h new file mode 100644 index 000000000..52a5758cf --- /dev/null +++ b/trunk/eo/doc/index.h @@ -0,0 +1,62 @@ +/** @mainpage Welcome to Evolving Objects + +@section shortcuts In one word + +The best place to learn about the features and approaches of %EO with the help of examples is to look at +the tutorial. + +Once you have understand the @ref design of %EO, you could search for advanced features by browsing the modules page. + + +@section intro Introduction + + %EO is a template-based, ANSI-C++ evolutionary computation library which helps you to write your own stochastic optimization algorithms insanely fast. + +It contains classes for almost any kind of evolutionary computation you might come +up to - at least for the ones we could think of. It is component-based, so that +if you don't find the class you need in it, it is very easy to subclass existing +abstract or concrete classes. + +Designing an algorithm with %EO consists in choosing what components you want to use for your specific needs, just as building a structure with Lego blocks. + +If you have a classical problem for which available code exists (for example if you have a black-box problem with real-valued variables), you will just choose components to form an algorithm and connect it to your fitness function (which computes the quality of a given solution). + +If your problem is a bit more exotic, you will have to code a class that represents how your individuals (a solution to your problem) are represented, and perhaps some variations operators, but most of the other operators (selection, replacement, stopping criteria, command-line interface, etc.) are already available in %EO. + + + +@section design Overall Design + +%EO is a framework. It is oriented toward facilitating the design of adhoc evolutionary algorithms. +It is not (at the moment) a complete library of algorithms ready to use on canonical problems. + +If you have a well-known problem and want to solve it as soon as possible, try another software. +If you have a real problem and want to build the best evolutionary algorithm to solve it, you've made +the good choice. + +Bascially, %EO manipulate "individuals" with a "fitness", that is objects +encoding a solution to a given optimization problem, associated with +the quality of this solution. The fitness is defined in the %EO class, +but the representation of a solution cannot be as generic. Thus, %EO +massively use templates, so that you will not be limited by interfaces +when using your own representation. + +Once you have a representation, you will build your own evolutionary algorithm +by assembling @ref Operators in @ref Algorithms. +In %EO, most of the objects are functors, that is classes with an operator(), that you +can call just as if they were classical functions. For example, an algorithm is a +functor, that manipulate a population of individuals, it will be implemented as a functor, +with a member like: operator()(eoPop). Once called on a given population, it will +search for the optimum of a given problem. + +Generally, operators are instanciated once and then binded in an algorithm by reference. +Thus, you can easily build your own algorithm by trying several combination of operators. + +For a more detailled introduction to the design of %EO you can look at the +slides from a talk at EA 2001 or at the corresponding +article in Lecture Notes In Computer Science, 2310, Selected Papers from the 5th European Conference on Artificial Evolution: + - http://portal.acm.org/citation.cfm?id=727742 + - http://eodev.sourceforge.net/eo/doc/LeCreusot.pdf + - http://eodev.sourceforge.net/eo/doc/EO_EA2001.pdf +*/ diff --git a/trunk/eo/doc/mainpage.html b/trunk/eo/doc/mainpage.html new file mode 100644 index 000000000..e175850c6 --- /dev/null +++ b/trunk/eo/doc/mainpage.html @@ -0,0 +1,280 @@ + + + + + + + + +EO Evolutionary Computation Framework + + + +
+

EO Evolutionary Computation Framework

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

What is EO?

+
+ +

EO is a templates-based, ANSI-C++ compliant evolutionary computation + library. It contains classes for almost any kind of evolutionary + computation you might come up to - at least for the ones we could think + of. It is component-based, so that if you don't find the class you need + in it, it is very easy to subclass existing abstract or concrete + classes.

+ +

EO was started by the Geneura + Team at the University of Granada, headed by Juan Julián Merelo. The original Web site is also the only place where you + will find old releases of EO (up to 0.8.7), but beware that it is not + compatible at all with the current version.

+ +

The developement team has then been reinforced by Maarten Keijzer, the C++ + wizzard, and Marc Schoenauer. + Later came Jeroen + Eggermont, who, among other things, did a lot of work on GP, + INRIA Dolphin Team, Olivier König, who did a + lot of useful additions and cleaning of the code and Jochen Küpper, working on + infrastructure maintenance.

+ +
+

Platforms

+
+ +

EO should work on Windows and any Un*x-like operating system with a + standard-conforming C++ development system.

+ +

Recent versions of EO have been tested on the following platforms: +

+ +
    +
  • Linux x86 with GCC 3.x and 4.x
  • +
  • Linux x86_64 with GCC 3.x and GCC 4.x
  • +
  • MacOS X/Darwin PowerPC with GCC 3.x
  • +
  • MacOS X/Darwin x86 with GCC 4.x
  • +
  • Microsoft Windows using Cygwin's GCC 3.x (cygming special). +
  • Microsoft Windows using Visual Studio 2003/2005; projects files + are provided.
  • +
  • Solaris SPARC with GCC 3.x
  • +
  • Solaris x86 with GCC 3.x
  • +
+ +

If you have tested EO on a system not listed here, please let + us know.

+ +

If you are working on a system with an older C++ compiler there + is a good chance that eo-0.9.3z.1 works. It is tested on Linux + with gcc-2.9x and several systems (IRIX, Solaris) with egcs.

+ +
+

Documentation

+
+ +

The tutorial demonstrates that writing an evolutionary algorithm + evolving your own structures is now easy, using ready-to-use + template files. Although the tutorial has not been upgraded for some + time now and refers to version 0.9.2 of EO, it nevertheless remains the + best way to dive into EO. You can start by trying it on-line at LRI + or SourceForge, + before downloading it. The + tutorial is also included in the released + sources.

+ +

The latest tutorial + release +

+ +

The complete code is also well documented and you can look at the + generated interface + documentation.

+ +

The easiest way to create a complete new EO-project, even for new + genomes, is to use the script provided in tutorial/Templates/; see + the README in that directory and lesson 5 of the tutorial for + detail.

+ +
+

Presentations

+
+ +

A functional and "philosophical" overview of EO was presented at EA'01 conference. + You can download the paper + or the + slides.

+ +

A PowerPoint presentation shows the EO philosophy, and + it includes a Visual Basic macro for evolving objects in Visual Basic + for Applications.

+ +

You can also look a the list of + publications that used EO to solve real problems.

+ +
+

Download

+
+ +

The current release is EO 1.0. + It supports any Standard-compliant C++ compiler.

+ +

You can obtain the latest version directly via cvs or download a + daily snapshot from LRI.

+ +

All releases can be obtained from the SourceForge download + area.

+ +
+

Mailing Lists

+
+ + We would like EO to be an open development effort; that is why we have + created mailing lists to discuss future developments, solve technical + problems, announce releases, publish patches, and discuss evolutionary + computation in general. Browse the archives or join the EO mailing lists. + +
+

EO@sourceforge

+
+ +

The following resources are available, thanks to sourceforge

+ +
+

License

+
EO is distributed under the + GNU Lesser General + Public License + +
+

Related Apps

+
+ +

ParadisEO provides EO extensions for + the flexible design of single solution-based metaheuristics, + metaheuristics for multi objective optimization as well as hybrid, parallel and distributed + metaheuristics.

+ +

DegaX is an ActiveX control which embeds EO 0.8.4. +

+ +
+

Links

+
+ + +
+ +

Hosted by:
SF logo

+ +

Valid HTML 4.01 Transitional
Please send comments on this webpage to the EO mailing +list.

+ + + + + + + + + diff --git a/trunk/eo/doc/publications.html b/trunk/eo/doc/publications.html new file mode 100644 index 000000000..26ff646f4 --- /dev/null +++ b/trunk/eo/doc/publications.html @@ -0,0 +1,75 @@ + + + + + + + + + EO Evolutionary Computation Framework + + + +
+

List of publications using EO

+
+ + + + + + + + + +
+

+ M. + Keijzer, J.J. Merelo, G. Romero, G., M. Schoenauer: "Evolving + objects: A general purpose evolutionary computation + library", Art. Evol. 2310, 231-242 (2002). +

+
+

+ J.J. Gilijamse, J. Küpper, + S. Hoekstra, S.Y.T. van de Meerakker, G. Meijer: + "Optimizing the Stark-decelerator beamline for the trapping of + cold molecules using evolutionary strategies", + Phys. Rev. A 73, 063410 (2006).
+ Also available at arXiv + physics/0603108 (2006). +

+
+
+

+ Hosted by:
SF logo +

+
+

+ + Valid HTML 4.01 Transitional +
+ Please send publications that belong on this page and general comments on + this webpage to + the EO + mailing list. +

+ + + + + + + + diff --git a/trunk/eo/doc/sflogo-hammer1.jpg b/trunk/eo/doc/sflogo-hammer1.jpg new file mode 100644 index 000000000..a7e2f00f4 Binary files /dev/null and b/trunk/eo/doc/sflogo-hammer1.jpg differ diff --git a/trunk/eo/eo-conf.cmake b/trunk/eo/eo-conf.cmake new file mode 100644 index 000000000..5ced7fadf --- /dev/null +++ b/trunk/eo/eo-conf.cmake @@ -0,0 +1,8 @@ + +# Current version +SET(PROJECT_VERSION_MAJOR 1) +SET(PROJECT_VERSION_MINOR 3) +SET(PROJECT_VERSION_PATCH 0) +SET(PROJECT_VERSION_MISC "-edge") + +ADD_DEFINITIONS(-DDEPRECATED_MESSAGES) # disable warning deprecated function messages diff --git a/trunk/eo/install_symlink.py.cmake b/trunk/eo/install_symlink.py.cmake new file mode 100755 index 000000000..fd71d68b5 --- /dev/null +++ b/trunk/eo/install_symlink.py.cmake @@ -0,0 +1,52 @@ +#!/usr/bin/env python + +#NAME = "@PROJECT_NAME@" +NAME = "eo" +SOURCE = "@CMAKE_SOURCE_DIR@" +BINARY = "@CMAKE_BINARY_DIR@" +PREFIX = "/usr" + +DATA = { + 'dirs': [ "%s/share/%s" % (PREFIX, NAME) ], + 'links': [ ("%s/src" % SOURCE, "%s/include/%s" % (PREFIX, NAME)), + ("%s/doc" % BINARY, "%s/share/%s/doc" % (PREFIX, NAME)), + ("%s/%s.pc" % (BINARY, NAME), "%s/lib/pkgconfig/%s.pc" % (PREFIX, NAME)), + ] + } + +LIBRARIES = ["libcma.a", "libeo.a", "libeoutils.a", "libes.a", "libga.a"] +DATA['links'] += [ ("%s/lib/%s" % (BINARY, lib), "%s/lib/%s" % (PREFIX, lib)) for lib in LIBRARIES ] + +import os, sys + +def isroot(): + if os.getuid() != 0: + print('[WARNING] you have to be root') + return False + return True + +def uninstall(): + for dummy, link in DATA['links']: os.remove(link) + for dirname in DATA['dirs']: os.rmdir(dirname) + 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) + print('All symlinks have been installed.') + +def data(): + from pprint import pprint + pprint(DATA, width=200) + +if __name__ == '__main__': + if not isroot(): + sys.exit() + + if len(sys.argv) < 2: + print(('Usage: %s [install|uninstall|data]' % sys.argv[0])) + sys.exit() + + if sys.argv[1] == 'install': install() + elif sys.argv[1] == 'uninstall': uninstall() + elif sys.argv[1] == 'data': data() diff --git a/trunk/eo/package_deb b/trunk/eo/package_deb new file mode 100755 index 000000000..1a44d0219 --- /dev/null +++ b/trunk/eo/package_deb @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +cd release +cpack -G DEB +cd .. diff --git a/trunk/eo/package_nsis.bat b/trunk/eo/package_nsis.bat new file mode 100644 index 000000000..d372c4340 --- /dev/null +++ b/trunk/eo/package_nsis.bat @@ -0,0 +1,4 @@ +cd release +cpack -G NSIS +cd .. +pause diff --git a/trunk/eo/package_rpm b/trunk/eo/package_rpm new file mode 100755 index 000000000..8d46b7d04 --- /dev/null +++ b/trunk/eo/package_rpm @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +cd release +cpack -G RPM +cd .. diff --git a/trunk/eo/pc.cmake b/trunk/eo/pc.cmake new file mode 100644 index 000000000..ad3c17ef2 --- /dev/null +++ b/trunk/eo/pc.cmake @@ -0,0 +1,6 @@ +# Package Information for pkg-config +Name: @PACKAGE_NAME@ +Description: @PACKAGE_NAME@ +Version: @PROJECT_VERSION@ +Libs: -L@PCPREFIX@/lib @PCFLAGS@ +Cflags: -I@PCPREFIX@/include/@PCINCLUDEDIR@ diff --git a/trunk/eo/src/CMakeLists.txt b/trunk/eo/src/CMakeLists.txt new file mode 100644 index 000000000..6e1bb3e40 --- /dev/null +++ b/trunk/eo/src/CMakeLists.txt @@ -0,0 +1,54 @@ +###################################################################################### +### 1) Include the sources +###################################################################################### + +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_SOURCES + eoFunctorStore.cpp + eoPersistent.cpp + eoPrintable.cpp + eoCtrlCContinue.cpp + eoScalarFitnessAssembled.cpp + 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 + ) + +###################################################################################### +### 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}") + +###################################################################################### +### 4) Where must cmake go now ? +###################################################################################### + +ADD_SUBDIRECTORY(es) +ADD_SUBDIRECTORY(ga) +ADD_SUBDIRECTORY(utils) + +IF(ENABLE_PYEO) + ADD_SUBDIRECTORY(pyeo) +ENDIF(ENABLE_PYEO) + +###################################################################################### diff --git a/trunk/eo/src/EO.h b/trunk/eo/src/EO.h new file mode 100644 index 000000000..f904559d4 --- /dev/null +++ b/trunk/eo/src/EO.h @@ -0,0 +1,173 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// EO.h +// (c) GeNeura Team 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EO_H +#define EO_H + +//----------------------------------------------------------------------------- + +#include // std::runtime_error +#include // eoObject +#include // eoPersistent + +/** + @defgroup Core Core components + + This are the base classes from which useful objects inherits. + + @{ + */ + +/** EO is the base class for objects with a fitness. + + Those evolvable objects are the subjects of + evolution. EOs have only got a fitness, which at the same time needs to be + only an object with the operation less than (<) defined. Fitness says how + good is the object; evolution or change of these objects is left to the + genetic operators. + + A fitness less than another means a worse fitness, in + whatever the context; thus, fitness is always maximized; although it can + be minimized with a proper definition of the < operator. + + A fitness can be invalid if undefined, trying to read an invalid fitness will raise an error. + @ref Operators that effectively modify EO objects must invalidate them. + + The fitness object must have, besides an void ctor, a copy ctor. + + @example t-eo.cpp +*/ +template class EO: public eoObject, public eoPersistent +{ +public: + typedef F Fitness; + + /** Default constructor. + */ + EO(): repFitness(Fitness()), invalidFitness(true) { } + + /// Virtual dtor + virtual ~EO() {}; + + /// Return fitness value. + const Fitness& fitness() const { + if (invalid()) + throw std::runtime_error("invalid fitness"); + return repFitness; + } + + /// Get fitness as reference, useful when fitness is set in a multi-stage way, e.g., MOFitness gets performance information, is subsequently ranked + Fitness& fitnessReference() { + if (invalid()) throw std::runtime_error("invalid fitness"); + return repFitness; + } + + // Set fitness as invalid. + void invalidate() { invalidFitness = true; repFitness = Fitness(); } + + /** Set fitness. At the same time, validates it. + * @param _fitness New fitness value. + */ + void fitness(const Fitness& _fitness) + { + repFitness = _fitness; + invalidFitness = false; + } + + /** Return true If fitness value is invalid, false otherwise. + * @return true If fitness is invalid. + */ + bool invalid() const { return invalidFitness; } + + /** Returns true if + @return true if the fitness is higher + */ + bool operator<(const EO& _eo2) const { return fitness() < _eo2.fitness(); } + bool operator>(const EO& _eo2) const { return !(fitness() <= _eo2.fitness()); } + + /// Methods inherited from eoObject + //@{ + + /** Return the class id. + * @return the class name as a std::string + */ + virtual std::string className() const { return "EO"; } + + /** + * Read object.\\ + * Calls base class, just in case that one had something to do. + * The read and print methods should be compatible and have the same format. + * In principle, format is "plain": they just print a number + * @param _is a std::istream. + * @throw runtime_std::exception If a valid object can't be read. + */ + virtual void readFrom(std::istream& _is) { + + // the new version of the reafFrom function. + // It can distinguish between valid and invalid fitness values. + std::string fitness_str; + int pos = _is.tellg(); + _is >> fitness_str; + + if (fitness_str == "INVALID") + { + invalidFitness = true; + } + else + { + invalidFitness = false; + _is.seekg(pos); // rewind + _is >> repFitness; + } + } + + /** + * Write object. Called printOn since it prints the object _on_ a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const { + + + // the latest version of the code. Very similar to the old code + if (invalid()) { + _os << "INVALID "; + } + else + { + _os << repFitness << ' '; + } + + } + + //@} + +private: + Fitness repFitness; // value of fitness for this chromosome + bool invalidFitness; // true if the value of fitness is invalid +}; + + +#endif + +/** @} */ diff --git a/trunk/eo/src/PO.h b/trunk/eo/src/PO.h new file mode 100644 index 000000000..0c246135e --- /dev/null +++ b/trunk/eo/src/PO.h @@ -0,0 +1,191 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// PO.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef PO_H +#define PO_H + +//----------------------------------------------------------------------------- +#include +#include +//----------------------------------------------------------------------------- + +/** PO inheriting from EO is specially designed for particle swarm optimization particle.POs have got a fitness, + which at the same time needs to be only an object with the operation less than (<) + defined. A best fitness also belongs to the particle.Fitness says how + good is the particle for a current iteration whereas the best fitness can be saved for + many iterations. + + @ingroup Core +*/ +template < class F > class PO:public EO < F > +{ + +public: + + #if defined(__CUDACC__) + typedef typename EO < F >::Fitness Fitness; + #else + typedef typename PO::Fitness Fitness; + #endif + + /** Default constructor. + Fitness must have a ctor which takes 0 as a value. Best fitness mush also have the same constructor. + */ + PO ():repFitness (Fitness ()), invalidFitness (true), + bestFitness (Fitness()){} + + + /// Return fitness value. + Fitness fitness () const + { + if (invalid ()) + throw std::runtime_error ("invalid fitness in PO.h"); + return repFitness; + } + + + /** Set fitness. At the same time, validates it. + * @param _fitness New fitness value. + */ + void fitness (const Fitness & _fitness) + { + repFitness = _fitness; + invalidFitness = false; + } + + /** Return the best fitness. + * @return bestFitness + */ + Fitness best () const + { + if (invalid ()) + throw std::runtime_error ("invalid best fitness in PO.h"); + return bestFitness; + } + + + /** Set the best fitness. + * @param _bestFitness New best fitness found for the particle. + */ + void best (const Fitness & _bestFitness) + { + bestFitness = _bestFitness; + invalidBestFitness = false; + } + + + /** Return true If fitness value is invalid, false otherwise. + * @return true If fitness is invalid. + */ + bool invalid () const + { + return invalidFitness; + } + + /** Invalidate the fitness. + * @return + */ + void invalidate () + { + invalidFitness = true; + } + + /** Return true If the best fitness value is invalid, false otherwise. + * @return true If the bestfitness is invalid. + */ + bool invalidBest () const + { + return invalidBestFitness; + } + + /** Invalidate the best fitness. + * @return + */ + void invalidateBest () + { + invalidBestFitness = true; + } + + /** Return the class id. + * @return the class name as a std::string + */ + virtual std::string className () const + { + return "PO"; + } + + /** Returns true if + @return true if the fitness is higher + */ + bool operator< (const PO & _po2) const { return fitness () < _po2.fitness ();} + bool operator> (const PO & _po2) const { return !(fitness () <= _po2.fitness ());} + + + /** + * Write object. Called printOn since it prints the object _on_ a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const { _os << bestFitness << ' ' ;} + + + /** + * Read object.\\ + * Calls base class, just in case that one had something to do. + * The read and print methods should be compatible and have the same format. + * In principle, format is "plain": they just print a number + * @param _is a std::istream. + * @throw runtime_std::exception If a valid object can't be read. + */ + virtual void readFrom(std::istream& _is) { + + // the new version of the reafFrom function. + // It can distinguish between valid and invalid fitness values. + std::string fitness_str; + int pos = _is.tellg(); + _is >> fitness_str; + + if (fitness_str == "INVALID") + { + invalidFitness = true; + } + else + { + invalidFitness = false; + _is.seekg(pos); // rewind + _is >> repFitness; + } + } + +private: + Fitness repFitness; // value of fitness for this particle + bool invalidFitness; // true if the value of the fitness is invalid + + Fitness bestFitness; // value of the best fitness found for the particle + bool invalidBestFitness; // true if the value of the best fitness is invalid + +}; + +//----------------------------------------------------------------------------- + +#endif /*PO_H */ diff --git a/trunk/eo/src/apply.h b/trunk/eo/src/apply.h new file mode 100644 index 000000000..f685f8d3b --- /dev/null +++ b/trunk/eo/src/apply.h @@ -0,0 +1,119 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoApply.h +// (c) Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _apply_h +#define _apply_h + +#include +#include +#include +#include +#include +#include + +/** + Applies a unary function to a std::vector of things. + + @ingroup Utilities +*/ +template +void apply(eoUF& _proc, std::vector& _pop) +{ + size_t size = _pop.size(); + +#ifdef _OPENMP + + double t1 = 0; + + if ( eo::parallel.enableResults() ) + { + 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]); } + } + 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]); } + } + + if ( eo::parallel.enableResults() ) + { + double t2 = omp_get_wtime(); + eoLogger log; + log << eo::file(eo::parallel.prefix()) << t2 - t1 << ' '; + } + +#else // _OPENMP + + for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); } + +#endif // !_OPENMP +} + +/** + This is a variant of apply which is called in parallel + thanks to OpenMP. + + @ingroup Utilities +*/ +// template +// void omp_apply(eoUF& _proc, std::vector& _pop) +// { +// size_t size = _pop.size(); +// #pragma omp parallel for 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]); +// } +// } + +/** + And now we are using the dynamic scheduling. + + @ingroup Utilities +*/ +// template +// void omp_dynamic_apply(eoUF& _proc, std::vector& _pop) +// { +// size_t size = _pop.size(); +// #pragma omp parallel for if(eo::parallel.isEnabled()) schedule(dynamic) +// //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 diff --git a/trunk/eo/src/do/Readme b/trunk/eo/src/do/Readme new file mode 100644 index 000000000..0b3ccd8ac --- /dev/null +++ b/trunk/eo/src/do/Readme @@ -0,0 +1,36 @@ +This directory contains templatized code that is supposed to be +instanciated and compiled in an actual library for every type of EOT + +The user can then modify and recompile only the part he/she wishes to +change (as in any library!). + +See in EO src/ga dir the corresponding .cpp files, that simply instanciate +the functions here for eoBit AND eoBit +and in EO test dir the t-eoGA.cpp file that is a sample program that uses +the whole facility. + +All make_XXX.h file define some parser-based constructions of basic +Evolutionary Algorithms components, using state-based memory management +(see in src/utils dir, or read the tutorial). + +In this src/do dir, the following ***representation indedendent*** code +is defined + +make_algo_scalar.h The selection/replacement for scalar fitnesses +make_checkpoint.h The output facilities +make_continue.h The stpping criteria +make_pop.h Init of the population (from an EOT initializer) +make_run.h Run the algorithm + +See also (NOW MOVED TO util DIR, as it was useful everywhere) +make_help.cpp Help on demand (+ status file) + +Note: +----- +two additional make_XXX.h files need to be defined for each representation + +make_genotype.h Builds an initializer for the corresponding EOType +make_op.h Builds a general Operator to be used in the algo + +MS, April 23, 2001 + July 23, 2001 diff --git a/trunk/eo/src/do/make_algo_easea.h b/trunk/eo/src/do/make_algo_easea.h new file mode 100644 index 000000000..c432c1e82 --- /dev/null +++ b/trunk/eo/src/do/make_algo_easea.h @@ -0,0 +1,389 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_algo_easea.h +// (c) Marc Schoenauer and Pierre Collet, 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Pierre.Collet@polytechnique.fr + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_algo_easea_h +#define _make_algo_easea_h + +#include // for eo_is_a_rate +// everything tha's needed for the algorithms - SCALAR fitness + +// Selection +// the eoSelectOne's +#include +#include +#include +#include +#include +#include +#include +// #include included in all others + +// Breeders +#include + +// Replacement +#include "make_general_replacement.h" +#include "eoMGGReplacement.h" +#include "eoG3Replacement.h" + + +// Algorithm (only this one needed) +#include + + // also need the parser and param includes +#include +#include + +/* + * This function builds the algorithm (i.e. selection and replacement) + * from existing continue (or checkpoint) and operators + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here + * + * + * @ingroup Builders +*/ +template +eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoPopEvalFunc& _popeval, eoContinue& _continue, eoGenOp& _op) +{ + // the selection + eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", "Selection: Roulette, Ranking(p,e), DetTour(T), StochTour(t), Sequential(ordered/unordered) or EliteSequentialSelect", 'S', "Evolution Engine"); + + eoParamParamType & ppSelect = selectionParam.value(); // std::pair > + + eoSelectOne* select ; + if (ppSelect.first == std::string("DetTour")) + { + unsigned detSize; + + if (!ppSelect.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to DetTour, using 2" << std::endl; + detSize = 2; + // put back 2 in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("2")); + } + else // parameter passed by user as DetTour(T) + detSize = atoi(ppSelect.second[0].c_str()); + select = new eoDetTournamentSelect(detSize); + } + else if (ppSelect.first == std::string("StochTour")) + { + double p; + if (!ppSelect.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to StochTour, using 1" << std::endl; + p = 1; + // put back p in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("1")); + } + else // parameter passed by user as DetTour(T) + p = atof(ppSelect.second[0].c_str()); + + select = new eoStochTournamentSelect(p); + } + else if (ppSelect.first == std::string("Ranking")) + { + double p,e; + if (ppSelect.second.size()==2) // 2 parameters: pressure and exponent + { + p = atof(ppSelect.second[0].c_str()); + e = atof(ppSelect.second[1].c_str()); + } + else if (ppSelect.second.size()==1) // 1 parameter: pressure + { + std::cerr << "WARNING, no exponent to Ranking, using 1" << std::endl; + e = 1; + ppSelect.second.push_back(std::string("1")); + p = atof(ppSelect.second[0].c_str()); + } + else // no parameters ... or garbage + { + std::cerr << "WARNING, no parameter to Ranking, using (2,1)" << std::endl; + p=2; + e=1; + // put back in parameter for consistency (and status file) + ppSelect.second.resize(2); // just in case + ppSelect.second[0] = (std::string("2")); + ppSelect.second[1] = (std::string("1")); + } + // check for authorized values + // pressure in (0,1] + if ( (p<=1) || (p>2) ) + { + std::cerr << "WARNING, selective pressure must be in (1,2] in Ranking, using 2\n"; + p=2; + ppSelect.second[0] = (std::string("2")); + } + // exponent >0 + if (e<=0) + { + std::cerr << "WARNING, exponent must be positive in Ranking, using 1\n"; + e=1; + ppSelect.second[1] = (std::string("1")); + } + // now we're OK + eoPerf2Worth & p2w = _state.storeFunctor( new eoRanking(p,e) ); + select = new eoRouletteWorthSelect(p2w); + } + else if (ppSelect.first == std::string("Sequential")) // one after the other + { + bool b; + if (ppSelect.second.size() == 0) // no argument -> default = ordered + { + b=true; + // put back in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("ordered")); + } + else + b = !(ppSelect.second[0] == std::string("unordered")); + select = new eoSequentialSelect(b); + } + else if (ppSelect.first == std::string("EliteSequential")) // Best first, one after the other in random order afterwards + { + select = new eoEliteSequentialSelect; + } + else if (ppSelect.first == std::string("Roulette")) // no argument (yet) + { + select = new eoProportionalSelect; + } + else if (ppSelect.first == std::string("Random")) // no argument + { + select = new eoRandomSelect; + } + else + { + std::string stmp = std::string("Invalid selection: ") + ppSelect.first; + throw std::runtime_error(stmp.c_str()); + } + + _state.storeFunctor(select); + + // the number of offspring + eoValueParam& offspringRateParam = _parser.createParam(eoHowMany(1.0), "nbOffspring", "Nb of offspring (percentage or absolute)", 'O', "Evolution Engine"); + + ///////////////////////////////////////////////////// + // the replacement + ///////////////////////////////////////////////////// + + /** Replacement type - high level: predefined replacements + * ESComma : + * elite = 0 + * surviveParents=0 (no reduce) + * surviveOffspring=100% (no reduce) + * reduceFinal = Deterministic + * + * ESPlus : idem, except for + * surviveParents = 100% + * + * GGA : generational GA - idem ESComma except for + * offspringRate = 100% + * all reducers are unused + * + * SSGA(T/t) : Steady-State GA + * surviveParents = 1.0 - offspringRate + * reduceFinal = DetTour(T>1) ou StochTour(0.5 * ptReplace; + + // first, separate G3 and MGG + // maybe one day we have a common class - but is it really necessary??? + if (replacementParam.first == std::string("G3")) + { + // reduce the parents: by default, survive parents = -2 === 2 parents die + eoHowMany surviveParents = _parser.createParam(eoHowMany(-2,false), "surviveParents", "Nb of surviving parents (percentage or absolute)", '\0', "Evolution Engine / Replacement").value(); + // at the moment, this is the only argument + ptReplace = new eoG3Replacement(-surviveParents); // must receive nb of eliminated parets! + _state.storeFunctor(ptReplace); + } + else if (replacementParam.first == std::string("MGG")) + { + float t; + unsigned tSize; + // reduce the parents: by default, survive parents = -2 === 2 parents die + eoHowMany surviveParents = _parser.createParam(eoHowMany(-2,false), "surviveParents", "Nb of surviving parents (percentage or absolute)", '\0', "Evolution Engine / Replacement").value(); + // the tournament size + if (!replacementParam.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to MGG replacement, using 2" << std::endl; + tSize = 2; + // put back 2 in parameter for consistency (and status file) + replacementParam.second.push_back(std::string("2")); + } + else + { + t = atof(replacementParam.second[0].c_str()); + if (t>=2) + { // build the appropriate deafult value + tSize = unsigned(t); + } + else + { + throw std::runtime_error("Sorry, only deterministic tournament available at the moment"); + } + } + ptReplace = new eoMGGReplacement(-surviveParents, tSize); + _state.storeFunctor(ptReplace); + } + else { // until the end of what was the only loop/switch + + // the default deafult values + eoHowMany elite (0.0); + bool strongElitism (false); + eoHowMany surviveParents (0.0); + eoParamParamType reduceParentType ("Deterministic"); + eoHowMany surviveOffspring (1.0); + eoParamParamType reduceOffspringType ("Deterministic"); + eoParamParamType reduceFinalType ("Deterministic"); + + // depending on the value entered by the user, change some of the above + double t; + + // ---------- General + if (replacementParam.first == std::string("General")) + { + ; // defaults OK + } + // ---------- ESComma + else if (replacementParam.first == std::string("ESComma")) + { + ; // OK too + } + // ---------- ESPlus + else if (replacementParam.first == std::string("ESPlus")) + { + surviveParents = eoHowMany(1.0); + } + // ---------- Generational + else if (replacementParam.first == std::string("Generational")) + { + ; // OK too (we should check nb of offspring) + } + // ---------- EP + else if (replacementParam.first == std::string("EP")) + { + if (!replacementParam.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to EP replacement, using 6" << std::endl; + // put back 6 in parameter for consistency (and status file) + replacementParam.second.push_back(std::string("6")); + } + // by coincidence, the syntax for the EP reducer is the same than here: + reduceFinalType = replacementParam; + surviveParents = eoHowMany(1.0); + } + // ---------- SSGA + else if (replacementParam.first == std::string("SSGA")) + { + if (!replacementParam.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to SSGA replacement, using 2" << std::endl; + // put back 2 in parameter for consistency (and status file) + replacementParam.second.push_back(std::string("2")); + reduceParentType = eoParamParamType(std::string("DetTour(2)")); + } + else + { + t = atof(replacementParam.second[0].c_str()); + if (t>=2) + { // build the appropriate deafult value + reduceParentType = eoParamParamType(std::string("DetTour(") + replacementParam.second[0].c_str() + ")"); + } + else // check for [0.5,1] will be made in make_general_replacement + { // build the appropriate deafult value + reduceParentType = eoParamParamType(std::string("StochTour(") + replacementParam.second[0].c_str() + ")"); + } + } + // + surviveParents = eoHowMany(-1); + surviveOffspring = eoHowMany(1); + } + else // no replacement recognized + { + throw std::runtime_error("Invalid replacement type " + replacementParam.first); + } + + ptReplace = & make_general_replacement( + _parser, _state, elite, strongElitism, surviveParents, reduceParentType, surviveOffspring, reduceOffspringType, reduceFinalType); + + } // end of the ugly construct due to G3 and MGG - totaly heterogeneous at the moment + + + /////////////////////////////// + // the general breeder + /////////////////////////////// + eoGeneralBreeder *breed = + new eoGeneralBreeder(*select, _op, offspringRateParam.value()); + _state.storeFunctor(breed); + + /////////////////////////////// + // now the eoEasyEA + /////////////////////////////// + eoAlgo *algo = new eoEasyEA(_continue, _popeval, *breed, *ptReplace); + _state.storeFunctor(algo); + // that's it! + return *algo; +} + +/* + * This function builds the algorithm (i.e. selection and replacement) + * from existing continue (or checkpoint) and operators + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here +*/ +template +eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +{ + do_make_algo_scalar( _parser, _state, *(new eoPopLoopEval(_eval)), _continue, _op); +} + + + +#endif diff --git a/trunk/eo/src/do/make_algo_scalar.h b/trunk/eo/src/do/make_algo_scalar.h new file mode 100644 index 000000000..52df8f4f4 --- /dev/null +++ b/trunk/eo/src/do/make_algo_scalar.h @@ -0,0 +1,313 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_algo_scalar.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_algo_scalar_h +#define _make_algo_scalar_h + +#include // for eo_is_a_rate +// everything tha's needed for the algorithms - SCALAR fitness + +// Selection +// the eoSelectOne's +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Breeders +#include + +// Replacement +// #include +#include +#include +#include + +// distance +#include + +// Algorithm (only this one needed) +#include + + // also need the parser and param includes +#include +#include + + +/* + * This function builds the algorithm (i.e. selection and replacement) + * from existing continue (or checkpoint) and operators + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here + * + * @ingroup Builders +*/ +template +eoAlgo & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op, eoDistance * _dist = NULL) +{ + // the selection : help and comment depend on whether or not a distance is passed + std::string comment; + if (_dist == NULL) + comment = "Selection: DetTour(T), StochTour(t), Roulette, Ranking(p,e) or Sequential(ordered/unordered)"; + else + comment = "Selection: DetTour(T), StochTour(t), Roulette, Ranking(p,e), Sharing(sigma_share) or Sequential(ordered/unordered)"; + + eoValueParam& selectionParam = _parser.createParam(eoParamParamType("DetTour(2)"), "selection", comment, 'S', "Evolution Engine"); + + eoParamParamType & ppSelect = selectionParam.value(); // std::pair > + + eoSelectOne* select ; + if (ppSelect.first == std::string("DetTour")) + { + unsigned detSize; + + if (!ppSelect.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to DetTour, using 2" << std::endl; + detSize = 2; + // put back 2 in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("2")); + } + else // parameter passed by user as DetTour(T) + detSize = atoi(ppSelect.second[0].c_str()); + select = new eoDetTournamentSelect(detSize); + } + else if (ppSelect.first == std::string("Sharing")) + { + double nicheSize; + + if (!ppSelect.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to Sharing, using 0.5" << std::endl; + nicheSize = 0.5; + // put back 2 in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("0.5")); + } + else // parameter passed by user as DetTour(T) + nicheSize = atof(ppSelect.second[0].c_str()); + if (_dist == NULL) // no distance + throw std::runtime_error("You didn't specify a distance when calling make_algo_scalar and using sharing"); + select = new eoSharingSelect(nicheSize, *_dist); + } + else if (ppSelect.first == std::string("StochTour")) + { + double p; + if (!ppSelect.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to StochTour, using 1" << std::endl; + p = 1; + // put back p in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("1")); + } + else // parameter passed by user as DetTour(T) + p = atof(ppSelect.second[0].c_str()); + + select = new eoStochTournamentSelect(p); + } + else if (ppSelect.first == std::string("Ranking")) + { + double p,e; + if (ppSelect.second.size()==2) // 2 parameters: pressure and exponent + { + p = atof(ppSelect.second[0].c_str()); + e = atof(ppSelect.second[1].c_str()); + } + else if (ppSelect.second.size()==1) // 1 parameter: pressure + { + std::cerr << "WARNING, no exponent to Ranking, using 1" << std::endl; + e = 1; + ppSelect.second.push_back(std::string("1")); + p = atof(ppSelect.second[0].c_str()); + } + else // no parameters ... or garbage + { + std::cerr << "WARNING, no parameter to Ranking, using (2,1)" << std::endl; + p=2; + e=1; + // put back in parameter for consistency (and status file) + ppSelect.second.resize(2); // just in case + ppSelect.second[0] = (std::string("2")); + ppSelect.second[1] = (std::string("1")); + } + // check for authorized values + // pressure in (0,1] + if ( (p<=1) || (p>2) ) + { + std::cerr << "WARNING, selective pressure must be in (0,1] in Ranking, using 2\n"; + p=2; + ppSelect.second[0] = (std::string("2")); + } + // exponent >0 + if (e<=0) + { + std::cerr << "WARNING, exponent must be positive in Ranking, using 1\n"; + e=1; + ppSelect.second[1] = (std::string("1")); + } + // now we're OK + eoPerf2Worth & p2w = _state.storeFunctor( new eoRanking(p,e) ); + select = new eoRouletteWorthSelect(p2w); + } + else if (ppSelect.first == std::string("Sequential")) // one after the other + { + bool b; + if (ppSelect.second.size() == 0) // no argument -> default = ordered + { + b=true; + // put back in parameter for consistency (and status file) + ppSelect.second.push_back(std::string("ordered")); + } + else + b = !(ppSelect.second[0] == std::string("unordered")); + select = new eoSequentialSelect(b); + } + else if (ppSelect.first == std::string("Roulette")) // no argument (yet) + { + select = new eoProportionalSelect; + } + else if (ppSelect.first == std::string("Random")) // no argument + { + select = new eoRandomSelect; + } + else + { + std::string stmp = std::string("Invalid selection: ") + ppSelect.first; + throw std::runtime_error(stmp.c_str()); + } + + _state.storeFunctor(select); + + // the number of offspring + eoValueParam& offspringRateParam = _parser.createParam(eoHowMany(1.0), "nbOffspring", "Nb of offspring (percentage or absolute)", 'O', "Evolution Engine"); + + // the replacement + eoValueParam& replacementParam = _parser.createParam(eoParamParamType("Comma"), "replacement", "Replacement: Comma, Plus or EPTour(T), SSGAWorst, SSGADet(T), SSGAStoch(t)", 'R', "Evolution Engine"); + + eoParamParamType & ppReplace = replacementParam.value(); // std::pair > + + eoReplacement* replace ; + if (ppReplace.first == std::string("Comma")) // Comma == generational + { + replace = new eoCommaReplacement; + } + else if (ppReplace.first == std::string("Plus")) + { + replace = new eoPlusReplacement; + } + else if (ppReplace.first == std::string("EPTour")) + { + unsigned detSize; + + if (!ppReplace.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to EPTour, using 6" << std::endl; + detSize = 6; + // put back in parameter for consistency (and status file) + ppReplace.second.push_back(std::string("6")); + } + else // parameter passed by user as EPTour(T) + detSize = atoi(ppSelect.second[0].c_str()); + + replace = new eoEPReplacement(detSize); + } + else if (ppReplace.first == std::string("SSGAWorst")) + { + replace = new eoSSGAWorseReplacement; + } + else if (ppReplace.first == std::string("SSGADet")) + { + unsigned detSize; + + if (!ppReplace.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to SSGADet, using 2" << std::endl; + detSize = 2; + // put back in parameter for consistency (and status file) + ppReplace.second.push_back(std::string("2")); + } + else // parameter passed by user as SSGADet(T) + detSize = atoi(ppSelect.second[0].c_str()); + + replace = new eoSSGADetTournamentReplacement(detSize); + } + else if (ppReplace.first == std::string("SSGAStoch")) + { + double p; + if (!ppReplace.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to SSGAStoch, using 1" << std::endl; + p = 1; + // put back in parameter for consistency (and status file) + ppReplace.second.push_back(std::string("1")); + } + else // parameter passed by user as SSGADet(T) + p = atof(ppSelect.second[0].c_str()); + + replace = new eoSSGAStochTournamentReplacement(p); + } + else + { + std::string stmp = std::string("Invalid replacement: ") + ppReplace.first; + throw std::runtime_error(stmp.c_str()); + } + + _state.storeFunctor(replace); + + // adding weak elitism + eoValueParam& weakElitismParam = _parser.createParam(false, "weakElitism", "Old best parent replaces new worst offspring *if necessary*", 'w', "Evolution Engine"); + if (weakElitismParam.value()) + { + eoReplacement *replaceTmp = replace; + replace = new eoWeakElitistReplacement(*replaceTmp); + _state.storeFunctor(replace); + } + + // the general breeder + eoGeneralBreeder *breed = + new eoGeneralBreeder(*select, _op, offspringRateParam.value()); + _state.storeFunctor(breed); + + // now the eoEasyEA + eoAlgo *algo = new eoEasyEA(_continue, _eval, *breed, *replace); + _state.storeFunctor(algo); + // that's it! + return *algo; +} +/** @example t-eoGA.cpp + */ + +#endif diff --git a/trunk/eo/src/do/make_checkpoint.h b/trunk/eo/src/do/make_checkpoint.h new file mode 100644 index 000000000..8e5295115 --- /dev/null +++ b/trunk/eo/src/do/make_checkpoint.h @@ -0,0 +1,353 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_checkpoint.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk +*/ +//----------------------------------------------------------------------------- + +#ifndef _make_checkpoint_h +#define _make_checkpoint_h + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + +#include +#include // for minimizing_fitness() +#include +#include +#include + +// at the moment, in utils/make_help.cpp +// this should become some eoUtils.cpp with corresponding eoUtils.h +bool testDirRes(std::string _dirName, bool _erase); +/////////////////// The checkpoint and other I/O ////////////// + +/** + * + * CHANGE (March 2008): now receiving an eoValueParam instead of an eoEvalFuncCounter. This function is just interested + * in the value of the parameter calculated on the evaluation function, not in the actual function itself!! + * + * @ingroup Builders + */ +template +eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValueParam& _eval, eoContinue& _continue) +{ + // first, create a checkpoint from the eoContinue + eoCheckPoint *checkpoint = new eoCheckPoint(_continue); + + _state.storeFunctor(checkpoint); + + //////////////////// + // Signal monitoring + //////////////////// + +#ifndef _MSC_VER + // the CtrlC monitoring interception + eoSignal *mon_ctrlCCont; + eoValueParam& mon_ctrlCParam = _parser.createParam(false, "monitor-with-CtrlC", "Monitor current generation upon Ctrl C",0, "Stopping criterion"); + if (mon_ctrlCParam.value()) + { + mon_ctrlCCont = new eoSignal; + // store + _state.storeFunctor(mon_ctrlCCont); + // add to checkpoint + checkpoint->add(*mon_ctrlCCont); + } +#endif + + /////////////////// + // Counters + ////////////////// + + // is nb Eval to be used as counter? + eoValueParam& useEvalParam = _parser.createParam(true, "useEval", "Use nb of eval. as counter (vs nb of gen.)", '\0', "Output"); + eoValueParam& useTimeParam = _parser.createParam(true, "useTime", "Display time (s) every generation", '\0', "Output"); + // if we want the time, we need an eoTimeCounter + eoTimeCounter * tCounter = NULL; + + // Create anyway a generation-counter + // Recent change (03/2002): it is now an eoIncrementorParam, both + // a parameter AND updater so you can store it into the eoState + eoIncrementorParam *generationCounter = new eoIncrementorParam("Gen."); + + // store it in the state + _state.storeFunctor(generationCounter); + + // And add it to the checkpoint, + checkpoint->add(*generationCounter); + + // dir for DISK output + eoValueParam& dirNameParam = _parser.createParam(std::string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk"); + + // shoudl we empty it if exists + eoValueParam& eraseParam = _parser.createParam(true, "eraseDir", "erase files in dirName if any", '\0', "Output - Disk"); + + bool dirOK = false; // not tested yet + + ///////////////////////////////////////// + // now some statistics on the population: + ///////////////////////////////////////// + + /** + * existing stats as of today, April 10. 2001 + * + * eoBestFitnessStat : best value in pop - type EOT::Fitness + * eoAverageStat : average value in pop - type EOT::Fitness + * eoSecondMomentStat: average + stdev - type std::pair + * eoSortedPopStat : whole population - type std::string (!!) + * eoScalarFitnessStat: the fitnesses - type std::vector + */ + + // Best fitness in population + //--------------------------- + eoValueParam& printBestParam = _parser.createParam(true, "printBestStat", "Print Best/avg/stdev every gen.", '\0', "Output"); + eoValueParam& plotBestParam = _parser.createParam(false, "plotBestStat", "Plot Best/avg Stat", '\0', "Output - Graphical"); + eoValueParam& fileBestParam = _parser.createParam(false, "fileBestStat", "Output bes/avg/std to file", '\0', "Output - Disk"); + + eoBestFitnessStat *bestStat = NULL; + if ( printBestParam.value() || plotBestParam.value() || fileBestParam.value() ) + // we need the bestStat for at least one of the 3 above + { + bestStat = new eoBestFitnessStat; + // store it + _state.storeFunctor(bestStat); + // add it to the checkpoint + checkpoint->add(*bestStat); + // check if monitoring with signal + if ( mon_ctrlCParam.value() ) + mon_ctrlCCont->add(*bestStat); + } + + // Average fitness alone + //---------------------- + eoAverageStat *averageStat = NULL; // do we need averageStat? + if ( printBestParam.value() || plotBestParam.value() || fileBestParam.value() ) // we need it for gnuplot output + { + averageStat = new eoAverageStat; + // store it + _state.storeFunctor(averageStat); + // add it to the checkpoint + checkpoint->add(*averageStat); + // check if monitoring with signal + if ( mon_ctrlCParam.value() ) + mon_ctrlCCont->add(*averageStat); + } + + // Second moment stats: average and stdev + //--------------------------------------- + eoSecondMomentStats *secondStat = NULL; + if ( printBestParam.value() || fileBestParam.value() ) // we need it for screen output or file output + { + secondStat = new eoSecondMomentStats; + // store it + _state.storeFunctor(secondStat); + // add it to the checkpoint + checkpoint->add(*secondStat); + // check if monitoring with signal + if ( mon_ctrlCParam.value() ) + mon_ctrlCCont->add(*secondStat); + } + + // Dump of the whole population + //----------------------------- + eoSortedPopStat *popStat = NULL; + eoValueParam& printPopParam = _parser.createParam(false, "printPop", "Print sorted pop. every gen.", '\0', "Output"); + + if ( printPopParam.value() ) // we do want pop dump + { + popStat = new eoSortedPopStat; + // store it + _state.storeFunctor(popStat); + // add it to the checkpoint + checkpoint->add(*popStat); + // check if monitoring with signal + if ( mon_ctrlCParam.value() ) + mon_ctrlCCont->add(*popStat); + } + + // do we wnat some histogram of fitnesses snpashots? + eoValueParam plotHistogramParam = _parser.createParam(false, "plotHisto", "Plot histogram of fitnesses", '\0', "Output - Graphical"); + + /////////////// + // The monitors + /////////////// + + // do we want an eoStdoutMonitor? + bool needStdoutMonitor = printBestParam.value() + || printPopParam.value() ; + + // The Stdout monitor will print parameters to the screen ... + if ( needStdoutMonitor ) + { + eoStdoutMonitor *monitor = new eoStdoutMonitor(false); + _state.storeFunctor(monitor); + + // when called by the checkpoint (i.e. at every generation) + // check if monitoring with signal + if ( ! mon_ctrlCParam.value() ) + checkpoint->add(*monitor); + else + mon_ctrlCCont->add(*monitor); + + // the monitor will output a series of parameters: add them + monitor->add(*generationCounter); + + if (useEvalParam.value()) // we want nb of evaluations + monitor->add(_eval); + if (useTimeParam.value()) // we want time + { + tCounter = new eoTimeCounter; + _state.storeFunctor(tCounter); + // check if monitoring with signal + if ( ! mon_ctrlCParam.value() ) + checkpoint->add(*tCounter); + else + mon_ctrlCCont->add(*tCounter); + monitor->add(*tCounter); + } + + if (printBestParam.value()) + { + monitor->add(*bestStat); + monitor->add(*secondStat); + } + + if ( printPopParam.value()) + monitor->add(*popStat); + } + + // first handle the dir test - if we need at least one file + if ( ( fileBestParam.value() || plotBestParam.value() || + plotHistogramParam.value() ) + && !dirOK ) // just in case we add something before + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + + if (fileBestParam.value()) // A file monitor for best & secondMoment + { +#ifdef _MSVC + std::string stmp = dirNameParam.value() + "\best.xg"; +#else + std::string stmp = dirNameParam.value() + "/best.xg"; +#endif + eoFileMonitor *fileMonitor = new eoFileMonitor(stmp); + // save and give to checkpoint + _state.storeFunctor(fileMonitor); + checkpoint->add(*fileMonitor); + // and feed with some statistics + fileMonitor->add(*generationCounter); + fileMonitor->add(_eval); + if (tCounter) // we want the time as well + { + // std::cout << "On met timecounter\n"; + fileMonitor->add(*tCounter); + } + fileMonitor->add(*bestStat); + fileMonitor->add(*secondStat); + } + +#if defined(HAVE_GNUPLOT) + if (plotBestParam.value()) // an eoGnuplot1DMonitor for best & average + { + std::string stmp = dirNameParam.value() + "/gnu_best.xg"; + eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor(stmp,minimizing_fitness()); + // save and give to checkpoint + _state.storeFunctor(gnuMonitor); + checkpoint->add(*gnuMonitor); + // and feed with some statistics + if (useEvalParam.value()) // do we want eval as X coordinate + gnuMonitor->add(_eval); + else if (tCounter) // or time? + gnuMonitor->add(*tCounter); + else // default: generation + gnuMonitor->add(*generationCounter); + gnuMonitor->add(*bestStat); + gnuMonitor->add(*averageStat); + } + + // historgram? + if (plotHistogramParam.value()) // want to see how the fitness is spread? + { + eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; + _state.storeFunctor(fitStat); + checkpoint->add(*fitStat); + // a gnuplot-based monitor for snapshots: needs a dir name + eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirNameParam.value()); + _state.storeFunctor(fitSnapshot); + // add any stat that is a std::vector to it + fitSnapshot->add(*fitStat); + // and of course add it to the checkpoint + checkpoint->add(*fitSnapshot); + } + +#endif + + ////////////////////////////////// + // State savers + ////////////////////////////// + + // feed the state to state savers + // save state every N generation + eoValueParam& saveFrequencyParam = _parser.createParam(unsigned(0), "saveFrequency", "Save every F generation (0 = only final state, absent = never)", '\0', "Persistence" ); + + if (_parser.isItThere(saveFrequencyParam)) + { + // first make sure dirName is OK + if (! dirOK ) + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + + unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); +#ifdef _MSVC + std::string stmp = dirNameParam.value() + "\generations"; +#else + std::string stmp = dirNameParam.value() + "/generations"; +#endif + eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); + _state.storeFunctor(stateSaver1); + checkpoint->add(*stateSaver1); + } + + // save state every T seconds + eoValueParam& saveTimeIntervalParam = _parser.createParam(unsigned(0), "saveTimeInterval", "Save every T seconds (0 or absent = never)", '\0',"Persistence" ); + if (_parser.isItThere(saveTimeIntervalParam) && saveTimeIntervalParam.value()>0) + { + // first make sure dirName is OK + if (! dirOK ) + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + +#ifdef _MSVC + std::string stmp = dirNameParam.value() + "\time"; +#else + std::string stmp = dirNameParam.value() + "/time"; +#endif + eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); + _state.storeFunctor(stateSaver2); + checkpoint->add(*stateSaver2); + } + + // and that's it for the (control and) output + return *checkpoint; +} + +#endif diff --git a/trunk/eo/src/do/make_checkpoint_FDC.h b/trunk/eo/src/do/make_checkpoint_FDC.h new file mode 100644 index 000000000..33c7f7206 --- /dev/null +++ b/trunk/eo/src/do/make_checkpoint_FDC.h @@ -0,0 +1,303 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_checkpoint.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_checkpoint_h +#define _make_checkpoint_h + +#include + +#include +#include // for minimizing_fitness() +#include +#include +#include + +// at the moment, in utils/make_help.cpp +// this should become some eoUtils.cpp with corresponding eoUtils.h +bool testDirRes(std::string _dirName, bool _erase); +/////////////////// The checkpoint and other I/O ////////////// + + +/** + * @ingroup Builders + */ +template +eoCheckPoint& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +{ + // first, create a checkpoint from the eoContinue + eoCheckPoint *checkpoint = new eoCheckPoint(_continue); + _state.storeFunctor(checkpoint); + + /////////////////// + // Counters + ////////////////// + // is nb Eval to be used as counter? + eoValueParam& useEvalParam = _parser.createParam(true, "useEval", "Use nb of eval. as counter (vs nb of gen.)", '\0', "Output"); + + // Create anyway a generation-counter parameter + eoValueParam *generationCounter = new eoValueParam(0, "Gen."); + // Create an incrementor (sub-class of eoUpdater). + eoIncrementor* increment = new eoIncrementor(generationCounter->value()); + // Add it to the checkpoint, + checkpoint->add(*increment); + // and store it in the state + _state.storeFunctor(increment); + + // dir for DISK output + eoValueParam& dirNameParam = _parser.createParam(std::string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk"); + // shoudl we empty it if exists + eoValueParam& eraseParam = _parser.createParam(false, "eraseDir", "erase files in dirName if any", '\0', "Output - Disk"); + bool dirOK = false; // not tested yet + + ///////////////////////////////////////// + // now some statistics on the population: + ///////////////////////////////////////// + /** + * existing stats as of today, April 10. 2001 + * + * eoBestFitnessStat : best value in pop - type EOT::Fitness + * eoAverageStat : average value in pop - type EOT::Fitness + * eoSecondMomentStat: average + stdev - type std::pair + * eoSortedPopStat : whole population - type std::string (!!) + * eoScalarFitnessStat: the fitnesses - type std::vector + * eoDFCSTat : FDC wrt best in pop or absolute best - type double + * requires an eoDistance. See eoFDCStat.h + * also computes all elements for the FDC scatter plot + */ + + // Best fitness in population + //--------------------------- + eoValueParam& printBestParam = _parser.createParam(true, "printBestStat", "Print Best/avg/stdev every gen.", '\0', "Output"); + eoValueParam& plotBestParam = _parser.createParam(false, "plotBestStat", "Plot Best/avg Stat", '\0', "Output - Graphical"); + eoValueParam& fileBestParam = _parser.createParam(false, "fileBestStat", "Output bes/avg/std to file", '\0', "Output - Disk"); + + eoBestFitnessStat *bestStat = NULL; + if ( printBestParam.value() || plotBestParam.value() || fileBestParam.value() ) + // we need the bestStat for at least one of the 3 above + { + bestStat = new eoBestFitnessStat; + // store it + _state.storeFunctor(bestStat); + // add it to the checkpoint + checkpoint->add(*bestStat); + } + + // Average fitness alone + //---------------------- + eoAverageStat *averageStat = NULL; // do we need averageStat? + if ( plotBestParam.value() ) // we need it for gnuplot output + { + averageStat = new eoAverageStat; + // store it + _state.storeFunctor(averageStat); + // add it to the checkpoint + checkpoint->add(*averageStat); + } + + // Second moment stats: average and stdev + //--------------------------------------- + eoSecondMomentStats *secondStat = NULL; + if ( printBestParam.value() ) // we need it for sreen output + { + secondStat = new eoSecondMomentStats; + // store it + _state.storeFunctor(secondStat); + // add it to the checkpoint + checkpoint->add(*secondStat); + } + + + // Dump of the whole population + //----------------------------- + eoSortedPopStat *popStat = NULL; + eoValueParam& printPopParam = _parser.createParam(false, "printPop", "Print sorted pop. every gen.", '\0', "Output"); + if ( printPopParam.value() ) // we do want pop dump + { + popStat = new eoSortedPopStat("Dump of whole population"); + // store it + _state.storeFunctor(popStat); + // add it to the checkpoint + checkpoint->add(*popStat); + } + + + // the Fitness Distance Correlation + //--------------------------------- + eoValueParam& printFDCParam = _parser.createParam(true, "printFDC", "Print FDC coeff. every gen.", '\0', "Output"); + eoValueParam& plotFDCParam = _parser.createParam(false, "plotFDCStat", "Plot FDC scatter plot", '\0', "Output - Graphical"); + + eoFDCStat *fdcStat = NULL; + if ( printFDCParam.value() || plotFDCParam.value() ) // we need FDCStat + { + // need first an object to compute the distances - here Hamming dist. + eoQuadDistance *dist = new eoQuadDistance; + _state.storeFunctor(dist); + fdcStat = new eoFDCStat(*dist); + // storeFunctor it + _state.storeFunctor(fdcStat); + // add it to the checkpoint + checkpoint->add(*fdcStat); + } + + // do we wnat some histogram of fitnesses snpashots? + eoValueParam plotHistogramParam = _parser.createParam(false, "plotHisto", "Plot histogram of fitnesses", '\0', "Output - Graphical"); + + /////////////// + // The monitors + /////////////// + // do we want an eoStdoutMonitor? + bool needStdoutMonitor = printBestParam.value() || printFDCParam.value() + || printPopParam.value() ; + + // The Stdout monitor will print parameters to the screen ... + if ( needStdoutMonitor ) + { + eoStdoutMonitor *monitor = new eoStdoutMonitor(false); + _state.storeFunctor(monitor); + + // when called by the checkpoint (i.e. at every generation) + checkpoint->add(*monitor); + + // the monitor will output a series of parameters: add them + monitor->add(*generationCounter); + if (useEvalParam.value()) // we want nb of evaluations + monitor->add(_eval); + if (printBestParam.value()) + { + monitor->add(*bestStat); + monitor->add(*secondStat); + } + if (printFDCParam.value()) + monitor->add(*fdcStat); + if ( printPopParam.value()) + monitor->add(*popStat); + } + + // first handle the dir test - if we need at least one file + if ( ( fileBestParam.value() || plotBestParam.value() || + plotFDCParam.value() || plotHistogramParam.value() ) + && !dirOK ) // just in case we add something before + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + + if (fileBestParam.value()) // A file monitor for best & secondMoment + { + std::string stmp = dirNameParam.value() + "/best.xg"; + eoFileMonitor *fileMonitor = new eoFileMonitor(stmp); + // save and give to checkpoint + _state.storeFunctor(fileMonitor); + checkpoint->add(*fileMonitor); + // and feed with some statistics + fileMonitor->add(*generationCounter); + fileMonitor->add(_eval); + fileMonitor->add(*bestStat); + fileMonitor->add(*secondStat); + } + + if (plotBestParam.value()) // an eoGnuplot1DMonitor for best & average + { + std::string stmp = dirNameParam.value() + "_gnu_best.xg"; + eoGnuplot1DMonitor *gnuMonitor = new eoGnuplot1DMonitor(stmp,minimizing_fitness()); + // save and give to checkpoint + _state.storeFunctor(gnuMonitor); + checkpoint->add(*gnuMonitor); + // and feed with some statistics + if (useEvalParam.value()) + gnuMonitor->add(_eval); + else + gnuMonitor->add(*generationCounter); + gnuMonitor->add(*bestStat); + gnuMonitor->add(*averageStat); + } + + if (plotFDCParam.value()) // a specific plot monitor for FDC + { + // first into a file (it adds everything ti itself + eoFDCFileSnapshot *fdcFileSnapshot = new eoFDCFileSnapshot(*fdcStat, dirNameParam.value()); + _state.storeFunctor(fdcFileSnapshot); + // then to a Gnuplot monitor + eoGnuplot1DSnapshot *fdcGnuplot = new eoGnuplot1DSnapshot(*fdcFileSnapshot); + _state.storeFunctor(fdcGnuplot); + + // and of course add them to the checkPoint + checkpoint->add(*fdcFileSnapshot); + checkpoint->add(*fdcGnuplot); + } + + // historgram? + if (plotHistogramParam.value()) // want to see how the fitness is spread? + { + eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; + _state.storeFunctor(fitStat); + checkpoint->add(*fitStat); + // a gnuplot-based monitor for snapshots: needs a dir name + eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirNameParam.value()); + _state.storeFunctor(fitSnapshot); + // add any stat that is a std::vector to it + fitSnapshot->add(*fitStat); + // and of course add it to the checkpoint + checkpoint->add(*fitSnapshot); + } + + ////////////////////////////////// + // State savers + ////////////////////////////// + + // feed the state to state savers + // save state every N generation + eoValueParam& saveFrequencyParam = _parser.createParam(unsigned(0), "saveFrequency", "Save every F generation (0 = only final state, absent = never)", '\0', "Persistence" ); + + if (_parser.isItThere(saveFrequencyParam)) + { + // first make sure dirName is OK + if (! dirOK ) + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + + unsigned freq = (saveFrequencyParam.value()>0 ? saveFrequencyParam.value() : UINT_MAX ); + std::string stmp = dirNameParam.value() + "/generations"; + eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); + _state.storeFunctor(stateSaver1); + checkpoint->add(*stateSaver1); + } + + // save state every T seconds + eoValueParam& saveTimeIntervalParam = _parser.createParam(unsigned(0), "saveTimeInterval", "Save every T seconds (0 or absent = never)", '\0',"Persistence" ); + if (_parser.isItThere(saveTimeIntervalParam) && saveTimeIntervalParam.value()>0) + { + // first make sure dirName is OK + if (! dirOK ) + dirOK = testDirRes(dirNameParam.value(), eraseParam.value()); // TRUE + + std::string stmp = dirNameParam.value() + "/time"; + eoTimedStateSaver *stateSaver2 = new eoTimedStateSaver(saveTimeIntervalParam.value(), _state, stmp); + _state.storeFunctor(stateSaver2); + checkpoint->add(*stateSaver2); + } + + // and that's it for the (control and) output + return *checkpoint; +} + +#endif diff --git a/trunk/eo/src/do/make_checkpoint_assembled.h b/trunk/eo/src/do/make_checkpoint_assembled.h new file mode 100644 index 000000000..26463fab3 --- /dev/null +++ b/trunk/eo/src/do/make_checkpoint_assembled.h @@ -0,0 +1,212 @@ + /* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- */ + +//----------------------------------------------------------------------------- +// make_checkpoint_assembled.h +// Marc Wintermantel & Oliver Koenig +// IMES-ST@ETHZ.CH +// March 2003 + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- + +#ifndef _make_checkpoint_assembled_h +#define _make_checkpoint_assembled_h + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +#include +#include +#include +#include +#include + +// at the moment, in utils/make_help.cpp +// this should become some eoUtils.cpp with corresponding eoUtils.h +bool testDirRes(std::string _dirName, bool _erase); +/////////////////// The checkpoint and other I/O ////////////// + +/** Of course, Fitness needs to be an eoScalarFitnessAssembled!!! + * + * + * @ingroup Builders + * */ +template +eoCheckPoint& do_make_checkpoint_assembled(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +{ + + // SOME PARSER PARAMETERS + // ---------------------- + std::string dirName = _parser.getORcreateParam(std::string("Res"), "resDir", + "Directory to store DISK outputs", + '\0', "Output").value(); + bool erase = _parser.getORcreateParam(true, "eraseDir", + "Erase files in dirName if any", + '\0', "Output").value(); + bool gnuplots = _parser.getORcreateParam(true, "plots", + "Plot stuff using GnuPlot", + '\0', "Output").value(); + bool printFile = _parser.getORcreateParam(true, "printFile", + "Print statistics file", + '\0', "Output").value(); + + eoValueParam& saveFrequencyParam + = _parser.getORcreateParam(unsigned(0), "saveFrequency", + "Save every F generation (0 = only final state, absent = never)", + '\0', "Persistence" ); + + testDirRes(dirName, erase); // TRUE + + // CREATE CHECKPOINT FROM eoContinue + // --------------------------------- + eoCheckPoint *checkpoint = new eoCheckPoint(_continue); + _state.storeFunctor(checkpoint); + + // GENERATIONS + // ----------- + eoIncrementorParam *generationCounter = new eoIncrementorParam("Gen."); + _state.storeFunctor(generationCounter); + checkpoint->add(*generationCounter); + + // TIME + // ---- + eoTimeCounter * tCounter = NULL; + tCounter = new eoTimeCounter; + _state.storeFunctor(tCounter); + checkpoint->add(*tCounter); + + // ACCESS DESCRIPTIONS OF TERMS OF FITNESS CLASS + // --------------------------------------------- + // define a temporary fitness instance + typedef typename EOT::Fitness Fit; + Fit fit; + std::vector fitness_descriptions = fit.getDescriptionVector(); + unsigned nTerms = fitness_descriptions.size(); + + // STAT VALUES OF A POPULATION + // --------------------------- + + // average vals + std::vector* > avgvals( nTerms ); + for (unsigned i=0; i < nTerms; ++i){ + std::string descr = "Avg. of " + fitness_descriptions[i]; + avgvals[i] = new eoAssembledFitnessAverageStat(i, descr); + _state.storeFunctor( avgvals[i] ); + checkpoint->add( *avgvals[i] ); + } + + // best vals + std::vector* > bestvals( nTerms ); + for (unsigned j=0; j < nTerms; ++j){ + std::string descr = fitness_descriptions[j] + " of best ind."; + bestvals[j] = new eoAssembledFitnessBestStat(j, descr); + _state.storeFunctor( bestvals[j] ); + checkpoint->add( *bestvals[j] ); + } + + // STDOUT + // ------ + eoStdoutMonitor *monitor = new eoStdoutMonitor(false); + _state.storeFunctor(monitor); + checkpoint->add(*monitor); + monitor->add(*generationCounter); + monitor->add(_eval); + monitor->add(*tCounter); + + // Add best fitness + monitor->add( *bestvals[0] ); + + // Add all average vals + for (unsigned l=0; l < nTerms; ++l) + monitor->add( *avgvals[l] ); + + // GNUPLOT + // ------- + if (gnuplots ){ + std::string stmp; + + // Histogramm of the different fitness vals + eoScalarFitnessStat *fitStat = new eoScalarFitnessStat; + _state.storeFunctor(fitStat); + checkpoint->add(*fitStat); +#ifdef HAVE_GNUPLOT + // a gnuplot-based monitor for snapshots: needs a dir name + eoGnuplot1DSnapshot *fitSnapshot = new eoGnuplot1DSnapshot(dirName); + _state.storeFunctor(fitSnapshot); + // add any stat that is a vector to it + fitSnapshot->add(*fitStat); + // and of course add it to the checkpoint + checkpoint->add(*fitSnapshot); + + std::vector gnumonitors(nTerms, NULL ); + for (unsigned k=0; k < nTerms; ++k){ + stmp = dirName + "/gnuplot_" + fitness_descriptions[k] + ".xg"; + gnumonitors[k] = new eoGnuplot1DMonitor(stmp,true); + _state.storeFunctor(gnumonitors[k]); + checkpoint->add(*gnumonitors[k]); + gnumonitors[k]->add(*generationCounter); + gnumonitors[k]->add(*bestvals[k]); + gnumonitors[k]->add(*avgvals[k]); + } +#endif + } + + // WRITE STUFF TO FILE + // ------------------- + if( printFile ){ + std::string stmp2 = dirName + "/eoStatistics.sav"; + eoFileMonitor *fileMonitor = new eoFileMonitor(stmp2); + _state.storeFunctor(fileMonitor); + checkpoint->add(*fileMonitor); + fileMonitor->add(*generationCounter); + fileMonitor->add(_eval); + fileMonitor->add(*tCounter); + + for (unsigned i=0; i < nTerms; ++i){ + fileMonitor->add(*bestvals[i]); + fileMonitor->add(*avgvals[i]); + } + + } + + // STATE SAVER + // ----------- + // feed the state to state savers + + if (_parser.isItThere(saveFrequencyParam)) { + + unsigned freq = (saveFrequencyParam.value() > 0 ? saveFrequencyParam.value() : UINT_MAX ); + std::string stmp = dirName + "/generations"; + eoCountedStateSaver *stateSaver1 = new eoCountedStateSaver(freq, _state, stmp); + _state.storeFunctor(stateSaver1); + checkpoint->add(*stateSaver1); + } + + // and that's it for the (control and) output + return *checkpoint; +} + +#endif diff --git a/trunk/eo/src/do/make_continue.h b/trunk/eo/src/do/make_continue.h new file mode 100644 index 000000000..27b4e9450 --- /dev/null +++ b/trunk/eo/src/do/make_continue.h @@ -0,0 +1,167 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_continue.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_continue_h +#define _make_continue_h + +/* +Contains the templatized version of parser-based choice of stopping criterion +It can then be instantiated, and compiled on its own for a given EOType +(see e.g. in dir ga, ga.cpp) +*/ + +// Continuators - all include eoContinue.h +#include +#include +#include +#include +#include +#ifndef _MSC_VER +#include // CtrlC handling (using 2 global variables!) +#endif + + // also need the parser and param includes +#include +#include + + +/////////////////// the stopping criterion //////////////// + /** + * @ingroup Builders + */ +template +eoCombinedContinue * make_combinedContinue(eoCombinedContinue *_combined, eoContinue *_cont) +{ + if (_combined) // already exists + _combined->add(*_cont); + else + _combined = new eoCombinedContinue(*_cont); + return _combined; +} + +/** + * + * @ingroup Builders + */ +template +eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) +{ + //////////// Stopping criterion /////////////////// + // the combined continue - to be filled + eoCombinedContinue *continuator = NULL; + + // for each possible criterion, check if wanted, otherwise do nothing + + // First the eoGenContinue - need a default value so you can run blind + // but we also need to be able to avoid it <--> 0 + eoValueParam& maxGenParam = _parser.getORcreateParam(unsigned(100), "maxGen", "Maximum number of generations () = none)",'G',"Stopping criterion"); + + if (maxGenParam.value()) // positive: -> define and store + { + eoGenContinue *genCont = new eoGenContinue(maxGenParam.value()); + _state.storeFunctor(genCont); + // and "add" to combined + continuator = make_combinedContinue(continuator, genCont); + } + + // the steadyGen continue - only if user imput + eoValueParam& steadyGenParam = _parser.createParam(unsigned(100), "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); + eoValueParam& minGenParam = _parser.createParam(unsigned(0), "minGen", "Minimum number of generations",'g', "Stopping criterion"); + if (_parser.isItThere(steadyGenParam)) + { + eoSteadyFitContinue *steadyCont = new eoSteadyFitContinue + (minGenParam.value(), steadyGenParam.value()); + // store + _state.storeFunctor(steadyCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, steadyCont); + } + + // Same thing with Eval - but here default value is 0 + eoValueParam& maxEvalParam + = _parser.getORcreateParam((unsigned long)0, "maxEval", + "Maximum number of evaluations (0 = none)", + 'E', "Stopping criterion"); + + if (maxEvalParam.value()) // positive: -> define and store + { + eoEvalContinue *evalCont = new eoEvalContinue(_eval, maxEvalParam.value()); + _state.storeFunctor(evalCont); + // and "add" to combined + continuator = make_combinedContinue(continuator, evalCont); + } + /* + // the steadyEval continue - only if user imput + eoValueParam& steadyGenParam = _parser.createParam(unsigned(100), "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); + eoValueParam& minGenParam = _parser.createParam(unsigned(0), "minGen", "Minimum number of generations",'g', "Stopping criterion"); + if (_parser.isItThere(steadyGenParam)) + { + eoSteadyGenContinue *steadyCont = new eoSteadyFitContinue + (minGenParam.value(), steadyGenParam.value()); + // store + _state.storeFunctor(steadyCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, steadyCont); + } + */ + // the target fitness + eoFitContinue *fitCont; + eoValueParam& targetFitnessParam = _parser.createParam(double(0.0), "targetFitness", "Stop when fitness reaches",'T', "Stopping criterion"); + if (_parser.isItThere(targetFitnessParam)) + { + fitCont = new eoFitContinue + (targetFitnessParam.value()); + // store + _state.storeFunctor(fitCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, fitCont); + } + +#ifndef _MSC_VER + // the CtrlC interception (Linux only I'm afraid) + eoCtrlCContinue *ctrlCCont; + eoValueParam& ctrlCParam = _parser.createParam(false, "CtrlC", "Terminate current generation upon Ctrl C",'C', "Stopping criterion"); + if (ctrlCParam.value()) + { + ctrlCCont = new eoCtrlCContinue; + // store + _state.storeFunctor(ctrlCCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, ctrlCCont); + } +#endif + + // now check that there is at least one! + if (!continuator) + throw std::runtime_error("You MUST provide a stopping criterion"); + // OK, it's there: store in the eoState + _state.storeFunctor(continuator); + + // and return + return *continuator; +} + +#endif diff --git a/trunk/eo/src/do/make_general_replacement.h b/trunk/eo/src/do/make_general_replacement.h new file mode 100644 index 000000000..1d42345c8 --- /dev/null +++ b/trunk/eo/src/do/make_general_replacement.h @@ -0,0 +1,184 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_general_replacement.h +// (c) Marc Schoenauer and Pierre Collet, 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_general_replacement_h +#define _make_general_replacement_h + +#include // for eo_is_a_rate + +// Replacement +#include + +// also need the parser and param includes +#include +#include + + +/** a helper function that decodes a parameter read by the parser into an + * eoReduce & (allocates the pointer and stores it into an eoState) + * + * @ingroup Builders + */ +template +eoReduce & decode_reduce(eoParamParamType & _ppReduce, eoState & _state) +{ + unsigned int detSize; + eoReduce * ptReduce; + + // ---------- Deterministic + if ( (_ppReduce.first == std::string("Deterministic")) || + (_ppReduce.first == std::string("Sequential")) + ) + { + ptReduce = new eoTruncate; + } + // ---------- EP + else if (_ppReduce.first == std::string("EP")) + { + if (!_ppReduce.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to EP, using 6" << std::endl; + detSize = 6; + // put back 6 in parameter for consistency (and status file) + _ppReduce.second.push_back(std::string("6")); + } + else // parameter passed by user as EP(T) + detSize = atoi(_ppReduce.second[0].c_str()); + ptReduce = new eoEPReduce(detSize); + } + // ---------- DetTour + else if (_ppReduce.first == std::string("DetTour")) + { + if (!_ppReduce.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to DetTour, using 2" << std::endl; + detSize = 2; + // put back 2 in parameter for consistency (and status file) + _ppReduce.second.push_back(std::string("2")); + } + else // parameter passed by user as DetTour(T) + detSize = atoi(_ppReduce.second[0].c_str()); + ptReduce = new eoDetTournamentTruncate(detSize); + } + else if (_ppReduce.first == std::string("StochTour")) + { + double p; + if (!_ppReduce.second.size()) // no parameter added + { + std::cerr << "WARNING, no parameter passed to StochTour, using 1" << std::endl; + p = 1; + // put back p in parameter for consistency (and status file) + _ppReduce.second.push_back(std::string("1")); + } + else // parameter passed by user as DetTour(T) + { + p = atof(_ppReduce.second[0].c_str()); + if ( (p<=0.5) || (p>1) ) + throw std::runtime_error("Stochastic tournament size should be in [0.5,1]"); + } + + ptReduce = new eoStochTournamentTruncate(p); + } + else if ( (_ppReduce.first == std::string("Uniform")) || + (_ppReduce.first == std::string("Random")) + ) + { + ptReduce = new eoRandomReduce; + } + else // no known reduction entered + { + throw std::runtime_error("Unknown reducer: " + _ppReduce.first); + } + // all done, stores and return a reference + _state.storeFunctor(ptReduce); + return (*ptReduce); +} + +/** Helper function that creates a replacement from the class + * eoReduceMergeReduce using 6 parameters + * (after the usual eoState and eoParser) + * + * eoHowMany _elite the number of elite parents (0 = no elitism) + * see below + * bool _strongElitism if elite > 0, std::string elitism or weak elitism + * strong = elite parents survive, whatever the offspring + * weak - elite patents compete AFTER replacement with best offspring + * eoHowMany _surviveParents number of parents after parents recuction + * eoParamParamType & _reduceParentType how the parents are reduced + * eoHowMany _surviveOffspring number of offspring after offspring recuction + * eoParamParamType & _reduceOffspringType how the offspring are reduced + * eoParamParamType & _reduceFinalType how the final population is reduced to initial population size + * + * @ingroup Builders + */ +template +eoReplacement & make_general_replacement( + eoParser& _parser, eoState& _state, + eoHowMany _elite = eoHowMany(0), + bool _strongElitism = false, + eoHowMany _surviveParents = eoHowMany(0.0), + eoParamParamType & _reduceParentType = eoParamParamType("Deterministic"), + eoHowMany _surviveOffspring = eoHowMany(1.0), + eoParamParamType & _reduceOffspringType = eoParamParamType("Deterministic"), + eoParamParamType & _reduceFinalType = eoParamParamType("Deterministic") + ) +{ + ///////////////////////////////////////////////////// + // the replacement + ///////////////////////////////////////////////////// + + // Elitism + eoHowMany elite = _parser.createParam(_elite, "elite", "Nb of elite parents (percentage or absolute)", '\0', "Evolution Engine / Replacement").value(); + + bool strongElitism = _parser.createParam(_strongElitism,"eliteType", "Strong (true) or weak (false) elitism (set elite to 0 for none)", '\0', "Evolution Engine / Replacement").value(); + + // reduce the parents + eoHowMany surviveParents = _parser.createParam(_surviveParents, "surviveParents", "Nb of surviving parents (percentage or absolute)", '\0', "Evolution Engine / Replacement").value(); + + eoParamParamType & reduceParentType = _parser.createParam(_reduceParentType, "reduceParents", "Parents reducer: Deterministic, EP(T), DetTour(T), StochTour(t), Uniform", '\0', "Evolution Engine / Replacement").value(); + + eoReduce & reduceParent = decode_reduce(reduceParentType, _state); + + // reduce the offspring + eoHowMany surviveOffspring = _parser.createParam(_surviveOffspring, "surviveOffspring", "Nb of surviving offspring (percentage or absolute)", '\0', "Evolution Engine / Replacement").value(); + + eoParamParamType & reduceOffspringType = _parser.createParam(_reduceOffspringType, "reduceOffspring", "Offspring reducer: Deterministic, EP(T), DetTour(T), StochTour(t), Uniform", '\0', "Evolution Engine / Replacement").value(); + + eoReduce & reduceOffspring = decode_reduce(reduceOffspringType, _state); + + eoParamParamType & reduceFinalType = _parser.createParam(_reduceFinalType, "reduceFinal", "Final reducer: Deterministic, EP(T), DetTour(T), StochTour(t), Uniform", '\0', "Evolution Engine / Replacement").value(); + + eoReduce & reduceFinal = decode_reduce(reduceFinalType, _state); + + // now the replacement itself + eoReduceMergeReduce *ptReplace = new eoReduceMergeReduce(elite, strongElitism, surviveParents, reduceParent, surviveOffspring, reduceOffspring, reduceFinal); + _state.storeFunctor(ptReplace); + + // that's it! + return *ptReplace; +} + +#endif diff --git a/trunk/eo/src/do/make_pop.h b/trunk/eo/src/do/make_pop.h new file mode 100644 index 000000000..c2a1d1a84 --- /dev/null +++ b/trunk/eo/src/do/make_pop.h @@ -0,0 +1,116 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_pop.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_pop_h +#define _make_pop_h + +#include // for time(0) for random seeding +#include +#include +#include +#include +#include + +/** @defgroup Builders Automatic builders + * + * Automatic builders are functions that automagically builds most commons instances for you. + * + * All the options you needs are set in the command-line parser. + * Those functions all start with the "do_make_" prefix. + * + * @ingroup Utilities + */ + +/** + * Templatized version of parser-based construct of the population + * + other initializations that are NOT representation-dependent. + * + * It must then be instantiated, and compiled on its own for a given EOType + * (see e.g. ga.h and ga.pp in dir ga) + * + * @ingroup Builders +*/ +template +eoPop& do_make_pop(eoParser & _parser, eoState& _state, eoInit & _init) +{ + // random seed + eoValueParam& seedParam = _parser.getORcreateParam(uint32_t(0), "seed", "Random number seed", 'S'); + if (seedParam.value() == 0) + seedParam.value() = time(0); + eoValueParam& popSize = _parser.getORcreateParam(unsigned(20), "popSize", "Population Size", 'P', "Evolution Engine"); + + // Either load or initialize + // create an empty pop and let the state handle the memory + eoPop& pop = _state.takeOwnership(eoPop()); + + eoValueParam& loadNameParam = _parser.getORcreateParam(std::string(""), "Load","A save file to restart from",'L', "Persistence" ); + eoValueParam & recomputeFitnessParam = _parser.getORcreateParam(false, "recomputeFitness", "Recompute the fitness after re-loading the pop.?", 'r', "Persistence" ); + + if (loadNameParam.value() != "") // something to load + { + // create another state for reading + eoState inState; // a state for loading - WITHOUT the parser + // register the rng and the pop in the state, so they can be loaded, + // and the present run will be the exact continuation of the saved run + // eventually with different parameters + inState.registerObject(pop); + inState.registerObject(rng); + inState.load(loadNameParam.value()); // load the pop and the rng + // the fitness is read in the file: + // do only evaluate the pop if the fitness has changed + if (recomputeFitnessParam.value()) + { + for (unsigned i=0; i popSize.value()) + { + std::cerr << "WARNING, Load file contained too many individuals. Only the best will be retained" << std::endl; + pop.resize(popSize.value()); + } + } + else // nothing loaded from a file + { + rng.reseed(seedParam.value()); + } + + if (pop.size() < popSize.value()) // missing some guys + { + // Init pop from the randomizer: need to use the append function + pop.append(popSize.value(), _init); + } + + // for future stateSave, register the algorithm into the state + _state.registerObject(_parser); + _state.registerObject(pop); + _state.registerObject(rng); + + return pop; +} + +#endif diff --git a/trunk/eo/src/do/make_run.h b/trunk/eo/src/do/make_run.h new file mode 100644 index 000000000..485cb8700 --- /dev/null +++ b/trunk/eo/src/do/make_run.h @@ -0,0 +1,46 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_run.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_run_h +#define _make_run_h + +// Algorithm (only this one needed) +#include + +/* + * A trivial function - only here to allow instanciation with a give EOType + * and separate compilation - see in ga dir, make_run_ga + * + * + * @ingroup Builders +*/ +template +void do_run(eoAlgo& _algo, eoPop& _pop) +{ + _algo(_pop); +} + +#endif diff --git a/trunk/eo/src/eo b/trunk/eo/src/eo new file mode 100644 index 000000000..8cebd23a0 --- /dev/null +++ b/trunk/eo/src/eo @@ -0,0 +1,209 @@ +//----------------------------------------------------------------------------- +// eo +// (c) GeNeura Team 1998 - 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#ifndef _eo_ +#define _eo_ + +#ifdef HAVE_CONFIG_H +#include +#endif + +// general purpose +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +// eo's +#include + +#include + +#include +#include +#include + +// the variation operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include +// didactic (mimics SGA-like variation into an eoGenOp) +// calls crossover and mutation sequentially, +// with their respective mutation rates +#include +// its dual: crossover, mutation (and copy) - proportional choice +// w.r.t. given relative weights +#include + +// population +#include + +// Evaluation functions (all include eoEvalFunc.h) +#include +#include +#include +#include +#include + +// Continuators - all include eoContinue.h +#include +#include +#include +#include +#include +#include +#include // added th T.Legrand +#ifndef _MSC_VER +#include // CtrlC handling (using 2 global variables!) +#endif +// Selection +// the eoSelectOne's +#include +#include +#include +#include +#include // also contains eoLinearFitScaling.h +#include +#include +#include +// Embedding truncation selection +#include + +// the batch selection - from an eoSelectOne +#include +#include +#include +#include + +// other batch selections +// DetSelect can also be obtained as eoSequentialSelect, an eoSelectOne +// (using setup and an index) +#include + +// Breeders +#include // applies one eoGenOp, stop on offspring count +// #include // parent + SINGLE offspring compete (e.g. DE) - not ready yet... + +// Replacement +// #include +#include +#include +#include + +// a simple transformer +#include + +// Perf2Worth stuff - includes eoSelectFromWorth.h +#include + + +// Algorithms +#include +#include +// #include removed for a while - until eoGenOp is done + +// Utils +#include +#include // includes eoRealBounds.h +#include // no eoIntVectorBounds + +// aliens +#include +#include + + +//----------------------------------------------------------------------------- +// to be continued ... +//----------------------------------------------------------------------------- + +/*** Particle Swarm Optimization stuff ***/ + +// basic particle definitions +#include +#include +#include +#include + +// initialization +#include +#include + +// velocities +#include +#include +#include +#include +#include +#include +#include +#include + +// flights +#include +#include +#include +#include +#include + +// topologies +#include +#include +#include +#include +#include +#include + +// PS algorithms +#include +#include +#include + +// utils +#include +#include +#include +#include +#include + +#include +#include + +#endif + +// Local Variables: +// mode: C++ +// End: diff --git a/trunk/eo/src/eoAlgo.h b/trunk/eo/src/eoAlgo.h new file mode 100644 index 000000000..494b7b76c --- /dev/null +++ b/trunk/eo/src/eoAlgo.h @@ -0,0 +1,56 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAlgo.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOALGO_H +#define _EOALGO_H + +#include // for population +#include + +/** + @defgroup Algorithms Algorithms + + In EO, an algorithm is a functor that takes one or several solutions to an optimization + problem as arguments, and iteratively modify them with the help of operators. + + Generally, an EO object is built by assembling together @ref Operators in an algorithm instance, + and then calling the algorithm's operator() on an initial population (an eoPop). The algorithm will then + manipulate the solutions within the population to search for the problem's optimum. +*/ + +/** + This is the base class for population-transforming algorithms. There + is only one operator defined, which takes a population and does stuff to + it. It needn't be a complete algorithm, can be also a step of an + algorithm. This class just gives a common interface to linear + population-transforming algorithms. + + @ingroup Algorithms +*/ +template< class EOT > +class eoAlgo : public eoUF&, void> +{}; + + +#endif diff --git a/trunk/eo/src/eoBinaryFlight.h b/trunk/eo/src/eoBinaryFlight.h new file mode 100644 index 000000000..9672bd3f3 --- /dev/null +++ b/trunk/eo/src/eoBinaryFlight.h @@ -0,0 +1,44 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoBinaryFlight.h +// (c) OPAC Team, 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOBINARYFLIGHT_H +#define EOBINARYFLIGHT_H + +//----------------------------------------------------------------------------- +#include +//----------------------------------------------------------------------------- + + + +/** Abstract class for binary flight of particle swarms. Positions are updated but are expected to be binary. + * A function must be used to decide, according to continuous velocities, of the + * new positions (0,1 ... ?) + * + * @ingroup Core + */ +template < class POT > class eoBinaryFlight:public eoFlight < POT >{}; + + + +#endif /*EOBINARYFLIGHT_H */ diff --git a/trunk/eo/src/eoBitParticle.h b/trunk/eo/src/eoBitParticle.h new file mode 100644 index 000000000..87f98aa1b --- /dev/null +++ b/trunk/eo/src/eoBitParticle.h @@ -0,0 +1,50 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoBitParticle.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _EOBITPARTICLE_H +#define _EOBITPARTICLE_H + + +#include + + +/** eoBitParticle: Implementation of a bit-coded particle (swarm optimization). + * Positions and best positions are 0 or 1 but the velocity is a vector of double. + * + * @ingroup Bitstring +*/ +template < class FitT> class eoBitParticle: public eoVectorParticle + +{ +public: + + eoBitParticle(unsigned size = 0, bool positions = 0,double velocities = 0.0,bool bestPositions = 0): eoVectorParticle (size, positions,velocities,bestPositions) {} + + virtual std::string className() const + { + return "eoBitParticle"; + } +}; + +#endif /*_EOBITPARTICLE_H*/ diff --git a/trunk/eo/src/eoBreed.h b/trunk/eo/src/eoBreed.h new file mode 100644 index 000000000..0b00ec584 --- /dev/null +++ b/trunk/eo/src/eoBreed.h @@ -0,0 +1,79 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoBreed.h + (c) Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoBreed_h +#define _eoBreed_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** Breeding: combination of selecting and transforming a population + +Breeding is thought of a combination of selecting and transforming a +population. For efficiency reasons you might want to build your own +eoBreed derived class rather than relying on a seperate select and +transform function. + +@see eoSelect, eoTransform, eoSelectTransform + +@ingroup Combination +*/ +template +class eoBreed : public eoBF&, eoPop&, void> +{}; + + + +/** Embedded select, followed by an embedded transform + +Special breeder that is just an application of an embedded select, +followed by an embedded transform + +@ingroup Combination +*/ +template +class eoSelectTransform : public eoBreed +{ + public: + eoSelectTransform(eoSelect& _select, eoTransform& _transform) : + select(_select), transform(_transform) + {} + + void operator()(const eoPop& _parents, eoPop& _offspring) + { + select(_parents, _offspring); + transform(_offspring); + } + + private : + eoSelect& select; + eoTransform& transform; +}; + +#endif diff --git a/trunk/eo/src/eoCellularEasyEA.h b/trunk/eo/src/eoCellularEasyEA.h new file mode 100644 index 000000000..fbf3085fc --- /dev/null +++ b/trunk/eo/src/eoCellularEasyEA.h @@ -0,0 +1,162 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoCellularEasyEA.h" + +// (c) OPAC Team, LIFL, 2002 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef eoCellularEasyEA_h +#define eoCellularEasyEA_h + +#include +#include +#include +#include +#include +#include + +/** + The abstract cellular easy algorithm. + + @ingroup Algorithms + */ +template class eoCellularEasyEA : public eoAlgo { + +public : + + /** + Two constructors + */ + + eoCellularEasyEA (eoContinue & _cont, // Stop. criterion + eoEvalFunc & _eval, // Evaluation function + eoSelectOne & _sel_neigh, // To choose a partner + eoBinOp & _cross, // Cross-over operator + eoMonOp & _mut, // Mutation operator + eoSelectOne & _sel_repl /* Which to keep between the new + child and the old individual ? */ + ) : + cont (_cont), + eval (_eval), + popEval (_eval), + sel_neigh (_sel_neigh), + cross (_cross), + mut (_mut), + sel_child (eoSelectFirstOne ()), + sel_repl (_sel_repl) { + + } + + eoCellularEasyEA (eoContinue & _cont, + eoEvalFunc & _eval, + eoSelectOne & _sel_neigh, + eoQuadOp & _cross, + eoMonOp & _mut, + eoSelectOne & _sel_child, /* To choose one from + the both children */ + eoSelectOne & _sel_repl + ) : + cont (_cont), + eval (_eval), + popEval (_eval), + sel_neigh (_sel_neigh), + cross (_cross), + mut (_mut), + sel_child (_sel_child), + sel_repl (_sel_repl) { + + } + + /** + For a given population. + */ + + void operator () (eoPop & pop) { + + do { + + for (unsigned i = 0 ; i < pop.size () ; i ++) { + + // Who are neighbouring to the current individual ? + eoPop neigh = neighbours (pop, i) ; + + // To select a partner + EOT part, old_sol = pop [i] ; + part = sel_neigh (neigh) ; + + // To perform cross-over + cross (pop [i], part) ; + + // To perform mutation + mut (pop [i]) ; + mut (part) ; + + pop [i].invalidate () ; + part.invalidate () ; + eval (pop [i]) ; + eval (part) ; + + // To choose one of the two children ... + eoPop pop_loc ; + pop_loc.push_back (pop [i]) ; + pop_loc.push_back (part) ; + + pop [i] = sel_child (pop_loc) ; + + // To choose only one between the new made child and the old individual + pop_loc.clear () ; + pop_loc.push_back (pop [i]) ; + + pop_loc.push_back (old_sol) ; + + pop [i] = sel_repl (pop_loc) ; + } + + } while (cont (pop)) ; + } + +protected : + + virtual eoPop neighbours (const eoPop & pop, int rank) = 0 ; + +private : + + eoContinue & cont ; + eoEvalFunc & eval ; + eoPopLoopEval popEval ; + eoSelectOne & sel_neigh ; + eoBF & cross ; + eoMonOp & mut ; + eoSelectOne & sel_child ; + eoSelectOne & sel_repl ; + + class eoSelectFirstOne : public eoSelectOne { + + public : + + const EOT & operator () (const eoPop & pop) { + + return pop [0] ; + } + + } ; + +} ; + +#endif diff --git a/trunk/eo/src/eoCloneOps.h b/trunk/eo/src/eoCloneOps.h new file mode 100644 index 000000000..e53cbd749 --- /dev/null +++ b/trunk/eo/src/eoCloneOps.h @@ -0,0 +1,82 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +//----------------------------------------------------------------------------- +// eoCloneOps.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + CVS Info: $Date: 2003-02-27 19:26:09 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoCloneOps.h,v 1.2 2003-02-27 19:26:09 okoenig Exp $ $Author: okoenig $ + */ +//----------------------------------------------------------------------------- + +#ifndef _eoCloneOps_H +#define _eoCloneOps_H + +#include + +/** + * The different null-variation operators (i.e. they do nothing) + * + * eoQuadCloneOp at least is useful to emulate the standard + * crossover(pCross) + mutation(pMut) + * within the eoGenOp framework + * eoMonCloneOp will probably be useful as the copy operator + * eoBinCloneOp will certainly never been used - but let's be complete :-) + * + * @addtogroup Core + * @{ + */ + +/** +Mon clone: one argument +*/ +template +class eoMonCloneOp: public eoMonOp +{ +public: + /// Ctor + eoMonCloneOp() : eoMonOp() {} + virtual std::string className() const {return "eoMonCloneOp";} + virtual bool operator()(EOT&){return false;} +}; + + +/** Binary clone: two operands, only the first could be modified + */ +template +class eoBinCloneOp: public eoBinOp +{ +public: + /// Ctor + eoBinCloneOp() : eoBinOp() {} + virtual std::string className() const {return "eoBinCloneOp";} + virtual bool operator()(EOT&, const EOT&){return false;} +}; + +/** Quad clone: two operands, both could be modified - but are not! +*/ +template +class eoQuadCloneOp: public eoQuadOp +{ +public: + /// Ctor + eoQuadCloneOp():eoQuadOp() {} + virtual std::string className() const {return "eoQuadCloneOp";} +virtual bool operator()(EOT& , EOT& ) {return false;} +}; + +#endif +/** @} */ diff --git a/trunk/eo/src/eoCombinedContinue.h b/trunk/eo/src/eoCombinedContinue.h new file mode 100644 index 000000000..dfb70f67b --- /dev/null +++ b/trunk/eo/src/eoCombinedContinue.h @@ -0,0 +1,102 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoCombinedContinue.h +// (c) Maarten Keijzer, GeNeura Team, 1999, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es +Authors : + todos@geneura.ugr.es + Marc Schoenauer + Ramón Casero Cañas + Johann Dréo + */ +//----------------------------------------------------------------------------- + +#ifndef _eoCombinedContinue_h +#define _eoCombinedContinue_h + +#include + +/** + Combined continuators - logical AND: + Continues until one of the embedded continuators says halt! + +20/11/00 MS: Changed the 2-continuator construct to a std::vector > + to be consistent with other Combined constructs + and allow to easily handle more than 2 continuators + +02/2003 Ramón Casero Cañas - added the removeLast() method + +@ingroup Combination +*/ +template< class EOT> +class eoCombinedContinue: public eoContinue, public std::vector* > { +public: + + /// Define Fitness + typedef typename EOT::Fitness FitnessType; + + /// Ctor, make sure that at least on continuator is present + eoCombinedContinue( eoContinue& _cont) + : eoContinue(), std::vector* >(1, &_cont) + { + } + + /// Ctor - for historical reasons ... should disspear some day + eoCombinedContinue( eoContinue& _cont1, eoContinue& _cont2) + : eoContinue(), std::vector* >() + { +#ifndef DEPRECATED_MESSAGES +#pragma message "The double continuators constructor of eocombinedContinue is deprecated and will be removed in the next release." +#endif // !DEPRECATED_MESSAGES + + this->push_back(&_cont1); + this->push_back(&_cont2); + } + + void add(eoContinue & _cont) + { + this->push_back(&_cont); + } + + void removeLast(void) + { +#ifndef DEPRECATED_MESSAGES +#pragma message "The removeLast method of eocombinedContinue is deprecated and will be removed in the next release, use pop_back instead." +#endif // !DEPRECATED_MESSAGES + + this->pop_back(); + } + + + /** Returns false when one of the embedded continuators say so (logical and) + */ + virtual bool operator() ( const eoPop& _pop ) + { + for (unsigned i = 0; i < this->size(); ++i) + if ( ! (*this->at(i))(_pop) ) return false; + return true; + } + + virtual std::string className(void) const { return "eoCombinedContinue"; } + +//private: +// std::vector*> continuators; +}; + +#endif diff --git a/trunk/eo/src/eoCombinedInit.h b/trunk/eo/src/eoCombinedInit.h new file mode 100644 index 000000000..d41122d85 --- /dev/null +++ b/trunk/eo/src/eoCombinedInit.h @@ -0,0 +1,92 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoCombinedInit.h +// (c) Maarten Keijzer, GeNeura Team, Marc Schoenauer 2004 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoCombinedInit_h +#define _eoCombinedInit_h + +#include + +/** + Combined INIT: a proportional recombination of eoInit objects + + @ingroup Initializators +*/ +template< class EOT> +class eoCombinedInit: public eoInit { +public: + + /** Ctor, make sure that at least one eoInit is present */ + eoCombinedInit( eoInit& _init, double _rate) + : eoInit () + { + initializers.push_back(&_init); + rates.push_back(_rate); + } + + void add(eoInit & _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 + */ + void add(eoInit & _init, double _rate) + { + initializers.push_back(&_init); + rates.push_back(_rate); + // compute the relative rates in percent - to warn the user! + printOn( eo::log << eo::logging ); + } + + /** outputs the operators and percentages */ + virtual void printOn(std::ostream & _os) + { + double total = 0; + unsigned i; + for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %\n"; + } + + /** Performs the init: chooses among all initializers + * using roulette wheel on the rates + */ + virtual void operator() ( EOT & _eo ) + { + unsigned what = rng.roulette_wheel(rates); // choose one op + (*initializers[what])(_eo); // apply it + return; + } + + virtual std::string className(void) const { return "eoCombinedInit"; } + +private: +std::vector*> initializers; +std::vector rates; +}; + +#endif diff --git a/trunk/eo/src/eoConstrictedVariableWeightVelocity.h b/trunk/eo/src/eoConstrictedVariableWeightVelocity.h new file mode 100644 index 000000000..9e96d7ef3 --- /dev/null +++ b/trunk/eo/src/eoConstrictedVariableWeightVelocity.h @@ -0,0 +1,209 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoConstrictedVariableWeightVelocity.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOCONSTRICTEDVARIABLEWEIGHTVELOCITY_H +#define EOCONSTRICTEDVARIABLEWEIGHTVELOCITY_H + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + + + +/** Inertia variable + constriction velocity for particle swarm optimization. Derivated from abstract eoVelocity, +* At step t: v(t+1)= K * ( w*v(t) + c1*r1* (xbest(t)-x(t)) + c2*r2* (gbest(t) - x(t))) +* w is updated each time the velocity performer is called and K is fixed +* (ci given and Ri chosen at random in [0;1]). +* +* @ingroup Variators +*/ +template < class POT > class eoConstrictedVariableWeightVelocity:public eoVelocity < POT > +{ + +public: + + /* + * Each element for the velocity evaluation is expected to be of type VelocityType. + */ + typedef typename POT::ParticleVelocityType VelocityType; + + /** Full constructor: Bounds and bound modifier required + * @param _topology - The topology to get the global/local/other best + * @param _coeff - The constriction coefficient + * @param _weightUpdater - An eoWeightUpdater used to update the inertia weight + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _gen - The eo random generator, default=rng + */ + eoConstrictedVariableWeightVelocity (eoTopology < POT > & _topology, + const VelocityType & _coeff, + eoWeightUpdater & _weightUpdater, + const VelocityType & _c1, + const VelocityType & _c2 , + eoRealVectorBounds & _bounds, + eoRealBoundModifier & _bndsModifier, + eoRng & _gen = rng): + topology(_topology), + coeff(_coeff), + weightUpdater(_weightUpdater), + c1 (_c1), + c2 (_c2), + bounds(_bounds), + bndsModifier(_bndsModifier), + gen(_gen){} + + + /** Constructor: No bound updater required <-> fixed bounds + * @param _topology - The topology to get the global/local/other best + * @param _coeff - The constriction coefficient + * @param _weightUpdater - An eoWeightUpdater used to update the inertia weight + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _gen - The eo random generator, default=rng + */ + eoConstrictedVariableWeightVelocity (eoTopology < POT > & _topology, + const VelocityType & _coeff, + eoWeightUpdater & _weightUpdater, + const VelocityType & _c1, + const VelocityType & _c2, + eoRealVectorBounds & _bounds, + eoRng & _gen = rng): + topology(_topology), + coeff(_coeff), + weightUpdater(_weightUpdater), + c1 (_c1), + c2 (_c2), + bounds(_bounds), + bndsModifier(dummyModifier), + gen(_gen){} + + + /** Constructor: Neither bounds nor bound updater required <-> free velocity + * @param _topology - The topology to get the global/local/other best* + * @param _coeff - The constriction coefficient + * @param _weightUpdater - An eoWeightUpdater used to update the inertia weight + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _gen - The eo random generator, default=rng + */ + eoConstrictedVariableWeightVelocity (eoTopology < POT > & _topology, + const VelocityType & _coeff, + eoWeightUpdater & _weightUpdater, + const VelocityType & _c1, + const VelocityType & _c2, + eoRng & _gen = rng): + topology(_topology), + coeff(_coeff), + weightUpdater(_weightUpdater), + c1 (_c1), + c2 (_c2), + bounds(*(new eoRealVectorNoBounds(0))), + bndsModifier(dummyModifier), + gen(_gen) + {} + + /** + * Evaluate the new velocities of the given particle. Need an indice to identify the particle + * into the topology. Steps are : + * - evaluate r1 and r2, the customed learning factors + * - adjust the size of the bounds (even if dummy) + * - update the weight with the weightUpdater (use the dummy updater if there's no updater provided) + * - modify the bounds with the bounds modifier (use the dummy modifier if there's no modifier provided) + * @param _po - A particle + * @param _indice - The indice (into the topology) of the given particle + */ + void operator () (POT & _po,unsigned _indice) + { + VelocityType r1; + VelocityType r2; + + VelocityType newVelocity; + + // cast the learning factors to VelocityType + r1 = (VelocityType) rng.uniform (1) * c1; + r2 = (VelocityType) rng.uniform (1) * c2; + + // need to resize the bounds even if there are dummy because of "isBounded" call + bounds.adjust_size(_po.size()); + + // update the inertia weight + weightUpdater(weight); + + // assign the new velocities + for (unsigned j = 0; j < _po.size (); j++) + { + newVelocity= coeff * (weight * _po.velocities[j] + r1 * (_po.bestPositions[j] - _po[j]) + r2 * (topology.best (_indice)[j] - _po[j])); + + /* modify the bounds */ + bndsModifier(bounds,j); + + /* check bounds */ + if (bounds.isMinBounded(j)) + newVelocity=(VelocityType)std::max(newVelocity,bounds.minimum(j)); + if (bounds.isMaxBounded(j)) + newVelocity=(VelocityType)std::min(newVelocity,bounds.maximum(j)); + + _po.velocities[j]=newVelocity; + } + } + + /** + * Update the neighborhood. + */ + void updateNeighborhood(POT & _po,unsigned _indice) + { + topology.updateNeighborhood(_po,_indice); + } + + + +protected: + eoTopology < POT > & topology; + + const VelocityType & coeff; // the fixed constriction coefficient + eoWeightUpdater & weightUpdater; // the updater used to make the weight evoluate + + const VelocityType & c1; // learning factor 1 + const VelocityType & c2; // learning factor 2 + + eoRealVectorBounds & bounds; // REAL bounds even if the velocity could be of another type. + eoRealBoundModifier & bndsModifier; + + VelocityType weight; + eoRng & gen; // the random generator + + // If the bound modifier doesn't need to be used, use the dummy instance + eoDummyRealBoundModifier dummyModifier; +}; + +#endif /*EOCONSTRICTEDVARIABLEWEIGHTVELOCITY_H*/ diff --git a/trunk/eo/src/eoConstrictedVelocity.h b/trunk/eo/src/eoConstrictedVelocity.h new file mode 100644 index 000000000..45f6e03d6 --- /dev/null +++ b/trunk/eo/src/eoConstrictedVelocity.h @@ -0,0 +1,199 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoConstrictedVelocity.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + clive.canape@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOCONSTRICTEDVELOCITY_H +#define EOCONSTRICTEDVELOCITY_H + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + + +/** Constricted velocity performer for particle swarm optimization. Derivated from abstract eoVelocity, +* At step t+1 : v(t+1)= C * [ v(t) + c1*r1 * (xbest(t)-x(t)) + c2*r2 * (gbest(t) - x(t)) ] +* C is fixed for all the particles and all the generations. +* Default C = 2 * k / abs(2 - P - sqrt (P*(P-4))) +* (ci and C given;P=c1*r1 + c2*r2 ; Ri chosen at random * in [0;1]) +* +* @ingroup Variators +*/ +template < class POT > class eoConstrictedVelocity:public eoVelocity < POT > +{ + +public: + + /* + * Each element for the velocity evaluation is expected to be of type VelocityType. + */ + typedef typename POT::ParticleVelocityType VelocityType; + + /** Full constructor: Bounds and bound modifier required + * @param _topology - The topology to get the global/local/other best + * @param _coeff - The constriction coefficient + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _gen - The eo random generator, default=rng + */ + eoConstrictedVelocity (eoTopology < POT > & _topology, + const VelocityType & _coeff, + const VelocityType & _c1, + const VelocityType & _c2 , + eoRealVectorBounds & _bounds, + eoRealBoundModifier & _bndsModifier, + eoRng & _gen = rng): + topology(_topology), + coeff(_coeff), + c1 (_c1), + c2 (_c2), + bounds(_bounds), + bndsModifier(_bndsModifier), + gen(_gen){} + + + /** Constructor: No bound updater required <-> fixed bounds + * @param _topology - The topology to get the global/local/other best + * @param _coeff - The constriction coefficient + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _gen - The eo random generator, default=rng + */ + eoConstrictedVelocity (eoTopology < POT > & _topology, + const VelocityType & _coeff, + const VelocityType & _c1, + const VelocityType & _c2, + eoRealVectorBounds & _bounds, + eoRng & _gen = rng): + topology(_topology), + coeff(_coeff), + c1 (_c1), + c2 (_c2), + bounds(_bounds), + bndsModifier(dummyModifier), + gen(_gen){} + + + /** Constructor: Neither bounds nor bound updater required <-> free velocity + * @param _topology - The topology to get the global/local/other best + * @param _coeff - The constriction coefficient + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _gen - The eo random generator, default=rng + */ + eoConstrictedVelocity (eoTopology < POT > & _topology, + const VelocityType & _coeff, + const VelocityType & _c1, + const VelocityType & _c2, + eoRng & _gen = rng): + topology(_topology), + coeff(_coeff), + c1 (_c1), + c2 (_c2), + bounds(*(new eoRealVectorNoBounds(0))), + bndsModifier(dummyModifier), + gen(_gen){} + + + /** + * Evaluate the new velocities of the given particle. Need an indice to identify the particle + * into the topology. Steps are : + * - evaluate r1 and r2, the customed learning factors + * - adjust the size of the bounds (even if dummy) + * - modify the bounds with the bounds modifier (use the dummy modifier if there's no modifier provided) + * @param _po - A particle + * @param _indice - The indice (into the topology) of the given particle + */ + void operator () (POT & _po,unsigned _indice) + { + VelocityType r1; + VelocityType r2; + + VelocityType newVelocity; + + // cast the learning factors to VelocityType + r1 = (VelocityType) rng.uniform (1) * c1; + r2 = (VelocityType) rng.uniform (1) * c2; + + // need to resize the bounds even if there are dummy because of "isBounded" call + bounds.adjust_size(_po.size()); + + // assign the new velocities + for (unsigned j = 0; j < _po.size (); j++) + { + newVelocity= coeff * (_po.velocities[j] + r1 * (_po.bestPositions[j] - _po[j]) + r2 * (topology.best (_indice)[j] - _po[j])); + + /* modify the bounds */ + bndsModifier(bounds,j); + + /* check bounds */ + if (bounds.isMinBounded(j)) + newVelocity=(VelocityType)std::max(newVelocity,bounds.minimum(j)); + if (bounds.isMaxBounded(j)) + newVelocity=(VelocityType)std::min(newVelocity,bounds.maximum(j)); + + _po.velocities[j]=newVelocity; + } + } + + /** + * Update the neighborhood of a particle. + */ + void updateNeighborhood(POT & _po,unsigned _indice) + { + topology.updateNeighborhood(_po,_indice); + } + + //! eoTopology getTopology + //! @return topology + + eoTopology & getTopology () + { + return topology; + } + +protected: + eoTopology < POT > & topology; + const VelocityType & c1; // learning factor 1 + const VelocityType & c2; // learning factor 2 + const VelocityType & coeff; // the fixed constriction coefficient + eoRng & gen; // the random generator + + eoRealVectorBounds & bounds; // REAL bounds even if the velocity could be of another type. + eoRealBoundModifier & bndsModifier; + + // If the bound modifier doesn't need to be used, use the dummy instance + eoDummyRealBoundModifier dummyModifier; +}; + + +#endif /*EOCONSTRICTEDVELOCITY_H */ diff --git a/trunk/eo/src/eoContinue.h b/trunk/eo/src/eoContinue.h new file mode 100644 index 000000000..dbbf24805 --- /dev/null +++ b/trunk/eo/src/eoContinue.h @@ -0,0 +1,70 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoContinue.h +// (c) Maarten Keijzer, Geneura Team, 1999, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoContinue_h +#define _eoContinue_h + +#include +#include +#include + +/** @defgroup Continuators Stopping criteria + * + * A stopping criterion is called a "continue". This is a functor that is called at each generation end + * and that return true if one should stop the search. + * + * @ingroup Utilities + */ + +/** Termination condition for the genetic algorithm + * Takes the population as input, returns true for continue, + * false for termination + * + * @ingroup Continuators + * @ingroup Core + */ +template< class EOT> +class eoContinue : public eoUF&, bool>, public eoPersistent +{ +public: + virtual std::string className(void) const { return "eoContinue"; } + + /** Read from a stream + * @param __is istream to read from + */ + void readFrom (std :: istream & __is) { + (void)__is; + /* It should be implemented by subclasses ! */ + } + + /** Print on a stream + * @param __os ostream to print on + */ + void printOn (std :: ostream & __os) const { + (void)__os; + /* It should be implemented by subclasses ! */ + } +}; + +#endif diff --git a/trunk/eo/src/eoCounter.h b/trunk/eo/src/eoCounter.h new file mode 100644 index 000000000..afd7fd2ee --- /dev/null +++ b/trunk/eo/src/eoCounter.h @@ -0,0 +1,221 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoCounter.h +// (c) Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoCounter_h +#define _eoCounter_h + +#include +#include +#include + +/** + Generic counter class that counts the number of times + a procedure is used. Add a procedure through its ctor and + use this class instead of it. + + It is derived from eoValueParam so you can add it to a monitor. + + @ingroup Utilities +*/ +template +class eoProcedureCounter : public Procedure, public eoValueParam +{ + public: + + eoProcedureCounter(Procedure& _proc, std::string _name = "proc_counter") + : eoValueParam(0, _name), proc(_proc) {} + + /** Calls the embedded function and increments the counter + + Note for MSVC users, if this code does not compile, you are quite + likely trying to count a function that has a non-void return type. + Don't look at us, look at the MSVC builders. Code like "return void;" + is perfectly legal according to the ANSI standard, but the guys at + Microsoft didn't get to implementing it yet. + + We had two choices: assuming (and compiling ) code that returns void or code that returns non-void. + Given that in EO most functors return void, it was chosen to support void. + + But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite + capable of compiling return void; type of code. We'll try to change the signature then. + + You happy GNU (and other compiler) users will not have a problem with this.. + */ + typename Procedure::result_type operator()(void) + { + value()++; +#ifdef _MSC_VER + proc(); +#else + return proc(); +#endif + } + + private : + + Procedure& proc; +}; + +/** + Generic counter class that counts the number of times + a unary function is used. Add a unary function through its ctor and + use this class instead of it. + + It is derived from eoValueParam so you can add it to a monitor. + + Example: suppose you have an eoEvalFunc called myeval, to count the + number of evaluations, just define: + + eoUnaryFunctorCounter evalCounter(myeval); + + and use evalCounter now instead of myeval. +*/ + +template +class eoUnaryFunctorCounter : public UnaryFunctor, public eoValueParam +{ + public: + eoUnaryFunctorCounter(UnaryFunctor& _func, std::string _name = "uf_counter") + : eoValueParam(0, _name), func(_func) {} + + /** Calls the embedded function and increments the counter + + Note for MSVC users, if this code does not compile, you are quite + likely trying to count a function that has a non-void return type. + Don't look at us, look at the MSVC builders. Code like "return void;" + is perfectly legal according to the ANSI standard, but the guys at + Microsoft didn't get to implementing it yet. + + We had two choices: assuming (and compiling ) code that returns void or code that returns non-void. + Given that in EO most functors return void, it was chosen to support void. + + But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite + capable of compiling return void; type of code. We'll try to change the signature then. + + You happy GNU (and other compiler) users will not have a problem with this. + */ + typename UnaryFunctor::result_type operator() + (typename UnaryFunctor::first_argument_type _arg1) + { + value()++; +#ifdef _MSC_VER + func(_arg1); +#else + return func(_arg1); +#endif + } + + private : + + UnaryFunctor& func; +}; + +/** + Generic counter class that counts the number of times + a binary function is used. Add a binary function through its ctor and + use this class instead of it. + + It is derived from eoValueParam so you can add it to a monitor. + +*/ +template +class eoBinaryFunctorCounter : public BinaryFunctor, public eoValueParam +{ + public: + eoBinaryFunctorCounter(BinaryFunctor& _func, std::string _name = "proc_counter") + : eoValueParam(0, _name), func(_func) {} + + /** Calls the embedded function and increments the counter + + Note for MSVC users, if this code does not compile, you are quite + likely trying to count a function that has a non-void return type. + Don't look at us, look at the MSVC builders. Code like "return void;" + is perfectly legal according to the ANSI standard, but the guys at + Microsoft didn't get to implementing it yet. + + We had two choices: assuming (and compiling ) code that returns void or code that returns non-void. + Given that in EO most functors return void, it was chosen to support void. + + + But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite + capable of compiling return void; type of code. We'll try to change the signature then. + + You happy GNU (and other compiler) users will not have a problem with this. + */ + typename BinaryFunctor::result_type operator() + (typename BinaryFunctor::first_argument_type _arg1, + typename BinaryFunctor::second_argument_type _arg2) + { + value()++; +#ifdef _MSC_VER + func(_arg1, _arg2); +#else + return func(_arg1, _arg2); +#endif + } + + private : + + BinaryFunctor& func; +}; + +/** make_counter: overloaded function to make a counter out of a function + + how it works... + + by using the xxx_function_tag structure defined in eoFunctionBase, you + can easily create a counter from a general class (say eoEval), by + simply stating: + + eoEval& myCounted = make_counter(functor_category(myEval), myEval, store) + + @see eoFunctorBase, functor_category, eoFunctorStore + +*/ +template +eoProcedureCounter& make_counter(eoFunctorBase::procedure_tag, Procedure& _proc, eoFunctorStore& store, std::string _name = "proc_counter") +{ + eoProcedureCounter* result = new eoProcedureCounter(_proc, _name); + store.storeFunctor(result); + return *result; +} + +template +eoUnaryFunctorCounter& make_counter(eoFunctorBase::unary_function_tag, UnaryFunctor& _proc, eoFunctorStore& store, std::string _name = "uf_counter") +{ + eoUnaryFunctorCounter* result = new eoUnaryFunctorCounter(_proc, _name); + store.storeFunctor(result); + return *result; +} + +template +eoBinaryFunctorCounter& make_counter(eoFunctorBase::binary_function_tag, BinaryFunctor& _proc, eoFunctorStore& store, std::string _name = "uf_counter") +{ + eoBinaryFunctorCounter* result = new eoBinaryFunctorCounter(_proc, _name); + store.storeFunctor(result); + return *result; +} + +#endif diff --git a/trunk/eo/src/eoCtrlCContinue.cpp b/trunk/eo/src/eoCtrlCContinue.cpp new file mode 100644 index 000000000..b7ee7fea3 --- /dev/null +++ b/trunk/eo/src/eoCtrlCContinue.cpp @@ -0,0 +1,62 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoCtrlCContinue.cpp +// (c) EEAAX 1996 - GeNeura Team, 1998 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#include + +#include +#include + +/** + * @addtogroup Continuators + * @{ + */ + +// --- Global variables - but don't know what else to do - MS --- +bool ask_for_stop = false; +bool existCtrlCContinue = false; + +// +// The signal handler - installed in the eoCtrlCContinue Ctor +// +void signal_handler( int sig ) +// --------------------------- +{ + // --- On veut la paix, jusqu'a la fin --- +#ifndef _WINDOWS + #ifdef SIGQUIT + signal( SIGINT, SIG_IGN ); + signal( SIGQUIT, SIG_IGN ); + eo::log << eo::logging << "Ctrl C entered ... closing down" << std::endl ; + ask_for_stop = true; + #endif +#endif +} + +/** @} */ diff --git a/trunk/eo/src/eoCtrlCContinue.h b/trunk/eo/src/eoCtrlCContinue.h new file mode 100644 index 000000000..e239f7367 --- /dev/null +++ b/trunk/eo/src/eoCtrlCContinue.h @@ -0,0 +1,86 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoCtrlCContinue.h +// (c) EEAAX 1996 - GeNeura Team, 1998 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- +// the same thing can probably be done in MS environement, but I hoave no way +// to test it so at the moment it is commented out when in MSVC + + +#ifndef eoCtrlCContinue_h +#define eoCtrlCContinue_h + +#include +#include + +/** + * @addtogroup Continuators + * @{ + */ + +extern bool ask_for_stop, existCtrlCContinue; + +extern void signal_handler( int sig ); + + +/** + Ctrl C handling: this eoContinue tells whether the user pressed Ctrl C +*/ +template< class EOT> +class eoCtrlCContinue: public eoContinue +{ +public: + + /// Ctor : installs the signal handler + eoCtrlCContinue() + { + // First checks that no other eoCtrlCContinue does exist + if (existCtrlCContinue) + throw std::runtime_error("A signal handler for Ctrl C is already defined!\n"); + + #ifndef _WINDOWS + #ifdef SIGQUIT + signal( SIGINT, signal_handler ); + signal( SIGQUIT, signal_handler ); + existCtrlCContinue = true; + #endif + #endif + + } + + /** Returns false when Ctrl C has been typed in + * reached */ + virtual bool operator() ( const eoPop& _vEO ) + { + (void)_vEO; + if (ask_for_stop) + return false; + return true; + } + + virtual std::string className(void) const { return "eoCtrlCContinue"; } +}; + + +#endif +/** @} */ diff --git a/trunk/eo/src/eoDetSelect.h b/trunk/eo/src/eoDetSelect.h new file mode 100644 index 000000000..4a0858b6a --- /dev/null +++ b/trunk/eo/src/eoDetSelect.h @@ -0,0 +1,91 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoDetSelect.h + (c) Marc Schoenauer, Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoDetSelect_h +#define _eoDetSelect_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +//----------------------------------------------------------------------------- + +/** eoDetSelect selects many individuals determinisctically + * + * @ingroup Selectors +*/ +template +class eoDetSelect : public eoSelect +{ + public: + /// init + eoDetSelect(double _rate = 1.0, bool _interpret_as_rate = true) + : howMany(_rate, _interpret_as_rate) {} + + /** + @param _source the source population + @param _dest the resulting population (size of this population is + given by the HowMany data + It empties the destination and adds the selection into it) + */ + virtual void operator()(const eoPop& _source, eoPop& _dest) + { + unsigned int pSize = _source.size(); + size_t target = howMany(pSize); + + if ( target == 0 ) + { + eo::log << eo::warnings << "Call to a eoHowMany instance returns 0 (target=" << target << ") it will be replaced by 1 to continue." << std::endl; + target = 1; + } + + _dest.resize(target); + + unsigned remain = target % pSize; + unsigned entireCopy = target / pSize; + typename eoPop::iterator it = _dest.begin(); + + if (target >= pSize) + { + for (unsigned i=0; i // +#include // accumulate + +#include +#include +#include +#include + +/** eoDetTournamentSelect: a selection method that selects ONE individual by + deterministic tournament + -MS- 24/10/99 + + @ingroup Selectors + */ +template class eoDetTournamentSelect: public eoSelectOne +{ + public: + /* (Default) Constructor - + @param _tSize tournament size + */ + eoDetTournamentSelect(unsigned _tSize = 2 ):eoSelectOne(), tSize(_tSize) { + // consistency check + if (tSize < 2) { + eo::log << eo::warnings << "Tournament size should be >= 2, adjusted to 2" << std::endl; + tSize = 2; + } + } + + /* Perform deterministic tournament calling the appropriate fn + see selectors.h + */ + virtual const EOT& operator()(const eoPop& _pop) + { + return deterministic_tournament(_pop, tSize); + } + + private: + unsigned tSize; +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/trunk/eo/src/eoDistribUpdater.h b/trunk/eo/src/eoDistribUpdater.h new file mode 100644 index 000000000..79b22814a --- /dev/null +++ b/trunk/eo/src/eoDistribUpdater.h @@ -0,0 +1,50 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoDistribUpdater.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoDistribUpdater_H +#define _eoDistribUpdater_H + +#include + +#include +#include + +/** + * Base class for Distribution Evolution Algorithms within EO: + * the update rule of distribution + * + * It takes one distribution and updates it according to one population + * + * @ingroup Core +*/ +template +class eoDistribUpdater : + public eoBF &, eoPop &, void> +{ +public: + virtual void operator()(eoDistribution &, eoPop &)=0; +}; + +#endif diff --git a/trunk/eo/src/eoDistribution.h b/trunk/eo/src/eoDistribution.h new file mode 100644 index 000000000..6ca90fe42 --- /dev/null +++ b/trunk/eo/src/eoDistribution.h @@ -0,0 +1,54 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoDistribution.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoDistribution_H +#define _eoDistribution_H + +#include + +#include +#include + +/** + * Abstract class for Distribution Evolution Algorithms within EO: + * the distribution itself + * + * It basically IS AN eoInit - operator()(EOT &) generates new indis + * + * The instances will probably be eoValueParam of some kind + * see eoPBILDistrib.h + * + * @ingroup Core +*/ + +template +class eoDistribution : public eoInit, + public eoPersistent, public eoObject +{ +public: + virtual void operator()(EOT &) = 0; // DO NOT FORGET TO INVALIDATE the EOT +}; + +#endif diff --git a/trunk/eo/src/eoDualFitness.h b/trunk/eo/src/eoDualFitness.h new file mode 100644 index 000000000..674fe075c --- /dev/null +++ b/trunk/eo/src/eoDualFitness.h @@ -0,0 +1,328 @@ +/* + +(c) 2010 Thales group + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; version 2 + of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: + Johann Dréo + +*/ + +#ifndef _eoDualFitness_h_ +#define _eoDualFitness_h_ + +#include +#include +#include // for std::pair +#include + +#include +#include + +/** @addtogroup Evaluation + * @{ + */ + +//! A fitness class that permits to compare feasible and unfeasible individuals and guaranties that a feasible individual will always be better than an unfeasible one. +/** + * Use this class as fitness if you have some kind of individuals + * that must be always considered as better than others while having the same fitness type. + * + * Wraps a scalar fitness _values such as a double or int, with the option of + * maximizing (using less, @see eoMaximizingDualFitness) + * or minimizing (using greater, @see eoMinimizingDualFitness). + * + * Suitable constructors, assignments and casts are defined to work + * with those quantities as if they were a pair of: a BaseType and a boolean. + * + * When changing the fitness, you can use: + * individual.fitness( std::make_pair( fitness, feasibility ) ); + * + * Be aware that, when printing or reading an eDualFitness instance on a iostream, + * friend IO classes use a space separator. + * + * This class overrides operator<() to use the Compare template argument and handle feasibility. + * Over operators are coded using this sole function. + * + * Standard arithmetic operators are provided to add or substract dual fitnesses. + * They behave as expected for the fitness value and gives priority to unfeasible fitness + * (i.e. when adding or substracting dual fitness, the only case when the result will be + * a feasible fitness is when both are feasible, else the result is an unfeasibe fitness) +*/ +template +class eoDualFitness +{ +protected: + //! Scalar type of the fitness (generally a double) + BaseType _value; + + //! Flag that marks if the individual is feasible + bool _is_feasible; + +public: + + //! Empty initialization + /*! + * Unfeasible by default + */ + eoDualFitness() : + _value(), + _is_feasible(false) + {} + + //! Copy constructor + eoDualFitness(const eoDualFitness& other) : + _value(other._value), + _is_feasible(other._is_feasible) + {} + + //! Constructor from explicit value/feasibility + eoDualFitness(const BaseType& v, const bool& is_feasible) : + _value(v), + _is_feasible(is_feasible) + {} + + //! From a std::pair (first element is the value, second is the feasibility) + eoDualFitness(const std::pair& dual) : + _value(dual.first), + _is_feasible(dual.second) + {} + + // FIXME is it a good idea to include implicit conversion here? + /** Conversion operator: it permits to use a fitness instance as its scalar + * type, if needed. For example, this is possible: + * eoDualFitness > fit; + * double val = 1.0; + * fit = val; + * val = fit; + */ + operator BaseType(void) const { return _value; } + + + inline bool is_feasible() const + { + return _is_feasible; + } + + inline BaseType value() const + { + return _value; + } + + //! Copy operator from a std::pair + eoDualFitness& operator=(const std::pair& v) + { + _value = v.first; + _is_feasible = v.second; + return *this; + } + + //! Copy operator from another eoDualFitness + template + eoDualFitness & operator=(const eoDualFitness& other ) + { + if (this != &other) { + this->_value = other._value; + this->_is_feasible = other._is_feasible; + } + return *this; + } + + //! Comparison that separate feasible individuals from unfeasible ones. Feasible are always better + /*! + * Use less as a default comparison operator + * (see the "Compare" template of the class to change this behaviour, + * @see eoMinimizingDualFitness for an example). + */ + bool operator<(const eoDualFitness& other) const + { + // am I better (less, by default) than the other ? + + // if I'm feasible and the other is not + if( this->_is_feasible && !other._is_feasible ) { + // no, the other has a better fitness + return false; + + } else if( !this->_is_feasible && other._is_feasible ) { + // yes, a feasible fitness is always better than an unfeasible one + return true; + + } else { + // the two fitness are of the same type + // lets rely on the comparator + return Compare()(_value, other._value); + } + } + + //! Greater: if the other is lesser than me + bool operator>( const eoDualFitness& other ) const { return other < *this; } + + //! Less or equal: if the other is not lesser than me + bool operator<=( const eoDualFitness& other ) const { return !(other < *this); } + + //! Greater or equal: if the other is not greater than me + bool operator>=(const eoDualFitness& other ) const { return !(*this < other); } + + //! Equal: if the other is equal to me + bool operator==(const eoDualFitness& other) const { return ( _is_feasible == other._is_feasible ) && ( _value == other._value ); } + +public: + + //! Add a given fitness to the current one + template + friend + eoDualFitness & operator+=( eoDualFitness & from, const eoDualFitness & that ) + { + from._value += that._value; + + // true only if the two are feasible, else false + from._is_feasible = from._is_feasible && that._is_feasible; + + return from; + } + + //! Substract a given fitness to the current one + template + friend + eoDualFitness & operator-=( eoDualFitness & from, const eoDualFitness & that ) + { + from._value -= that._value; + + // true only if the two are feasible, else false + from._is_feasible = from._is_feasible && that._is_feasible; + + return from; + } + + // Add this fitness's value to that other, and return a _new_ instance with the result. + template + eoDualFitness operator+(const eoDualFitness & that) + { + eoDualFitness from( *this ); + return from += that; + } + + // Add this fitness's value to that other, and return a _new_ instance with the result. + template + eoDualFitness operator-(const eoDualFitness & that) + { + eoDualFitness from( *this ); + return from -= that; + } + + //! Print an eoDualFitness instance as a pair of numbers, separated by a space + template + friend + std::ostream& operator<<(std::ostream& os, const eoDualFitness& f) + { + os << f._value << " " << f._is_feasible; + return os; + } + + //! Read an eoDualFitness instance as a pair of numbers, separated by a space + template + friend + std::istream& operator>>(std::istream& is, eoDualFitness& f) + { + F value; + is >> value; + + bool feasible; + is >> feasible; + + f = std::make_pair( value, feasible ); + return is; + } +}; + +//! Compare dual fitnesses as if we were maximizing +typedef eoDualFitness > eoMaximizingDualFitness; + +//! Compare dual fitnesses as if we were minimizing +typedef eoDualFitness > eoMinimizingDualFitness; + +//! A predicate that returns the feasibility of a given dual fitness +/** Use this in STL algorithm that use binary predicates (e.g. count_if, find_if, etc.) + */ +template< class EOT> +bool eoIsFeasible ( const EOT & sol ) { return sol.fitness().is_feasible(); } + + +/** Embed two eoStat and call the first one on the feasible individuals and + * the second one on the unfeasible ones, merge the two resulting value in + * a string, separated by a given marker. + */ +//template +template +class eoDualStatSwitch : public eoStat< EOT, std::string > +{ +public: + using eoStat::value; + +// eoDualStatSwitch( eoStat & stat_feasible, eoStat & stat_unfeasible, std::string sep=" " ) : + eoDualStatSwitch( EOSTAT & stat_feasible, EOSTAT & stat_unfeasible, std::string sep=" " ) : + eoStat( + "?"+sep+"?", + stat_feasible.longName()+sep+stat_unfeasible.longName() + ), + _stat_feasible(stat_feasible), + _stat_unfeasible(stat_unfeasible), + _sep(sep) + { } + + virtual void operator()( const eoPop & pop ) + { + eoPop pop_feasible; + pop_feasible.reserve(pop.size()); + + eoPop pop_unfeasible; + pop_unfeasible.reserve(pop.size()); + + for( typename eoPop::const_iterator ieot=pop.begin(), iend=pop.end(); ieot!=iend; ++ieot ) { + /* + if( ieot->invalid() ) { + eo::log << eo::errors << "ERROR: trying to access to an invalid fitness" << std::endl; + } + */ + if( ieot->fitness().is_feasible() ) { + pop_feasible.push_back( *ieot ); + } else { + pop_unfeasible.push_back( *ieot ); + } + } + + _stat_feasible( pop_feasible ); + _stat_unfeasible( pop_unfeasible ); + + std::ostringstream out; + out << _stat_feasible.value() << _sep << _stat_unfeasible.value(); + + value() = out.str(); + } + +protected: +// eoStat & _stat_feasible; +// eoStat & _stat_unfeasible; + EOSTAT & _stat_feasible; + EOSTAT & _stat_unfeasible; + + std::string _sep; +}; + +/** @} */ +#endif // _eoDualFitness_h_ diff --git a/trunk/eo/src/eoEDA.h b/trunk/eo/src/eoEDA.h new file mode 100644 index 000000000..553b751f3 --- /dev/null +++ b/trunk/eo/src/eoEDA.h @@ -0,0 +1,46 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEDA.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEDA_h +#define _eoEDA_h + +//----------------------------------------------------------------------------- + +#include + +/** The abstract class for estimation of disribution algorithms. + * This design evolve a probability distribution + * on the spaces of populations rather than a population + * + * It IS NOT an eoAlgo, as it evolves a distribution, not a population. + * + * @ingroup Algorithms +*/ + +template class eoEDA: public eoUF&, void> +{ +}; + +#endif diff --git a/trunk/eo/src/eoEasyEA.h b/trunk/eo/src/eoEasyEA.h new file mode 100644 index 000000000..2c7c5474c --- /dev/null +++ b/trunk/eo/src/eoEasyEA.h @@ -0,0 +1,322 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEasyEA.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEasyEA_h +#define _eoEasyEA_h + +//----------------------------------------------------------------------------- + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + +template class eoIslandsEasyEA ; + +template class eoDistEvalEasyEA ; + +/** An easy-to-use evolutionary algorithm; you can use any chromosome, + and any selection transformation, merging and evaluation + algorithms; you can even change in runtime parameters of those + sub-algorithms + +Change (MS, July 3. 2001): + Replaced the eoEvalFunc by an eoPopEvalFunc: this immediately + allows many useful constructs, such as co-evolution (e.g. game players), + parisian approach (the solution to the problem is the whole population) + or simple distribution of evaluations on a cluster. + In case an eoEvalFunc is passed, it is embedded on an eoPopLoopEval + This makes things a little uglier (required an additional "dummy" member + +Note: it looks ugly only because we wanted to authorize many different + constructors. Please only look at the operator() and there shall be light + + @ingroup Algorithms +*/ +template class eoEasyEA: public eoAlgo + { + public: + + /** Ctor taking a breed and merge */ + eoEasyEA( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoBreed& _breed, + eoReplacement& _replace + ) : continuator(_continuator), + eval (_eval), + loopEval(_eval), + popEval(loopEval), + selectTransform(dummySelect, dummyTransform), + breed(_breed), + mergeReduce(dummyMerge, dummyReduce), + replace(_replace), + isFirstCall(true) + {} + + /** Ctor taking a breed and merge, an overload of ctor to define an offspring size */ + eoEasyEA( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoBreed& _breed, + eoReplacement& _replace, + unsigned _offspringSize + ) : continuator(_continuator), + eval (_eval), + loopEval(_eval), + popEval(loopEval), + selectTransform(dummySelect, dummyTransform), + breed(_breed), + mergeReduce(dummyMerge, dummyReduce), + replace(_replace), + isFirstCall(true) + { + offspring.reserve(_offspringSize); // This line avoids an incremental resize of offsprings. + } + + /* + eoEasyEA(eoContinue & _continuator, + eoPopEvalFunc & _pop_eval, + eoBreed & _breed, + eoReplacement & _replace + ) : + continuator (_continuator), + eval (dummyEval), + loopEval(dummyEval), + popEval (_pop_eval), + selectTransform (dummySelect, dummyTransform), + breed (_breed), + mergeReduce (dummyMerge, dummyReduce), + replace (_replace), + isFirstCall(true) + { + + } + */ + + /** NEW Ctor taking a breed and merge and an eoPopEval */ + eoEasyEA( + eoContinue& _continuator, + eoPopEvalFunc& _eval, + eoBreed& _breed, + eoReplacement& _replace + ) : continuator(_continuator), + eval (dummyEval), + loopEval(dummyEval), + popEval(_eval), + selectTransform(dummySelect, dummyTransform), + breed(_breed), + mergeReduce(dummyMerge, dummyReduce), + replace(_replace), + isFirstCall(true) + {} + + + /// Ctor eoSelect, eoTransform, eoReplacement and an eoPopEval + eoEasyEA( + eoContinue& _continuator, + eoPopEvalFunc& _eval, + eoSelect& _select, + eoTransform& _transform, + eoReplacement& _replace + ) : continuator(_continuator), + eval (dummyEval), + loopEval(dummyEval), + popEval(_eval), + selectTransform(_select, _transform), + breed(selectTransform), + mergeReduce(dummyMerge, dummyReduce), + replace(_replace), + isFirstCall(true) + {} + + /// Ctor eoBreed, eoMerge and eoReduce. + eoEasyEA( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoBreed& _breed, + eoMerge& _merge, + eoReduce& _reduce + ) : continuator(_continuator), + eval (_eval), + loopEval(_eval), + popEval(loopEval), + selectTransform(dummySelect, dummyTransform), + breed(_breed), + mergeReduce(_merge, _reduce), + replace(mergeReduce), + isFirstCall(true) + {} + + /// Ctor eoSelect, eoTransform, and eoReplacement + eoEasyEA( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoSelect& _select, + eoTransform& _transform, + eoReplacement& _replace + ) : continuator(_continuator), + eval (_eval), + loopEval(_eval), + popEval(loopEval), + selectTransform(_select, _transform), + breed(selectTransform), + mergeReduce(dummyMerge, dummyReduce), + replace(_replace), + isFirstCall(true) + {} + + /// Ctor eoSelect, eoTransform, eoMerge and eoReduce. + eoEasyEA( + eoContinue& _continuator, + eoEvalFunc& _eval, + eoSelect& _select, + eoTransform& _transform, + eoMerge& _merge, + eoReduce& _reduce + ) : continuator(_continuator), + eval (_eval), + loopEval(_eval), + popEval(loopEval), + selectTransform(_select, _transform), + breed(selectTransform), + mergeReduce(_merge, _reduce), + replace(mergeReduce), + isFirstCall(true) + {} + + + + + /// Apply a few generation of evolution to the population. + virtual void operator()(eoPop& _pop) + { + if (isFirstCall) + { + size_t total_capacity = _pop.capacity() + offspring.capacity(); + _pop.reserve(total_capacity); + offspring.reserve(total_capacity); + isFirstCall = false; + } + + eoPop empty_pop; + + popEval(empty_pop, _pop); // A first eval of pop. + + do + { + try + { + unsigned pSize = _pop.size(); + offspring.clear(); // new offspring + + breed(_pop, offspring); + + popEval(_pop, offspring); // eval of parents + offspring if necessary + + replace(_pop, offspring); // after replace, the new pop. is in _pop + + if (pSize > _pop.size()) + throw std::runtime_error("Population shrinking!"); + else if (pSize < _pop.size()) + throw std::runtime_error("Population growing!"); + + } + catch (std::exception& e) + { + std::string s = e.what(); + s.append( " in eoEasyEA"); + throw std::runtime_error( s ); + } + } + while ( continuator( _pop ) ); + } + + protected : + + // If selectTransform needs not be used, dummySelect and dummyTransform are used + // to instantiate it. + class eoDummySelect : public eoSelect + { + public : + void operator()(const eoPop&, eoPop&) + {} + } + dummySelect; + + class eoDummyTransform : public eoTransform + { + public : + void operator()(eoPop&) + {} + } + dummyTransform; + + class eoDummyEval : public eoEvalFunc + { + public: + void operator()(EOT &) + {} + } + dummyEval; + + eoContinue& continuator; + + eoEvalFunc & eval ; + eoPopLoopEval loopEval; + + eoPopEvalFunc& popEval; + + eoSelectTransform selectTransform; + eoBreed& breed; + + // If mergeReduce needs not be used, dummyMerge and dummyReduce are used + // to instantiate it. + eoNoElitism dummyMerge; + eoTruncate dummyReduce; + + eoMergeReduce mergeReduce; + eoReplacement& replace; + + eoPop offspring; + + bool isFirstCall; + + // Friend classes + friend class eoIslandsEasyEA ; + friend class eoDistEvalEasyEA ; +}; +/** +@example t-eoEasyEA.cpp +Example of a test program building an EA algorithm. +*/ + +#endif diff --git a/trunk/eo/src/eoEasyPSO.h b/trunk/eo/src/eoEasyPSO.h new file mode 100644 index 000000000..da071bc02 --- /dev/null +++ b/trunk/eo/src/eoEasyPSO.h @@ -0,0 +1,196 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEasyPSO.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _EOEASYPSO_H +#define _EOEASYPSO_H + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** An easy-to-use particle swarm algorithm. +* Use any particle, any flight, any topology... +* +* The main steps are : +* (The population is expected to be already evaluated) +* - for each generation and each particle pi +* - evaluate the velocities +* -- perform the fligth of pi +* -- evaluate pi +* -- update the neighborhoods +* +* @ingroup Algorithms +*/ +template < class POT > class eoEasyPSO:public eoPSO < POT > +{ +public: + + /** Full constructor + * @param _init - An eoInitializerBase that initializes the topology, velocity, best particle(s) + * @param _continuator - An eoContinue that manages the stopping criterion and the checkpointing system + * @param _eval - An eoEvalFunc: the evaluation performer + * @param _velocity - An eoVelocity that defines how to compute the velocities + * @param _flight - An eoFlight that defines how to make the particle flying: that means how + * to modify the positions according to the velocities + */ + eoEasyPSO ( + eoInitializerBase &_init, + eoContinue < POT > &_continuator, + eoEvalFunc < POT > &_eval, + eoVelocity < POT > &_velocity, + eoFlight < POT > &_flight): + init(_init), + continuator (_continuator), + eval (_eval), + velocity (_velocity), + flight (_flight) + {} + + + /** Constructor without eoFlight. For special cases when the flight is performed withing the velocity. + * @param _init - An eoInitializerBase that initializes the topology, velocity, best particle(s) + * @param _continuator - An eoContinue that manages the stopping criterion and the checkpointing system + * @param _eval - An eoEvalFunc: the evaluation performer + * @param _velocity - An eoVelocity that defines how to compute the velocities + */ + eoEasyPSO ( + eoInitializerBase &_init, + eoContinue < POT > &_continuator, + eoEvalFunc < POT > &_eval, + eoVelocity < POT > &_velocity): + init(_init), + continuator (_continuator), + eval (_eval), + velocity (_velocity), + flight (dummyFlight) + {} + + + /* Constructor without eoInitializerBase. Assume the initialization is done before running the algorithm + * @param _continuator - An eoContinue that manages the stopping criterion and the checkpointing system + * @param _eval - An eoEvalFunc: the evaluation performer + * @param _velocity - An eoVelocity that defines how to compute the velocities + * @param _flight - An eoFlight that defines how to make the particle flying: that means how + * to modify the positions according to the velocities + */ + eoEasyPSO ( + eoContinue < POT > &_continuator, + eoEvalFunc < POT > &_eval, + eoVelocity < POT > &_velocity, + eoFlight < POT > &_flight): + init(dummyInit), + continuator (_continuator), + eval (_eval), + velocity (_velocity), + flight (_flight) + {} + + + /** Constructor without eoFlight nor eoInitializerBase. For special cases when the flight is performed withing the velocity. + * @param _continuator - An eoContinue that manages the stopping criterion and the checkpointing system + * @param _eval - An eoEvalFunc: the evaluation performer + * @param _velocity - An eoVelocity that defines how to compute the velocities + */ + eoEasyPSO ( + eoContinue < POT > &_continuator, + eoEvalFunc < POT > &_eval, + eoVelocity < POT > &_velocity): + init(dummyInit), + continuator (_continuator), + eval (_eval), + velocity (_velocity), + flight (dummyFlight) + {} + + /// Apply a few iteration of flight to the population (=swarm). + virtual void operator () (eoPop < POT > &_pop) + { + try + { + // initializes the topology, velocity, best particle(s) + init(); + do + { + // loop over all the particles for the current iteration + for (unsigned idx = 0; idx < _pop.size (); idx++) + { + // perform velocity evaluation + velocity (_pop[idx],idx); + + // apply the flight + flight (_pop[idx]); + + // evaluate the position + eval (_pop[idx]); + + // update the topology (particle and local/global best(s)) + velocity.updateNeighborhood(_pop[idx],idx); + } + + } + while (continuator (_pop)); + + } + catch (std::exception & e) + { + std::string s = e.what (); + s.append (" in eoEasyPSO"); + throw std::runtime_error (s); + } + + } + +protected: + eoInitializerBase &init; + eoContinue < POT > &continuator; + eoEvalFunc < POT > &eval; + eoVelocity < POT > &velocity; + eoFlight < POT > &flight; + + // if the flight does not need to be used, use the dummy flight instance + class eoDummyFlight:public eoFlight < POT > + { + public: + eoDummyFlight () {} + void operator () (POT & _po) {} + }dummyFlight; + + // if the initializer does not need to be used, use the dummy one instead + class eoDummyInitializer:public eoInitializerBase < POT > + { + public: + eoDummyInitializer () {} + void operator () (POT & _po) {} + }dummyInit; + +}; +/** + * @example t-eoEasyPSO.cpp + * Example of a test program building a PSO algorithm. + */ + +#endif /*_EOEASYPSO_H*/ diff --git a/trunk/eo/src/eoEvalContinue.h b/trunk/eo/src/eoEvalContinue.h new file mode 100644 index 000000000..ef74e0758 --- /dev/null +++ b/trunk/eo/src/eoEvalContinue.h @@ -0,0 +1,69 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEvalContinue.h +// (c) GeNeura Team, 1999, Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEvalContinue_h +#define _eoEvalContinue_h + +#include +#include + +/** + * Continues until a number of evaluations has been made + * + * @ingroup Continuators +*/ +template< class EOT> +class eoEvalContinue: public eoContinue +{ +public: + /// Ctor + eoEvalContinue( eoEvalFuncCounter & _eval, unsigned long _totalEval) + : eval(_eval), repTotalEvaluations( _totalEval ) {}; + + /** Returns false when a certain number of evaluations has been done + */ + virtual bool operator() ( const eoPop& _vEO ) { + (void)_vEO; + if (eval.value() >= repTotalEvaluations) + { + eo::log << eo::progress << "STOP in eoEvalContinue: Reached maximum number of evaluations [" << repTotalEvaluations << "]" << std::endl; + return false; + } + return true; + } + + /** Returns the number of generations to reach*/ + virtual unsigned long totalEvaluations( ) + { + return repTotalEvaluations; + }; + + virtual std::string className(void) const { return "eoEvalContinue"; } +private: + eoEvalFuncCounter & eval; + unsigned long repTotalEvaluations; +}; + +#endif diff --git a/trunk/eo/src/eoEvalCounterThrowException.h b/trunk/eo/src/eoEvalCounterThrowException.h new file mode 100644 index 000000000..4eb4fccc4 --- /dev/null +++ b/trunk/eo/src/eoEvalCounterThrowException.h @@ -0,0 +1,86 @@ +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Johann Dréo +Caner Candan + +*/ + +#ifndef __eoEvalCounterThrowException_h__ +#define __eoEvalCounterThrowException_h__ + +#include +#include +#include + +/*! +Wrap an evaluation function so that an exception may be thrown when the +algorithm have reached a maximum number of evaluations. + +This may be useful if you want to check this kind of stopping criterion +at each _evaluation_, instead of using continuators at each _iteration_. + +The class first call the evaluation function, then check the number of +times it has been called. If the maximum number of evaluation has been +reached, it throw an eoMaxEvalException. You can catch this exception +from your main function, so as to stop everything properly. + +@ingroup Evaluation +*/ +template < typename EOT > +class eoEvalCounterThrowException : public eoEvalFuncCounter< EOT > +{ +public : + eoEvalCounterThrowException( eoEvalFunc& func, unsigned long max_evals, std::string name = "Eval. ") + : eoEvalFuncCounter< EOT >( func, name ), _threshold( max_evals ) + {} + + using eoEvalFuncCounter< EOT >::value; + + //! Evaluate the individual, then throw an exception if it exceed the max number of evals. + virtual void operator()(EOT& eo) + { + // bypass already evaluated individuals + if (eo.invalid()) { + + // increment the value of the self parameter + // (eoEvalFuncCounter inherits from @see eoValueParam) + value()++; + + // if we have reached the maximum + if ( value() >= _threshold ) { + + // go back through the stack until catched + throw eoMaxEvalException(_threshold); + } + + // evaluate + func(eo); + + } // if invalid + } + + virtual std::string className() const {return "eoEvalCounterThrowException";} + +private : + unsigned long _threshold; +}; + +#endif // __eoEvalCounterThrowException_h__ diff --git a/trunk/eo/src/eoEvalFunc.h b/trunk/eo/src/eoEvalFunc.h new file mode 100644 index 000000000..b05b667b2 --- /dev/null +++ b/trunk/eo/src/eoEvalFunc.h @@ -0,0 +1,55 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEvalFunc.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoEvalFunc_H +#define eoEvalFunc_H + +#include + +/** @defgroup Evaluation Evaluation + * @ingroup Operators + */ + +/** Evaluate: takes one EO and sets its "fitness" property + returning this fitness also. That is why EOT is passed by + non-const reference: it must be altered within evaluate.\\ + + The requirements on the types with which this class is to be + instantiated with are null, or else, they depend on the particular + class it's going to be applied to; EO does not impose any requirement + on it. If you subclass this abstract class, and use it to evaluate an + EO, the requirements on this EO will depend on the evaluator. + + @ingroup Evaluation + @ingroup Core + */ +template class eoEvalFunc : public eoUF +{ + public : + typedef EOT EOType; + + typedef typename EOT::Fitness EOFitT; +}; + +#endif diff --git a/trunk/eo/src/eoEvalFuncCounter.h b/trunk/eo/src/eoEvalFuncCounter.h new file mode 100644 index 000000000..a63821d61 --- /dev/null +++ b/trunk/eo/src/eoEvalFuncCounter.h @@ -0,0 +1,57 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEvalFuncCounter.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoEvalFuncCounter_H +#define eoEvalFuncCounter_H + +#include +#include + +/** +Counts the number of evaluations actually performed. + +@ingroup Evaluation +*/ +template class eoEvalFuncCounter : public eoEvalFunc, public eoValueParam +{ + public : + eoEvalFuncCounter(eoEvalFunc& _func, std::string _name = "Eval. ") + : eoValueParam(0, _name), func(_func) {} + + virtual void operator()(EOT& _eo) + { + if (_eo.invalid()) + { + value()++; + func(_eo); + } + } + + protected : + eoEvalFunc& func; +}; + +#endif diff --git a/trunk/eo/src/eoEvalFuncCounterBounder.h b/trunk/eo/src/eoEvalFuncCounterBounder.h new file mode 100644 index 000000000..1c8a29b15 --- /dev/null +++ b/trunk/eo/src/eoEvalFuncCounterBounder.h @@ -0,0 +1,67 @@ +#ifndef eoEvalFuncCounterBounder_H +#define eoEvalFuncCounterBounder_H + +#include +#include + +/** @addtogroup Evaluation + * @{ + */ + +/** The exception raised by eoEvalFuncCounterBounder + * when the maximum number of allowed evaluations is reached. + */ +class eoEvalFuncCounterBounderException : public std::exception +{ +public: + eoEvalFuncCounterBounderException(unsigned long threshold) : _threshold(threshold){} + + const char* what() const throw() + { + std::ostringstream ss; + ss << "STOP in eoEvalFuncCounterBounderException: the maximum number of evaluation has been reached (" << _threshold << ")."; + return ss.str().c_str(); + } + +private: + unsigned long _threshold; +}; + +/** Counts the number of evaluations actually performed and throw an eoEvalFuncCounterBounderException + * when the maximum number of allowed evaluations is reached. + * + * This eval counter permits to stop a search during a generation, without waiting for a continue to be + * checked at the end of the loop. Useful if you have 10 individuals and 10 generations, + * but want to stop after 95 evaluations. +*/ +template < typename EOT > +class eoEvalFuncCounterBounder : public eoEvalFuncCounter< EOT > +{ +public : + eoEvalFuncCounterBounder(eoEvalFunc& func, unsigned long threshold, std::string name = "Eval. ") + : eoEvalFuncCounter< EOT >( func, name ), _threshold( threshold ) + {} + + using eoEvalFuncCounter< EOT >::value; + + virtual void operator()(EOT& eo) + { + if (eo.invalid()) + { + value()++; + + if (_threshold > 0 && value() >= _threshold) + { + throw eoEvalFuncCounterBounderException(_threshold); + } + + func(eo); + } + } + +private : + unsigned long _threshold; +}; + +/** @} */ +#endif diff --git a/trunk/eo/src/eoEvalFuncPtr.h b/trunk/eo/src/eoEvalFuncPtr.h new file mode 100644 index 000000000..f4952c212 --- /dev/null +++ b/trunk/eo/src/eoEvalFuncPtr.h @@ -0,0 +1,67 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoEvalFuncPtr.h + Converts a classical C fitness evaluation function into a fitness + evaluation object + + (c) GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOEVALFUNCPTR_H +#define EOEVALFUNCPTR_H + +#include + +/** EOEvalFuncPtr: This class + * takes an existing function pointer and converts it into a evaluation + * function class. That way, old style C or C++ functions can be adapted to EO + * function classes. + * + * @ingroup Evaluation + */ +#ifdef _MSC_VER +template< class EOT, class FitT = EOT::Fitness, class FunctionArg = const EOT& > +#else +template< class EOT, class FitT = typename EOT::Fitness, class FunctionArg = const EOT& > +#endif +struct eoEvalFuncPtr: public eoEvalFunc { + + /** Applies the function to the chromosome and sets the fitness of the + Chrom. Thus, the evaluation function need not be worried about that. + @param _eval pointer to the evaluation function, takes a EOT as an + argument and returns the fitness + @return the evaluated fitness for that object. + */ + eoEvalFuncPtr( FitT (* _eval)( FunctionArg ) ) + : eoEvalFunc(), evalFunc( _eval ) {}; + + /// Effectively applies the evaluation function to an EO + virtual void operator() ( EOT & _eo ) + { + if (_eo.invalid()) + _eo.fitness((*evalFunc)( _eo )); + }; + + private: + FitT (* evalFunc )( FunctionArg ); +}; + +#endif diff --git a/trunk/eo/src/eoEvalTimeThrowException.h b/trunk/eo/src/eoEvalTimeThrowException.h new file mode 100644 index 000000000..be0e149a2 --- /dev/null +++ b/trunk/eo/src/eoEvalTimeThrowException.h @@ -0,0 +1,59 @@ +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Johann Dréo +*/ + +#include + +#include + +/** Check at each evaluation if a given tie contract has been reached. + * + * Throw an eoMaxTimeException if the given max time has been reached. + * Usefull if you want to end the search independently of generations. + * + * @ingroup Evaluation + */ +template< class EOT > +class eoEvalTimeThrowException : public eoEvalFuncCounter< EOT > +{ +public: + eoEvalTimeThrowException( eoEvalFunc & func, time_t max ) : _max(max), _start( std::time(NULL) ), eoEvalFuncCounter( func, "Eval.") {} + + virtual void operator() ( EOT & eo ) + { + if( eo.invalid() ) { + + time_t elapsed = static_cast( std::difftime( std::time(NULL) , _start ) ); + + if( elapsed >= _max ) { + throw eoMaxTimeException(elapsed); + } else { + func(eo); + } + } + } + +protected: + time_t _max; + + time_t _start; +}; diff --git a/trunk/eo/src/eoEvalUserTimeThrowException.h b/trunk/eo/src/eoEvalUserTimeThrowException.h new file mode 100644 index 000000000..2cf72f6c1 --- /dev/null +++ b/trunk/eo/src/eoEvalUserTimeThrowException.h @@ -0,0 +1,73 @@ +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Johann Dréo +*/ + + +#ifndef __unix__ +/*#warning "Warning: class 'eoEvalUserTimeThrowException' is only available under UNIX systems (defining 'rusage' in 'sys/resource.h'), contributions for other systems are welcomed."*/ +#else + +#ifndef __EOEVALUSERTIMETHROWEXCEPTION_H__ +#define __EOEVALUSERTIMETHROWEXCEPTION_H__ + +#include +#include + +#include + +/** Check at each evaluation if a given CPU user time contract has been reached. + * + * Throw an eoMaxTimeException if the given max time has been reached. + * Usefull if you want to end the search independently of generations. + * This class uses (almost-)POSIX headers. + * It uses a computation of the user time used on the CPU. For a wallclock time measure, see eoEvalTimeThrowException + * + * @ingroup Evaluation + */ +template< class EOT > +class eoEvalUserTimeThrowException : public eoEvalFuncCounter< EOT > +{ +public: + eoEvalUserTimeThrowException( eoEvalFunc & func, const long max ) : eoEvalFuncCounter( func, "CPU-user"), _max(max) {} + + virtual void operator() ( EOT & eo ) + { + if( eo.invalid() ) { + + getrusage(RUSAGE_SELF,&_usage); + + long current = _usage.ru_utime.tv_sec; + if( current >= _max ) { + throw eoMaxTimeException( current ); + } else { + func(eo); + } + } + } + +protected: + const long _max; + struct rusage _usage; +}; + +#endif // __EOEVALUSERTIMETHROWEXCEPTION_H__ +#endif // __UNIX__ diff --git a/trunk/eo/src/eoExceptions.h b/trunk/eo/src/eoExceptions.h new file mode 100644 index 000000000..4d56ddb95 --- /dev/null +++ b/trunk/eo/src/eoExceptions.h @@ -0,0 +1,132 @@ +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Johann Dréo +*/ + +#ifndef __eoExceptions_h__ +#define __eoExceptions_h__ + +#include +#include + +class eoMaxException : public std::exception {}; + + + +/*! +An error that signals that a maximum elapsed time has been reached. + +Thrown by @see eoEvalTimeThrowException + +@ingroup Evaluation +*/ +class eoMaxTimeException : public eoMaxException +{ +public: + eoMaxTimeException( time_t elapsed) : _elapsed(elapsed) {} + + virtual const char* what() const throw() + { + std::ostringstream ss; + ss << "STOP in eoMaxTimeException: the maximum number of allowed seconds has been reached (" << _elapsed << ")."; + return ss.str().c_str(); + } + +private: + time_t _elapsed; +}; + + +/*! +An error that signals that a maximum number of evaluations has been reached. + +Thrown by @see eoEvalEvalThrowException + +@ingroup Evaluation +*/ +class eoMaxEvalException : public eoMaxException +{ +public: + eoMaxEvalException(unsigned long threshold) : _threshold(threshold){} + + virtual const char* what() const throw() + { + std::ostringstream ss; + ss << "STOP in eoMaxEvalException: the maximum number of evaluation has been reached (" << _threshold << ")."; + return ss.str().c_str(); + } + +private: + unsigned long _threshold; +}; + + +/*! + * An error that signals a missing parameter + * + * Thrown by eoParser::getParam + * + * @ingroup Parameters + */ +class eoMissingParamException : public std::exception +{ +public: + eoMissingParamException(std::string name) : _name(name){} + + virtual const char* what() const throw() + { + std::ostringstream ss; + ss << "The command parameter " << _name << " has not been declared"; + return ss.str().c_str(); + } + + ~eoMissingParamException() throw() {} + +private: + std::string _name; +}; + +/*! + * An error that signals a bad parameter type + * + * Thrown by eoParser::valueOf + * + * @ingroup Parameters + */ +class eoWrongParamTypeException : public std::exception +{ +public: + eoWrongParamTypeException(std::string name) : _name(name){} + + virtual const char* what() const throw() + { + std::ostringstream ss; + ss << "You asked for the parameter " << _name << " but it has not been declared under this type"; + return ss.str().c_str(); + } + + ~eoWrongParamTypeException() throw() {} + +private: + std::string _name; +}; + +#endif // __eoExceptions_h__ diff --git a/trunk/eo/src/eoExtendedVelocity.h b/trunk/eo/src/eoExtendedVelocity.h new file mode 100644 index 000000000..e7667204c --- /dev/null +++ b/trunk/eo/src/eoExtendedVelocity.h @@ -0,0 +1,213 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoExtendedVelocity.h +// (c) INRIA Dolphin 2008 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoExtendedVelocity_H +#define eoExtendedVelocity_H + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + + +/** Extended velocity performer for particle swarm optimization. + * + * Derivated from abstract eoVelocity, +* At step t: v(t+1)= w * v(t) + c1 * r1 * ( xbest(t)-x(t) ) + c2 * r2 * ( lbest(t) - x(t) ) + c3 * r3 * ( gbest(t) - x(t) ) +* It includes both a "topology" best and a global best in the social knowledge. Each topology +* provides a method to retrieve the global best <=> the best of all the neighborhood the topology contains. +* +* @ingroup Variators +*/ +template < class POT > class eoExtendedVelocity:public eoVelocity < POT > +{ + +public: + + /* + * Each element for the velocity evaluation is expected to be of type VelocityType. + */ + typedef typename POT::ParticleVelocityType VelocityType; + + /** Full constructor: Bounds and bound modifier required + * @param _topology - The topology + * @param _w - The weight factor. + * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - Learning factor used for the local best + * @param _c3 - Learning factor used for the global best + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _gen - The eo random generator, default=rng + */ + eoExtendedVelocity (eoTopology < POT > & _topology, + const VelocityType & _w, + const VelocityType & _c1, + const VelocityType & _c2, + const VelocityType & _c3, + eoRealVectorBounds & _bounds, + eoRealBoundModifier & _bndsModifier, + eoRng & _gen = rng): + topology(_topology), + omega (_w), + c1 (_c1), + c2 (_c2), + c3 (_c3), + bounds(_bounds), + bndsModifier(_bndsModifier), + gen(_gen){} + + + /** Constructor: No bound updater required <-> fixed bounds + * @param _topology - The topology + * @param _w - The weight factor. + * @param _c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The third learning factor used for the local best. Type must be POT::ParticleVelocityType + * @param _c3 - Learning factor used for the global best + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _gen - The eo random generator, default=rng + */ + eoExtendedVelocity (eoTopology < POT > & _topology, + const VelocityType & _w, + const VelocityType & _c1, + const VelocityType & _c2, + const VelocityType & _c3, + eoRealVectorBounds & _bounds, + eoRng & _gen = rng): + topology(_topology), + omega (_w), + c1 (_c1), + c2 (_c2), + c3 (_c3), + bounds(_bounds), + bndsModifier(dummyModifier), + gen(_gen){} + + + /** Constructor: Neither bounds nor bound updater required <-> free velocity + * @param _topology - The topology + * @param _w - The weight factor. + * @param _c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The third learning factor used for the local best. Type must be POT::ParticleVelocityType + * @param _c3 - Learning factor used for the global best + * @param _gen - The eo random generator, default=rng + */ + eoExtendedVelocity (eoTopology < POT > & _topology, + const VelocityType & _w, + const VelocityType & _c1, + const VelocityType & _c2, + const VelocityType & _c3, + eoRng & _gen = rng): + topology(_topology), + omega (_w), + c1 (_c1), + c2 (_c2), + c3 (_c3), + bounds(*(new eoRealVectorNoBounds(0))), + bndsModifier(dummyModifier), + gen(_gen) + {} + + + /** + * Evaluate the new velocities of the given particle. Need an indice to identify the particle + * into the topology. + * @param _po - A particle + * @param _indice - The indice (into the topology) of the given particle + */ + void operator () (POT & _po,unsigned _indice) + { + VelocityType r1; + VelocityType r2; + VelocityType r3; + + VelocityType newVelocity; + + // cast the learning factors to VelocityType + r1 = (VelocityType) rng.uniform (1) * c1; + r2 = (VelocityType) rng.uniform (1) * c2; + r3 = (VelocityType) rng.uniform (1) * c3; + + // need to resize the bounds even if there are dummy because of "isBounded" call + bounds.adjust_size(_po.size()); + + // assign the new velocities + for (unsigned j = 0; j < _po.size (); j++) + { + newVelocity= omega * _po.velocities[j] + + r1 * (_po.bestPositions[j] - _po[j]) + + r2 * (topology.best (_indice)[j] - _po[j]) + + r3 * (topology.globalBest()[j] - _po[j]); + + /* check bounds */ + if (bounds.isMinBounded(j)) + newVelocity=std::max(newVelocity,bounds.minimum(j)); + if (bounds.isMaxBounded(j)) + newVelocity=std::min(newVelocity,bounds.maximum(j)); + + _po.velocities[j]=newVelocity; + } + } + + /** + * Update the neighborhood. + */ + void updateNeighborhood(POT & _po,unsigned _indice) + { + topology.updateNeighborhood(_po,_indice); + } + + //! eoTopology getTopology + //! @return topology + + eoTopology & getTopology () + { + return topology; + } + +protected: + eoTopology < POT > & topology; + const VelocityType & omega; // social/cognitive coefficient + const VelocityType & c1; + const VelocityType & c2; // social/cognitive coefficient + const VelocityType & c3; // social/cognitive coefficient + + eoRealVectorBounds bounds; // REAL bounds even if the velocity could be of another type. + eoRealBoundModifier & bndsModifier; + + eoRng & gen; // the random generator + + // If the bound modifier doesn't need to be used, use the dummy instance + eoDummyRealBoundModifier dummyModifier; +}; +/** @todo this example does not appear in the doc for an unknown reason + * @example t-eoExtendedVelocity.cpp + * Example of a test program using this class: +*/ +#endif /*eoExtendedVelocity_H */ diff --git a/trunk/eo/src/eoFactory.h b/trunk/eo/src/eoFactory.h new file mode 100644 index 000000000..73a8faf1b --- /dev/null +++ b/trunk/eo/src/eoFactory.h @@ -0,0 +1,75 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFactory.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOFACTORY_H +#define _EOFACTORY_H + +//----------------------------------------------------------------------------- +#include + +//----------------------------------------------------------------------------- + +/** EO Factory. A factory is used to create other objects. In particular, +it can be used so that objects of that kind can´t be created in any other +way. It should be instantiated with anything that needs a factory, like selectors +or whatever; but the instance class should be the parent class from which all the +object that are going to be created descend. This class basically defines an interface, +as usual. The base factory class for each hierarchy should be redefined every time a new +object is added to the hierarchy, which is not too good, but in any case, some code would +have to be modified + +@ingroup Utilities +*/ +template +class eoFactory: public eoObject { + +public: + + /// @name ctors and dtors + //{@ + /// constructor + eoFactory( ) {} + + /// destructor + virtual ~eoFactory() {} + //@} + + /** Another factory methods: creates an object from an std::istream, reading from + it whatever is needed to create the object. Usually, the format for the std::istream will be\\ + objectType parameter1 parameter2 ... parametern\\ + */ + virtual EOClass* make(std::istream& _is) = 0; + + ///@name eoObject methods + //@{ + /** Return the class id */ + virtual std::string className() const { return "eoFactory"; } + + /** Read and print are left without implementation */ + //@} + +}; + + +#endif diff --git a/trunk/eo/src/eoFitContinue.h b/trunk/eo/src/eoFitContinue.h new file mode 100644 index 000000000..2db88f80b --- /dev/null +++ b/trunk/eo/src/eoFitContinue.h @@ -0,0 +1,69 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFitContinue.h +// (c) Maarten Keijzer, GeNeura Team, 1999, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFitContinue_h +#define _eoFitContinue_h + +#include +#include + +/** +Continues until the optimum fitness level is reached. + +All types which derive from eoScalarFitness is able to compare well via the operator override ( <, >, <=, ...) + + @ingroup Continuators +*/ +template< class EOT> +class eoFitContinue: public eoContinue { +public: + + /// Define Fitness + typedef typename EOT::Fitness FitnessType; + + /// Ctor + eoFitContinue( const FitnessType _optimum) + : eoContinue (), optimum( _optimum ) {}; + + /** Returns false when a fitness criterium is reached. Assumes pop is not sorted! */ + virtual bool operator() ( const eoPop& _pop ) + { + //FitnessType bestCurrentFitness = _pop.nth_element_fitness(0); + FitnessType bestCurrentFitness = _pop.best_element().fitness(); + if (bestCurrentFitness >= optimum) + { + eo::log << eo::logging << "STOP in eoFitContinue: Best fitness has reached " << + bestCurrentFitness << "\n"; + return false; + } + return true; + } + + virtual std::string className(void) const { return "eoFitContinue"; } + +private: + FitnessType optimum; +}; + +#endif diff --git a/trunk/eo/src/eoFitnessScalingSelect.h b/trunk/eo/src/eoFitnessScalingSelect.h new file mode 100644 index 000000000..c17532019 --- /dev/null +++ b/trunk/eo/src/eoFitnessScalingSelect.h @@ -0,0 +1,55 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFitnessScalingSelect.h +// (c) GeNeura Team, 1998, Maarten Keijzer 2000, Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoFitnessScalingSelect_h +#define eoFitnessScalingSelect_h + +//----------------------------------------------------------------------------- + +#include +#include + +/** eoFitnessScalingSelect: select an individual proportional to the + * linearly scaled fitness that is computed by the private + * eoLinearFitScaling object + * + * @ingroup Selectors +*/ +template +class eoFitnessScalingSelect: public eoRouletteWorthSelect +{ +public: + /** Ctor: + * @param _p the selective pressure, should be in [1,2] (2 is the default) + */ + eoFitnessScalingSelect(double _p = 2.0): + eoRouletteWorthSelect(scaling), scaling(_p) {} + +private : + eoLinearFitScaling scaling; // derived from eoPerf2Worth +}; + +#endif diff --git a/trunk/eo/src/eoFixedInertiaWeightedVelocity.h b/trunk/eo/src/eoFixedInertiaWeightedVelocity.h new file mode 100644 index 000000000..291c85a09 --- /dev/null +++ b/trunk/eo/src/eoFixedInertiaWeightedVelocity.h @@ -0,0 +1,191 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFixedInertiaWeightedVelocity.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOFIXEDINERTIAWEIGHTEDVELOCITY_H +#define EOFIXEDINERTIAWEIGHTEDVELOCITY_H + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + + +/** Inertia weight based velocity performer. Derivated from abstract eoVelocity, +* At step t+1 : v(t+1)= w * v(t) + c1*r1 * (xbest(t)-x(t)) + c2*r2 * (gbest(t) - x(t)) +* w is fixed for all the particles and all the generations. +* (ci and w given; Ri chosen at random * in [0;1]) +* +* @ingroup Variators +*/ +template < class POT > class eoFixedInertiaWeightedVelocity:public eoVelocity < POT > +{ + +public: + + /* + * Each element for the velocity evaluation is expected to be of type VelocityType. + */ + typedef typename POT::ParticleVelocityType VelocityType; + + /** Full constructor: Bounds and bound modifier required + * @param _topology - The topology to get the global/local/other best + * @param _weight - The weight with type VelocityType + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _gen - The eo random generator, default=rng + */ + eoFixedInertiaWeightedVelocity (eoTopology < POT > & _topology, + const VelocityType & _weight, + const VelocityType & _c1, + const VelocityType & _c2 , + eoRealVectorBounds & _bounds, + eoRealBoundModifier & _bndsModifier, + eoRng & _gen = rng): + topology(_topology), + weight(_weight), + c1 (_c1), + c2 (_c2), + bounds(_bounds), + bndsModifier(_bndsModifier), + gen(_gen){} + + + /** Constructor: No bound updater required <-> fixed bounds + * @param _topology - The topology to get the global/local/other best + * @param _weight - The weight with type VelocityType + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _gen - The eo random generator, default=rng + */ + eoFixedInertiaWeightedVelocity (eoTopology < POT > & _topology, + const VelocityType & _weight, + const VelocityType & _c1, + const VelocityType & _c2, + eoRealVectorBounds & _bounds, + eoRng & _gen = rng): + topology(_topology), + weight(_weight), + c1 (_c1), + c2 (_c2), + bounds(_bounds), + bndsModifier(dummyModifier), + gen(_gen){} + + + /** Constructor: Neither bounds nor bound updater required <-> free velocity + * @param _topology - The topology to get the global/local/other best + * @param _weight - The weight with type VelocityType + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _gen - The eo random generator, default=rng + */ + eoFixedInertiaWeightedVelocity (eoTopology < POT > & _topology, + const VelocityType & _weight, + const VelocityType & _c1, + const VelocityType & _c2, + eoRng & _gen = rng): + topology(_topology), + weight(_weight), + c1 (_c1), + c2 (_c2), + bounds(*(new eoRealVectorNoBounds(0))), + bndsModifier(dummyModifier), + gen(_gen) + {} + + /** + * Evaluate the new velocities of the given particle. Need an indice to identify the particle + * into the topology. Steps are : + * - evaluate r1 and r2, the customed learning factors + * - adjust the size of the bounds (even if dummy) + * - modify the bounds with the bounds modifier (use the dummy modifier if there's no modifier provided) + * @param _po - A particle + * @param _indice - The indice (into the topology) of the given particle + */ + void operator () (POT & _po,unsigned _indice) + { + VelocityType r1; + VelocityType r2; + + VelocityType newVelocity; + + // cast the learning factors to VelocityType + r1 = (VelocityType) rng.uniform (1) * c1; + r2 = (VelocityType) rng.uniform (1) * c2; + + // need to resize the bounds even if there are dummy because of "isBounded" call + bounds.adjust_size(_po.size()); + + // assign the new velocities + for (unsigned j = 0; j < _po.size (); j++) + { + newVelocity= weight * _po.velocities[j] + r1 * (_po.bestPositions[j] - _po[j]) + r2 * (topology.best (_indice)[j] - _po[j]); + + /* modify the bounds */ + bndsModifier(bounds,j); + + /* check bounds */ + if (bounds.isMinBounded(j)) + newVelocity=(VelocityType)std::max(newVelocity,bounds.minimum(j)); + if (bounds.isMaxBounded(j)) + newVelocity=(VelocityType)std::min(newVelocity,bounds.maximum(j)); + + _po.velocities[j]=newVelocity; + } + } + + /** + * Update the neighborhood. + */ + void updateNeighborhood(POT & _po,unsigned _indice) + { + topology.updateNeighborhood(_po,_indice); + } + + + +protected: + eoTopology < POT > & topology; + const VelocityType & c1; // learning factor 1 + const VelocityType & c2; // learning factor 2 + const VelocityType & weight; // the fixed weight + eoRng & gen; // the random generator + + eoRealVectorBounds & bounds; // REAL bounds even if the velocity could be of another type. + eoRealBoundModifier & bndsModifier; + + // If the bound modifier doesn't need to be used, use the dummy instance + eoDummyRealBoundModifier dummyModifier; +}; + + +#endif /*EOFIXEDINERTIAWEIGHTEDVELOCITY_H */ diff --git a/trunk/eo/src/eoFlOrBinOp.h b/trunk/eo/src/eoFlOrBinOp.h new file mode 100644 index 000000000..bcdc9c5c1 --- /dev/null +++ b/trunk/eo/src/eoFlOrBinOp.h @@ -0,0 +1,224 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFlOrBinOp.h +// (c) Marc Schoenauer - Maarten Keijzer 2000-2003 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + mkeijzer@cs.vu.nl + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFlOrBinOp_h +#define _eoFlOrBinOp_h + +#include +#include + +/** @addtogroup Variators + * @{ + */ + +/** Generic eoBinOps on fixed length genotypes. + * Contains exchange crossovers (1pt and uniform) + * and crossovers that applies an Atom crossover + * to all components with given rate, or + * to a fixed prescribed nb of components + * + * Example: the standard bitstring 1-point and uniform crossovers + * could be implemented as resp. eoFlOr1ptBinOp and eoFlOrUniformBinOp +*/ + +////////////////////////////////////////////////////////////////////// +// eoFlOrAllAtomBinOp +////////////////////////////////////////////////////////////////////// +/** Bin Crossover using an Atom Crossover + * that is applied to a ALL components with given rate + */ +template +class eoFlOrAllAtomBinOp : public eoBinOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires an Atom BinOp */ + eoFlOrAllAtomBinOp( eoBinOp& _op, float _rate = 1.0): + op(_op), rate( _rate ) {} + + /** applies Atom crossover to ALL components with given rate */ + bool operator()(EOT & _eo1, const EOT & _eo2) + { + if (_eo1.size() != _eo2.size()) + { + string s = "Operand size don't match in " + className(); + throw runtime_error(s); + } + bool changed = false; + for ( unsigned i = 0; i < _eo1.size(); i++ ) { + if ( rng.flip( rate ) ) { + bool changedHere = op( _eo1[i], _eo2[i] ); + changed |= changedHere; + } + } + return changed; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOrAllAtomBinOp"; } + +private: + double rate; + eoBinOp & op; +}; + +////////////////////////////////////////////////////////////////////// +// eoFlOrKAtomBinOp +////////////////////////////////////////////////////////////////////// +/** Bin Crossover using an Atom Crossover + * that is applied to a FIXED NB of components + */ +template +class eoFlOrKAtomBinOp : public eoBinOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires an Atom BinOp and an unsigned */ + eoFlOrAtomBinOp( eoBinOp& _op, unsigned _k = 1): + op(_op), k( _k ) {} + + /** applies the Atom BinOp to some components */ + bool operator()(EOT & _eo1, const EOT & _eo2) + { + if (_eo1.size() != _eo2.size()) + { + string s = "Operand size don't match in " + className(); + throw runtime_error(s); + } + + bool changed = false; + for ( unsigned i = 0; i < k; i++ ) //! @todo check that we don't do twice the same + { + unsigned where = eo::rng.random(_eo1.size()); + bool changedHere = op( _eo1[where], _eo2[where] ); + changed |= changedHere; + } + return changed; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOrKAtomBinOp"; } + +private: + unsigned k; + eoBinOp & op; +}; + + +////////////////////////////////////////////////////////////////////// +// eoFlOrUniformBinOp +////////////////////////////////////////////////////////////////////// + +/** The uniform crossover - exchanges atoms uniformly ! */ +template +class eoFlOrUniformBinOp : public eoBinOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires a rate - 0.5 by default */ + eoFlOrUniformBinOp(double _rate=0.5) : eoBinOp(_size), + rate(_rate) {} + + /** excahnges atoms at given rate */ + bool operator()(EOT & _eo1, const EOT & _eo2) + { + unsigned i; + Atom tmp; + if (_eo1.size() != _eo2.size()) + { + string s = "Operand size don't match in " + className(); + throw runtime_error(s); + } + bool hasChanged = false; + for (unsigned i=0; i<_eo1.size(); i++) + { + if ( (_eo1[i]!=_eo2[i]) && (eo::rng.filp(rate)) ) + { + _eo1[i] = _eo2[i]; + hasChanged = true; + } + } + return hasChanged; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOrUniformBinOp"; } + +private: + double rate; +}; + +////////////////////////////////////////////////////////////////////// +// eoFlOr1ptBinOp +////////////////////////////////////////////////////////////////////// + +/** The 1pt crossover (just in case someone wants it some day!) */ +template +class eoFlOr1ptBinOp : public eoBinOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: no argument */ + eoVlUniformBinOp() {} + + /** exchanges first and second parts of the vectors of Atoms */ + bool operator()(EOT & _eo1, EOT & _eo2) + { + unsigned i; + Atom tmp; + if (_eo1.size() != _eo2.size()) + { + string s = "Operand size don't match in " + className(); + throw runtime_error(s); + } + bool hasChanged = false; + unsigned where = eo::rng.random(_eo1.size()-1); + for (unsigned i=where+1; i<_eo1.size(); i++) + { + if ( (_eo1[i]!=_eo2[i]) ) + { + _eo1[i] = _eo2[i]; + hasChanged = true; + } + } + return hasChanged; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOr1ptBinOp"; } + +}; + +/** @} */ + +#endif diff --git a/trunk/eo/src/eoFlOrMonOp.h b/trunk/eo/src/eoFlOrMonOp.h new file mode 100644 index 000000000..63dae9cba --- /dev/null +++ b/trunk/eo/src/eoFlOrMonOp.h @@ -0,0 +1,123 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFlOrMonOp.h +// (c) Marc Schoenauer - Maarten Keijzer 2000-2003 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@cs.vu.nl + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFlOrMonOp_h +#define _eoFlOrMonOp_h + +#include +#include +#include + +/** @addtogroup Variators + * @{ + */ + +/** Base classes for generic mutations on fixed length chromosomes. + * Contains 2 classes that both use an atomic mutation + * eoFlOrAllMutation applies the atom mutation to all components with given rate + * eoFlOrKMutation applies the atom mutation to a fixed nb of components + * + * Remark: the standard bit-flip mutation is an eoFlOrAllMutation + * with atom mutation == bitflipping + */ + +/** applies an atomic mutation to all the components with a given rate + */ +template +class eoFlOrAllMutation : public eoMonOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires an Atom mutation and a rate */ + eoFlOrAllMutation(eoMonOp & _atomMutation, double _rate=1.0) : + atomMutation(_atomMutation), rate(_rate) {} + + /** applies the atom mutation to all components with given rate */ + bool operator()(EOT & _eo) + { + bool modified=false; + for (unsigned i=0; i<_eo.size(); i++) + if (eo::rng.flip(rate)) + if (atomMutation(_eo[i])) + modified = true; + + return modified; + } + + /** inherited className() */ + virtual std::string className() const + { + return "eoFlOrAllMutation(" + atomMutation.className() + ")"; + } + +private: + eoMonOp & atomMutation; // the atom mutation + double rate; // the mutation rate PER ATOM +}; + +/** Applies an atomic mutation to a fixed + number of components (1 by default) + */ +template +class eoFlOrKMutation : public eoMonOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires an Atom mutation */ + eoFlOrKMutation(eoMonOp & _atomMutation, unsigned _nb=1) : + nb(_nb), atomMutation(_atomMutation) {} + + + /** applies the atom mutation to K randomly selected components */ + bool operator()(EOT & _eo) + { + bool modified=false; + for (unsigned k=0; k & atomMutation; // the atom mutation +}; + +/** @} */ + +#endif diff --git a/trunk/eo/src/eoFlOrQuadOp.h b/trunk/eo/src/eoFlOrQuadOp.h new file mode 100644 index 000000000..91618aa53 --- /dev/null +++ b/trunk/eo/src/eoFlOrQuadOp.h @@ -0,0 +1,218 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFlOrQuadOp.h +// (c) Marc Schoenauer - Maarten Keijzer 2000-2003 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@cs.vu.nl + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFlOrQuadOp_h +#define _eoFlOrQuadOp_h + +#include +#include + +/** @addtogroup Variators + * @{ + */ + +/** Generic eoQuadOps on fixed length genotypes. + * Contains exchange crossovers (1pt and uniform) + * and crossovers that applies an Atom crossover + * to all components with given rate, or + * to a fixed prescribed nb of components +*/ + +////////////////////////////////////////////////////////////////////// +// eoFlOrAllAtomQuadOp +////////////////////////////////////////////////////////////////////// + +/** Quad Crossover using an Atom Crossover + */ +template +class eoFlOrAllAtomQuadOp : public eoQuadOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires an Atom QuadOp */ + eoFlOrAllAtomQuadOp( eoQuadOp& _op, double _rate = 1): + op(_op), rate( _rate ) {} + + /** applies Atom crossover to ALL components with given rate */ + bool operator()(EOT & _eo1, EOT & _eo2) + { + bool changed = false; + for ( unsigned i = 0; i < _eo1.size(); i++ ) { + if ( rng.flip( rate ) ) { + bool changedHere = op( _eo1[i], _eo2[i] ); + changed |= changedHere; + } + } + return changed; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOrAllAtomQuadOp"; } + +private: + double rate; + eoQuadOp & op; +}; + +////////////////////////////////////////////////////////////////////// +// eoFlOrKAtomQuadOp +////////////////////////////////////////////////////////////////////// +/** Quad Crossover using an Atom Crossover + * that is applied to a FIXED NB of components + */ +template +class eoFlOrKAtomQuadOp : public eoQuadOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires an Atom QuadOp and an unsigned */ + eoFlOrAtomQuadOp( eoQuadOp& _op, unsigned _k = 1): + op(_op), k( _k ) {} + + /** applies the Atom QuadOp to some components */ + bool operator()(EOT & _eo1, const EOT & _eo2) + { + if (_eo1.size() != _eo2.size()) + { + string s = "Operand size don't match in " + className(); + throw runtime_error(s); + } + + bool changed = false; + for ( unsigned i = 0; i < k; i++ ) //! @todo check that we don't do twice the same + { + unsigned where = eo::rng.random(_eo1.size()); + bool changedHere = op( _eo1[where], _eo2[where] ); + changed |= changedHere; + } + return changed; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOrKAtomQuadOp"; } + +private: + unsigned k; + eoQuadOp & op; +}; + + +////////////////////////////////////////////////////////////////////// +// eoFlOrUniformQuadOp +////////////////////////////////////////////////////////////////////// +/** The uniform crossover - exchanges atoms uniformly ! */ +template +class eoFlOrUniformQuadOp : public eoQuadOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires a rate - 0.5 by default */ + eoVlUniformQuadOp(double _rate=0.5) : eoQuadOp(_size), + rate(_rate) {} + + /** excahnges atoms at given rate */ + bool operator()(EOT & _eo1, EOT & _eo2) + { + unsigned i; + Atom tmp; + if (_eo1.size() != _eo2.size()) + { + string s = "Operand size don't match in " + className(); + throw runtime_error(s); + } + bool hasChanged = false; + for (unsigned i=0; i<_eo1.size(); i++) + { + if ( (_eo1[i]!=_eo2[i]) && (eo::rng.filp(rate)) ) + { + tmp = _eo1[i]; + _eo1[i] = _eo2[i]; + _eo2[i] = tmp; + hasChanged = true; + } + } + return hasChanged; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOrUniformQuadOp"; } + +private: + double rate; +}; + +////////////////////////////////////////////////////////////////////// +// eoFlOr1ptQuadOp +////////////////////////////////////////////////////////////////////// +/** The 1pt crossover (just in case someone wants it some day!) */ +template +class eoFlOr1ptQuadOp : public eoQuadOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: no argument */ + eoVlUniformQuadOp() {} + + /** exchanges first and second parts of the vectors of Atoms */ + bool operator()(EOT & _eo1, EOT & _eo2) + { + unsigned i; + Atom tmp; + if (_eo1.size() != _eo2.size()) + { + string s = "Operand size don't match in " + className(); + throw runtime_error(s); + } + bool hasChanged = false; + unsigned where = eo::rng.random(_eo1.size()-1); + for (unsigned i=where+1; i<_eo1.size(); i++) + { + if ( (_eo1[i]!=_eo2[i]) ) + { + tmp = _eo1[i]; + _eo1[i] = _eo2[i]; + _eo2[i] = tmp; + hasChanged = true; + } + } + return hasChanged; + } + + /** inherited className()*/ + virtual string className() const { return "eoFlOr1ptQuadOp"; } + +}; + +/** @} */ + +#endif diff --git a/trunk/eo/src/eoFlight.h b/trunk/eo/src/eoFlight.h new file mode 100644 index 000000000..4c46d8e94 --- /dev/null +++ b/trunk/eo/src/eoFlight.h @@ -0,0 +1,55 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFlight.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOFLIGHT_H +#define EOFLIGHT_H + +//----------------------------------------------------------------------------- +#include +#include +//----------------------------------------------------------------------------- + +/** Abstract class for particle swarm optimization flight. +* All the flights must derivated from eoFlight. +* +* @ingroup Variators +*/ +template < class POT > class eoFlight:public eoUF < POT &, void > +{ +public: + + /** + * Apply the flight to a whole population. + */ + virtual void apply (eoPop < POT > &_pop) + { + for (unsigned i = 0; i < _pop.size (); i++) + { + this->operator ()(_pop[i]); + } + + } +}; + +#endif /*EOFLIGHT_H */ diff --git a/trunk/eo/src/eoFunctor.h b/trunk/eo/src/eoFunctor.h new file mode 100644 index 000000000..465f0bc46 --- /dev/null +++ b/trunk/eo/src/eoFunctor.h @@ -0,0 +1,184 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFunctor.h +// (c) Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk + CVS Info: $Date: 2004-12-01 09:22:48 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoFunctor.h,v 1.7 2004-12-01 09:22:48 evomarc Exp $ $Author: evomarc $ + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFunctor_h +#define _eoFunctor_h + +#include + +/** @addtogroup Core + * @{ + */ + +/** Base class for functors to get a nice hierarchy diagram + + That's actually quite an understatement as it does quite a bit more than + just that. By having all functors derive from the same base class, we can + do some memory management that would otherwise be very hard. + + The memory management base class is called eoFunctorStore, and it supports + a member add() to add a pointer to a functor. When the functorStore is + destroyed, it will delete all those pointers. So beware: do not delete + the functorStore before you are done with anything that might have been allocated. + + @see eoFunctorStore + +*/ +class eoFunctorBase +{ +public : + /// virtual dtor here so there is no need to define it in derived classes + virtual ~eoFunctorBase() {} + + /// tag to identify a procedure in compile time function selection @see functor_category + struct procedure_tag {}; + /// tag to identify a unary function in compile time function selection @see functor_category + struct unary_function_tag {}; + /// tag to identify a binary function in compile time function selection @see functor_category + struct binary_function_tag {}; +}; +/** @example t-eoFunctor.cpp + */ + +/** + Basic Function. Derive from this class when defining + any procedure. It defines a result_type that can be used + to determine the return type + Argument and result types can be any type including void for + result_type +**/ +template +class eoF : public eoFunctorBase +{ +public : + + /// virtual dtor here so there is no need to define it in derived classes + virtual ~eoF() {} + + /// the return type - probably useless .... + typedef R result_type; + + /// The pure virtual function that needs to be implemented by the subclass + virtual R operator()() = 0; + + /// tag to identify a procedure in compile time function selection @see functor_category + static eoFunctorBase::procedure_tag functor_category() + { + return eoFunctorBase::procedure_tag(); + } +}; + +/** + Overloaded function that can help in the compile time detection + of the type of functor we are dealing with + + @see eoCounter, make_counter +*/ +template +eoFunctorBase::procedure_tag functor_category(const eoF&) +{ + return eoFunctorBase::procedure_tag(); +} + +/** + Basic Unary Functor. Derive from this class when defining + any unary function. First template argument is the first_argument_type, + second result_type. + Argument and result types can be any type including void for + result_type +**/ +template +class eoUF : public eoFunctorBase, public std::unary_function +{ +public : + + /// virtual dtor here so there is no need to define it in derived classes + virtual ~eoUF() {} + + /// The pure virtual function that needs to be implemented by the subclass + virtual R operator()(A1) = 0; + + /// tag to identify a procedure in compile time function selection @see functor_category + static eoFunctorBase::unary_function_tag functor_category() + { + return eoFunctorBase::unary_function_tag(); + } +}; + +/** + Overloaded function that can help in the compile time detection + of the type of functor we are dealing with + @see eoCounter, make_counter +*/ +template +eoFunctorBase::unary_function_tag functor_category(const eoUF&) +{ + return eoFunctorBase::unary_function_tag(); +} + + +/** + Basic Binary Functor. Derive from this class when defining + any binary function. First template argument is result_type, second + is first_argument_type, third is second_argument_type. + Argument and result types can be any type including void for + result_type +**/ +template +class eoBF : public eoFunctorBase, public std::binary_function +{ +public : + /// virtual dtor here so there is no need to define it in derived classes + virtual ~eoBF() {} + + //typedef R result_type; + //typedef A1 first_argument_type; + //typedef A2 second_argument_type; + + /// The pure virtual function that needs to be implemented by the subclass + virtual R operator()(A1, A2) = 0; + + /// tag to identify a procedure in compile time function selection @see functor_category + static eoFunctorBase::binary_function_tag functor_category() + { + return eoFunctorBase::binary_function_tag(); + } +}; + +/** + Overloaded function that can help in the compile time detection + of the type of functor we are dealing with + @see eoCounter, make_counter +*/ +template +eoFunctorBase::binary_function_tag functor_category(const eoBF&) +{ + return eoFunctorBase::binary_function_tag(); +} + +/** @} */ + +#endif diff --git a/trunk/eo/src/eoFunctorStore.cpp b/trunk/eo/src/eoFunctorStore.cpp new file mode 100644 index 000000000..43cd778cd --- /dev/null +++ b/trunk/eo/src/eoFunctorStore.cpp @@ -0,0 +1,18 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#include + +#include +#include + + +/// clears the memory +eoFunctorStore::~eoFunctorStore() +{ + for( std::size_t i = 0; i < vec.size(); ++i) { + delete vec[i]; + } +} diff --git a/trunk/eo/src/eoFunctorStore.h b/trunk/eo/src/eoFunctorStore.h new file mode 100644 index 000000000..c609637b4 --- /dev/null +++ b/trunk/eo/src/eoFunctorStore.h @@ -0,0 +1,73 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFunctorStore.h +// (c) Maarten Keijzer 2000, GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- + +#ifndef _eoFunctorStore_h +#define _eoFunctorStore_h + +#include + +class eoFunctorBase; + +/** + eoFunctorStore is a class that stores functors that are allocated on the + heap. This class can be used in factories to store allocated memory for + dynamically created functors. + + @ingroup Utilities +*/ +class eoFunctorStore +{ +public: + + /// Default Ctor + eoFunctorStore() {} + + // virtual destructor so we don't need to define it in derived classes + virtual ~eoFunctorStore(); + + /// Add an eoFunctorBase to the store + template + Functor& storeFunctor(Functor* r) + { + // If the compiler complains about the following line, + // check if you really are giving it a pointer to an + // eoFunctorBase derived object + vec.push_back(r); + return *r; + } + +private : + + /** no copying allowed */ + eoFunctorStore(const eoFunctorStore&); + + /** no assignment allowed */ + eoFunctorStore operator=(const eoFunctorStore&); + + std::vector vec; +}; + +#endif diff --git a/trunk/eo/src/eoG3Replacement.h b/trunk/eo/src/eoG3Replacement.h new file mode 100644 index 000000000..a235244f8 --- /dev/null +++ b/trunk/eo/src/eoG3Replacement.h @@ -0,0 +1,86 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoG3Replacement.h + (c) Maarten Keijzer, Marc Schoenauer, 2002 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoG3Replacement_h +#define _eoG3Replacement_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** +eoG3Replacement is an eoReplacement: +- no strong elitism (is suppposed to be within a steady-state engine) +- choose N (2) parents RANDOMLY - remove them from the parent population +- merge offspring and the N removed parents +- select best N of this merged population +- put them back into parent population + +@ingroup Replacors +*/ +template +class eoG3Replacement : public eoReplacement +{ +public: + eoG3Replacement(eoHowMany _howManyEliminatedParents = eoHowMany(2, false)) : + // split truncates the parents and returns eliminated parents + split(_howManyEliminatedParents, true), + // reduce truncates the offpsring and does not return eliminated guys + reduce(-_howManyEliminatedParents, false) + {} + + void operator()(eoPop & _parents, eoPop & _offspring) + { + eoPop temp; + split(_parents, temp); + unsigned toKeep = temp.size(); // how many to keep from merged populations + // merge temp into offspring + plus(temp, _offspring); // add temp to _offspring (a little inconsistent!) + + // reduce merged + reduce(_offspring, temp); // temp dummy arg. will not be modified + // minimla check: + if (_offspring.size() != toKeep) + { + std::cerr << "Les tailles " << _offspring.size() << " " << toKeep << std::endl; + throw std::runtime_error("eoG3Replacement: wrong number of remaining offspring"); + } + // and put back into _parents + plus(_offspring, _parents); + } + +private: + eoLinearTruncateSplit split; // few parents to truncate -> linear + eoTruncateSplit reduce; // supposedly many offspring to truncate + eoPlus plus; +}; + +#endif diff --git a/trunk/eo/src/eoGaussRealWeightUp.h b/trunk/eo/src/eoGaussRealWeightUp.h new file mode 100644 index 000000000..47edc321b --- /dev/null +++ b/trunk/eo/src/eoGaussRealWeightUp.h @@ -0,0 +1,71 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGaussRealWeightUp.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOGAUSSREALWEIGHTUP_H +#define EOGAUSSREALWEIGHTUP_H + +//----------------------------------------------------------------------------- +#include +#include +//----------------------------------------------------------------------------- + + +/** + * Update an inertia weight by assigning it a Gaussian randomized value + * (used for the velocity in particle swarm optimization). + * + * @ingroup Variators + */ +class eoGaussRealWeightUp:public eoWeightUpdater +{ +public: + + /** + * Default constructor + * @param _mean - Mean for Gaussian distribution + * @param _stdev - Standard deviation for Gaussian distribution + */ + eoGaussRealWeightUp( + double _mean=0, + double _stdev=1.0 + ):mean(_mean),stdev(_stdev){} + + /** + * Assign Gaussian deviation to _weight + * @param _weight - The modified weight as a double + */ + void operator() (double & _weight) + { + _weight=rng.normal(mean,stdev); + } + + +protected: + double mean,stdev; + +}; + + + +#endif/*EOGAUSSREALWEIGHTUP_H*/ diff --git a/trunk/eo/src/eoGenContinue.h b/trunk/eo/src/eoGenContinue.h new file mode 100644 index 000000000..0d01bb0a1 --- /dev/null +++ b/trunk/eo/src/eoGenContinue.h @@ -0,0 +1,114 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenContinue.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoGenContinue_h +#define _eoGenContinue_h + +#include +#include +#include + +/** + Generational continuator: continues until a number of generations is reached + + @ingroup Continuators +*/ +template< class EOT> +class eoGenContinue: public eoContinue, public eoValueParam +{ +public: + + /// Ctor for setting a + eoGenContinue( unsigned long _totalGens) + : eoValueParam(0, "Generations", "Generations"), + repTotalGenerations( _totalGens ), + thisGenerationPlaceHolder(0), + thisGeneration(thisGenerationPlaceHolder) + {}; + + /// Ctor for enabling the save/load the no. of generations counted + eoGenContinue( unsigned long _totalGens, unsigned long& _currentGen) + : eoValueParam(0, "Generations", "Generations"), + repTotalGenerations( _totalGens ), + thisGenerationPlaceHolder(0), + thisGeneration(_currentGen) + {}; + + /** Returns false when a certain number of generations is + * reached */ + virtual bool operator() ( const eoPop& _vEO ) { + (void)_vEO; + thisGeneration++; + value() = thisGeneration; + + if (thisGeneration >= repTotalGenerations) + { + eo::log << eo::logging << "STOP in eoGenContinue: Reached maximum number of generations [" << thisGeneration << "/" << repTotalGenerations << "]\n"; + return false; + } + return true; + } + + /** Sets the number of generations to reach + and sets the current generation to 0 (the begin) + + @todo replace this by an "init" method + */ + virtual void totalGenerations( unsigned long _tg ) { + repTotalGenerations = _tg; + thisGeneration = 0; + }; + + /** Returns the number of generations to reach*/ + virtual unsigned long totalGenerations( ) + { + return repTotalGenerations; + }; + + + virtual std::string className(void) const { return "eoGenContinue"; } + + /** Read from a stream + * @param __is the istream to read from + */ + void readFrom (std :: istream & __is) { + + __is >> thisGeneration; /* Loading the number of generations counted */ + } + + /** Print on a stream + * @param __os the ostream to print on + */ + void printOn (std :: ostream & __os) const { + + __os << thisGeneration << std :: endl; /* Saving the number of generations counted */ + } + +private: + unsigned long repTotalGenerations; + unsigned long thisGenerationPlaceHolder; + unsigned long& thisGeneration; +}; + +#endif diff --git a/trunk/eo/src/eoGenOp.h b/trunk/eo/src/eoGenOp.h new file mode 100644 index 000000000..f0d70c7ba --- /dev/null +++ b/trunk/eo/src/eoGenOp.h @@ -0,0 +1,229 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenOp.h +// (c) Maarten Keijzer and Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mak@dhi.dk + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoGenOp_H +#define _eoGenOp_H + +#include +#include +#include +#include + +/** @name General variation operators + +a class that allows to use i->j operators for any i and j +thanks to the friend class eoPopulator + +@author Maarten Keijzer +@version 0.0 + +@ingroup Core +@ingroup Variators +*/ + +//@{ + +/** The base class for General Operators +Subclass this operator is you want to define an operator that falls +outside of the eoMonOp, eoBinOp, eoQuadOp classification. The argument +the operator will receive is an eoPopulator, which is a wrapper around +the original population, is an instantiation of the next population and +has often a selection function embedded in it to select new individuals. + +Note that the actual work is performed in the apply function. +AND that the apply function is responsible for invalidating +the object if necessary + */ +template +class eoGenOp : public eoOp, public eoUF &, void> +{ + public : + /// Ctor that honors its superclass + eoGenOp(): eoOp( eoOp::general ) {} + + /** Max production is used to reserve space for all elements that are used by the operator, + not setting it properly can result in a crash + */ + virtual unsigned max_production(void) = 0; + + virtual std::string className() const = 0; + + void operator()(eoPopulator& _pop) + { + _pop.reserve( max_production() ); + apply(_pop); + } + + //protected : + /** the function that will do the work + */ + virtual void apply(eoPopulator& _pop) = 0; +}; +/** @example t-eoGenOp.cpp + */ + + +/** Wrapper for eoMonOp */ +template +class eoMonGenOp : public eoGenOp +{ + public: + eoMonGenOp(eoMonOp& _op) : op(_op) {} + + unsigned max_production(void) { return 1; } + + void apply(eoPopulator& _it) + { + if (op(*_it)) + (*_it).invalidate(); // look how simple + + } + virtual std::string className() const {return op.className();} + private : + eoMonOp& op; +}; + +/** Wrapper for binop: here we use select method of eoPopulator + * but we could also have an embedded selector to select the second parent + */ +template +class eoBinGenOp : public eoGenOp +{ + public: + eoBinGenOp(eoBinOp& _op) : op(_op) {} + + unsigned max_production(void) { return 1; } + + /** do the work: get 2 individuals from the population, modifies + only one (it's a eoBinOp) + */ + void apply(eoPopulator& _pop) + { + EOT& a = *_pop; + const EOT& b = _pop.select(); + + if (op(a, b)) + a.invalidate(); + } + virtual std::string className() const {return op.className();} + + private : + eoBinOp& op; +}; + +/** wrapper for eoBinOp with a selector */ +template +class eoSelBinGenOp : public eoGenOp +{ + public: + eoSelBinGenOp(eoBinOp& _op, eoSelectOne& _sel) : + op(_op), sel(_sel) {} + + unsigned max_production(void) { return 1; } + + void apply(eoPopulator& _pop) + { // _pop.source() gets the original population, an eoVecOp can make use of this as well + if (op(*_pop, sel(_pop.source()))) + (*_pop).invalidate(); + } + virtual std::string className() const {return op.className();} + + private : + eoBinOp& op; + eoSelectOne& sel; +}; + + +/** Wrapper for quadop: easy as pie + */ +template +class eoQuadGenOp : public eoGenOp +{ + public: + eoQuadGenOp(eoQuadOp& _op) : op(_op) {} + + unsigned max_production(void) { return 2; } + + void apply(eoPopulator& _pop) + { + EOT& a = *_pop; + EOT& b = *++_pop; + + + if(op(a, b)) + { + a.invalidate(); + b.invalidate(); + } + + } + virtual std::string className() const {return op.className();} + + private : + eoQuadOp& op; +}; + + /** + Factory function for automagically creating references to an + eoGenOp object. Useful when you are too lazy to figure out + which wrapper belongs to which operator. The memory allocated + in the wrapper will be stored in a eoFunctorStore (eoState derives from this). + Therefore the memory will only be freed when the eoFunctorStore is deleted. + Make very sure that you are not using these wrappers after this happens. + + You can use this function 'wrap_op' in the following way. Suppose you've + created an eoQuadOp called my_quad, and you want to feed it to an eoTransform + derived class that expects an eoGenOp. If you have an eoState lying around + (which is generally a good idea) you can say: + + eoDerivedTransform trans(eoGenOp::wrap_op(my_quad, state), ...); + + And as long as your state is not destroyed (by going out of scope for example, + your 'trans' functor will be usefull. + + As a final note, you can also enter an eoGenOp as the argument. It will + not allocate memory then. This to make it even easier to use the wrap_op function. + For an example of how this is used, check the eoOpContainer class. + + @see eoOpContainer + */ + template + eoGenOp& wrap_op(eoOp& _op, eoFunctorStore& _store) + { + switch(_op.getType()) + { + case eoOp::unary : return _store.storeFunctor(new eoMonGenOp(static_cast&>(_op))); + case eoOp::binary : return _store.storeFunctor(new eoBinGenOp(static_cast&>(_op))); + case eoOp::quadratic : return _store.storeFunctor(new eoQuadGenOp(static_cast&>(_op))); + case eoOp::general : return static_cast&>(_op); + } + + assert(false); + return static_cast&>(_op); + } + +#endif + +//@} diff --git a/trunk/eo/src/eoGeneralBreeder.h b/trunk/eo/src/eoGeneralBreeder.h new file mode 100644 index 000000000..dc598ba7e --- /dev/null +++ b/trunk/eo/src/eoGeneralBreeder.h @@ -0,0 +1,107 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGeneralBreeder.h +// (c) Maarten Keijzer and Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mkeijzer@dhi.dk + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoGeneralBreeder_h +#define eoGeneralBreeder_h + +//----------------------------------------------------------------------------- + +/***************************************************************************** + * eoGeneralBreeder: transforms a population using the generalOp construct. + *****************************************************************************/ + +#include +#include +#include +#include +#include +#include + +/** + Base class for breeders using generalized operators. + + @ingroup Combination +*/ +template +class eoGeneralBreeder: public eoBreed +{ + public: + /** Ctor: + * + * @param _select a selectoOne, to be used for all selections + * @param _op a general operator (will generally be an eoOpContainer) + * @param _rate pour howMany, le nbre d'enfants a generer + * @param _interpret_as_rate explanation + */ + eoGeneralBreeder( + eoSelectOne& _select, + eoGenOp& _op, + double _rate=1.0, + bool _interpret_as_rate = true) : + select( _select ), op(_op), howMany(_rate, _interpret_as_rate) {} + + /** Ctor: + * + * @param _select a selectoOne, to be used for all selections + * @param _op a general operator (will generally be an eoOpContainer) + * @param _howMany an eoHowMany explanation + */ + eoGeneralBreeder( + eoSelectOne& _select, + eoGenOp& _op, + eoHowMany _howMany ) : + select( _select ), op(_op), howMany(_howMany) {} + + /** The breeder: simply calls the genOp on a selective populator! + * + * @param _parents the initial population + * @param _offspring the resulting population (content -if any- is lost) + */ + void operator()(const eoPop& _parents, eoPop& _offspring) + { + unsigned target = howMany(_parents.size()); + + _offspring.clear(); + eoSelectivePopulator it(_parents, _offspring, select); + + while (_offspring.size() < target) + { + op(it); + ++it; + } + + _offspring.resize(target); // you might have generated a few more + } + + /// The class name. + virtual std::string className() const { return "eoGeneralBreeder"; } + + private: + eoSelectOne& select; + eoGenOp& op; + eoHowMany howMany; +}; + +#endif diff --git a/trunk/eo/src/eoInit.h b/trunk/eo/src/eoInit.h new file mode 100644 index 000000000..7b460d94b --- /dev/null +++ b/trunk/eo/src/eoInit.h @@ -0,0 +1,214 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoInit.h +// (c) Maarten Keijzer 2000, GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoInit_H +#define _eoInit_H + +#include + +#include +#include +#include +#include // for shuffle method + + +/** + @defgroup Initializators Initialization operators + @ingroup Operators + + Initializators are operators that creates initial individuals and populations. +*/ +/** @{*/ +/** + Base (name) class for Initialization of chromosomes, used in a population + contructor. It is derived from eoMonOp, so it can be used + inside the algorithm as well. + + @see eoPop +*/ +template +class eoInit : public eoUF +{ +public: + + /** className: Mandatory because of eoCombinedInit. + SHould be pure virtual, but then we should go over the whole + * code to write the method for all derived classes ... MS 16/7/04 */ + virtual std::string className(void) const { return "eoInit"; } +}; + +/** turning an eoInit into a generator + * probably we should only use genrators - and suppress eoInit ??? + * MS - July 2001 + */ +template +class eoInitGenerator : public eoF +{ +public: + + /** Ctor from a plain eoInit */ + eoInitGenerator(eoInit & _init):init(_init) {} + + virtual EOT operator()() + { + EOT p; + init(p); + return (p); + } +private: + eoInit & init; +}; + +/** + Initializer for fixed length representations with a single type +*/ +template +class eoInitFixedLength: public eoInit +{ + public: + + typedef typename EOT::AtomType AtomType; + + eoInitFixedLength(unsigned _combien, eoRndGenerator& _generator) + : combien(_combien), generator(_generator) {} + + virtual void operator()(EOT& chrom) + { + chrom.resize(combien); + std::generate(chrom.begin(), chrom.end(), generator); + chrom.invalidate(); + } + + private : + unsigned combien; + /// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics + eoSTLF generator; +}; + +/** + Initializer for variable length representations with a single type +*/ +template +class eoInitVariableLength: public eoInit +{ +public: +typedef typename EOT::AtomType AtomType; + +// /** Ctor from a generator */ +// eoInitVariableLength(unsigned _minSize, unsigned _maxSize, eoF & _generator = Gen()) +// : offset(_minSize), extent(_maxSize - _minSize), +// repGenerator( eoInitGenerator(*(new eoInit)) ), +// generator(_generator) +// { +// if (_minSize >= _maxSize) +// throw std::logic_error("eoInitVariableLength: minSize larger or equal to maxSize"); +// } + + /** Ctor from an eoInit */ + eoInitVariableLength(unsigned _minSize, unsigned _maxSize, eoInit & _init) + : offset(_minSize), extent(_maxSize - _minSize), init(_init) + { + if (_minSize >= _maxSize) + throw std::logic_error("eoInitVariableLength: minSize larger or equal to maxSize"); + } + + + virtual void operator()(EOT& _chrom) + { + _chrom.resize(offset + rng.random(extent)); + typename std::vector::iterator it; + for (it=_chrom.begin(); it<_chrom.end(); it++) + init(*it); + _chrom.invalidate(); + } + + // accessor to the atom initializer (needed by operator constructs sometimes) + eoInit & atomInit() {return init;} + +private : + unsigned offset; + unsigned extent; + eoInit & init; +}; + + +/** + Initializer for permutation (integer-based) representations. +*/ +template +class eoInitPermutation: public eoInit +{ + public: + + typedef typename EOT::AtomType AtomType; + + eoInitPermutation(unsigned _chromSize, unsigned _startFrom=0) + : chromSize(_chromSize), startFrom(_startFrom){} + + virtual void operator()(EOT& chrom) + { + chrom.resize(chromSize); + for(unsigned idx=0;idx gen; +}; +/** @example t-eoInitPermutation.cpp + */ + + +/** + eoInitAdaptor changes the place in the hierarchy + from eoInit to eoMonOp. This is mainly a type conversion, + nothing else + + @see eoInit, eoMonOp +*/ +template +class eoInitAdaptor : public eoMonOp +{ + public : + eoInitAdaptor(eoInit& _init) : init(_init) {} + + bool operator()(EOT& _eot) + { + init(_eot); + return true; + } + private : + + eoInit& init; +}; + +#endif +/** @}*/ diff --git a/trunk/eo/src/eoInitializer.h b/trunk/eo/src/eoInitializer.h new file mode 100644 index 000000000..9e5cd5caf --- /dev/null +++ b/trunk/eo/src/eoInitializer.h @@ -0,0 +1,147 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoInitializer.h +// (c) OPAC Team, INRIA, 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: clive.canape@inria.fr + + + */ +//----------------------------------------------------------------------------- + +#ifndef _eoInitializer_H +#define _eoInitializer_H + +#include +#include +#include +#include +#include + +/** + @addtogroup Initializators + @{ + */ + + +/** + * Abstract class for initialization of algorithm PSO + */ +template class eoInitializerBase : public eoFunctorBase +{ +public : + + virtual ~eoInitializerBase() + {} + + virtual void operator()() + {}; +}; + +/** + Base (name) class for Initialization of algorithm PSO + + @see eoInitializerBase eoUF apply +*/ +template class eoInitializer : public eoInitializerBase +{ +public: + + //! Constructor + //! @param _proc Evaluation function + //! @param _initVelo Initialization of the velocity + //! @param _initBest Initialization of the best + //! @param _topology the topology to use + //! @param _pop Population + eoInitializer( + eoUF& _proc, + eoVelocityInit < POT > &_initVelo, + eoParticleBestInit &_initBest, + eoTopology &_topology, + eoPop < POT > &_pop + ) : proc(_proc), initVelo(_initVelo), procPara(dummyEval), initBest(_initBest), topology(_topology), pop(_pop) + {} + + //! Constructor for parallel evaluation + //! @param _proc Evaluation function + //! @param _initVelo Initialization of the velocity + //! @param _initBest Initialization of the best + //! @param _topology the topology to use + //! @param _pop Population + eoInitializer( + eoPopEvalFunc & _proc, + eoVelocityInit < POT > &_initVelo, + eoParticleBestInit &_initBest, + eoTopology &_topology, + eoPop < POT > &_pop + ) : proc(dummy), initVelo(_initVelo), procPara(_proc), initBest(_initBest), topology(_topology), pop(_pop) + {} + + + //! Give the name of the class + //! @return The name of the class + virtual std::string className (void) const + { + return "eoInitializer"; + } + + + + virtual void operator() () + { + eoPop empty_pop; + apply(proc, pop); + procPara(empty_pop, pop); + apply < POT > (initVelo, pop); + apply < POT > (initBest, pop); + topology.setup(pop); + } + +private : + + /* + @param proc First evaluation + @param initVelo Initialization of the velocity + @param initBest Initialization of the best + */ + eoUF& proc; + eoVelocityInit < POT > & initVelo; + eoPopEvalFunc & procPara; + eoParticleBestInit & initBest; + eoTopology & topology; + eoPop < POT > & pop; + +class eoDummyEval : public eoPopEvalFunc + { + public: + void operator()(eoPop &,eoPop &/*_pop*/) + {} + } + dummyEval; +class eoDummy : public eoUF + { + public: + void operator()(POT &) + {} + + } + dummy; +}; +#endif + +/** @} */ diff --git a/trunk/eo/src/eoInt.h b/trunk/eo/src/eoInt.h new file mode 100644 index 000000000..41c877247 --- /dev/null +++ b/trunk/eo/src/eoInt.h @@ -0,0 +1,63 @@ +/* + eoInt.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + todos@geneura.ugr.es, http://geneura.ugr.es + mkeijzer@dhi.dk +*/ + +#ifndef eoInt_h +#define eoInt_h + +//----------------------------------------------------------------------------- + +#include // std::ostream, std::istream +#include // std::string + +#include + +/** eoInt: implementation of simple integer-valued chromosome. + * based on eoVector class + * + * @ingroup Representations +*/ +template class eoInt: public eoVector +{ + public: + + /** + * (Default) Constructor. + * @param size Size of the std::vector + * @param value fill the vector with this value + */ + eoInt(unsigned size = 0, int value = 0): + eoVector(size, value) {} + + /// My class name. + virtual std::string className() const + { + return "eoInt"; + } + +}; +/** @example t-eoInt.cpp + */ + +//----------------------------------------------------------------------------- + +#endif diff --git a/trunk/eo/src/eoIntegerVelocity.h b/trunk/eo/src/eoIntegerVelocity.h new file mode 100644 index 000000000..b00b17bf3 --- /dev/null +++ b/trunk/eo/src/eoIntegerVelocity.h @@ -0,0 +1,195 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoIntegerVelocity.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + clive.canape@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOINTEGERVELOCITY_H +#define EOINTEGERVELOCITY_H + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + + +/** Integer velocity performer for particle swarm optimization. Derivated from abstract eoVelocity, +* At step t: v(t+1)= c1 * v(t) + c2 * r2 * ( xbest(t)-x(t) ) + c3 * r3 * ( gbest(t) - x(t) ) +* v(t) is an INT for any time step +* (ci given and Ri chosen at random in [0;1]). +* +* @ingroup Variators +*/ +template < class POT > class eoIntegerVelocity:public eoVelocity < POT > +{ + +public: + + /* + * Each element for the velocity evaluation is expected to be of type VelocityType. + */ + typedef typename POT::ParticleVelocityType VelocityType; + + /** Full constructor: Bounds and bound modifier required + * @param _topology - The topology to get the global/local/other best + * @param _c1 - The first learning factor quantify how much the particle trusts itself. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c3 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _gen - The eo random generator, default=rng + */ + eoIntegerVelocity (eoTopology < POT > & _topology, + const VelocityType & _c1, + const VelocityType & _c2, + const VelocityType & _c3, + eoRealVectorBounds & _bounds, + eoRealBoundModifier & _bndsModifier, + eoRng & _gen = rng): + topology(_topology), + c1 (_c1), + c2 (_c2), + c3 (_c3), + bounds(_bounds), + bndsModifier(_bndsModifier), + gen(_gen){} + + + /** Constructor: No bound updater required <-> fixed bounds + * @param _topology - The topology to get the global/local/other best + * @param _c1 - The first learning factor quantify how much the particle trusts itself. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c3 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _gen - The eo random generator, default=rng + */ + eoIntegerVelocity (eoTopology < POT > & _topology, + const VelocityType & _c1, + const VelocityType & _c2, + const VelocityType & _c3, + eoRealVectorBounds & _bounds, + eoRng & _gen = rng): + topology(_topology), + c1 (_c1), + c2 (_c2), + c3 (_c3), + bounds(_bounds), + bndsModifier(dummyModifier), + gen(_gen){} + + + /** Constructor: Neither bounds nor bound updater required <-> free velocity + * @param _topology the topology to use + * @param _c1 - The first learning factor quantify how much the particle trusts itself. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c3 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _gen - The eo random generator, default=rng + */ + eoIntegerVelocity (eoTopology < POT > & _topology, + const VelocityType & _c1, + const VelocityType & _c2, + const VelocityType & _c3, + eoRng & _gen = rng): + topology(_topology), + c1 (_c1), + c2 (_c2), + c3 (_c3), + bounds(*(new eoRealVectorNoBounds(0))), + bndsModifier(dummyModifier), + gen(_gen) + {} + + + /** + * Evaluate the new velocities of the given particle. Need an indice to identify the particle + * into the topology. + * @param _po - A particle + * @param _indice - The indice (into the topology) of the given particle + */ + void operator () (POT & _po,unsigned _indice) + { + VelocityType r2; + VelocityType r3; + + VelocityType newVelocity; + + // cast the learning factors to VelocityType + r2 = (VelocityType) rng.uniform (1) * c2; + r3 = (VelocityType) rng.uniform (1) * c3; + + // need to resize the bounds even if there are dummy because of "isBounded" call + bounds.adjust_size(_po.size()); + + // assign the new velocities + for (unsigned j = 0; j < _po.size (); j++) + { + newVelocity= round (c1 * _po.velocities[j] + r2 * (_po.bestPositions[j] - _po[j]) + r3 * (topology.best (_indice)[j] - _po[j])); + + /* check bounds */ + if (bounds.isMinBounded(j)) + newVelocity=std::max(newVelocity,bounds.minimum(j)); + if (bounds.isMaxBounded(j)) + newVelocity=std::min(newVelocity,bounds.maximum(j)); + + _po.velocities[j]=newVelocity; + } + } + + /** + * Update the neighborhood. + */ + void updateNeighborhood(POT & _po,unsigned _indice) + { + topology.updateNeighborhood(_po,_indice); + } + + //! eoTopology getTopology + //! @return topology + + eoTopology & getTopology () + { + return topology; + } + +protected: + eoTopology < POT > & topology; + const VelocityType & c1; // social/cognitive coefficient + const VelocityType & c2; // social/cognitive coefficient + const VelocityType & c3; // social/cognitive coefficient + + eoRealVectorBounds bounds; // REAL bounds even if the velocity could be of another type. + eoRealBoundModifier & bndsModifier; + + eoRng & gen; // the random generator + + // If the bound modifier doesn't need to be used, use the dummy instance + eoDummyRealBoundModifier dummyModifier; +}; + + +#endif /*EOINTEGERVELOCITY_H */ diff --git a/trunk/eo/src/eoInvalidateOps.h b/trunk/eo/src/eoInvalidateOps.h new file mode 100644 index 000000000..97dd39f55 --- /dev/null +++ b/trunk/eo/src/eoInvalidateOps.h @@ -0,0 +1,135 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoInvalidateOps.h +// (c) Maarten Keijzer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoInvalidateOps_h +#define _eoInvalidateOps_h + +#include + +/** @addtogroup Utilities + +One of the invalidator operators. Use this one as a 'hat' on an operator +that is defined to work on a generic datatype. This functor will then check +the return type of the operator and invalidate the fitness of the individual. + +This functor is used in algorithms that work with straight eoMonOp, eoBinOp +or eoQuadOp operators, for instance eoSGA. Note that eoGenOp derived operators +generally do invalidate the fitness of the objects they have changed. + +Return value means "Has_Changed" and not "Needs_To_Be_Invalidated" +as successive invalidation are not really a problem +*/ + +template +class eoInvalidateMonOp : public eoMonOp +{ + public: + eoInvalidateMonOp(eoMonOp& _op) : op(_op) {} + + bool operator()(EOT& _eo) + { + if (op(_eo)) + { + _eo.invalidate(); + return true; + } + + return false; + } + + private: + eoMonOp& op; +}; + +/** +One of the invalidator operators. Use this one as a 'hat' on an operator +that is defined to work on a generic datatype. This functor will then check +the return type of the operator and invalidate the fitness of the individual. + +This functor is used in algorithms that work with straight eoMonOp, eoBinOp +or eoQuadOp operators, for instance eoSGA. Note that eoGenOp derived operators +generally do invalidate the fitness of the objects they have changed. + +Return value means "Has_Changed" and not "Needs_To_Be_Invalidated" +as successive invalidation are not really a problem +*/ + +template +class eoInvalidateBinOp : public eoBinOp +{ + public: + eoInvalidateBinOp(eoBinOp& _op) : op(_op) {} + + bool operator()(EOT& _eo, const EOT& _eo2) + { + if (op(_eo, _eo2)) + { + _eo.invalidate(); + return true; + } + + return false; + } + + private: + eoBinOp& op; +}; + +/** +One of the invalidator operators. Use this one as a 'hat' on an operator +that is defined to work on a generic datatype. This functor will then check +the return type of the operator and invalidate the fitness of the individual. + +This functor is used in algorithms that work with straight eoMonOp, eoBinOp +or eoQuadOp operators, for instance eoSGA. Note that eoGenOp derived operators +generally do invalidate the fitness of the objects they have changed. + +Return value means "Has_Changed" and not "Needs_To_Be_Invalidated" +as successive invalidation are not really a problem +*/ + +template +class eoInvalidateQuadOp : public eoQuadOp +{ + public: + eoInvalidateQuadOp(eoQuadOp& _op) : op(_op) {} + + bool operator()(EOT& _eo1, EOT& _eo2) + { + if (op(_eo1, _eo2)) + { + _eo1.invalidate(); + _eo2.invalidate(); + return true; + } + return false; + } + + private: + eoQuadOp& op; +}; + +#endif diff --git a/trunk/eo/src/eoLinearDecreasingWeightUp.h b/trunk/eo/src/eoLinearDecreasingWeightUp.h new file mode 100644 index 000000000..87f489423 --- /dev/null +++ b/trunk/eo/src/eoLinearDecreasingWeightUp.h @@ -0,0 +1,77 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoLinearDecreasingWeightUp.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOLINEARDECREASINGWEIGHTUP_H +#define EOLINEARDECREASINGWEIGHTUP_H + +//----------------------------------------------------------------------------- +#include +//----------------------------------------------------------------------------- + + +/** + * Linear (inertia) weight updater for particle swarm optimization. Update a weight according to: + * w(t)=(w(0)-w(Nt))*(Nt -t)/Nt + w(Nt) where + * t is the current generation/event + * Nt is the total number of generations/event + * w(0) is the initial weight + * w(Nt) is the last inertia weight + * + * @ingroup Variators + */ +template class eoLinearDecreasingWeightUp:public eoWeightUpdater +{ +public: + + /** + * Ctor + */ + eoLinearDecreasingWeightUp( + const StopCriteriaType & _stop, + const WeightType & _initialValue, + const WeightType & _finalValue, + eoValueParam & _counter): + stop(_stop), + initialValue(_initialValue), + finalValue(_finalValue), + counter(_counter){} + + /** + * Update the given weight + */ + void operator() (WeightType & _weight) + { + _weight=(initialValue-finalValue)* (WeightType)(stop-counter.value())/(WeightType)stop + finalValue; + + } + +protected: + const StopCriteriaType & stop; + const WeightType & initialValue,finalValue; + eoValueParam & counter; // a counter of the number of past events (should say "generations") +}; + + + +#endif/*EOLINEARDECREASINGWEIGHTUP_H*/ diff --git a/trunk/eo/src/eoLinearFitScaling.h b/trunk/eo/src/eoLinearFitScaling.h new file mode 100644 index 000000000..75598c934 --- /dev/null +++ b/trunk/eo/src/eoLinearFitScaling.h @@ -0,0 +1,94 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoLinearFitScaling.h + (c) GeNeura Team, 1998, Maarten Keijzer, Marc Schoenauer, 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoLinearFitScaling_h +#define eoLinearFitScaling_h + +#include +#include + +/** An instance of eoPerf2Worth + * COmputes the linearly scaled fitnesses + * with given selective pressure + * Pselect(Best) == pressure/sizePop + * Pselect(average) == 1.0/sizePop + * truncate negative values to 0 - + * + * to be used within an eoSelectFromWorth object + * + * @ingroup Selectors + */ +template +class eoLinearFitScaling : public eoPerf2Worth // false: do not cache fitness +{ +public: + + using eoPerf2Worth::value; + + /* Ctor: + @param _p selective pressure (in (1,2]) + @param _e exponent (1 == linear) + */ + eoLinearFitScaling(double _p=2.0) + : pressure(_p) {} + + /* COmputes the ranked fitness: fitnesses range in [m,M] + with m=2-pressure/popSize and M=pressure/popSize. + in between, the progression depends on exponent (linear if 1). + */ + virtual void operator()(const eoPop& _pop) { + unsigned pSize =_pop.size(); + // value() refers to the vector of worthes (we're in an eoParamvalue) + value().resize(pSize); + + // best and worse fitnesses + double bestFitness = static_cast (_pop.best_element().fitness()); + // double worstFitness = static_cast (_pop.worse_element().fitness()); + + // average fitness + double sum=0.0; + unsigned i; + for (i=0; i(_pop[i].fitness()); + double averageFitness = sum/pSize; + + // the coefficients for linear scaling + double denom = pSize*(bestFitness - averageFitness); + double alpha = (pressure-1)/denom; + double beta = (bestFitness - pressure*averageFitness)/denom; + + for (i=0; i +#include +#include +//----------------------------------------------------------------------------- + + +/** + * One of the local best strategies for particle swarm optimization. Each particle has a fixed number of neighbours, ans + * the neighborhood is social. + * The topology is never modified during the flight. + * + * @ingroup Selectors + */ +template < class POT > class eoLinearTopology:public eoTopology < + POT > +{ + +public: + + /** + * Build the topology made of _neighborhoodSize neighborhoods. + * @param _neighborhoodSize - The size of each neighborhood. + */ + eoLinearTopology (unsigned _neighborhoodSize):neighborhoodSize (_neighborhoodSize),isSetup(false){} + + + /** + * Build the neighborhoods contained in the topology. + * @param _pop - The population used to build the neighborhoods. + * If it remains several particle (because _pop.size()%neighborhoodSize !=0), there are inserted + * in the last neighborhood. So it may be possible to have a bigger neighborhood. + */ + void setup(const eoPop & _pop) + { + if (!isSetup) + { + // consitency check + if (neighborhoodSize >= _pop.size()){ + std::string s; + s.append (" Invalid neighborhood size in eoLinearTopology "); + throw std::runtime_error (s); + } + + unsigned howManyNeighborhood=_pop.size()/ neighborhoodSize; + + // build all the neighborhoods + for (unsigned i=0;i< howManyNeighborhood;i++) + { + eoSocialNeighborhood currentNghd; + + currentNghd.best(_pop[i*neighborhoodSize]); + for (unsigned k=i*neighborhoodSize;k < neighborhoodSize*(i+1);k++) + { + currentNghd.put(k); + if (_pop[k].fitness() > currentNghd.best().fitness()) + currentNghd.best(_pop[k]); + } + neighborhoods.push_back(currentNghd); + } + + // assign the last neighborhood to the remaining particles + if (_pop.size()%neighborhoodSize !=0) + { + for (unsigned z=_pop.size()-1;z >= (_pop.size()-_pop.size()%neighborhoodSize);z--){ + neighborhoods.back().put(z); + + if (_pop[z].fitness() > neighborhoods.back().best().fitness()) + neighborhoods.back().best(_pop[z]); + } + } + + isSetup=true; + } + else + { + // Should activate this part ? + /* + std::string s; + s.append (" Linear topology already setup in eoLinearTopology"); + throw std::runtime_error (s); + */ + } + + } + + + /** + * Retrieve the neighboorhood of a particle. + * @return _indice - The particle indice (in the population) + */ + unsigned retrieveNeighborhoodByIndice(unsigned _indice) + { + unsigned i=0; + for (i=0;i< neighborhoods.size();i++) + { + if (neighborhoods[i].contains(_indice)) + { + return i; + } + } + return i; + } + + /** + * Update the neighborhood: update the particle's best fitness and the best particle + * of the corresponding neighborhood. + */ + void updateNeighborhood(POT & _po,unsigned _indice) + { + // update the best fitness of the particle + if (_po.fitness() > _po.best()) + { + _po.best(_po.fitness()); + for(unsigned i=0;i<_po.size();i++) + _po.bestPositions[i]=_po[i]; + } + + // update the best in its neighborhood + unsigned theGoodNhbd= retrieveNeighborhoodByIndice(_indice); + if (_po.fitness() > neighborhoods[theGoodNhbd].best().fitness()) + { + neighborhoods[theGoodNhbd].best(_po); + } + } + + /** + * Return the best informative of a particle. Could be itself. + * @param _indice - The indice of a particle in the population + * @return POT & - The best particle in the neighborhood of the particle whose indice is _indice + */ + POT & best (unsigned _indice) + { + unsigned theGoodNhbd= retrieveNeighborhoodByIndice(_indice); + + return (neighborhoods[theGoodNhbd].best()); + } + + + /* + * Return the global best of the topology + */ + virtual POT & globalBest() + { + POT gBest,tmp; + unsigned indGlobalBest=0; + if(neighborhoods.size()==1) + return neighborhoods[0].best(); + + gBest=neighborhoods[0].best(); + for(unsigned i=1;i > neighborhoods; + unsigned neighborhoodSize; // the size of each neighborhood + + bool isSetup; + +}; + +#endif /*EOLINEARTOPOLOGY_H_ */ diff --git a/trunk/eo/src/eoMGGReplacement.h b/trunk/eo/src/eoMGGReplacement.h new file mode 100644 index 000000000..e2eebbfa5 --- /dev/null +++ b/trunk/eo/src/eoMGGReplacement.h @@ -0,0 +1,104 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoMGGReplacement.h + (c) Maarten Keijzer, Marc Schoenauer, 2002 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoMGGReplacement_h +#define _eoMGGReplacement_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** +eoMGGReplacement is an eoReplacement: +- choose N (2) parents RANDOMLY - remove them from the parent population +- select best offspring, add to parents +- merge (other?) offspring and the N removed parents +- select best N-1 of this merged population (detTournament only at the moment) +- put them back into parent population + +@ingroup Replacors +*/ + +template +class eoMGGReplacement : public eoReplacement +{ +public: + eoMGGReplacement(eoHowMany _howManyEliminatedParents = eoHowMany(2, false), + unsigned _tSize=2) : + // split truncates the parents and returns eliminated parents + split(_howManyEliminatedParents, true), + tSize(_tSize) + { + if (tSize < 2) + { + eo::log << eo::warnings << "Warning, Size for eoDetTournamentTruncateSplit adjusted to 2" << std::endl; + tSize = 2; + } + } + + void operator()(eoPop & _parents, eoPop & _offspring) + { + eoPop temp; + split(_parents, temp); + unsigned toKeep = temp.size(); // how many to keep from merged populations + // minimal check + if (toKeep < 2) + throw std::runtime_error("Not enough parents killed in eoMGGReplacement"); + + // select best offspring + typename eoPop::iterator it = _offspring.it_best_element(); + // add to parents + _parents.push_back(*it); + // remove from offspring + _offspring.erase(it); + + // merge temp into offspring + plus(temp, _offspring); + + // repeatedly add selected offspring to parents + for (unsigned i=0; i split; // few parents to truncate -> linear + eoPlus plus; + unsigned int tSize; +}; + +#endif diff --git a/trunk/eo/src/eoMerge.h b/trunk/eo/src/eoMerge.h new file mode 100644 index 000000000..31da70f08 --- /dev/null +++ b/trunk/eo/src/eoMerge.h @@ -0,0 +1,142 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoMerge.h +// Base class for elitist-merging classes +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoMerge_h +#define eoMerge_h + +//----------------------------------------------------------------------------- + +#include + +// EO includes +#include // eoPop +#include // eoMerge +#include + +/** + * eoMerge: Base class for elitist replacement algorithms. + * Merges the old population (first argument), with the new generation + * + * Its signature is exactly + * that of the selection base eoSelect, but its purpose is to merge the + * two populations into one (the second argument). + * Note that the algorithms assume that the second argument denotes the + * next generation. + * + * @ingroup Core + * @ingroup Replacors +*/ + +template class eoMerge: public eoBF&, eoPop&, void> +{}; + +/** +Straightforward elitism class, specify the number of individuals to copy +into new geneneration or the rate w.r.t. pop size + +@ingroup Replacors +*/ +template class eoElitism : public eoMerge +{ +public : + eoElitism(double _rate, bool _interpret_as_rate = true): + rate(0), combien(0) + { + if (_interpret_as_rate) + { + if ( (_rate<0) || (_rate>1) ) + throw std::logic_error("eoElitism: rate shoud be in [0,1]"); + rate = _rate; + } + else + { + if (_rate<0) + throw std::logic_error("Negative number of offspring in eoElitism!"); + combien = (unsigned int)_rate; + if (combien != _rate) + eo::log << eo::warnings << "Warning: Number of guys to merge in eoElitism was rounded" << std::endl; + } + } + + void operator()(const eoPop& _pop, eoPop& _offspring) + { + if ((combien == 0) && (rate == 0.0)) + return; + unsigned combienLocal; + if (combien == 0) // rate is specified + combienLocal = (unsigned int) (rate * _pop.size()); + else + combienLocal = combien; + + if (combienLocal > _pop.size()) + throw std::logic_error("Elite larger than population"); + + std::vector result; + _pop.nth_element(combienLocal, result); + + for (size_t i = 0; i < result.size(); ++i) + { + _offspring.push_back(*result[i]); + } + } + +private : + double rate; + unsigned combien; +}; + +/** +No elite +@ingroup Replacors +*/ +template class eoNoElitism : public eoElitism +{ + public : + eoNoElitism() : eoElitism(0) {} +}; + +/** +Very elitist class, copies entire population into next gen +@ingroup Replacors +*/ +template class eoPlus : public eoMerge +{ + public : + void operator()(const eoPop& _pop, eoPop& _offspring) + { + _offspring.reserve(_offspring.size() + _pop.size()); + + for (size_t i = 0; i < _pop.size(); ++i) + { + _offspring.push_back(_pop[i]); + } + } + + private : +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/trunk/eo/src/eoMergeReduce.h b/trunk/eo/src/eoMergeReduce.h new file mode 100644 index 000000000..b3cb5b990 --- /dev/null +++ b/trunk/eo/src/eoMergeReduce.h @@ -0,0 +1,119 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoMergeReduce.h + (c) Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoMergeReduce_h +#define _eoMergeReduce_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- +/** +Replacement strategies that combine en eoMerge and an eoReduce. + +@class eoMergeReduce, the base (pure abstract) class +@class eoPlusReplacement the ES plus strategy +@class eoCommaReplacement the ES comma strategy +*/ + +/** +eoMergeReduce: abstract replacement strategy that is just an application of +an embedded merge, followed by an embedded reduce +@ingroup Replacors +*/ +template +class eoMergeReduce : public eoReplacement +{ + public: + eoMergeReduce(eoMerge& _merge, eoReduce& _reduce) : + merge(_merge), reduce(_reduce) + {} + + void operator()(eoPop& _parents, eoPop& _offspring) + { + merge(_parents, _offspring); // parents untouched, result in offspring + reduce(_offspring, _parents.size()); + _parents.swap(_offspring); + } + + private : + eoMerge& merge; + eoReduce& reduce; +}; + +/** +ES type of replacement strategy: first add parents to population, then truncate +@ingroup Replacors +*/ +template +class eoPlusReplacement : public eoMergeReduce +{ + public : + eoPlusReplacement() : eoMergeReduce(plus, truncate) {} + + private : + eoPlus plus; + eoTruncate truncate; +}; + +/** +ES type of replacement strategy: ignore parents, truncate offspring +@ingroup Replacors +*/ +template +class eoCommaReplacement : public eoMergeReduce +{ + public : + eoCommaReplacement() : eoMergeReduce(no_elite, truncate) {} + + private : + eoNoElitism no_elite; + eoTruncate truncate; +}; + +/** +EP type of replacement strategy: first add parents to population, + then truncate using EP tournament +@ingroup Replacors +*/ +template +class eoEPReplacement : public eoMergeReduce +{ +public : + eoEPReplacement(int _tSize) : eoMergeReduce(plus, truncate), truncate(_tSize) + // {truncate.setSize(_tSize);} + {} +private : + eoPlus plus; + eoEPReduce truncate; +}; + + + +#endif diff --git a/trunk/eo/src/eoNDSorting.h b/trunk/eo/src/eoNDSorting.h new file mode 100644 index 000000000..6ab86c177 --- /dev/null +++ b/trunk/eo/src/eoNDSorting.h @@ -0,0 +1,496 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoNDSorting.h + (c) Maarten Keijzer, Marc Schoenauer, 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoNDSorting_h +#define eoNDSorting_h + +#include +#include +#include +#include +#include + +/** + Non dominated sorting, it *is a* std::vector of doubles, the integer part is the rank (to which front it belongs), + the fractional part the niching penalty or distance penalty or whatever penalty you want to squeeze into + the bits. +*/ +template +class eoNDSorting : public eoPerf2WorthCached +{ + public : + + using eoPerf2WorthCached::value; + eoNDSorting(bool nasty_flag_ = false) + : nasty_declone_flag_that_only_is_implemented_for_two_objectives(nasty_flag_) + {} + + + eoNDSorting() + : nasty_declone_flag_that_only_is_implemented_for_two_objectives(false) + {} + + /** Pure virtual function that calculates the 'distance' for each element in the current front + Implement to create your own nondominated sorting algorithm. The size of the returned std::vector + should be equal to the size of the current_front. + */ + virtual std::vector niche_penalty(const std::vector& current_front, const eoPop& _pop) = 0; + + void calculate_worths(const eoPop& _pop) + { + // resize the worths beforehand + value().resize(_pop.size()); + + typedef typename EOT::Fitness::fitness_traits traits; + + switch (traits::nObjectives()) + { + case 1: + { + one_objective(_pop); + return; + } + case 2: + { + two_objectives(_pop); + return; + } + default : + { + m_objectives(_pop); + } + } + } + +private : + + /** used in fast nondominated sorting + DummyEO is just a storage place for fitnesses and + to store the original index + */ + class DummyEO : public EO + { + public: unsigned index; + }; + + void one_objective(const eoPop& _pop) + { + unsigned i; + std::vector tmp_pop; + tmp_pop.resize(_pop.size()); + + // copy pop to dummy population (only need the fitnesses) + for (i = 0; i < _pop.size(); ++i) + { + tmp_pop[i].fitness(_pop[i].fitness()); + tmp_pop[i].index = i; + } + + std::sort(tmp_pop.begin(), tmp_pop.end(), std::greater()); + + for (i = 0; i < _pop.size(); ++i) + { + value()[tmp_pop[i].index] = _pop.size() - i; // set rank + } + + // no point in calculcating niche penalty, as every distinct fitness value has a distinct rank + } + + /** + * Optimization for two objectives. Makes the algorithm run in + * complexity O(n log n) where n is the population size + * + * This is the same complexity as for a single objective + * or truncation selection or sorting. + * + * It will perform a sort on the two objectives seperately, + * and from the information on the ranks of the individuals on + * these two objectives, the non-dominated sorting rank is determined. + * There are then three nlogn operations in place: one sort per objective, + * plus a binary search procedure to combine the information about the + * ranks. + * + * After that it is a simple exercise to calculate the distance + * penalty + */ + + void two_objectives(const eoPop& _pop) + { + unsigned i; + typedef typename EOT::Fitness::fitness_traits traits; + assert(traits::nObjectives() == 2); + + std::vector sort1(_pop.size()); // index into population sorted on first objective + + for (i = 0; i < _pop.size(); ++i) + { + sort1[i] = i; + } + + std::sort(sort1.begin(), sort1.end(), Sorter(_pop)); + + // Ok, now the meat of the algorithm + + unsigned last_front = 0; + + double max1 = -1e+20; + for (i = 0; i < _pop.size(); ++i) + { + max1 = std::max(max1, _pop[i].fitness()[1]); + } + + max1 = max1 + 1.0; // add a bit to it so that it is a real upperbound + + unsigned prev_front = 0; + std::vector d; + d.resize(_pop.size(), max1); // initialize with the value max1 everywhere + + std::vector > fronts(_pop.size()); // to store indices into the front + + for (i = 0; i < _pop.size(); ++i) + { + unsigned index = sort1[i]; + + // check for clones and delete them + if (i > 0) + { + unsigned prev = sort1[i-1]; + if ( _pop[index].fitness() == _pop[prev].fitness()) + { // it's a clone, give it the worst rank! + + if (nasty_declone_flag_that_only_is_implemented_for_two_objectives) + //declone + fronts.back().push_back(index); + else // assign it the rank of the previous + fronts[prev_front].push_back(index); + continue; + } + } + + double value2 = _pop[index].fitness()[1]; + + if (traits::maximizing(1)) + value2 = max1 - value2; + + // perform binary search using std::upper_bound, a log n operation for each member + std::vector::iterator it = + std::upper_bound(d.begin(), d.begin() + last_front, value2); + + unsigned front = unsigned(it - d.begin()); + if (front == last_front) ++last_front; + + assert(it != d.end()); + + *it = value2; //update d + fronts[front].push_back(index); // add it to the front + + prev_front = front; + } + + // ok, and finally the niche penalty + + for (i = 0; i < fronts.size(); ++i) + { + if (fronts[i].size() == 0) continue; + + // Now we have the indices to the current front in current_front, do the niching + std::vector niche_count = niche_penalty(fronts[i], _pop); + + // Check whether the derived class was nice + if (niche_count.size() != fronts[i].size()) + { + throw std::logic_error("eoNDSorting: niche and front should have the same size"); + } + + double max_niche = *std::max_element(niche_count.begin(), niche_count.end()); + + for (unsigned j = 0; j < fronts[i].size(); ++j) + { + value()[fronts[i][j]] = i + niche_count[j] / (max_niche + 1.); // divide by max_niche + 1 to ensure that this front does not overlap with the next + } + + } + + // invert ranks to obtain a 'bigger is better' score + rank_to_worth(); + } + + class Sorter + { + public: + Sorter(const eoPop& _pop) : pop(_pop) {} + + bool operator()(unsigned i, unsigned j) const + { + typedef typename EOT::Fitness::fitness_traits traits; + + double diff = pop[i].fitness()[0] - pop[j].fitness()[0]; + + if (fabs(diff) < traits::tol()) + { + diff = pop[i].fitness()[1] - pop[j].fitness()[1]; + + if (fabs(diff) < traits::tol()) + return false; + + if (traits::maximizing(1)) + return diff > 0.; + return diff < 0.; + } + + if (traits::maximizing(0)) + return diff > 0.; + return diff < 0.; + } + + const eoPop& pop; + }; + + void m_objectives(const eoPop& _pop) + { + unsigned i; + + typedef typename EOT::Fitness::fitness_traits traits; + + std::vector > S(_pop.size()); // which individuals does guy i dominate + std::vector n(_pop.size(), 0); // how many individuals dominate guy i + + unsigned j; + for (i = 0; i < _pop.size(); ++i) + { + for (j = 0; j < _pop.size(); ++j) + { + if (_pop[i].fitness().dominates(_pop[j].fitness())) + { // i dominates j + S[i].push_back(j); // add j to i's domination std::list + + //n[j]++; // as i dominates j + } + else if (_pop[j].fitness().dominates(_pop[i].fitness())) + { // j dominates i, increment count for i, add i to the domination std::list of j + n[i]++; + + //S[j].push_back(i); + } + } + } + + std::vector current_front; + current_front.reserve(_pop.size()); + + // get the first front out + for (i = 0; i < _pop.size(); ++i) + { + if (n[i] == 0) + { + current_front.push_back(i); + } + } + + std::vector next_front; + next_front.reserve(_pop.size()); + + unsigned front_index = 0; // which front are we processing + while (!current_front.empty()) + { + // Now we have the indices to the current front in current_front, do the niching + std::vector niche_count = niche_penalty(current_front, _pop); + + // Check whether the derived class was nice + if (niche_count.size() != current_front.size()) + { + throw std::logic_error("eoNDSorting: niche and front should have the same size"); + } + + double max_niche = *std::max_element(niche_count.begin(), niche_count.end()); + + for (i = 0; i < current_front.size(); ++i) + { + value()[current_front[i]] = front_index + niche_count[i] / (max_niche + 1.); // divide by max_niche + 1 to ensure that this front does not overlap with the next + } + + // Calculate which individuals are in the next front; + + for (i = 0; i < current_front.size(); ++i) + { + for (j = 0; j < S[current_front[i]].size(); ++j) + { + unsigned dominated_individual = S[current_front[i]][j]; + n[dominated_individual]--; // As we remove individual i -- being part of the current front -- it no longer dominates j + + if (n[dominated_individual] == 0) // it should be in the current front + { + next_front.push_back(dominated_individual); + } + } + } + + front_index++; // go to the next front + swap(current_front, next_front); // make the next front current + next_front.clear(); // clear it for the next iteration + } + + rank_to_worth(); + } + + void rank_to_worth() + { + // now all that's left to do is to transform lower rank into higher worth + double max_fitness = *std::max_element(value().begin(), value().end()); + + // but make sure it's an integer upper bound, so that all ranks inside the highest integer are the front + max_fitness = ceil(max_fitness); + + for (unsigned i = 0; i < value().size(); ++i) + { + value()[i] = max_fitness - value()[i]; + } + + } + public : bool nasty_declone_flag_that_only_is_implemented_for_two_objectives; +}; + +/** + The original Non Dominated Sorting algorithm from Srinivas and Deb +*/ +template +class eoNDSorting_I : public eoNDSorting +{ +public : + eoNDSorting_I(double _nicheSize, bool nasty_flag_ = false) : eoNDSorting(nasty_flag_), nicheSize(_nicheSize) {} + + std::vector niche_penalty(const std::vector& current_front, const eoPop& _pop) + { + std::vector niche_count(current_front.size(), 0.); + + for (unsigned i = 0; i < current_front.size(); ++i) + { // calculate whether the other points lie within the nice + for (unsigned j = 0; j < current_front.size(); ++j) + { + if (i == j) + continue; + + double dist = 0.0; + + for (unsigned k = 0; k < _pop[current_front[j]].fitness().size(); ++k) + { + double d = _pop[current_front[i]].fitness()[k] - _pop[current_front[j]].fitness()[k]; + dist += d*d; + } + + if (dist < nicheSize) + { + niche_count[i] += 1.0 - pow(dist / nicheSize,2.); + } + } + } + + return niche_count; + } + + private : + + double nicheSize; +}; + +/** @brief Fast Elitist Non-Dominant Sorting Genetic Algorithm + + Adapted from Deb, Agrawal, Pratab and Meyarivan: A Fast Elitist + Non-Dominant Sorting Genetic Algorithm for MultiObjective + Optimization: NSGA-II KanGAL Report No. 200001 + + Note that this class does not do the sorting per se, but the sorting + of it worth_std::vector will give the right order + + The crowding distance is calculated as the sum of the distances to + the nearest neighbours. As we need to return the penalty value, we + have to invert that and invert it again in the base class, but such + is life, sigh +*/ +template +class eoNDSorting_II : public eoNDSorting +{ + public: + + eoNDSorting_II(bool nasty_flag_ = false) : eoNDSorting(nasty_flag_) {} + + typedef std::pair double_index_pair; + + class compare_nodes + { + public : + bool operator()(const double_index_pair& a, const double_index_pair& b) const + { + return a.first < b.first; + } + }; + + /// _cf points into the elements that consist of the current front + std::vector niche_penalty(const std::vector& _cf, const eoPop& _pop) + { + typedef typename EOT::Fitness::fitness_traits traits; + unsigned i; + std::vector niche_count(_cf.size(), 0.); + + + unsigned nObjectives = traits::nObjectives(); //_pop[_cf[0]].fitness().size(); + + for (unsigned o = 0; o < nObjectives; ++o) + { + + std::vector > performance(_cf.size()); + for (i =0; i < _cf.size(); ++i) + { + performance[i].first = _pop[_cf[i]].fitness()[o]; + performance[i].second = i; + } + + std::sort(performance.begin(), performance.end(), compare_nodes()); // a lambda operator would've been nice here + + std::vector nc(niche_count.size(), 0.0); + + for (i = 1; i < _cf.size()-1; ++i) + { // calculate distance + nc[performance[i].second] = performance[i+1].first - performance[i-1].first; + } + + double max_dist = *std::max_element(nc.begin(), nc.end()); + + // set boundary at max_dist + 1 (so it will get chosen over all the others + nc[performance[0].second] += max_dist + 1; + nc[performance.back().second] += max_dist + 1; + + for (i = 0; i < nc.size(); ++i) + { + niche_count[i] += (max_dist + 1 - nc[i]); + } + } + + return niche_count; + } +}; + +#endif diff --git a/trunk/eo/src/eoNeighborhood.h b/trunk/eo/src/eoNeighborhood.h new file mode 100644 index 000000000..804dc1075 --- /dev/null +++ b/trunk/eo/src/eoNeighborhood.h @@ -0,0 +1,57 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoNeighborhood.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EONEIGHBORHOOD_H_ +#define EONEIGHBORHOOD_H_ + + +/** + * Abstract class for neighborboods. Used for particle swarm optimization + * topology strategies. Can be social or physical. + * + * @ingroup Selectors + */ +template < class POT > class eoNeighborhood +{ +public: + + virtual void put(unsigned _oneIndice)=0; + + virtual bool contains(unsigned _oneIndice)=0; + + virtual unsigned size()=0; + + virtual unsigned get(unsigned _index)=0; + + virtual POT & best()=0; + + virtual void best(POT _particle)=0; + + /// Virtual dtor + virtual ~eoNeighborhood() {}; + +}; + + +#endif /* EONEIGHBORHOOD_H_ */ diff --git a/trunk/eo/src/eoObject.h b/trunk/eo/src/eoObject.h new file mode 100644 index 000000000..bac2f4737 --- /dev/null +++ b/trunk/eo/src/eoObject.h @@ -0,0 +1,75 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoObject.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOOBJECT_H +#define EOOBJECT_H + +//----------------------------------------------------------------------------- + +#include // For limits definition +#include // std::istream, std::ostream +#include // std::string + +#include + +/* +eoObject used to be the base class for the whole hierarchy, but this has +changed. eoObject is used to define a name (#className#) +that is used when loading or saving the state. + +Previously, this object also defined a print and read +interface, but it´s been moved to eoPrintable and eoPersistent. +*/ + +/** Defines a name (#className#), used when loading or saving a state. + +It is recommended that you only derive from eoObject in concrete classes. +Some parts of EO do not implement this yet, but that will change in the future. +eoObject, together with eoPersistent and eoPrintable provide a simple persistence +framework that is only needed when the classes have state that changes at runtime. + + @see eoPersistent eoPrintable, eoState + + @ingroup Core + */ +class eoObject +{ + public: + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoObject() {} + + /** Return the class id. This should be redefined in each class. + Only "leaf" classes can be non-virtual. + + Maarten: removed the default implementation as this proved to + be too error-prone: I found several classes that had a typo in + className (like classname), which would print eoObject instead of + their own. Having it pure will force the implementor to provide a + name. + */ + virtual std::string className() const = 0; + +}; + +#endif diff --git a/trunk/eo/src/eoOneToOneBreeder.h b/trunk/eo/src/eoOneToOneBreeder.h new file mode 100644 index 000000000..a4c18c0b4 --- /dev/null +++ b/trunk/eo/src/eoOneToOneBreeder.h @@ -0,0 +1,121 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOneToOneBreeder.h +// (c) Maarten Keijzer and Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mkeijzer@dhi.dk + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoOneToOneBreeder_h +#define eoOneToOneBreeder_h + +//----------------------------------------------------------------------------- + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** eoOneToOneBreeder: transforms a population using + * - an operator that MODIFIES only one parent from the populator + * (though it can use any number aside) and thus generates ONE offspring) + * - a local replacement between the parent and its offspring + * + * Typically, Differential Evolution (Storn and Price 94) and Deb et al's + * G3 can be built on this + * + * @ingroup Combination + */ +template +class eoOneToOneBreeder: public eoBreed +{ + public: + /** Ctor: + * @param _op a general operator (must MODIFY only ONE parent) + * @param _eval an eoEvalFunc to evaluate the offspring + * @param _pReplace probability that the best of parent/offspring wins [1] + * @param _howMany eoHowMany offpsring to generate [100%] + */ + eoOneToOneBreeder( + eoGenOp& _op, + eoEvalFunc & _eval, + double _pReplace = 1.0, + eoHowMany _howMany = eoHowMany(1.0) ) : + op(_op), eval(_eval), select( false ), + pReplace(_pReplace), howMany(_howMany) {} + + + /** The breeder: iteratively calls the genOp ONCE on a selective populator + * after having recorded the parent + * Then does the replacement + * + * @param _parents the initial population + * @param _offspring the resulting population (content -if any- is lost) + */ + void operator()(const eoPop& _parents, eoPop& _offspring) + { + unsigned target = howMany(_parents.size()); + + _offspring.clear(); + eoSelectivePopulator popit(_parents, _offspring, select); + + for (unsigned iParent=0; iParent leOffspring) // old parent better than offspring + if (rng.uniform() < pReplace) // if probability + leOffspring = theParent; // replace + // finally, go to next guy to handle + ++popit; + } + } + + /// The class name. + virtual std::string className() const { return "eoOneToOneBreeder"; } + + private: + eoGenOp& op; + eoEvalFunc & eval; + eoSequentialSelect select; + double pReplace; + eoHowMany howMany; +}; + +#endif diff --git a/trunk/eo/src/eoOp.h b/trunk/eo/src/eoOp.h new file mode 100644 index 000000000..b6ad783c2 --- /dev/null +++ b/trunk/eo/src/eoOp.h @@ -0,0 +1,189 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +//----------------------------------------------------------------------------- +// eoOp.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + CVS Info: $Date: 2004-08-10 17:19:46 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoOp.h,v 1.29 2004-08-10 17:19:46 jmerelo Exp $ $Author: jmerelo $ + */ +//----------------------------------------------------------------------------- + +#ifndef _eoOp_H +#define _eoOp_H + +#include +#include +#include +#include + +/** +@defgroup Operators Evolutionary Operators + +in EO, an operator is any functors that modifies objects and inherits from an eoOp. + +Typically, a mutation is an operator that modifies an individual, and an algorithm is an operator that modifies a population. + +In EO, there is a genetic operator hierarchy, with eoOp as father and +eoMonOp (monary or unary operator), eoBinOp and eoQuadOp (binary operators) +and eoGenOp (any number of inputs and outputs, see eoGenOp.h) +as subclasses. +Nobody should subclass eoOp, you should subclass eoGenOp, eoBinOp, eoQuadOp +or eoMonOp, those are the ones actually used here. + +#eoOp#s are only printable objects, so if you want to build them +from a file, it has to be done in another class, namely factories. +Each hierarchy of #eoOp#s should have its own factory, which know +how to build them from a description in a file. + +@author GeNeura Team, Marten Keijzer and Marc Schoenauer +@version 0.9 +@see eoGenOp.h eoOpFactory +*/ +//@{ + +/** +@defgroup Variators Variation operators +Variators are operators that modify individuals. + +@defgroup Selectors Selection operators + +Selectors are operators that select a subset of a population. + +Example: +@include t-eoSelect.cpp + + +@defgroup Replacors Replacement operators + +Replacors are operators that replace a subset of a population by another set of individuals. + +Here is an example with several replacement operators: +@include t-eoReplacement.cpp +*/ + +/** Abstract data types for EO operators. + Genetic operators act on chromosomes, changing them. + The type to use them on is problem specific. If your genotype + is a std::vector, there are operators that work specifically + on std::vector, but you might also find that generic operators + working on std::vector are what you need. + +*/ +template +class eoOp +{ +public: + //@{ + enum OpType { unary = 0, binary = 1, quadratic = 2, general = 3}; + /// + + /// Ctor + eoOp(OpType _type) + :opType( _type ) {}; + + /// Copy Ctor + eoOp( const eoOp& _eop ) + :opType( _eop.opType ) {}; + + /// Needed virtual destructor + virtual ~eoOp(){}; + + /// getType: number of operands it takes and individuals it produces + OpType getType() const {return opType;}; + +private: + + /// OpType is the type of the operator: how many operands it takes and how many it produces + OpType opType; +}; + +/** +eoMonOp is the monary operator: genetic operator that takes only one EO. +When defining your own, make sure that you return a boolean value +indicating that you have changed the content. +*/ +template +class eoMonOp: public eoOp, public eoUF +{ +public: + /// Ctor + eoMonOp() + : eoOp( eoOp::unary ) {}; + virtual std::string className() const {return "eoMonOp";}; +}; + + +/** Binary genetic operator: subclasses eoOp, and defines basically the + * operator() with two operands, only the first one can be modified +When defining your own, make sure that you return a boolean value +indicating that you have changed the content. + */ +template +class eoBinOp: public eoOp, public eoBF +{ +public: + /// Ctor + eoBinOp() + :eoOp( eoOp::binary ) {}; + virtual std::string className() const {return "eoBinOp";}; +}; + +/** Quad genetic operator: subclasses eoOp, and defines basically the + operator() with two operands, both can be modified. +When defining your own, make sure that you return a boolean value +indicating that you have changed the content. +*/ +template +class eoQuadOp: public eoOp, public eoBF { +public: + /// Ctor + eoQuadOp() + :eoOp( eoOp::quadratic ) {}; + virtual std::string className() const {return "eoQuadOp";}; +}; + +/** Turning an eoQuadOp into an eoBinOp: simply don't touch the second arg! + */ +template +class eoQuad2BinOp: public eoBinOp +{ +public: + /** Ctor + * @param _quadOp the eoQuadOp to be transformed + */ + eoQuad2BinOp(eoQuadOp & _quadOp) : quadOp(_quadOp) {} + + /** Operator() simply calls embedded quadOp operator() with dummy second arg + */ + bool operator()(EOT & _eo1, const EOT & _eo2) + { + EOT eoTmp = _eo2; // a copy that can be modified + // if the embedded eoQuadOp is not symmetrical, + // the result might be biased - hence the flip ... + if (eo::rng.flip(0.5)) + return quadOp(_eo1, eoTmp); // both are modified - that's all + else + return quadOp(eoTmp, _eo1); // both are modified - that's all + } + +private: + eoQuadOp & quadOp; +}; + +#endif + +//@} diff --git a/trunk/eo/src/eoOpContainer.h b/trunk/eo/src/eoOpContainer.h new file mode 100644 index 000000000..e1f43bdf6 --- /dev/null +++ b/trunk/eo/src/eoOpContainer.h @@ -0,0 +1,168 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOpContainer.h +// (c) Maarten Keijzer and Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mkeijzer@dhi.dk + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoOpContainer_H +#define _eoOpContainer_H + +#include + +/** eoOpContainer is a base class for the sequential and proportional selectors + * It takes care of wrapping the other operators, + * and deleting stuff that it has allocated + * + * Warning: all operators are added together with a rate (double) + * However, the meaning of this rate will be different in + * the differnet instances of eoOpContainer: + * an ***absolute*** probability in the sequential version, and + * a ***relative*** weight in the proportional version + * + * @ingroup Combination + */ +template +class eoOpContainer : public eoGenOp +{ + public : + /** Ctor: nothing much to do */ + eoOpContainer() : max_to_produce(0) {} + + /** Dtor: delete all the GenOps created when wrapping simple ops + */ + virtual ~eoOpContainer(void) {} + + /** for memory management (doesn't have to be very precise */ + virtual unsigned max_production(void) + { + return max_to_produce; + } + + /** + Add an operator to the container, also give it a rate + + (sidenote, it's much less hairy since I added the wrap_op is used) + */ + void add(eoOp& _op, double _rate) + { + ops.push_back(&wrap_op(_op, store)); + rates.push_back(_rate); + max_to_produce = std::max(max_to_produce,ops.back()->max_production()); + } + + virtual std::string className() const = 0; + + protected : + + std::vector rates; + std::vector*> ops; + + private : + eoFunctorStore store; + unsigned max_to_produce; +}; + +/** Sequential selection: + * note the mark, rewind, unmark cycle + * here operators are repeatedly applied on the same individual(s) + * not all too elegant, but it sort of works... + * + * @ingroup Combination + */ +template +class eoSequentialOp : public eoOpContainer +{ +public: + + using eoOpContainer::ops; + using eoOpContainer::rates; + + typedef unsigned position_type; + + + void apply(eoPopulator& _pop) { + _pop.reserve( this->max_production() ); + + position_type pos = _pop.tellp(); + for (size_t i = 0; i < rates.size(); ++i) { + _pop.seekp(pos); + do { + if (eo::rng.flip(rates[i])) { + // try + // { + // apply it to all the guys in the todo std::list + + //(*ops[i])(_pop); + + ops[i]->apply(_pop); + + // } + // check for out of individuals and do nothing with that... + // catch(eoPopulator::OutOfIndividuals&) + // { + // std::cout << "Warning: not enough individuals to handle\n"; + // return ; + // } + } + + if (!_pop.exhausted()) + ++_pop; + } + while (!_pop.exhausted()); + } + } + virtual std::string className() const {return "SequentialOp";} + +private: + + std::vector to_apply; + std::vector production; +}; + + + +/** The proportional versions: easy! */ +template +class eoProportionalOp : public eoOpContainer +{ +public: + + using eoOpContainer< EOT >::ops; + using eoOpContainer< EOT >::rates; + + void apply(eoPopulator& _pop) + { + unsigned i = eo::rng.roulette_wheel(rates); + + try + { + (*ops[i])(_pop); + ++_pop; + } + catch( typename eoPopulator::OutOfIndividuals&) + {} + } + virtual std::string className() const {return "ProportionalOp";} +}; + + +#endif diff --git a/trunk/eo/src/eoOpSelMason.h b/trunk/eo/src/eoOpSelMason.h new file mode 100644 index 000000000..577b5b56f --- /dev/null +++ b/trunk/eo/src/eoOpSelMason.h @@ -0,0 +1,108 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOpSelMason.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef _EOOPSELMASON_H +#define _EOOPSELMASON_H + +#include // for eoFactory and eoOpFactory + +#include + + +/** EO Mason, or builder, for operator selectors. A builder must allocate memory +to the objects it builds, and then deallocate it when it gets out of scope + +@ingroup Utilities +*/ +template +class eoOpSelMason: public eoFactory > { + +public: + typedef std::vector* > vOpP; + typedef map*, vOpP > MEV; + + /// @name ctors and dtors + //{@ + /// constructor + eoOpSelMason( eoOpFactory& _opFact): operatorFactory( _opFact ) {}; + + /// destructor + virtual ~eoOpSelMason() {}; + //@} + + /** Factory methods: creates an object from an std::istream, reading from + it whatever is needed to create the object. The format is + opSelClassName\\ + rate 1 operator1\\ + rate 2 operator2\\ + ...\\ + Stores all operators built in a database (#allocMap#), so that somebody + can destroy them later. The Mason is in charge or destroying the operators, + since the built object can´t do it itself. The objects built must be destroyed + from outside, using the "destroy" method + */ + virtual eoOpSelector* make(std::istream& _is) { + + std::string opSelName; + _is >> opSelName; + eoOpSelector* opSelectorP; + // Build the operator selector + if ( opSelName == "eoProportionalOpSel" ) { + opSelectorP = new eoProportionalOpSel(); + } + + // Temp std::vector for storing pointers + vOpP tmpPVec; + // read operator rate and name + while ( _is ) { + float rate; + _is >> rate; + if ( _is ) { + eoOp* op = operatorFactory.make( _is ); // This reads the rest of the line + // Add the operators to the selector, don´t pay attention to the IDs + opSelectorP->addOp( *op, rate ); + // Keep it in the store, to destroy later + tmpPVec.push_back( op ); + } // if + } // while + + // Put it in the map + allocMap.insert( MEV::value_type( opSelectorP, tmpPVec ) ); + + return opSelectorP; + }; + + ///@name eoObject methods + //@{ + /** Return the class id */ + virtual std::string className() const { return "eoOpSelMason"; } + + //@} + +private: + map*,std::vector* > > allocMap; + eoOpFactory& operatorFactory; +}; + + +#endif diff --git a/trunk/eo/src/eoOrderXover.h b/trunk/eo/src/eoOrderXover.h new file mode 100644 index 000000000..daaf52e0c --- /dev/null +++ b/trunk/eo/src/eoOrderXover.h @@ -0,0 +1,92 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +//----------------------------------------------------------------------------- +// eoOrderXover.h +//----------------------------------------------------------------------------- + +#ifndef eoOrderXover_h +#define eoOrderXover_h + +//----------------------------------------------------------------------------- + +#include +#include +#include + +/** + * apply orderXover on two chromosomes. + * Example: + * With 2 parents p1= [1,2,4,3,6,5], p2= [4,5,3,1,6,2] + * It applies a random cut between ("|") two indices. Example: the second element and the fourth: + * p1 : [1|2,4,3|6,5] and p2 : [4|5,3,1|6,2] generate two children: + * c1 = [2,4,3,6,5,1] 2,4,3 taken from p1 and 6,5,1 from p2 + * c2 = [5,3,1,6,2,4] 5,3,1 taken from p2 and 6,2,4 from p1 + * + * @ingroup Variators + */ +template class eoOrderXover: public eoQuadOp +{ + public: + /// The class name. + virtual std::string className() const { return "eoOrderXover"; } + + /** + * @return true if the chromosome has changed + * @param _chrom1 The first chromosome which will be crossed with chrom2. + * @param _chrom2 The second chromosome which will be crossed with chrom1. + */ + bool operator()(Chrom& _chrom1, Chrom& _chrom2){ + + char direction=eo::rng.flip()? 1 : -1; + unsigned cut2= 1 + eo::rng.random(_chrom1.size()); + unsigned cut1= eo::rng.random(cut2); + Chrom tmp1= _chrom1; + Chrom tmp2= _chrom2; + + cross(tmp1, tmp2, _chrom1, direction, cut1, cut2); + cross(tmp2, tmp1, _chrom2, direction, cut1, cut2); + + _chrom1.invalidate(); + _chrom2.invalidate(); + + return true; + } + + private: + + /** + * @param _chrom1 The first parent chromosome. + * @param _chrom2 The second parent chromosome. + * @param _child The result chromosome. + * @param _direction The direction of the OrderXover (left: -1 or right: 1) + * @param _cut1 index of the first cut + * @param _cut2 index of the second cut + */ + void cross(Chrom& _chrom1, Chrom& _chrom2, Chrom& _child, char _direction, unsigned _cut1, unsigned _cut2){ + + unsigned size, id=0, from=0; + size= _chrom1.size(); + + std::vector verif(size, false); + + for(unsigned i= _cut1; i<_cut2; i++){ + _child[id++]= _chrom1[i]; + verif[_chrom1[i] % size] = true; + } + + while(_chrom2[from] != _child[_cut2 - 1]) + from++; + + for(unsigned i=0; i +//----------------------------------------------------------------------------- + +/** + This is a generic class for particle swarm algorithms. There + is only one operator defined, which takes a population and does stuff to + it. It needn't be a complete algorithm, can be also a step of an + algorithm. Only used for mono-objective cases. + + @ingroup Algorithms +*/ +template < class POT > class eoPSO:public eoAlgo < POT >{}; + +#endif /*_EOPSO_H*/ diff --git a/trunk/eo/src/eoParticleBestInit.h b/trunk/eo/src/eoParticleBestInit.h new file mode 100644 index 000000000..b203c8246 --- /dev/null +++ b/trunk/eo/src/eoParticleBestInit.h @@ -0,0 +1,82 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParticleBestInit.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _EOPARTICLEBESTINIT_H +#define _EOPARTICLEBESTINIT_H + +//----------------------------------------------------------------------------- +#include +//----------------------------------------------------------------------------- + +/** + @addtogroup Initializators + @{ + */ + +/** + * Abstract class for particle best position initialization. + */ +template < class POT > class eoParticleBestInit:public eoUF < POT &, void > +{ +public: + + /** Apply the initialization to a whole given population */ + virtual void apply (eoPop < POT > &_pop) + { + for (unsigned i = 0; i < _pop.size (); i++) + { + this->operator ()(_pop[i]); + } + + } + +}; + +/** + * Initializes the best positions of a particle as its current positions and set the + * particle best fitness. + */ +template < class POT > class eoFirstIsBestInit:public eoParticleBestInit +{ + +public: + + /** Default CTor */ + eoFirstIsBestInit (){} + + void operator () (POT & _po1) + { + //Set the bestPositions + _po1.bestPositions = _po1 ; + + + // set the fitness + _po1.best(_po1.fitness()); + } + +}; + +#endif /*_EOPARTICLEBESTINIT_H */ + +/** @} */ diff --git a/trunk/eo/src/eoParticleFullInitializer.h b/trunk/eo/src/eoParticleFullInitializer.h new file mode 100644 index 000000000..96bebb579 --- /dev/null +++ b/trunk/eo/src/eoParticleFullInitializer.h @@ -0,0 +1,155 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParticleFullInitializer.h +// (c) OPAC Team, INRIA, 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: clive.canape@inria.fr + + + */ +//----------------------------------------------------------------------------- + +#ifndef _eoParticleFullInitializer_H +#define _eoParticleFullInitializer_H + +#include +#include +#include +#include +#include + +/** + @addtogroup Initializators + @{ + */ + + +/* + * Abstract class for initialization of algorithm PSO + */ +template class eoInitializerBase : public eoFunctorBase + { + public : + + virtual ~eoInitializerBase() + {} + + virtual void operator()() + {}; + }; + +/** + Base (name) class for Initialization of algorithm PSO + + @see eoInitializerBase eoUF apply +*/ +template class eoParticleInitializer : public eoInitializerBase + { + public: + + //! Constructor + //! @param _proc Evaluation function + //! @param _initVelo Initialization of the velocity + //! @param _initBest Initialization of the best + //! @param _topology Topology to use + //! @param _pop Population + eoParticleFullInitializer( + eoUF& _proc, + eoVelocityInit < POT > &_initVelo, + eoParticleBestInit &_initBest, + eoTopology &_topology, + eoPop < POT > &_pop + ) : proc(_proc), procPara(dummyEval), initVelo(_initVelo), initBest(_initBest), topology(_topology), pop(_pop) {} + + + //! Constructor for parallel evaluation + //! @param _proc Evaluation function + //! @param _initVelo Initialization of the velocity + //! @param _initBest Initialization of the best + //! @param _topology Topology to use + //! @param _pop Population + eoParticleFullInitializer( + eoPopEvalFunc & _proc, + eoVelocityInit < POT > &_initVelo, + eoParticleBestInit &_initBest, + eoTopology &_topology, + eoPop < POT > &_pop + ) : proc(dummy), procPara(_proc), initVelo(_initVelo), initBest(_initBest), topology(_topology), pop(_pop) + {} + + + //! Give the name of the class + //! @return The name of the class + virtual std::string className (void) const + { + return "eoInitializer"; + } + + + + virtual void operator () () + { + eoPop empty_pop; + + // evaluates using either the "sequential" evaluator ... + apply(proc, pop); + + // ... or the parallel one + procPara(empty_pop, pop); + + // no matter what is the eval operator, initializes the velocities and the particle's best + apply < POT > (initVelo, pop); + apply < POT > (initBest, pop); + + // finally setup the topology. We have now all we need to do so. + topology.setup(pop); + } + + private : + + /* + @param proc First evaluation + @param initVelo Initialization of the velocity + @param initBest Initialization of the best + + */ + eoPop < POT > & pop; + eoUF& proc; + eoPopEvalFunc & procPara; + eoVelocityInit < POT > & initVelo; + eoParticleBestInit & initBest; + eoTopology & topology; + class eoDummyEval : public eoPopEvalFunc + { + public: + void operator()(eoPop &,eoPop &_pop) + {} + } + dummyEval; + class eoDummy : public eoUF + { + public: + void operator()(POT &) + {} + + } + dummy; + }; +#endif /*_eoParticleFullInitializer_H*/ + +/** @} */ diff --git a/trunk/eo/src/eoPerf2Worth.h b/trunk/eo/src/eoPerf2Worth.h new file mode 100644 index 000000000..9f1746ecf --- /dev/null +++ b/trunk/eo/src/eoPerf2Worth.h @@ -0,0 +1,255 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoPerf2Worth.h + (c) Maarten Keijzer, Marc Schoenauer, 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoPerf2Worth_h +#define eoPerf2Worth_h + +#include +#include +#include + +#include +#include +#include + +/** @brief Base class to transform raw fitnesses into fitness for selection + +@see eoSelectFromWorth + +@ingroup Selectors +@ingroup Utilities +*/ +template +class eoPerf2Worth : public eoUF&, void>, public eoValueParam > +{ +public: + + using eoValueParam >::value; + + /** @brief default constructor */ + eoPerf2Worth(std::string _description = "Worths") + : eoValueParam >(std::vector(0), _description) + {} + + /** Sort population according to worth, will keep the worths and + fitness_cache in sync with the population. */ + virtual void sort_pop(eoPop& _pop) + { // start with a std::vector of indices + std::vector indices(_pop.size()); + + unsigned i; + for (i = 0; i < _pop.size();++i) + { // could use generate, but who cares + indices[i] = i; + } + + std::sort(indices.begin(), indices.end(), compare_worth(value())); + + eoPop tmp_pop; + tmp_pop.resize(_pop.size()); + std::vector tmp_worths(value().size()); + + for (i = 0; i < _pop.size(); ++i) + { + tmp_pop[i] = _pop[indices[i]]; + tmp_worths[i] = value()[indices[i]]; + } + + std::swap(_pop, tmp_pop); + std::swap(value(), tmp_worths); + } + + /** helper class used to sort indices into populations/worths */ + class compare_worth + { + public: + + compare_worth(const std::vector& _worths) : worths(_worths) {} + + bool operator()(unsigned a, unsigned b) const { + return worths[b] < worths[a]; // sort in descending (!) order + } + + private: + + const std::vector& worths; + }; + + + + virtual void resize(eoPop& _pop, unsigned sz) { + _pop.resize(sz); + value().resize(sz); + }; + +}; + +/** +Perf2Worth with fitness cache +@ingroup Selectors +@ingroup Utilities +*/ +template +class eoPerf2WorthCached : public eoPerf2Worth +{ +public: + + using eoPerf2Worth::value; + + eoPerf2WorthCached(std::string _description = "Worths") : eoPerf2Worth(_description) {} + + + /** + Implementation of the operator(), updating a cache of fitnesses. Calls the virtual function + calculate_worths when one of the fitnesses has changed. It is not virtual, but derived classes + can remove the fitness caching trough the third template element + */ + void operator()(const eoPop& _pop) + { + unsigned i; + if (fitness_cache.size() == _pop.size()) + { + bool in_sync = true; + for (i = 0; i < _pop.size(); ++i) + { + if (fitness_cache[i] != _pop[i].fitness()) + { + in_sync = false; + fitness_cache[i] = _pop[i].fitness(); + } + } + + if (in_sync) + { // worths are up to date + return; + } + } + else // just cache the fitness + { + fitness_cache.resize(_pop.size()); + for (i = 0; i < _pop.size(); ++i) + { + fitness_cache[i] = _pop[i].fitness(); + } + } + + // call derived implementation of perf2worth mapping + calculate_worths(_pop); + } + + /** The actual virtual function the derived classes should implement*/ + virtual void calculate_worths(const eoPop& _pop) = 0; + + /** + Sort population according to worth, will keep the worths and fitness_cache in sync with the population. + */ + virtual void sort_pop(eoPop& _pop) + { // start with a std::vector of indices + std::vector indices(_pop.size()); + + unsigned i; + for (i = 0; i < _pop.size();++i) + { // could use generate, but who cares + indices[i] = i; + } + + std::sort(indices.begin(), indices.end(), compare_worth(value())); + + eoPop tmp_pop; + tmp_pop.resize(_pop.size()); + std::vector tmp_worths(value().size()); + +#ifdef _MSC_VER + std::vector tmp_cache(_pop.size()); +#else + std::vector tmp_cache(_pop.size()); +#endif + for (i = 0; i < _pop.size(); ++i) + { + tmp_pop[i] = _pop[indices[i]]; + tmp_worths[i] = value()[indices[i]]; + + tmp_cache[i] = fitness_cache[indices[i]]; + } + + std::swap(_pop, tmp_pop); + std::swap(value(), tmp_worths); + std::swap(fitness_cache, tmp_cache); + } + + /** helper class used to sort indices into populations/worths + */ + class compare_worth + { + public : + compare_worth(const std::vector& _worths) : worths(_worths) {} + + bool operator()(unsigned a, unsigned b) const + { + return worths[b] < worths[a]; // sort in descending (!) order + } + + private : + + const std::vector& worths; + }; + + virtual void resize(eoPop& _pop, unsigned sz) + { + _pop.resize(sz); + value().resize(sz); + fitness_cache.resize(sz); + } + + private : + std::vector fitness_cache; +}; + + + +/** A dummy perf2worth, just in case you need it +@ingroup Selectors +@ingroup Utilities +*/ +template +class eoNoPerf2Worth : public eoPerf2Worth +{ +public: + + using eoValueParam< EOT >::value; + + // default behaviour, just copy fitnesses + void operator()(const eoPop& _pop) { + unsigned i; + value().resize(_pop.size()); + for (i = 0; i < _pop.size(); ++i) + value()[i]=_pop[i]; + } +}; + + + +#endif diff --git a/trunk/eo/src/eoPeriodicContinue.h b/trunk/eo/src/eoPeriodicContinue.h new file mode 100644 index 000000000..1a3f9d0de --- /dev/null +++ b/trunk/eo/src/eoPeriodicContinue.h @@ -0,0 +1,55 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// (c) OPAC Team, LIFL, Feb. 2006 + +/* This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: cahon@lifl.fr +*/ + +#ifndef __eoPeriodicContinue_h +#define __eoPeriodicContinue_h + +#include +#include + +/** A continue that becomes true periodically. + */ +template class eoPeriodicContinue: public eoContinue { + +public: + + /** Constructor. The period is given in parameter. */ + eoPeriodicContinue (unsigned __period, unsigned __init_counter = 0) : + period (__period), counter (__init_counter) + {} + + + /** It returns 'true' only if the current number of generations modulo + the period doen't equal to zero. */ + bool operator () (const eoPop & /*pop*/) + { + return ((++ counter) % period) != 0 ; + } + + +private: + + unsigned period; + + unsigned counter; + +}; +#endif diff --git a/trunk/eo/src/eoPersistent.cpp b/trunk/eo/src/eoPersistent.cpp new file mode 100644 index 000000000..c1334ebc4 --- /dev/null +++ b/trunk/eo/src/eoPersistent.cpp @@ -0,0 +1,14 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#include + +//Implementation of these objects + + +std::istream & operator >> ( std::istream& _is, eoPersistent& _o ) { + _o.readFrom(_is); + return _is; +} diff --git a/trunk/eo/src/eoPersistent.h b/trunk/eo/src/eoPersistent.h new file mode 100644 index 000000000..ed3f581ec --- /dev/null +++ b/trunk/eo/src/eoPersistent.h @@ -0,0 +1,66 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + + +//----------------------------------------------------------------------------- + +// eoPersistent.h +// (c) GeNeura Team, 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOPERSISTENT_H +#define EOPERSISTENT_H + + +#include // std::istream, std::ostream +#include // para std::string + +#include "eoPrintable.h" + +/** + @addtogroup Core + @{ +*/ + +/** +An persistent object that knows how to write (through functions inherited from +#eoPrintable#) and read itself + */ +class eoPersistent: public eoPrintable +{ + public: + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoPersistent() {} + + /** + * Read object. + * @param _is A std::istream. + * @throw runtime_std::exception If a valid object can't be read. + */ + virtual void readFrom(std::istream& _is) = 0; + +}; + +///Standard input for all objects in the EO hierarchy +std::istream & operator >> ( std::istream& _is, eoPersistent& _o ); + +#endif + +/** @} */ diff --git a/trunk/eo/src/eoPop.h b/trunk/eo/src/eoPop.h new file mode 100644 index 000000000..3ea53f466 --- /dev/null +++ b/trunk/eo/src/eoPop.h @@ -0,0 +1,339 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPop.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOPOP_H +#define _EOPOP_H + +#include +#include +#include // needed for GCC 3.2 +#include + +// EO includes +#include // for eoInit +#include +#include +#include // for shuffle method + +/** A std::vector of EO object, to be used in all algorithms + * (selectors, operators, replacements, ...). + * + * We have no idea if a population can be + * some other thing that a std::vector, but if somebody thinks of it, this concrete + * implementation can be moved to "generic" and an abstract Population + * interface be provided. + * + * The template can be instantiated with anything that accepts a "size" + * and eoInit derived object. in the ctor. + * EOT must also have a copy ctor, since temporaries are created and then + * passed to the eoInit object + * + * @ingroup Core + */ +template +class eoPop: public std::vector, public eoObject, public eoPersistent +{ +public: + + using std::vector::size; + using std::vector::resize; + using std::vector::operator[]; + using std::vector::begin; + using std::vector::end; + + typedef typename EOT::Fitness Fitness; +#if defined(__CUDACC__) + typedef typename std::vector::iterator iterator; + typedef typename std::vector::const_iterator const_iterator; +#endif + + /** Default ctor. Creates empty pop + */ + eoPop() : std::vector(), eoObject(), eoPersistent() {}; + + /** Ctor for the initialization of chromosomes + + @param _popSize total population size + @param _chromInit Initialization routine, produces EO's, needs to be an eoInit + */ + eoPop( unsigned _popSize, eoInit& _chromInit ) + :std::vector() + { + resize(_popSize); + for ( unsigned i = 0; i < _popSize; i++ ) + { + _chromInit(operator[](i)); + } + }; + + /** appends random guys at end of pop. + Can be used to initialize it pop is empty + + @param _newPopSize total population size + @param _chromInit Initialization routine, produces EO's, needs to be an eoInit + */ + void append( unsigned _newPopSize, eoInit& _chromInit ) + { + unsigned oldSize = size(); + if (_newPopSize < oldSize) + { + throw std::runtime_error("New size smaller than old size in pop.append"); + return; + } + if (_newPopSize == oldSize) + return; + resize(_newPopSize); // adjust the size + for ( unsigned i = oldSize; i < _newPopSize; i++ ) + { + _chromInit(operator[](i)); + } + }; + + + /** Ctor from an std::istream; reads the population from a stream, + each element should be in different lines + @param _is the stream + */ + eoPop( std::istream& _is ) :std::vector() { + readFrom( _is ); + } + + /** Empty Dtor */ + virtual ~eoPop() {} + + + /// helper struct for getting a pointer + struct Ref { const EOT* operator()(const EOT& eot) { return &eot;}}; + /// helper struct for comparing on pointers + struct Cmp { + bool operator()(const EOT* a, const EOT* b) const + { return b->operator<(*a); } + }; + /// helper struct for comparing (EA or PSO) + struct Cmp2 + { + bool operator()(const EOT & a,const EOT & b) const + { + return b.operator<(a); + } + }; + + + + /** + sort the population. Use this member to sort in order + of descending Fitness, so the first individual is the best! + */ + void sort(void) + { + std::sort(begin(), end(), Cmp2()); + } + + /** creates a std::vector pointing to the individuals in descending order */ + void sort(std::vector& result) const + { + result.resize(size()); + + std::transform(begin(), end(), result.begin(), Ref()); + + std::sort(result.begin(), result.end(), Cmp()); + } + + /** + shuffle the population. Use this member to put the population + in random order + */ + void shuffle(void) + { + UF_random_generator gen; + std::random_shuffle(begin(), end(), gen); + } + + /** creates a std::vector pointing to the individuals in random order */ + void shuffle(std::vector& result) const + { + result.resize(size()); + + std::transform(begin(), end(), result.begin(), Ref()); + + UF_random_generator gen; + std::random_shuffle(result.begin(), result.end(), gen); + } + + /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ +#if defined(__CUDACC__) + eoPop::iterator it_best_element() + { + eoPop:: iterator it = std::max_element(begin(), end()); +#else + typename eoPop::iterator it_best_element() { + typename eoPop::iterator it = std::max_element(begin(), end()); +#endif + return it; + } + + /** returns an iterator to the best individual DOES NOT MOVE ANYBODY */ + const EOT & best_element() const + { +#if defined(__CUDACC__) + eoPop::const_iterator it = std::max_element(begin(), end()); +#else + typename eoPop::const_iterator it = std::max_element(begin(), end()); +#endif + return (*it); + } + + /** returns a const reference to the worse individual DOES NOT MOVE ANYBODY */ + const EOT & worse_element() const + { +#if defined(__CUDACC__) + eoPop::const_iterator it = std::min_element(begin(), end()); +#else + typename eoPop::const_iterator it = std::min_element(begin(), end()); +#endif + return (*it); + } + + /** returns an iterator to the worse individual DOES NOT MOVE ANYBODY */ +#if defined(__CUDACC__) + eoPop::iterator it_worse_element() + { + eoPop::iterator it = std::min_element(begin(), end()); +#else + typename eoPop::iterator it_worse_element() + { + typename eoPop::iterator it = std::min_element(begin(), end()); +#endif + return it; + } + + /** + slightly faster algorithm than sort to find all individuals that are better + than the nth individual. INDIVIDUALS ARE MOVED AROUND in the pop. + */ +#if defined(__CUDACC__) + eoPop::iterator nth_element(int nth) + { + eoPop::iterator it = begin() + nth; +#else + typename eoPop::iterator nth_element(int nth) + { + typename eoPop::iterator it = begin() + nth; +#endif + std::nth_element(begin(), it, end(), std::greater()); + return it; + } + + struct GetFitness { Fitness operator()(const EOT& _eo) const { return _eo.fitness(); } }; + + /** returns the fitness of the nth element */ + Fitness nth_element_fitness(int which) const + { // probably not the fastest way to do this, but what the heck + + std::vector fitness(size()); + std::transform(begin(), end(), fitness.begin(), GetFitness()); + + typename std::vector::iterator it = fitness.begin() + which; + std::nth_element(fitness.begin(), it, fitness.end(), std::greater()); + return *it; + } + + /** const nth_element function, returns pointers to sorted individuals + * up the the nth + */ + void nth_element(int which, std::vector& result) const + { + + result.resize(size()); + std::transform(begin(), end(), result.begin(), Ref()); + + typename std::vector::iterator it = result.begin() + which; + + std::nth_element(result.begin(), it, result.end(), Cmp()); + } + + /** does STL swap with other pop */ + void swap(eoPop& other) + { + std::swap(static_cast& >(*this), static_cast& >(other)); + } + + /** + * Prints sorted pop but does NOT modify it! + * + * @param _os A std::ostream. + */ + virtual void sortedPrintOn(std::ostream& _os) const + { + std::vector result; + sort(result); + _os << size() << '\n'; + for (unsigned i = 0; i < size(); ++i) + { + _os << *result[i] << std::endl; + } + } + + /** + * Write object. It's called printOn since it prints the object _on_ a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + _os << size() << '\n'; + std::copy( begin(), end(), std::ostream_iterator( _os, "\n") ); + } + + /** @name Methods from eoObject */ + //@{ + /** + * Read object. The EOT class must have a ctor from a stream; + * @param _is A std::istream. + */ + virtual void readFrom(std::istream& _is) + { + size_t sz; + _is >> sz; + + resize(sz); + + for (size_t i = 0; i < sz; ++i) { + operator[](i).readFrom( _is ); + } + } + + /** Inherited from eoObject. Returns the class name. + @see eoObject + */ + virtual std::string className() const {return "eoPop";}; + //@} + + virtual void invalidate() + { + for (unsigned i=0; ioperator[](i).invalidate(); + } +}; + +#endif diff --git a/trunk/eo/src/eoPopEvalFunc.h b/trunk/eo/src/eoPopEvalFunc.h new file mode 100644 index 000000000..aba74d9ab --- /dev/null +++ b/trunk/eo/src/eoPopEvalFunc.h @@ -0,0 +1,107 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoPopEvalFunc.h + Abstract class for global evaluation of the population + + (c) GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoPopEvalFunc_H +#define eoPopEvalFunc_H + +#include +#include + +/** eoPopEvalFunc: This abstract class is for GLOBAL evaluators + * of a population after variation. + * It takes 2 populations (typically the parents and the offspring) + * and is suppposed to evaluate them alltogether + * + * Basic use: apply an embedded eoEvalFunc to the offspring + * + * Time-varying fitness: apply the embedded eoEvalFunc to both + * offspring and parents + * + * Advanced uses: Co-evolution or "parisian" approach, or ... + * + * Basic parallelization (synchronous standard evolution engine): + * call the slaves and wait for the results + * + * @ingroup Evaluation + */ +template +class eoPopEvalFunc : public eoBF & , eoPop &, void> +{}; + +///////////////////////////////////////////////////////////// +// eoPopLoopEval +///////////////////////////////////////////////////////////// + +/** eoPopLoopEval: an instance of eoPopEvalFunc that simply applies + * a private eoEvalFunc to all offspring + * + * @ingroup Evaluation + */ +template +class eoPopLoopEval : public eoPopEvalFunc { +public: + /** Ctor: set value of embedded eoEvalFunc */ + eoPopLoopEval(eoEvalFunc & _eval) : eval(_eval) {} + + /** Do the job: simple loop over the offspring */ + void operator()(eoPop & _parents, eoPop & _offspring) + { + (void)_parents; + apply(eval, _offspring); + } + +private: + eoEvalFunc & eval; +}; + +///////////////////////////////////////////////////////////// +// eoTimeVaryingLoopEval +///////////////////////////////////////////////////////////// + +/** eoPopLoopEval: an instance of eoPopEvalFunc that simply applies + * a private eoEvalFunc to all offspring AND ALL PARENTS + * as the fitness is supposed here to vary + * + * @ingroup Evaluation + */ +template +class eoTimeVaryingLoopEval : public eoPopEvalFunc { +public: + /** Ctor: set value of embedded eoEvalFunc */ + eoTimeVaryingLoopEval(eoEvalFunc & _eval) : eval(_eval) {} + + /** Do the job: simple loop over the offspring */ + void operator()(eoPop & _parents, eoPop & _offspring) + { + apply(eval, _parents); + apply(eval, _offspring); + } + +private: + eoEvalFunc & eval; +}; + +#endif diff --git a/trunk/eo/src/eoPopulator.h b/trunk/eo/src/eoPopulator.h new file mode 100644 index 000000000..104aafe5e --- /dev/null +++ b/trunk/eo/src/eoPopulator.h @@ -0,0 +1,211 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPopulator.h +// (c) Maarten Keijzer and Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mkeijzer@dhi.dk + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoPopulator_H +#define _eoPopulator_H + +#include +#include + +/** eoPopulator is a helper class for general operators eoGenOp + It is an eoPop but also behaves like an eoPop::iterator + as far as operator* and operator++ are concerned + + @see eoGenOp + @see eoOpContainer + + @ingroup Core + @ingroup Utilities +*/ +template +class eoPopulator +{ +public : + + eoPopulator(const eoPop& _src, eoPop& _dest) : dest(_dest), current(dest.end()), src(_src) + { + dest.reserve(src.size()); // we don't know this, but wth. + current = dest.end(); + } + + /** @brief Virtual Constructor */ + virtual ~eoPopulator() {}; + + struct OutOfIndividuals {}; + + /** a populator behaves like an iterator. Hence the operator* + * it returns the current individual -- eventually getting + * a new one through the operator++ if at the end + */ + EOT& operator*(void) + { + if (current == dest.end()) + get_next(); // get a new individual + + return *current; + } + + /** only prefix increment defined + Does not add a new element when at the end, use operator* for that + If not on the end, increment the pointer to the next individual + */ + eoPopulator& operator++() + { + if (current == dest.end()) + { // keep the pointer there + return *this; + } + // else + ++current; + return *this; + } + + /** mandatory for operators that generate more offspring than parents + * if such a thing exists ? + */ + void insert(const EOT& _eo) + { /* not really efficient, but its nice to have */ + current = dest.insert(current, _eo); + } + + /** just to make memory mangement more efficient + */ + void reserve(int how_many) + { + size_t sz = current - dest.begin(); + if (dest.capacity() < dest.size() + how_many) + { + dest.reserve(dest.size() + how_many); + } + + current = dest.begin() + sz; + } + + /** can be useful for operators with embedded selectors + * e.g. your brain and my beauty -type + */ + const eoPop& source(void) { return src; } + + /** Get the offspring population. + Can be useful when you want to do some online niching kind of thing + */ + eoPop& offspring(void) { return dest; } + + typedef unsigned position_type; + + /** this is a direct access container: tell position */ + position_type tellp() { return current - dest.begin(); } + /** this is a direct access container: go to position */ + void seekp(position_type pos) { current = dest.begin() + pos; } + /** no more individuals */ + bool exhausted(void) { return current == dest.end(); } + + /** the pure virtual selection method - will be instanciated in + * eoSeqPopulator and eoSelectivePopulator + */ + virtual const EOT& select() = 0; + +protected: + eoPop& dest; + typename eoPop::iterator current; + const eoPop& src; + +private: + + void get_next() { + if(current == dest.end()) + { // get new individual from derived class select() + dest.push_back(select()); + current = dest.end(); + --current; + return; + } + // else + ++current; + return; + } + +}; + + +/** SeqPopulator: an eoPopulator that sequentially goes through the + population is supposed to be used after a batch select of a whole + bunch or genitors +*/ +template +class eoSeqPopulator : public eoPopulator +{ +public: + + using eoPopulator< EOT >::src; + + eoSeqPopulator(const eoPop& _pop, eoPop& _dest) : + eoPopulator(_pop, _dest), current(0) {} + + /** the select method simply returns next individual in the src pop */ + const EOT& select(void) { + if(current >= eoPopulator< EOT >::src.size()) { + throw OutOfIndividuals(); + } + + const EOT& res = src[current++]; + return res; + } + + +private: + + struct OutOfIndividuals {}; + + unsigned current; +}; + + +/** SelectivePopulator an eoPoplator that uses an eoSelectOne to select guys. +Supposedly, it is passed the initial population. + */ +template +class eoSelectivePopulator : public eoPopulator +{ +public : + + using eoPopulator< EOT >::src; + + eoSelectivePopulator(const eoPop& _pop, eoPop& _dest, eoSelectOne& _sel) + : eoPopulator(_pop, _dest), sel(_sel) + { sel.setup(_pop); }; + + /** the select method actually selects one guy from the src pop */ + const EOT& select() { + return sel(src); + } + + +private: + + eoSelectOne& sel; +}; + +#endif diff --git a/trunk/eo/src/eoPrintable.cpp b/trunk/eo/src/eoPrintable.cpp new file mode 100644 index 000000000..ec6e32462 --- /dev/null +++ b/trunk/eo/src/eoPrintable.cpp @@ -0,0 +1,21 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +//----------------------------------------------------------------------------- +// eoPrintable.cpp +//----------------------------------------------------------------------------- + +#include + +//----------------------------------------------------------------------------- +//Implementation of these objects +//----------------------------------------------------------------------------- + +std::ostream & operator << ( std::ostream& _os, const eoPrintable& _o ) { + _o.printOn(_os); + return _os; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/src/eoPrintable.h b/trunk/eo/src/eoPrintable.h new file mode 100644 index 000000000..1f2404a89 --- /dev/null +++ b/trunk/eo/src/eoPrintable.h @@ -0,0 +1,62 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPrintable.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef EOPRINTABLE_H +#define EOPRINTABLE_H + +//----------------------------------------------------------------------------- + +#include // std::istream, std::ostream +#include // para std::string + +/* +This functionality was separated from eoObject, since it makes no sense to print +some objects (for instance, a #eoFactory# or a random number generator. +*/ + +/** +Base class for objects that can print themselves +(#printOn#). Besides, this file defines the standard output for all the objects; +if the objects define printOn there's no need to define "operator<<". + + @ingroup Core + */ +class eoPrintable +{ + public: + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoPrintable() {} + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const = 0; +}; + +//----------------------------------------------------------------------------- +///Standard output for all objects in the EO hierarchy +std::ostream & operator << ( std::ostream& _os, const eoPrintable& _o ); + +#endif diff --git a/trunk/eo/src/eoPropGAGenOp.h b/trunk/eo/src/eoPropGAGenOp.h new file mode 100644 index 000000000..5d2fd79cd --- /dev/null +++ b/trunk/eo/src/eoPropGAGenOp.h @@ -0,0 +1,89 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPropGAGenOp.h +// (c) Marc.Schoenauer 2005 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoPropGAGenOp_h +#define _eoPropGAGenOp_h + +#include "eoGenOp.h" +#include "eoInvalidateOps.h" +/////////////////////////////////////////////////////////////////////////////// +// class eoSGAGenOp +/////////////////////////////////////////////////////////////////////////////// + +/** + * eoPropGAGenOp (for Simple GA, but Proportional) + * choice between Crossover, mutation or cloining + * with respect to given relatve weights + * + * @ingroup Combination + */ +template +class eoPropGAGenOp : public eoGenOp +{ + public: + + /** Ctor from + * * weight of clone + * * crossover (with weight) + * * mutation (with weight) + */ + eoPropGAGenOp(double _wClone, eoQuadOp& _cross, double _wCross, + eoMonOp& _mut, double _wMut) + : wClone(_wClone), + cross(_cross), + wCross(_wCross), + mut(_mut), + wMut(_wMut) + { + propOp.add(cross, wCross); // the crossover - with weight wCross + propOp.add(mut, wMut); // mutation with weight wMut + propOp.add(monClone, wClone); + } + + /** do the job: delegate to op */ + virtual void apply(eoPopulator& _pop) + { + propOp.apply(_pop); + } + + /** inherited from eoGenOp */ + virtual unsigned max_production(void) {return 2;} + + virtual std::string className() const {return "eoPropGAGenOp";} + + + private: + double wClone; + eoQuadOp ✗ // eoInvalidateXXX take the boolean output + double wCross; + eoMonOp & mut; // of the XXX op and invalidate the EOT + double wMut; + eoProportionalOp propOp; + eoMonCloneOp monClone; +}; + + +#endif diff --git a/trunk/eo/src/eoProportionalCombinedOp.h b/trunk/eo/src/eoProportionalCombinedOp.h new file mode 100644 index 000000000..60c478903 --- /dev/null +++ b/trunk/eo/src/eoProportionalCombinedOp.h @@ -0,0 +1,234 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +//----------------------------------------------------------------------------- +// eoCombinedOp.h +// (c) GeNeura Team, 1998, Marc Schoenauer, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoCombinedOp_H +#define _eoCombinedOp_H + +#include +#include +#include +#include +#include +#include + +/** +\defgroup Utilities Utilities + +Classes that may help you write elegant code. +*/ + +/** +@defgroup Combination Operators combination + +Classes that permits to combine several operators in a single one. + +@ingroup Utilities +@{ +*/ + +/** @name PropCombined Genetic operators + +Combination of same-type Genetic Operators. + +This files contains the classes eoPropCombinedXXXOp (XXX in {Mon, Bin, Quad}) +that allow to use more than a single operator of a specific class +into an algorithm, chosing by a roulette wheel based on user-defined rates + +@author Marc Schoenauer +@version 0.1 +*/ + + +////////////////////////////////////////////////////// +//// combined MonOp +////////////////////////////////////////////////////// + +/** eoMonOp is the monary operator: genetic operator that takes only one EO + + * now accepts generic operators +*/ + +template +class eoPropCombinedMonOp: public eoMonOp +{ +public: + /// Ctor from a "true" operator + eoPropCombinedMonOp(eoMonOp & _first, const double _rate) + { + ops.push_back(&_first); + rates.push_back(_rate); + } + + virtual std::string className() const { return "eoPropCombinedMonOp"; } + + virtual void add(eoMonOp & _op, const double _rate, bool _verbose=false) + { + ops.push_back(&_op); + rates.push_back(_rate); + // compute the relative rates in percent - to warn the user! + if (_verbose) + printOn( eo::log << eo::logging ); + } + + // outputs the operators and percentages + virtual void printOn(std::ostream & _os) + { + double total = 0; + unsigned i; + for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %\n"; + } + + virtual bool operator()(EOT & _indi) + { + unsigned what = rng.roulette_wheel(rates); // choose one op + return (*ops[what])(_indi); // apply it + } +protected: +std::vector*> ops; +std::vector rates; +}; + +////////////////////////////////////////////////////// +//// combined BinOp +////////////////////////////////////////////////////// + +/** COmbined Binary genetic operator: + * operator() has two operands, only the first one can be modified + */ +template +class eoPropCombinedBinOp: public eoBinOp +{ +public: + /// Ctor + eoPropCombinedBinOp(eoBinOp & _first, const double _rate) + { + ops.push_back(&_first); + rates.push_back(_rate); + } + +virtual std::string className() const { return "eoPropCombinedBinOp"; } + +virtual void add(eoBinOp & _op, const double _rate, bool _verbose=false) + { + ops.push_back(&_op); + rates.push_back(_rate); + // compute the relative rates in percent - to warn the user! + if (_verbose) + { + double total = 0; + unsigned i; + for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %" << std::endl; + } + } + + virtual void operator()(EOT & _indi1, const EOT & _indi2) + { + unsigned what = rng.roulette_wheel(rates); // choose one op index + return (*ops[what])(_indi1, _indi2); // apply it + } +private: +std::vector*> ops; +std::vector rates; +}; + + +////////////////////////////////////////////////////// +//// combined QuadOp +////////////////////////////////////////////////////// + +/** Quad genetic operator: subclasses eoOp, and defines basically the + operator() with two operands, both can be modified. +*/ +/** Combined quad genetic operator: + * operator() has two operands, both can be modified + + * generic operators are now allowed: there are imbedded into + * the corresponding "true" operator + */ +template +class eoPropCombinedQuadOp: public eoQuadOp +{ +public: + /// Ctor from a true operator + eoPropCombinedQuadOp(eoQuadOp & _first, const double _rate) + { + ops.push_back(&_first); + rates.push_back(_rate); + } + + virtual std::string className() const { return "eoPropCombinedQuadOp"; } + + virtual void add(eoQuadOp & _op, const double _rate, bool _verbose) + { +#ifndef DEPRECATED_MESSAGES +#pragma message "The use of the verbose parameter in eoPropCombinedQuadOp::add is deprecated and will be removed in the next release." + eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoPropCombinedQuadOp::add is deprecated and will be removed in the next release." << std::endl; +#endif // !DEPRECATED_MESSAGES + + add(_op,_rate); + } + + // addition of a true operator + virtual void add(eoQuadOp & _op, const double _rate) + { + ops.push_back(&_op); + rates.push_back(_rate); + // compute the relative rates in percent - to warn the user! + printOn( eo::log << eo::logging ); + } + + // outputs the operators and percentages + virtual void printOn(std::ostream & _os) + { + double total = 0; + unsigned i; + for (i=0; iclassName() << " with rate " << 100*rates[i]/total << " %\n"; + } + + virtual bool operator()(EOT & _indi1, EOT & _indi2) + { + unsigned what = rng.roulette_wheel(rates); // choose one op index + return (*ops[what])(_indi1, _indi2); // apply it + } +private: +std::vector*> ops; +std::vector rates; +}; + + +// for General Ops, it's another story - see eoOpContainer +#endif + +/** @} */ diff --git a/trunk/eo/src/eoProportionalSelect.h b/trunk/eo/src/eoProportionalSelect.h new file mode 100644 index 000000000..ec1243cee --- /dev/null +++ b/trunk/eo/src/eoProportionalSelect.h @@ -0,0 +1,87 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoProportionalSelect.h +// (c) GeNeura Team, 1998 - EEAAX 1999, Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoProportionalSelect_h +#define eoProportionalSelect_h + +//----------------------------------------------------------------------------- + +#include +#include +#include +#include + +/** eoProportionalSelect: select an individual proportional to her stored fitness + value + + Changed the algorithm to make use of a cumulative array of fitness scores, + This changes the algorithm from O(n) per call to O(log n) per call. (MK) + + @ingroup Selectors +*/ +template class eoProportionalSelect: public eoSelectOne +{ +public: + /// Sanity check + eoProportionalSelect(const eoPop& /*pop*/ = eoPop()) + { + if (minimizing_fitness()) + throw std::logic_error("eoProportionalSelect: minimizing fitness"); + } + + void setup(const eoPop& _pop) + { + if (_pop.size() == 0) return; + + cumulative.resize(_pop.size()); + cumulative[0] = _pop[0].fitness(); + + for (unsigned i = 1; i < _pop.size(); ++i) + { + cumulative[i] = _pop[i].fitness() + cumulative[i-1]; + } + } + + /** do the selection, + */ + const EOT& operator()(const eoPop& _pop) + { + if (cumulative.size() == 0) setup(_pop); + + double fortune = rng.uniform() * cumulative.back(); + typename FitVec::iterator result = std::upper_bound(cumulative.begin(), cumulative.end(), fortune); + return _pop[result - cumulative.begin()]; + } + +private : + + typedef std::vector FitVec; + FitVec cumulative; +}; +/** @example t-eoRoulette.cpp + */ + +#endif diff --git a/trunk/eo/src/eoRandomRealWeightUp.h b/trunk/eo/src/eoRandomRealWeightUp.h new file mode 100644 index 000000000..81521b512 --- /dev/null +++ b/trunk/eo/src/eoRandomRealWeightUp.h @@ -0,0 +1,80 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRandomRealWeightUp.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EORANDOMREALWEIGHTUP_H +#define EORANDOMREALWEIGHTUP_H + +//----------------------------------------------------------------------------- +#include +#include +//----------------------------------------------------------------------------- + +/** + * Update an inertia weight by assigning it an (uniform) random value. + * The weight is a basic feature to evaluate the velocity of a particle in + * swarm optimization. + * + * @ingroup Variators + */ +class eoRandomRealWeightUp:public eoWeightUpdater +{ +public: + + /** + * Default constructor + * @param _min - The minimum bound for the weight + * @param _max - The maximum bound for the weight + */ + eoRandomRealWeightUp( + double _min, + double _max + ):min(_min),max(_max) + { + // consistency check + if (min > max) + { + std::string s; + s.append (" min > max in eoRandomRealWeightUp"); + throw std::runtime_error (s); + } + } + + /** + * Generate an real random number in [min,max] and assign it to _weight + * @param _weight - The assigned (real) weight + */ + void operator() (double & _weight) + { + _weight=rng.uniform(max-min)+min; + } + + +protected: + double min,max; + +}; + + + +#endif/*EORANDOMREALWEIGHTUP_H*/ diff --git a/trunk/eo/src/eoRandomSelect.h b/trunk/eo/src/eoRandomSelect.h new file mode 100644 index 000000000..065f050f9 --- /dev/null +++ b/trunk/eo/src/eoRandomSelect.h @@ -0,0 +1,93 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRandomSelect.h +// (c) GeNeura Team, 1998 - EEAAX 1999, Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ + +#ifndef eoRandomSelect_h +#define eoRandomSelect_h + +/** This file contains straightforward selectors: + * eoRandomSelect returns an individual uniformly selected + * eoBestSelect always return the best individual + * eoSequentialSelect returns all individuals in turn + */ + +#include +#include + +/** eoRandomSelect: a selection method that selects ONE individual randomly + * + * @ingroup Selectors + */ +template class eoRandomSelect: public eoSelectOne +{ + public: + + /// not a big deal!!! + virtual const EOT& operator()(const eoPop& _pop) + { + return _pop[eo::rng.random(_pop.size())] ; + } +}; + +/** eoBestSelect: a selection method that always return the best + * (mainly for testing purposes) + * + * @ingroup Selectors + */ +template class eoBestSelect: public eoSelectOne +{ + public: + + /// not a big deal!!! + virtual const EOT& operator()(const eoPop& _pop) + { + return _pop.best_element() ; + } +}; + +/** eoNoSelect: returns all individual in order WITHOUT USING FITNESS!!! + * looping back to the beginning when exhasuted + * + * @ingroup Selectors + */ +template class eoNoSelect: public eoSelectOne +{ + public: + /** Ctor + */ + eoNoSelect(): current(0) {} + + virtual const EOT& operator()(const eoPop& _pop) + { + if (current >= _pop.size()) + current=0; + + current++; + return _pop[current-1] ; + } +private: + unsigned current; +}; + +#endif diff --git a/trunk/eo/src/eoRanking.h b/trunk/eo/src/eoRanking.h new file mode 100644 index 000000000..5e7342911 --- /dev/null +++ b/trunk/eo/src/eoRanking.h @@ -0,0 +1,112 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoRanking.h + (c) Maarten Keijzer, Marc Schoenauer, 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoRanking_h +#define eoRanking_h + +#include + +/** An instance of eoPerfFromWorth + * COmputes the ranked fitness: fitnesses range in [m,M] + * with m=2-pressure/popSize and M=pressure/popSize. + * in between, the progression depstd::ends on exponent (linear if 1). + * + * @ingroup Selectors + */ +template +class eoRanking : public eoPerf2Worth // false: do not cache fitness +{ +public: + + using eoPerf2Worth::value; + + /* Ctor: + @param _p selective pressure (in (1,2] + @param _e exponent (1 == linear) + */ + eoRanking(double _p=2.0, double _e=1.0): + pressure(_p), exponent(_e) {} + + /* helper function: finds index in _pop of _eo, an EOT * */ + int lookfor(const EOT *_eo, const eoPop& _pop) + { + typename eoPop::const_iterator it; + for (it=_pop.begin(); it<_pop.end(); it++) + { + if (_eo == &(*it)) + return it-_pop.begin(); + } + throw std::runtime_error("Not found in eoLinearRanking"); + } + + /* COmputes the ranked fitness: fitnesses range in [m,M] + with m=2-pressure/popSize and M=pressure/popSize. + in between, the progression depstd::ends on exponent (linear if 1). + */ + virtual void operator()(const eoPop& _pop) + { + std::vector rank; + _pop.sort(rank); + unsigned pSize =_pop.size(); + unsigned int pSizeMinusOne = pSize-1; + + if (pSize <= 1) + throw std::runtime_error("Cannot do ranking with population of size <= 1"); + + // value() refers to the std::vector of worthes (we're in an eoParamvalue) + value().resize(pSize); + + double beta = (2-pressure)/pSize; + if (exponent == 1.0) // no need for exponetial then + { + double alpha = (2*pressure-2)/(pSize*pSizeMinusOne); + for (unsigned i=0; i 1/[P(P-1)/2] + } + } + else // exponent != 1 + { + double gamma = (2*pressure-2)/pSize; + for (unsigned i=0; i +#include + +/** eoRankingSelect: select an individual by roulette wheel on its rank + * is an eoRouletteWorthSelect, i.e. a selector using a std::vector of worthes + * rather than the raw fitness (see eoSelectFromWorth.h) + * uses an internal eoRanking object which is an eoPerf2Worth + * + * @ingroup Selectors +*/ +template +class eoRankingSelect: public eoRouletteWorthSelect +{ +public: + /** Ctor: + * @param _p the selective pressure, should be in [1,2] (2 is the default) + * @param _e exponent (1 == linear) + */ + eoRankingSelect(double _p = 2.0, double _e=1.0): + eoRouletteWorthSelect(ranking), ranking(_p, _e) {} + +private : + eoRanking ranking; // derived from eoPerf2Worth +}; + +#endif diff --git a/trunk/eo/src/eoRealBoundModifier.h b/trunk/eo/src/eoRealBoundModifier.h new file mode 100644 index 000000000..9a9e032bc --- /dev/null +++ b/trunk/eo/src/eoRealBoundModifier.h @@ -0,0 +1,109 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRealBoundModifier.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ + +#ifndef EOREALBOUNDMODIFIER_H +#define EOREALBOUNDMODIFIER_H + +#include +#include + +/** @defgroup Bounds Bounds management + * + * Bounds are a set of utilities that permits to manage ranges of existence + * for variables. For example to restrain vectors or parameters to a given domain. + * + * @ingroup Utilities + */ + +/** + * Abstract class for eoRealVectorBounds modifier. + * Used to modify the bounds included into the eoRealVectorBounds object. + * + * @ingroup Bounds + */ +class eoRealBoundModifier: public eoBF < eoRealBaseVectorBounds &,unsigned,void > {}; + + +/** + * An eoRealBoundModifier that modify nothing ! + * @ingroup Bounds + */ +class eoDummyRealBoundModifier: public eoRealBoundModifier +{ +public: + + eoDummyRealBoundModifier (){} + + void operator() (eoRealBaseVectorBounds & _bnds,unsigned _i) + { + (void)_bnds; + (void)_i; + } +}; + + + +/** + * Modify an eoReal(Base)VectorBounds : + * At iteration t, the interval I(t)=[min,max] is updated as: + * I(t)=[min,(1-(t/Nt)^alpha)*max] where + * - t, the current iteration, is given with an eoValueParam + * - Nt is the stopping criteria <=> the total number of iterations + * - alpha a coefficient + * + */ +class eoExpDecayingBoundModifier: public eoRealBoundModifier +{ +public: + + /** + * Constructor + * @param _stopCriteria - The total number of iterations + * @param _alpha + * @param _genCounter - An eoValueParam that gives the current iteration + */ + eoExpDecayingBoundModifier (unsigned _stopCriteria, + double _alpha, + eoValueParam & _genCounter): + stopCriteria(_stopCriteria), + alpha(_alpha), + genCounter(_genCounter){} + + + void operator() (eoRealBaseVectorBounds & _bnds,unsigned _i) + { + double newMaxBound=(1-pow((double)genCounter.value()/stopCriteria,alpha))*_bnds.maximum(_i); + + // should delete the old eoRealBounds ? + _bnds[_i]=new eoRealInterval(_bnds.minimum(_i),std::max(_bnds.minimum(_i),newMaxBound)); + } + + +protected: + unsigned stopCriteria; + double alpha; + eoValueParam & genCounter; + +}; + +#endif/*EOREALBOUNDMODIFIER_H*/ diff --git a/trunk/eo/src/eoRealParticle.h b/trunk/eo/src/eoRealParticle.h new file mode 100644 index 000000000..14326558c --- /dev/null +++ b/trunk/eo/src/eoRealParticle.h @@ -0,0 +1,50 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRealParticle.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _EOREALPARTICLE_H +#define _EOREALPARTICLE_H + + +#include + + +/** eoRealParticle: Implementation of a real-coded particle for + * particle swarm optimization. Positions, velocities and best positions are real-coded. + * + * @ingroup Real +*/ +template < class FitT> class eoRealParticle: public eoVectorParticle + +{ +public: + + eoRealParticle(unsigned size = 0, double positions = 0.0,double velocities = 0.0,double bestPositions = 0.0): eoVectorParticle (size, positions,velocities,bestPositions) {} + + virtual std::string className() const + { + return "eoRealParticle"; + } +}; + +#endif /*_EOREALPARTICLE_H*/ diff --git a/trunk/eo/src/eoReduce.h b/trunk/eo/src/eoReduce.h new file mode 100644 index 000000000..7f0c17729 --- /dev/null +++ b/trunk/eo/src/eoReduce.h @@ -0,0 +1,306 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoReduce.h +// Base class for population-merging classes +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef eoReduce_h +#define eoReduce_h + +//----------------------------------------------------------------------------- + +#include + +// EO includes +#include // eoPop +#include // eoReduce +#include +#include + +/** + * eoReduce: .reduce the new generation to the specified size + At the moment, limited to truncation - with 2 different methods, + one that sorts the whole population, and one that repeatidely kills + the worst. Ideally, we should be able to choose at run-time!!! + + @ingroup Replacors +*/ +template class eoReduce: public eoBF&, unsigned, void> +{}; + +/** truncation method using sort + @ingroup Replacors + */ +template class eoTruncate : public eoReduce +{ + void operator()(eoPop& _newgen, unsigned _newsize) + { + if (_newgen.size() == _newsize) + return; + if (_newgen.size() < _newsize) + throw std::logic_error("eoTruncate: Cannot truncate to a larger size!\n"); + + _newgen.sort(); + _newgen.resize(_newsize); + } +}; + +/** random truncation + @ingroup Replacors + * */ +template class eoRandomReduce : public eoReduce +{ + void operator()(eoPop& _newgen, unsigned _newsize) + { + if (_newgen.size() == _newsize) + return; + if (_newgen.size() < _newsize) + throw std::logic_error("eoRandomReduce: Cannot truncate to a larger size!\n"); + + // shuffle the population, then trucate + _newgen.shuffle(); + _newgen.resize(_newsize); + } +}; + +/** +EP truncation method (some global stochastic tournament + sort) +Softer selective pressure than pure truncate + @ingroup Replacors +*/ +template class eoEPReduce : public eoReduce +{ +public: + typedef typename EOT::Fitness Fitness; + + eoEPReduce(unsigned _t_size ): + t_size(_t_size) + { + if (t_size < 2) + { + eo::log << eo::warnings << "Warning: EP tournament size should be >= 2. Adjusted" << std::endl; + t_size = 2; + } + } + + /// helper struct for comparing on std::pairs + // compares the scores + // uses the fitness if scores are equals ???? + typedef std::pair::iterator> EPpair; + struct Cmp { + bool operator()(const EPpair a, const EPpair b) const + { + if (b.first == a.first) + return (*b.second < *a.second); + return b.first < a.first; + } + }; + + + void operator()(eoPop& _newgen, unsigned _newsize) + { + unsigned int presentSize = _newgen.size(); + + if (presentSize == _newsize) + return; + if (presentSize < _newsize) + throw std::logic_error("eoTruncate: Cannot truncate to a larger size!\n"); + std::vector scores(presentSize); + for (unsigned i=0; i competitor.fitness()) + scores[i].first += 1; + else if (fit == competitor.fitness()) + scores[i].first += 0.5; + } + } + + // now we have the scores + typename std::vector::iterator it = scores.begin() + _newsize; + std::nth_element(scores.begin(), it, scores.end(), Cmp()); + // sort(scores.begin(), scores.end(), Cmp()); + unsigned j; + // std::cout << "Les scores apres tri\n"; + // for (j=0; jsecond); + } +private: + unsigned t_size; + eoPop tmPop; +}; + +/** a truncate class that does not sort, but repeatidely kills the worse. +To be used in SSGA-like replacements (e.g. see eoSSGAWorseReplacement) + @ingroup Replacors +*/ +template +class eoLinearTruncate : public eoReduce +{ + void operator()(eoPop& _newgen, unsigned _newsize) + { + unsigned oldSize = _newgen.size(); + if (oldSize == _newsize) + return; + if (oldSize < _newsize) + throw std::logic_error("eoLinearTruncate: Cannot truncate to a larger size!\n"); + for (unsigned i=0; i::iterator it = _newgen.it_worse_element(); + _newgen.erase(it); + } + } +}; + +/** a truncate class based on a repeated deterministic (reverse!) tournament +To be used in SSGA-like replacements (e.g. see eoSSGADetTournamentReplacement) + @ingroup Replacors +*/ +template +class eoDetTournamentTruncate : public eoReduce +{ +public: + eoDetTournamentTruncate(unsigned _t_size): + t_size(_t_size) + { + if (t_size < 2) + { + eo::log << eo::warnings << "Warning, Size for eoDetTournamentTruncate adjusted to 2" << std::endl; + t_size = 2; + } + } + + void operator()(eoPop& _newgen, unsigned _newsize) + { + unsigned oldSize = _newgen.size(); + if (_newsize == 0) + { + _newgen.resize(0); + return; + } + if (oldSize == _newsize) + return; + if (oldSize < _newsize) + throw std::logic_error("eoDetTournamentTruncate: Cannot truncate to a larger size!\n"); + + + // Now OK to erase some losers + std::cout << "oldSize - _newsize: " << oldSize - _newsize << std::endl; + for (unsigned i=0; i(_newgen, t_size); + //OLDCODE _newgen.erase(&eo); + + // Jeroen Eggermont stdc++v3 patch + // in the new code from stdc++v3 an iterator from a container is no longer an pointer to T + // Because eo already contained a fuction using eoPop::iterator's we will use the following + + _newgen.erase( inverse_deterministic_tournament(_newgen.begin(), _newgen.end(), t_size) ); + + } + } +private: + unsigned t_size; +}; + +/** a truncate class based on a repeated deterministic (reverse!) tournament +To be used in SSGA-like replacements (e.g. see eoSSGAStochTournamentReplacement) + @ingroup Replacors +*/ +template +class eoStochTournamentTruncate : public eoReduce +{ +public: + eoStochTournamentTruncate(double _t_rate): + t_rate(_t_rate) + { + if (t_rate <= 0.5) + { + eo::log << eo::warnings << "Warning, Rate for eoStochTournamentTruncate adjusted to 0.51" << std::endl; + t_rate = 0.51; + } + if (t_rate > 1) + { + eo::log << eo::warnings << "Warning, Rate for eoStochTournamentTruncate adjusted to 1" << std::endl; + t_rate = 1; + } + } + + void operator()(eoPop& _newgen, unsigned _newsize) + { + unsigned oldSize = _newgen.size(); + if (_newsize == 0) + { + _newgen.resize(0); + return; + } + if (oldSize == _newsize) + return; + if (oldSize < _newsize) + throw std::logic_error("eoStochTournamentTruncate: Cannot truncate to a larger size!\n"); + // Now OK to erase some losers + for (unsigned i=0; i(_newgen, t_rate); + //OLDCODE _newgen.erase(&eo); + + // Jeroen Eggermont stdc++v3 patch + // in the new code from stdc++v3 an iterator from a container is no longer an pointer to T + // Because eo already contained a fuction using eoPop::iterator's we will use the following + + _newgen.erase( inverse_stochastic_tournament(_newgen.begin(), _newgen.end(), t_rate) ); + + + } + } + +private: + double t_rate; +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/trunk/eo/src/eoReduceMerge.h b/trunk/eo/src/eoReduceMerge.h new file mode 100644 index 000000000..02933b404 --- /dev/null +++ b/trunk/eo/src/eoReduceMerge.h @@ -0,0 +1,124 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoReduceMerge.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoReduceMerge_h +#define _eoReduceMerge_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** @addtogroup Replacors + * @{ + */ + +/** +eoReduceMerge: Replacement strategies that start by reducing the parents, + then merge with the offspring + +This is the way to do SSGA: the offspring gets inserted in the population +even if it is worse than anybody else. + +@see eoReduceMerge +@see eoSSGAWorseReplacement +@see eoSSGADetTournamentReplacement +@see eoSSGAStochTournamentReplacement +*/ +template +class eoReduceMerge : public eoReplacement +{ + public: + eoReduceMerge(eoReduce& _reduce, eoMerge& _merge) : + reduce(_reduce), merge(_merge) + {} + + void operator()(eoPop& _parents, eoPop& _offspring) + { + if (_parents.size() < _offspring.size()) + throw std::logic_error("eoReduceMerge: More offspring than parents!\n"); + reduce(_parents, _parents.size() - _offspring.size()); + merge(_offspring, _parents); + } + + private : + eoReduce& reduce; + eoMerge& merge; +}; + +/** +SSGA replace worst. Is an eoReduceMerge. +*/ +template +class eoSSGAWorseReplacement : public eoReduceMerge +{ + public : + eoSSGAWorseReplacement() : eoReduceMerge(truncate, plus) {} + + private : + eoLinearTruncate truncate; + eoPlus plus; +}; + +/** +SSGA deterministic tournament replacement. Is an eoReduceMerge. +*/ +template +class eoSSGADetTournamentReplacement : public eoReduceMerge +{ + public : + eoSSGADetTournamentReplacement(unsigned _t_size) : + eoReduceMerge(truncate, plus), truncate(_t_size) {} + + private : + eoDetTournamentTruncate truncate; + eoPlus plus; +}; + +/** SSGA stochastic tournament replacement. Is an eoReduceMerge. +It much cleaner to insert directly the offspring in the parent population, +but it is NOT equivalent in case of more than 1 offspring as already +replaced could be removed , which is not possible in the eoReduceMerge +So what the heck ! */ +template +class eoSSGAStochTournamentReplacement : public eoReduceMerge +{ + public : + eoSSGAStochTournamentReplacement(double _t_rate) : + eoReduceMerge(truncate, plus), truncate(_t_rate) {} + + private : + eoStochTournamentTruncate truncate; + eoPlus plus; +}; + +/** @} */ +#endif diff --git a/trunk/eo/src/eoReduceMergeReduce.h b/trunk/eo/src/eoReduceMergeReduce.h new file mode 100644 index 000000000..17721f733 --- /dev/null +++ b/trunk/eo/src/eoReduceMergeReduce.h @@ -0,0 +1,143 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoReduceMergeReduce.h + (c) Maarten Keijzer, Marc Schoenauer, 2002 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoReduceMergeReduce_h +#define _eoReduceMergeReduce_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** +eoReduceMergeReduce is an eoReplacement: +- saves possible elite parents +- reduces rest of parents +- reduces offspring +- merges reduced populations +- reduces resulting merged pop if necessary + + @ingroup Replacors +*/ +template +class eoReduceMergeReduce : public eoReplacement +{ +public: + eoReduceMergeReduce(eoHowMany _howManyElite, + bool _strongElitism, + eoHowMany _howManyReducedParents, + eoReduce & _reduceParents, + eoHowMany _howManyReducedOffspring, + eoReduce & _reduceOffspring, + eoReduce & _reduceFinal) : + howManyElite(_howManyElite), + strongElitism(_strongElitism), + howManyReducedParents(_howManyReducedParents), + howManyReducedOffspring (_howManyReducedOffspring), + reduceParents(_reduceParents), + reduceOffspring(_reduceOffspring), + reduceFinal(_reduceFinal) + {} + + void operator()(eoPop & _parents, eoPop & _offspring) + { + eoPop temp; + unsigned int finalPopSize = _parents.size(); + unsigned int offSize = _offspring.size(); + + unsigned int elite = howManyElite(finalPopSize); + if (elite) // some parents MUST be saved somewhere + { + temp.resize(elite); + _parents.nth_element(elite); + std::copy(_parents.begin(), _parents.begin()+elite, temp.begin()); + _parents.erase(_parents.begin(), _parents.begin()+elite); + } + + // the reduce steps. First the parents + unsigned reducedParentSize = howManyReducedParents(_parents.size()); + if (!reducedParentSize) + _parents.clear(); + else if (reducedParentSize != _parents.size()) + reduceParents(_parents, reducedParentSize); + + // then the offspring + unsigned reducedOffspringSize = howManyReducedOffspring(offSize); + if (!reducedOffspringSize) + throw std::runtime_error("No offspring left after reduction!"); + if (reducedOffspringSize != offSize) // need reduction + reduceOffspring(_offspring, reducedOffspringSize); + + // now merge reduced populations + _parents.resize(reducedParentSize + _offspring.size()); + std::copy(_offspring.begin(), _offspring.end(), + _parents.begin()+reducedParentSize); + + // reduce the resulting population + // size depstd::ends on elitism + if (elite && strongElitism) + { + if (_parents.size() != finalPopSize-elite) + reduceFinal(_parents, finalPopSize-elite); + // and put back the elite + unsigned oldPSize = _parents.size(); + _parents.resize(_parents.size()+elite); + std::copy(temp.begin(), temp.end(), _parents.begin()+oldPSize); + } + else + { // only reduce final pop to right size + if (_parents.size() != finalPopSize) + reduceFinal(_parents, finalPopSize); + if (elite) // then treat weak elitism + { + unsigned toSave = 0; + _parents.sort(); + EOT & eoLimit = _parents[elite-1]; + unsigned index=0; + while ( (temp[index++] > eoLimit) && (index < temp.size()) ) + toSave++; + if (toSave) + for (unsigned i=0; i weak estd::listism + eoHowMany howManyReducedParents; // if 0, no parent in final replacement + eoHowMany howManyReducedOffspring; // if 0, std::runtime_error + // the reducers + eoReduce & reduceParents; + eoReduce & reduceOffspring; + eoReduce & reduceFinal; +}; + +#endif diff --git a/trunk/eo/src/eoReduceSplit.h b/trunk/eo/src/eoReduceSplit.h new file mode 100644 index 000000000..4b21aa25e --- /dev/null +++ b/trunk/eo/src/eoReduceSplit.h @@ -0,0 +1,328 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoReduceSplit.h +// Base class for population-reducing classes - retaining the poor losers +// (c) GeNeura Team, 1998, Marc Schoenauer, 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef eoReduceSplit_h +#define eoReduceSplit_h + +//----------------------------------------------------------------------------- + +#include + +// EO includes +#include // eoPop +#include // eoReduce +#include + +/** @addtogroup Replacors + * @{ + */ + +/** + * eoReduceSplit: reduce the pop to the specified size + * AND eventually returns the eliminated guys +*/ +template class eoReduceSplit: public eoBF&, eoPop &, void > +{}; + +/** deterministic truncation method using sort */ +template +class eoTruncateSplit : public eoReduceSplit +{ +public: + /** Ctor: must provide amount of reduction, + and whether or not you need to return the eliminated guys + */ + eoTruncateSplit(eoHowMany _howMany, bool _returnEliminated = false): + howMany(_howMany), returnEliminated(_returnEliminated) {} + + /** do the jonb */ + void operator()(eoPop& _newgen, eoPop & _eliminated) + { + unsigned popSize = _newgen.size(); + unsigned eliminated = howMany(popSize); + if (!eliminated) // nothing to do + return ; + unsigned newsize = popSize - eliminated; + if (newsize < 0) + throw std::logic_error("eoTruncateSplit: Cannot truncate to a larger size!\n"); + + _newgen.nth_element(newsize); + + // save poor losers if necessary + if (returnEliminated) + for (unsigned i=0; i +class eoLinearTruncateSplit : public eoReduceSplit +{ +public: + /** Ctor: must provide amount of reduction, + and whether or not you need to return the eliminated guys + */ + eoLinearTruncateSplit(eoHowMany _howMany, bool _returnEliminated = false): + howMany(_howMany), returnEliminated(_returnEliminated) {} + + /** do the job */ + void operator()(eoPop& _newgen, eoPop & _eliminated) + { + unsigned popSize = _newgen.size(); + unsigned eliminated = howMany(popSize); + if (!eliminated) // nothing to do + return ; + long newsize = static_cast(popSize) - static_cast(eliminated); + if (newsize < 0) + throw std::logic_error("eoLinearTruncateSplit: Cannot truncate to a larger size!\n"); + + _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? + for (unsigned i=0; i::iterator it = _newgen.it_worse_element(); + if (returnEliminated) + _eliminated.push_back(*it); + _newgen.erase(it); + } + } + +private: + eoHowMany howMany; + bool returnEliminated; +}; + +/** random truncation - batch version */ +template +class eoRandomSplit : public eoReduceSplit +{ +public: + /** Ctor: must provide amount of reduction, + and whether or not you need to return the eliminated guys + */ + eoRandomSplit(eoHowMany _howMany, bool _returnEliminated = false): + howMany(_howMany), returnEliminated(_returnEliminated) {} + + /** do the job */ + void operator()(eoPop& _newgen, eoPop & _eliminated) + { + unsigned popSize = _newgen.size(); + unsigned eliminated = howMany(popSize); + if (!eliminated) // nothing to do + return ; + unsigned newsize = popSize - eliminated; + if (newsize < 0) + throw std::logic_error("eoRandomSplit: Cannot truncate to a larger size!\n"); + + _newgen.shuffle(); + + // save poor losers if necessary + if (returnEliminated) + for (unsigned i=0; i +class eoLinearRandomSplit : public eoReduceSplit +{ +public: + /** Ctor: must provide amount of reduction, + and whether or not you need to return the eliminated guys + */ + eoLinearRandomSplit(eoHowMany _howMany, bool _returnEliminated = false): + howMany(_howMany), returnEliminated(_returnEliminated) {} + + /** do the job */ + void operator()(eoPop& _newgen, eoPop & _eliminated) + { + unsigned popSize = _newgen.size(); + unsigned eliminated = howMany(popSize); + if (!eliminated) // nothing to do + return ; + unsigned newsize = popSize - eliminated; + if (newsize < 0) + throw std::logic_error("eoLinearRandomSplit: Cannot truncate to a larger size!\n"); + + _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? + for (unsigned i=0; i::iterator it = _newgen.begin()+loser; + if (returnEliminated) + _eliminated.push_back(*it); + _newgen.erase(it); + } + return ; + } + +private: + eoHowMany howMany; + bool returnEliminated; +}; + + +/** a ReduceSplit class based on a repeated deterministic (reverse!) tournament +To be used in SSGA-like replacements (e.g. see eoSSGADetTournamentReplacement) +*/ +template +class eoDetTournamentTruncateSplit : public eoReduceSplit +{ +public: + /** Ctor: must provide amount of reduction, + and whether or not you need to return the eliminated guys + */ + eoDetTournamentTruncateSplit(unsigned _t_size, eoHowMany _howMany, + bool _returnEliminated = false): + t_size(_t_size), howMany(_howMany), + returnEliminated(_returnEliminated) + { + if (t_size < 2) + { + eo::log << eo::warnings << "Warning, Size for eoDetTournamentTruncateSplit adjusted to 2" << std::endl; + t_size = 2; + } + } + + /** Performs repeated inverse_deterministic_tournament on the pop */ + void operator()(eoPop& _newgen, eoPop & _eliminated) + // BUG??? void operator()(eoPop& _newgen, unsigned _newsize) + { + unsigned popSize = _newgen.size(); + unsigned eliminated = howMany(popSize); + if (!eliminated) // nothing to do + return ; + unsigned newsize = popSize - eliminated; + if (newsize < 0) + throw std::logic_error("eoDetTournamentTruncateSplit: Cannot truncate to a larger size!\n"); + + + _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? + for (unsigned i=0; i::iterator it = inverse_deterministic_tournament(_newgen.begin(), _newgen.end(), t_size); + if (returnEliminated) + _eliminated.push_back(*it); + _newgen.erase(it); + } + } + +private: + unsigned t_size; + eoHowMany howMany; + bool returnEliminated; +}; + +/** a ReduceSplit class based on a repeated deterministic (reverse!) tournament +To be used in SSGA-like replacements (e.g. see eoSSGAStochTournamentReplacement) +*/ +template +class eoStochTournamentTruncateSplit : public eoReduce +{ +public: + /** Ctor: must provide amount of reduction, + and whether or not you need to return the eliminated guys + */ + eoStochTournamentTruncateSplit(double _t_rate, eoHowMany _howMany, + bool _returnEliminated = false): + t_rate(_t_rate), howMany(_howMany), + returnEliminated(_returnEliminated) + { + if (t_rate <= 0.5) + { + eo::log << eo::warnings << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 0.51" << std::endl; + t_rate = 0.51; + } + if (t_rate > 1) + { + eo::log << eo::warnings << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 1" << std::endl; + t_rate = 1; + } + } + + /** Performs repeated inverse_stochastic_tournament on the pop */ + void operator()(eoPop& _newgen, eoPop & _eliminated) + //BUG??? void operator()(eoPop& _newgen, unsigned _newsize) + { + /* old version + if (!_eliminated.size()) // nothing to do + return; + unsigned oldSize = _newgen.size(); + unsigned newSize = oldSize - _eliminated.size(); + unsigned eliminated = howMany(popSize); + if (newSize < 0) + throw std::logic_error("eoStochTournamentTruncateSplit: Cannot truncate to a larger size!\n"); + +end of old version */ + + unsigned popSize = _newgen.size(); + unsigned eliminated = howMany(popSize); + if (!eliminated) // nothing to do + return ; + unsigned newsize = popSize - eliminated; + if (newsize < 0) + throw std::logic_error("eoDetTournamentTruncateSplit: Cannot truncate to a larger size!\n"); + + + + _eliminated.reserve(_eliminated.size()+eliminated); //in case not empty? + for (unsigned i=0; i<_eliminated.size(); i++) + { + typename eoPop::iterator it = inverse_stochastic_tournament(_newgen.begin(), _newgen.end(), t_rate); + if (returnEliminated) + _eliminated.push_back(*it); + _newgen.erase(it); + } + } + + +private: + double t_rate; + eoHowMany howMany; + bool returnEliminated; +}; + +//----------------------------------------------------------------------------- + +/** @} */ +#endif diff --git a/trunk/eo/src/eoReplacement.h b/trunk/eo/src/eoReplacement.h new file mode 100644 index 000000000..033d441cb --- /dev/null +++ b/trunk/eo/src/eoReplacement.h @@ -0,0 +1,128 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoReplacement.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoReplacement_h +#define _eoReplacement_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** +--- +The eoMergeReduce, combination of eoMerge and eoReduce, can be found +in file eoMergeReduce.h + +The eoReduceMergeReduce that reduces the parents and the offspring, +merges the 2 reduced populations, and eventually reduces that final +population, can be found in eoReduceMergeReduce.h + +LOG +--- +Removed the const before first argument: though it makes too many classes +with the same interface, it allows to minimize the number of actual copies +by choosing the right destination +I also removed the enforced "swap" in the eoEasyAlgo and hence the generational +replacement gets a class of its own that only does the swap (instead of the +eoNoReplacement that did nothing, relying on the algo to swap popualtions). +MS 12/12/2000 + + @see eoMerge, eoReduce, eoMergeReduce, eoReduceMerge + +@class eoReplacement, base (pure abstract) class +@class eoGenerationalReplacement, as it says ... +@class eoWeakElitistReplacement a wrapper to add elitism + +*/ + +/** The base class for all replacement functors. + +NOTE: two eoPop as arguments +the resulting population should be in the first argument (replace +parents by offspring)! The second argument can contain any rubbish + + @ingroup Replacors + */ +template +class eoReplacement : public eoBF&, eoPop&, void> +{}; + +/** +generational replacement == swap populations + + @ingroup Replacors +*/ +template +class eoGenerationalReplacement : public eoReplacement +{ + public : + /// swap + void operator()(eoPop& _parents, eoPop& _offspring) + { + _parents.swap(_offspring); + } +}; + +/** +eoWeakElitistReplacement: a wrapper for other replacement procedures. +Copies in the new pop the best individual from the old pop, +AFTER normal replacement, if the best of the new pop is worse than the best +of the old pop. Removes the worse individual from the new pop. +This could be changed by adding a selector there... + + @ingroup Replacors +*/ +template +class eoWeakElitistReplacement : public eoReplacement +{ +public : + typedef typename EOT::Fitness Fitness; + + // Ctor, takes an eoReplacement + eoWeakElitistReplacement(eoReplacement & _replace) : + replace(_replace) {} + + /// do replacement + void operator()(eoPop& _pop, eoPop& _offspring) + { + const EOT oldChamp = _pop.best_element(); + replace(_pop, _offspring); // "normal" replacement, parents are the new + if (_pop.best_element() < oldChamp) // need to do something + { + typename eoPop::iterator itPoorGuy = _pop.it_worse_element(); + (*itPoorGuy) = oldChamp; + } + } +private: + eoReplacement & replace; +}; + +#endif diff --git a/trunk/eo/src/eoRingTopology.h b/trunk/eo/src/eoRingTopology.h new file mode 100644 index 000000000..6bad13cd7 --- /dev/null +++ b/trunk/eo/src/eoRingTopology.h @@ -0,0 +1,192 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRingTopology.h +// (c) INRIA Futurs DOLPHIN 2007 +/* + Clive Canape + Thomas Legrand + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: clive.canape@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EORINGTOPOLOGY_H_ +#define EORINGTOPOLOGY_H_ + +//----------------------------------------------------------------------------- +#include +#include +//----------------------------------------------------------------------------- + + +/** + * Static ring topology for particle swarm optimization. + * The neighborhoods are built using a ring based on each particle's indice and + * do not change for all the time steps. Only the best particle in each neighborhood is + * potentially updated thanks to the "updateNeighborhood" method. + * + * @ingroup Selectors + */ +template < class POT > class eoRingTopology:public eoTopology +{ + +public: + + /** + * The only Ctor. + * @param _neighborhoodSize - The size of each neighborhood. + */ + eoRingTopology (unsigned _neighborhoodSize):neighborhoodSize (_neighborhoodSize),isSetup(false){} + + + /** + * Builds the neighborhoods using a ring strategy based on the particle indices. + * Also initializes the best particle of each neighborhood. + * @param _pop - The population used to build the only neighborhood. + * @return + */ + void setup(const eoPop & _pop) + { + if (!isSetup){ + + // put in the neighborhood + int k = neighborhoodSize/2; + for (unsigned i=0;i < _pop.size();i++) + { + eoSocialNeighborhood currentNghd; + currentNghd.best(_pop[i]); + for (unsigned j=0; j < neighborhoodSize; j++) + { + currentNghd.put((_pop.size()+i-k+j)%_pop.size()); + if(_pop[(_pop.size()+i-k+j)%_pop.size()].fitness() > currentNghd.best().fitness()) + currentNghd.best(_pop[(_pop.size()+i-k+j)%_pop.size()]); + } + neighborhoods.push_back(currentNghd); + } + isSetup=true; + } + else + { + // Should activate this part ? + /* + std::string s; + s.append (" Linear topology already setup in eoRingTopology"); + throw std::runtime_error (s); + */ + } + } + + /** + * Retrieves the neighboorhood of a particle. + * @return _indice - The particle indice (in the population) + */ + unsigned retrieveNeighborhoodByIndice(unsigned _indice) + { + return _indice; + } + + + /** + * Updates the best fitness of the given particle and + * potentially replaces the local best the given particle it's better. + * @param _po - The particle to update + * @param _indice - The indice of the given particle in the population + */ + void updateNeighborhood(POT & _po,unsigned _indice) + { + //this->printOn();exit(0); + // update the best fitness of the particle + if (_po.fitness() > _po.best()) + { + _po.best(_po.fitness()); + for(unsigned i=0;i<_po.size();i++) + _po.bestPositions[i]=_po[i]; + } + // update the global best if the given particle is "better" + for (unsigned i=-neighborhoodSize+1; i < neighborhoodSize; i++) + { + unsigned indi = (_po.size()+_indice+i)%_po.size(); + if (_po.fitness() > neighborhoods[indi].best().fitness()) + neighborhoods[indi].best(_po); + } + } + + + /** + * Returns the best particle belonging to the neighborhood of the given particle. + * @param _indice - The indice of a particle in the population + * @return POT & - The best particle in the neighborhood of the particle whose indice is _indice + */ + POT & best (unsigned _indice) + { + unsigned theGoodNhbd= retrieveNeighborhoodByIndice(_indice); + + return (neighborhoods[theGoodNhbd].best()); + } + + + /** + * Print the structure of the topology on the standard output. + */ + void printOn() + { + for (unsigned i=0;i< neighborhoods.size();i++) + { + std::cout << "{ " ; + for (unsigned j=0;j< neighborhoods[i].size();j++) + { + std::cout << neighborhoods[i].get(j) << " "; + } + std::cout << "}" << std::endl; + } + } + + /* + * Return the global best of the topology + */ + virtual POT & globalBest() + { + POT gBest,tmp; + unsigned indGlobalBest=0; + if(neighborhoods.size()==1) + return neighborhoods[0].best(); + + gBest=neighborhoods[0].best(); + for(unsigned i=1;i > neighborhoods; + unsigned neighborhoodSize; + bool isSetup; +}; +/** @example t-eoRingTopology.cpp + */ + +#endif /*EORINGTOPOLOGY_H_*/ diff --git a/trunk/eo/src/eoSGA.h b/trunk/eo/src/eoSGA.h new file mode 100644 index 000000000..b31dff04e --- /dev/null +++ b/trunk/eo/src/eoSGA.h @@ -0,0 +1,121 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSGA.h +// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSGA_h +#define _eoSGA_h + +#include +#include +#include +#include +#include +#include +#include +#include + +/** The Simple Genetic Algorithm, following Holland and Goldberg + * + * Needs a selector (class eoSelectOne) a crossover (eoQuad, i.e. a + * 2->2 operator) and a mutation with their respective rates, of + * course an evaluation function (eoEvalFunc) and a continuator + * (eoContinue) which gives the stopping criterion. Performs full + * generational replacement. + * + * @ingroup Algorithms + */ +template +class eoSGA : public eoAlgo +{ +public : + + // added this second ctor as I didn't like the ordering of the parameters + // in the one above. Any objection :-) MS + eoSGA( + eoSelectOne& _select, + eoQuadOp& _cross, float _crate, + eoMonOp& _mutate, float _mrate, + eoEvalFunc& _eval, + eoContinue& _cont) + : cont(_cont), + mutate(_mutate), + mutationRate(_mrate), + cross(_cross), + crossoverRate(_crate), + select(_select), + eval(_eval) {} + + void operator()(eoPop& _pop) + { + eoPop offspring; + + do + { + select(_pop, offspring); + + unsigned i; + + for (i=0; i<_pop.size()/2; i++) + { + if ( rng.flip(crossoverRate) ) + { + // this crossover generates 2 offspring from two parents + if (cross(offspring[2*i], offspring[2*i+1])) + { + offspring[2*i].invalidate(); + offspring[2*i+1].invalidate(); + } + } + } + + for (i=0; i < offspring.size(); i++) + { + if (rng.flip(mutationRate) ) + { + if (mutate(offspring[i])) + offspring[i].invalidate(); + } + } + + _pop.swap(offspring); + apply(eval, _pop); + + } while (cont(_pop)); + } + +private : + + eoContinue& cont; + /// eoInvalidateMonOp invalidates the embedded operator + eoInvalidateMonOp mutate; + float mutationRate; + // eoInvalidateQuadOp invalidates the embedded operator + eoInvalidateQuadOp cross; + float crossoverRate; + eoSelectPerc select; + eoEvalFunc& eval; +}; + +#endif diff --git a/trunk/eo/src/eoSGAGenOp.h b/trunk/eo/src/eoSGAGenOp.h new file mode 100644 index 000000000..f08b2104e --- /dev/null +++ b/trunk/eo/src/eoSGAGenOp.h @@ -0,0 +1,93 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSGAGenOp.h +// (c) Marc.Schoenauer 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSGAGenOp_h +#define _eoSGAGenOp_h + +#include "eoGenOp.h" +#include "eoInvalidateOps.h" +/////////////////////////////////////////////////////////////////////////////// +// class eoSGAGenOp +/////////////////////////////////////////////////////////////////////////////// + +/** + * eoSGAGenOp (for Simple GA) mimicks the usual crossover with proba pCross + + * mutation with proba pMut inside an eoGeneralOp + * It does it exactly as class eoSGATransform, i.e. only accepts + * quadratic crossover and unary mutation + * It was introduced for didactic reasons, but seems to be popular :-) + * + * @ingroup Combination + */ + template +class eoSGAGenOp : public eoGenOp +{ + public: + + /** Ctor from crossover (with proba) and mutation (with proba) + * Builds the sequential op that first applies a proportional choice + * between the crossover and nothing (cloning), then the mutation + */ + eoSGAGenOp(eoQuadOp& _cross, double _pCross, + eoMonOp& _mut, double _pMut) + : cross(_cross), + pCross(_pCross), + mut(_mut), + pMut(_pMut) + { + // the crossover - with probability pCross + propOp.add(cross, pCross); // crossover, with proba pcross + propOp.add(quadClone, 1-pCross); // nothing, with proba 1-pcross + + // now the sequential + op.add(propOp, 1.0); // always do combined crossover + op.add(mut, pMut); // then mutation, with proba pmut + } + + /** do the job: delegate to op */ + virtual void apply(eoPopulator& _pop) + { + op.apply(_pop); + } + + /** inherited from eoGenOp */ + virtual unsigned max_production(void) {return 2;} + + virtual std::string className() const {return "eoSGAGenOp";} + + + private: + eoQuadOp ✗ // eoInvalidateXXX take the boolean output + double pCross; + eoMonOp & mut; // of the XXX op and invalidate the EOT + double pMut; + eoProportionalOp propOp; + eoQuadCloneOp quadClone; + eoSequentialOp op; +}; + + +#endif diff --git a/trunk/eo/src/eoSGATransform.h b/trunk/eo/src/eoSGATransform.h new file mode 100644 index 000000000..55b5e5eda --- /dev/null +++ b/trunk/eo/src/eoSGATransform.h @@ -0,0 +1,168 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSGA.h +// (c) Marc.Schoenauer 2000 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSGATransform_h +#define _eoSGATransform_h + +#include +#include + +/////////////////////////////////////////////////////////////////////////////// +// class eoSGATransform +/////////////////////////////////////////////////////////////////////////////// +#include // std::vector +#include +#include + +/** eoSGATransform: transforms a population using genetic operators. + * It does it exactly as class eoSGA, i.e. only accepts + * quadratic crossover and unary mutation + * It is here mainly for tutorial reasons + * + * @ingroup Combination +*/ +template class eoSGATransform : public eoTransform +{ + public: + + /// Default constructor. + eoSGATransform(eoQuadOp& _cross, double _cProba, + eoMonOp& _mutate, double _mProba) + : cross(_cross), + crossoverProba(_cProba), + mutate(_mutate), + mutationProba(_mProba) {} + + + /** + * Transforms a population. + * @param _pop The population to be transformed. + */ + void operator()(eoPop& _pop) + { + unsigned i; + + for (i=0; i<_pop.size()/2; i++) + { + if ( rng.flip(crossoverProba) ) + { + // this crossover generates 2 offspring from two parents + cross(_pop[2*i], _pop[2*i+1]); + } + } + + for (i=0; i < _pop.size(); i++) + { + if (rng.flip(mutationProba) ) + { + mutate(_pop[i]); + } + + } + }; + + private: + eoInvalidateQuadOp cross; + double crossoverProba; + eoInvalidateMonOp mutate; + double mutationProba; +}; + +/** eoDynSGATransform: transforms a population using genetic operators. + * It is the Dynamic version of the above eoSGATransform + * i.e. the operators probabilities can be passed as an eoValueParam, + * and hence can be modified from outside + * It is here mainly for tutorial reasons + * + * @ingroup Combination +*/ +template class eoDynSGATransform : public eoTransform +{ + public: + + /// Default constructor - receives values + eoDynSGATransform(eoQuadOp& _cross, double _cProba, + eoMonOp& _mutate, double _mProba) + : cross(_cross), + crossoverProbaHolder(_cProba), crossoverProba(crossoverProbaHolder), + mutate(_mutate), + mutationProbaHolder(_mProba), mutationProba(mutationProbaHolder) {} + + /// This constructor receives pointers + // these will usually be some eoValueParam.value() + // hence the ...Holder data will bever be used in this case + eoDynSGATransform(eoQuadOp& _cross, double* _cProbaRef, + eoMonOp& _mutate, double* _mProbaRef) + : cross(_cross), + crossoverProbaHolder(0), crossoverProba(*_cProbaRef), + mutate(_mutate), + mutationProbaHolder(0), mutationProba(*_mProbaRef) {} + + + /** + * Transforms a population. + * @param _pop The population to be transformed. + */ + void operator()(eoPop& _pop) + { + unsigned i; + + for (i=0; i<_pop.size()/2; i++) + { + if ( rng.flip(crossoverProba) ) + { + // this crossover generates 2 offspring from two parents + cross(_pop[2*i], _pop[2*i+1]); + } + } + + for (i=0; i < _pop.size(); i++) + { + if (rng.flip(mutationProba) ) + { + mutate(_pop[i]); + } + + } + }; + // accessors - mainly for EASEA + double & PCrossHandle() { return crossoverProba;} + double & PMutHandle() { return mutationProba;} + +private: + // difference with eoSGATransform: the operator probabilities + // they can be passed by reference or by value. + // hence we need here to use a reference, and to eventually store a value + eoInvalidateQuadOp cross; + double crossoverProbaHolder; // the value, used only if ctor gets a value + double& crossoverProba; // the reference, to be used in operator() + eoInvalidateMonOp mutate; + double mutationProbaHolder; // the value, used only if ctor gets a value + double& mutationProba; // the reference, to be used in operator() +}; + + +#endif diff --git a/trunk/eo/src/eoSIGContinue.cpp b/trunk/eo/src/eoSIGContinue.cpp new file mode 100644 index 000000000..2f126ea91 --- /dev/null +++ b/trunk/eo/src/eoSIGContinue.cpp @@ -0,0 +1,38 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSIGContinue.cpp +// (c) EEAAX 1996 - GeNeura Team, 1998 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + Johann Dréo + Caner Candan +*/ +//----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#include +#include + +// --- Global variables - but don't know what else to do - MS --- +bool existSIGContinue = false; +bool call_func = false; diff --git a/trunk/eo/src/eoSIGContinue.h b/trunk/eo/src/eoSIGContinue.h new file mode 100644 index 000000000..2199b49ef --- /dev/null +++ b/trunk/eo/src/eoSIGContinue.h @@ -0,0 +1,95 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSIGContinue.h +// (c) EEAAX 1996 - GeNeura Team, 1998 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + Johann Dréo + Caner Candan +*/ +//----------------------------------------------------------------------------- +// the same thing can probably be done in MS environement, but I hoave no way +// to test it so at the moment it is commented out when in MSVC + + +#ifndef eoSIGContinue_h +#define eoSIGContinue_h + +#include +#include + +/** @addtogroup Continuators + * @{ + */ + +extern bool existSIGContinue; +extern bool call_func; + +void set_bool(int) +{ + call_func = true; +} + +/** + A continuator that stops if a given signal is received during the execution +*/ +template< class EOT> +class eoSIGContinue: public eoContinue +{ +public: + /// Ctor : installs the signal handler + eoSIGContinue(int sig, sighandler_t fct) + : _sig(sig), _fct(fct) + { + // First checks that no other eoSIGContinue does exist + if (existSIGContinue) + throw std::runtime_error("A signal handler is already defined!\n"); + + #ifndef _WINDOWS + #ifdef SIGQUIT + ::signal( sig, set_bool ); + existSIGContinue = true; + #endif + #endif + } + + /** Returns false when the signal has been typed in reached */ + virtual bool operator() ( const eoPop& _vEO ) + { + if (call_func) + { + _fct(_sig); + call_func = false; + } + + return true; + } + + virtual std::string className(void) const { return "eoSIGContinue"; } +private: + int _sig; + sighandler_t _fct; +}; + +/** @} */ + +#endif + + // of MSVC comment-out diff --git a/trunk/eo/src/eoSTLFunctor.h b/trunk/eo/src/eoSTLFunctor.h new file mode 100644 index 000000000..04f96f9ca --- /dev/null +++ b/trunk/eo/src/eoSTLFunctor.h @@ -0,0 +1,123 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSTLFunctor.h +// (c) Maarten Keijzer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSTLFunctor_H +#define _eoSTLFunctor_H + +#include "eoFunctor.h" + +/** @addtogroup Utilities + * @{ + */ + +/** + Generic set of classes that wrap an eoF, eoUF or eoBF so that they have the + copy semantics the STL functions usually require (i.e. they can be passed + by value, rather than the EO standard pass by reference). + + The family consists of eoSTLF, eoSTLUF, eoSTLBF that modify eoF, eoUF and eoBF + respectively +*/ +template +class eoSTLF +{ + public: + + typedef R result_type; + + eoSTLF(eoF& _f) : f(_f) {} + + R operator()(void) + { + return f(); + } + + private : + + eoF& f; +}; + +#ifdef _MSVC +/// specialization of void for MSVC users, unfortunately only works for eoF, +/// as MSVC does not support partial specialization either +template <> +void eoSTLF::operator()(void) +{ + f(); +} +#endif + +/** + Generic set of classes that wrap an eoF, eoUF or eoBF so that they have the + copy semantics the STL functions usually require (i.e. they can be passed + by value, rather than the EO standard pass by reference). + + The family consists of eoSTLF, eoSTLUF, eoSTLBF that modify eoF, eoUF and eoBF + respectively +*/ +template +class eoSTLUF : public std::unary_function +{ + public: + eoSTLUF(eoUF& _f) : f(_f) {} + + R operator()(A1 a) + { + return f(a); + } + + private: + eoUF& f; +}; + +/** + Generic set of classes that wrap an eoF, eoUF or eoBF so that they have the + copy semantics the STL functions usually require (i.e. they can be passed + by value, rather than the EO standard pass by reference). + + The family consists of eoSTLF, eoSTLUF, eoSTLBF that modify eoF, eoUF and eoBF + respectively +*/ +template +class eoSTLBF : public std::binary_function +{ + public: + eoSTLBF(eoUF& _f) : f(_f) {} + + R operator()(A1 a1, A2 a2) + { + return f(a1, a2); + } + + private: + + eoBF& f; +}; + +//! @todo: put automated wrappers here... + +/** @} */ +#endif diff --git a/trunk/eo/src/eoScalarFitness.h b/trunk/eo/src/eoScalarFitness.h new file mode 100644 index 000000000..31a9dbffe --- /dev/null +++ b/trunk/eo/src/eoScalarFitness.h @@ -0,0 +1,130 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoScalarFitness.h + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + + +#ifndef eoScalarFitness_h +#define eoScalarFitness_h + +#include +#include + +/** @addtogroup Evaluation + * @{ + */ + +/** + * Wraps a scalar fitness values such as a double or int, with the option of + * maximizing (using less) or minimizing (using greater) + * + * It overrides operator<() to use the Compare template argument. Thus, if you + * need to compare if an indiv1 is "better" than an indiv2, you can use: + * if( indiv1 > indiv2 ) { + * // indiv1 is better + * } else { + * // indiv2 is better + * } + * + * Suitable constructors and assignments and casts are defined to work + * with this quantity as if it were a ScalarType. +*/ +template +class eoScalarFitness +{ + public : + + eoScalarFitness() : value() {} + eoScalarFitness(const eoScalarFitness& other) : value(other.value) {} + eoScalarFitness(const ScalarType& v) : value(v) {} + + eoScalarFitness& operator=(const eoScalarFitness& other) + { value = other.value; return *this; } + eoScalarFitness& operator=(const ScalarType& v) + { value = v; return *this; } + + /** Conversion operator: it permits to use a fitness instance as its scalar + * type, if needed. For example, this is possible: + * eoScalarFitness > fit; + * double val = 1.0; + * fit = val; + * val = fit; + */ + operator ScalarType(void) const { return value; } + + /// Comparison, using less by default + bool operator<(const eoScalarFitness& other) const + { return Compare()(value, other.value); } + + /// Comparison, using less by default + // needed for MSVC 8 (MSVC 2005) added by J.Eggermont 20-11-2006 + bool operator<(const ScalarType& other) const + { return Compare()(value, other); } + + // implementation of the other operators + bool operator>( const eoScalarFitness& y ) const { return y < *this; } + // implementation of the other operators + bool operator<=( const eoScalarFitness& y ) const { return !(*this > y); } + // implementation of the other operators + bool operator>=(const eoScalarFitness& y ) const { return !(*this < y); } + + + private : + ScalarType value; +}; +/** @example t-eofitness.cpp + * + */ + + +/** +Typedefs for fitness comparison, Maximizing Fitness compares with less, +and minimizing fitness compares with greater. This because we want ordinary +fitness values (doubles) to be equivalent with Maximizing Fitness, and +comparing with less is the default behaviour. +*/ +#if defined(__CUDACC__) +typedef eoScalarFitness > eoMaximizingFitness; +typedef eoScalarFitness > eoMinimizingFitness; +#else +typedef eoScalarFitness > eoMaximizingFitness; +typedef eoScalarFitness > eoMinimizingFitness; +#endif + +template +std::ostream& operator<<(std::ostream& os, const eoScalarFitness& f) +{ + os << (F) f; + return os; +} + +template +std::istream& operator>>(std::istream& is, eoScalarFitness& f) +{ + F value; + is >> value; + f = value; + return is; +} + +/** @} */ +#endif diff --git a/trunk/eo/src/eoScalarFitnessAssembled.cpp b/trunk/eo/src/eoScalarFitnessAssembled.cpp new file mode 100644 index 000000000..58f7615fa --- /dev/null +++ b/trunk/eo/src/eoScalarFitnessAssembled.cpp @@ -0,0 +1,38 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoScalarFitnessAssembled.cpp +// Marc Wintermantel & Oliver Koenig +// IMES-ST@ETHZ.CH +// March 2003 + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#include "eoScalarFitnessAssembled.h" + + +// need to allocate the static variables of class eoScalarFitnessAssembledTraits +std::vector eoScalarFitnessAssembledTraits::TermDescriptions; diff --git a/trunk/eo/src/eoScalarFitnessAssembled.h b/trunk/eo/src/eoScalarFitnessAssembled.h new file mode 100644 index 000000000..50e9038de --- /dev/null +++ b/trunk/eo/src/eoScalarFitnessAssembled.h @@ -0,0 +1,284 @@ + /* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- */ + +//----------------------------------------------------------------------------- +// eoScalarFitnessAssembled.h +// Marc Wintermantel & Oliver Koenig +// IMES-ST@ETHZ.CH +// March 2003 + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- + +#ifndef eoScalarFitnessAssembled_h +#define eoScalarFitnessAssembled_h + +#include +#include +#include +#include +#include + +/** @addtogroup Evaluation + * @{ + */ + +//! Defines properties of eoScalarFitnessAssembled. +/*! Properties that are hold in this traits class: + - std::vector to hold descriptions of the different fitness terms +*/ +class eoScalarFitnessAssembledTraits{ + +public: + + typedef std::vector::size_type size_type; + + static void setDescription( size_type _idx, std::string _descr ) { + if ( _idx < TermDescriptions.size() ) + TermDescriptions[_idx] = _descr; + else{ + TermDescriptions.resize(_idx, "Unnamed variable" ); + TermDescriptions[_idx] = _descr; + } + } + + static std::string getDescription( size_type _idx) { + if ( _idx < TermDescriptions.size() ) + return TermDescriptions[_idx ]; + else + return "Unnamed Variable"; + } + + static void resize( size_type _n, const std::string& _descr) { + TermDescriptions.resize(_n, _descr); + } + + static size_type size() { return TermDescriptions.size(); } + + static std::vector getDescriptionVector() { return TermDescriptions; } + +private: + static std::vector TermDescriptions; +}; +/** @example t-eoFitnessAssembled.cpp + */ + +//! Implements fitness as std::vector, storing all values that might occur during fitness assembly +/*! Properties: + - Wraps a scalar fitness values such as a double or int, with the option of + maximizing (using less) or minimizing (using greater). + - Stores all kinda different values met during fitness assembly, to be defined in eoEvalFunc. + - It overrides operator<() to use the Compare template argument. + - Suitable constructors and assignments and casts are defined to work + with this quantity as if it were a ScalarType. + - Global fitness value is stored as first element in the vector +*/ +template +class eoScalarFitnessAssembled : public std::vector { + +public: + + using std::vector< ScalarType >::empty; + using std::vector< ScalarType >::front; + using std::vector< ScalarType >::size; + + + typedef typename std::vector baseVector; + typedef typename baseVector::size_type size_type; + + // Basic constructors and assignments + eoScalarFitnessAssembled() + : baseVector( FitnessTraits::size() ), + feasible(true), failed(false), msg("") + {} + + eoScalarFitnessAssembled( size_type _n, + const ScalarType& _val, + const std::string& _descr="Unnamed variable" ) + : baseVector(_n, _val), + feasible(true), failed(false), msg("") + { + if ( _n > FitnessTraits::size() ) + FitnessTraits::resize(_n, _descr); + } + + eoScalarFitnessAssembled( const eoScalarFitnessAssembled& other) + : baseVector( other ), + feasible(other.feasible), + failed(other.failed), + msg(other.msg) + {} + + eoScalarFitnessAssembled& operator=( const eoScalarFitnessAssembled& other) { + baseVector::operator=( other ); + feasible = other.feasible; + failed = other.failed; + msg = other.msg; + return *this; + } + + // Constructors and assignments to work with scalar type + eoScalarFitnessAssembled( const ScalarType& v ) + : baseVector( 1, v ), + feasible(true), failed(false), msg("") + {} + + eoScalarFitnessAssembled& operator=( const ScalarType& v ) { + + if( empty() ) + push_back( v ); + else + front() = v; + return *this; + } + + //! Overload push_back() + void push_back(const ScalarType& _val ){ + baseVector::push_back( _val ); + if ( size() > FitnessTraits::size() ) + FitnessTraits::setDescription( size()-1, "Unnamed variable"); + } + + //! Overload push_back() + void push_back(const ScalarType& _val, const std::string& _descr ){ + baseVector::push_back( _val ); + FitnessTraits::setDescription( size()-1, _descr ); + } + + //! Overload resize() + void resize( size_type _n, const ScalarType& _val = ScalarType(), const std::string& _descr = "Unnamed variable" ){ + baseVector::resize(_n, _val); + FitnessTraits::resize(_n, _descr); + } + + //! Set description + void setDescription( size_type _idx, std::string _descr ) { + FitnessTraits::setDescription( _idx, _descr ); + } + + //! Get description + std::string getDescription( size_type _idx ){ return FitnessTraits::getDescription( _idx ); } + + //! Get vector with descriptions + std::vector getDescriptionVector() { return FitnessTraits::getDescriptionVector(); } + + //! Feasibility boolean + /** + * Can be specified anywhere in fitness evaluation + * as an indicator if the individual is in some feasible range. + */ + bool feasible; + + //! Failed boolean + /** + * Can be specified anywhere in fitness evaluation + * as an indicator if the evaluation of the individual failed + */ + bool failed; + + //! Message + /** + * Can be specified anywhere in fitness evaluation. + * Typically used to store some sort of error messages, if evaluation of individual failed. + */ + std::string msg; + + + // Scalar type access + operator ScalarType(void) const { + if ( empty() ) + return 0.0; + else + return front(); + } + + //! Print term values and descriptions + void printAll(std::ostream& os) const { + for (size_type i=0; i < size(); ++i ) + os << FitnessTraits::getDescription(i) << " = " << this->operator[](i) << " "; + } + + //! Comparison, using less by default + bool operator<(const eoScalarFitnessAssembled& other) const{ + if ( empty() || other.empty() ) + return false; + else + return Compare()( front() , other.front() ); + } + + //! Comparison with ScalarTypes. Explicit definition needed to compile with VS 8.0 + bool operator<(ScalarType x) const{ + eoScalarFitnessAssembled ScalarFitness(x); + return this->operator<(ScalarFitness); + } + + // implementation of the other operators + bool operator>( const eoScalarFitnessAssembled& y ) const { return y < *this; } + + // implementation of the other operators + bool operator<=( const eoScalarFitnessAssembled& y ) const { return !(*this > y); } + + // implementation of the other operators + bool operator>=(const eoScalarFitnessAssembled& y ) const { return !(*this < y); } + +}; +/** + * @example t-eoFitnessAssembledEA.cpp +*/ + + +/** +Typedefs for fitness comparison, Maximizing Fitness compares with less, +and minimizing fitness compares with greater. This because we want ordinary +fitness values (doubles) to be equivalent with Maximizing Fitness, and +comparing with less is the default behaviour. +*/ +typedef eoScalarFitnessAssembled, eoScalarFitnessAssembledTraits > eoAssembledMaximizingFitness; +typedef eoScalarFitnessAssembled, eoScalarFitnessAssembledTraits > eoAssembledMinimizingFitness; + +template +std::ostream& operator<<(std::ostream& os, const eoScalarFitnessAssembled& f) +{ + for (unsigned i=0; i < f.size(); ++i) + os << f[i] << " "; + + os << f.feasible << " "; + os << f.failed << " "; + + return os; +} + +template +std::istream& operator>>(std::istream& is, eoScalarFitnessAssembled& f) +{ + for (unsigned i=0; i < f.size(); ++i){ + F value; + is >> value; + f[i] = value; + } + + is >> f.feasible; + is >> f.failed; + + return is; +} + +/** @} */ +#endif diff --git a/trunk/eo/src/eoSecondsElapsedContinue.h b/trunk/eo/src/eoSecondsElapsedContinue.h new file mode 100644 index 000000000..e29aeefb5 --- /dev/null +++ b/trunk/eo/src/eoSecondsElapsedContinue.h @@ -0,0 +1,76 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSeconsElapsedContinue.h +// (c) Maarten Keijzer, 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSecondsElapsedContinue_h +#define _eoSecondsElapsedContinue_h + +#include + +/** + Timed continuator: continues until a number of seconds is used + + @ingroup Continuators +*/ +template< class EOT> +class eoSecondsElapsedContinue: public eoContinue +{ + time_t start; + int seconds; +public: + + eoSecondsElapsedContinue(int nSeconds) : start(time(0)), seconds(nSeconds) {} + + virtual bool operator() ( const eoPop& _vEO ) { + time_t now = time(0); + time_t diff = now - start; + + if (diff >= seconds) return false; // stop + return true; + + } + + + virtual std::string className(void) const { return "eoSecondsElapsedContinue"; } + + /** REad from a stream + * @param __is the ostream to read from + */ + void readFrom (std :: istream & __is) { + + __is >> start >> seconds; + } + + /** Print on a stream + * @param __os the ostream to print on + */ + void printOn (std :: ostream & __os) const { + + __os << start << ' ' << seconds << std :: endl; + } + +}; +/** @example t-eoSecondsElapsedContinue.cpp + */ + +#endif diff --git a/trunk/eo/src/eoSelect.h b/trunk/eo/src/eoSelect.h new file mode 100644 index 000000000..aae338434 --- /dev/null +++ b/trunk/eo/src/eoSelect.h @@ -0,0 +1,46 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSelect.h + (c) Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSelect_h +#define _eoSelect_h + + +//----------------------------------------------------------------------------- +#include +//----------------------------------------------------------------------------- + +/** +eoSelect selects a number of individuals from the first argument and +puts it in the second. To emphasize that it should not try to enlarge +the population, the second argument is an eoPopRange, a simple struct +that holds a begin and end iterator to the population + +@ingroup Core +@ingroup Selectors +*/ +template +class eoSelect : public eoBF&, eoPop&, void> +{}; + +#endif diff --git a/trunk/eo/src/eoSelectFactory.h b/trunk/eo/src/eoSelectFactory.h new file mode 100644 index 000000000..9dc19dabf --- /dev/null +++ b/trunk/eo/src/eoSelectFactory.h @@ -0,0 +1,93 @@ +// eoSelectFactory.h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// EOFactory.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOSELECTFACTORY_H +#define _EOSELECTFACTORY_H + +#include +#include +#include + +//----------------------------------------------------------------------------- + +/** EO Factory.An instance of the factory class to create selectors, that is, +eoSelect objects + +@see eoSelect +@ingroup Selectors +@ingroup Utilities +*/ +template< class EOT> +class eoSelectFactory: public eoFactory > { + +public: + + /// @name ctors and dtors + //{@ + /// constructor + eoSelectFactory( ) {} + + /// destructor + virtual ~eoSelectFactory() {} + //@} + + /** Another factory methods: creates an object from an std::istream, reading from + it whatever is needed to create the object. Usually, the format for the std::istream will be\\ + objectType parameter1 parameter2 ... parametern\\ + */ + virtual eoSelect* make(std::istream& _is) { + eoSelect * selectPtr; + std::string objectTypeStr; + _is >> objectTypeStr; + // All selectors have a rate, the proportion of the original population + float rate; + _is >> rate; + if ( objectTypeStr == "eoTournament") { + // another parameter is necessary + unsigned tSize; + _is >> tSize; + selectPtr = new eoTournament( rate, tSize ); + } else { + if ( objectTypeStr == "eoRandomSelect" ) { + selectPtr = new eoRandomSelect( rate ); + } else { + throw std::runtime_error( "Incorrect selector type" ); + } + } + return selectPtr; + } + + ///@name eoObject methods + //@{ + void printOn( std::ostream& _os ) const {}; + void readFrom( std::istream& _is ){}; + + /** className is inherited */ + //@} + +}; + + +#endif diff --git a/trunk/eo/src/eoSelectFromWorth.h b/trunk/eo/src/eoSelectFromWorth.h new file mode 100644 index 000000000..342be9da7 --- /dev/null +++ b/trunk/eo/src/eoSelectFromWorth.h @@ -0,0 +1,231 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSelectFromWorth.h + (c) Maarten Keijzer, Marc Schoenauer, 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSelectFromWorth_h +#define _eoSelectFromWorth_h + +#include +//----------------------------------------------------------------------------- +#include +#include +#include +//----------------------------------------------------------------------------- + +/** selects one element from a population (is an eoSelectOne) +but the selection is based on a std::vector of Worth that is different +from the fitnesses (e.g. EO fitness is what Koza terms "raw fitness", +Worth is what the selection is based upon). + +see class eoPerf2Worth: an eoStat that transforms fitnesses into Worthes + +Note: Worthes will not always be doubles - see some multi-objective +techniques where it is a std::pair of doubles ... + +It has to have a < operator it you want to call an existing +selector (see selector.h) - but of course you can write the whole +thing ... + +@ingroup Selectors +*/ +template +class eoSelectFromWorth : public eoSelectOne +{ +public: + + /* Default ctor from an eoPerf2Worth object */ + eoSelectFromWorth(eoPerf2Worth& _perf2Worth) + : perf2Worth(_perf2Worth) + {} + + /* setup the worthes */ + virtual void setup(const eoPop& pop) { + perf2Worth(pop); +#ifndef NDEBUG + fitness.resize(pop.size()); + for (unsigned i = 0; i < pop.size(); ++i) { + fitness[i] = pop[i].fitness(); + } +#endif + } + + +protected: + + eoPerf2Worth& perf2Worth; + +#ifndef NDEBUG + std::vector fitness; + void check_sync(unsigned index, const EOT& _eo) { + if (fitness[index] != _eo.fitness()) { + throw std::runtime_error("eoSelectFromWorth: fitnesses are not in sync"); + } + } +#endif +}; + + +/** An instance of eoSelectPerf2Worth that does selection from the Worthes + * using a ... determinisitic tournament, yes! + +@ingroup Selectors + */ +template +class eoDetTournamentWorthSelect : public eoSelectFromWorth +{ +public: + + using eoSelectFromWorth::perf2Worth; + + typedef typename std::vector::iterator worthIterator; + + /* Default ctor from an eoPerf2Worth object + tournament size */ + eoDetTournamentWorthSelect(eoPerf2Worth& perf2Worth, + unsigned _tSize) + : eoSelectFromWorth(perf2Worth), tSize(_tSize) {} + + /* Perform deterministic tournament on worthes by calling the + appropriate fn see selectors.h */ + virtual const EOT& operator()(const eoPop& pop) { + worthIterator it = deterministic_tournament(perf2Worth.value().begin(), + perf2Worth.value().end(), + tSize); + unsigned index = it - perf2Worth.value().begin(); +#ifndef NDEBUG + // check whether the stuff is still in sync + check_sync(index, pop[index]); +#endif + return pop[index]; + } + + +private: + + unsigned tSize; +}; + +/** An instance of eoSelectPerf2Worth that does selection from the Worthes + * using a ... stochastic tournament, yes! + +@ingroup Selectors + */ +template +class eoStochTournamentWorthSelect : public eoSelectFromWorth +{ +public: + + using eoSelectFromWorth::perf2Worth; + + typedef typename std::vector::iterator worthIterator; + + /* Default ctor from an eoPerf2Worth object + tournament rate */ + eoStochTournamentWorthSelect(eoPerf2Worth &_perf2Worth, double _tRate) + : eoSelectFromWorth(_perf2Worth), tRate(_tRate) + {} + + /* Perform stochastic tournament on worthes + by calling the appropriate fn in selectors.h + */ + virtual const EOT& operator()(const eoPop& _pop) { + worthIterator it = stochastic_tournament(perf2Worth.value().begin(), + perf2Worth.value().end(), + tRate); + + unsigned index = it - perf2Worth.value().begin(); + +#ifndef NDEBUG + // check whether the stuff is still in sync + check_sync(index, _pop[index]); +#endif + + return _pop[index]; + } + +private: + double tRate; +}; + +/** An instance of eoSelectPerf2Worth that does selection from the Worthes + * using a ... roulette wheel selection, yes! + +@ingroup Selectors + */ +template +class eoRouletteWorthSelect : public eoSelectFromWorth +{ +public: + + using eoSelectFromWorth::perf2Worth; + + typedef typename std::vector::iterator worthIterator; + + + /* Default ctor from an eoPerf2Worth object */ + eoRouletteWorthSelect(eoPerf2Worth &_perf2Worth) + : eoSelectFromWorth(_perf2Worth) + {} + + /* We have to override the default behavior to compute the total + * only once! + */ + virtual void setup(const eoPop& _pop) + { + eoSelectFromWorth::setup(_pop); + total = 0.0; + for (worthIterator it = perf2Worth.value().begin(); + it& _pop) { + // cout << "On affiche les worths\n"; + // for (unsigned i=0; + // icheck_sync(index, _pop[index]); +#endif + + return _pop[index]; + return _pop[it - perf2Worth.value().begin()]; + } + +private: + double total; +}; + +#endif diff --git a/trunk/eo/src/eoSelectMany.h b/trunk/eo/src/eoSelectMany.h new file mode 100644 index 000000000..63da51503 --- /dev/null +++ b/trunk/eo/src/eoSelectMany.h @@ -0,0 +1,82 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSelectMany.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSelectMany_h +#define _eoSelectMany_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** eoSelectMany selects many individuals using eoSelectOne as it's + mechanism. Therefore eoSelectMany needs an eoSelectOne in its ctor + + It will use an eoHowMnay to determine the number of guys to select, + and push them to the back of the destination population. + +@ingroup Selectors +*/ +template +class eoSelectMany : public eoSelect +{ + public: + /// init + eoSelectMany(eoSelectOne& _select, + double _rate, bool _interpret_as_rate = true) + : select(_select), howMany(_rate, _interpret_as_rate) {} + + // Ctor with eoHowMany + eoSelectMany(eoSelectOne& _select, eoHowMany _howMany) + : select(_select), howMany(_howMany) {} + + /** + The implementation repeatidly selects an individual + + @param _source the source population + @param _dest the resulting population (size of this population is the number of times eoSelectOne is called. It empties the destination and adds the selection into it) + */ + virtual void operator()(const eoPop& _source, eoPop& _dest) + { + unsigned target = howMany(_source.size()); + + _dest.resize(target); + + select.setup(_source); + + for (size_t i = 0; i < _dest.size(); ++i) + _dest[i] = select(_source); + } + +private : + eoSelectOne& select; + eoHowMany howMany; +}; + +#endif diff --git a/trunk/eo/src/eoSelectNumber.h b/trunk/eo/src/eoSelectNumber.h new file mode 100644 index 000000000..f6f094ef2 --- /dev/null +++ b/trunk/eo/src/eoSelectNumber.h @@ -0,0 +1,74 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSelectNumber.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSelectNumber_h +#define _eoSelectNumber_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +//----------------------------------------------------------------------------- + +/** eoSelectNumber selects many individuals using eoSelectOne as it's + mechanism. Therefore eoSelectNumber needs an eoSelectOne in its ctor + + It will select a fixed number of individuals and pushes them to + the back of the destination population. + +@ingroup Selectors +*/ +template +class eoSelectNumber : public eoSelect +{ + public: + /// init + eoSelectNumber(eoSelectOne& _select, unsigned _nb_to_select = 1) + : select(_select), nb_to_select(_nb_to_select) {} + + /** + The implementation repeatidly selects an individual + + @param _source the source population + @param _dest the resulting population (size of this population is the number of times eoSelectOne is called. It empties the destination and adds the selection into it) + */ + virtual void operator()(const eoPop& _source, eoPop& _dest) + { + size_t target = static_cast(nb_to_select); + + _dest.resize(target); + + select.setup(_source); + + for (size_t i = 0; i < _dest.size(); ++i) + _dest[i] = select(_source); + } + +private : + eoSelectOne& select; + unsigned nb_to_select; +}; + +#endif diff --git a/trunk/eo/src/eoSelectOne.h b/trunk/eo/src/eoSelectOne.h new file mode 100644 index 000000000..5afdd1404 --- /dev/null +++ b/trunk/eo/src/eoSelectOne.h @@ -0,0 +1,60 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSelectOne.h + (c) Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSelectOne_h +#define _eoSelectOne_h + + +//----------------------------------------------------------------------------- +#include +#include +//----------------------------------------------------------------------------- + +/** eoSelectOne selects only one element from a whole population. + Most selection techniques are simply repeated applications + of eoSelectOne. + + @see eoSelectMany, eoSelectRandom, eoDetTournament, eoStochTournament, eoProportional + +@ingroup Selectors +*/ +#if defined(_MSC_VER) && (_MSC_VER < 1300) +template +#else +template +#endif +class eoSelectOne : public eoUF&, const EOT&> +{ + public : + /// virtual function to setup some population stats (for instance eoProportional can benefit greatly from this) + virtual void setup(const eoPop& _pop) + { + (void)_pop; + } +}; +/** @example t-selectOne.cpp + */ + + +#endif diff --git a/trunk/eo/src/eoSelectPerc.h b/trunk/eo/src/eoSelectPerc.h new file mode 100644 index 000000000..131a3d591 --- /dev/null +++ b/trunk/eo/src/eoSelectPerc.h @@ -0,0 +1,74 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSelectPerc.h + (c) Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSelectPerc_h +#define _eoSelectPerc_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +//----------------------------------------------------------------------------- + +/** eoSelectPerc selects many individuals using eoSelectOne as it's + mechanism. Therefore eoSelectPerc needs an eoSelectOne in its ctor + + It will select floor(rate*pop.size()) individuals and pushes them to + the back of the destination population. + +@ingroup Selectors +*/ +template +class eoSelectPerc : public eoSelect +{ + public: + /// init + eoSelectPerc(eoSelectOne& _select, float _rate = 1.0) + : select(_select), rate(_rate) {} + + /** + The implementation selects a percentage + + @param _source the source population + @param _dest the resulting population (size of this population is the number of times eoSelectOne is called. It empties the destination and adds the selection into it) + */ + virtual void operator()(const eoPop& _source, eoPop& _dest) + { + size_t target = static_cast(floor(rate * _source.size())); + + _dest.resize(target); + + select.setup(_source); + + for (size_t i = 0; i < _dest.size(); ++i) + _dest[i] = select(_source); + } + +private : + eoSelectOne& select; + float rate; +}; + +#endif diff --git a/trunk/eo/src/eoSequentialSelect.h b/trunk/eo/src/eoSequentialSelect.h new file mode 100644 index 000000000..1a1f02e4e --- /dev/null +++ b/trunk/eo/src/eoSequentialSelect.h @@ -0,0 +1,148 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSequential.h +// (c) GeNeura Team, 1998 - Maarten Keijzer 2000, Marc Schoenauer, 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoSequential_h +#define eoSequential_h + +#include + +#include "utils/eoData.h" +#include "utils/eoRNG.h" +#include "eoSelectOne.h" + +/** Contains the following classes: + * - eoSequentialSelect, returns all individuals one by one, + * either sorted or shuffled + * - eoEliteSequentialSelect, returns all indivisuals one by one + * starting with best, continuing shuffled (see G3 engine) + */ + + +/** All Individuals in order + +Looping back to the beginning when exhausted, can be from best to +worse, or in random order. + +It is the eoSelectOne equivalent of eoDetSelect - though eoDetSelect +always returns individuals from best to worst + +@ingroup Selectors +*/ +template class eoSequentialSelect: public eoSelectOne +{ + public: + /** Ctor: sets the current pter to numeric_limits::max() so init will take place first time + not very elegant, maybe ... + */ + eoSequentialSelect(bool _ordered = true) + : ordered(_ordered), current(std::numeric_limits::max()) {} + + void setup(const eoPop& _pop) + { + eoPters.resize(_pop.size()); + if (ordered) // probably we could have a marker to avoid re-sorting + _pop.sort(eoPters); + else + _pop.shuffle(eoPters); + current=0; + } + + virtual const EOT& operator()(const eoPop& _pop) + { + if (current >= _pop.size()) + setup(_pop); + + unsigned eoN = current; + current++; + return *eoPters[eoN] ; + } +private: + bool ordered; + unsigned current; + std::vector eoPters; +}; + + + +/** All Individuals in order + +The best individual first, then the others in sequence (random order). +for G3 evolution engine, see Deb, Anad and Joshi, CEC 2002 + +As eoSequentialSelect, it is an eoSelectOne to be used within the +eoEaseyEA algo, but conceptually it should be a global eoSelect, as it +selects a bunch of guys in one go (done in the setup function now) + +@ingroup Selectors +*/ +template class eoEliteSequentialSelect: public eoSelectOne +{ + public: + + /** Ctor: sets the current pter to numeric_limits::max() so init will take place first time + not very elegant, maybe ... + */ + eoEliteSequentialSelect(): current(std::numeric_limits::max()) {} + + void setup(const eoPop& _pop) + { + eoPters.resize(_pop.size()); + _pop.shuffle(eoPters); + // now get the best + unsigned int ibest = 0; + const EOT * best = eoPters[0]; + if (_pop.size() == 1) + throw std::runtime_error("Trying eoEliteSequentialSelect with only one individual!"); + for (unsigned i=1; i<_pop.size(); i++) + if (*eoPters[i]>*best) + { + ibest = i; + best = eoPters[ibest]; + } + // and put it upfront + const EOT *ptmp = eoPters[0]; + eoPters[0]=best; + eoPters[ibest] = ptmp; + // exit after setting current + current=0; + } + + virtual const EOT& operator()(const eoPop& _pop) + { + if (current >= _pop.size()) + setup(_pop); + + unsigned eoN = current; + current++; + return *eoPters[eoN] ; + } +private: + unsigned current; + std::vector eoPters; +}; + + +#endif diff --git a/trunk/eo/src/eoSharing.h b/trunk/eo/src/eoSharing.h new file mode 100644 index 000000000..170a03b9e --- /dev/null +++ b/trunk/eo/src/eoSharing.h @@ -0,0 +1,141 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSharing.h + (c) Maarten Keijzer, Marc Schoenauer, 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoSharing_h +#define eoSharing_h + +#include +#include + +/** Sharing is a perf2worth class that implements + * Goldberg and Richardson's basic sharing +*/ + +/** A helper class for Sharing - to hold distances + * + * @ingroup Selectors + * */ +class dMatrix : public std::vector + { + public: + // Ctor : sets size + dMatrix(unsigned _s) : std::vector(_s*_s), rSize(_s) {} + + /** simple accessor */ + double operator()(unsigned _i, unsigned _j) const + { + return this->operator[](_i*rSize + _j); + } + + /** reference - to set values */ + double & operator()(unsigned _i, unsigned _j) + { + return this->operator[](_i*rSize + _j); + } + + /** just in case */ + void printOn(std::ostream & _os) + { + unsigned index=0; + for (unsigned i=0; ioperator[](index++) << " " ; + _os << std::endl; + } + _os << std::endl; + } + + private: + unsigned rSize; // row size (== number of columns!) + }; + + +/** Sharing is a perf2worth class that implements + * Goldberg and Richardson's basic sharing + * see eoSharingSelect for how to use it + * and test/t-eoSharing.cpp for a sample use of both + * @ingroup Selectors +*/ +template +class eoSharing : public eoPerf2Worth +{ +public: + + using eoPerf2Worth::value; + + + /* Ctor requires a distance - cannot have a default distance! */ + eoSharing(double _nicheSize, eoDistance & _dist) : eoPerf2Worth("Sharing"), + nicheSize(_nicheSize), + dist(_dist) + {} + + /** Computes shared fitnesses + */ + void operator()(const eoPop& _pop) + { + unsigned i, j, + pSize=_pop.size(); + if (pSize <= 1) + throw std::runtime_error("Apptempt to do sharing with population of size 1"); + value().resize(pSize); + std::vector sim(pSize); // to hold the similarities + dMatrix distMatrix(pSize); // to hold the distances + + // compute the similarities (wrong name for distMatrix, I know) + distMatrix(0,0)=1; + for (i=1; inicheSize ? 0 : 1-(d/nicheSize) ); + } + } + + for (i=0; i & dist; // specific distance +}; + + + +#endif diff --git a/trunk/eo/src/eoSharingSelect.h b/trunk/eo/src/eoSharingSelect.h new file mode 100644 index 000000000..0754cdd08 --- /dev/null +++ b/trunk/eo/src/eoSharingSelect.h @@ -0,0 +1,60 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSharingSelect.h +// (c) GeNeura Team, 1998, Maarten Keijzer 2000, Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoSharingSelect_h +#define eoSharingSelect_h + +//----------------------------------------------------------------------------- + +#include +#include + +/** eoSharingSelect: select an individual by roulette wheel + * on its SHARED fitness. It is an eoRouletteWorthSelect, + * i.e. a selector using a std::vector of worthes + * rather than the raw fitness (see eoSelectFromWorth.h) + * It uses an internal eoSharing object which is + * an eoPerf2Worth + * @ingroup Selectors +*/ + +template +class eoSharingSelect: public eoRouletteWorthSelect +{ +public: + /** Ctor: + * @param _sigma the sigma_share + * @param _dist the distance object to use + */ + eoSharingSelect(double _sigma, eoDistance & _dist): + eoRouletteWorthSelect(sharing), sharing(_sigma, _dist) {} + +private : + eoSharing sharing; // derived from eoPerf2Worth +}; +/** @example t-eoSharing.cpp + */ + +#endif diff --git a/trunk/eo/src/eoShiftMutation.h b/trunk/eo/src/eoShiftMutation.h new file mode 100644 index 000000000..a9b71d665 --- /dev/null +++ b/trunk/eo/src/eoShiftMutation.h @@ -0,0 +1,91 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoShiftMutation.h +// (c) GeNeura Team, 2000 - EEAAX 2000 - Maarten Keijzer 2000 +// (c) INRIA Futurs - Dolphin Team - Thomas Legrand 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + thomas.legrand@lifl.fr + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoShiftMutation_h +#define eoShiftMutation_h + +//----------------------------------------------------------------------------- + + +/** + * Shift two components of a chromosome. + * + * @ingroup Variators + */ +template class eoShiftMutation: public eoMonOp +{ + public: + + typedef typename EOT::AtomType GeneType; + + /// CTor + eoShiftMutation(){} + + + /// The class name. + virtual std::string className() const { return "eoShiftMutation"; } + + + /** + * Shift two components of the given eoosome. + * @param _eo The cromosome which is going to be changed. + */ + bool operator()(EOT& _eo) + { + + unsigned i, j, from, to; + GeneType tmp; + + // generate two different indices + i=eo::rng.random(_eo.size()); + do j = eo::rng.random(_eo.size()); while (i == j); + + // indexes + from=std::min(i,j); + to=std::max(i,j); + + // keep the first component to change + tmp=_eo[to]; + + // shift + for(unsigned int k=to ; k > from ; k--) + _eo[k]=_eo[k-1]; + + // shift the first component + _eo[from]=tmp; + + return true; + } + +}; +/** @example t-eoShiftMutation.cpp + */ + + +//----------------------------------------------------------------------------- +#endif diff --git a/trunk/eo/src/eoSigBinaryFlight.h b/trunk/eo/src/eoSigBinaryFlight.h new file mode 100644 index 000000000..dccf2e5f6 --- /dev/null +++ b/trunk/eo/src/eoSigBinaryFlight.h @@ -0,0 +1,94 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSigBinaryFlight.h +// (c) OPAC 2007, INRIA Futurs DOLPHIN +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + clive.canape@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOSIGBINARYFLIGHT_H +#define EOSIGBINARYFLIGHT_H + +//----------------------------------------------------------------------------- +#include +//----------------------------------------------------------------------------- + + + +/** + * Binary flight for particle swarm optimization based on the sigmoid function. Velocities are expected to be "double" + * Consider Pi to be the i-th position of a particle and Vi to be the i-th velocity of the same particle : + * if rand[0;1] < sig(Vi) (Vi <=> double) + * Pi=1 + * else + * Pi=0 + * + * @ingroup Variators + */ +template < class POT > class eoSigBinaryFlight:public eoBinaryFlight < POT > +{ + +public: + + /** + * Constructor. + */ + eoSigBinaryFlight (){slope = 1;} + eoSigBinaryFlight (unsigned _slope){slope = _slope;} + + + /** + * Sigmoid function + */ + double sigmoid( double _value) + { + return(1/(1+ exp(- _value/slope))); + + } + + /** + * Apply the sigmoid binary flight to a particle. + * + */ + void operator () (POT & _po) + { + + for (unsigned j = 0; j < _po.size (); j++) + { + double sigma=rng.uniform(1); + + if (sigma < sigmoid(_po.velocities[j])) + _po[j]=1; + else + _po[j]=0; + } + + // invalidate the fitness because the positions have changed + _po.invalidate(); + } + +private : + unsigned slope; + +}; + + + +#endif /*EOSIGBINARYFLIGHT_H */ diff --git a/trunk/eo/src/eoSimpleEDA.h b/trunk/eo/src/eoSimpleEDA.h new file mode 100644 index 000000000..afbf152f0 --- /dev/null +++ b/trunk/eo/src/eoSimpleEDA.h @@ -0,0 +1,106 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSimpleEDA.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSimpleEDA_h +#define _eoSimpleEDA_h + +//----------------------------------------------------------------------------- + +#include +#include +#include +#include +#include + +/** A very simple Estimation of Distribution Algorithm + * + * The algorithm that evolves a probability distribution + * on the spaces of populations with the loop + * generate a population from the current distribution + * evaluate that population + * update the distribution + * + * @ingroup Algorithms +*/ + +template class eoSimpleEDA: public eoEDA +{ + public: + + /** Ctor from an eoDistribUpdater, + * plus an eoEval and eoContinue of course. + */ + eoSimpleEDA(eoDistribUpdater& _update, + eoEvalFunc& _eval, + unsigned _popSize, + eoContinue& _continuator + ) : + update(_update), + eval(_eval), + popSize(_popSize), + continuator(_continuator) + {} + + /** The algorithm: + * generate pop from distrib, + * evaluate pop, + * update distrib + */ + virtual void operator()(eoDistribution& _distrib) + { + eoPop pop(popSize, _distrib); + do + { + try + { + apply(_distrib, pop); // re-init. of _pop from distrib + + apply(eval, pop); // eval of current population + + update(_distrib, pop); // updates distrib from _pop + + } + catch (std::exception& e) + { + std::string s = e.what(); + s.append( " in eoSimpleEDA"); + throw std::runtime_error( s ); + } + } while ( continuator( pop ) ); + } + + private: + eoDistribUpdater & update; + + eoEvalFunc& eval; + + unsigned popSize; + + eoContinue& continuator; +}; + +//----------------------------------------------------------------------------- + +#endif diff --git a/trunk/eo/src/eoSocialNeighborhood.h b/trunk/eo/src/eoSocialNeighborhood.h new file mode 100644 index 000000000..944031f9d --- /dev/null +++ b/trunk/eo/src/eoSocialNeighborhood.h @@ -0,0 +1,125 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSocialNeighborhood.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOSOCIALNEIGHBORHOOD_H_ +#define EOSOCIALNEIGHBORHOOD_H_ + +//----------------------------------------------------------------------------- +#include +//----------------------------------------------------------------------------- + +/** + * Derivated from eoNeighborhood. Just takes relationships into account. + * The neighborhood is defined as a list of indices corresponding to particles. + * Also contains ONE particle considered as the best of the neighborhood. + * + * @ingroup Selectors + */ +template < class POT > class eoSocialNeighborhood : public eoNeighborhood +{ +public: + + eoSocialNeighborhood(){} + + /** + * Put a particle (identified by its indice in its population) in the neighborhood. + * @param _oneIndice - The indice of the particle in its population. + */ + void put(unsigned _oneIndice) + { + indicesList.push_back(_oneIndice); + } + + /** + * Return true if the neighborhood contains the indice (= that means "contains the + * particle whose indice is _oneIndice") + * @param _oneIndice - The indice of the particle in its population. + */ + bool contains(unsigned _oneIndice) + { + for (unsigned i=0;i< indicesList.size();i++) + { + if (indicesList[i]==_oneIndice) + return true; + } + return false; + } + + /** + * Return the list of particle indices as a vector. + */ + std::vector getInformatives() + { + return indicesList; + } + + /** + * Return the size of the neighborhood. + */ + unsigned size() + { + return indicesList.size(); + + } + + /** + * Return the "_index-th" particle of the neighborhood. + * Throw an exception if its not contained in the neighborhood. + */ + unsigned get(unsigned _index) + { + if (_index < size()) + return indicesList[_index]; + else{ + std::string s; + s.append (" Invalid indice in eoSocialNeighborhood "); + throw std::runtime_error (s); + } + } + + /** + * Return the best particle of the neighborhood. + * The topology is expected to get it. + */ + POT & best() + { + return lBest; + } + + /** + * Set the best particle of the neighborhood. + * The topology is expected to set it. + */ + void best(POT _particle) + { + lBest=_particle; + } + +protected: + std::vector indicesList; // The list of particles as a vector of indices + POT lBest; // the best particle of the neighborhood +}; + + +#endif /* EOSOCIALNEIGHBORHOOD_H_ */ diff --git a/trunk/eo/src/eoStandardFlight.h b/trunk/eo/src/eoStandardFlight.h new file mode 100644 index 000000000..228839eb7 --- /dev/null +++ b/trunk/eo/src/eoStandardFlight.h @@ -0,0 +1,109 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStandardFlight.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOSTANDARDFLIGHT_H +#define EOSTANDARDFLIGHT_H + +//----------------------------------------------------------------------------- +#include +//----------------------------------------------------------------------------- + + + +/** Standard flight for particle swarm optimization. Derivated from abstract eoFlight, + * just adds the velocities to the current position of the particle + * and invalidates its fitness + * + * @ingroup Variators + */ +template < class POT > class eoStandardFlight:public eoFlight < POT > +{ + +public: + + /* + * Each element for the postion evaluation is expected to be of type PositionType. + */ + typedef typename POT::AtomType PositionType; + + + /** Constructor without bounds. + * + */ + eoStandardFlight ():bnds (*(new eoRealVectorNoBounds(0))){} + + + /** Constructor for continuous flight with real bounds: expects a eoRealVectorBounds object for bound + * control. + * @param _bounds - An eoRealVectorBounds + */ + eoStandardFlight (eoRealVectorBounds & _bounds):bnds (_bounds){} + + + /** Constructor for continuous flight with real bounds: expects a min and a + * max to build the same real bounds for all the positions. + * WARNING: _min and max MUST be double as the position type + * @param _dim - The dimension of the bounds = the dimension of the position + * @param _min - The lower bound to use for all the positions + * @param _max - The upper bound to use for all the positions + */ + eoStandardFlight (const unsigned _dim,const double & _min,const double & _max ):bnds (*(new eoRealVectorBounds(_dim,_min,_max))){} + + + /** + * Apply the standard flight to a particle : position:=position + velocity + * and ... invalidates the particle's fitness + */ + void operator () (POT & _po) + { + // need to resize the bounds even if there are dummy because of "isBounded" call + bnds.adjust_size(_po.size()); + + for (unsigned j = 0; j < _po.size (); j++) + { + PositionType newPosition; + + // tmp position + newPosition = _po[j] + _po.velocities[j]; + + /* check bounds */ + if (bnds.isMinBounded(j)) + newPosition=std::max(newPosition,bnds.minimum(j)); + if (bnds.isMaxBounded(j)) + newPosition=std::min(newPosition,bnds.maximum(j)); + + _po[j]=newPosition; + } + // invalidate the fitness because the positions have changed + _po.invalidate(); + } + +protected: + eoRealVectorBounds & bnds; +}; + + + + +#endif /*EOSTANDARDFLIGHT_H */ diff --git a/trunk/eo/src/eoStandardVelocity.h b/trunk/eo/src/eoStandardVelocity.h new file mode 100644 index 000000000..62abd487b --- /dev/null +++ b/trunk/eo/src/eoStandardVelocity.h @@ -0,0 +1,195 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStandardVelocity.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + clive.canape@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOSTANDARDVELOCITY_H +#define EOSTANDARDVELOCITY_H + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + + +/** Standard velocity performer for particle swarm optimization. Derivated from abstract eoVelocity, +* At step t: v(t+1)= w * v(t) + c1 * r1 * ( xbest(t)-x(t) ) + c2 * r2 * ( lbest(t) - x(t) ) +* lbest depends on the topology evolved, when using eoStarTopology, lbest corresponds to the +* global. Otherwise, lbest is a "local best", i.e the best in a neighborhood. +* +* @ingroup Variators +*/ +template < class POT > class eoStandardVelocity:public eoVelocity < POT > +{ + +public: + + /* + * Each element for the velocity evaluation is expected to be of type VelocityType. + */ + typedef typename POT::ParticleVelocityType VelocityType; + + /** Full constructor: Bounds and bound modifier required + * @param _topology - The topology to get the global/local/other best + * @param _w - The weight factor. + * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _gen - The eo random generator, default=rng + */ + eoStandardVelocity (eoTopology < POT > & _topology, + const VelocityType & _w, + const VelocityType & _c1, + const VelocityType & _c2, + eoRealVectorBounds & _bounds, + eoRealBoundModifier & _bndsModifier, + eoRng & _gen = rng): + topology(_topology), + omega (_w), + c1 (_c1), + c2 (_c2), + bounds(_bounds), + bndsModifier(_bndsModifier), + gen(_gen){} + + + /** Constructor: No bound updater required <-> fixed bounds + * @param _topology - The topology to get the global/local/other best + * @param _w - The weight factor. + * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _gen - The eo random generator, default=rng + */ + eoStandardVelocity (eoTopology < POT > & _topology, + const VelocityType & _w, + const VelocityType & _c1, + const VelocityType & _c2, + eoRealVectorBounds & _bounds, + eoRng & _gen = rng): + topology(_topology), + omega (_w), + c1 (_c1), + c2 (_c2), + bounds(_bounds), + bndsModifier(dummyModifier), + gen(_gen){} + + + /** Constructor: Neither bounds nor bound updater required <-> free velocity + * @param _topology - The topology to get the global/local/other best + * @param _w - The weight factor. + * @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _gen - The eo random generator, default=rng + */ + eoStandardVelocity (eoTopology < POT > & _topology, + const VelocityType & _w, + const VelocityType & _c1, + const VelocityType & _c2, + eoRng & _gen = rng): + topology(_topology), + omega (_w), + c1 (_c1), + c2 (_c2), + bounds(*(new eoRealVectorNoBounds(0))), + bndsModifier(dummyModifier), + gen(_gen) + {} + + + /** + * Evaluate the new velocities of the given particle. Need an indice to identify the particle + * into the topology. + * @param _po - A particle + * @param _indice - The indice (into the topology) of the given particle + */ + void operator () (POT & _po,unsigned _indice) + { + VelocityType r1; + VelocityType r2; + + VelocityType newVelocity; + + // cast the learning factors to VelocityType + r1 = (VelocityType) rng.uniform (1) * c1; + r2 = (VelocityType) rng.uniform (1) * c2; + + // need to resize the bounds even if there are dummy because of "isBounded" call + bounds.adjust_size(_po.size()); + + // assign the new velocities + for (unsigned j = 0; j < _po.size (); j++) + { + newVelocity= omega * _po.velocities[j] + r1 * (_po.bestPositions[j] - _po[j]) + r2 * (topology.best (_indice)[j] - _po[j]); + + /* check bounds */ + if (bounds.isMinBounded(j)) + newVelocity=std::max(newVelocity,bounds.minimum(j)); + if (bounds.isMaxBounded(j)) + newVelocity=std::min(newVelocity,bounds.maximum(j)); + + _po.velocities[j]=newVelocity; + } + } + + /** + * Update the neighborhood. + */ + void updateNeighborhood(POT & _po,unsigned _indice) + { + topology.updateNeighborhood(_po,_indice); + } + + //! eoTopology getTopology + //! @return topology + + eoTopology & getTopology () + { + return topology; + } + +protected: + eoTopology < POT > & topology; + const VelocityType & omega; // social/cognitive coefficient + const VelocityType & c1; // social/cognitive coefficient + const VelocityType & c2; // social/cognitive coefficient + + eoRealVectorBounds bounds; // REAL bounds even if the velocity could be of another type. + eoRealBoundModifier & bndsModifier; + + eoRng & gen; // the random generator + + // If the bound modifier doesn't need to be used, use the dummy instance + eoDummyRealBoundModifier dummyModifier; +}; + + +#endif /*EOSTANDARDVELOCITY_H */ diff --git a/trunk/eo/src/eoStarTopology.h b/trunk/eo/src/eoStarTopology.h new file mode 100644 index 000000000..02df64a98 --- /dev/null +++ b/trunk/eo/src/eoStarTopology.h @@ -0,0 +1,141 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStarTopology.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + clive.canape@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOSTARTOPOLOGY_H_ +#define EOSTARTOPOLOGY_H_ + +//----------------------------------------------------------------------------- +#include +#include +//----------------------------------------------------------------------------- + + +/** + * Topology dedicated to "globest best" strategy for particle swarm optimization. + * All the particles of the swarm belong to the same and only social neighborhood. + * The global best is stored and updated using the eoSocialNeighborhood. +* +* @ingroup Selectors + */ +template < class POT > class eoStarTopology:public eoTopology +{ + +public: + + /** + * The only Ctor. No parameter required. + */ + eoStarTopology ():isSetup(false){} + + + /** + * Builds the only neighborhood that contains all the particles of the given population. + * Also initializes the global best particle with the best particle of the given population. + * @param _pop - The population used to build the only neighborhood. + * @return + */ + void setup(const eoPop & _pop) + { + if (!isSetup){ + + // put all the particles in the only neighborhood + for (unsigned i=0;i < _pop.size();i++) + neighborhood.put(i); + + // set the initial global best as the best initial particle + neighborhood.best(_pop.best_element()); + + isSetup=true; + } + else + { + // Should activate this part ? + /* + std::string s; + s.append (" Linear topology already setup in eoStarTopology"); + throw std::runtime_error (s); + */ + } + } + + /* + * Update the best fitness of the given particle if it's better. + * Also replace the global best by the given particle if it's better. + * @param _po - The particle to update + * @param _indice - The indice of the given particle in the population + */ + void updateNeighborhood(POT & _po,unsigned _indice) + { + // update the best fitness of the particle + if (_po.fitness() > _po.best()) + { + _po.best(_po.fitness()); + for(unsigned i=0;i<_po.size();i++) + _po.bestPositions[i]=_po[i]; + } + // update the global best if the given particle is "better" + if (_po.fitness() > neighborhood.best().fitness()) + { + neighborhood.best(_po); + } + } + + + /** + * Return the global best particle. + * @param _indice - The indice of a particle in the population + * @return POT & - The best particle in the neighborhood of the particle whose indice is _indice + */ + POT & best (unsigned _indice) {return (neighborhood.best());} + + /* + * Return the global best of the topology + */ + + virtual POT & globalBest(const eoPop& _pop) + { + return neighborhood.best(); + } + + + /** + * Print the structure of the topology on the standard output. + */ + void printOn() + { + std::cout << "{" ; + for (unsigned i=0;i< neighborhood.size();i++) + std::cout << neighborhood.get(i) << " "; + std::cout << "}" << std::endl; + } + + + +protected: + eoSocialNeighborhood neighborhood; // the only neighborhood + bool isSetup; +}; + +#endif /*EOSTARTOPOLOGY_H_ */ diff --git a/trunk/eo/src/eoSteadyFitContinue.h b/trunk/eo/src/eoSteadyFitContinue.h new file mode 100644 index 000000000..229d93bc1 --- /dev/null +++ b/trunk/eo/src/eoSteadyFitContinue.h @@ -0,0 +1,119 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSteadyFitContinue.h +// (c) GeNeura Team, 1999, Marc Schoenauer, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSteadyFitContinue_h +#define _eoSteadyFitContinue_h + +#include +#include + +/** + A continuator: does a minimum number of generations, then + stops whenever a given number of generations takes place without improvement + + @ingroup Continuators +*/ +template< class EOT> +class eoSteadyFitContinue: public eoContinue +{ +public: + typedef typename EOT::Fitness Fitness; + + /// Ctor for setting a + eoSteadyFitContinue( unsigned long _minGens, unsigned long _steadyGens) + : repMinGenerations( _minGens ), repSteadyGenerations( _steadyGens), + steadyState(false), thisGenerationPlaceHolder(0), + thisGeneration(thisGenerationPlaceHolder){}; + + /// Ctor for enabling the save/load the no. of generations counted + eoSteadyFitContinue( unsigned long _minGens, unsigned long _steadyGen, + unsigned long& _currentGen) + : repMinGenerations( _minGens ), repSteadyGenerations( _steadyGen), + steadyState(_currentGen>_minGens), thisGenerationPlaceHolder(0), + thisGeneration(_currentGen){}; + + /** Returns false when a certain number of generations is + * reached withtout improvement */ + virtual bool operator() ( const eoPop& _vEO ) { + thisGeneration++; + + Fitness bestCurrentFitness = _vEO.nth_element_fitness(0); + + if (steadyState) { // already after MinGenenerations + if (bestCurrentFitness > bestSoFar) { + bestSoFar = bestCurrentFitness; + lastImprovement = thisGeneration; + } else { + if (thisGeneration - lastImprovement > repSteadyGenerations) { + eo::log << eo::progress << "STOP in eoSteadyFitContinue: Done " << repSteadyGenerations + << " generations without improvement\n"; + return false; + } + } + } else { // not yet in steady state + if (thisGeneration > repMinGenerations) { // go to steady state + steadyState = true; + bestSoFar = bestCurrentFitness; + lastImprovement = thisGeneration; + eo::log << eo::progress << "eoSteadyFitContinue: Done the minimum number of generations\n"; + } + } + return true; + } + + /** Sets the parameters (minimum nb of gen. + steady nb of gen.) + and sets the current generation to 0 (the begin) + + @todo replace thi by an init method ? + */ + virtual void totalGenerations( unsigned long _mg, unsigned long _sg ) { + repMinGenerations = _mg; + repSteadyGenerations = _sg; + reset(); + }; + + /// Resets the state after it's been reached + virtual void reset () { + steadyState=false; + thisGeneration = 0; + } + + /** accessors*/ + virtual unsigned long minGenerations( ) + { return repMinGenerations; }; + virtual unsigned long steadyGenerations( ) + { return repSteadyGenerations; }; + + virtual std::string className(void) const { return "eoSteadyFitContinue"; } +private: + unsigned long repMinGenerations; + unsigned long repSteadyGenerations; + bool steadyState; + unsigned long thisGenerationPlaceHolder; + unsigned long& thisGeneration; + unsigned int lastImprovement; + Fitness bestSoFar; +}; + +#endif diff --git a/trunk/eo/src/eoStochTournamentSelect.h b/trunk/eo/src/eoStochTournamentSelect.h new file mode 100644 index 000000000..650041296 --- /dev/null +++ b/trunk/eo/src/eoStochTournamentSelect.h @@ -0,0 +1,67 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStochTournamentSelect.h +// (c) GeNeura Team, 1998 - EEAAX 1999 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ + +#ifndef eoStochTournamentSelect_h +#define eoStochTournamentSelect_h + +#include +#include // accumulate +#include // eoSelectOne +#include // stochastic_tournament + +/** eoStochTournamentSelect: a selection method that selects ONE individual by + binary stochastic tournament + -MS- 24/10/99 + + @ingroup Selectors + */ +template class eoStochTournamentSelect: public eoSelectOne +{ + public: + + /// + eoStochTournamentSelect(double _Trate = 1.0 ) : eoSelectOne(), Trate(_Trate) + { + // consistency checks + if (Trate < 0.5) { + std::cerr << "Warning, Tournament rate should be > 0.5\nAdjusted to 0.55\n"; + Trate = 0.55; + } + if (Trate > 1) { + std::cerr << "Warning, Tournament rate should be < 1\nAdjusted to 1\n"; + Trate = 1; + } + } + + /** Perform the stochastic tournament */ + virtual const EOT& operator()(const eoPop& pop) + { + return stochastic_tournament(pop, Trate); + } + +private: + double Trate; +}; + +#endif diff --git a/trunk/eo/src/eoStochasticUniversalSelect.h b/trunk/eo/src/eoStochasticUniversalSelect.h new file mode 100644 index 000000000..fb1669ecc --- /dev/null +++ b/trunk/eo/src/eoStochasticUniversalSelect.h @@ -0,0 +1,110 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStochasticUniversalSelect.h +// (c) Maarten Keijzer 2003 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@cs.vu.nl + */ +//----------------------------------------------------------------------------- + +#ifndef eoStochasticUniversalSelect_h +#define eoStochasticUniversalSelect_h + +//----------------------------------------------------------------------------- + +#include +#include +#include +#include + +/** eoStochasticUniversalSelect: select an individual proportional to her stored fitness + value, but in contrast with eoStochasticUniversalSelect, get rid of most finite sampling effects + by doing all selections in one go, using a single random number. + + @ingroup Selectors +*/ +template class eoStochasticUniversalSelect: public eoSelectOne +{ +public: + /// Sanity check + eoStochasticUniversalSelect(const eoPop& pop = eoPop()) + { + if (minimizing_fitness()) + throw std::logic_error("eoStochasticUniversalSelect: minimizing fitness"); + } + + void setup(const eoPop& _pop) + { + if (_pop.size() == 0) return; + + std::vector cumulative(_pop.size()); + + cumulative[0] = _pop[0].fitness(); + for (unsigned i = 1; i < _pop.size(); ++i) + { + cumulative[i] = _pop[i].fitness() + cumulative[i-1]; + } + + indices.reserve(_pop.size()); + indices.resize(0); + + double fortune = rng.uniform() * cumulative.back(); + double step = cumulative.back() / double(_pop.size()); + + unsigned i = std::upper_bound(cumulative.begin(), cumulative.end(), fortune) - cumulative.begin(); + + while (indices.size() < _pop.size()) { + + while (cumulative[i] < fortune) {i++;} // linear search is good enough as we average one step each time + + indices.push_back(i); + fortune += step; + if (fortune >= cumulative.back()) { // start at the beginning + fortune -= cumulative.back(); + i = 0; + } + } + // shuffle + for (int i = indices.size() - 1; i > 0; --i) { + int j = rng.random(i+1); + std::swap(indices[i], indices[j]); + } + } + + /** do the selection, + */ + const EOT& operator()(const eoPop& _pop) + { + if (indices.empty()) setup(_pop); + + unsigned index = indices.back(); + indices.pop_back(); + return _pop[index]; + } + +private : + + typedef std::vector IndexVec; + IndexVec indices; +}; +/** @example t-eoRoulette.cpp + */ + +#endif diff --git a/trunk/eo/src/eoSurviveAndDie.h b/trunk/eo/src/eoSurviveAndDie.h new file mode 100644 index 000000000..63cf22197 --- /dev/null +++ b/trunk/eo/src/eoSurviveAndDie.h @@ -0,0 +1,197 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoSurviveAndDie.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoSurviveAndDie_h +#define _eoSurviveAndDie_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** +eoSurviveAndDie: takes a population (first argument), +kills the ones that are to die, +puts the ones that are to survive into the second argument +removes them from the first pop argument + +@class eoSurviveAndDie +@class eoDeterministicSurviveAndDie, +@class eoDeterministicSaDReplacement +*/ + +/** @addtogroup Replacors + * @{ + */ + +/** eoSurviveAndDie +A pure abstract class, to store the howmany's +*/ +template +class eoSurviveAndDie : public eoBF &, eoPop &, void> +{ +public: + eoSurviveAndDie(double _survive, double _die, bool _interpret_as_rate = true): + howmanySurvive(_survive, _interpret_as_rate), + howmanyDie(_die, _interpret_as_rate) + {} + +protected: + eoHowMany howmanySurvive; + eoHowMany howmanyDie; + +}; + +/** An instance (theonly one as of today, Dec. 20, 2000) of an + eoSurviveAndDie, that does everything deterministically + + Used in eoDeterministicSaDReplacement. +*/ +template +class eoDeterministicSurviveAndDie : public eoSurviveAndDie +{ +public: + + using eoSurviveAndDie< EOT >::howmanyDie; + using eoSurviveAndDie< EOT >::howmanySurvive; + + /** constructor */ + eoDeterministicSurviveAndDie(double _survive, double _die, bool _interpret_as_rate = true) + : eoSurviveAndDie< EOT >(_survive, _die, _interpret_as_rate) + {} + + + void operator()(eoPop & _pop, eoPop & _luckyGuys) + { + unsigned pSize = _pop.size(); + unsigned nbSurvive = howmanySurvive(pSize); + // first, save the best into _luckyGuys + if (nbSurvive) + { + _pop.nth_element(nbSurvive); + // copy best + _luckyGuys.resize(nbSurvive); + std::copy(_pop.begin(), _pop.begin()+nbSurvive, _luckyGuys.begin()); + // erase them from pop + _pop.erase(_pop.begin(), _pop.begin()+nbSurvive); + } + unsigned nbRemaining = _pop.size(); + + // carefull, we can have a rate of 1 if we want to kill all remaining + unsigned nbDie = std::min(howmanyDie(pSize), pSize-nbSurvive); + if (nbDie > nbRemaining) + throw std::logic_error("eoDeterministicSurviveAndDie: Too many to kill!\n"); + + if (!nbDie) + { + return; + } + // else + // kill the worse nbDie + _pop.nth_element(nbRemaining-nbDie); + _pop.resize(nbRemaining-nbDie); + } + +}; + +/** +eoDeterministicSaDReplacement: replacement strategy that is just, in sequence + saves best and kill worse from parents ++ saves best and kill worse from offspring ++ merge remaining (neither save nor killed) parents and offspring ++ reduce that merged population += returns reduced pop + best parents + best offspring + +An obvious use is as strong elitist strategy, + i.e. preserving best parents, and reducing + (either offspring or parents+offspring) +*/ +template +class eoDeterministicSaDReplacement : public eoReplacement +{ +public: + /** Constructor with reduce */ + eoDeterministicSaDReplacement(eoReduce& _reduceGlobal, + double _surviveParents, double _dieParents=0, + double _surviveOffspring=0, double _dieOffspring=0, + bool _interpret_as_rate = true ) : + reduceGlobal(_reduceGlobal), + sAdParents(_surviveParents, _dieParents, _interpret_as_rate), + sAdOffspring(_surviveOffspring, _dieOffspring, _interpret_as_rate) + {} + + /** Constructor with default truncate used as reduce */ + eoDeterministicSaDReplacement( + double _surviveParents, double _dieParents=0, + double _surviveOffspring=0, double _dieOffspring=0, + bool _interpret_as_rate = true ) : + reduceGlobal(truncate), + sAdParents(_surviveParents, _dieParents, _interpret_as_rate), + sAdOffspring(_surviveOffspring, _dieOffspring, _interpret_as_rate) + {} + + void operator()(eoPop& _parents, eoPop& _offspring) + { + unsigned pSize = _parents.size(); // target number of individuals + + eoPop luckyParents; // to hold the absolute survivors + sAdParents(_parents, luckyParents); + + eoPop luckyOffspring; // to hold the absolute survivors + sAdOffspring(_offspring, luckyOffspring); + + unsigned survivorSize = luckyOffspring.size() + luckyParents.size(); + if (survivorSize > pSize) + throw std::logic_error("eoGeneralReplacement: More survivors than parents!\n"); + + plus(_parents, _offspring); // all that remain in _offspring + + reduceGlobal(_offspring, pSize - survivorSize); + plus(luckyParents, _offspring); + plus(luckyOffspring, _offspring); + + _parents.swap(_offspring); + + } + +private : + eoReduce& reduceGlobal; + eoDeterministicSurviveAndDie sAdParents; + eoDeterministicSurviveAndDie sAdOffspring; + // plus helper (could be replaced by operator+= ???) + eoPlus plus; + // the default reduce: deterministic truncation + eoTruncate truncate; +}; + + +/** @} */ + +#endif diff --git a/trunk/eo/src/eoSwapMutation.h b/trunk/eo/src/eoSwapMutation.h new file mode 100644 index 000000000..58d3cf604 --- /dev/null +++ b/trunk/eo/src/eoSwapMutation.h @@ -0,0 +1,82 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSwapMutation.h +// (c) GeNeura Team, 2000 - EEAAX 2000 - Maarten Keijzer 2000 +// (c) INRIA Futurs - Dolphin Team - Thomas Legrand 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + thomas.legrand@lifl.fr + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoSwapMutation_h +#define eoSwapMutation_h + +//----------------------------------------------------------------------------- + + +/** + * Swap two components of a chromosome. + * + * @ingroup Variators + */ +template class eoSwapMutation: public eoMonOp +{ + public: + + /// CTor + eoSwapMutation(const unsigned _howManySwaps=1): howManySwaps(_howManySwaps) + { + // consistency check + if(howManySwaps < 1) + throw std::runtime_error("Invalid number of swaps in eoSwapMutation"); + } + + /// The class name. + virtual std::string className() const { return "eoSwapMutation"; } + + /** + * Swap two components of the given chromosome. + * @param chrom The cromosome which is going to be changed. + */ + bool operator()(Chrom& chrom) + { + unsigned i, j; + + for(unsigned int swap = 0; swap < howManySwaps; swap++) + { + // generate two different indices + i=eo::rng.random(chrom.size()); + do j = eo::rng.random(chrom.size()); while (i == j); + + // swap + std::swap(chrom[i],chrom[j]); + } + return true; + } + + private: + unsigned int howManySwaps; +}; +/** @example t-eoSwapMutation.cpp + */ + +//----------------------------------------------------------------------------- +#endif diff --git a/trunk/eo/src/eoSyncEasyPSO.h b/trunk/eo/src/eoSyncEasyPSO.h new file mode 100644 index 000000000..a3b4f36e7 --- /dev/null +++ b/trunk/eo/src/eoSyncEasyPSO.h @@ -0,0 +1,260 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSyncEasyPSO.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _EOSYNCEASYPSO_H +#define _EOSYNCEASYPSO_H + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** An easy-to-use synchronous particle swarm algorithm; you can use any particle, +* any flight, any topology... +* +* The main steps are : +* - perform a first evaluation of the population +* - for each generation +* - evaluate ALL the velocities +* -- perform the fligth of ALL the particles +* -- evaluate ALL the particles +* -- update the neighborhoods +* +* @ingroup Algorithms +*/ +template < class POT > class eoSyncEasyPSO:public eoPSO < POT > +{ +public: + + /** Full constructor + * @param _init - An eoInitializerBase that initializes the topology, velocity, best particle(s) + * @param _continuator - An eoContinue that manages the stopping criterion and the checkpointing system + * @param _eval - An eoEvalFunc: the evaluation performer + * @param _velocity - An eoVelocity that defines how to compute the velocities + * @param _flight - An eoFlight that defines how to make the particle flying: that means how + * to modify the positions according to the velocities + */ + eoSyncEasyPSO ( + eoInitializerBase &_init, + eoContinue < POT > &_continuator, + eoEvalFunc < POT > &_eval, + eoVelocity < POT > &_velocity, + eoFlight < POT > &_flight): + init(_init), + continuator (_continuator), + eval (_eval), + loopEval(_eval), + popEval(loopEval), + velocity (_velocity), + flight (_flight) + {} + + + /** Constructor without eoFlight. For special cases when the flight is performed withing the velocity. + * @param _init - An eoInitializerBase that initializes the topology, velocity, best particle(s) + * @param _continuator - An eoContinue that manages the stopping criterion and the checkpointing system + * @param _eval - An eoEvalFunc: the evaluation performer + * @param _velocity - An eoVelocity that defines how to compute the velocities + */ + eoSyncEasyPSO ( + eoInitializerBase &_init, + eoContinue < POT > &_continuator, + eoEvalFunc < POT > &_eval, + eoVelocity < POT > &_velocity): + init(_init), + continuator (_continuator), + eval (_eval), + loopEval(_eval), + popEval(loopEval), + velocity (_velocity), + flight (dummyFlight) + {} + + /** Full constructor - Can be used in parallel + * @param _init - An eoInitializerBase that initializes the topology, velocity, best particle(s) + * @param _continuator - An eoContinue that manages the stopping criterion and the checkpointing system + * @param _eval - An eoPopEvalFunc + * @param _velocity - An eoVelocity that defines how to compute the velocities + * @param _flight - An eoFlight + */ + eoSyncEasyPSO ( + eoInitializerBase &_init, + eoContinue < POT > &_continuator, + eoPopEvalFunc < POT > &_eval, + eoVelocity < POT > &_velocity, + eoFlight &_flight): + init(_init), + continuator (_continuator), + eval (dummyEval), + loopEval(dummyEval), + popEval(_eval), + velocity (_velocity), + flight (_flight) + {} + + + /** Another constructor without initializer + * @param _continuator - An eoContinue that manages the stopping criterion and the checkpointing system + * @param _eval - An eoEvalFunc: the evaluation performer + * @param _velocity - An eoVelocity that defines how to compute the velocities + * @param _flight - An eoFlight that defines how to make the particle flying: that means how + * to modify the positions according to the velocities + */ + eoSyncEasyPSO ( + eoContinue < POT > &_continuator, + eoEvalFunc < POT > &_eval, + eoVelocity < POT > &_velocity, + eoFlight < POT > &_flight): + init(dummyInit), + continuator (_continuator), + eval (_eval), + loopEval(_eval), + popEval(loopEval), + velocity (_velocity), + flight (_flight) + {} + + + /** Constructor without eoFlight nor eoInitializer. For special cases when the flight is performed withing the velocity. + * @param _continuator - An eoContinue that manages the stopping criterion and the checkpointing system + * @param _eval - An eoEvalFunc: the evaluation performer + * @param _velocity - An eoVelocity that defines how to compute the velocities + */ + eoSyncEasyPSO ( + eoContinue < POT > &_continuator, + eoEvalFunc < POT > &_eval, + eoVelocity < POT > &_velocity): + init(dummyInit), + continuator (_continuator), + eval (_eval), + loopEval(_eval), + popEval(loopEval), + velocity (_velocity), + flight (dummyFlight) + {} + + /** Full constructor - Can be used in parallel + * @param _continuator - An eoContinue that manages the stopping criterion and the checkpointing system + * @param _eval - An eoPopEvalFunc + * @param _velocity - An eoVelocity that defines how to compute the velocities + * @param _flight - An eoFlight + */ + eoSyncEasyPSO ( + eoContinue < POT > &_continuator, + eoPopEvalFunc < POT > &_eval, + eoVelocity < POT > &_velocity, + eoFlight &_flight): + init(dummyInit), + continuator (_continuator), + eval (dummyEval), + loopEval(dummyEval), + popEval(_eval), + velocity (_velocity), + flight (_flight) + {} + + /// Apply a few iteration of flight to the population (=swarm). + virtual void operator () (eoPop < POT > &_pop) + { + + try + { + // initializes the topology, velocity, best particle(s) + init(); + + // just to use a loop eval + eoPop empty_pop; + + do + { + // perform velocity evaluation + velocity.apply (_pop); + + // apply the flight + flight.apply (_pop); + + // evaluate the position (with a loop eval, empty_swarm IS USELESS) + popEval(empty_pop,_pop); + + // update the topology (particle and local/global best(s)) + velocity.updateNeighborhood(_pop); + + } + while (continuator (_pop)); + + } + catch (std::exception & e) + { + std::string s = e.what (); + s.append (" in eoSyncEasyPSO"); + throw std::runtime_error (s); + } + + } + +private: + + eoInitializerBase &init; + eoContinue < POT > &continuator; + + eoEvalFunc < POT > &eval; + eoPopLoopEval loopEval; + eoPopEvalFunc& popEval; + + eoVelocity < POT > &velocity; + eoFlight < POT > &flight; + + // if the eval does not need to be used, use the dummy eval instance + class eoDummyEval : public eoEvalFunc + { + public: + void operator()(POT &) + {} + } + dummyEval; + + class eoDummyFlight:public eoFlight < POT > + { + public: + eoDummyFlight () {} + void operator () (POT & /*_po*/) {} + }dummyFlight; + + // if the initializer does not need to be used, use the dummy one instead + class eoDummyInitializer:public eoInitializerBase < POT > + { + public: + eoDummyInitializer () {} + void operator () (POT & _po) {} + }dummyInit; + +}; +/** @example t-eoSyncEasyPSO.cpp + */ + + +#endif /*_EOSYNCEASYPSO_H*/ diff --git a/trunk/eo/src/eoTimeContinue.h b/trunk/eo/src/eoTimeContinue.h new file mode 100644 index 000000000..d49f5ea56 --- /dev/null +++ b/trunk/eo/src/eoTimeContinue.h @@ -0,0 +1,87 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoTimeContinue.h +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _EOTIMECONTINUE_H +#define _EOTIMECONTINUE_H + +#include + +#include +#include + +/** + * Termination condition until a running time is reached. + * + * @ingroup Continuators + */ +template < class EOT > +class eoTimeContinue: public eoContinue +{ +public: + + /** + * Ctor. + * @param _max maximum running time + */ + eoTimeContinue(time_t _max): max(_max) + { + start = time(NULL); + } + + + /** + * Returns false when the running time is reached. + * @param _pop the population + */ + virtual bool operator() (const eoPop < EOT > & _pop) + { + time_t elapsed = (time_t) difftime(time(NULL), start); + if (elapsed >= max) + { + eo::log << eo::progress << "STOP in eoTimeContinue: Reached maximum time [" << elapsed << "/" << max << "]" << std::endl; + return false; + } + return true; + } + + + /** + * Class name + */ + virtual std::string className(void) const + { + return "eoTimeContinue"; + } + + +private: + + /** maximum running time */ + time_t max; + /** starting time */ + time_t start; + +}; + +#endif diff --git a/trunk/eo/src/eoTopology.h b/trunk/eo/src/eoTopology.h new file mode 100644 index 000000000..a12bf43dc --- /dev/null +++ b/trunk/eo/src/eoTopology.h @@ -0,0 +1,86 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoTopology.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@inria.fr + clive.canape@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOTOPOLOGY_H_ +#define EOTOPOLOGY_H_ + +//----------------------------------------------------------------------------- +#include +//----------------------------------------------------------------------------- + + +/** + * Defines the interface of a swarm topology. Can be static (usually the case for the social topologies) + * or dynamic. It's the same interface for both social and physical topologies. ("social" topology means + * social-neighborhood-based toplogy and so on ...) + * + * @ingroup Selectors + * @ingroup Core + */ +template < class POT > class eoTopology:public eoPop < POT > +{ +public: + + /** + * Builds the neighborhoods contained in the topology. + */ + virtual void setup(const eoPop &)=0; + + /** + * Updates the neighborhood of the given particle and its indice in the population + */ + virtual void updateNeighborhood(POT & ,unsigned)=0; + + + /** + * Updates the neighborhood of the given particle thanks to a whole population (used for distributed or synchronous PSO) + */ + virtual void updateNeighborhood(eoPop < POT > &_pop) + { + for (unsigned i = 0; i < _pop.size (); i++) + updateNeighborhood(_pop[i],i); + } + + + /** + * Builds the neighborhoods contained in the topology. + */ + virtual POT & best (unsigned ) = 0; + + + /* + * Return the global best of the topology + */ + virtual POT & globalBest() = 0; + + + /** + * Prints the neighborhoods contained in the topology. + */ + virtual void printOn() = 0; +}; + + +#endif /*EOTOPOLOGY_H_ */ diff --git a/trunk/eo/src/eoTransform.h b/trunk/eo/src/eoTransform.h new file mode 100644 index 000000000..f8823382a --- /dev/null +++ b/trunk/eo/src/eoTransform.h @@ -0,0 +1,43 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoTransform.h + (c) Maarten Keijzer, GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoTransform_h +#define _eoTransform_h + + +//----------------------------------------------------------------------------- +#include +//----------------------------------------------------------------------------- + +/** +eoTransform transforms a population by applying genetic operators on it. + +@ingroup Combination +@ingroup Core +*/ +template +class eoTransform : public eoUF&, void> +{}; + +#endif diff --git a/trunk/eo/src/eoTruncSelect.h b/trunk/eo/src/eoTruncSelect.h new file mode 100644 index 000000000..e46b39bc3 --- /dev/null +++ b/trunk/eo/src/eoTruncSelect.h @@ -0,0 +1,75 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoTruncSelect.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2002 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoTruncSelect_h +#define _eoTruncSelect_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +//----------------------------------------------------------------------------- + +/** eoTruncSelect selects individuals after truncating the population + * using eoSelectOne as it's mechanism. + * Therefore eoSelectMany needs an eoSelectOne in its ctor + * It will use an eoHowMnay to determine the number of guys to keep, + * + * @ingroup Selectors +*/ +template +class eoTruncSelect : public eoSelect +{ + public: + /** Ctor: from an eoSelect (and an eoMany to tell how many are kept for selectino */ + eoTruncSelect(eoSelectOne& _select, eoHowMany _howMany) + : select(_select), howMany(_howMany) {} + + /** + The implementation repeatidly selects an individual + + @param _source the source population + @param _dest the resulting population (size of this population is the number of times eoSelectOne is called. It empties the destination and adds the selection into it) + */ + virtual void operator()(const eoPop& _source, eoPop& _dest) + { + unsigned target = howMany(_source.size()); + + _dest.resize(target); + + select.setup(_source); + + for (size_t i = 0; i < _dest.size(); ++i) + _dest[i] = select(_source); + } + +private : + eoSelectOne& select; + eoHowMany howMany; +}; + +#endif diff --git a/trunk/eo/src/eoTruncatedSelectMany.h b/trunk/eo/src/eoTruncatedSelectMany.h new file mode 100644 index 000000000..1b3bad726 --- /dev/null +++ b/trunk/eo/src/eoTruncatedSelectMany.h @@ -0,0 +1,119 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoTruncatedSelectMany.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2002 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoTruncatedSelectMany_h +#define _eoTruncatedSelectMany_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** eoTruncatedSelectMany selects many individuals using eoSelectOne as it's + mechanism. Therefore eoSelectMany needs an eoSelectOne in its ctor + + It will use an eoHowMnay to determine the number of guys to select, + and push them to the back of the destination population. + + And it will only perform selection from the top guys in the population. + + It is NOT a special case of eoSelectMany because it needs to SORT + the population to discard the worst guys before doing the selection + + However, the same result can be obtained by embedding an + eoTruncatedSelectOne into an eoSelectMany ... + + @ingroup Selectors +*/ +template +class eoTruncatedSelectMany : public eoSelect +{ + public: + /// Ctor + eoTruncatedSelectMany(eoSelectOne& _select, + double _rateGenitors, double _rateFertile, + bool _interpret_as_rateG = true, + bool _interpret_as_rateF = true) + : select(_select), + howManyGenitors(_rateGenitors, _interpret_as_rateG), + howManyFertile(_rateFertile, _interpret_as_rateF) {} + + // Ctor with eoHowManys + eoTruncatedSelectMany(eoSelectOne& _select, + eoHowMany _howManyGenitors, eoHowMany _howManyFertile) + : select(_select), howManyGenitors(_howManyGenitors), + howManyFertile(_howManyFertile) {} + + /** + The implementation repeatidly selects an individual + + @param _source the source population + @param _dest the resulting population (size of this population is the number of times eoSelectOne is called. It empties the destination and adds the selection into it) + */ + virtual void operator()(const eoPop& _source, eoPop& _dest) + { + unsigned target = howManyGenitors(_source.size()); + + _dest.resize(target); + + unsigned nbFertile = howManyFertile(_source.size()); + + //revert to standard selection (see eoSelectMany) if no truncation + if (nbFertile == _source.size()) + { + select.setup(_source); + + for (size_t i = 0; i < _dest.size(); ++i) + _dest[i] = select(_source); + } + else + { + // at the moment, brute force (rush rush, no good) + // what we would need otherwise is a std::vector class + // and selectors that act on such a thing + eoPop tmpPop = _source; // hum hum, could be a pain in the ass + + tmpPop.sort(); // maybe we could only do partial sort? + tmpPop.resize(nbFertile); // only the best guys here now + tmpPop.shuffle(); // as some selectors are order-sensitive + + select.setup(tmpPop); + + for (size_t i = 0; i < _dest.size(); ++i) + _dest[i] = select(tmpPop); + } + } + +private : + eoSelectOne& select; // selector for one guy + eoHowMany howManyGenitors; // number of guys to select + eoHowMany howManyFertile; // number of fertile guys +}; + +#endif diff --git a/trunk/eo/src/eoTruncatedSelectOne.h b/trunk/eo/src/eoTruncatedSelectOne.h new file mode 100644 index 000000000..e86cce81d --- /dev/null +++ b/trunk/eo/src/eoTruncatedSelectOne.h @@ -0,0 +1,112 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoTruncatedSelectOne.h + (c) Maarten Keijzer, Marc Schoenauer, GeNeura Team, 2002 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoTruncatedSelectOne_h +#define _eoTruncatedSelectOne_h + + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** eoTruncatedSelectOne selects one individual using eoSelectOne as it's + mechanism. Therefore eoTruncatedSelectOne needs an eoSelectOne in its ctor + + It will perform selection only from the top guys in the population. + + @ingroup Selectors +*/ +template +class eoTruncatedSelectOne : public eoSelectOne +{ +public: + /** Ctor from rate and bool */ + eoTruncatedSelectOne(eoSelectOne& _select, + double _rateFertile, + bool _interpret_as_rateF = true) + : select(_select), + howManyFertile(_rateFertile, _interpret_as_rateF), + tmpPop(), actualPop(tmpPop) + {} + + /** Ctor with eoHowMany */ + eoTruncatedSelectOne(eoSelectOne& _select, + eoHowMany _howManyFertile) + : select(_select), howManyFertile(_howManyFertile), + tmpPop(), actualPop(tmpPop) + {} + + + /** setup procedures: fills the temporary population with the fertile guys */ + void setup(const eoPop& _source) + { + unsigned fertile = howManyFertile(_source.size()); + if (fertile == _source.size()) // noting to do, all are fertile + { + actualPop = _source; + } + else + { + // copy only best ferile to actualPop + tmpPop.resize(fertile); + std::vector result; + _source.nth_element(fertile, result); + for (unsigned i=0; i& _pop) + { + return select(actualPop); + } + + +private : + eoSelectOne& select; // selector for one guy + eoHowMany howManyFertile; // number of fertile guys + eoPop tmpPop; // intermediate population - fertile guys + eoPop & actualPop; // to avoid copies when 100% fertility +}; + +#endif diff --git a/trunk/eo/src/eoTwoOptMutation.h b/trunk/eo/src/eoTwoOptMutation.h new file mode 100644 index 000000000..054f223ea --- /dev/null +++ b/trunk/eo/src/eoTwoOptMutation.h @@ -0,0 +1,86 @@ +//----------------------------------------------------------------------------- +// eoTwoOptMutation.h +// (c) GeNeura Team, 2000 - EEAAX 2000 - Maarten Keijzer 2000 +// (c) INRIA Futurs - Dolphin Team - Thomas Legrand 2007 +/* +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: todos@geneura.ugr.es, http://geneura.ugr.es +thomas.legrand@lifl.fr +Marc.Schoenauer@polytechnique.fr +mak@dhi.dk +*/ +//----------------------------------------------------------------------------- + +#ifndef eoTwoOptMutation_h +#define eoTwoOptMutation_h + +//----------------------------------------------------------------------------- + + +/** +* Especially designed for combinatorial problem such as the TSP. +* +* @ingroup Variators +*/ +template class eoTwoOptMutation: public eoMonOp +{ +public: + + typedef typename EOT::AtomType GeneType; + + /// CTor + eoTwoOptMutation(){} + + /// The class name. + virtual std::string className() const { return "eoTwoOptMutation"; } + + /** + * + * @param _eo The cromosome which is going to be changed. + */ + bool operator()(EOT& _eo) { + // generate two different indices + unsigned i(eo::rng.random(_eo.size())); + unsigned j; + do { + j = eo::rng.random(_eo.size()); + } while(i == j); + unsigned from(std::min(i,j)); + unsigned to(std::max(i,j)); + unsigned idx((to - from)/2); + + // inverse between from and to + for(unsigned k = 0; k <= idx; ++k) + std::swap(_eo[from+k],_eo[to-k]); + return true; + } + +}; +/** @example t-eoTwoOptMutation.cpp + */ + + +//----------------------------------------------------------------------------- +#endif + + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-offsets: ((c . 0)) +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/eo/src/eoVariableInertiaWeightedVelocity.h b/trunk/eo/src/eoVariableInertiaWeightedVelocity.h new file mode 100644 index 000000000..a926feee8 --- /dev/null +++ b/trunk/eo/src/eoVariableInertiaWeightedVelocity.h @@ -0,0 +1,198 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoVariableInertiaWeightedVelocity.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOVARIABLEINERTIAWEIGHTEDVELOCITY_H +#define EOVARIABLEINERTIAWEIGHTEDVELOCITY_H + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + + + +/** Inertia variable weight based velocity for particle swarm optimization. Derivated from abstract eoVelocity, +* At step t: v(t+1)= w*v(t) + c1*r1* ( xbest(t)-x(t) ) + c2*r2* ( gbest(t) - x(t) ) +* w is updated each time the velocity performer is called. +* (ci given and Ri chosen at random in [0;1]). +* +* @ingroup Core +* @ingroup Variators +*/ +template < class POT > class eoVariableInertiaWeightedVelocity:public eoVelocity < POT > +{ + +public: + + /* + * Each element for the velocity evaluation is expected to be of type VelocityType. + */ + typedef typename POT::ParticleVelocityType VelocityType; + + /** Full constructor: Bounds and bound modifier required + * @param _topology - The topology to get the global/local/other best + * @param _weightUpdater - An eoWeightUpdater used to update the inertia weight + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only). + * @param _gen - The eo random generator, default=rng + */ + eoVariableInertiaWeightedVelocity (eoTopology < POT > & _topology, + eoWeightUpdater & _weightUpdater, + const VelocityType & _c1, + const VelocityType & _c2 , + eoRealVectorBounds & _bounds, + eoRealBoundModifier & _bndsModifier, + eoRng & _gen = rng): + topology(_topology), + weightUpdater(_weightUpdater), + c1 (_c1), + c2 (_c2), + bounds(_bounds), + bndsModifier(_bndsModifier), + gen(_gen){} + + + /** Constructor: No bound updater required <-> fixed bounds + * @param _topology - The topology to get the global/local/other best + * @param _weightUpdater - An eoWeightUpdater used to update the inertia weight + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities. + * If the velocities are not real, they won't be bounded by default. Should have a eoBounds ? + * @param _gen - The eo random generator, default=rng + */ + eoVariableInertiaWeightedVelocity (eoTopology < POT > & _topology, + eoWeightUpdater & _weightUpdater, + const VelocityType & _c1, + const VelocityType & _c2, + eoRealVectorBounds & _bounds, + eoRng & _gen = rng): + topology(_topology), + weightUpdater(_weightUpdater), + c1 (_c1), + c2 (_c2), + bounds(_bounds), + bndsModifier(dummyModifier), + gen(_gen){} + + + /** Constructor: Neither bounds nor bound updater required <-> free velocity + * @param _topology - The topology to get the global/local/other best + * @param _weightUpdater - An eoWeightUpdater used to update the inertia weight + * @param _c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType + * @param _c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType + * @param _gen - The eo random generator, default=rng + */ + eoVariableInertiaWeightedVelocity (eoTopology < POT > & _topology, + eoWeightUpdater & _weightUpdater, + const VelocityType & _c1, + const VelocityType & _c2, + eoRng & _gen = rng): + topology(_topology), + weightUpdater(_weightUpdater), + c1 (_c1), + c2 (_c2), + bounds(*(new eoRealVectorNoBounds(0))), + bndsModifier(dummyModifier), + gen(_gen) + {} + + /** + * Evaluate the new velocities of the given particle. Need an indice to identify the particle + * into the topology. Steps are : + * - evaluate r1 and r2, the customed learning factors + * - adjust the size of the bounds (even if dummy) + * - update the weight with the weightUpdater (use the dummy updater if there's no updater provided) + * - modify the bounds with the bounds modifier (use the dummy modifier if there's no modifier provided) + * @param _po - A particle + * @param _indice - The indice (into the topology) of the given particle + */ + void operator () (POT & _po,unsigned _indice) + { + VelocityType r1; + VelocityType r2; + + VelocityType newVelocity; + + // cast the learning factors to VelocityType + r1 = (VelocityType) rng.uniform (1) * c1; + r2 = (VelocityType) rng.uniform (1) * c2; + + // need to resize the bounds even if there are dummy because of "isBounded" call + bounds.adjust_size(_po.size()); + + // update the inertia weight + weightUpdater(weight); + + // assign the new velocities + for (unsigned j = 0; j < _po.size (); j++) + { + newVelocity= weight * _po.velocities[j] + r1 * (_po.bestPositions[j] - _po[j]) + r2 * (topology.best (_indice)[j] - _po[j]); + + /* modify the bounds */ + bndsModifier(bounds,j); + + /* check bounds */ + if (bounds.isMinBounded(j)) + newVelocity=(VelocityType)std::max(newVelocity,bounds.minimum(j)); + if (bounds.isMaxBounded(j)) + newVelocity=(VelocityType)std::min(newVelocity,bounds.maximum(j)); + + _po.velocities[j]=newVelocity; + } + } + + /** + * Update the neighborhood. + */ + void updateNeighborhood(POT & _po,unsigned _indice) + { + topology.updateNeighborhood(_po,_indice); + } + + + +protected: + eoTopology < POT > & topology; + eoWeightUpdater & weightUpdater; // the updater used to make the weight evoluate + const VelocityType & c1; // learning factor 1 + const VelocityType & c2; // learning factor 2 + + eoRealVectorBounds & bounds; // REAL bounds even if the velocity could be of another type. + eoRealBoundModifier & bndsModifier; + + VelocityType weight; + eoRng & gen; // the random generator + + // If the bound modifier doesn't need to be used, use the dummy instance + eoDummyRealBoundModifier dummyModifier; +}; + +#endif /*EOVARIABLEINERTIAWEIGHTEDVELOCITY_H*/ diff --git a/trunk/eo/src/eoVariableLengthCrossover.h b/trunk/eo/src/eoVariableLengthCrossover.h new file mode 100644 index 000000000..510fc9b03 --- /dev/null +++ b/trunk/eo/src/eoVariableLengthCrossover.h @@ -0,0 +1,352 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoVariableLengthCrossover.h +// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@cs.vu.nl + */ +//----------------------------------------------------------------------------- + +#ifndef _eoVariableLengthCrossover_h +#define _eoVariableLengthCrossover_h + +#include +#include + +/** + Base classes for generic crossovers on variable length chromosomes. + +Basically, they exchange genes - we need some matching information to apply +atom crossover +*/ + +/** @addtogroup Variators + * @{ + */ + +/** A helper class for choosing which genes to exchange */ +template +class eoAtomExchange : public eoBF +{ +public: + /** a function to initlialize - to be called before every crossover */ + virtual void randomize(unsigned int, unsigned int){} + /** the inherited className() */ + virtual std::string className() const=0; +}; + +/** Uniform crossover - well, not really, efficient for FixedLength */ +template +class eoUniformAtomExchange: public eoAtomExchange +{ +public: + eoUniformAtomExchange(double _rate=0.5):rate(_rate){} + + /** randomize: fill the mask: the exchange will be simulated first + * to see if sizes are OK, so it must be repeatable : + * the mask has to be a private data, cannot be computed on the fly + */ + void randomize(unsigned _size1, unsigned _size2) + { + mask.resize(_size1 + _size2); + for (unsigned i=0; i<_size1+_size2; i++) + mask[i]=eo::rng.flip(rate); + } + + /** the operator() simply returns the mask booleans in turn */ + bool operator()(unsigned _i, Atom & ) + { + return mask[_i]; + } + + /** inherited className() */ + virtual std::string className() const {return "eoUniformAtomExchange";} + +private: + double rate; + std::vector mask; +}; + +///////////////////////////////////////////////////////////////////// +////// Now the operators themsleves +///////////////////////////////////////////////////////////////////// + +/** Exchange Crossover using an AtomExchange + */ +template +class eoVlAtomExchangeQuadOp : public eoQuadOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires bounds on number of genes + a rate */ + eoVlAtomExchangeQuadOp(unsigned _Min, unsigned _Max, + eoAtomExchange& _atomExchange): + Min(_Min), Max(_Max), atomExchange(_atomExchange) {} + + bool operator()(EOT & _eo1, EOT & _eo2) + { + EOT tmp1, tmp2; // empty individuals + unsigned index=0; + // main loop: until sizes are OK, do only simulated exchange + unsigned i, i1, i2; + do { + // "initialize the AtomExchange + atomExchange.randomize(_eo1.size(), _eo2.size()); + // simulate crossover + i1=i2=0; + for (i=0; i<_eo1.size(); i++) + { + if (atomExchange(i, _eo1[i])) + i1++; + else + i2++; + } + for (i=0; i<_eo2.size(); i++) + { + if (atomExchange(i, _eo2[i])) + i2++; + else + i1++; + } + index++; + } while ( ( (i1Max) || (i2>Max) ) + && (index<10000) ); + if (index >= 10000) + { + eo::log << eo::warnings << "Warning: impossible to generate individual of the right size in 10000 trials" << std::endl; + return false; + } + // here we know we have the right sizes: do the actual exchange + for (i=0; i<_eo1.size(); i++) + { + if (atomExchange(i, _eo1[i])) + tmp1.push_back(_eo1[i]); + else + tmp2.push_back(_eo1[i]); + } + for (i=0; i<_eo2.size(); i++) + { + if (atomExchange(i, _eo2[i])) + tmp2.push_back(_eo2[i]); + else + tmp1.push_back(_eo2[i]); + } + // and put everything back in place + _eo1.swap(tmp1); + _eo2.swap(tmp2); + return true; // should we test that? Yes, but no time now + } + + /** the inherited className */ + virtual std::string className() const + { + std::ostringstream os; + os << "eoVlAtomExchangeQuadOp(" << atomExchange.className() << ")"; + return os.str(); + } + +private: + unsigned Min, Max; + eoAtomExchange & atomExchange; +}; + +/** Crossover using an AtomCrossover. Probably irrelevant in Variable Length - + see eoFlOrBinOp.h and eoFlOrQuadOp.h for the similar Fixed Length operators + */ +template +class eoInnerExchangeQuadOp : public eoQuadOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor: requires bounds on number of genes + a rate */ + eoInnerExchangeQuadOp( eoQuadOp& _op, float _rate = 0.5): + op(_op), rate( _rate ) {} + + /** performs the Atom crossover */ + bool operator()(EOT & _eo1, EOT & _eo2) + { + unsigned size1 = _eo1.size(), size2 = _eo2.size(), minsize = ( size1 > size2)?size2:size1; + bool changed = false; + for ( unsigned i = 0; i < minsize; i ++ ) { + if ( rng.flip( rate ) ) { + bool changedHere = op( _eo1[i], _eo2[i] ); + changed |= changedHere; + } + } + return changed; // should we test that? Yes, but no time now + } + + virtual std::string className() const + { + return "eoInnerExchangeQuadOp(" + op.className() + ")"; + } + +private: + float rate; + eoQuadOp & op; +}; + + + + +/** Direct Uniform Exchange of genes (obsolete, already :-) stays there for historical reasons + +A very primitive version, that does no verification at all!!! +NEEDS to be improved - but no time now :-((( +Especially, if both guys have maximal size, it will take a lot of time +to generate 2 offspring that both are not oversized!!! +Also, we should first check for identical atoms, and copy them to the +offspring, and only after that exchange the other ones (Radcliffe's RRR). + */ +template +class eoVlUniformQuadOp : public eoQuadOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + // default ctor: requires bounds on number of genes + a rate + eoVlUniformQuadOp(unsigned _Min, unsigned _Max, double _rate=0.5) : + Min(_Min), Max(_Max), rate(_rate) {} + + bool operator()(EOT & _eo1, EOT & _eo2) + { + unsigned i; + EOT tmp1, tmp2; + unsigned index=0; + do { + for (i=0; i<_eo1.size(); i++) + { + if (eo::rng.flip(rate)) + tmp1.push_back(_eo1[i]); + else + tmp2.push_back(_eo1[i]); + // here we should look for _eo1[i] inside _eo2 and erase it if found! + } + for (i=0; i<_eo2.size(); i++) + { + if (eo::rng.flip(rate)) + tmp1.push_back(_eo2[i]); + else + tmp2.push_back(_eo2[i]); + } + index++; + } while ( ( (tmp1.size()Max) || (tmp2.size()>Max) ) + && (index<10000) ); + //! @todo FIXME bad hardcoded limit, should use an algorithm that guarantee a correct size in a finite number of tries + if (index >= 10000) + { + eo::log << eo::warnings << "Warning: impossible to generate individual of the right size in 10000 trials" << std::endl; + return false; + } + + _eo1.swap(tmp1); + _eo2.swap(tmp2); + return true; // should we test that? + } +private: + unsigned Min, Max; + double rate; +}; + + +/** Direct Uniform Exchange of genes for Variable Length, BINARY version + +A very primitive version, that does no verification at all!!! +NEEDS to be improved - but no time now :-((( +Especially, if both guys have maximal size, it will take some time +to generate even 1 offspring that is not oversized!!! +Also, we should first check for identical atoms, and copy them to the +offspring, and only after that exchange the other ones (Radcliffe's RRR). + */ +template +class eoVlUniformBinOp : public eoBinOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + // default ctor: requires bounds on number of genes + a rate + eoVlUniformBinOp(unsigned _Min, unsigned _Max, double _rate=0.5) : + Min(_Min), Max(_Max), rate(_rate) {} + + bool operator()(EOT & _eo1, const EOT & _eo2) + { + unsigned i; + EOT tmp1; + bool tmpIsOne=true, tmpIsTwo=true; + unsigned index=0; + do { + for (i=0; i<_eo1.size(); i++) + { + if (eo::rng.flip(rate)) + { + tmp1.push_back(_eo1[i]); + tmpIsTwo = false; + } + else + tmpIsOne=false; + // we should look for _eo1[i] inside _eo2 and erase it there if found! + } + for (i=0; i<_eo2.size(); i++) + { + if (! eo::rng.flip(rate)) + { + tmp1.push_back(_eo2[i]); + tmpIsOne = false; + } + else + tmpIsTwo = false; + } + index++; + } while ( ( (tmp1.size()Max) ) + && (index<10000) ); + // this while condition is not optimal, as it may take some time, see the FIXME above + if (index >= 10000) + { + eo::log << eo::warnings << "Warning: impossible to generate individual of the right size in 10000 trials" << std::endl; + return false; + } + + _eo1.swap(tmp1); + if (tmpIsTwo) + { + // _eo1.fitness(_eo2.fitness()); NO FITNESS EXISTS HERE! + return false; + } + if (tmpIsOne) // already has the right fitness + { // WRONG: NO FITNESS EXISTS HERE! + return false; + } + return true; // there were some modifications... + } + +private: + unsigned Min, Max; + double rate; +}; + +/** @} */ +#endif diff --git a/trunk/eo/src/eoVariableLengthMutation.h b/trunk/eo/src/eoVariableLengthMutation.h new file mode 100644 index 000000000..542541d70 --- /dev/null +++ b/trunk/eo/src/eoVariableLengthMutation.h @@ -0,0 +1,160 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoVariableLengthMutation.h +// (c) Marc Schoenauer 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@cs.vu.nl + */ +//----------------------------------------------------------------------------- + +#ifndef _eoVariableLengthMutation_h +#define _eoVariableLengthMutation_h + +#include +#include +#include + +/** + Base classes for generic mutations on variable length chromosomes. + Contains addition and deletion of a gene + + The generic mutations that apply a gene-level mutation to some genes + dont't modify the length, and so are NOT specific to variable-length + Hence they are in file eoFlOr MonOp.h file (FixedLengthOrdered mutations) +*/ + +/* @addtogroup Variators + * @{ + */ + +/** Addition of a gene + Is inserted at a random position - so can be applied to both + order-dependent and order-independent + */ +template +class eoVlAddMutation : public eoMonOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** default ctor + + * @param _nMax max number of atoms + * @param _atomInit an Atom initializer + */ + eoVlAddMutation(unsigned _nMax, eoInit & _atomInit) : + nMax(_nMax), atomInit(_atomInit) {} + + /** operator: actually adds an Atom */ + bool operator()(EOT & _eo) + { + if (_eo.size() >= nMax) + return false; // unmodifed + AtomType atom; + atomInit(atom); + unsigned pos = rng.random(_eo.size()+1); + _eo.insert(_eo.begin()+pos, atom); + return true; + } + + /** inherited className */ + virtual std::string className() const { return "eoVlAddMutation"; } + +private: + unsigned nMax; + eoInit & atomInit; +}; + + +/** A helper class for choosing which site to delete */ +template +class eoGeneDelChooser : public eoUF +{ +public: + virtual std::string className() const =0; + +}; + +/** Uniform choice of gene to delete */ +template +class eoUniformGeneChooser: public eoGeneDelChooser +{ +public: + eoUniformGeneChooser(){} + unsigned operator()(EOT & _eo) + { + return eo::rng.random(_eo.size()); + } + virtual std::string className() const { return "eoUniformGeneChooser"; } +}; + +/** Deletion of a gene + By default at a random position, but a "chooser" can be specified + can of course be applied to both order-dependent and order-independent + */ +template +class eoVlDelMutation : public eoMonOp +{ +public : + + typedef typename EOT::AtomType AtomType; + + /** ctor with an external gene chooser + + * @param _nMin min number of atoms to leave in the individual + * @param _chooser an eoGeneCHooser to choose which one to delete + */ + eoVlDelMutation(unsigned _nMin, eoGeneDelChooser & _chooser) : + nMin(_nMin), uChooser(), chooser(_chooser) {} + + /** ctor with uniform gene chooser - the default + + * @param _nMin min number of atoms to leave in the individual + */ + eoVlDelMutation(unsigned _nMin) : + nMin(_nMin), uChooser(), chooser(uChooser) {} + + /** Do the job (delete one gene) + * @param _eo the EO to mutate + */ + bool operator()(EOT & _eo) + { + if (_eo.size() <= nMin) + return false; // unmodifed + unsigned pos = chooser(_eo); + _eo.erase(_eo.begin()+pos); + return true; + } + + virtual std::string className() const + { + std::ostringstream os; + os << "eoVlDelMutation("< uChooser; + eoGeneDelChooser & chooser; +}; + +/** @} */ +#endif diff --git a/trunk/eo/src/eoVector.h b/trunk/eo/src/eoVector.h new file mode 100644 index 000000000..fce05d117 --- /dev/null +++ b/trunk/eo/src/eoVector.h @@ -0,0 +1,169 @@ +/* (C) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: eodev-main@lists.sourceforge.net +Old contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk +*/ + +#ifndef _eoVector_h +#define _eoVector_h + +#include +#include +#include +#include + + +/** + @defgroup Representations Representations + + Solution to a given optimization problem are using a given representation, and are called individuals. + + Some of the most classical representations are proposed, but you can create your own one, providing + that it inherits from the EO base class. It will be used as a template parameter in almost all operators. + + @{ +*/ + +/** Base class for fixed length chromosomes + +It just derives from EO and std::vector and redirects the smaller than +operator to EO (fitness based comparison). + +GeneType must have the following methods: void ctor (needed for the +std::vector<>), copy ctor, + +*/ +template +class eoVector : public EO, public std::vector +{ +public: + + using EO::invalidate; + using std::vector::operator[]; + using std::vector::begin; + using std::vector::end; + using std::vector::resize; + using std::vector::size; + + typedef GeneType AtomType; + typedef std::vector ContainerType; + + /** default constructor + + @param _size Length of vector (default is 0) + @param _value Initial value of all elements (default is default value of type GeneType) + */ + eoVector(unsigned _size = 0, GeneType _value = GeneType()) + : EO(), std::vector(_size, _value) + {} + + /// copy ctor abstracting from the FitT + template + eoVector(const eoVector& _vec) : std::vector(_vec) + {} + + // we can't have a Ctor from a std::vector, it would create ambiguity + // with the copy Ctor + void value(const std::vector& _v) + { + if (_v.size() != size()) // safety check + { + if (size()) // NOT an initial empty std::vector + eo::log << eo::warnings << "Warning: Changing size in eoVector assignation" << std::endl; + resize(_v.size()); + } + + std::copy(_v.begin(), _v.end(), begin()); + invalidate(); + } + + /// to avoid conflicts between EO::operator< and std::vector::operator< + bool operator<(const eoVector& _eo) const + { + return EO::operator<(_eo); + } + + /// printing... + virtual void printOn(std::ostream& os) const + { + EO::printOn(os); + os << ' '; + + os << size() << ' '; + + std::copy(begin(), end(), std::ostream_iterator(os, " ")); + } + + /// reading... + virtual void readFrom(std::istream& is) + { + EO::readFrom(is); + + unsigned sz; + is >> sz; + + resize(sz); + unsigned i; + + for (i = 0; i < sz; ++i) + { + AtomType atom; + is >> atom; + operator[](i) = atom; + } + } +}; +/** @example t-eoVector.cpp + */ + +/** Less than + +This is impemented to avoid conflicts between EO::operator< and +std::vector::operator< +*/ +template +bool operator<(const eoVector& _eo1, const eoVector& _eo2) +{ + return _eo1.operator<(_eo2); +} + + +/** Greater than + +This is impemented to avoid conflicts between EO::operator> and +std::vector::operator> +*/ +template +bool operator>(const eoVector& _eo1, const eoVector& _eo2) +{ + return _eo1.operator>(_eo2); +} + + +#endif + +/** @} */ + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-offsets: ((c . 0)) +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/eo/src/eoVectorParticle.h b/trunk/eo/src/eoVectorParticle.h new file mode 100644 index 000000000..25cfcc9fa --- /dev/null +++ b/trunk/eo/src/eoVectorParticle.h @@ -0,0 +1,155 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoVectorParticle.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _EOVECTORPARTICLE_H +#define _EOVECTORPARTICLE_H + +#include + + +/** + @addtogroup Representations + @{ +*/ + +/** + * Main class for particle representation of particle swarm optimization. The positions, velocities and the best positions + * associated to the particle are stored as vectors. Inheriting from PO and std::vector, + * tree templates arguments are required: the fitness type (which is also the type of the + * particle's best fitness), the position type and the velocity type. + */ +template < class FitT, class PositionType, class VelocityType > class eoVectorParticle:public PO < FitT >, + public std::vector < + PositionType > +{ + +public: + + using PO < FitT >::invalidate; + using + std::vector < + PositionType >::operator[]; + using + std::vector < + PositionType >::begin; + using + std::vector < + PositionType >::end; + using + std::vector < + PositionType >::size; + + typedef PositionType AtomType; + typedef VelocityType ParticleVelocityType; + + + /** Default constructor. + * @param _size Length of the tree vectors (we expect the same size), default is 0 + * @param _position + * @param _velocity + * @param _bestPositions + */ + eoVectorParticle (unsigned _size = 0,PositionType _position = PositionType (), VelocityType _velocity = VelocityType (), PositionType _bestPositions = PositionType ()):PO < FitT > (),std::vector < PositionType > (_size, _position), bestPositions (_size, _bestPositions), velocities (_size, + _velocity) + { + } + + + // we can't have a Ctor from a std::vector, it would create ambiguity + // with the copy Ctor + void + position (const std::vector < PositionType > &_v) + { + if (_v.size () != size ()) // safety check + { + if (size ()) // NOT an initial empty std::vector + eo::log << eo::warnings << + "Warning: Changing position size in eoVectorParticle assignation" + << std::endl; + resize (_v.size ()); + } + + std::copy (_v.begin (), _v.end (), begin ()); + invalidate (); + } + + /** Resize the tree vectors of the particle: positions, velocities and bestPositions + * @param _size The new size for positions, velocities and bestPositions + */ + void + resize (unsigned _size) + { + std::vector < PositionType >::resize (_size); + bestPositions.resize (_size); + velocities.resize (_size); + } + + + /** Resize the best positions. + * @param _size The new size for the best positions. + */ + void + resizeBestPositions (unsigned _size) + { + bestPositions.resize (_size); + } + + + /** Resize the velocities. + * @param _size The new size for the velocities. + */ + void + resizeVelocities (unsigned _size) + { + velocities.resize (_size); + } + + /// to avoid conflicts between EA and PSO + bool operator<(const eoVectorParticle& _eo) const + { + if (_eo.best() > this->best()) + return true; + else + return false; + } + + /** + * Print-on a vector-particle + */ + virtual void printOn(std::ostream& os) const + { + PO::printOn(os); + os << ' '; + os << size() << ' '; + std::copy(bestPositions.begin(), bestPositions.end(), std::ostream_iterator(os, " ")); + } + + /* public attributes */ + std::vector < PositionType > bestPositions; + std::vector < ParticleVelocityType > velocities; + +}; + +#endif /*_EOVECTORPARTICLE_H*/ +/** @} */ diff --git a/trunk/eo/src/eoVelocity.h b/trunk/eo/src/eoVelocity.h new file mode 100644 index 000000000..e388078c1 --- /dev/null +++ b/trunk/eo/src/eoVelocity.h @@ -0,0 +1,80 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoVelocity.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOVELOCITY_H +#define EOVELOCITY_H + +//----------------------------------------------------------------------------- +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** + * Abstract class for velocities calculation (particle swarm optimization). + * All the velocities must derivated from eoVelocity. + * + * @ingroup Variators + */ +template < class POT > class eoVelocity:public eoBF < POT &,unsigned , void > +{ +public: + /** + * Apply the velocity computation to a whole given population. + * Used for synchronous PSO. + */ + virtual void apply (eoPop < POT > &_pop) + { + for (unsigned i = 0; i < _pop.size (); i++) + { + this->operator ()(_pop[i],i); + } + + } + + /** + * Update the neighborhood of the given particle. + */ + virtual void updateNeighborhood(POT & ,unsigned /*_indice*/){} + + + /** + * Apply the neighborhood with a whole population (used for distributed or synchronous PSO). + */ + virtual void updateNeighborhood (eoPop < POT > &_pop) + { + for (unsigned i = 0; i < _pop.size (); i++) + { + updateNeighborhood(_pop[i],i); + } + + } + + + virtual eoTopology & getTopology () = 0; + +}; + +#endif /*EOVELOCITY_H_H */ diff --git a/trunk/eo/src/eoVelocityInit.h b/trunk/eo/src/eoVelocityInit.h new file mode 100644 index 000000000..8c57a6891 --- /dev/null +++ b/trunk/eo/src/eoVelocityInit.h @@ -0,0 +1,146 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoVelocityInit.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOVELOCITYINIT_H +#define EOVELOCITYINIT_H + + +#include + +#include +#include +#include + +/** + @addtogroup Initializators + @{ + */ + +/** Abstract class for velocities initilization of particle swarm optimization.*/ +template < class POT > class eoVelocityInit:public eoInit < POT > +{ +public: + virtual std::string className (void) const + { + return "eoVelocityInit"; + } +}; + + +/** +* Provides a particle initialized thanks to the eoVelocityInit object given. +*/ +template < class POT > class eoVelocityInitGenerator:public eoF < POT > +{ +public: + + /** Ctor from a plain eoVelocityInit */ + eoVelocityInitGenerator (eoVelocityInit < POT > &_init):init (_init){} + + virtual POT operator () () + { + POT p; + init (p); + return (p); + } + +private: + eoVelocityInit < POT > &init; +}; + +/** + Initializer for fixed length velocities with a single type +*/ +template < class POT > class eoVelocityInitFixedLength:public eoVelocityInit < + POT > +{ +public: + + typedef typename POT::ParticleVelocityType VelocityType; + + eoVelocityInitFixedLength (unsigned _combien, + eoRndGenerator < VelocityType > + &_generator):combien (_combien), + generator (_generator) + { + } + + virtual void operator () (POT & chrom) + { + chrom.resize (combien); + std::generate (chrom.velocities.begin (), chrom.velocities.end (), + generator); + } + +private: + unsigned combien; + /// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics + eoSTLF < VelocityType > generator; +}; + +/** + Initializer for variable length velocitys with a single type +*/ +template < class POT > class eoVelocityInitVariableLength:public eoVelocityInit < + POT > +{ +public: + typedef typename POT::ParticleVelocityType VelocityType; + + /** Ctor from an eoVelocityInit */ + eoVelocityInitVariableLength (unsigned _minSize, unsigned _maxSize, + eoVelocityInit < VelocityType > + &_init):offset (_minSize), + extent (_maxSize - _minSize), init (_init) + { + if (_minSize >= _maxSize) + throw std:: + logic_error + ("eoVelocityInitVariableLength: minSize larger or equal to maxSize"); + } + + + virtual void operator () (POT & _chrom) + { + _chrom.resizeVelocities (offset + rng.random (extent)); + typename std::vector < VelocityType >::iterator it; + for (it = _chrom.velocities.begin (); it < _chrom.velocities.end (); it++) + init (*it); + } + + // accessor to the atom initializer (needed by operator constructs sometimes) + eoInit < VelocityType > &atomInit () + { + return init; + } + +private: + unsigned offset; + unsigned extent; + eoVelocityInit < VelocityType > &init; +}; + +#endif /*EOVELOCITYINIT_H */ + +/** @} */ diff --git a/trunk/eo/src/eoWeightUpdater.h b/trunk/eo/src/eoWeightUpdater.h new file mode 100644 index 000000000..d4970eca4 --- /dev/null +++ b/trunk/eo/src/eoWeightUpdater.h @@ -0,0 +1,41 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoWeightUpdater.h +// (c) OPAC 2007 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: thomas.legrand@lifl.fr + */ +//----------------------------------------------------------------------------- + +#ifndef EOWEIGHTUPDATER_H +#define EOWEIGHTUPDATER_H + +//----------------------------------------------------------------------------- +#include +//----------------------------------------------------------------------------- + +/** + * Abstract class for (inertia) weight updater (particle swarm optimization). + * Used inside classes extending eoVelocity. + * + * @ingroup Core + */ +template < class WeightType > class eoWeightUpdater: public eoUF < WeightType &, void > {}; + + +#endif/*EOWEIGHTUPDATER_H*/ diff --git a/trunk/eo/src/es.h b/trunk/eo/src/es.h new file mode 100644 index 000000000..d5dffc2f3 --- /dev/null +++ b/trunk/eo/src/es.h @@ -0,0 +1,63 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// es.h +// (c) GeNeura Team 1998 - Maarten Keijzer 2000 - Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#ifndef _es_h +#define _es_h + +// contains the include specific to real representations, i.e. in src/es dir +//----------------------------------------------------------------------------- + +// the genotypes - from plain std::vector to full correlated mutation +#include +#include +#include +#include + +// the initialization +#include + +// general operators +#include +#include +#include // for generic operators + +// SBX crossover (following Deb) +#include + +// ES specific operators +#include // Global ES Xover +#include // 2-parents ES Xover + +// the ES-mutations +#include +#include + +#endif diff --git a/trunk/eo/src/es/CMAParams.cpp b/trunk/eo/src/es/CMAParams.cpp new file mode 100644 index 000000000..131edb72f --- /dev/null +++ b/trunk/eo/src/es/CMAParams.cpp @@ -0,0 +1,233 @@ +/* + * C++ification of Nikolaus Hansen's original C-source code for the + * CMA-ES + * + * C++-ificiation performed by Maarten Keijzer (C) 2005. Licensed under + * the LGPL. Original copyright of Nikolaus Hansen can be found below + * + * + * + */ + +/* --------------------------------------------------------- */ +/* --------------------------------------------------------- */ +/* --- File: cmaes.c -------- Author: Nikolaus Hansen --- */ +/* --------------------------------------------------------- */ +/* + * CMA-ES for non-linear function minimization. + * + * Copyright (C) 1996, 2003 Nikolaus Hansen. + * e-mail: hansen@bionik.tu-berlin.de + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version (see http://www.gnu.org/copyleft/lesser.html). + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * */ +/* --- Changes : --- + * 03/03/21: argument const double *rgFunVal of + * cmaes_ReestimateDistribution() was treated incorrectly. + * 03/03/29: restart via cmaes_resume_distribution() implemented. + * 03/03/30: Always max std dev / largest axis is printed first. + * 03/08/30: Damping is adjusted for large mueff. + * 03/10/30: Damping is adjusted for large mueff always. + * 04/04/22: Cumulation time and damping for step size adjusted. + * No iniphase but conditional update of pc. + * Version 2.23. + * */ + +#include +#include + +#include + +using namespace std; + +namespace eo { + +CMAParams::CMAParams(eoParser& parser, unsigned dimensionality) { + + string section = "CMA parameters"; + + n = parser.createParam(dimensionality, "dimensionality", "Dimensionality (N) of the problem", 'N', section, dimensionality == 0).value(); + + maxgen = parser.createParam( + 1000, + "max-gen", + "Maximum number of generations that the system will run (needed for damping)", + 'M', + section).value(); + + + if (n == 0) { + return; + } + + defaults(n, maxgen); + + /* handle lambda */ + lambda = parser.createParam( + lambda, + "lambda", + "Number of offspring", + 'l', + section).value(); + + if (lambda < 2) { + lambda = 4+(int)(3*log((double) n)); + cerr << "Too small lambda specified, setting it to " << lambda << endl; + } + + /* handle mu */ + mu = parser.createParam( + mu, + "mu", + "Population size", + 'm', + section).value(); + + if (mu >= lambda) { + mu = lambda/2; + cerr << "Mu set larger/equal to lambda, setting it to " << mu << endl; + } + + /* handle selection weights */ + + int weight_type = parser.createParam( + 0, + "weighting", + "Weighting scheme (for 'selection'): 0 = logarithmic, 1 = equal, 2 = linear", + 'w', + section).value(); + + switch (weight_type) { + case 1: + { + for (unsigned i = 0; i < weights.size(); ++i) { + weights[i] = mu - i; + } + } + case 2: + { + weights = 1.; + } + default : + { + for (unsigned i = 0; i < weights.size(); ++i) { + weights[i] = log(mu+1.)-log(i+1.); + } + } + + } + + /* Normalize weights and set mu_eff */ + double sumw = weights.sum(); + mueff = sumw * sumw / (weights * weights).sum(); + weights /= sumw; + + + /* most of the rest depends on mu_eff, so needs to be set again */ + + /* set the others using Nikolaus logic. If you want to tweak, you can parameterize over these defaults */ + mucov = mueff; + ccumsig = (mueff + 2.) / (n + mueff + 3.); + ccumcov = 4. / (n + 4); + + double t1 = 2. / ((n+1.4142)*(n+1.4142)); + double t2 = (2.*mucov-1.) / ((n+2.)*(n+2.)+mucov); + t2 = (t2 > 1) ? 1 : t2; + t2 = (1./mucov) * t1 + (1.-1./mucov) * t2; + + ccov = t2; + + damp = 1 + std::max(0.3,(1.-(double)n/(double)maxgen)) + * (1+2*std::max(0.,sqrt((mueff-1.)/(n+1.))-1)) /* limit sigma increase */ + / ccumsig; + + vector mins(1,0.0); + mins = parser.createParam( + mins, + "min-stdev", + "Array of minimum stdevs, last one will apply for all remaining axes", + 0, + section).value(); + + if (mins.size() > n) mins.resize(n); + + if (mins.size()) { + minStdevs = mins.back(); + for (unsigned i = 0; i < mins.size(); ++i) { + minStdevs[i] = mins[i]; + } + } + + vector inits(1,0.3); + inits = parser.createParam( + inits, + "init-stdev", + "Array of initial stdevs, last one will apply for all remaining axes", + 0, + section).value(); + + if (inits.size() > n) inits.resize(n); + + if (inits.size()) { + initialStdevs = inits.back(); + for (unsigned i = 0; i < inits.size(); ++i) { + initialStdevs[i] = inits[i]; + } + } + +} + +void CMAParams::defaults(unsigned n_, unsigned maxgen_) { + n = n_; + maxgen = maxgen_; + + lambda = 4+(int)(3*log((double) n)); + mu = lambda / 2; + + weights.resize(mu); + + for (unsigned i = 0; i < weights.size(); ++i) { + weights[i] = log(mu+1.)-log(i+1.); + } + + /* Normalize weights and set mu_eff */ + double sumw = weights.sum(); + mueff = sumw * sumw / (weights * weights).sum(); + weights /= sumw; + + mucov = mueff; + ccumsig *= (mueff + 2.) / (n + mueff + 3.); + ccumcov = 4. / (n + 4); + + double t1 = 2. / ((n+1.4142)*(n+1.4142)); + double t2 = (2.*mucov-1.) / ((n+2.)*(n+2.)+mucov); + t2 = (t2 > 1) ? 1 : t2; + t2 = (1./mucov) * t1 + (1.-1./mucov) * t2; + + ccov = t2; + + damp = 1 + std::max(0.3,(1.-(double)n/maxgen)) + * (1+2*std::max(0.,sqrt((mueff-1.)/(n+1.))-1)) /* limit sigma increase */ + / ccumsig; + + minStdevs.resize(n); + minStdevs = 0.0; + + initialStdevs.resize(n); + initialStdevs = 0.3; + + +} + + +}// namespace eo diff --git a/trunk/eo/src/es/CMAParams.h b/trunk/eo/src/es/CMAParams.h new file mode 100644 index 000000000..905869040 --- /dev/null +++ b/trunk/eo/src/es/CMAParams.h @@ -0,0 +1,51 @@ +/* + * C++ification of Nikolaus Hansen's original C-source code for the + * CMA-ES. + * + * Copyright (C) 1996, 2003, Nikolaus Hansen + * (C) 2005, Maarten Keijzer + * + * License: LGPL + * + */ + +#ifndef CMAPARAMS_H__ +#define CMAPARAMS_H__ + +#include + +class eoParser; +namespace eo { + +class CMAParams { + + public: + + CMAParams() { /* Call this and all values need to be set by hand */ } + CMAParams(eoParser& parser, unsigned dimensionality = 0); // 0 dimensionality -> user needs to set it + + void defaults(unsigned n_, unsigned maxgen_); /* apply all defaults using n and maxgen */ + + unsigned n; + unsigned maxgen; + + unsigned lambda; /* -> mu */ + unsigned mu; /* -> weights, lambda */ + + std::valarray weights; /* <- mu, -> mueff -> mucov -> ccov */ + double mueff; /* <- weights */ + + double mucov; + + double damp; /* <- ccumsig, maxeval, lambda */ + double ccumsig; /* -> damp, <- N */ + double ccumcov; + double ccov; /* <- mucov, N */ + + std::valarray minStdevs; /* Minimum standard deviations per coordinate (default = 0.0) */ + std::valarray initialStdevs; /* Initial standard deviations per coordinate (default = 0.3) */ +}; + +} // namespace eo + +#endif diff --git a/trunk/eo/src/es/CMAState.cpp b/trunk/eo/src/es/CMAState.cpp new file mode 100644 index 000000000..328552434 --- /dev/null +++ b/trunk/eo/src/es/CMAState.cpp @@ -0,0 +1,364 @@ +/* + * C++ification of Nikolaus Hansen's original C-source code for the + * CMA-ES + * + * C++-ificiation performed by Maarten Keijzer (C) 2005. Licensed under + * the LGPL. Original copyright of Nikolaus Hansen can be found below + * + * + * Some changes have been made to the original flow and logic of the + * algorithm: + * + * - Numerical issues are now treated 'before' going into the eigenvector decomposition + * (this was done out of convenience) + * - dMaxSignifiKond (smallest x such that x == x + 1.0) replaced by + * numeric_limits::epsilon() (smallest x such that 1.0 != 1.0 + x) + * + * + */ + +/* --------------------------------------------------------- */ +/* --------------------------------------------------------- */ +/* --- File: cmaes.c -------- Author: Nikolaus Hansen --- */ +/* --------------------------------------------------------- */ +/* + * CMA-ES for non-linear function minimization. + * + * Copyright (C) 1996, 2003 Nikolaus Hansen. + * e-mail: hansen@bionik.tu-berlin.de + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version (see http://www.gnu.org/copyleft/lesser.html). + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * */ +/* --- Changes : --- + * 03/03/21: argument const double *rgFunVal of + * cmaes_ReestimateDistribution() was treated incorrectly. + * 03/03/29: restart via cmaes_resume_distribution() implemented. + * 03/03/30: Always max std dev / largest axis is printed first. + * 03/08/30: Damping is adjusted for large mueff. + * 03/10/30: Damping is adjusted for large mueff always. + * 04/04/22: Cumulation time and damping for step size adjusted. + * No iniphase but conditional update of pc. + * Version 2.23. + * */ + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +using namespace std; + +namespace eo { + +struct CMAStateImpl { + + CMAParams p; + + lower_triangular_matrix C; // Covariance matrix + square_matrix B; // Eigen vectors (in columns) + valarray d; // eigen values (diagonal matrix) + valarray pc; // Evolution path + valarray ps; // Evolution path for stepsize; + + vector mean; // current mean to sample around + double sigma; // global step size + + unsigned gen; + vector fitnessHistory; + + + CMAStateImpl(const CMAParams& params_, const vector& m, double sigma_) : + p(params_), + C(p.n), B(p.n), d(p.n), pc(p.n), ps(p.n), mean(m), sigma(sigma_), + gen(0), fitnessHistory(3) + { + double trace = (p.initialStdevs * p.initialStdevs).sum(); + /* Initialize covariance structure */ + for (unsigned i = 0; i < p.n; ++i) + { + B[i][i] = 1.; + d[i] = p.initialStdevs[i] * sqrt(p.n / trace); + C[i][i] = d[i] * d[i]; + pc[i] = 0.; + ps[i] = 0.; + } + + } + + void sample(vector& v) { + unsigned n = p.n; + v.resize(n); + + vector tmp(n); + for (unsigned i = 0; i < n; ++i) + tmp[i] = d[i] * rng.normal(); + + /* add mutation (sigma * B * (D*z)) */ + for (unsigned i = 0; i < n; ++i) { + double sum = 0; + for (unsigned j = 0; j < n; ++j) { + sum += B[i][j] * tmp[j]; + } + v[i] = mean[i] + sigma * sum; + } + } + + void reestimate(const vector* >& pop, double muBest, double muWorst) { + + assert(pop.size() == p.mu); + + unsigned n = p.n; + + fitnessHistory[gen % fitnessHistory.size()] = muBest; // needed for divergence check + + vector oldmean = mean; + valarray BDz(n); + + /* calculate xmean and rgBDz~N(0,C) */ + for (unsigned i = 0; i < n; ++i) { + mean[i] = 0.; + for (unsigned j = 0; j < pop.size(); ++j) { + mean[i] += p.weights[j] * (*pop[j])[i]; + } + BDz[i] = sqrt(p.mueff)*(mean[i] - oldmean[i])/sigma; + } + + vector tmp(n); + /* calculate z := D^(-1) * B^(-1) * rgBDz into rgdTmp */ + for (unsigned i = 0; i < n; ++i) { + double sum = 0.0; + for (unsigned j = 0; j < n; ++j) { + sum += B[j][i] * BDz[j]; + } + tmp[i] = sum / d[i]; + } + + /* cumulation for sigma (ps) using B*z */ + for (unsigned i = 0; i < n; ++i) { + double sum = 0.0; + for (unsigned j = 0; j < n; ++j) + sum += B[i][j] * tmp[j]; + + ps[i] = (1. - p.ccumsig) * ps[i] + sqrt(p.ccumsig * (2. - p.ccumsig)) * sum; + } + + /* calculate norm(ps)^2 */ + double psxps = (ps * ps).sum(); + + + double chiN = sqrt((double) p.n) * (1. - 1./(4.*p.n) + 1./(21.*p.n*p.n)); + /* cumulation for covariance matrix (pc) using B*D*z~N(0,C) */ + double hsig = sqrt(psxps) / sqrt(1. - pow(1.-p.ccumsig, 2.*gen)) / chiN < 1.5 + 1./(p.n-0.5); + + pc = (1. - p.ccumcov) * pc + hsig * sqrt(p.ccumcov * (2. - p.ccumcov)) * BDz; + + /* stop initial phase (MK, this was not reachable in the org code, deleted) */ + + /* remove momentum in ps, if ps is large and fitness is getting worse */ + + if (gen >= fitnessHistory.size()) { + + // find direction from muBest and muWorst (muBest == muWorst handled seperately + double direction = muBest < muWorst? -1.0 : 1.0; + + unsigned now = gen % fitnessHistory.size(); + unsigned prev = (gen-1) % fitnessHistory.size(); + unsigned prevprev = (gen-2) % fitnessHistory.size(); + + bool fitnessWorsens = (muBest == muWorst) || // <- increase norm also when population has converged (this deviates from Hansen's scheme) + ( (direction * fitnessHistory[now] < direction * fitnessHistory[prev]) + && + (direction * fitnessHistory[now] < direction * fitnessHistory[prevprev])); + + if(psxps/p.n > 1.5 + 10.*sqrt(2./p.n) && fitnessWorsens) { + double tfac = sqrt((1 + std::max(0., log(psxps/p.n))) * p.n / psxps); + ps *= tfac; + psxps *= tfac*tfac; + } + } + + /* update of C */ + /* Adapt_C(t); not used anymore */ + if (p.ccov != 0.) { + //flgEigensysIsUptodate = 0; + + /* update covariance matrix */ + for (unsigned i = 0; i < n; ++i) { + vector::iterator c_row = C[i]; + for (unsigned j = 0; j <= i; ++j) { + c_row[j] = + (1 - p.ccov) * c_row[j] + + + p.ccov * (1./p.mucov) * pc[i] * pc[j] + + + (1-hsig) * p.ccumcov * (2. - p.ccumcov) * c_row[j]; + + /*C[i][j] = (1 - p.ccov) * C[i][j] + + sp.ccov * (1./sp.mucov) + * (rgpc[i] * rgpc[j] + + (1-hsig)*sp.ccumcov*(2.-sp.ccumcov) * C[i][j]); */ + for (unsigned k = 0; k < p.mu; ++k) { /* additional rank mu update */ + c_row[j] += p.ccov * (1-1./p.mucov) * p.weights[k] + * ( (*pop[k])[i] - oldmean[i]) + * ( (*pop[k])[j] - oldmean[j]) + / sigma / sigma; + + // * (rgrgx[index[k]][i] - rgxold[i]) + // * (rgrgx[index[k]][j] - rgxold[j]) + // / sigma / sigma; + } + } + } + } + + /* update of sigma */ + sigma *= exp(((sqrt(psxps)/chiN)-1.)/p.damp); + /* calculate eigensystem, must be done by caller */ + //cmaes_UpdateEigensystem(0); + + + /* treat minimal standard deviations and numeric problems + * Note that in contrast with the original code, some numerical issues are treated *before* we + * go into the eigenvalue calculation */ + + treatNumericalIssues(muBest, muWorst); + + gen++; // increase generation + } + + void treatNumericalIssues(double best, double worst) { + + /* treat stdevs */ + for (unsigned i = 0; i < p.n; ++i) { + if (sigma * sqrt(C[i][i]) < p.minStdevs[i]) { + // increase stdev + sigma *= exp(0.05+1./p.damp); + break; + } + } + + /* treat convergence */ + if (best == worst) { + sigma *= exp(0.2 + 1./p.damp); + } + + /* Jede Hauptachse i testen, ob x == x + 0.1 * sigma * rgD[i] * B[i] */ + /* Test if all the means are not numerically out of whack with our coordinate system*/ + for (unsigned axis = 0; axis < p.n; ++axis) { + double fac = 0.1 * sigma * d[axis]; + unsigned coord; + for (coord = 0; coord < p.n; ++coord) { + if (mean[coord] != mean[coord] + fac * B[coord][axis]) { + break; + } + } + + if (coord == p.n) { // means are way too big (little) for numerical accuraccy. Start rocking the craddle a bit more + sigma *= exp(0.2+1./p.damp); + } + + } + + /* Testen ob eine Komponente des Objektparameters festhaengt */ + /* Correct issues with scale between objective values and covariances */ + bool theresAnIssue = false; + + for (unsigned i = 0; i < p.n; ++i) { + if (mean[i] == mean[i] + 0.2 * sigma * sqrt(C[i][i])) { + C[i][i] *= (1. + p.ccov); + theresAnIssue = true; + } + } + + if (theresAnIssue) { + sigma *= exp(0.05 + 1./p.damp); + } + } + + + bool updateEigenSystem(unsigned max_tries, unsigned max_iters) { + + if (max_iters==0) max_iters = 30 * p.n; + + static double lastGoodMinimumEigenValue = 1.0; + + /* Try to get a valid calculation */ + for (unsigned tries = 0; tries < max_tries; ++tries) { + + unsigned iters = eig( p.n, C, d, B, max_iters); + if (iters < max_iters) + { // all is well + + /* find largest/smallest eigenvalues */ + double minEV = d.min(); + double maxEV = d.max(); + + /* (MK Original comment was) :Limit Condition of C to dMaxSignifKond+1 + * replaced dMaxSignifKond with 1./numeric_limits::epsilon() + * */ + if (maxEV * numeric_limits::epsilon() > minEV) { + double tmp = maxEV * numeric_limits::epsilon() - minEV; + minEV += tmp; + for (unsigned i=0;i& initial_point, const double initial_sigma) + : pimpl(new CMAStateImpl(params, initial_point, initial_sigma)) {} + +CMAState::~CMAState() { delete pimpl; } +CMAState::CMAState(const CMAState& that) : pimpl(new CMAStateImpl(*that.pimpl )) {} +CMAState& CMAState::operator=(const CMAState& that) { *pimpl = *that.pimpl; return *this; } + +void CMAState::sample(vector& v) const { pimpl->sample(v); } + +void CMAState::reestimate(const vector* >& population, double muBest, double muWorst) { pimpl->reestimate(population, muBest, muWorst); } +bool CMAState::updateEigenSystem(unsigned max_tries, unsigned max_iters) { return pimpl->updateEigenSystem(max_tries, max_iters); } + + +} // namespace eo diff --git a/trunk/eo/src/es/CMAState.h b/trunk/eo/src/es/CMAState.h new file mode 100644 index 000000000..85a80c52c --- /dev/null +++ b/trunk/eo/src/es/CMAState.h @@ -0,0 +1,78 @@ +/* + * C++ification of Nikolaus Hansen's original C-source code for the + * CMA-ES. + * + * Copyright (C) 1996, 2003, Nikolaus Hansen + * (C) 2005, Maarten Keijzer + * + * License: LGPL (see source file) + * + */ + +#ifndef CMASTATE_H_ +#define CMASTATE_H_ + +#include +#include + +namespace eo { + + +class CMAStateImpl; +class CMAParams; +class CMAState { + + CMAStateImpl* pimpl; /* pointer to implementation, hidden in source file */ + + public: + + CMAState(const CMAParams&, const std::vector& initial_point, const double initial_sigma = 1.0); + ~CMAState(); + CMAState(const CMAState&); + CMAState& operator=(const CMAState&); + + /** + * sample a vector from the distribution + * + * If the sample is not to your liking (i.e., not within bounds) + * you can do one of two things: + * + * a) Call sample again + * b) multiply the entire vector with a number between -1 and 1 + * + * Do not modify the sample in any other way as this will invalidate the + * internal consistency of the system. + * + * A final approach is to copy the sample and modify the copy externally (in the evaluation function) + * and possibly add a penalty depending on the size of the modification. + * + */ + void sample(std::vector& v) const; + + /** + * Reestimate covariance matrix and other internal parameters + * Does NOT update the eigen system (call that seperately) + * + * Needs a population of mu individuals, sorted on fitness, plus + * + * muBest: the best fitness in the population + * muWorst: the worst fitness in the population + */ + + void reestimate(const std::vector* >& sorted_population, double muBest, double muWorst); + + /** + * call this function after reestimate in order to update the eigen system + * It is a seperate call to allow the user to periodically skip this expensive step + * + * max_iters = 0 implies 30 * N iterations + * + * If after max_tries still no numerically sound eigen system is constructed, + * the function returns false + */ + bool updateEigenSystem(unsigned max_tries = 1, unsigned max_iters = 0); +}; + +} // namespace eo + +#endif diff --git a/trunk/eo/src/es/CMakeLists.txt b/trunk/eo/src/es/CMakeLists.txt new file mode 100644 index 000000000..593f5df8f --- /dev/null +++ b/trunk/eo/src/es/CMakeLists.txt @@ -0,0 +1,56 @@ +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +###################################################################################### +### 2) Define the es and cma targets +###################################################################################### + +SET(ES_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) +SET(CMA_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) + +SET(LIBRARY_OUTPUT_PATH ${ES_LIB_OUTPUT_PATH}) # the same output for the two libs + +SET(ES_SOURCES + make_algo_scalar_es.cpp + make_algo_scalar_real.cpp + make_checkpoint_es.cpp + make_checkpoint_real.cpp + make_continue_es.cpp + make_continue_real.cpp + make_genotype_es.cpp + make_genotype_real.cpp + make_op_es.cpp + make_op_real.cpp + make_pop_es.cpp + make_pop_real.cpp + make_run_es.cpp + make_run_real.cpp + ) + +SET(CMA_SOURCES + eig.cpp + CMAState.cpp + CMAParams.cpp + ) + +ADD_LIBRARY(es STATIC ${ES_SOURCES}) +INSTALL(TARGETS es ARCHIVE DESTINATION ${LIB} COMPONENT libraries) + +ADD_LIBRARY(cma STATIC ${CMA_SOURCES}) +INSTALL(TARGETS cma ARCHIVE DESTINATION ${LIB} COMPONENT libraries) + +###################################################################################### +### 3) Optionnal +###################################################################################### + +SET(ES_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(es PROPERTIES VERSION "${ES_VERSION}") + +SET(CMA_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(cma PROPERTIES VERSION "${CMA_VERSION}") + +###################################################################################### diff --git a/trunk/eo/src/es/ChangeLog b/trunk/eo/src/es/ChangeLog new file mode 100644 index 000000000..29437b429 --- /dev/null +++ b/trunk/eo/src/es/ChangeLog @@ -0,0 +1,18 @@ +2006-12-01 Jochen Küpper + + * Makefile.am: Add missing CMA header for distribution. + +2006-11-16 Jochen Küpper + + * make_genotype_real.h (eoEsChromInit): Rewrite vecSigmaInit-handling: + If sigmaInit is relative (%), do not read vecSigmaInit. Otherwise + always use vecSigmaInit with default all values of sigmaInit. + + * eoEsChromInit.h (class eoEsChromInit): Take const-reference to sigma-vector. + include + + * Local Variables: + * coding: iso-8859-1 + * mode: flyspell + * fill-column: 80 + * End: diff --git a/trunk/eo/src/es/eig.cpp b/trunk/eo/src/es/eig.cpp new file mode 100644 index 000000000..d7ddd41da --- /dev/null +++ b/trunk/eo/src/es/eig.cpp @@ -0,0 +1,258 @@ +/* + * C++ification of Nikolaus Hansen's original C-source code for the + * CMA-ES. These are the eigenvector calculations + * + * C++-ificiation performed by Maarten Keijzer (C) 2005. Licensed under + * the LGPL. Original copyright of Nikolaus Hansen can be found below + * + * This algorithm is held almost completely intact. Some other datatypes are used, + * but hardly any code has changed + * + */ + +/* --------------------------------------------------------- */ +/* --------------------------------------------------------- */ +/* --- File: cmaes.c -------- Author: Nikolaus Hansen --- */ +/* --------------------------------------------------------- */ +/* + * CMA-ES for non-linear function minimization. + * + * Copyright (C) 1996, 2003 Nikolaus Hansen. + * e-mail: hansen@bionik.tu-berlin.de + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version (see http://www.gnu.org/copyleft/lesser.html). + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * */ +/* --- Changes : --- + * 03/03/21: argument const double *rgFunVal of + * cmaes_ReestimateDistribution() was treated incorrectly. + * 03/03/29: restart via cmaes_resume_distribution() implemented. + * 03/03/30: Always max std dev / largest axis is printed first. + * 03/08/30: Damping is adjusted for large mueff. + * 03/10/30: Damping is adjusted for large mueff always. + * 04/04/22: Cumulation time and damping for step size adjusted. + * No iniphase but conditional update of pc. + * Version 2.23. + * */ +#include "eig.h" + +using namespace std; + +/* ========================================================= */ +/* + Householder Transformation einer symmetrischen Matrix + auf tridiagonale Form. + -> n : Dimension + -> ma : symmetrische nxn-Matrix + <- ma : Transformationsmatrix (ist orthogonal): + Tridiag.-Matrix == <-ma * ->ma * (<-ma)^t + <- diag : Diagonale der resultierenden Tridiagonalmatrix + <- neben[0..n-1] : Nebendiagonale (==1..n-1) der res. Tridiagonalmatrix + + */ +static void +Householder( int N, square_matrix& ma, valarray& diag, double* neben) +{ + double epsilon; + int i, j, k; + double h, sum, tmp, tmp2; + + for (i = N-1; i > 0; --i) + { + h = 0.0; + if (i == 1) + neben[i] = ma[i][i-1]; + else + { + for (k = i-1, epsilon = 0.0; k >= 0; --k) + epsilon += fabs(ma[i][k]); + + if (epsilon == 0.0) + neben[i] = ma[i][i-1]; + else + { + for(k = i-1, sum = 0.0; k >= 0; --k) + { /* i-te Zeile von i-1 bis links normieren */ + ma[i][k] /= epsilon; + sum += ma[i][k]*ma[i][k]; + } + tmp = (ma[i][i-1] > 0) ? -sqrt(sum) : sqrt(sum); + neben[i] = epsilon*tmp; + h = sum - ma[i][i-1]*tmp; + ma[i][i-1] -= tmp; + for (j = 0, sum = 0.0; j < i; ++j) + { + ma[j][i] = ma[i][j]/h; + tmp = 0.0; + for (k = j; k >= 0; --k) + tmp += ma[j][k]*ma[i][k]; + for (k = j+1; k < i; ++k) + tmp += ma[k][j]*ma[i][k]; + neben[j] = tmp/h; + sum += neben[j] * ma[i][j]; + } /* for j */ + sum /= 2.*h; + for (j = 0; j < i; ++j) + { + neben[j] -= ma[i][j]*sum; + tmp = ma[i][j]; + tmp2 = neben[j]; + for (k = j; k >= 0; --k) + ma[j][k] -= (tmp*neben[k] + tmp2*ma[i][k]); + } /* for j */ + } /* else epsilon */ + } /* else i == 1 */ + diag[i] = h; + } /* for i */ + + diag[0] = 0.0; + neben[0] = 0.0; + + for (i = 0; i < N; ++i) + { + if(diag[i] != 0.0) + for (j = 0; j < i; ++j) + { + for (k = i-1, tmp = 0.0; k >= 0; --k) + tmp += ma[i][k] * ma[k][j]; + for (k = i-1; k >= 0; --k) + ma[k][j] -= tmp*ma[k][i]; + } /* for j */ + diag[i] = ma[i][i]; + ma[i][i] = 1.0; + for (k = i-1; k >= 0; --k) + ma[k][i] = ma[i][k] = 0.0; + } /* for i */ +} + +/* + QL-Algorithmus mit implizitem Shift, zur Berechnung von Eigenwerten + und -vektoren einer symmetrischen Tridiagonalmatrix. + -> n : Dimension. + -> diag : Diagonale der Tridiagonalmatrix. + -> neben[0..n-1] : Nebendiagonale (==0..n-2), n-1. Eintrag beliebig + -> mq : Matrix output von Householder() + -> maxIt : maximale Zahl der Iterationen + <- diag : Eigenwerte + <- neben : Garbage + <- mq : k-te Spalte ist normalisierter Eigenvektor zu diag[k] + + */ + +static int +QLalgo( int N, valarray& diag, square_matrix& mq, + int maxIter, double* neben) +{ + int i, j, k, kp1, l; + double tmp, diff, cneben, c1, c2, p; + int iter; + + neben[N-1] = 0.0; + for (i = 0, iter = 0; i < N && iter < maxIter; ++i) + do /* while j != i */ + { + for (j = i; j < N-1; ++j) + { + tmp = fabs(diag[j]) + fabs(diag[j+1]); + if (fabs(neben[j]) + tmp == tmp) + break; + } + if (j != i) + { + if (++iter > maxIter) return maxIter-1; + diff = (diag[i+1]-diag[i])/neben[i]/2.0; + if (diff >= 0) + diff = diag[j] - diag[i] + + neben[i] / (diff + sqrt(diff * diff + 1.0)); + else + diff = diag[j] - diag[i] + + neben[i] / (diff - sqrt(diff * diff + 1.0)); + c2 = c1 = 1.0; + p = 0.0; + for (k = j-1; k >= i; --k) + { + kp1 = k + 1; + tmp = c2 * neben[k]; + cneben = c1 * neben[k]; + if (fabs(tmp) >= fabs(diff)) + { + c1 = diff / tmp; + c2 = 1. / sqrt(c1*c1 + 1.0); + neben[kp1] = tmp / c2; + c1 *= c2; + } + else + { + c2 = tmp / diff; + c1 = 1. / sqrt(c2*c2 + 1.0); + neben[kp1] = diff / c1; + c2 *= c1; + } /* else */ + tmp = (diag[k] - diag[kp1] + p) * c2 + 2.0 * c1 * cneben; + diag[kp1] += tmp * c2 - p; + p = tmp * c2; + diff = tmp * c1 - cneben; + for (l = N-1; l >= 0; --l) /* TF-Matrix Q */ + { + tmp = mq[l][kp1]; + mq[l][kp1] = c2 * mq[l][k] + c1 * tmp; + mq[l][k] = c1 * mq[l][k] - c2 * tmp; + } /* for l */ + } /* for k */ + diag[i] -= p; + neben[i] = diff; + neben[j] = 0.0; + } /* if */ + } while (j != i); + return iter; +} /* QLalgo() */ + +/* ========================================================= */ +/* + Calculating eigenvalues and vectors. + Input: + N: dimension. + C: lower_triangular NxN-matrix. + niter: number of maximal iterations for QL-Algorithm. + rgtmp: N+1-dimensional vector for temporal use. + Output: + diag: N eigenvalues. + Q: Columns are normalized eigenvectors. + return: number of iterations in QL-Algorithm. + */ + +namespace eo { +int +eig( int N, const lower_triangular_matrix& C, valarray& diag, square_matrix& Q, + int niter) +{ + int ret; + int i, j; + + if (niter == 0) niter = 30*N; + + for (i=0; i < N; ++i) + { + vector::const_iterator row = C[i]; + for (j = 0; j <= i; ++j) + Q[i][j] = Q[j][i] = row[j]; + } + + double* rgtmp = new double[N+1]; + Householder( N, Q, diag, rgtmp); + ret = QLalgo( N, diag, Q, niter, rgtmp+1); + delete [] rgtmp; + + return ret; +} + +} // namespace eo diff --git a/trunk/eo/src/es/eig.h b/trunk/eo/src/es/eig.h new file mode 100644 index 000000000..65d9c53d2 --- /dev/null +++ b/trunk/eo/src/es/eig.h @@ -0,0 +1,25 @@ +#ifndef EIG_H__ +#define EIG_H__ + +#include +#include + +namespace eo { +/* ========================================================= */ +/* + Calculating eigenvalues and vectors. + Input: + N: dimension. + C: lower_triangular NxN-matrix. + niter: number of maximal iterations for QL-Algorithm. + Output: + diag: N eigenvalues. + Q: Columns are normalized eigenvectors. + return: number of iterations in QL-Algorithm. + */ +extern int eig( int N, const lower_triangular_matrix& C, std::valarray& diag, square_matrix& Q, + int niter = 0); + +} // namespace eo + +#endif diff --git a/trunk/eo/src/es/eoCMABreed.h b/trunk/eo/src/es/eoCMABreed.h new file mode 100644 index 000000000..450654a7f --- /dev/null +++ b/trunk/eo/src/es/eoCMABreed.h @@ -0,0 +1,78 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; fill-column: 80; -*- + +//----------------------------------------------------------------------------- +// eoCMABreed +// (c) Maarten Keijzer 2005 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + */ +//----------------------------------------------------------------------------- + + +#ifndef _EOCMABREED_H +#define _EOCMABREED_H + +#include +#include +#include + +#include + +/// @todo handle bounds +template +class eoCMABreed : public eoBreed< eoVector > { + + eo::CMAState& state; + unsigned lambda; + + typedef eoVector EOT; + + public: + eoCMABreed(eo::CMAState& state_, unsigned lambda_) : state(state_), lambda(lambda_) {} + + void operator()(const eoPop& parents, eoPop& offspring) { + + // two temporary arrays of pointers to store the sorted population + std::vector sorted(parents.size()); + + // mu stores population as vector (instead of eoPop) + std::vector* > mu(parents.size()); + + parents.sort(sorted); + for (unsigned i = 0; i < sorted.size(); ++i) { + mu[i] = static_cast< const std::vector* >( sorted[i] ); + } + + // learn + state.reestimate(mu, sorted[0]->fitness(), sorted.back()->fitness()); + + if (!state.updateEigenSystem(10)) { + std::cerr << "No good eigensystem found" << std::endl; + } + + // generate + offspring.resize(lambda); + + for (unsigned i = 0; i < lambda; ++i) { + state.sample( static_cast< std::vector& >( offspring[i] )); + offspring[i].invalidate(); + } + + } +}; + + +#endif diff --git a/trunk/eo/src/es/eoCMAInit.h b/trunk/eo/src/es/eoCMAInit.h new file mode 100644 index 000000000..2fdb967e0 --- /dev/null +++ b/trunk/eo/src/es/eoCMAInit.h @@ -0,0 +1,54 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; fill-column: 80; -*- + +//----------------------------------------------------------------------------- +// eoCMAInit +// (c) Maarten Keijzer 2005 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + marc.schoenauer@polytechnique.fr + http://eeaax.cmap.polytchnique.fr/ + */ +//----------------------------------------------------------------------------- + + +#ifndef _EOCMAINIT_H +#define _EOCMAINIT_H + +#include +#include +#include + +/// @todo handle bounds +template +class eoCMAInit : public eoInit< eoVector > { + + const eo::CMAState& state; + + typedef eoVector EOT; + + public: + eoCMAInit(const eo::CMAState& state_) : state(state_) {} + + + void operator()(EOT& v) { + state.sample(static_cast& >(v)); + v.invalidate(); + } +}; + + +#endif diff --git a/trunk/eo/src/es/eoEsChromInit.h b/trunk/eo/src/es/eoEsChromInit.h new file mode 100644 index 000000000..c5382890b --- /dev/null +++ b/trunk/eo/src/es/eoEsChromInit.h @@ -0,0 +1,208 @@ +// +/* (c) Maarten Keijzer 2000, GeNeura Team, 1998 - EEAAX 1999 + +This library is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 2 of the License, or (at your option) any +later version. + +This library is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this library; if not, write to the Free Software Foundation, Inc., 59 +Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ + + +#ifndef _eoEsChromInit_H +#define _eoEsChromInit_H + +#include +#include +#include +#include + +#include +#include +#include +#include + +#ifndef M_PI +#define M_PI 3.1415926535897932384626433832795 +#endif + +/** Random Es-chromosome initializer (therefore derived from eoInit) + +@ingroup Real +@ingroup Initializators + + +This class can initialize four types of real-valued genotypes thanks +to tempate specialization of private method create: + +- eoReal just an eoVector +- eoEsSimple + one self-adapting single sigma for all variables +- eoEsStdev a whole std::vector of self-adapting sigmas +- eoEsFull a full self-adapting correlation matrix + +@see eoReal eoEsSimple eoEsStdev eoEsFull eoInit +*/ +template +class eoEsChromInit : public eoRealInitBounded +{ +public: + + using eoRealInitBounded::size; + using eoRealInitBounded::theBounds; + + typedef typename EOT::Fitness FitT; + + /** Constructor + + @param _bounds bounds for uniform initialization + @param _sigma initial value for the stddev + @param _to_scale wether sigma should be multiplied by the range of each variable + added December 2004 - MS (together with the whole comment :-) + */ + eoEsChromInit(eoRealVectorBounds& _bounds, double _sigma = 0.3, bool _to_scale=false) + : eoRealInitBounded(_bounds) + { + // a bit of pre-computations, to save time later (even if some are useless) + // + // first, in the case of one unique sigma + // sigma is scaled by the average range (if that means anything!) + if (_to_scale) + { + double scaleUnique = 0; + for (unsigned i=0; i& _vecSigma) + : eoRealInitBounded(_bounds), uniqueSigma(_vecSigma[0]), vecSigma(_vecSigma) + { + assert(_bounds.size() == size()); + assert(_vecSigma.size() == size()); + } + + + void operator()(EOT& _eo) + { + eoRealInitBounded::operator()(_eo); + create_self_adapt(_eo); + _eo.invalidate(); + } + + +private: + + /** Create intializer + + No adaptive mutation at all + */ + void create_self_adapt(eoReal&) + {} + + + + /** Create intializer + + @overload + + Adaptive mutation through a unique sigma + */ + void create_self_adapt(eoEsSimple& result) + { + // pre-computed in the Ctor + result.stdev = uniqueSigma; + } + + + + /** Create intializer + + @overload + + Adaptive mutation through a std::vector of sigmas + + @todo Should we scale sigmas to the corresponding object variable range? + */ + void create_self_adapt(eoEsStdev& result) + { + // pre-computed in the constructor + result.stdevs = vecSigma; + } + + + + /** Create intializer + + @overload + + Adaptive mutation through a whole correlation matrix + */ + void create_self_adapt(eoEsFull& result) + { + // first the stdevs (pre-computed in the Ctor) + result.stdevs = vecSigma; + unsigned int theSize = size(); + // nb of rotation angles: N*(N-1)/2 (in general!) + result.correlations.resize(theSize*(theSize - 1) / 2); + for (unsigned i=0; i vecSigma; +}; + +#endif + + + +// Local Variables: +// coding: iso-8859-1 +// mode:C++ +// c-file-style: "Stroustrup" +// comment-column: 35 +// fill-column: 80 +// End: diff --git a/trunk/eo/src/es/eoEsFull.h b/trunk/eo/src/es/eoEsFull.h new file mode 100644 index 000000000..a1091c83d --- /dev/null +++ b/trunk/eo/src/es/eoEsFull.h @@ -0,0 +1,85 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsFull.h +// (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEsFull_h +#define _eoEsFull_h + +#include + +/** +\ingroup Real + + The most complex evolutionary strategy representation. Co-evolving mutation +rates and correlated mutations. +*/ + +template +class eoEsFull : public eoVector +{ +public: + + using eoVector::size; + + + typedef double Type; + + eoEsFull(void) : eoVector() {} + + virtual std::string className(void) const { return "eoEsFull"; } + + void printOn(std::ostream& os) const + { + eoVector::printOn(os); + os << ' '; + std::copy(stdevs.begin(), stdevs.end(), std::ostream_iterator(os, " ")); + os << ' '; + std::copy(correlations.begin(), correlations.end(), std::ostream_iterator(os, " ")); + os << ' '; + } + + void readFrom(std::istream& is) + { + eoVector::readFrom(is); + + stdevs.resize(size()); + + unsigned i; + for (i = 0; i < size(); ++i) + is >> stdevs[i]; + + correlations.resize(size()*(size() - 1) / 2); + + for (i = 0; i < correlations.size(); ++i) + is >> correlations[i]; + } + + std::vector stdevs; + std::vector correlations; +}; + + + +#endif diff --git a/trunk/eo/src/es/eoEsGlobalXover.h b/trunk/eo/src/es/eoEsGlobalXover.h new file mode 100644 index 000000000..5be4b5061 --- /dev/null +++ b/trunk/eo/src/es/eoEsGlobalXover.h @@ -0,0 +1,152 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsGlobalXover.h : ES global crossover +// (c) Marc Schoenauer 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: marc.schoenauer@polytechnique.fr http://eeaax.cmap.polytchnique.fr/ + */ +//----------------------------------------------------------------------------- + + +#ifndef _eoEsGlobalXover_H +#define _eoEsGlobalXover_H + +#include + +#include +#include +#include + +#include +// needs a selector - here random +#include + +/** Global crossover operator for ES genotypes. + * Uses some Atom crossovers to handle both the object variables + * and the mutation strategy parameters + * + * @ingroup Real + * @ingroup Variators + */ +template +class eoEsGlobalXover: public eoGenOp +{ +public: + typedef typename EOT::Fitness FitT; + + /** + * (Default) Constructor. + */ + eoEsGlobalXover(eoBinOp & _crossObj, eoBinOp & _crossMut) : + crossObj(_crossObj), crossMut(_crossMut) {} + + /// The class name. Used to display statistics + virtual std::string className() const { return "eoEsGlobalXover"; } + + /// The TOTAL number of offspring (here = nb of parents modified in place) + unsigned max_production(void) { return 1; } + + /** + * modifies one parents in the populator + * using 2 new parents for each component! + * + * @param _plop a POPULATOR (not a simple population) + */ + void apply(eoPopulator& _plop) + { + // First, select as many parents as you will have offspring + EOT& parent = *_plop; // select the first parent + + // first, the object variables + for (unsigned i=0; i used by _plop to get parents + const EOT& realParent1 = sel(_plop.source()); + const EOT& realParent2 = sel(_plop.source()); + parent[i] = realParent1[i]; + crossObj(parent[i], realParent2[i]); // apply eoBinOp + } + // then the self-adaptation parameters + cross_self_adapt(parent, _plop.source()); + // dont' forget to invalidate + parent.invalidate(); + } + +private: + + /** Method for cross self-adaptation parameters + + Specialization for eoEsSimple. + */ + void cross_self_adapt(eoEsSimple & _parent, const eoPop >& _pop) + { + const EOT& realParent1 = sel(_pop); + const EOT& realParent2 = sel(_pop); + _parent.stdev = realParent1.stdev; + crossMut(_parent.stdev, realParent2.stdev); // apply eoBinOp + } + + /** Method for cross self-adaptation parameters + + Specialization for eoEsStdev. + */ + void cross_self_adapt(eoEsStdev & _parent, const eoPop >& _pop) + { + for (unsigned i=0; i<_parent.size(); i++) + { + const EOT& realParent1 = sel(_pop); + const EOT& realParent2 = sel(_pop); + _parent.stdevs[i] = realParent1.stdevs[i]; + crossMut(_parent.stdevs[i], realParent2.stdevs[i]); // apply eoBinOp + } + } + + /** Method for cross self-adaptation parameters + + Specialization for eoEsFull. + */ + void cross_self_adapt(eoEsFull & _parent, const eoPop >& _pop) + { + unsigned i; + // the StDev + for (i=0; i<_parent.size(); i++) + { + const EOT& realParent1 = sel(_pop); + const EOT& realParent2 = sel(_pop); + _parent.stdevs[i] = realParent1.stdevs[i]; + crossMut(_parent.stdevs[i], realParent2.stdevs[i]); // apply eoBinOp + } + // the roataion angles + for (i=0; i<_parent.correlations.size(); i++) + { + const EOT& realParent1 = sel(_pop); + const EOT& realParent2 = sel(_pop); + _parent.correlations[i] = realParent1.correlations[i]; + crossMut(_parent.correlations[i], realParent2.correlations[i]); // apply eoBinOp + } + + } + + // the data + eoRandomSelect sel; + eoBinOp & crossObj; + eoBinOp & crossMut; +}; + +#endif diff --git a/trunk/eo/src/es/eoEsMutate.h b/trunk/eo/src/es/eoEsMutate.h new file mode 100644 index 000000000..fd1152685 --- /dev/null +++ b/trunk/eo/src/es/eoEsMutate.h @@ -0,0 +1,287 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; fill-column: 80; -*- + +//----------------------------------------------------------------------------- +// eoESMute.h : ES mutation +// (c) Maarten Keijzer 2000 & GeNeura Team, 1998 for the EO part +// Th. Baeck 1994 and EEAAX 1999 for the ES part +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + marc.schoenauer@polytechnique.fr + http://eeaax.cmap.polytchnique.fr/ + */ +//----------------------------------------------------------------------------- + + +#ifndef _EOESMUTATE_H +#define _EOESMUTATE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef M_PI +#define M_PI 3.1415926535897932384626433832795 +#endif + +/** ES-style mutation in the large + +@ingroup Real +@ingroup Variators + +Obviously, valid only for eoES*. It is currently valid for three types +of ES chromosomes: +- eoEsSimple: Exactly one stdandard-deviation +- eoEsStdev: As many standard deviations as object variables +- eoEsFull: The whole guacemole: correlations, stdevs and object variables + +Each of these three variant has it's own operator() in eoEsMutate and +intialization is also split into three cases (that share some commonalities) +*/ +template +class eoEsMutate : public eoMonOp< EOT > +{ +public: + + /** Fitness-type */ + typedef typename EOT::Fitness FitT; + + + /** Initialization. + + @param _init Proxy class for initializating the three parameters + eoEsMutate needs + @param _bounds Bounds for the objective variables + */ + eoEsMutate(eoEsMutationInit& _init, eoRealVectorBounds& _bounds) : bounds(_bounds) + { + init(EOT(), _init); // initialize on actual type used + } + + + /** @brief Virtual Destructor */ + virtual ~eoEsMutate() {}; + + + /** Classname. + + Inherited from eoObject @see eoObject + + @return Name of class. + */ + virtual std::string className() const {return "eoESMutate";}; + + + /** Mutate eoEsSimple + + @param _eo Individual to mutate. + */ + virtual bool operator()( eoEsSimple& _eo) + { + _eo.stdev *= exp(TauLcl * rng.normal()); + if (_eo.stdev < stdev_eps) + _eo.stdev = stdev_eps; + // now apply to all + for (unsigned i = 0; i < _eo.size(); ++i) + { + _eo[i] += _eo.stdev * rng.normal(); + } + bounds.foldsInBounds(_eo); + return true; + } + + + /** Standard mutation in ES + + @overload + + Standard mutation of object variables and standard deviations in ESs. + + If there are fewer different standard deviations available than the + dimension of the objective function requires, the last standard deviation is + responsible for ALL remaining object variables. + + @param _eo Individual to mutate. + + @see + Schwefel 1977: Numerische Optimierung von Computer-Modellen mittels der + Evolutionsstrategie, pp. 165 ff. + */ + virtual bool operator()( eoEsStdev& _eo ) + { + double global = TauGlb * rng.normal(); + for (unsigned i = 0; i < _eo.size(); i++) + { + double stdev = _eo.stdevs[i]; + stdev *= exp( global + TauLcl * rng.normal() ); + if (stdev < stdev_eps) + stdev = stdev_eps; + _eo.stdevs[i] = stdev; + _eo[i] += stdev * rng.normal(); + } + bounds.foldsInBounds(_eo); + return true; + } + + + /** Correlated mutations in ES + + @overload + + Mutation of object variables, standard deviations, and their correlations in + ESs. + + @param _eo Individual to mutate. + + @see + - H.-P. Schwefel: Internal Report of KFA Juelich, KFA-STE-IB-3/80, p. 43, 1980. + - G. Rudolph: Globale Optimierung mit parallelen Evolutionsstrategien, + Diploma Thesis, University of Dortmund, 1990. + */ + virtual bool operator()( eoEsFull & _eo ) + // Code originally from Thomas Bäck + { + // First: mutate standard deviations (as for eoEsStdev). + double global = TauGlb * rng.normal(); + unsigned i; + for (i = 0; i < _eo.size(); i++) + { + double stdev = _eo.stdevs[i]; + stdev *= exp( global + TauLcl*rng.normal() ); + if (stdev < stdev_eps) + stdev = stdev_eps; + _eo.stdevs[i] = stdev; + } + // Mutate rotation angles. + for (i = 0; i < _eo.correlations.size(); i++) + { + _eo.correlations[i] += TauBeta * rng.normal(); + if ( fabs(_eo.correlations[i]) > M_PI ) + { + _eo.correlations[i] -= M_PI * (int) (_eo.correlations[i]/M_PI) ; + } + } + // Perform correlated mutations. + unsigned k, n1, n2; + double d1,d2, S, C; + std::vector VarStp(_eo.size()); + for (i = 0; i < _eo.size(); i++) + VarStp[i] = _eo.stdevs[i] * rng.normal(); + unsigned nq = _eo.correlations.size() - 1; + for (k = 0; k < _eo.size()-1; k++) + { + n1 = _eo.size() - k - 1; + n2 = _eo.size() - 1; + for (i = 0; i < k; i++) + { + d1 = VarStp[n1]; + d2 = VarStp[n2]; + S = sin( _eo.correlations[nq] ); + C = cos( _eo.correlations[nq] ); + VarStp[n2] = d1 * S + d2 * C; + VarStp[n1] = d1 * C - d2 * S; + n2--; + nq--; + } + } + for (i = 0; i < _eo.size(); i++) + _eo[i] += VarStp[i]; + bounds.foldsInBounds(_eo); + return true; + } + + + private : + + /** Initialization of simple ES */ + void init(eoEsSimple, eoEsMutationInit& _init) + { + unsigned size = bounds.size(); + TauLcl = _init.TauLcl(); + TauLcl /= sqrt(2*(double) size); + std::cout << "Init: tau local " << TauLcl << std::endl; + } + + + /** Initialization of standard ES + + @overload + */ + void init(eoEsStdev, eoEsMutationInit& _init) + { + unsigned size = bounds.size(); + TauLcl = _init.TauLcl(); + TauGlb = _init.TauGlb(); + // renormalization + TauLcl /= sqrt( 2.0 * sqrt(double(size)) ); + TauGlb /= sqrt( 2.0 * double(size) ); + std::cout << "Init: tau local " << TauLcl << " et global " << TauGlb << std::endl; + } + + + /** Initialization of full ES + + @overload + */ + void init(eoEsFull, eoEsMutationInit& _init) + { + init(eoEsStdev(), _init); + TauBeta = _init.TauBeta(); + std::cout << "Init: tau local " << TauLcl << " et global " << TauGlb << std::endl; + } + + + /** Local factor for mutation of std deviations */ + double TauLcl; + + /** Global factor for mutation of std deviations */ + double TauGlb; + + /** Factor for mutation of correlation parameters */ + double TauBeta; + + /** Bounds of parameters */ + eoRealVectorBounds& bounds; + + /** Minimum stdev. + + If you let the step-size go to 0, self-adaptation stops, therefore we give a + lower bound. The actual value used is somewhat arbitrary and the is no + theoretical reasoning known for it (Sep 2005). + + The code that we have in EO is a port from a C code that Thomas Bäck kindly + donated to the community some years ago. It has been modified by Marc + Schoenauer for inclusion in EvolC, than by Maarten Keijzer into EO. The + exact value was adjusted based on practice. + + Removing this doesn't work well, but it was never tried to figure out what + the best value would be. + */ + static const double stdev_eps; +}; + + +// Minimum value of stdevs, see declaration for details. +template +const double eoEsMutate::stdev_eps = 1.0e-40; + +#endif diff --git a/trunk/eo/src/es/eoEsMutationInit.h b/trunk/eo/src/es/eoEsMutationInit.h new file mode 100644 index 000000000..987de86bd --- /dev/null +++ b/trunk/eo/src/es/eoEsMutationInit.h @@ -0,0 +1,122 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; fill-column: 80 -*- + +//----------------------------------------------------------------------------- +// eoEsMutationInit.h +// (c) GeNeura Team, 1998 - EEAAX 1999 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoEsMutationInit_h +#define _eoEsMutationInit_h + +#include + +/** Initialize Mutation operator + +@ingroup Real +@ingroup Variators + +Proxy class that is used for initializing the mutation operator. It provides an +interface between eoEsMutate and the abstract parameterLoader. It also provides +the names for the parameters in this class as virtual protected member +functions. + +If you have more than a single ES in a project that need different names in the +configuration files, you might consider overriding this class to change the +names. + +@see eoEsMutate +*/ +class eoEsMutationInit +{ +public : + + /** Constructor + + @param _parser Parser to read parameters from. + @param _section Parser section for \f$\tau\f$-parameters. + */ + eoEsMutationInit(eoParser& _parser, + std::string _section="ES mutation parameters" ) : + parser(_parser), repSection(_section), + TauLclParam(0), TauGlbParam(0), TauBetaParam(0) {} + + /** Virtual destructor */ + virtual ~eoEsMutationInit() {} + + /** local tau */ + double TauLcl(void) + { + if (TauLclParam == 0) + { + TauLclParam = &parser.getORcreateParam(1.0, TauLclName(), + "Local Tau (before normalization)", + TauLclShort(), section()); + } + return TauLclParam->value(); + } + + /** global tau */ + double TauGlb(void) + { + if (TauGlbParam == 0) + { + TauGlbParam = &parser.getORcreateParam(1.0, TauGlbName(), + "Global Tau (before normalization)", + TauGlbShort(), section()); + } + return TauGlbParam->value(); + } + + /** correlation's tau */ + double TauBeta(void) + { + if (TauBetaParam == 0) + { + TauBetaParam = &parser.getORcreateParam(0.0873, TauBetaName(), + "Beta", TauBetaShort(), section()); + } + return TauBetaParam->value(); + } + + protected : + + virtual std::string section(void) { return repSection; } + + virtual std::string TauLclName(void) const { return "TauLoc"; } + virtual char TauLclShort(void) const { return 'l'; } + + virtual std::string TauGlbName(void) const { return "TauGlob"; } + virtual char TauGlbShort(void) const { return 'g'; } + + virtual std::string TauBetaName(void) const { return "Beta"; } + virtual char TauBetaShort(void) const { return 'b'; } + +private: + + eoParser& parser; + std::string repSection; + eoValueParam* TauLclParam; + eoValueParam* TauGlbParam; + eoValueParam* TauBetaParam; +}; + +#endif diff --git a/trunk/eo/src/es/eoEsSimple.h b/trunk/eo/src/es/eoEsSimple.h new file mode 100644 index 000000000..ac93ab4b6 --- /dev/null +++ b/trunk/eo/src/es/eoEsSimple.h @@ -0,0 +1,77 @@ +/* (c) GeNeura Team, 2000 - EEAAX 1999, Maarten Keijzer 2000 + +This library is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 2 of the License, or (at your option) any +later version. + +This library is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this library; if not, write to the Free Software Foundation, Inc., 59 +Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ + + +#ifndef _eoEsSimple_h +#define _eoEsSimple_h + +#include +#include + +#include + +/** Simple Evolution Strategy + +@ingroup Real + +One of the more simple evolution strategies, sporting just a single stdeviation +for the entire chromosome. For more advanced versions see also eoEsStdev +eoEsFull + +@see eoEsStdev eoEsFull +*/ +template +class eoEsSimple : public eoVector +{ +public : + + typedef double Type; + + eoEsSimple() : eoVector() {} + + virtual std::string className() const { return "eoEsSimple"; } + + void printOn(std::ostream& os) const + { + eoVector::printOn(os); + os << ' ' << stdev << ' '; + } + + void readFrom(std::istream& is) + { + eoVector::readFrom(is); + is >> stdev; + } + + double stdev; +}; + +#endif + + + +// Local Variables: +// coding: iso-8859-1 +// mode:C++ +// c-file-style: "Stroustrup" +// comment-column: 35 +// fill-column: 80 +// End: diff --git a/trunk/eo/src/es/eoEsStandardXover.h b/trunk/eo/src/es/eoEsStandardXover.h new file mode 100644 index 000000000..34739693c --- /dev/null +++ b/trunk/eo/src/es/eoEsStandardXover.h @@ -0,0 +1,123 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoEsLocalXover.h : ES global crossover +// (c) Marc Schoenauer 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: marc.schoenauer@polytechnique.fr http://eeaax.cmap.polytchnique.fr/ + */ +//----------------------------------------------------------------------------- + + +#ifndef _eoEsLocalXover_H +#define _eoEsLocalXover_H + +#include + +#include +#include +#include + +#include +// needs a selector - here random +#include + +/** Standard (i.e. eoBinOp) crossover operator for ES genotypes. + * Uses some Atom crossovers to handle both the object variables + * and the mutation strategy parameters + * It is an eoBinOp and has to be wrapped into an eoGenOp before being used + * like the global version + * + * @ingroup Real + * @ingroup Variators + */ +template +class eoEsStandardXover: public eoBinOp +{ +public: + typedef typename EOT::Fitness FitT; + + /** + * (Default) Constructor. + */ + eoEsStandardXover(eoBinOp & _crossObj, eoBinOp & _crossMut) : + crossObj(_crossObj), crossMut(_crossMut) {} + + /// The class name. Used to display statistics + virtual std::string className() const { return "eoEsStandardXover"; } + + /** + * modifies one parents in the populator + * using a second parent + */ + bool operator()(EOT& _eo1, const EOT& _eo2) + { + bool bLoc=false; + // first, the object variables + for (unsigned i=0; i<_eo1.size(); i++) + { + bLoc |= crossObj(_eo1[i], _eo2[i]); // apply eoBinOp + } + // then the self-adaptation parameters + bLoc |= cross_self_adapt(_eo1, _eo2); + return bLoc; + } + +private: + + // the method to cross slef-adaptation parameters: need to specialize + + bool cross_self_adapt(eoEsSimple & _parent1, const eoEsSimple & _parent2) + { + return crossMut(_parent1.stdev, _parent2.stdev); // apply eoBinOp + } + + bool cross_self_adapt(eoEsStdev & _parent1, const eoEsStdev & _parent2) + { + bool bLoc=false; + for (unsigned i=0; i<_parent1.size(); i++) + { + bLoc |= crossMut(_parent1.stdevs[i], _parent2.stdevs[i]); // apply eoBinOp + } + return bLoc; + } + + bool cross_self_adapt(eoEsFull & _parent1, const eoEsFull & _parent2) + { + bool bLoc=false; + unsigned i; + // the StDev + for (i=0; i<_parent1.size(); i++) + { + bLoc |= crossMut(_parent1.stdevs[i], _parent2.stdevs[i]); // apply eoBinOp + } + // the roataion angles + for (i=0; i<_parent1.correlations.size(); i++) + { + bLoc |= crossMut(_parent1.correlations[i], _parent2.correlations[i]); // apply eoBinOp + } + return bLoc; + + } + + // the data + eoRandomSelect sel; + eoBinOp & crossObj; + eoBinOp & crossMut; +}; + +#endif diff --git a/trunk/eo/src/es/eoEsStdev.h b/trunk/eo/src/es/eoEsStdev.h new file mode 100644 index 000000000..b8910512c --- /dev/null +++ b/trunk/eo/src/es/eoEsStdev.h @@ -0,0 +1,80 @@ +/* (c) GeNeura Team, 2000 - EEAAX 1999 - Maarten Keijzer 2000 + +This library is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 2 of the License, or (at your option) any +later version. + +This library is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this library; if not, write to the Free Software Foundation, Inc., 59 +Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ + + +#ifndef _eoEsStdev_h +#define _eoEsStdev_h + +#include + + +/** Evolutionary Strategy with a standard deviation per parameter + +Evolutionary strategie style representation, supporting co-evolving +standard deviations. + +@ingroup Real +*/ +template +class eoEsStdev : public eoVector +{ +public: + + using eoVector::size; + + typedef double Type; + + eoEsStdev(void) : eoVector() {} + + virtual std::string className(void) const { return "eoEsStdev"; } + + void printOn(std::ostream& os) const + { + eoVector::printOn(os); + os << ' '; + std::copy(stdevs.begin(), stdevs.end(), std::ostream_iterator(os, " ")); + os << ' '; + } + + void readFrom(std::istream& is) + { + eoVector::readFrom(is); + stdevs.resize(size()); + unsigned i; + for (i = 0; i < size(); ++i) + is >> stdevs[i]; + } + + + std::vector stdevs; +}; + +#endif + + + +// Local Variables: +// coding: iso-8859-1 +// mode:C++ +// c-file-style: "Stroustrup" +// comment-column: 35 +// fill-column: 80 +// End: diff --git a/trunk/eo/src/es/eoNormalMutation.h b/trunk/eo/src/es/eoNormalMutation.h new file mode 100644 index 000000000..96dcf54c2 --- /dev/null +++ b/trunk/eo/src/es/eoNormalMutation.h @@ -0,0 +1,281 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoNormalMutation.h +// (c) EEAAX 2001 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoNormalMutation_h +#define eoNormalMutation_h + +//----------------------------------------------------------------------------- + +#include // swap_ranges +#include +#include +#include +#include +#include +//----------------------------------------------------------------------------- + +/** Simple normal mutation of a std::vector of real values. + * The stDev is fixed - but it is passed ans stored as a reference, + * to enable dynamic mutations (see eoOenFithMutation below). + * + * As for the bounds, the values are here folded back into the bounds. + * The other possiblity would be to iterate until we fall inside the bounds - + * but this sometimes takes a long time!!! + * + * @ingroup Real + * @ingroup Variators + */ +template class eoNormalVecMutation: public eoMonOp +{ + public: + /** + * (Default) Constructor. + * The bounds are initialized with the global object that says: no bounds. + * + * @param _sigma the range for uniform nutation + * @param _p_change the probability to change a given coordinate + */ + eoNormalVecMutation(double _sigma, const double& _p_change = 1.0): + sigma(_sigma), bounds(eoDummyVectorNoBounds), p_change(_p_change) {} + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _sigma the range for uniform nutation + * @param _p_change the probability to change a given coordinate + * + * for each component, the sigma is scaled to the range of the bound, if bounded + */ + eoNormalVecMutation(eoRealVectorBounds & _bounds, + double _sigma, const double& _p_change = 1.0): + sigma(_bounds.size(), _sigma), bounds(_bounds), p_change(_p_change) + { + // scale to the range - if any + for (unsigned i=0; i sigma; + eoRealVectorBounds & bounds; + double p_change; +}; + +/** Simple normal mutation of a std::vector of real values. + * The stDev is fixed - but it is passed ans stored as a reference, + * to enable dynamic mutations (see eoOenFithMutation below). + * + * As for the bounds, the values are here folded back into the bounds. + * The other possiblity would be to iterate until we fall inside the bounds - + * but this sometimes takes a long time!!! + * + * @ingroup Real + * @ingroup Variators + */ +template class eoNormalMutation + : public eoMonOp +{ +public: + /** + * (Default) Constructor. + * The bounds are initialized with the global object that says: no bounds. + * + * @param _sigma the range for uniform nutation + * @param _p_change the probability to change a given coordinate + */ + eoNormalMutation(double & _sigma, const double& _p_change = 1.0): + sigma(_sigma), bounds(eoDummyVectorNoBounds), p_change(_p_change) {} + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _sigma the range for uniform nutation + * @param _p_change the probability to change a given coordinate + */ + eoNormalMutation(eoRealVectorBounds & _bounds, + double _sigma, const double& _p_change = 1.0): + sigma(_sigma), bounds(_bounds), p_change(_p_change) {} + + /** The class name */ + virtual std::string className() const { return "eoNormalMutation"; } + + /** + * Do it! + * @param _eo The cromosome undergoing the mutation + */ + bool operator()(EOT& _eo) + { + bool hasChanged=false; + for (unsigned lieu=0; lieu<_eo.size(); lieu++) + { + if (rng.flip(p_change)) + { + _eo[lieu] += sigma*rng.normal(); + bounds.foldsInBounds(lieu, _eo[lieu]); + hasChanged = true; + } + } + return hasChanged; + } + + /** Accessor to ref to sigma - for update and monitor */ + double & Sigma() {return sigma;} + +private: + double & sigma; + eoRealVectorBounds & bounds; + double p_change; +}; + +/** the dynamic version: just say it is updatable - + * and write the update() method! + * here the 1 fifth rule: count the proportion of successful mutations, and + * increase sigma if more than threshold (1/5 !) + * + * @ingroup Real + * @ingroup Variators + */ +template class eoOneFifthMutation : + public eoNormalMutation, public eoUpdatable +{ +public: + + using eoNormalMutation< EOT >::Sigma; + + typedef typename EOT::Fitness Fitness; + + /** + * (Default) Constructor. + * + * @param _eval the evaluation function, needed to recompute the fitmess + * @param _sigmaInit the initial value for uniform mutation + * @param _windowSize the size of the window for statistics + * @param _updateFactor multiplicative update factor for sigma + * @param _threshold the threshold (the 1/5 - 0.2) + */ + eoOneFifthMutation(eoEvalFunc & _eval, double & _sigmaInit, + unsigned _windowSize = 10, double _updateFactor=0.83, + double _threshold=0.2): + eoNormalMutation(_sigmaInit), eval(_eval), + threshold(_threshold), updateFactor(_updateFactor), + nbMut(_windowSize, 0), nbSuccess(_windowSize, 0), genIndex(0) + { + // minimal check + if (updateFactor>=1) + throw std::runtime_error("Update factor must be < 1 in eoOneFifthMutation"); + } + + /** The class name */ + virtual std::string className() const { return "eoOneFifthMutation"; } + + /** + * Do it! + * calls the standard mutation, then checks for success and updates stats + * + * @param _eo The chromosome undergoing the mutation + */ + bool operator()(EOT & _eo) + { + if (_eo.invalid()) // due to some crossover??? + eval(_eo); + Fitness oldFitness = _eo.fitness(); // save old fitness + + // call standard operator - then count the successes + if (eoNormalMutation::operator()(_eo)) // _eo has been modified + { + _eo.invalidate(); // don't forget!!! + nbMut[genIndex]++; + eval(_eo); // compute fitness of offspring + + if (_eo.fitness() > oldFitness) + nbSuccess[genIndex]++; // update counter + } + return false; // because eval has reset the validity flag + } + + /** the method that will be called every generation + * if the object is added to the checkpoint + */ + void update() + { + unsigned totalMut = 0; + unsigned totalSuccess = 0; + // compute the average stats over the time window + for ( unsigned i=0; i threshold) { + Sigma() /= updateFactor; // increase sigma + } + else + { + Sigma() *= updateFactor; // decrease sigma + } + genIndex = (genIndex+1) % nbMut.size() ; + nbMut[genIndex] = nbSuccess[genIndex] = 0; + + } + +private: + eoEvalFunc & eval; + double threshold; // 1/5 ! + double updateFactor ; // the multiplicative factor + std::vector nbMut; // total number of mutations per gen + std::vector nbSuccess; // number of successful mutations per gen + unsigned genIndex ; // current index in std::vectors (circular) +}; + + +//----------------------------------------------------------------------------- +//@} +#endif diff --git a/trunk/eo/src/es/eoReal.h b/trunk/eo/src/es/eoReal.h new file mode 100644 index 000000000..ff1908a0c --- /dev/null +++ b/trunk/eo/src/es/eoReal.h @@ -0,0 +1,63 @@ +/* + eoReal.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + todos@geneura.ugr.es, http://geneura.ugr.es + mkeijzer@dhi.dk +*/ + +#ifndef eoReal_h +#define eoReal_h + +//----------------------------------------------------------------------------- + +#include // std::ostream, std::istream +#include // std::string + +#include + +/** eoReal: implementation of simple real-valued chromosome. + * based on eoVector class + * + * @ingroup Real +*/ +template class eoReal: public eoVector +{ + public: + + /** + * (Default) Constructor. + * @param size Size of the std::vector + * @param value fill the vector with this value + */ + eoReal(unsigned size = 0, double value = 0.0): + eoVector(size, value) {} + + /// My class name. + virtual std::string className() const + { + return "eoReal"; + } + +}; +/** @example t-eoReal.cpp + */ + +//----------------------------------------------------------------------------- + +#endif diff --git a/trunk/eo/src/es/eoRealAtomXover.h b/trunk/eo/src/es/eoRealAtomXover.h new file mode 100644 index 000000000..4d4244dd2 --- /dev/null +++ b/trunk/eo/src/es/eoRealAtomXover.h @@ -0,0 +1,100 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRealAtomXover.h : helper classes for std::vector crossover +// (c) Marc Schoenauer 2001 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: marc.schoenauer@polytechnique.fr http://eeaax.cmap.polytchnique.fr/ + */ +//----------------------------------------------------------------------------- + +/** Some basic atomic crossovers for doubles + * + * Are used in all ES specifici crossovers + * and will be in more general stuff, using the generic crossovers + */ + +#ifndef _eoRealAtomXover_H +#define _eoRealAtomXover_H + +#include + +#include + +/** + Discrete crossover == exchange of values + * + * @ingroup Real + * @ingroup Variators +*/ +class eoDoubleExchange: public eoBinOp +{ +public: + /** + * (Default) Constructor. + */ + eoDoubleExchange() {} + + /// The class name. Used to display statistics + virtual std::string className() const { return "eoDoubleExchange"; } + + /** + Exchanges or not the values + */ + bool operator()(double& r1, const double& r2) + { + if (eo::rng.flip()) + if (r1 != r2) // if r1 == r2 you must return false + { + r1 = r2; + return true; + } + return false; + } + +}; + +/** + Intermediate crossover == linear combination + * + * @ingroup Real + * @ingroup Variators +*/ +class eoDoubleIntermediate: public eoBinOp +{ +public: + /** + * (Default) Constructor. + */ + eoDoubleIntermediate() {} + + /// The class name. Used to display statistics + virtual std::string className() const { return "eoDoubleIntermediate"; } + + /** + Linear combination of both parents + */ + bool operator()(double& r1, const double& r2) + { + double alpha = eo::rng.uniform(); + r1 = alpha * r2 + (1-alpha) * r1; + return true; + } + +}; + +#endif diff --git a/trunk/eo/src/es/eoRealInitBounded.h b/trunk/eo/src/es/eoRealInitBounded.h new file mode 100644 index 000000000..6488dd056 --- /dev/null +++ b/trunk/eo/src/es/eoRealInitBounded.h @@ -0,0 +1,70 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRealInitBounded.h +// (c) EEAAX 2000 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoRealInitBounded_h +#define eoRealInitBounded_h + +//----------------------------------------------------------------------------- + +#include +#include +#include +#include + +/** Simple initialization for any EOT that derives from std::vector + * uniformly in some bounds + * + * @ingroup Real + * @ingroup Variators + */ +template +class eoRealInitBounded : public eoInit +{ + public: + /** Ctor - from eoRealVectorBounds */ + eoRealInitBounded(eoRealVectorBounds & _bounds):bounds(_bounds) + { + if (!bounds.isBounded()) + throw std::runtime_error("Needs bounded bounds to initialize a std::vector"); + } + + /** simply passes the argument to the uniform method of the bounds */ + virtual void operator()(EOT & _eo) + { + bounds.uniform(_eo); // resizes, and fills uniformly in bounds + _eo.invalidate(); // was MISSING!!!! + } + + /** accessor to the bounds */ + virtual eoRealVectorBounds & theBounds() {return bounds;} + virtual unsigned size(){return bounds.size();} + + private: + eoRealVectorBounds & bounds; +}; + +//----------------------------------------------------------------------------- +//@} +#endif diff --git a/trunk/eo/src/es/eoRealOp.h b/trunk/eo/src/es/eoRealOp.h new file mode 100644 index 000000000..c8c6471a5 --- /dev/null +++ b/trunk/eo/src/es/eoRealOp.h @@ -0,0 +1,513 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRealOp.h +// (c) Maarten Keijzer 2000 - Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoRealOp_h +#define eoRealOp_h + +//----------------------------------------------------------------------------- + +#include // swap_ranges +#include +#include +#include + +//----------------------------------------------------------------------------- + +/** eoUniformMutation --> changes all values of the std::vector + by uniform choice with range epsilon + with probability p_change per variable +\class eoUniformMutation eoRealOp.h Tutorial/eoRealOp.h + * + * @ingroup Real + * @ingroup Variators +*/ + +template class eoUniformMutation: public eoMonOp +{ + public: + /** + * Constructor without bounds == unbounded variables :-) + * not very clean, but who's doing unbounded optimization anyway? + * and it's there mostly for backward compatibility + * + * @param _epsilon the range for uniform nutation + * @param _p_change the probability to change a given coordinate + */ + eoUniformMutation(const double& _epsilon, const double& _p_change = 1.0): + homogeneous(true), bounds(eoDummyVectorNoBounds), epsilon(1, _epsilon), + p_change(1, _p_change) {} + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _epsilon the range for uniform mutation - a double to be scaled + * @param _p_change the one probability to change all coordinates + */ + eoUniformMutation(eoRealVectorBounds & _bounds, + const double& _epsilon, const double& _p_change = 1.0): + homogeneous(false), bounds(_bounds), epsilon(_bounds.size(), _epsilon), + p_change(_bounds.size(), _p_change) + { + // scale to the range - if any + for (unsigned i=0; i& _epsilon, + const std::vector& _p_change): + homogeneous(false), bounds(_bounds), epsilon(_epsilon), + p_change(_p_change) {} + + /// The class name. + virtual std::string className() const { return "eoUniformMutation"; } + + /** + * Do it! + * @param _eo The indi undergoing the mutation + */ + bool operator()(EOT& _eo) + { + bool hasChanged=false; + if (homogeneous) // implies no bounds object + for (unsigned lieu=0; lieu<_eo.size(); lieu++) + { + if (rng.flip(p_change[0])) + { + _eo[lieu] += 2*epsilon[0]*rng.uniform()-epsilon[0]; + hasChanged = true; + } + } + else + { + // sanity check ? + if (_eo.size() != bounds.size()) + throw std::runtime_error("Invalid size of indi in eoUniformMutation"); + + for (unsigned lieu=0; lieu<_eo.size(); lieu++) + if (rng.flip(p_change[lieu])) + { + // check the bounds + double emin = _eo[lieu]-epsilon[lieu]; + double emax = _eo[lieu]+epsilon[lieu]; + if (bounds.isMinBounded(lieu)) + emin = std::max(bounds.minimum(lieu), emin); + if (bounds.isMaxBounded(lieu)) + emax = std::min(bounds.maximum(lieu), emax); + _eo[lieu] = emin + (emax-emin)*rng.uniform(); + hasChanged = true; + } + } + return hasChanged; + } + +private: + bool homogeneous; // == no bounds passed in the ctor + eoRealVectorBounds & bounds; + std::vector epsilon; // the ranges for mutation + std::vector p_change; // the proba that each variable is modified +}; + +/** eoDetUniformMutation --> changes exactly k values of the std::vector + by uniform choice with range epsilon +\class eoDetUniformMutation eoRealOp.h Tutorial/eoRealOp.h + * + * @ingroup Real + * @ingroup Variators +*/ + +template class eoDetUniformMutation: public eoMonOp +{ + public: + /** + * (Default) Constructor for homogeneous genotype + * it's there mostly for backward compatibility + * + * @param _epsilon the range for uniform nutation + * @param _no number of coordinate to modify + */ + eoDetUniformMutation(const double& _epsilon, const unsigned& _no = 1): + homogeneous(true), bounds(eoDummyVectorNoBounds), + epsilon(1, _epsilon), no(_no) {} + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _epsilon the range for uniform nutation (to be scaled if necessary) + * @param _no number of coordinate to modify + */ + eoDetUniformMutation(eoRealVectorBounds & _bounds, + const double& _epsilon, const unsigned& _no = 1): + homogeneous(false), bounds(_bounds), + epsilon(_bounds.size(), _epsilon), no(_no) + { + // scale to the range - if any + for (unsigned i=0; i& _epsilon, + const unsigned& _no = 1): + homogeneous(false), bounds(_bounds), epsilon(_epsilon), no(_no) + { + // scale to the range - if any + for (unsigned i=0; i epsilon; // the ranges of mutation + unsigned no; +}; + + +// two arithmetical crossovers + +/** eoSegmentCrossover --> uniform choice in segment + == arithmetical with same value along all coordinates +\class eoSegmentCrossover eoRealOp.h Tutorial/eoRealOp.h + * + * @ingroup Real + * @ingroup Variators +*/ + +template class eoSegmentCrossover: public eoQuadOp +{ + public: + /** + * (Default) Constructor. + * The bounds are initialized with the global object that says: no bounds. + * + * @param _alpha the amount of exploration OUTSIDE the parents + * as in BLX-alpha notation (Eshelman and Schaffer) + * 0 == contractive application + * Must be positive + */ + eoSegmentCrossover(const double& _alpha = 0.0) : + bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) {} + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _alpha the amount of exploration OUTSIDE the parents + * as in BLX-alpha notation (Eshelman and Schaffer) + * 0 == contractive application + * Must be positive + */ + eoSegmentCrossover(eoRealVectorBounds & _bounds, + const double& _alpha = 0.0) : + bounds(_bounds), alpha(_alpha), range(1+2*_alpha) {} + + /// The class name. + virtual std::string className() const { return "eoSegmentCrossover"; } + + /** + * segment crossover - modifies both parents + * @param _eo1 The first parent + * @param _eo2 The first parent + */ + bool operator()(EOT& _eo1, EOT& _eo2) + { + unsigned i; + double r1, r2, fact; + double alphaMin = -alpha; + double alphaMax = 1+alpha; + if (alpha == 0.0) // no check to perform + fact = -alpha + rng.uniform(range); // in [-alpha,1+alpha) + else // look for the bounds for fact + { + for (i=0; i<_eo1.size(); i++) + { + r1=_eo1[i]; + r2=_eo2[i]; + if (r1 != r2) { // otherwise you'll get NAN's + double rmin = std::min(r1, r2); + double rmax = std::max(r1, r2); + double length = rmax - rmin; + if (bounds.isMinBounded(i)) + { + alphaMin = std::max(alphaMin, (bounds.minimum(i)-rmin)/length); + alphaMax = std::min(alphaMax, (rmax-bounds.minimum(i))/length); + } + if (bounds.isMaxBounded(i)) + { + alphaMax = std::min(alphaMax, (bounds.maximum(i)-rmin)/length); + alphaMin = std::max(alphaMin, (rmax-bounds.maximum(i))/length); + } + } + } + fact = alphaMin + (alphaMax-alphaMin)*rng.uniform(); + } + + for (i=0; i<_eo1.size(); i++) + { + r1=_eo1[i]; + r2=_eo2[i]; + _eo1[i] = fact * r1 + (1-fact) * r2; + _eo2[i] = (1-fact) * r1 + fact * r2; + } + return true; // shoudl test if fact was 0 or 1 :-))) + } + +protected: + eoRealVectorBounds & bounds; + double alpha; + double range; // == 1+2*alpha +}; + +/** eoHypercubeCrossover --> uniform choice in hypercube + == arithmetical with different values for each coordinate +\class eoArithmeticCrossover eoRealOp.h Tutorial/eoRealOp.h + * + * @ingroup Real + * @ingroup Variators +*/ +template class eoHypercubeCrossover: public eoQuadOp +{ + public: + /** + * (Default) Constructor. + * The bounds are initialized with the global object that says: no bounds. + * + * @param _alpha the amount of exploration OUTSIDE the parents + * as in BLX-alpha notation (Eshelman and Schaffer) + * 0 == contractive application + * Must be positive + */ + eoHypercubeCrossover(const double& _alpha = 0.0): + bounds(eoDummyVectorNoBounds), alpha(_alpha), range(1+2*_alpha) + { + if (_alpha < 0) + throw std::runtime_error("BLX coefficient should be positive"); + } + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _alpha the amount of exploration OUTSIDE the parents + * as in BLX-alpha notation (Eshelman and Schaffer) + * 0 == contractive application + * Must be positive + */ + eoHypercubeCrossover(eoRealVectorBounds & _bounds, + const double& _alpha = 0.0): + bounds(_bounds), alpha(_alpha), range(1+2*_alpha) + { + if (_alpha < 0) + throw std::runtime_error("BLX coefficient should be positive"); + } + + /// The class name. + virtual std::string className() const { return "eoHypercubeCrossover"; } + + /** + * hypercube crossover - modifies both parents + * @param _eo1 The first parent + * @param _eo2 The first parent + */ + bool operator()(EOT& _eo1, EOT& _eo2) + { + bool hasChanged = false; + unsigned i; + double r1, r2, fact; + if (alpha == 0.0) // no check to perform + for (i=0; i<_eo1.size(); i++) + { + r1=_eo1[i]; + r2=_eo2[i]; + if (r1 != r2) { // otherwise do nothing + fact = rng.uniform(range); // in [0,1) + _eo1[i] = fact * r1 + (1-fact) * r2; + _eo2[i] = (1-fact) * r1 + fact * r2; + hasChanged = true; // forget (im)possible alpha=0 + } + } + else // check the bounds + // do not try to get a bound on the linear factor, but rather + // on the object variables themselves + for (i=0; i<_eo1.size(); i++) + { + r1=_eo1[i]; + r2=_eo2[i]; + if (r1 != r2) { // otherwise do nothing + double rmin = std::min(r1, r2); + double rmax = std::max(r1, r2); + + // compute min and max for object variables + double objMin = -alpha * rmax + (1+alpha) * rmin; + double objMax = -alpha * rmin + (1+alpha) * rmax; + + // first find the limits on the alpha's + if (bounds.isMinBounded(i)) + { + objMin = std::max(objMin, bounds.minimum(i)); + } + if (bounds.isMaxBounded(i)) + { + objMax = std::min(objMax, bounds.maximum(i)); + } + // then draw variables + double median = (objMin+objMax)/2.0; // uniform within bounds + // double median = (rmin+rmax)/2.0; // Bounce on bounds + double valMin = objMin + (median-objMin)*rng.uniform(); + double valMax = median + (objMax-median)*rng.uniform(); + // don't always put large value in _eo1 - or what? + if (rng.flip(0.5)) + { + _eo1[i] = valMin; + _eo2[i] = valMax; + } + else + { + _eo1[i] = valMax; + _eo2[i] = valMin; + } + // seomthing has changed + hasChanged = true; // forget (im)possible alpha=0 + } + } + + return hasChanged; + } + +protected: + eoRealVectorBounds & bounds; + double alpha; + double range; // == 1+2*alphaMin +}; + + +/** eoRealUxOver --> Uniform crossover, also termed intermediate crossover +\class eoRealUxOver eoRealOp.h Tutorial/eoRealOp.h + * + * @ingroup Real + * @ingroup Variators +*/ + +template class eoRealUXover: public eoQuadOp +{ + public: + /** + * (Default) Constructor. + * @param _preference bias in the choice (usually, no bias == 0.5) + */ + eoRealUXover(const float& _preference = 0.5): preference(_preference) + { + if ( (_preference <= 0.0) || (_preference >= 1.0) ) + std::runtime_error("UxOver --> invalid preference"); + } + + /// The class name. + virtual std::string className() const { return "eoRealUXover"; } + + /** + * Uniform crossover for real std::vectors + * @param _eo1 The first parent + * @param _eo2 The second parent + * @exception std::runtime_error if sizes don't match + */ + bool operator()(EOT& _eo1, EOT& _eo2) + { + if ( _eo1.size() != _eo2.size()) + std::runtime_error("UxOver --> chromosomes sizes don't match" ); + bool changed = false; + for (unsigned int i=0; i<_eo1.size(); i++) + { + if (rng.flip(preference)) + if (_eo1[i] != _eo2[i]) + { + double tmp = _eo1[i]; + _eo1[i]=_eo2[i]; + _eo2[i] = tmp; + changed = true; + } + } + return changed; + } + private: + float preference; +}; + + +//----------------------------------------------------------------------------- +//@} +#endif diff --git a/trunk/eo/src/es/eoSBXcross.h b/trunk/eo/src/es/eoSBXcross.h new file mode 100644 index 000000000..40f8ac360 --- /dev/null +++ b/trunk/eo/src/es/eoSBXcross.h @@ -0,0 +1,135 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoSBXcross.h +// (c) Maarten Keijzer 2000 - Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#include // swap_ranges +#include +#include +#include +#include +#include + + + +/** +* @ingroup Real +* @ingroup Variators +*/ +template class eoSBXCrossover: public eoQuadOp +{ + public: + /**** + * (Default) Constructor. + * The bounds are initialized with the global object that says: no bounds. + * + * + */ + eoSBXCrossover(const double& _eta = 1.0) : + bounds(eoDummyVectorNoBounds), eta(_eta), range(1) {} + + + ////////////////////////////////////////////// + + /** + * Constructor with bounds + * @param _bounds an eoRealVectorBounds that contains the bounds + * @param _eta the amount of exploration OUTSIDE the parents + * as in BLX-alpha notation (Eshelman and Schaffer) + * 0 == contractive application + * Must be positive + */ + + + + eoSBXCrossover(eoRealVectorBounds & _bounds, + const double& _eta = 1.0) : + bounds(_bounds), eta(_eta), range(1) {} + + /////////////////////////////////////////////// + + ////////////////////////////////////////////// + + /** + * Constructor from a parser. Will read from the argument parser + * eoRealVectorBounds that contains the bounds + * eta, the SBX parameter + */ + + eoSBXCrossover(eoParser & _parser) : + // First, decide whether the objective variables are bounded + // Warning, must be the same keywords than other possible objectBounds elsewhere + bounds (_parser.getORcreateParam(eoDummyVectorNoBounds, "objectBounds", "Bounds for variables", 'B', "Variation Operators").value()) , + // then get eta value + eta (_parser.getORcreateParam(1.0, "eta", "SBX eta parameter", '\0', "Variation Operators").value()) , + range(1) {} + + + /// The class name. + virtual std::string className() const { return "eoSBXCrossover"; } + + /***************************************** + * SBX crossover - modifies both parents * + * @param _eo1 The first parent * + * @param _eo2 The first parent * + *****************************************/ + bool operator()(EOT& _eo1, EOT& _eo2) + { + unsigned i; + double r1, r2, beta; + + for (i=0; i<_eo1.size(); i++) + { + double u = rng.uniform(range) ; + + if ( u <= 0.5 ) + beta = exp( (1/(eta+1))*log(2*u)); + else + beta = exp((1/(eta+1))*log(1/(2*(1-u)))); + + + + r1=_eo1[i]; + r2=_eo2[i]; + _eo1[i] =0.5*((1+beta)*r1+(1-beta)*r2); + _eo2[i] =0.5*((1-beta)*r1+(1+beta)*r2); + + + if(!(bounds.isInBounds(i,_eo1[i]))) + bounds.foldsInBounds(i,_eo1[i]); + if(!(bounds.isInBounds(i,_eo2[i]))) + bounds.foldsInBounds(i,_eo2[i]); + + + + } + return true; + } + + + +protected: + eoRealVectorBounds & bounds; + double eta; + double range; // == 1 +}; diff --git a/trunk/eo/src/es/make_algo_scalar_es.cpp b/trunk/eo/src/es/make_algo_scalar_es.cpp new file mode 100644 index 000000000..47585a78c --- /dev/null +++ b/trunk/eo/src/es/make_algo_scalar_es.cpp @@ -0,0 +1,84 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_algo_scalar_es.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains ***INSTANCIATED DEFINITIONS*** of select/replace fns + * of the library for evolution of ***eoEs genotypes*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/es.h + * while the TEMPLATIZED code is define in make_algo_scalar.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType(s) +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi + +/// The following function merely call the templatized do_* functions above + +// Algo +/////// +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +////////////// +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +/////////////// +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} diff --git a/trunk/eo/src/es/make_algo_scalar_real.cpp b/trunk/eo/src/es/make_algo_scalar_real.cpp new file mode 100644 index 000000000..1a1796bed --- /dev/null +++ b/trunk/eo/src/es/make_algo_scalar_real.cpp @@ -0,0 +1,60 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_algo_scalar_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains ***INSTANCIATED DEFINITIONS*** of select/replace fns + * of the library for evolution of ***eoReal*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/real.h + * while the TEMPLATIZED code is define in make_algo_scalar.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions above + +// Algo +/////// +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op, _dist); +} + +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op, _dist); +} diff --git a/trunk/eo/src/es/make_checkpoint_es.cpp b/trunk/eo/src/es/make_checkpoint_es.cpp new file mode 100644 index 000000000..12bc78605 --- /dev/null +++ b/trunk/eo/src/es/make_checkpoint_es.cpp @@ -0,0 +1,81 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_checkpoint_es.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains ***INSTANCIATED DEFINITIONS*** of checkpoint fns + * of the library for evolution of ***ES genotypes*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/es.h + * while the TEMPLATIZED code is define in make_checkpoint.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType(s) +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi + +/// The following function merely call the templatized do_* functions + +// checkpoint +///////////// +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +///////////// +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +///////////// +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} diff --git a/trunk/eo/src/es/make_checkpoint_real.cpp b/trunk/eo/src/es/make_checkpoint_real.cpp new file mode 100644 index 000000000..a1cf6d4f3 --- /dev/null +++ b/trunk/eo/src/es/make_checkpoint_real.cpp @@ -0,0 +1,59 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_checkpoint_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains ***INSTANCIATED DEFINITIONS*** of checkpoint fns + * of the library for evolution of ***eoReal*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/real.h + * while the TEMPLATIZED code is define in make_checkpoint.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions + +// checkpoint +///////////// +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} diff --git a/trunk/eo/src/es/make_continue_es.cpp b/trunk/eo/src/es/make_continue_es.cpp new file mode 100644 index 000000000..e50167959 --- /dev/null +++ b/trunk/eo/src/es/make_continue_es.cpp @@ -0,0 +1,81 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_continue_es.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains ***INSTANCIATED DEFINITIONS*** of continuator fns + * of the library for evolution of ***ES genotypes*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/es.h + * while the TEMPLATIZED code is define in make_continue.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType(s) +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi + +/// The following function merely call the templatized do_* functions + +// continue +/////////// +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +/////////// +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +/////////// +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} diff --git a/trunk/eo/src/es/make_continue_real.cpp b/trunk/eo/src/es/make_continue_real.cpp new file mode 100644 index 000000000..060852172 --- /dev/null +++ b/trunk/eo/src/es/make_continue_real.cpp @@ -0,0 +1,59 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_continue_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains ***INSTANCIATED DEFINITIONS*** of continuator fns + * of the library for evolution of ***REAL vectors*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/real.h + * while the TEMPLATIZED code is define in make_continue.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions + +// continue +/////////// +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} diff --git a/trunk/eo/src/es/make_es.h b/trunk/eo/src/es/make_es.h new file mode 100644 index 000000000..46a4e23f6 --- /dev/null +++ b/trunk/eo/src/es/make_es.h @@ -0,0 +1,152 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// es.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains all ***INSTANCIATED*** declarations of all components + * of the library for ***ES-like gnptype*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * + * The corresponding ***INSTANCIATED*** definitions are contained in + * the different .cpp files in the src/es dir, + * while the TEMPLATIZED code is define in the different make_XXX.h files + * either in hte src/do dir for representation independant functions, + * or in the src/es dir for representation dependent stuff. + * + * See also real.h for the similar declarations of eoReal genotypes + * i.e. ***without*** mutation parameters attached to individuals + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +#ifndef es_h +#define es_h + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi + +// include all similar declaration for eoReal - i.e. real-valued genotyes +// without self-adaptation +#include + +/** @addtogroup Builders + * @{ + */ + +//Representation dependent - rewrite everything anew for each representation +////////////////////////// +// the genotypes +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsSimple _eo); +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsSimple _eo); + +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsStdev _eo); +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsStdev _eo); + +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsFull _eo); +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoEsFull _eo); + + + +// the operators +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); + +//Representation INdependent +//////////////////////////// +// you don't need to modify that part even if you use your own representation + +// init pop +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); + +// the continue's +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); + +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); + +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); + +// the checkpoint +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); + +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); + +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); + + +// the algo +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); + +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); + +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); + +// run +void run_ea(eoAlgo >& _ga, eoPop >& _pop); +void run_ea(eoAlgo >& _ga, eoPop >& _pop); + +void run_ea(eoAlgo >& _ga, eoPop >& _pop); +void run_ea(eoAlgo >& _ga, eoPop >& _pop); + +void run_ea(eoAlgo >& _ga, eoPop >& _pop); +void run_ea(eoAlgo >& _ga, eoPop >& _pop); + +// end of parameter input (+ .status + help) +// that one is not templatized, but is here for completeness +void make_help(eoParser & _parser); + +/** @} */ +/** @} */ +#endif diff --git a/trunk/eo/src/es/make_genotype_es.cpp b/trunk/eo/src/es/make_genotype_es.cpp new file mode 100644 index 000000000..41f764cdf --- /dev/null +++ b/trunk/eo/src/es/make_genotype_es.cpp @@ -0,0 +1,121 @@ +/* (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 + +This library is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 2 of the License, or (at your option) any +later version. + +This library is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this library; if not, write to the Free Software Foundation, Inc., 59 +Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk +*/ + + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + + +/** Init functions + +This file contains ***INSTANCIATED DEFINITIONS*** of eoReal Init fns +It should be included in the file that calls any of the corresponding +fns Compiling this file allows one to generate part of the library +(i.e. object files that you just need to link with your own main and +fitness code). + +The corresponding ***INSTANCIATED DECLARATIONS*** are contained in +src/es/make_real.h while the TEMPLATIZED code is define in +make_genotype_real.h + +It is instanciated in src/es/make_genotype_real.cpp - and incorporated +in the ga/libga.a + +It returns an eoInit that can later be used to initialize the +population (see make_pop.h). + +It uses a parser (to get user parameters) and a state (to store the +memory) the last argument is to disambiguate the call upon different +instanciations. + +WARNING: that last argument will generally be the result of calling +the default ctor of EOT, resulting in most cases in an EOT that is +***not properly initialized*** +*/ + +// the templatized code (same for real and es here) +#include + + +/// The following function merely call the templatized do_* functions +eoRealInitBounded >& make_genotype(eoParser& _parser, + eoState& _state, + eoEsSimple _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + + + +eoRealInitBounded >& make_genotype(eoParser& _parser, + eoState& _state, + eoEsSimple _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + + + +eoRealInitBounded >& make_genotype(eoParser& _parser, + eoState& _state, + eoEsStdev _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + + + +eoRealInitBounded >& make_genotype(eoParser& _parser, + eoState& _state, + eoEsStdev _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + + + +eoRealInitBounded > & make_genotype(eoParser& _parser, + eoState& _state, + eoEsFull _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + + + +eoRealInitBounded >& make_genotype(eoParser& _parser, + eoState& _state, + eoEsFull _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + + + + +// Local Variables: +// coding: iso-8859-1 +// c-file-style: "Stroustrup" +// comment-column: 35 +// fill-column: 80 +// End: diff --git a/trunk/eo/src/es/make_genotype_real.cpp b/trunk/eo/src/es/make_genotype_real.cpp new file mode 100644 index 000000000..d5ad238d4 --- /dev/null +++ b/trunk/eo/src/es/make_genotype_real.cpp @@ -0,0 +1,73 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_genotype_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains ***INSTANCIATED DEFINITIONS*** of eoReal Init fns + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/make_real.h + * while the TEMPLATIZED code is define in make_genotype_real.h + * + * It is instanciated in src/es/make_genotype_real.cpp - + * and incorporated in the ga/libga.a + * + * It returns an eoInit that can later be used to initialize + * the population (see make_pop.h). + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is to disambiguate the call upon different instanciations. + * + * WARNING: that last argument will generally be the result of calling + * the default ctor of EOT, resulting in most cases in an EOT + * that is ***not properly initialized*** +*/ + +// the templatized code +#include + +/// The following functions merely call the templatized do_* functions +eoRealInitBounded > & make_genotype(eoParser& _parser, + eoState& _state, + eoReal _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + + + +eoRealInitBounded > & make_genotype(eoParser& _parser, + eoState& _state, + eoReal _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} diff --git a/trunk/eo/src/es/make_genotype_real.h b/trunk/eo/src/es/make_genotype_real.h new file mode 100644 index 000000000..6ab62967f --- /dev/null +++ b/trunk/eo/src/es/make_genotype_real.h @@ -0,0 +1,128 @@ +//----------------------------------------------------------------------------- +/** (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 + +This library is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 2 of the License, or (at your option) any +later version. + +This library is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this library; if not, write to the Free Software Foundation, Inc., 59 +Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk +*/ + + +#ifndef EO_make_genotype_h +#define EO_make_genotype_h + +#include +#include +#include + +#include "es/eoReal.h" +#include "es/eoEsChromInit.h" +#include "utils/eoParser.h" +#include "utils/eoRealVectorBounds.h" +#include "utils/eoState.h" + + +/** @addtogroup Builders + * @{ + */ + +/** Initialize genotype + +This fuction does the initialization of what's needed for a particular genotype +(here, std::vector == eoReal). It could be here tempatied only on the +fitness, as it can be used to evolve bitstrings with any fitness. However, for +consistency reasons, it was finally chosen, as in the rest of EO, to templatize +by the full EOT, as this eventually allows to choose the type of genotype at run +time (see in es dir) + +It is instanciated in src/es/make_genotyupe_real.cpp and incorporated in the +src/es/libes.a + +It returns an eoInit tha can later be used to initialize the population +(see make_pop.h). + +It uses a parser (to get user parameters) and a state (to store the memory) the +last argument is to disambiguate the call upon different instanciations. + +@warning: that last argument will generally be the result of calling the default +ctor of EOT, resulting in most cases in an EOT that is ***not properly +initialized*** +*/ +template +eoEsChromInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT) +{ + // the fitness type + typedef typename EOT::Fitness FitT; + eoEsChromInit *init; + + // for eoReal, only thing needed is the size - but might have been created elswhere ... + eoValueParam& vecSize + = _parser.getORcreateParam(unsigned(10), "vecSize", + "The number of variables ", + 'n', "Genotype Initialization"); + // to build an eoReal Initializer, we need bounds: [-1,1] by default + eoValueParam& boundsParam + = _parser.getORcreateParam(eoRealVectorBounds(vecSize.value(), -1, 1), + "initBounds", + "Bounds for initialization (MUST be bounded)", + 'B', "Genotype Initialization"); + // now some initial value for sigmas - even if useless? + // should be used in Normal mutation + eoValueParam& sigmaParam + = _parser.getORcreateParam(std::string("0.3"), "sigmaInit", + "Initial value for Sigmas (with a '%' -> scaled by the range of each variable)", + 's', "Genotype Initialization"); + // check for % + bool to_scale = false; + size_t pos = sigmaParam.value().find('%'); + if(pos < sigmaParam.value().size()) { + // found a % - use scaling and get rid of '%' + to_scale = true; + sigmaParam.value().resize(pos); + } + std::istringstream is(sigmaParam.value()); + double sigma; + is >> sigma; + // minimum check + if(sigma < 0) + throw std::runtime_error("Negative sigma in make_genotype"); + if(to_scale) + init = new eoEsChromInit(boundsParam.value(), sigma, to_scale); + else { + // define parameter + eoValueParam >& vecSigmaParam + = _parser.getORcreateParam(std::vector(vecSize.value(), sigma), "vecSigmaInit", + "Initial value for Sigmas (only used when initSigma is not scaled)", + 'S', "Genotype Initialization"); + init = new eoEsChromInit(boundsParam.value(), vecSigmaParam.value()); + } + // store in state + _state.storeFunctor(init); + return *init; +} + +/** @} */ +#endif // EO_make_genotype_h + + + +// Local Variables: +// coding: iso-8859-1 +// mode:C++ +// c-file-style: "Stroustrup" +// comment-column: 35 +// fill-column: 80 +// End: diff --git a/trunk/eo/src/es/make_op.h b/trunk/eo/src/es/make_op.h new file mode 100644 index 000000000..1c7fe50e7 --- /dev/null +++ b/trunk/eo/src/es/make_op.h @@ -0,0 +1,299 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op.h - the real-valued version +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_op_h +#define _make_op_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +// the specialized Real stuff +#include +#include +#include +#include + // also need the parser and param includes +#include +#include + + +/** @addtogroup Builders + * @{ + */ + +/* + * This function builds the operators that will be applied to the eoReal + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here: the following only applies to bitstrings + * + * Note : the last parameter is an eoInit: if some operator needs some info + * about the gneotypes, the init has it all (e.g. bounds, ...) + * Simply do + * EOT myEO; + * _init(myEO); + * and myEO is then an ACTUAL object +*/ +template +eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& _init) +{ + // First, decide whether the objective variables are bounded + eoValueParam& boundsParam + = _parser.getORcreateParam(eoParamParamType("(0,1)"), "objectBounds", + "Bounds for variables (unbounded if absent)", + 'B', "Genetic Operators"); + + // get initisalizer size == std::vector size + // eoRealInitBounded * realInit = (eoRealInitBounded*)(&_init); + // unsigned vecSize = realInit->theBounds().size(); + + // get std::vector size: safer??? + EOT eoTmp; + _init(eoTmp); + unsigned vecSize = eoTmp.size(); + + // the bounds pointer + eoRealVectorBounds * ptBounds; + if (_parser.isItThere(boundsParam)) // otherwise, no bounds + { + /////Warning: this code should probably be replaced by creating + ///// some eoValueParam with specific implementation + //// in eoParser.cpp. At the moemnt, it is there (cf also make_genotype + eoParamParamType & ppBounds = boundsParam.value(); // std::pair > + // transform into a std::vector + std::vector v; + std::vector::iterator it; + for (it=ppBounds.second.begin(); itc_str()); + double r; + is >> r; + v.push_back(r); + } + // now create the eoRealVectorBounds object + if (v.size() == 2) // a min and a max for all variables + ptBounds = new eoRealVectorBounds(vecSize, v[0], v[1]); + else // no time now + throw std::runtime_error("Sorry, only unique bounds for all variables implemented at the moment. Come back later"); + // we need to give ownership of this pointer to somebody + /////////// end of temporary code + } + else // no param for bounds was given + ptBounds = new eoRealVectorNoBounds(vecSize); // DON'T USE eoDummyVectorNoBounds + // as it does not have any dimension + + // this is a temporary version(!), + // while Maarten codes the full tree-structured general operator input + // BTW we must leave that simple version available somehow, as it is the one + // that 90% people use! + eoValueParam& operatorParam + = _parser.getORcreateParam(std::string("SGA"), "operator", + "Description of the operator (SGA only now)", + 'o', "Genetic Operators"); + + if (operatorParam.value() != std::string("SGA")) + throw std::runtime_error("Sorry, only SGA-like operator available right now\n"); + + // now we read Pcross and Pmut, + // the relative weights for all crossovers -> proportional choice + // the relative weights for all mutations -> proportional choice + // and create the eoGenOp that is exactly + // crossover with pcross + mutation with pmut + + eoValueParam& pCrossParam + = _parser.getORcreateParam(0.6, "pCross", "Probability of Crossover", + 'C', "Genetic Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw std::runtime_error("Invalid pCross"); + + eoValueParam& pMutParam + = _parser.getORcreateParam(0.1, "pMut", "Probability of Mutation", + 'M', "Genetic Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw std::runtime_error("Invalid pMut"); + + // the crossovers + ///////////////// + // the parameters + eoValueParam& segmentRateParam + = _parser.getORcreateParam(double(1.0), "segmentRate", + "Relative rate for segment crossover", + 's', "Genetic Operators" ); + // minimum check + if ( (segmentRateParam.value() < 0) ) + throw std::runtime_error("Invalid segmentRate"); + + eoValueParam& arithmeticRateParam + = _parser.getORcreateParam(double(2.0), "arithmeticRate", + "Relative rate for arithmetic crossover", + 'A', "Genetic Operators" ); + // minimum check + if ( (arithmeticRateParam.value() < 0) ) + throw std::runtime_error("Invalid arithmeticRate"); + + // minimum check + bool bCross = true; + if (segmentRateParam.value()+arithmeticRateParam.value()==0) + { + std::cerr << "Warning: no crossover" << std::endl; + bCross = false; + } + + // Create the CombinedQuadOp + eoPropCombinedQuadOp *ptCombinedQuadOp = NULL; + eoQuadOp *ptQuad = NULL; + + if (bCross) + { + // segment crossover for bitstring - pass it the bounds + ptQuad = new eoSegmentCrossover(*ptBounds); + _state.storeFunctor(ptQuad); + ptCombinedQuadOp = new eoPropCombinedQuadOp(*ptQuad, segmentRateParam.value()); + + // arithmetic crossover + ptQuad = new eoArithmeticCrossover(*ptBounds); + _state.storeFunctor(ptQuad); + ptCombinedQuadOp->add(*ptQuad, arithmeticRateParam.value()); + + // don't forget to store the CombinedQuadOp + _state.storeFunctor(ptCombinedQuadOp); + } + + // the mutations + ///////////////// + // the parameters + eoValueParam & epsilonParam + = _parser.getORcreateParam(0.01, "epsilon", "Half-size of interval for Uniform Mutation", + 'e', "Genetic Operators" ); + // minimum check + if ( (epsilonParam.value() < 0) ) + throw std::runtime_error("Invalid epsilon"); + + eoValueParam & uniformMutRateParam + = _parser.getORcreateParam(1.0, "uniformMutRate", + "Relative rate for uniform mutation", 'u', "Genetic Operators" ); + // minimum check + if ( (uniformMutRateParam.value() < 0) ) + throw std::runtime_error("Invalid uniformMutRate"); + + eoValueParam & detMutRateParam + = _parser.getORcreateParam(1.0, "detMutRate", + "Relative rate for deterministic uniform mutation", + 'd', "Genetic Operators" ); + // minimum check + if ( (detMutRateParam.value() < 0) ) + throw std::runtime_error("Invalid detMutRate"); + + eoValueParam & normalMutRateParam + = _parser.getORcreateParam(1.0, "normalMutRate", + "Relative rate for Gaussian mutation", + 'd', "Genetic Operators" ); + // minimum check + if ( (normalMutRateParam.value() < 0) ) + throw std::runtime_error("Invalid normalMutRate"); + // and the sigma + eoValueParam & sigmaParam + = _parser.getORcreateParam(1.0, "sigma", + "Sigma (fixed) for Gaussian mutation", + 'S', "Genetic Operators" ); + // minimum check + if ( (sigmaParam.value() < 0) ) + throw std::runtime_error("Invalid sigma"); + + // minimum check + bool bMut = true; + if (uniformMutRateParam.value()+detMutRateParam.value()+normalMutRateParam.value()==0) + { + std::cerr << "Warning: no mutation" << std::endl; + bMut = false; + } + if (!bCross && !bMut) + throw std::runtime_error("No operator called in SGA operator definition!!!"); + + // Create the CombinedMonOp + eoPropCombinedMonOp *ptCombinedMonOp = NULL; + eoMonOp *ptMon = NULL; + + if (bMut) + { + // uniform mutation on all components: + // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] + ptMon = new eoUniformMutation(*ptBounds, epsilonParam.value()); + _state.storeFunctor(ptMon); + // create the CombinedMonOp + ptCombinedMonOp = new eoPropCombinedMonOp(*ptMon, uniformMutRateParam.value()); + + // mutate exactly 1 component (uniformly) per individual + ptMon = new eoDetUniformMutation(*ptBounds, epsilonParam.value()); + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, detMutRateParam.value()); + + // mutate all component using Gaussian mutation + ptMon = new eoNormalMutation(*ptBounds, sigmaParam.value()); + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, normalMutRateParam.value()); + _state.storeFunctor(ptCombinedMonOp); + } + + // now build the eoGenOp: + // to simulate SGA (crossover with proba pCross + mutation with proba pMut + // we must construct + // a sequential combination of + // with proba 1, a proportional combination of + // a QuadCopy and our crossover + // with proba pMut, our mutation + + // the crossover - with probability pCross + eoProportionalOp * cross = new eoProportionalOp ; + _state.storeFunctor(cross); + ptQuad = new eoQuadCloneOp; + _state.storeFunctor(ptQuad); + cross->add(*ptCombinedQuadOp, pCrossParam.value()); // user crossover + cross->add(*ptQuad, 1-pCrossParam.value()); // clone operator + + // now the sequential + eoSequentialOp *op = new eoSequentialOp; + _state.storeFunctor(op); + op->add(*cross, 1.0); // always crossover (but clone with prob 1-pCross + op->add(*ptCombinedMonOp, pMutParam.value()); + + // that's it! + return *op; +} +/** @} */ +#endif diff --git a/trunk/eo/src/es/make_op_es.cpp b/trunk/eo/src/es/make_op_es.cpp new file mode 100644 index 000000000..4dfbacf34 --- /dev/null +++ b/trunk/eo/src/es/make_op_es.cpp @@ -0,0 +1,79 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains ***INSTANCIATED DEFINITIONS*** of operators fns + * of the library for ***eoReal*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in es.h in src/es dir + * while the TEMPLATIZED code is define in make_op.h in the es dir + * + */ + +// Templatized code +#include + +/// The following function merely call the templatized do_* functions above + +// operators +//////////// +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) +{ + return do_make_op(_parser, _state, _init); +} + +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) +{ + return do_make_op(_parser, _state, _init); +} + +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) +{ + return do_make_op(_parser, _state, _init); +} + +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) +{ + return do_make_op(_parser, _state, _init); +} + +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) +{ + return do_make_op(_parser, _state, _init); +} + +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) +{ + return do_make_op(_parser, _state, _init); +} diff --git a/trunk/eo/src/es/make_op_es.h b/trunk/eo/src/es/make_op_es.h new file mode 100644 index 000000000..00a3373f9 --- /dev/null +++ b/trunk/eo/src/es/make_op_es.h @@ -0,0 +1,202 @@ +/* (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 + +This library is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 2 of the License, or (at your option) any +later version. + +This library is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this library; if not, write to the Free Software Foundation, Inc., 59 +Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ + + +#ifndef EO_make_op_h +#define EO_make_op_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +// the specialized Real stuff +#include +#include +#include +#include +#include +#include +#include + // also need the parser and param includes +#include +#include + + +/** @addtogroup Builders + * @{ + */ + +/* + * This function builds the operators that will be applied to the eoReal + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here: the following only applies to bitstrings + * + * Note : the last parameter is an eoInit: if some operator needs some info + * about the gneotypes, the init has it all (e.g. bounds, ...) + * Simply do + * EOT myEO; + * _init(myEO); + * and myEO is then an ACTUAL object +*/ + +template +eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded& _init) +{ + // get std::vector size + unsigned vecSize = _init.size(); + + // First, decide whether the objective variables are bounded + eoValueParam& boundsParam + = _parser.getORcreateParam(eoRealVectorBounds(vecSize,eoDummyRealNoBounds), + "objectBounds", "Bounds for variables", + 'B', "Variation Operators"); + + std::cerr << boundsParam.value() << std::endl; + + // now we read Pcross and Pmut, + eoValueParam& operatorParam + = _parser.getORcreateParam(std::string("SGA"), "operator", + "Description of the operator (SGA only now)", + 'o', "Variation Operators"); + + if (operatorParam.value() != std::string("SGA")) + throw std::runtime_error("Sorry, only SGA-like operator available right now\n"); + + // now we read Pcross and Pmut, + // and create the eoGenOp that is exactly + // crossover with pcross + mutation with pmut + + eoValueParam& pCrossParam + = _parser.getORcreateParam(1.0, "pCross", "Probability of Crossover", + 'C', "Variation Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw std::runtime_error("Invalid pCross"); + + eoValueParam& pMutParam + = _parser.getORcreateParam(1.0, "pMut", "Probability of Mutation", + 'M', "Variation Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw std::runtime_error("Invalid pMut"); + + + // crossover + ///////////// + // ES crossover + eoValueParam& crossTypeParam + = _parser.getORcreateParam(std::string("global"), "crossType", + "Type of ES recombination (global or standard)", + 'C', "Variation Operators"); + + eoValueParam& crossObjParam + = _parser.getORcreateParam(std::string("discrete"), "crossObj", + "Recombination of object variables (discrete, intermediate or none)", + 'O', "Variation Operators"); + eoValueParam& crossStdevParam + = _parser.getORcreateParam(std::string("intermediate"), "crossStdev", + "Recombination of mutation strategy parameters " + "(intermediate, discrete or none)", + 'S', "Variation Operators"); + + // The pointers: first the atom Xover + eoBinOp *ptObjAtomCross = NULL; + eoBinOp *ptStdevAtomCross = NULL; + // then the EOT-level one (need to be an eoGenOp as global Xover is + eoGenOp *ptCross; + + // check for the atom Xovers + if (crossObjParam.value() == std::string("discrete")) + ptObjAtomCross = new eoDoubleExchange; + else if (crossObjParam.value() == std::string("intermediate")) + ptObjAtomCross = new eoDoubleIntermediate; + else if (crossObjParam.value() == std::string("none")) + ptObjAtomCross = new eoBinCloneOp; + else throw std::runtime_error("Invalid Object variable crossover type"); + + if (crossStdevParam.value() == std::string("discrete")) + ptStdevAtomCross = new eoDoubleExchange; + else if (crossStdevParam.value() == std::string("intermediate")) + ptStdevAtomCross = new eoDoubleIntermediate; + else if (crossStdevParam.value() == std::string("none")) + ptStdevAtomCross = new eoBinCloneOp; + else throw std::runtime_error("Invalid mutation strategy parameter crossover type"); + + // and build the indi Xover + if (crossTypeParam.value() == std::string("global")) + ptCross = new eoEsGlobalXover(*ptObjAtomCross, *ptStdevAtomCross); + else if (crossTypeParam.value() == std::string("standard")) + { // using a standard eoBinOp, but wrap it into an eoGenOp + eoBinOp & crossTmp = _state.storeFunctor( + new eoEsStandardXover(*ptObjAtomCross, *ptStdevAtomCross) + ); + ptCross = new eoBinGenOp(crossTmp); + } + else throw std::runtime_error("Invalide Object variable crossover type"); + + // now that everything is OK, DON'T FORGET TO STORE MEMORY + _state.storeFunctor(ptObjAtomCross); + _state.storeFunctor(ptStdevAtomCross); + _state.storeFunctor(ptCross); + + // mutation + ///////////// + + // Ok, time to set up the self-adaptive mutation + // Proxy for the mutation parameters + eoEsMutationInit mutateInit(_parser, "Variation Operators"); + + eoEsMutate & mut = _state.storeFunctor( + new eoEsMutate(mutateInit, boundsParam.value())); + + // now the general op - a sequential application of crossover and mutatation + // no need to first have crossover combined with a clone as it is an + // eoBinOp and not an eoQuadOp as in SGA paradigm + + eoSequentialOp & op = _state.storeFunctor(new eoSequentialOp); + op.add(*ptCross, pCrossParam.value()); + op.add(mut, pMutParam.value()); + + // that's it! + return op; +} +#endif // EO_make_op_h + + +/** @} */ + +// Local Variables: +// coding: iso-8859-1 +// mode:C++ +// c-file-style: "Stroustrup" +// comment-column: 35 +// fill-column: 80 +// End: diff --git a/trunk/eo/src/es/make_op_real.cpp b/trunk/eo/src/es/make_op_real.cpp new file mode 100644 index 000000000..b429cd411 --- /dev/null +++ b/trunk/eo/src/es/make_op_real.cpp @@ -0,0 +1,59 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains ***INSTANCIATED DEFINITIONS*** of operators fns + * of the library for ***eoReal*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in es.h in src/es dir + * while the TEMPLATIZED code is define in make_op.h in the es dir + * + */ + +// Templatized code +#include + +/// The following function merely call the templatized do_* functions above + +// oeprators +//////////// +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) +{ + return do_make_op(_parser, _state, _init); +} + +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init) +{ + return do_make_op(_parser, _state, _init); +} diff --git a/trunk/eo/src/es/make_op_real.h b/trunk/eo/src/es/make_op_real.h new file mode 100644 index 000000000..19a8b16b6 --- /dev/null +++ b/trunk/eo/src/es/make_op_real.h @@ -0,0 +1,289 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op.h - the real-valued version +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_op_h +#define _make_op_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +// the specialized Real stuff +#include +#include +#include +#include + // also need the parser and param includes +#include +#include + + +/** @addtogroup Builders + * @{ + */ + +/* + * This function builds the operators that will be applied to the eoReal + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here: the following only applies to bitstrings + * + * Note : the last parameter is an eoInit: if some operator needs some info + * about the gneotypes, the init has it all (e.g. bounds, ...) + * Simply do + * EOT myEO; + * _init(myEO); + * and myEO is then an ACTUAL object +*/ + +template +eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoRealInitBounded& _init) +{ + // get std::vector size + unsigned vecSize = _init.size(); + + // First, decide whether the objective variables are bounded + eoValueParam& boundsParam + = _parser.getORcreateParam(eoRealVectorBounds(vecSize,eoDummyRealNoBounds), "objectBounds", + "Bounds for variables", 'B', "Variation Operators"); + + // this is a temporary version(!), + // while Maarten codes the full tree-structured general operator input + // BTW we must leave that simple version available somehow, as it is the one + // that 90% people use! + eoValueParam& operatorParam + = _parser.getORcreateParam(std::string("SGA"), "operator", + "Description of the operator (SGA only now)", + 'o', "Variation Operators"); + + if (operatorParam.value() != std::string("SGA")) + throw std::runtime_error("Sorry, only SGA-like operator available right now\n"); + + // now we read Pcross and Pmut, + // the relative weights for all crossovers -> proportional choice + // the relative weights for all mutations -> proportional choice + // and create the eoGenOp that is exactly + // crossover with pcross + mutation with pmut + + eoValueParam& pCrossParam + = _parser.getORcreateParam(0.6, "pCross", + "Probability of Crossover", + 'C', "Variation Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw std::runtime_error("Invalid pCross"); + + eoValueParam& pMutParam + = _parser.getORcreateParam(0.1, "pMut", + "Probability of Mutation", + 'M', "Variation Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw std::runtime_error("Invalid pMut"); + + // the crossovers + ///////////////// + // the parameters + eoValueParam& alphaParam + = _parser.getORcreateParam(double(0.0), "alpha", + "Bound for factor of linear recombinations", + 'a', "Variation Operators" ); + // minimum check + if ( (alphaParam.value() < 0) ) + throw std::runtime_error("Invalid BLX coefficient alpha"); + + + eoValueParam& segmentRateParam + = _parser.getORcreateParam(double(1.0), "segmentRate", + "Relative rate for segment crossover", + 's', "Variation Operators" ); + // minimum check + if ( (segmentRateParam.value() < 0) ) + throw std::runtime_error("Invalid segmentRate"); + + eoValueParam& hypercubeRateParam + = _parser.getORcreateParam(double(1.0), "hypercubeRate", + "Relative rate for hypercube crossover", + 'A', "Variation Operators" ); + // minimum check + if ( (hypercubeRateParam.value() < 0) ) + throw std::runtime_error("Invalid hypercubeRate"); + + eoValueParam& uxoverRateParam + = _parser.getORcreateParam(double(1.0), "uxoverRate", + "Relative rate for uniform crossover", + 'A', "Variation Operators" ); + // minimum check + if ( (uxoverRateParam.value() < 0) ) + throw std::runtime_error("Invalid uxoverRate"); + + // minimum check + bool bCross = true; + if (segmentRateParam.value()+hypercubeRateParam.value()+uxoverRateParam.value()==0) + { + std::cerr << "Warning: no crossover" << std::endl; + bCross = false; + } + + // Create the CombinedQuadOp + eoPropCombinedQuadOp *ptCombinedQuadOp = NULL; + eoQuadOp *ptQuad = NULL; + + if (bCross) + { + // segment crossover for bitstring - pass it the bounds + ptQuad = new eoSegmentCrossover(boundsParam.value(), alphaParam.value()); + _state.storeFunctor(ptQuad); + ptCombinedQuadOp = new eoPropCombinedQuadOp(*ptQuad, segmentRateParam.value()); + + // hypercube crossover + ptQuad = new eoHypercubeCrossover(boundsParam.value(), alphaParam.value()); + _state.storeFunctor(ptQuad); + ptCombinedQuadOp->add(*ptQuad, hypercubeRateParam.value()); + + // uniform crossover + ptQuad = new eoRealUXover(); + _state.storeFunctor(ptQuad); + ptCombinedQuadOp->add(*ptQuad, uxoverRateParam.value()); + + // don't forget to store the CombinedQuadOp + _state.storeFunctor(ptCombinedQuadOp); + } + + // the mutations + ///////////////// + // the parameters + eoValueParam & epsilonParam + = _parser.getORcreateParam(0.01, "epsilon", + "Half-size of interval for Uniform Mutation", + 'e', "Variation Operators" ); + // minimum check + if ( (epsilonParam.value() < 0) ) + throw std::runtime_error("Invalid epsilon"); + + eoValueParam & uniformMutRateParam + = _parser.getORcreateParam(1.0, "uniformMutRate", + "Relative rate for uniform mutation", + 'u', "Variation Operators" ); + // minimum check + if ( (uniformMutRateParam.value() < 0) ) + throw std::runtime_error("Invalid uniformMutRate"); + + eoValueParam & detMutRateParam + = _parser.getORcreateParam(1.0, "detMutRate", + "Relative rate for deterministic uniform mutation", + 'd', "Variation Operators" ); + // minimum check + if ( (detMutRateParam.value() < 0) ) + throw std::runtime_error("Invalid detMutRate"); + + eoValueParam & normalMutRateParam + = _parser.getORcreateParam(1.0, "normalMutRate", + "Relative rate for Gaussian mutation", 'd', "Variation Operators" ); + // minimum check + if ( (normalMutRateParam.value() < 0) ) + throw std::runtime_error("Invalid normalMutRate"); + + eoValueParam & sigmaParam + = _parser.getORcreateParam(0.3, "sigma", + "Sigma (fixed) for Gaussian mutation", + 's', "Variation Operators" ); + + eoValueParam & pNormalParam + = _parser.getORcreateParam(1.0, "pNormal", + "Proba. to change each variable for Gaussian mutation", + 's', "Variation Operators" ); + + // minimum check + bool bMut = true; + if (uniformMutRateParam.value()+detMutRateParam.value()+normalMutRateParam.value()==0) + { + std::cerr << "Warning: no mutation" << std::endl; + bMut = false; + } + if (!bCross && !bMut) + throw std::runtime_error("No operator called in SGA operator definition!!!"); + + // Create the CombinedMonOp + eoPropCombinedMonOp *ptCombinedMonOp = NULL; + eoMonOp *ptMon = NULL; + + if (bMut) + { + // uniform mutation on all components: + // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] + ptMon = new eoUniformMutation(boundsParam.value(), epsilonParam.value()); + _state.storeFunctor(ptMon); + // create the CombinedMonOp + ptCombinedMonOp = new eoPropCombinedMonOp(*ptMon, uniformMutRateParam.value()); + + // mutate exactly 1 component (uniformly) per individual + ptMon = new eoDetUniformMutation(boundsParam.value(), epsilonParam.value()); + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, detMutRateParam.value()); + + // mutate all component using Gaussian mutation + ptMon = new eoNormalVecMutation(boundsParam.value(), sigmaParam.value(), pNormalParam.value()); + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, normalMutRateParam.value()); + _state.storeFunctor(ptCombinedMonOp); + } + + // now build the eoGenOp: + // to simulate SGA (crossover with proba pCross + mutation with proba pMut + // we must construct + // a sequential combination of + // with proba 1, a proportional combination of + // a QuadCopy and our crossover + // with proba pMut, our mutation + + // the crossover - with probability pCross + eoProportionalOp * cross = new eoProportionalOp ; + _state.storeFunctor(cross); + ptQuad = new eoQuadCloneOp; + _state.storeFunctor(ptQuad); + cross->add(*ptCombinedQuadOp, pCrossParam.value()); // user crossover + cross->add(*ptQuad, 1-pCrossParam.value()); // clone operator + + // now the sequential + eoSequentialOp & op = _state.storeFunctor(new eoSequentialOp); + op.add(*cross, 1.0); // always crossover (but clone with prob 1-pCross + op.add(*ptCombinedMonOp, pMutParam.value()); + + // that's it! + return op; +} +/** @} */ +#endif diff --git a/trunk/eo/src/es/make_pop_es.cpp b/trunk/eo/src/es/make_pop_es.cpp new file mode 100644 index 000000000..4f72e3441 --- /dev/null +++ b/trunk/eo/src/es/make_pop_es.cpp @@ -0,0 +1,84 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_pop_es.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains ***INSTANCIATED DEFINITIONS*** of pop. init. fns + * of the library for evolution of ***ES genotypes*** indis inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/es.h + * while the TEMPLATIZED code is define in make_pop.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType(s) +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi + +/// The following function merely call the templatized do_* functions above + +// Init POP +/////////// +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +/////////// +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +/////////// +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} diff --git a/trunk/eo/src/es/make_pop_real.cpp b/trunk/eo/src/es/make_pop_real.cpp new file mode 100644 index 000000000..968e7251e --- /dev/null +++ b/trunk/eo/src/es/make_pop_real.cpp @@ -0,0 +1,60 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_pop_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains ***INSTANCIATED DEFINITIONS*** of pop. init. fns + * of the library for evolution of ***eoReal*** indis inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/real.h + * while the TEMPLATIZED code is define in make_pop.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions above + +// Init POP +/////////// +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} diff --git a/trunk/eo/src/es/make_real.h b/trunk/eo/src/es/make_real.h new file mode 100644 index 000000000..bc04ba1f1 --- /dev/null +++ b/trunk/eo/src/es/make_real.h @@ -0,0 +1,107 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// real.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains all ***INSTANCIATED*** declarations of all components + * of the library for ***std::vector*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * + * The corresponding ***INSTANCIATED*** definitions are contained in + * the different .cpp files in the src/es dir, + * while the TEMPLATIZED code is define in the different make_XXX.h files + * either in hte src/do dir for representation independant functions, + * or in the src/es dir for representation dependent stuff. + * + * See also es.h for the similar declarations of ES-like genotypes + * i.e. ***with*** mutation parameters attached to individuals + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +#ifndef real_h +#define real_h + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +//Representation dependent - rewrite everything anew for each representation +////////////////////////// + + +/** @addtogroup Builders + * @{ + */ +// the genotypes +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoReal _eo); +eoRealInitBounded > & make_genotype(eoParser& _parser, eoState& _state, eoReal _eo); + +// the operators +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoRealInitBounded >& _init); + +//Representation INdependent +//////////////////////////// +// you don't need to modify that part even if you use your own representation + +// init pop +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); + +// the continue's +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); + +// the checkpoint +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); + + +// the algo +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); + +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); + +// run +void run_ea(eoAlgo >& _ga, eoPop >& _pop); +void run_ea(eoAlgo >& _ga, eoPop >& _pop); + +// end of parameter input (+ .status + help) +// that one is not templatized +// Because of that, the source is in src/utils dir +void make_help(eoParser & _parser); + +/** @} */ +#endif diff --git a/trunk/eo/src/es/make_run_es.cpp b/trunk/eo/src/es/make_run_es.cpp new file mode 100644 index 000000000..59912a7f8 --- /dev/null +++ b/trunk/eo/src/es/make_run_es.cpp @@ -0,0 +1,86 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_run_es.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains ***INSTANCIATED DEFINITIONS*** of run funs + * of the library for evolution of ***ES genotypes*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/es.h + * while the TEMPLATIZED code is define in make_run.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType(s) +#include // one Sigma per individual +#include // one sigmal per object variable +#include // full correlation matrix per indi +// the instanciating fitnesses +#include + +/// The following function merely call the templatized do_* functions above + +// run +///////// +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +///////// +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +///////// +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} diff --git a/trunk/eo/src/es/make_run_real.cpp b/trunk/eo/src/es/make_run_real.cpp new file mode 100644 index 000000000..2c61963c6 --- /dev/null +++ b/trunk/eo/src/es/make_run_real.cpp @@ -0,0 +1,62 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_run_real.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains ***INSTANCIATED DEFINITIONS*** of run funs + * of the library for evolution of ***eoReal*** inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/es/real.h + * while the TEMPLATIZED code is define in make_run.h in the src/do dir + */ + +// The templatized code +#include +// the instanciating EOType +#include +// the instanciating fitnesses +#include + +/// The following function merely call the templatized do_* functions above + +// run +///////// +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} diff --git a/trunk/eo/src/es/matrices.h b/trunk/eo/src/es/matrices.h new file mode 100644 index 000000000..82d890f73 --- /dev/null +++ b/trunk/eo/src/es/matrices.h @@ -0,0 +1,45 @@ +#ifndef MATRICES_H +#define MATRICES_H + +#include + +/** @ingroup Utilities + */ +class lower_triangular_matrix { + + unsigned n; + std::vector data; + + public: + + lower_triangular_matrix(unsigned n_ = 0) : n(n_), data(n * (n+1) / 2) {}; + + void resize(unsigned n_) { + n = n_; + data.resize(n*(n+1)/2); + } + + std::vector::iterator operator[](unsigned i) { return data.begin() + i * (i+1) / 2; } + std::vector::const_iterator operator[](unsigned i) const { return data.begin() + i*(i+1)/2; } +}; + +/** @ingroup Utilities + */ +class square_matrix { + unsigned n; + std::vector data; + + public: + + square_matrix(unsigned n_ = 0) : n(n_), data(n * n) {}; + + void resize(unsigned n_) { + n = n_; + data.resize(n*n); + } + + std::vector::iterator operator[](unsigned i) { return data.begin() + i * n; } + std::vector::const_iterator operator[](unsigned i) const { return data.begin() + i*n; } +}; + +#endif diff --git a/trunk/eo/src/ga.h b/trunk/eo/src/ga.h new file mode 100644 index 000000000..6abb0181a --- /dev/null +++ b/trunk/eo/src/ga.h @@ -0,0 +1,42 @@ +//----------------------------------------------------------------------------- +// ga.h +// (c) GeNeura Team 1998 - 2000, Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#ifndef _ga_h +#define _ga_h + +// all bitstring-specific files +#include + +// the operators +#include + +// #include to be corrected - thanks someone! + +//----------------------------------------------------------------------------- + +#endif diff --git a/trunk/eo/src/ga/CMakeLists.txt b/trunk/eo/src/ga/CMakeLists.txt new file mode 100644 index 000000000..ffc6683f7 --- /dev/null +++ b/trunk/eo/src/ga/CMakeLists.txt @@ -0,0 +1,35 @@ +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +###################################################################################### +### 2) Define the ga target +###################################################################################### + +SET(GA_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) +SET(LIBRARY_OUTPUT_PATH ${GA_LIB_OUTPUT_PATH}) + +SET(GA_SOURCES + make_algo_scalar_ga.cpp + make_checkpoint_ga.cpp + make_continue_ga.cpp + make_genotype_ga.cpp + make_op_ga.cpp + make_pop_ga.cpp + make_run_ga.cpp + ) + +ADD_LIBRARY(ga STATIC ${GA_SOURCES}) +INSTALL(TARGETS ga ARCHIVE DESTINATION ${LIB} COMPONENT libraries) + +###################################################################################### +### 3) Optionnal +###################################################################################### + +SET(GA_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(ga PROPERTIES VERSION "${GA_VERSION}") + +###################################################################################### diff --git a/trunk/eo/src/ga/ChangeLog b/trunk/eo/src/ga/ChangeLog new file mode 100644 index 000000000..56ed12d06 --- /dev/null +++ b/trunk/eo/src/ga/ChangeLog @@ -0,0 +1,11 @@ +2007-08-21 Jochen Küpper + + * eoBitOp.h (eoNPtsBitXover::operator()): Make sure bit is within + allocated length of vector points: [0, max_size). + + + * Local Variables: + * coding: iso-8859-1 + * mode: flyspell + * fill-column: 80 + * End: diff --git a/trunk/eo/src/ga/Readme b/trunk/eo/src/ga/Readme new file mode 100644 index 000000000..3d9b8663f --- /dev/null +++ b/trunk/eo/src/ga/Readme @@ -0,0 +1,20 @@ +This directory contains: + +- some standard EO source files, named eoXXXXX, that define objects +for the eoBit representation (bitstrings). + +- some make_XXX.cpp files that are instanciations for EO bitstrings +(eoBit AND eoBit) of the tempatized code +that is defined in the EO src/do dir. +This MK's trick allows to actually compile all these bits in a library +(eolibga.a) and to only recompile the bits you need for your own +(bitstring!) application. +@see src/do/make_XXX.h files, and test/t-eoGA.cpp for an example use. + +Note: +Also are *defined* here two representation dependent make_XXX.h files +(together with their instanciations in make_XXX.cpp), namely the ones +that constructs the EOType initializer (make_genotype.h) and the one +that buils up the operators (make_op.h). + +MS, April 23, 2001CVS diff --git a/trunk/eo/src/ga/eoBit.h b/trunk/eo/src/ga/eoBit.h new file mode 100644 index 000000000..c1bc9c75e --- /dev/null +++ b/trunk/eo/src/ga/eoBit.h @@ -0,0 +1,128 @@ +/* + eoBit.h + (c) GeNeura Team 1998, Marc Schoenauer 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr +*/ + +/* MS, Nov. 23, 2000 + Added the calls to base class I/O routines that print the fitness + Left printing/reading of the size of the bitstring, + for backward compatibility, and as it is a general practice in EO + + MS, Feb. 7, 2001 + replaced all ...Bin... names with ...Bit... names - for bitstring + as it was ambiguous with bin...ary things +*/ + +#ifndef eoBit_h +#define eoBit_h + +//----------------------------------------------------------------------------- + +#include +#include +#include +#include + +#include "eoVector.h" + +/** @defgroup bitstring Bit strings + +Various functions for a bitstring representation. + +Example of a complete test program that use various bitstrings operators: +@include t-eobin.cpp + +@ingroup Representations +*/ + +/** Implementation of bitstring chromosome. + +@class eoBit eoBit.h ga/eoBit.h +@ingroup bitstring + +Based on STL's std::vector specialization. +*/ +template class eoBit: public eoVector +{ +public: + + using eoVector< FitT, bool >::begin; + using eoVector< FitT, bool >::end; + using eoVector< FitT, bool >::resize; + using eoVector< FitT, bool >::size; + + /** + * (Default) Constructor. + * @param size Size of the binary std::string. + * @param value Default value. + */ + eoBit(unsigned size = 0, bool value = false): + eoVector(size, value) {} + + /// My class name. + virtual std::string className() const + { + return "eoBit"; + } + + /** + * To print me on a stream. + * @param os The std::ostream. + */ + virtual void printOn(std::ostream& os) const + { + EO::printOn(os); + os << ' '; + os << size() << ' '; + std::copy(begin(), end(), std::ostream_iterator(os)); + } + + /** + * To read me from a stream. + * @param is The std::istream. + */ + virtual void readFrom(std::istream& is) + { + EO::readFrom(is); + unsigned s; + is >> s; + std::string bits; + is >> bits; + if (is) + { + resize(bits.size()); + std::transform(bits.begin(), bits.end(), begin(), + std::bind2nd(std::equal_to(), '1')); + } + } +}; + +//----------------------------------------------------------------------------- + +#endif //eoBit_h + + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-offsets: ((c . 0)) +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/eo/src/ga/eoBitOp.h b/trunk/eo/src/ga/eoBitOp.h new file mode 100644 index 000000000..15d77434d --- /dev/null +++ b/trunk/eo/src/ga/eoBitOp.h @@ -0,0 +1,496 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoBitOp.h +// (c) GeNeura Team, 2000 - EEAAX 2000 - Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + CVS Info: $Date: 2007-08-21 14:52:50 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/ga/eoBitOp.h,v 1.18 2007-08-21 14:52:50 kuepper Exp $ $Author: kuepper $ + */ +//----------------------------------------------------------------------------- + +#ifndef eoBitOp_h +#define eoBitOp_h + +//----------------------------------------------------------------------------- + +#include // swap_ranges +#include +#include // eoMonOp +#include + + +/** eoOneBitFlip --> changes 1 bit +\class eoOneBitFlip eoBitOp.h ga/eoBitOp.h +\ingroup bitstring + +@ingroup Variators +*/ + +template class eoOneBitFlip: public eoMonOp +{ + public: + /// The class name. + virtual std::string className() const { return "eoOneBitFlip"; } + + /** + * Change one bit. + * @param chrom The cromosome which one bit is going to be changed. + */ + bool operator()(Chrom& chrom) + { + unsigned i = eo::rng.random(chrom.size()); + chrom[i] = !chrom[i]; + return true; + } +}; + +/** eoDetBitFlip --> changes exactly k bits +\class eoDetBitFlip eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ + +template class eoDetBitFlip: public eoMonOp +{ + public: + /** + * (Default) Constructor. + * @param _num_bit The number of bits to change + * default is one - equivalent to eoOneBitFlip then + */ + eoDetBitFlip(const unsigned& _num_bit = 1): num_bit(_num_bit) {} + + /// The class name. + virtual std::string className() const { return "eoDetBitFlip"; } + + /** + * Change num_bit bits. + * @param chrom The cromosome which one bit is going to be changed. + */ + bool operator()(Chrom& chrom) + { + // for duplicate checking see eoDetSingleBitFlip + for (unsigned k=0; k changes exactly k bits with checking for duplicate +\class eoDetSingleBitFlip eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ + +template class eoDetSingleBitFlip: public eoMonOp +{ + public: + /** + * (Default) Constructor. + * @param _num_bit The number of bits to change + * default is one - equivalent to eoOneBitFlip then + */ + eoDetSingleBitFlip(const unsigned& _num_bit = 1): num_bit(_num_bit) {} + + /// The class name. + virtual std::string className() const { return "eoDetSingleBitFlip"; } + + /** + * Change num_bit bits. + * @param chrom The cromosome which one bit is going to be changed. + */ + bool operator()(Chrom& chrom) + { + std::vector< unsigned > selected; + + // check for duplicate + for (unsigned k=0; k classical mutation +\class eoBitMutation eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ + +template class eoBitMutation: public eoMonOp +{ + public: + /** + * (Default) Constructor. + * @param _rate Rate of mutation. + * @param _normalize use rate/chrom.size if true + */ + eoBitMutation(const double& _rate = 0.01, bool _normalize=false): + rate(_rate), normalize(_normalize) {} + + /// The class name. + virtual std::string className() const { return "eoBitMutation"; } + + /** + * Mutate a chromosome. + * @param chrom The chromosome to be mutated. + */ + bool operator()(Chrom& chrom) + { + double actualRate = (normalize ? rate/chrom.size() : rate); + bool changed_something = false; + for (unsigned i = 0; i < chrom.size(); i++) + if (eo::rng.flip(actualRate)) + { + chrom[i] = !chrom[i]; + changed_something = true; + } + + return changed_something; + } + + private: + double rate; + bool normalize; // divide rate by chromSize +}; + + +/** eoBitInversion: inverts the bits of the chromosome between an interval +\class eoBitInversion eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ + +template class eoBitInversion: public eoMonOp +{ + public: + /// The class name. + virtual std::string className() const { return "eoBitInversion"; } + + /** + * Inverts a range of bits in a binary chromosome. + * @param chrom The chromosome whos bits are going to be inverted (a range). + */ + bool operator()(Chrom& chrom) + { + + unsigned u1 = eo::rng.random(chrom.size() + 1) , u2; + do u2 = eo::rng.random(chrom.size() + 1); while (u1 == u2); + unsigned r1 = std::min(u1, u2), r2 = std::max(u1, u2); + + std::reverse(chrom.begin() + r1, chrom.begin() + r2); + return true; + } +}; + + +/** eoBitNext --> next value when bitstring considered as binary value +\class eoBitNext eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ + +template class eoBitNext: public eoMonOp +{ + public: + /// The class name. + virtual std::string className() const { return "eoBitNext"; } + + /** + * Change the bit std::string x to be x+1. + * @param chrom The chromosome to be added one. + */ + bool operator()(Chrom& chrom) + { + for (int i = chrom.size() - 1; i >= 0; i--) + if (chrom[i]) + { + chrom[i] = 0; + continue; + } + else + { + chrom[i] = 1; + break; + } + + return true; + } +}; + + +/** eoBitPrev --> previous value when bitstring treated as binary value +\class eoBitPrev eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ + +template class eoBitPrev: public eoMonOp +{ + public: + /// The class name. + virtual std::string className() const { return "eoBitPrev"; } + + /** + * Change the bit std::string x to be x-1. + * @param chrom The chromosome to be substracted one. + */ + bool operator()(Chrom& chrom) + { + for (int i = chrom.size() - 1; i >= 0; i--) + if (chrom[i]) + { + chrom[i] = 0; + break; + } + else + { + chrom[i] = 1; + continue; + } + + return true; + } +}; + + +/** eo1PtBitXover --> classic 1-point crossover +\class eo1PtBitCrossover eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ + +template class eo1PtBitXover: public eoQuadOp +{ + public: + /// The class name. + virtual std::string className() const { return "eo1PtBitXover"; } + + /** + * 1-point crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ + bool operator()(Chrom& chrom1, Chrom& chrom2) + { + unsigned site = eo::rng.random(std::min(chrom1.size(), chrom2.size())); + + if (!std::equal(chrom1.begin(), chrom1.begin()+site, chrom2.begin())) + { + + std::swap_ranges(chrom1.begin(), chrom1.begin() + site, chrom2.begin()); + + return true; + } + return false; + } +}; + + +/** eoUBitXover --> classic Uniform crossover +\class eoUBitXover eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ + +template class eoUBitXover: public eoQuadOp +{ + public: + /// (Default) Constructor. + eoUBitXover(const float& _preference = 0.5): preference(_preference) + { + if ( (_preference <= 0.0) || (_preference >= 1.0) ) + std::runtime_error("UxOver --> invalid preference"); + } + /// The class name. + virtual std::string className() const { return "eoUBitXover"; } + + /** + * Uniform crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + * std::runtime_error if sizes don't match + */ + bool operator()(Chrom& chrom1, Chrom& chrom2) + { + if ( chrom1.size() != chrom2.size()) + std::runtime_error("UxOver --> chromosomes sizes don't match" ); + bool changed = false; + for (unsigned int i=0; i n-point crossover +\class eoNPtsBitXover eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ +template class eoNPtsBitXover : public eoQuadOp +{ +public: + + /** (Default) Constructor. */ + eoNPtsBitXover(const unsigned& _num_points = 2) : num_points(_num_points) + { + if (num_points < 1) + std::runtime_error("NxOver --> invalid number of points"); + } + + /** The class name */ + virtual std::string className() const { return "eoNPtsBitXover"; } + + /** n-point crossover for binary chromosomes. + + @param chrom1 The first chromosome. + @param chrom2 The first chromosome. + */ + bool operator()(Chrom& chrom1, Chrom& chrom2) { + unsigned max_size(std::min(chrom1.size(), chrom2.size())); + unsigned max_points(std::min(max_size - 1, num_points)); + std::vector points(max_size, false); + + // select ranges of bits to swap + do { + unsigned bit(eo::rng.random(max_size)); + if(points[bit]) + continue; + else { + points[bit] = true; + --max_points; + } + } while(max_points); + + // swap bits between chromosomes + bool change(false); + for (unsigned bit = 1; bit < points.size(); bit++) { + if (points[bit]) + change = !change; + if (change) { + typename Chrom::AtomType tmp = chrom1[bit]; + chrom1[bit] = chrom2[bit]; + chrom2[bit] = tmp; + } + } + return true; + } + +private: + + /** @todo Document this data member */ + unsigned num_points; +}; + + + +/** eoBitGxOver --> Npts crossover when bistd::string considered + as a std::string of binary-encoded genes (exchanges genes) +Is anybody still using it apart from historians ??? :-) +\class eoBitGxOver eoBitOp.h ga/eoBitOp.h +\ingroup bitstring +*/ + +template class eoBitGxOver: public eoQuadOp +{ + public: + /// Constructor. + eoBitGxOver(const unsigned _gene_size, const unsigned _num_points = 2): + gene_size(_gene_size), num_points(_num_points) + { + if (gene_size < 1) + std::runtime_error("GxOver --> invalid gene size"); + if (num_points < 1) + std::runtime_error("GxOver --> invalid number of points"); + } + + /// The class name + virtual std::string className() const { return "eoBitGxOver"; } + + /** + * Gene crossover for binary chromosomes. + * @param chrom1 The first chromosome. + * @param chrom2 The first chromosome. + */ + bool operator()(Chrom& chrom1, Chrom& chrom2) + { + unsigned max_genes = std::min(chrom1.size(), chrom2.size()) / gene_size; + unsigned cut_genes = std::min(max_genes, num_points); + + std::vector points(max_genes, false); + + // selects genes to swap + do { + unsigned bit = eo::rng.random(max_genes); + if (points[bit]) + continue; + else + { + points[bit] = true; + cut_genes--; + } + } while (cut_genes); + + // swaps genes + for (unsigned i = 0; i < points.size(); i++) + if (points[i]) + std::swap_ranges(chrom1.begin() + i * gene_size, + chrom1.begin() + i * gene_size + gene_size, + chrom2.begin() + i * gene_size); + + return true; + } + + private: + unsigned gene_size; + unsigned num_points; +}; + + + +//----------------------------------------------------------------------------- +//@} +#endif diff --git a/trunk/eo/src/ga/eoBitOpFactory.h b/trunk/eo/src/ga/eoBitOpFactory.h new file mode 100644 index 000000000..6511f9375 --- /dev/null +++ b/trunk/eo/src/ga/eoBitOpFactory.h @@ -0,0 +1,172 @@ +// eoBitOpFactory.h +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoOpFactory.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _EOBITOPFACTORY_H +#define _EOBITOPFACTORY_H + +#include +#include + +//----------------------------------------------------------------------------- + +/** EO Factory. An instance of the factory class to create operators that act +on bitstring chromosomes. Only those chromosomes can instantiate the operators +that are created here +@see eoSelect + +@ingroup Variators +*/ +template< class EOT> +class eoBitOpFactory: public eoFactory +{ + +public: + + /// @name ctors and dtors + //{@ + /// constructor + eoBitOpFactory( ) {}; + + /// destructor + virtual ~eoBitOpFactory() {}; + //@} + + /** Another factory method: creates an object from an std::istream, reading from + it whatever is needed to create the object. Usually, the format for the std::istream will be\\ + objectType parameter1 parameter2 ... parametern\\ + If there are problems, an std::exception is raised; it should be caught at the + upper level, because it might be something for that level\\ + At the same time, it catches std::exceptions thrown at a lower level, which will + indicate that whatever is in the stream is for this method to process + @param _is an stream from where a single line will be read + @throw runtime_std::exception if the object type is not known + */ + virtual eoOp* make(std::istream& _is) + { + eoOp * opPtr = NULL; + try { + opPtr = eoFactory::make( _is ); + } catch ( const std::string& objectTypeStr ) { + if ( objectTypeStr == "eoBinBitFlip" ) { + opPtr = new eoOneBitFlip( ); + } + // handles old operator names as well as new ones + if ( objectTypeStr == "eoOneBitFlip" ) { + opPtr = new eoOneBitFlip( ); + } + + // Standard BitFilp Mutation + if ( objectTypeStr == "eoBinMutation" ) { + float rate; + _is >> rate; + opPtr = new eoBitMutation( rate ); + } + if ( objectTypeStr == "eoBitMutation" ) { + float rate; + _is >> rate; + opPtr = new eoBitMutation( rate ); + } + + // Bit inversion + if ( objectTypeStr == "eoBinInversion" ) { + opPtr = new eoBitInversion( ); + } + if ( objectTypeStr == "eoBitInversion" ) { + opPtr = new eoBitInversion( ); + } + + // Next binary value + if ( objectTypeStr == "eoBinNext" ) { + opPtr = new eoBitNext( ); + } + if ( objectTypeStr == "eoBitNext" ) { + opPtr = new eoBitNext( ); + } + + // Previous binary value + if ( objectTypeStr == "eoBinPrev" ) { + opPtr = new eoBitPrev( ); + } + if ( objectTypeStr == "eoBitPrev" ) { + opPtr = new eoBitPrev( ); + } + + // 1 point Xover + if ( objectTypeStr == "eoBinCrossover" ) { + opPtr = new eo1PtBitXover( ); + } + if ( objectTypeStr == "eo1PtBitXover" ) { + opPtr = new eo1PtBitXover( ); + } + + // Npts Xover + if ( objectTypeStr == "eoBinNxOver" ) { + unsigned nPoints; + _is >> nPoints; + opPtr = new eoNPtsBitXover( nPoints ); + } + if ( objectTypeStr == "eoNPtsBitXover" ) { + unsigned nPoints; + _is >> nPoints; + opPtr = new eoNPtsBitXover( nPoints ); + } + + // Gene Xover (obsolete) + if ( objectTypeStr == "eoBinGxOver" ) { + unsigned geneSize, nPoints; + _is >> geneSize >> nPoints; + opPtr = new eoBitGxOver( geneSize, nPoints ); + } + if ( objectTypeStr == "eoBitGxOver" ) { + unsigned geneSize, nPoints; + _is >> geneSize >> nPoints; + opPtr = new eoBitGxOver( geneSize, nPoints ); + } + + // Uniform Xover + if ( objectTypeStr == "eoBinUxOver" ) { + float rate; + _is >> rate; + opPtr = new eoUBitXover( rate ); + } + if ( objectTypeStr == "eoUBitXover" ) { + float rate; + _is >> rate; + opPtr = new eoUBitXover( rate ); + } + + // nothing read! + if ( !opPtr ) { // to be caught by the upper level + throw objectTypeStr; + } + } + return opPtr; + }; + + +}; + + +#endif diff --git a/trunk/eo/src/ga/eoBoolFlip.h b/trunk/eo/src/ga/eoBoolFlip.h new file mode 100644 index 000000000..47c43ee06 --- /dev/null +++ b/trunk/eo/src/ga/eoBoolFlip.h @@ -0,0 +1,49 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoBoolFlip.h +// (c) Marc Schoenauer, 2003 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoBoolFlip_h +#define _eoBoolFlip_h + +#include + +/** a simple boolean mutation - to be used in generic eoOp's + * + @ingroup bitstring + @ingroup Variators + */ +class eoBoolFlip : public eoMonOp { +public: + /** simply flips the boolean argument */ + bool operator()(bool & _b) + { + _b = !_b; + return true; + } + + /** inherited className() */ + virtual string className() const {return "boolFlip";} + +}; + +#endif diff --git a/trunk/eo/src/ga/eoPBILAdditive.h b/trunk/eo/src/ga/eoPBILAdditive.h new file mode 100644 index 000000000..e57a05a2b --- /dev/null +++ b/trunk/eo/src/ga/eoPBILAdditive.h @@ -0,0 +1,119 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPBILAdditive.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoPBILAdditive_H +#define _eoPBILAdditive_H + +#include +#include + +/** + * Distribution Class for PBIL algorithm + * (Population-Based Incremental Learning, Baluja and Caruana 96) + * + * This class implements an extended update rule: + * in the original paper, the authors used + * + * p(i)(t+1) = (1-LR)*p(i)(t) + LR*best(i) + * + * here the same formula is applied, with some of the best individuals + * and for some of the worst individuals (with different learning rates) +*/ +template +class eoPBILAdditive : public eoDistribUpdater +{ +public: + /** Ctor with parameters + * using the default values is equivalent to using eoPBILOrg + */ + eoPBILAdditive(double _LRBest, unsigned _nbBest = 1, + double _tolerance=0.0, + double _LRWorst = 0.0, unsigned _nbWorst = 0 ) : + maxBound(1.0-_tolerance), minBound(_tolerance), + LR(0.0), nbBest(_nbBest), nbWorst(_nbWorst) + { + if (nbBest+nbWorst == 0) + throw std::runtime_error("Must update either from best or from worst in eoPBILAdditive"); + + if (_nbBest) + { + lrb = _LRBest/_nbBest; + LR += _LRBest; + } + else + lrb=0.0; // just in case + if (_nbWorst) + { + lrw = _LRWorst/_nbWorst; + LR += _LRWorst; + } + else + lrw=0.0; // just in case + } + + /** Update the distribution from the current population */ + virtual void operator()(eoDistribution & _distrib, eoPop& _pop) + { + eoPBILDistrib& distrib = dynamic_cast&>(_distrib); + + std::vector & p = distrib.value(); + + unsigned i, popSize=_pop.size(); + std::vector result; + _pop.sort(result); // is it necessary to sort the whole population? + // but I'm soooooooo lazy !!! + + for (unsigned g=0; g=popSize-nbWorst; i--) + { + const EOT & best = (*result[i]); + if ( !best[g] ) // if 0, increase proba + p[g] += lrw; + } + // stay in [0,1] (possibly strictly due to tolerance) + p[g] = std::min(maxBound, p[g]); + p[g] = std::max(minBound, p[g]); + } + } + +private: + double maxBound, minBound; // proba stay away from 0 and 1 by at least tolerance + double LR; // learning rate + unsigned nbBest; // number of Best individuals used for update + unsigned nbWorst; // number of Worse individuals used for update + double lrb, lrw; // "local" learning rates (see operator()) +}; + +#endif diff --git a/trunk/eo/src/ga/eoPBILDistrib.h b/trunk/eo/src/ga/eoPBILDistrib.h new file mode 100644 index 000000000..56556ba05 --- /dev/null +++ b/trunk/eo/src/ga/eoPBILDistrib.h @@ -0,0 +1,100 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPBILDistrib.h +// (c) Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoPBILDistrib_H +#define _eoPBILDistrib_H + +#include + +/** + * Distribution Class for PBIL algorithm + * (Population-Based Incremental Learning, Baluja and Caruana 96) + * + * It encodes a univariate distribution on the space of bitstrings, + * i.e. one probability for each bit to be one + * + * It is an eoValueParam > : + * the std::vector stores the probabilities that each bit is 1 + * + * It is still pure virtual, as the update method needs to be specified +*/ + +template +class eoPBILDistrib : public eoDistribution, + public eoValueParam > +{ +public: + /** Ctor with size of genomes, and update parameters */ + eoPBILDistrib(unsigned _genomeSize) : + eoDistribution(), + eoValueParam >(std::vector(_genomeSize, 0.5), "Distribution"), + genomeSize(_genomeSize) + {} + + /** the randomizer of indis */ + virtual void operator()(EOT & _eo) + { + _eo.resize(genomeSize); // just in case + for (unsigned i=0; i> sz; + + value().resize(sz); + unsigned i; + + for (i = 0; i < sz; ++i) + { + double atom; + is >> atom; + value()[i] = atom; + } + } + + unsigned int size() {return genomeSize;} + + virtual std::string className() const {return "eoPBILDistrib";}; + +private: + unsigned genomeSize; // size of indis +}; + +#endif diff --git a/trunk/eo/src/ga/eoPBILOrg.h b/trunk/eo/src/ga/eoPBILOrg.h new file mode 100644 index 000000000..45b95c843 --- /dev/null +++ b/trunk/eo/src/ga/eoPBILOrg.h @@ -0,0 +1,78 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPBILOrg.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoPBILOrg_H +#define _eoPBILOrg_H + +#include +#include + +/** + * Distribution Class for PBIL algorithm + * (Population-Based Incremental Learning, Baluja and Caruana 95) + * + * This class implements the update rule from the original paper: + * + * p(i)(t+1) = (1-LR)*p(i)(t) + LR*best(i) +*/ + +template +class eoPBILOrg : public eoDistribUpdater +{ +public: + /** Ctor with size of genomes, and update parameters */ + eoPBILOrg(double _LR, double _tolerance=0.0 ) : + LR(_LR), maxBound(1.0-_tolerance), minBound(_tolerance) + {} + + + /** Update the distribution from the current population */ + virtual void operator()(eoDistribution & _distrib, eoPop& _pop) + { + const EOT & best = _pop.best_element(); + eoPBILDistrib& distrib = dynamic_cast&>(_distrib); + + std::vector & p = distrib.value(); + + for (unsigned g=0; g // for time(0) for random seeding +#include +#include +#include +#include + + +//////////////////////////DISTRIB CONSTRUCTION /////////////////////////////// +/** + * Templatized version of parser-based construct of the distribution + * for PBIL distribution evolution algorithm + * + * It must then be instantiated, and compiled on its own for a given EOType + * (see test/t-eoPBIL.cpp + * + * Last argument is template-disambiguating +*/ + + +template +eoPBILDistrib & do_make_PBILdistrib(eoParser & _parser, eoState& _state, EOT) +{ + // First the random seed + eoValueParam& seedParam = _parser.createParam(uint32_t(0), "seed", "Random number seed", 'S'); + if (seedParam.value() == 0) + seedParam.value() = time(0); + + // chromosome size: + unsigned theSize; + // but it might have been already read in the definition fo the performance + eoParam* ptParam = _parser.getParamWithLongName(std::string("chromSize")); + + if (!ptParam) // not already defined: read it here + { + theSize = _parser.createParam(unsigned(10), "chromSize", "The length of the bitstrings", 'n',"Problem").value(); + } + else // it was read before, get its value + { + eoValueParam* ptChromSize = dynamic_cast*>(ptParam); + theSize = ptChromSize->value(); + } + + eoPBILDistrib * ptDistrib = new eoPBILDistrib(theSize); + _state.storeFunctor(ptDistrib); + + // now the initialization: read a previously saved distribution, or random + eoValueParam& loadNameParam = _parser.createParam(std::string(""), "Load","A save file to restart from",'L', "Persistence" ); + if (loadNameParam.value() != "") // something to load + { + // create another state for reading + eoState inState; // a state for loading - WITHOUT the parser + // register the rng and the distribution in the state, + // so they can be loaded, + // and the present run will be the exact continuation of the saved run + // eventually with different parameters + inState.registerObject(*ptDistrib); + inState.registerObject(rng); + inState.load(loadNameParam.value()); // load the distrib and the rng + } + else // nothing loaded from a file + { + rng.reseed(seedParam.value()); + } + + // for future stateSave, register the algorithm into the state + _state.registerObject(_parser); + _state.registerObject(*ptDistrib); + _state.registerObject(rng); + + return *ptDistrib; +} + +#endif diff --git a/trunk/eo/src/ga/make_PBILupdate.h b/trunk/eo/src/ga/make_PBILupdate.h new file mode 100644 index 000000000..a8572136d --- /dev/null +++ b/trunk/eo/src/ga/make_PBILupdate.h @@ -0,0 +1,79 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_PBILupdate.h +// (c) Marc Schoenauer, Maarten Keijzer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_PBILupdate_h +#define _make_PBILupdate_h + +#include +#include +#include +#include + + +///////CONSTRUCTION of PBIL distribution updaters///////////////// +/** + * Templatized version of parser-based construct of the update rule for PBIL + * distributions (see eoPBILDistrib.h) + * + * It must then be instantiated, and compiled on its own for a given EOType + * (see test/t-eoPBIL.cpp) + * + * Last argument is template-disambiguating +*/ + + +template +eoDistribUpdater & do_make_PBILupdate(eoParser & _parser, eoState& _state, EOT) +{ + // ast the moment, a single update rule is available + // but at some point we'll have to choose among different rules + + std::string UType = _parser.createParam(std::string("PBIL"), "updateRule", "Type of update rule (only PBIL additive at the moment)", 'U', "Algorithm").value(); + + unsigned nbBest = _parser.createParam(unsigned(1), "nbBest", "Number of good guys to update from", 'B', "Algorithm").value(); + double LRBest = _parser.createParam(0.1, "LRBest", "Learning Rate (from best guys)", 'L', "Algorithm").value(); + unsigned nbWorst = _parser.createParam(unsigned(0), "nbWorst", "Number of bad guys to update from", 'W', "Algorithm").value(); + double LRWorst = _parser.createParam(0.01, "LRWorst", "Learning Rate (from best guys)", 'L', "Algorithm").value(); + double tolerance = _parser.createParam(0.0, "tolerance", "Keeping away from 0 and 1", 't', "Algorithm").value(); + + // a pointer to choose among several possible types + eoDistribUpdater * ptUpdate; + + if (UType == std::string("PBIL")) + { + if ( (nbWorst == 0) && (nbBest == 1) ) + ptUpdate = new eoPBILOrg(LRBest, tolerance); + else + ptUpdate = new eoPBILAdditive(LRBest, nbBest, tolerance, LRWorst, nbWorst); + } + else + throw std::runtime_error("Only PBIL additive update rule available at the moment"); + + // done: don't forget to store the allocated pointers + _state.storeFunctor(ptUpdate); + return *ptUpdate; +} + +#endif diff --git a/trunk/eo/src/ga/make_algo_scalar_ga.cpp b/trunk/eo/src/ga/make_algo_scalar_ga.cpp new file mode 100644 index 000000000..631e6dadf --- /dev/null +++ b/trunk/eo/src/ga/make_algo_scalar_ga.cpp @@ -0,0 +1,63 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_algo_scalar_ga.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains all ***INSTANCIATED DEFINITIONS*** of pop. init. + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in src/ga/ga.h + * while the TEMPLATIZED code is define in make_algo_scalar.h in the src/do dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions above + +// Algo +/////// +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op, _dist); +} + +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op, eoDistance >* _dist) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op, _dist); +} diff --git a/trunk/eo/src/ga/make_checkpoint_ga.cpp b/trunk/eo/src/ga/make_checkpoint_ga.cpp new file mode 100644 index 000000000..eecc40caa --- /dev/null +++ b/trunk/eo/src/ga/make_checkpoint_ga.cpp @@ -0,0 +1,62 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_checkpoint_ga.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains all ***INSTANCIATED DEFINITIONS*** of operators + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in make_checkpoint_ga.h + * while the TEMPLATIZED code is define in make_checkpoint.h in the do dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions + +// checkpoint +///////////// +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} diff --git a/trunk/eo/src/ga/make_continue_ga.cpp b/trunk/eo/src/ga/make_continue_ga.cpp new file mode 100644 index 000000000..fb4662c32 --- /dev/null +++ b/trunk/eo/src/ga/make_continue_ga.cpp @@ -0,0 +1,62 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_continue_ga.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains all ***INSTANCIATED DEFINITIONS*** of operators + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in ga.h + * while the TEMPLATIZED code is define in make_continue.h in the src/do dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions above + +// continue +/////////// +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} diff --git a/trunk/eo/src/ga/make_ga.h b/trunk/eo/src/ga/make_ga.h new file mode 100644 index 000000000..206094881 --- /dev/null +++ b/trunk/eo/src/ga/make_ga.h @@ -0,0 +1,99 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// ga.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** This file contains all ***INSTANCIATED*** declarations of all components + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * + * The corresponding ***INSTANCIATED*** definitions are contained in ga.cpp + * while the TEMPLATIZED code is define in the different makeXXX.h files + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +#ifndef ga_h +#define ga_h + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +//Representation dependent - rewrite everything anew for each representation +////////////////////////// + +/** @addtogroup Builders + * @{ + */ + +// the genotypes +eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo, float _bias=0.5); + eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo, float _bias=0.5); + +// the operators +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoInit >& _init); +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoInit >& _init); + +//Representation INdependent +//////////////////////////// +// if you use your own representation, simply change the types of templates + +// init pop +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit >&); + +// the continue's +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval); + +// the checkpoint +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue); + + +// the algo +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); + +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _ccontinue, eoGenOp >& _op, eoDistance >* _dist = NULL); + +// run +void run_ea(eoAlgo >& _ga, eoPop >& _pop); +void run_ea(eoAlgo >& _ga, eoPop >& _pop); + +// end of parameter input (+ .status + help) +// that one is not templatized +// Because of that, the source is in src/utils dir +void make_help(eoParser & _parser); + +/** @} */ +#endif diff --git a/trunk/eo/src/ga/make_genotype_ga.cpp b/trunk/eo/src/ga/make_genotype_ga.cpp new file mode 100644 index 000000000..3344a8d87 --- /dev/null +++ b/trunk/eo/src/ga/make_genotype_ga.cpp @@ -0,0 +1,55 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_genotype_ga.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains all ***INSTANCIATED DEFINITIONS*** of operators + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in ga.h in src/ga dir + * while the TEMPLATIZED code is define in make_genotype_ga.h + */ + +// the templatized code +#include + +/// The following function merely call the templatized do_* functions above + +eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo, float _bias) +{ + return do_make_genotype(_parser, _state, _eo, _bias); +} +eoInit > & make_genotype(eoParser& _parser, eoState& _state, eoBit _eo, float _bias) +{ + return do_make_genotype(_parser, _state, _eo, _bias); +} diff --git a/trunk/eo/src/ga/make_genotype_ga.h b/trunk/eo/src/ga/make_genotype_ga.h new file mode 100644 index 000000000..fad4f7563 --- /dev/null +++ b/trunk/eo/src/ga/make_genotype_ga.h @@ -0,0 +1,79 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_genotype.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_genotype_h +#define _make_genotype_h + +#include +#include + // also need the parser and param includes +#include +#include + + +/////////////////// the bitstring //////////////// +/* + * This fuction does the initialization of what's needed for a particular + * genotype (here, bitstrings). + * It could be here tempatied only on the fitness, as it can be used to evolve + * bitstrings with any fitness. + * However, for consistency reasons, it was finally chosen, as in + * the rest of EO, to templatize by the full EOT, as this eventually + * allows to choose the type of genotype at run time (see in es dir) + * + * It is instanciated in ga/ga.cpp - and incorporated in the ga/libga.a + * + * It returns an eoInit > tha can later be used to initialize + * the population (see make_pop.h). + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is to disambiguate the call upon different instanciations. + * + * WARNING: that last argument will generally be the result of calling + * the default ctor of EOT, resulting in most cases in an EOT + * that is ***not properly initialized*** + * + * @ingroup bitstring + * @ingroup Builders +*/ +template +eoInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT, float _bias=0.5) +{ + // for bitstring, only thing needed is the size + // but it might have been already read in the definition fo the performance + unsigned theSize = _parser.getORcreateParam(unsigned(10), "chromSize", "The length of the bitstrings", 'n',"Problem").value(); + + // Then we can built a bitstring random initializer + // based on boolean_generator class (see utils/rnd_generator.h) + eoBooleanGenerator * gen = new eoBooleanGenerator(_bias); + _state.storeFunctor(gen); + eoInitFixedLength* init = new eoInitFixedLength(theSize, *gen); + // store in state + _state.storeFunctor(init); + return *init; +} + +#endif diff --git a/trunk/eo/src/ga/make_op.h b/trunk/eo/src/ga/make_op.h new file mode 100644 index 000000000..2035a4f85 --- /dev/null +++ b/trunk/eo/src/ga/make_op.h @@ -0,0 +1,231 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_op_h +#define _make_op_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +// the specialized GA stuff +#include +#include + // also need the parser and param includes +#include +#include + + +/////////////////// bitstring operators /////////////// +// canonical (crossover + mutation) only at the moment // + +/* + * This function builds the operators that will be applied to the bitstrings + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here: the following only applies to bitstrings + * + * Note : the last parameter is an eoInit: if some operator needs some info + * about the gneotypes, the init has it all (e.g. bounds, ...) + * Simply do + * EOT myEO; + * _init(myEO); + * and myEO is then an ACTUAL object + * + * @ingroup bitstring + * @ingroup Builders +*/ + +template +eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init) +{ + // this is a temporary version, while Maarten codes the full tree-structured + // general operator input + // BTW we must leave that simple version available somehow, as it is the one + // that 90% people use! + eoValueParam& operatorParam = _parser.createParam(std::string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); + + if (operatorParam.value() != std::string("SGA")) + throw std::runtime_error("Only SGA-like operator available right now\n"); + + // now we read Pcross and Pmut, + // the relative weights for all crossovers -> proportional choice + // the relative weights for all mutations -> proportional choice + // and create the eoGenOp that is exactly + // crossover with pcross + mutation with pmut + + eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw std::runtime_error("Invalid pCross"); + + eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw std::runtime_error("Invalid pMut"); + + // the crossovers + ///////////////// + // the parameters + eoValueParam& onePointRateParam = _parser.createParam(double(1.0), "onePointRate", "Relative rate for one point crossover", '1', "Variation Operators" ); + // minimum check + if ( (onePointRateParam.value() < 0) ) + throw std::runtime_error("Invalid onePointRate"); + + eoValueParam& twoPointsRateParam = _parser.createParam(double(1.0), "twoPointRate", "Relative rate for two point crossover", '2', "Variation Operators" ); + // minimum check + if ( (twoPointsRateParam.value() < 0) ) + throw std::runtime_error("Invalid twoPointsRate"); + + eoValueParam& uRateParam = _parser.createParam(double(2.0), "uRate", "Relative rate for uniform crossover", 'U', "Variation Operators" ); + // minimum check + if ( (uRateParam.value() < 0) ) + throw std::runtime_error("Invalid uRate"); + + // minimum check + // bool bCross = true; // not used ? + if (onePointRateParam.value()+twoPointsRateParam.value()+uRateParam.value()==0) + { + std::cerr << "Warning: no crossover" << std::endl; + // bCross = false; + } + + // Create the CombinedQuadOp + eoPropCombinedQuadOp *ptCombinedQuadOp = NULL; + eoQuadOp *ptQuad = NULL; + // 1-point crossover for bitstring + ptQuad = new eo1PtBitXover; + _state.storeFunctor(ptQuad); + ptCombinedQuadOp = new eoPropCombinedQuadOp(*ptQuad, onePointRateParam.value()); + + // uniform crossover for bitstring + ptQuad = new eoUBitXover; + _state.storeFunctor(ptQuad); + ptCombinedQuadOp->add(*ptQuad, uRateParam.value()); + + // 2-points xover + ptQuad = new eoNPtsBitXover; + _state.storeFunctor(ptQuad); + ptCombinedQuadOp->add(*ptQuad, twoPointsRateParam.value()); + + // don't forget to store the CombinedQuadOp + _state.storeFunctor(ptCombinedQuadOp); + + // the mutations + ///////////////// + // the parameters + eoValueParam & pMutPerBitParam = _parser.createParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b', "Variation Operators" ); + // minimum check + if ( (pMutPerBitParam.value() < 0) || (pMutPerBitParam.value() > 0.5) ) + throw std::runtime_error("Invalid pMutPerBit"); + + eoValueParam & bitFlipRateParam = _parser.createParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 's', "Variation Operators" ); + // minimum check + if ( (bitFlipRateParam.value() < 0) ) + throw std::runtime_error("Invalid bitFlipRate"); + + // oneBitFlip + eoValueParam & oneBitRateParam = _parser.createParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'd', "Variation Operators" ); + // minimum check + if ( (oneBitRateParam.value() < 0) ) + throw std::runtime_error("Invalid oneBitRate"); + + // kBitFlip + eoValueParam & kBitParam = _parser.createParam((unsigned)1, "kBit", "Number of bit for deterministic k bit-flip mutation", 0, "Variation Operators" ); + // minimum check + if ( ! kBitParam.value() ) + throw std::runtime_error("Invalid kBit"); + + eoValueParam & kBitRateParam = _parser.createParam(0.0, "kBitRate", "Relative rate for deterministic k bit-flip mutation", 0, "Variation Operators" ); + // minimum check + if ( (kBitRateParam.value() < 0) ) + throw std::runtime_error("Invalid kBitRate"); + + // minimum check + // bool bMut = true; // not used ? + if (bitFlipRateParam.value()+oneBitRateParam.value()==0) + { + std::cerr << "Warning: no mutation" << std::endl; + // bMut = false; + } + + // Create the CombinedMonOp + eoPropCombinedMonOp *ptCombinedMonOp = NULL; + eoMonOp *ptMon = NULL; + + // standard bit-flip mutation for bitstring + ptMon = new eoBitMutation(pMutPerBitParam.value()); + _state.storeFunctor(ptMon); + // create the CombinedMonOp + ptCombinedMonOp = new eoPropCombinedMonOp(*ptMon, bitFlipRateParam.value()); + + // mutate exactly 1 bit per individual + ptMon = new eoDetBitFlip; + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, oneBitRateParam.value()); + + // mutate exactly k bit per individual + ptMon = new eoDetBitFlip(kBitParam.value()); + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, kBitRateParam.value()); + + _state.storeFunctor(ptCombinedMonOp); + + // now build the eoGenOp: + // to simulate SGA (crossover with proba pCross + mutation with proba pMut + // we must construct + // a sequential combination of + // with proba 1, a proportional combination of + // a QuadCopy and our crossover + // with proba pMut, our mutation + + // the crossover - with probability pCross + eoProportionalOp * cross = new eoProportionalOp ; + _state.storeFunctor(cross); + ptQuad = new eoQuadCloneOp; + _state.storeFunctor(ptQuad); + cross->add(*ptCombinedQuadOp, pCrossParam.value()); // user crossover + cross->add(*ptQuad, 1-pCrossParam.value()); // clone operator + + // now the sequential + eoSequentialOp *op = new eoSequentialOp; + _state.storeFunctor(op); + op->add(*cross, 1.0); // always crossover (but clone with prob 1-pCross + op->add(*ptCombinedMonOp, pMutParam.value()); + + // that's it! + return *op; +} +#endif diff --git a/trunk/eo/src/ga/make_op_ga.cpp b/trunk/eo/src/ga/make_op_ga.cpp new file mode 100644 index 000000000..e3a53d651 --- /dev/null +++ b/trunk/eo/src/ga/make_op_ga.cpp @@ -0,0 +1,61 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op_ga.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains all ***INSTANCIATED DEFINITIONS*** of operators + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in make_op_ga.h + * while the TEMPLATIZED code is define in make_op.h in the ga dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// Templatized code +#include + +/// The following function merely call the templatized do_* functions above + +// oeprators +//////////// +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoInit >& _init) +{ + return do_make_op(_parser, _state, _init); +} + +eoGenOp >& make_op(eoParser& _parser, eoState& _state, eoInit >& _init) +{ + return do_make_op(_parser, _state, _init); +} diff --git a/trunk/eo/src/ga/make_pop_ga.cpp b/trunk/eo/src/ga/make_pop_ga.cpp new file mode 100644 index 000000000..319279793 --- /dev/null +++ b/trunk/eo/src/ga/make_pop_ga.cpp @@ -0,0 +1,61 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_pop_ga.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains all ***INSTANCIATED DEFINITIONS*** of population init + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in ga/make_ga.h + * while the TEMPLATIZED code is define in make_pop.h in the src/do dir + * + */ + +// The templatized code +#include +// the instanciating EOType +#include + +/// The following function merely call the templatized do_* functions above + +// Init POP +/////////// +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} diff --git a/trunk/eo/src/ga/make_run_ga.cpp b/trunk/eo/src/ga/make_run_ga.cpp new file mode 100644 index 000000000..d64d2b025 --- /dev/null +++ b/trunk/eo/src/ga/make_run_ga.cpp @@ -0,0 +1,65 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_run_ga.cpp +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +/** This file contains all ***INSTANCIATED DEFINITIONS*** of operators + * of the library for ***BISTRING*** evolution inside EO. + * It should be included in the file that calls any of the corresponding fns + * Compiling this file allows one to generate part of the library (i.e. object + * files that you just need to link with your own main and fitness code). + * + * The corresponding ***INSTANCIATED DECLARATIONS*** are contained + * in make_run_ga.h + * while the TEMPLATIZED code is define in make_run.h in the do dir + * + * Unlike most EO .h files, it does not (and should not) contain any code, + * just declarations + */ + +// The templatized code +#include +// the instanciating EOType +#include +// the instanciating fitnesses +#include + +/// The following function merely call the templatized do_* functions above + +// run +///////// +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} diff --git a/trunk/eo/src/gp/eoParseTree.h b/trunk/eo/src/gp/eoParseTree.h new file mode 100644 index 000000000..88737d919 --- /dev/null +++ b/trunk/eo/src/gp/eoParseTree.h @@ -0,0 +1,195 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParseTree.h : eoParseTree class (for Tree-based Genetic Programming) +// (c) Maarten Keijzer 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk + + */ +//----------------------------------------------------------------------------- + +#ifndef eoParseTree_h +#define eoParseTree_h + +#include +#include + +#include +#include +#include +#include + +using namespace gp_parse_tree; + +/** @defgroup ParseTree + +Various functions for tree-based Genetic Programming + +Example: +@include t-eoSymreg.cpp + +@ingroup Representations +*/ + + +/** Implementation of parse-tree for genetic programming + +@class eoParseTree eoParseTree.h gp/eoParseTree.h + +@ingroup ParseTree +*/ +template +class eoParseTree : public EO, public parse_tree +{ +public: + + using parse_tree::back; + using parse_tree::ebegin; + using parse_tree::eend; + using parse_tree::size; + + + typedef typename parse_tree::subtree Subtree; + + /* For Compatibility with the intel C++ compiler for Linux 5.x */ + typedef Node reference; + typedef const reference const_reference; + + /** + * Default Constructor + */ + eoParseTree(void) {} + + /** + * Copy Constructor + * @param tree The tree to copy + */ + eoParseTree(const parse_tree& tree) : parse_tree(tree) {} + +// eoParseTree(const eoParseTree& tree) : parse_tree(tree) {} + /** + * To prune me to a certain size + * @param _size My maximum size + */ + virtual void pruneTree(unsigned _size) + { + if (_size < 1) + return; + + while (size() > _size) + { + back() = this->operator[](size()-2); + } + } + + /** + * To read me from a stream + * @param is The std::istream + */ + + eoParseTree(std::istream& is) : EO(), parse_tree() + { + readFrom(is); + } + + /// My class name + std::string className(void) const { return "eoParseTree"; } + + /** + * To print me on a stream + * @param os The std::ostream + */ + void printOn(std::ostream& os) const + { + EO::printOn(os); + os << ' '; + + os << size() << ' '; + + std::copy(ebegin(), eend(), std::ostream_iterator(os, " ")); + } + + /** + * To read me from a stream + * @param is The std::istream + */ + void readFrom(std::istream& is) + { + + + EO::readFrom(is); + + unsigned sz; + is >> sz; + + + std::vector v(sz); + + unsigned i; + + for (i = 0; i < sz; ++i) + { + Node node; + is >> node; + v[i] = node; + } + parse_tree tmp(v.begin(), v.end()); + this->swap(tmp); + + /* + * old code which caused problems for paradisEO + * + * this can be removed once it has proved itself + EO::readFrom(is); + + // even older code + FType fit; + is >> fit; + + fitness(fit); + + + std::copy(std::istream_iterator(is), std::istream_iterator(), back_inserter(*this)); + */ + } +}; +/** @example t-eoSymreg.cpp + */ + +// friend function to print eoParseTree +template +std::ostream& operator<<(std::ostream& os, const eoParseTree& eot) +{ + eot.printOn(os); + return os; +} + +// friend function to read eoParseTree +template +std::istream& operator>>(std::istream& is, eoParseTree& eot) +{ + eot.readFrom(is); + return is; +} + +// for backward compatibility +#include +#include + +#endif diff --git a/trunk/eo/src/gp/eoParseTreeDepthInit.h b/trunk/eo/src/gp/eoParseTreeDepthInit.h new file mode 100644 index 000000000..18dc55b91 --- /dev/null +++ b/trunk/eo/src/gp/eoParseTreeDepthInit.h @@ -0,0 +1,218 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParseTreeDepthInit.h : initializor for eoParseTree class +// (c) Maarten Keijzer 2000 Jeroen Eggermont 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk + jeggermo@liacs.nl + + */ +//----------------------------------------------------------------------------- + +#ifndef eoParseTreeDepthInit_h +#define eoParseTreeDepthInit_h + +#include +#include +#include +#include +#include + +using namespace gp_parse_tree; + +/** eoParseTreeDepthInit : the initializer class for eoParseTree +\class eoParseTreeDepthInit eoParseTreeDepthInit.h gp/eoParseTreeDepthInit.h +\ingroup ParseTree +*/ + +// eoGpDepthInitializer is defined for backward compatibility +#define eoGpDepthInitializer eoParseTreeDepthInit + +template +class eoParseTreeDepthInit : public eoInit< eoParseTree > +{ + protected: + // a binary predicate for sorting + // hopefully this will work with M$VC++ 6.0 + struct lt_arity:public std::binary_function + { + bool operator()(const Node &_node1, const Node &_node2) { return (_node1.arity() < _node2.arity());}; + }; + + public : + + typedef eoParseTree EoType; + + /** + * Constructor + * @param _max_depth The maximum depth of a tree + * @param _initializor A std::vector containing the possible nodes + * @param _grow False results in a full tree, True result is a randomly grown tree + * @param _ramped_half_and_half True results in Ramped Half and Half Initialization + */ + eoParseTreeDepthInit( + unsigned _max_depth, + const std::vector& _initializor, + bool _grow = true, + bool _ramped_half_and_half = false) + : + eoInit(), + max_depth(_max_depth), + initializor(_initializor), + grow(_grow), + ramped_half_and_half(_ramped_half_and_half), + current_depth(_max_depth) + { + if(initializor.empty()) + { + throw std::logic_error("eoParseTreeDepthInit: uhm, wouldn't you rather give a non-empty set of Nodes?"); + } + // lets sort the initializor std::vector according to arity (so we can be sure the terminals are in front) + // we use stable_sort so that if element i was in front of element j and they have the same arity i remains in front of j + stable_sort(initializor.begin(), initializor.end(), lt_arity()); + } + /// My class name + virtual std::string className() const { return "eoParseTreeDepthInit"; }; + + /**initialize a tree + * @param _tree : the tree to be initialized + */ + void operator()(EoType& _tree) + { + std::list sequence; + generate(sequence, current_depth); + + parse_tree tmp(sequence.begin(), sequence.end()); + _tree.swap(tmp); + + if(ramped_half_and_half) + { + if(grow) + { + if (current_depth > 2) + current_depth--; + else + current_depth = max_depth; + } + // change the grow method from 'grow' to 'full' or from 'full' to 'grow' + grow = !grow; + }; + + } + private : + void generate(std::list& sequence, int the_max, int last_terminal = -1) + { + if (last_terminal == -1) + { // check where the last terminal in the sequence resides + typename std::vector::iterator it; + for (it = initializor.begin(); it != initializor.end(); ++it) + { + if (it->arity() > 0) + break; + } + + last_terminal = it - initializor.begin(); + } + + if (the_max == 1) + { // generate terminals only + typename std::vector::iterator it = initializor.begin() + rng.random(last_terminal); + it->randomize(); + sequence.push_front(*it); + return; + } + + typename std::vector::iterator what_it; + + if (grow) + { + what_it = initializor.begin() + rng.random(initializor.size()); + } + else // full + { + what_it = initializor.begin() + last_terminal + rng.random(initializor.size() - last_terminal); + } + + what_it->randomize(); + + sequence.push_front(*what_it); + + for (int i = 0; i < what_it->arity(); ++i) + generate(sequence, the_max - 1, last_terminal); + } + + + + unsigned max_depth; + std::vector initializor; + bool grow; + bool ramped_half_and_half; + unsigned current_depth; +}; + +/** + * A template function for ramped half and half initialization of an eoParseTree population + * @param pop the population to be created + * @param population_size the size of the population to be created + * @param init_max_depth the initial maximum tree depth + * @param initializor A std::vector containing the possible nodes + + \ingroup ParseTree + */ +template +void eoInitRampedHalfAndHalf(eoPop< eoParseTree > &pop, unsigned int population_size, unsigned int init_max_depth, std::vector &initializor) +{ + typedef eoParseTree EoType; + typedef eoPop< EoType > Pop; + + unsigned int M = init_max_depth - 1; + unsigned int part_pop_size = population_size / (2*M); + unsigned int m=0; + + std::cerr << "EO WARNING: Ramped Half and Half Initialization is now supported by eoParseTreeDepthInit." << std::endl; + std::cerr << " This function is now obsolete and might be removed in the future so you should"<< std::endl; + std::cerr << " update your code to use: " << std::endl << std::endl; + std::cerr << " eoParseTreeDepthInit( _max_depth, _initializer, bool _grow, bool _ramped_half_and_half)" << std::endl << std::endl; + + pop.clear(); + + // initialize with Depth's (D) -> 2 + for(m=init_max_depth; m >= 2; m--) + { + eoParseTreeDepthInit grow_initializer(m, initializor, true); + Pop grow(part_pop_size, grow_initializer); + pop.insert(pop.begin(), grow.begin(), grow.end()); + + eoParseTreeDepthInit full_initializer(m, initializor, false); + Pop full(part_pop_size, full_initializer); + pop.insert(pop.begin(), full.begin(), full.end()); + } + + bool g = true; + while (pop.size() < population_size) + { + eoParseTreeDepthInit initializer(init_max_depth, initializor, g); + Pop p(1, initializer); + pop.insert(pop.begin(), p.begin(), p.end()); + g= !g; + } +} + + +#endif diff --git a/trunk/eo/src/gp/eoParseTreeOp.h b/trunk/eo/src/gp/eoParseTreeOp.h new file mode 100644 index 000000000..0b623f3d8 --- /dev/null +++ b/trunk/eo/src/gp/eoParseTreeOp.h @@ -0,0 +1,380 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParseTreeOp.h : crossover and mutation operator for the eoParseTree class +// (c) Maarten Keijzer 2000 for eoSubtreeXOver, eoBranchMutation +// (c) Jeroen Eggermont 2001 for other mutation operators + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk + jeggermo@liacs.nl + */ +//----------------------------------------------------------------------------- + +#ifndef eoParseTreeOp_h +#define eoParseTreeOp_h + +#include +#include + +#include + +/** eoSubtreeXOver --> subtree xover +\class eoSubtreeXOver eoParseTreeOp.h gp/eoParseTreeOp.h +\ingroup ParseTree +*/ +template +class eoSubtreeXOver: public eoQuadOp< eoParseTree > { +public: + + typedef eoParseTree EoType; + /** + * Constructor + * @param _max_length the maximum size of an individual + */ + eoSubtreeXOver( unsigned _max_length) + : eoQuadOp(), max_length(_max_length) {}; + + /// the ckassname + virtual std::string className() const { return "eoSubtreeXOver"; }; + + /// Dtor + virtual ~eoSubtreeXOver () {}; + + /** + * Perform crossover on two individuals + * param _eo1 The first parent individual + * param _eo2 The second parent individual + */ + bool operator()(EoType & _eo1, EoType & _eo2 ) + { + int i = rng.random(_eo1.size()); + int j = rng.random(_eo2.size()); + + typename parse_tree::subtree tmp = _eo1[i]; + _eo1[i] = _eo2[j]; // insert subtree + _eo2[j] = tmp; + + _eo1.pruneTree(max_length); + _eo2.pruneTree(max_length); + + return true; + } + private: + unsigned max_length; +}; + +/** eoBranchMutation --> replace a subtree with a randomly created subtree +\class eoBranchMutation eoParseTreeOp.h gp/eoParseTreeOp.h +\ingroup ParseTree + */ +template +class eoBranchMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + /** + * Constructor + * @param _init An instantiation of eoGpDepthInitializer + * @param _max_length the maximum size of an individual + */ + eoBranchMutation(eoInit& _init, unsigned _max_length) + : eoMonOp(), max_length(_max_length), initializer(_init) + {}; + + /// the class name + virtual std::string className() const { return "eoBranchMutation"; }; + + /// Dtor + virtual ~eoBranchMutation() {}; + + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + int i = rng.random(_eo1.size()); + + EoType eo2; + initializer(eo2); + + int j = rng.random(eo2.size()); + + _eo1[i] = eo2[j]; // insert subtree + + _eo1.pruneTree(max_length); + + return true; + } + +private : + + unsigned max_length; + eoInit& initializer; +}; + +// Additional Mutation operators from +// TITLE:"Genetic Programming~An Introduction" +// AUTHORS: Banzhaf, Nordin, Keller, Francone +// ISBN: 3-920993-58-6 +// ISBN: 1-55860-510-X +// +// For the eoParseTree class + +/** eoPointMutation --> replace a Node with a Node of the same arity +\class eoPointMutation eoParseTreeOp.h gp/eoParseTreeOp.h +\ingroup ParseTree +*/ + +template +class eoPointMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + + /** + * Constructor + * @param _initializor The std::vector of Nodes given to the eoGpDepthInitializer + */ + eoPointMutation( std::vector& _initializor) + : eoMonOp(), initializor(_initializor) + {}; + + /// the class name + virtual std::string className() const { return "eoPointMutation"; }; + + /// Dtor + virtual ~eoPointMutation() {}; + + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + // select a random node i that is to be mutated + int i = rng.random(_eo1.size()); + // request the arity of the node that is to be replaced + int arity = _eo1[i].arity(); + + int j=0; + + do + { + j = rng.random(initializor.size()); + + }while ((initializor[j].arity() != arity)); + + _eo1[i] = initializor[j]; + + + + return true; + } + +private : + std::vector& initializor; + +}; + +/** eoExpansionMutation --> replace a terminal with a randomly created subtree +\class eoExpansionMutation eoParseTreeOp.h gp/eoParseTreeOp.h +\ingroup ParseTree + */ + +template +class eoExpansionMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + + /** + * Constructor + * @param _init An instantiation of eoGpDepthInitializer + * @param _max_length the maximum size of an individual + */ + eoExpansionMutation(eoInit& _init, unsigned _max_length) + : eoMonOp(), max_length(_max_length), initializer(_init) + {}; + + /// The class name + virtual std::string className() const { return "eoExpansionMutation"; }; + + /// Dtor + virtual ~eoExpansionMutation() {}; + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + int i = rng.random(_eo1.size()); + // look for a terminal + while (_eo1[i].arity() != 0) + { + i= rng.random(_eo1.size()); + }; + + // create a new tree to + EoType eo2; + // make sure we get a tree with more than just a terminal + do + { + initializer(eo2); + }while(eo2.size() == 1); + + int j = rng.random(eo2.size()); + // make sure we select a subtree (and not a terminal) + while((eo2[j].arity() == 0)) + { + j = rng.random(eo2.size()); + }; + + + _eo1[i] = eo2[j]; // insert subtree + + _eo1.pruneTree(max_length); + + return true; + } + +private : + + unsigned max_length; + eoInit& initializer; +}; + +/** eoCollapseSubtree --> replace a subtree with a randomly chosen terminal +\class eoCollapseSubtreeMutation eoParseTreeOp.h gp/eoParseTreeOp.h +\ingroup ParseTree + */ + +template +class eoCollapseSubtreeMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + /** + * Constructor + * @param _init An instantiation of eoGpDepthInitializer + * @param _max_length the maximum size of an individual + */ + eoCollapseSubtreeMutation(eoInit& _init, unsigned _max_length) + : eoMonOp(), max_length(_max_length), initializer(_init) + {}; + + /// The class name + virtual std::string className() const { return "eoCollapseSubtreeMutation"; }; + + /// Dtor + virtual ~eoCollapseSubtreeMutation() {}; + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + int i = rng.random(_eo1.size()); + // look for a subtree + while ((_eo1[i].arity() == 0) && (_eo1.size() > 1)) + { + i= rng.random(_eo1.size()); + }; + + // create a new tree to + EoType eo2; + initializer(eo2); + + int j = rng.random(eo2.size()); + // make sure we select a subtree (and not a terminal) + while(eo2[j].arity() != 0) + { + j = rng.random(eo2.size()); + }; + + _eo1[i] = eo2[j]; // insert subtree + + // we don't have to prune because the subtree is always smaller + _eo1.pruneTree(max_length); + + return true; + } + +private : + + unsigned max_length; + eoInit& initializer; +}; + + +/** eoHoistMutation --> replace the individual with one of its subtree's +\class eoHoistMutation eoParseTreeOp.h gp/eoParseTreeOp.h +\ingroup ParseTree + */ + +template +class eoHoistMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + + /** + * Constructor + */ + eoHoistMutation() + : eoMonOp() + {}; + + /// The class name + virtual std::string className() const { return "eoHoistMutation"; }; + + /// Dtor + virtual ~eoHoistMutation() {}; + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + + + // select a hoist point + int i = rng.random(_eo1.size()); + // and create a new tree + EoType eo2(_eo1[i]); + + // we don't have to prune because the new tree is always smaller + //_eo1.pruneTree(max_length); + + _eo1 = eo2; + + return true; + } + +private : + +}; + + +#endif diff --git a/trunk/eo/src/gp/eoStParseTreeDepthInit.h b/trunk/eo/src/gp/eoStParseTreeDepthInit.h new file mode 100644 index 000000000..37b178873 --- /dev/null +++ b/trunk/eo/src/gp/eoStParseTreeDepthInit.h @@ -0,0 +1,194 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStParseTreeDepthInit.h : initializor strongly type GP +// (c) Jeroen Eggermont 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + jeggermo@liacs.nl + + */ +//----------------------------------------------------------------------------- + +#ifndef eoStParseTreeDepthInit_h +#define eoStParseTreeDepthInit_h + +#include +#include +#include +#include + +#include + +using namespace gp_parse_tree; + +#define TERMINAL 0 + +#define NONTERMINAL 4 +#define ALL 5 + + /** +\defgroup StParseTree + + Various functions for strongly typed tree-based Genetic Programming. + The StParseTree functions use the same eoParseTree class for the + individual but now each node class must have two additional functions. + \li int type(void) which returns the return type of the node + \li int type(int child) which returns the required type for child 0, 1 or 2 + + Pruning strongly typed trees is not possible at the moment. + + \ingroup Representations +*/ + +/** eoStParseTreeDepthInit : the initializer class for strongly typed tree-based genetic programming +\class eoStParseTreeDepthInit eoStParseTreeDepthInit.h gp/eoStParseTreeDepthInit.h +\ingroup StParseTree +*/ + +template +class eoStParseTreeDepthInit : public eoInit< eoParseTree > +{ + public : + + typedef eoParseTree EoType; + + /** + * Constructor + * @param _max_depth The maximum depth of a tree + * @param _node A std::vector containing the possible nodes + * @param _return_type (JD_2010-11-09: don't know the use of this parameter, maybe to force implicit template instanciation?) + * @param _grow False results in a full tree, True result is a randomly grown tree + */ + eoStParseTreeDepthInit( + unsigned _max_depth, + const std::vector& _node, + const int& _return_type, + bool _grow = true) + : + eoInit(), + max_depth(_max_depth), + return_type(_return_type), + grow(_grow) + { + if(_node.empty()) + { + throw std::logic_error("eoStParseTreeDepthInit: uhm, wouldn't you rather give a non-empty set of Nodes?"); + } + + + unsigned int i=0; + int arity=0; + int type=0; + std::vector node_vector; + for(i=0; i < _node.size(); i++) + { + arity = _node[i].arity(); + type = _node[i].type(); + if(arity==0) + { + node_vector = node[type][TERMINAL]; + node_vector.push_back(_node[i]); + node[type][TERMINAL]= node_vector; + } + else + //if (arity != 0) // non-terminal + { + node_vector = node[type][NONTERMINAL]; + node_vector.push_back(_node[i]); + node[type][NONTERMINAL] = node_vector; + } + node_vector = node[type][ALL]; + node_vector.push_back(_node[i]); + node[type][ALL] = node_vector; + + } + + + } + /// My class name + virtual std::string className() const { return "eoStParseTreeDepthInit"; }; + + /**initialize a tree + * @param _tree : the tree to be initialized + */ + void operator()(EoType& _tree) + { + std::list sequence; + bool good_tree = false; + do + { + sequence.clear(); + good_tree = generate(sequence, max_depth, return_type); + }while (!good_tree); + + parse_tree tmp(sequence.begin(), sequence.end()); + _tree.swap(tmp); + } + private : + bool generate(std::list& sequence, int the_max, int request_type) + { + + int selected=0; + bool ok = true; + + if (the_max == 1) + { // generate terminals only + if( node[request_type][TERMINAL].empty() ) // no possible terminal node of this type + return false; // we have an invalid tree + else + { + selected = rng.random((node[request_type][TERMINAL]).size()); + sequence.push_front(node[request_type][TERMINAL][selected]); + return true; + } + + } + + int arity=0; + if (grow) + { + selected = rng.random((node[request_type][ALL]).size()); + arity = node[request_type][ALL][selected].arity(); + sequence.push_front(node[request_type][ALL][selected]); + for (int i = 0; i < arity; ++i) + ok &= generate(sequence, the_max - 1, node[request_type][ALL][selected].type(i)); + } + else // full + { + selected = rng.random((node[request_type][NONTERMINAL]).size()); + arity = node[request_type][NONTERMINAL][selected].arity(); + sequence.push_front(node[request_type][NONTERMINAL][selected]); + for (int i = 0; i < arity; ++i) + ok &=generate(sequence, the_max - 1, node[request_type][NONTERMINAL][selected].type(i)); + } + + return ok; + + } + + + + + unsigned max_depth; + std::map < int, std::map < int, std::vector > > node; + + int return_type; + bool grow; +}; + +#endif diff --git a/trunk/eo/src/gp/eoStParseTreeOp.h b/trunk/eo/src/gp/eoStParseTreeOp.h new file mode 100644 index 000000000..88020448d --- /dev/null +++ b/trunk/eo/src/gp/eoStParseTreeOp.h @@ -0,0 +1,312 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStParseTreeOp.h : crossover and mutation operators for the strongly typed GP +// (c) Jeroen Eggermont 2001 for other mutation operators + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + mak@dhi.dk + jeggermo@liacs.nl + */ +//----------------------------------------------------------------------------- + +#ifndef eoStParseTreeOp_h +#define eoStParseTreeOp_h + +#include +#include +#include +#include +#include + +#include + +// a help function +template +void get_possible_nodes(const EOT &_eo, std::vector &possible_nodes, const int type) +{ + int n=0; + possible_nodes.clear(); + // collect the possible crossover points in _eo (nodes with the same type) + for(n=0; n < _eo.size(); n++) + if (type == _eo[n]->type()) + possible_nodes.push_back(n); +} + + +/** eoStSubtreeXOver --> subtree xover for strongly typed tree-based genetic programming +\class eoStSubtreeXOver eoStParseTreeOp.h gp/eoStParseTreeOp.h +\ingroup StParseTree +*/ +template +class eoStSubtreeXOver: public eoQuadOp< eoParseTree > { +public: + + typedef eoParseTree EoType; + /** + * Constructor + * @param _max_length the maximum size of an individual + */ + eoStSubtreeXOver( unsigned _max_length) + : eoQuadOp(), max_length(_max_length) {}; + + /// the ckassname + virtual std::string className() const { return "eoStSubtreeXOver"; }; + + /// Dtor + virtual ~eoStSubtreeXOver () {}; + + /** + * Perform crossover on two individuals + * param _eo1 The first parent individual + * param _eo2 The second parent individual + */ + bool operator()(EoType & _eo1, EoType & _eo2 ) + { + int i = 0; + std::vector nodes; + int n = 0; + int type = 0; + int j = 0; + std::set test; + do + { + do // select a random node in _eo1 as crossover point, and check if we didn't try it already + { + i = rng.random(_eo1.size()); + }while(test.count(i) > 0); + + test.insert(i); + + type = _eo1[i]->type(); + + get_possible_nodes(_eo2, nodes, type); + + }while(nodes.empty() && (test.size() < _eo1.size())); + + if (nodes.empty()) // we failed to select a crossover point but tried all points (test.size() == _eo1.size()). + return true; // should this be false ?? + + // we did find at least one possible crossover point in _eo2 + + n = rng.random(nodes.size()); + j = nodes[n]; + + + + typename eoParseTree::subtree tmp = _eo1[i]; + _eo1[i] = _eo2[j]; // insert subtree + _eo2[j] = tmp; + + // we can't prune anymore + /* + _eo1.pruneTree(max_length); + _eo2.pruneTree(max_length); + */ + + return true; + } + private: + unsigned max_length; +}; + +/** eoStBranchMutation --> replace a strongly typed subtree with a randomly created strongly typed subtree +\class eoStBranchMutation eoStParseTreeOp.h gp/eoStParseTreeOp.h +\ingroup StParseTree + */ +template +class eoStBranchMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + /** + * Constructor + * @param _init An instantiation of eoGpDepthInitializer + * @param _max_length the maximum size of an individual + */ + eoStBranchMutation(eoInit& _init, unsigned _max_length) + : eoMonOp(), max_length(_max_length), initializer(_init) + {}; + + /// the class name + virtual std::string className() const { return "eoStBranchMutation"; }; + + /// Dtor + virtual ~eoStBranchMutation() {}; + + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + int i = rng.random(_eo1.size()); + std::vector nodes; + int type = _eo1[i]->type(); + int j=0; + int n=0; + + EoType eo2; + + do + { + initializer(eo2); + get_possible_nodes(eo2, nodes, type); + }while (nodes.empty()); + + n = rng.random(nodes.size()); + j = nodes[n]; + + _eo1[i] = eo2[j]; // insert subtree + + // no more pruning + /* + _eo1.pruneTree(max_length); + */ + + return true; + } + +private : + + unsigned max_length; + eoInit& initializer; +}; + + +/** eoStPointMutation --> replace a Node with a Node of the same arity and type +\class eoStPointMutation eoStParseTreeOp.h gp/eoStParseTreeOp.h +\ingroup StParseTree + */ +template +class eoStPointMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + + /** + * Constructor + * @param _node The std::vector of Nodes given to the eoGpDepthInitializer + */ + eoStPointMutation( std::vector& _node) + : eoMonOp() + { + unsigned int i=0; + int arity=0; + int type=0; + std::vector node_vector; + for(i=0; i < _node.size(); i++) + { + arity = _node[i].arity(); + type = _node[i].type(); + + node_vector = node[type][arity]; + node_vector.push_back(_node[i]); + node[type][arity]= node_vector; + + }; + }; + + /// the class name + virtual std::string className() const { return "eoStPointMutation"; }; + + /// Dtor + virtual ~eoStPointMutation() {}; + + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + // select a random node i that is to be mutated + int i = rng.random(_eo1.size()); + int arity = _eo1[i].arity(); + int type = _eo1[i]->type(); + int j = rng.random(node[type][arity].size()); + + + _eo1[i] = node[type][arity][j]; + return true; + } + +private : + + std::map < int, std::map < int, std::vector > > node; +}; + + + /** eoStHoistMutation --> replace the individual with one of its strongly typed subtree's +\class eoStHoistMutation eoStParseTreeOp.h gp/eoStParseTreeOp.h +\ingroup StParseTree + */ +template +class eoStHoistMutation: public eoMonOp< eoParseTree > +{ +public: + + typedef eoParseTree EoType; + /** + * Constructor + * @param _init An instantiation of eoStDepthInit + * @param _max_length the maximum size of an individual + */ + eoStHoistMutation(eoInit& _init, unsigned _max_length) + : eoMonOp(), max_length(_max_length), initializer(_init) + {}; + + /// the class name + virtual std::string className() const { return "eoStHoistMutation"; }; + + /// Dtor + virtual ~eoStHoistMutation() {}; + + /** + * Mutate an individual + * @param _eo1 The individual that is to be changed + */ + bool operator()(EoType& _eo1 ) + { + + std::vector nodes; + // get the type of the current tree + int type = _eo1[ _eo1.size() - 1 ]->type(); + + get_possible_nodes(_eo1, nodes, type); + + // select a subtree-node to replace the current tree + int n = rng.random(nodes.size()); + int i = nodes[n]; + + EoType eo2(_eo1[i]); + + _eo1 = eo2; + + return true; + } + +private : + + unsigned max_length; + eoInit& initializer; +}; + + +#endif diff --git a/trunk/eo/src/gp/node_pool.h b/trunk/eo/src/gp/node_pool.h new file mode 100644 index 000000000..8935e7e2e --- /dev/null +++ b/trunk/eo/src/gp/node_pool.h @@ -0,0 +1,313 @@ +/** + + * Pool allocator for the subtree and parse tree classes (homebrew and not compliant to ANSI allocator requirements) + * (c) copyright Maarten Keijzer 1999, 2000 + + * Permission to copy, use, modify, sell and distribute this software is granted provided + * this copyright notice appears in all copies. This software is provided "as is" without + * express or implied warranty, and with no claim as to its suitability for + * any purpose. + + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + + +*/ + +#ifndef node_pool_h +#define node_pool_h + +class MemPool +{ +public : + + MemPool(unsigned int sz) : esize(sznext; + delete p; + } + } + + void* allocate() + { + if (head == 0) grow(); + Link* p = head; + head = p->next; + return static_cast(p); + } + + void deallocate(void* b) + { + Link* p = static_cast(b); + p->next = head; + head = p; + } + +private : + + void grow() + { + Chunk* n = new Chunk; + n->next = chunks; + chunks = n; + + const int nelem = Chunk::size/esize; + char* start = n->mem; + char* last = &start[(nelem-1)*esize]; + for (char* p = start; p < last; p += esize) + { + reinterpret_cast(p)->next = + reinterpret_cast(p + esize); + } + + reinterpret_cast(last)->next = 0; + head = reinterpret_cast(start); + } + + struct Link + { + Link* next; + }; + + struct Chunk + { + enum {size = 8 * 1024 - 16}; + Chunk* next; + char mem[size]; + }; + + Chunk* chunks; + const unsigned int esize; + Link* head; +}; + +template +class Node_alloc +{ +public : + + T* allocate(void) + { + T* t = static_cast(mem.allocate()); + t = new (t) T; + return t; + } + + T* construct(const T& org) + { + T* t = static_cast(mem.allocate()); + t = new (t) T(org); + return t; + } + + void deallocate(T* t) + { + t->~T(); // call destructor + mem.deallocate(static_cast(t)); + } + +private : + static MemPool mem; +}; + + +template +class Standard_alloc +{ +public : + Standard_alloc() {} + + T* allocate(size_t arity = 1) + { + if (arity == 0) + return 0; + + return new T [arity]; + } + + T* construct(size_t arity, T* org) + { + if (arity == 0) + return 0; + + T* t = new T [arity]; + + for (int i = 0; i < arity; ++i) + { + t = T(org[i]); + } + } + + void deallocate(T* t, size_t arity = 1) + { + if (arity == 0) + return ; + + delete [] t; + } + +}; + +template +class Standard_Node_alloc +{ +public : + Standard_Node_alloc() {} + + T* allocate(void) + { + return new T;// [arity]; + } + + T* construct(const T& org) + { + return new T(org); + } + + void deallocate(T* t) + { + delete t; + } + +}; + +template +class Tree_alloc +{ +public : + Tree_alloc() {} + + T* allocate(size_t arity) + { + T* t; + + switch(arity) + { + + case 0 : return 0; + case 1 : + { + t = static_cast(mem1.allocate()); + new (t) T; + break; + } + case 2 : + { + t = static_cast(mem2.allocate()); + new (t) T; + new (&t[1]) T; + break; + } + case 3 : + { + t = static_cast(mem3.allocate()); + new (t) T; + new (&t[1]) T; + new (&t[2]) T; + break; + } + default : + { + return new T[arity]; + } + } + + return t; + } + + T* construct(size_t arity, T* org) + { + T* t; + + switch(arity) + { + + case 0 : return 0; + case 1 : + { + t = static_cast(mem1.allocate()); + new (t) T(*org); + break; + } + case 2 : + { + t = static_cast(mem2.allocate()); + new (t) T(*org); + new (&t[1]) T(org[1]); + break; + } + case 3 : + { + t = static_cast(mem3.allocate()); + new (t) T(*org); + new (&t[1]) T(org[1]); + new (&t[1]) T(org[2]); + break; + } + default : + { + t = new T[arity]; // does call default ctor + for (int i = 0; i < arity; ++i) + { + t[i] = T(org[i]); // constructs now + } + } + } + + return t; + } + + + + void deallocate(T* t, size_t arity) + { + switch(arity) + { + case 0: return; + case 3 : + { + t[2].~T(); t[1].~T(); t[0].~T(); + mem3.deallocate(static_cast(t)); + return; + } + case 2 : + { + t[1].~T(); t[0].~T(); + mem2.deallocate(static_cast(t)); + return; + } + case 1 : + { + t[0].~T(); + mem1.deallocate(static_cast(t)); + return; + } + default : + { + delete [] t; + return; + } + } + } + + +private : + static MemPool mem1; + static MemPool mem2; + static MemPool mem3; +}; + +// static (non thread_safe) memory pools +template MemPool Node_alloc::mem = sizeof(T); + +template MemPool Tree_alloc::mem1 = sizeof(T); +template MemPool Tree_alloc::mem2 = sizeof(T) * 2; +template MemPool Tree_alloc::mem3 = sizeof(T) * 3; + +#endif diff --git a/trunk/eo/src/gp/parse_tree.h b/trunk/eo/src/gp/parse_tree.h new file mode 100644 index 000000000..84ec04d35 --- /dev/null +++ b/trunk/eo/src/gp/parse_tree.h @@ -0,0 +1,1012 @@ +#ifndef PARSE_TREE_HH +#define PARSE_TREE_HH + +/** + + * Parse_tree and subtree classes + * (c) copyright Maarten Keijzer 1999, 2000 + + * Permission to copy, use, modify, sell and distribute this software is granted provided + * this copyright notice appears in all copies. This software is provided "as is" without + * express or implied warranty, and with no claim as to its suitability for + * any purpose. + + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices as well as this one are retained, and a notice that the code was + * modified is included with the above copyright notice. + + + + Usage information. + + class Node (your node in the tree) must have the following implemented: + + ****** Arity ****** + \code + int arity(void) const + \endcode + + Note: the default constructor of a Node should provide a + Node with arity 0! + + ****** Evaluation ****** + + A parse_tree is evaluated through one of it's apply() members: + + 1) parse_tree::apply(RetVal) + + is the simplest evaluation, it will call + + \code + RetVal Node::operator()(RetVal, subtree::const_iterator) + \endcode + + (Unfortunately the first RetVal argument is mandatory (although you + might not need it. This is because MSVC does not support member template + functions properly. If it cannot deduce the template arguments (as is + the case in templatizing over return value) you are not allowed to + specify them. calling tree.apply() would result in a syntax + error. That is why you have to call tree.apply(double()) instead.) + + + 2) parse_tree::apply(RetVal v, It values) + + will call: + + \code + RetVal Node::operator()(RetVal, subtree<... , It values) + \endcode + + where It is whatever type you desire (most of the time + this will be a std::vector containing the values of your + variables); + + 3) parse_tree::apply(RetVal, It values, It2 moreValues) + + will call: + + \code + RetVal Node::operator()(RetVal, subtree<... , It values, It2 moreValues) + \endcode + + although I do not see the immediate use of this, however... + + 4) parse_tree::apply(RetVal, It values, It2 args, It3 adfs) + + that calls: + + \code + RetVal Node::operator()(subtree<... , It values, It2 args, It3 adfs) + \endcode + + can be useful for implementing adfs. + + + In general it is a good idea to leave the specifics of the + arguments open so that different ways of evaluation remain + possible. Implement the simplest eval as: + + \code + template + RetVal operator()(RetVal dummy, It begin) const + \endcode + + ****** Internal Structure ****** + + A parse_tree has two template arguments: the Node and the ReturnValue + produced by evaluating the node. The structure of the tree is defined + through a subtree class that has the same two template arguments. + + The nodes are stored in a tree like : + + node4 + / \ + node3 node2 + / \ + node1 node0 + + where nodes 2 and 4 have arity 2 and nodes 0,1 and 3 arity 0 (terminals) + + The nodes are subtrees, containing the structure of the tree, together + with its size and depth. They contain a Node, the user defined template + argument. To access these nodes from a subtree, use operator-> or operator*. + + The numbers behind the nodes define a reverse-polish or postfix + traversel through the tree. The parse_tree defines iterators + on the tree such that + + tree.begin() points at the subtree at node0 and + tree.back() returns the subtree at node4, the complete tree + + Likewise operator[] is defined on the tree, such that: + + tree[0] will return the subtree at node0, while + tree[2] will return the subtree at node2 + + Assigments of subtrees is protected so that the code: + + tree[2] = tree[0]; + + will not crash and result in a tree structured as: + + node4 + / \ + node3 node0 + + Note that the rank numbers no longer specify their place in the tree: + + tree[0] still points at node0, but + tree[1] now points to node3 and + tree[2] points at the root node4 + + Embedded iterators are implemented to iterate over nodes rather + than subtrees. So an easy way to copy your tree to a std::vector is: + + std::vector vec(tree.size()); + copy(tree.ebegin(), tree.eend(), vec.begin()); + + You can also copy it to an std::ostream_iterator with this + technique, given that your Node implements an appropriate + operator<<. Reinitializing a tree with the std::vector is also + simple: + + tree.clear(); + copy(vec.begin(), vec.end(), back_inserter(tree)); + + or from an std::istream: + +\code + copy(std::istream_iterator(my_stream), std::istream_iterator(), back_inserter(tree)); +\endcode + + Note that the back_inserter must be used as there is no + resize member in the parse_tree. back_inserter will use + the push_back member from the parse_tree + +*/ + +#include +#include // for swap + +#ifdef _MSC_VER +#pragma warning(disable : 4786) // disable this nagging warning about the limitations of the mirkosoft debugger +#endif + +namespace gp_parse_tree +{ + +#include "node_pool.h" + +/// This ones defined because gcc does not always implement namespaces +template +inline void do_the_swap(T& a, T& b) +{ + T tmp = a; + a = b; + b = tmp; +} + +template class parse_tree +{ + public : + + +class subtree +{ + +/** + a bit nasty way to use a pool allocator (which would otherwise use slooow new and delete) + @todo use the std::allocator interface +*/ + +#if (defined(__GNUC__) || defined(_MSC_VER)) && !(defined(_MT) || defined(MACOSX) || defined(__APPLE__)) // not multithreaded (or MACOSX - J. Eggermont) + Node_alloc node_allocator; + Tree_alloc tree_allocator; +#else + Standard_Node_alloc node_allocator; + Standard_alloc tree_allocator; +#endif + +public : + + typedef subtree* iterator; + typedef const subtree* const_iterator; + + /* Constructors, assignments */ + + subtree(void) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) + {} + subtree(const subtree& s) + : content(node_allocator.allocate()), + args(0), + parent(0), + _cumulative_size(1), + _depth(1), + _size(1) + { + copy(s); + } + + subtree(const T& t) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) + { copy(t); } + + template + subtree(It b, It e) : content(node_allocator.allocate()), args(0), parent(0), _cumulative_size(0), _depth(0), _size(1) + { // initialize in prefix order for efficiency reasons + init(b, --e); + } + + virtual ~subtree(void) { tree_allocator.deallocate(args, arity()); node_allocator.deallocate(content); } + + subtree& operator=(const subtree& s) + { + if (s.get_root() == get_root()) + { // from the same tree, maybe a child. Don't take any chances + subtree anotherS = s; + return copy(anotherS); + } + + copy(s); + updateAfterInsert(); + return *this; + } + + subtree& operator=(const T& t) { copy(t); updateAfterInsert(); return *this; } + + /* Access to the nodes */ + + T& operator*(void) { return *content; } + const T& operator*(void) const { return *content; } + T* operator->(void) { return content; } + const T* operator->(void) const { return content; } + + /* Equality, inequality check, Node needs to implement operator== */ + + bool operator==(const subtree& other) const + { + if (! (*content == *other.content)) + return false; + + for (int i = 0; i < arity(); i++) + { + if (!(args[i] == other.args[i])) + return false; + } + + return true; + } + + bool operator !=(const subtree& other) const + { + return !operator==(other); + } + + /* Arity */ + int arity(void) const { return content->arity(); } + + /* Evaluation with an increasing amount of user defined arguments */ + template + void apply(RetVal& v) const { (*content)(v, begin()); } + + template + void apply(RetVal& v, It values) const + { + (*content)(v, begin(), values); + } + + template + void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, typename subtree::iterator, It)) + { + (content->*f)(v, begin(), misc); + } + + +/* template + void apply(RetVal& v, It values, It2 moreValues) const + { (*content)(v, begin(), values, moreValues); } + + template + void apply(RetVal& v, It values, It2 moreValues, It3 evenMoreValues) const + { (*content)(v, begin(), values, moreValues, evenMoreValues); } +*/ + + template + void find_nodes(std::vector& result, Pred& p) + { + if (p(*content)) + { + result.push_back(this); + } + + for (int i = 0; i < arity(); ++i) + { + args[i].find_nodes(result, p); + } + } + + template + void find_nodes(std::vector& result, Pred& p) const + { + if (p(*content)) + { + result.push_back(this); + } + + for (int i = 0; i < arity(); ++i) + { + args[i].find_nodes(result, p); + } + } + + /* Iterators */ + + iterator begin(void) { return args; } + const_iterator begin(void) const { return args; } + + iterator end(void) { return args + arity(); } + const_iterator end(void) const { return args + arity(); } + + subtree& operator[](int i) { return *(begin() + i); } + const subtree& operator[](int i) const { return *(begin() + i); } + + /* Some statistics */ + + size_t size(void) const { return _size; } + + size_t cumulative_size(void) const { return _cumulative_size; } + size_t depth(void) const { return _depth; } + + const subtree& select_cumulative(size_t which) const + { return imp_select_cumulative(which); } + + subtree& select_cumulative(size_t which) + { return const_cast(imp_select_cumulative(which)); } + + subtree& get_node(size_t which) + { return const_cast(imp_get_node(which));} + const subtree& get_node(size_t which) const + { return imp_get_node(which); } + + subtree* get_parent(void) { return parent; } + const subtree* get_parent(void) const { return parent; } + + void clear(void) + { tree_allocator.deallocate(args, arity()); args = 0; *content = T(); parent = 0; _cumulative_size = 0; _depth = 0; _size = 0; } + + void swap(subtree& y) + { + do_the_swap(content, y.content); + do_the_swap(args, y.args); + + adopt(); + y.adopt(); + + do_the_swap(parent, y.parent); + + do_the_swap(_cumulative_size, y._cumulative_size); + do_the_swap(_depth, y._depth); + do_the_swap(_size, y._size); + updateAfterInsert(); + } + +protected : + + virtual void updateAfterInsert(void) + { + _depth = 0; + _size = 1; + _cumulative_size = 0; + + for (iterator it = begin(); it != end(); ++it) + { + _size += it->size(); + _cumulative_size += it->_cumulative_size; + _depth = it->_depth > _depth? it->_depth: _depth; + } + _cumulative_size += _size; + _depth++; + + if (parent) + parent->updateAfterInsert(); + } + +private : + + const subtree& imp_select_cumulative(size_t which) const + { + if (which >= (_cumulative_size - size())) + return *this; + // else + + for (int i = arity() - 1; i >= 0; --i) + { + if (which < args[i]._cumulative_size) + return args[i].imp_select_cumulative(which); + which -= args[i]._cumulative_size; + } + + return *this; // error! + } + + const subtree& imp_get_node(size_t which) const + { + if (which == size() - 1) + return *this; + + for (int i = arity() - 1; i >= 0; --i) + { + unsigned c_size = args[i].size(); + if (which < c_size) + return args[i].imp_get_node(which); + which -= c_size; + } + + return *this; // error! + } + + const subtree* get_root(void) const + { + if (parent == 0) + return this; + // else + + return parent->get_root(); + } + subtree& copy(const subtree& s) + { + int old_arity = arity(); + + int new_arity = s.arity(); + + if (new_arity != old_arity) + { + tree_allocator.deallocate(args, old_arity); + + args = tree_allocator.allocate(new_arity); + } + + switch(new_arity) + { + case 3 : args[2].copy(s.args[2]); args[2].parent = this; // no break! + case 2 : args[1].copy(s.args[1]); args[1].parent = this; + case 1 : args[0].copy(s.args[0]); args[0].parent = this; + case 0 : break; + default : + { + for (int i = 0; i < new_arity; ++i) + { + args[i].copy(s.args[i]); + args[i].parent = this; + } + } + } + + *content = *s.content; + _size = s._size; + _depth = s._depth; + _cumulative_size = s._cumulative_size; + + return *this; + } + + subtree& copy(const T& t) + { + int oldArity = arity(); + + if (content != &t) + *content = t; + else + oldArity = -1; + + int ar = arity(); + + if (ar != oldArity) + { + if (oldArity != -1) + tree_allocator.deallocate(args, oldArity); + + args = tree_allocator.allocate(ar); + + //if (ar > 0) + // args = new subtree [ar]; + //else + // args = 0; + } + + adopt(); + updateAfterInsert(); + return *this; + } + + void disown(void) + { + switch(arity()) + { + case 3 : args[2].parent = 0; // no break! + case 2 : args[1].parent = 0; + case 1 : args[0].parent = 0; break; + case 0 : break; + default : + { + for (iterator it = begin(); it != end(); ++it) + { + it->parent = 0; + } + } + } + + } + + void adopt(void) + { + switch(arity()) + { + case 3 : args[2].parent = this; // no break! + case 2 : args[1].parent = this; + case 1 : args[0].parent = this; break; + case 0 : break; + default : + { + for (iterator it = begin(); it != end(); ++it) + { + it->parent = this; + } + } + } + } + + template + void init(It b, It& last) + { + *this = *last; + +#ifndef NDEBUG + if (last == b && arity() > 0) + { + throw "subtree::init()"; + } +#endif + + for (int i = 0; i < arity(); ++i) + { + args[i].parent = 0; + args[i].init(b, --last); + args[i].parent = this; + } + + updateAfterInsert(); + } + + T* content; + subtree* args; + subtree* parent; + + size_t _cumulative_size; + size_t _depth; + size_t _size; +}; + +// Continuing with parse_tree + + typedef T value_type; + + /* Constructors and Assignments */ + + parse_tree(void) : _root(), pushed() {} + parse_tree(const parse_tree& org) : _root(org._root), pushed(org.pushed) { } + parse_tree(const subtree& sub) : _root(sub), pushed() { } + + template + parse_tree(It b, It e) : _root(b, e), pushed() {} + + virtual ~parse_tree(void) {} + + parse_tree& operator=(const parse_tree& org) { return copy(org); } + parse_tree& operator=(const subtree& sub) + { return copy(sub); } + + + /* Equality and inequality */ + + bool operator==(const parse_tree& other) const + { return _root == other._root; } + + bool operator !=(const parse_tree& other) const + { return !operator==(other); } + + /* Simple tree statistics */ + + size_t size(void) const { return _root.size(); } + size_t depth(void) const { return _root.depth(); } + void clear(void) { _root.clear(); pushed.resize(0); } + + /* Evaluation (application), with an increasing number of user defined arguments */ + + template + void apply(RetVal& v) const + { _root.apply(v); } + + template + void apply(RetVal& v, It varValues) const + { _root.apply(v, varValues); } + + template + void apply_mem_func(RetVal& v, It misc, void (T::* f)(RetVal&, typename subtree::iterator, It)) + { + _root.apply_mem_func(v, misc, f); + } + + //template + // void apply(RetVal& v, It varValues, It2 moreValues) const + // { _root.apply(v, varValues, moreValues); } + + //template + // void apply(RetVal& v, It varValues, It2 moreValues, It3 evenMoreValues) const + // { _root.apply(v, varValues, moreValues, evenMoreValues); } + + template + void find_nodes(std::vector& result, Pred& p) + { + _root.find_nodes(result, p); + } + + template + void find_nodes(std::vector& result, Pred& p) const + { + _root.find_nodes(p); + } + + /* Customized Swap */ + void swap(parse_tree& other) + { + do_the_swap(pushed, other.pushed); + _root.swap(other._root); + } + + /* Definitions of the iterators */ + + class base_iterator + { + public : + + base_iterator() {} + base_iterator(subtree* n) { node = n; } + + base_iterator& operator=(const base_iterator& org) + { node = org.node; return *this; } + + bool operator==(const base_iterator& org) const + { return node == org.node; } + bool operator!=(const base_iterator& org) const + { return !operator==(org); } + + base_iterator operator+(size_t n) const + { + base_iterator tmp = *this; + + for(;n != 0; --n) + { + ++tmp; + } + + return tmp; + } + + base_iterator& operator++(void) + { + subtree* parent = node->get_parent(); + + if (parent == 0) + { + node = 0; + return *this; + } + // else + typename subtree::iterator it; + for (it = parent->begin(); it != parent->end(); ++it) + { + if (node == &(*it)) + break; + } + + if (it == parent->begin()) + node = parent; + else + { + node = &(--it)->get_node(0); + } + + return *this; + } + + base_iterator operator++(int) + { + base_iterator tmp = *this; + operator++(); + return tmp; + } + + protected : + subtree* node; + }; + + class iterator : public base_iterator + { + public: + + using base_iterator::node; + + typedef std::forward_iterator_tag iterator_category; + typedef subtree value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef subtree* pointer; + typedef subtree& reference; + + iterator() : base_iterator() {} + iterator(subtree* n): base_iterator(n) {} + iterator& operator=(const iterator& org) + { base_iterator::operator=(org); return *this; } + + subtree& operator*(void) { return *node; } + subtree* operator->(void) { return node; } + }; + + + + class embedded_iterator : public base_iterator + { + public: + + using base_iterator::node; + + typedef std::forward_iterator_tag iterator_category; + typedef T value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef T* pointer; + typedef T& reference; + + embedded_iterator() : base_iterator() {} + embedded_iterator(subtree* n): base_iterator(n) {} + embedded_iterator& operator=(const embedded_iterator& org) + { base_iterator::operator=(org); return *this; } + + T& operator*(void) { return **node; } + T* operator->(void) { return &**node; } + }; + + class base_const_iterator + { + public: + + base_const_iterator() {} + base_const_iterator(const subtree* n) { node = n; } + + base_const_iterator& operator=(const base_const_iterator& org) + { node = org.node; return *this; } + + bool operator==(const base_const_iterator& org) const + { return node == org.node; } + bool operator!=(const base_const_iterator& org) const + { return !operator==(org); } + + base_const_iterator& operator++(void) + { + const subtree* parent = node->get_parent(); + + if (parent == 0) + { + node = 0; + return *this; + } + // else + typename subtree::const_iterator it; + + for (it = parent->begin(); it != parent->end(); ++it) + { + if (node == &(*it)) + break; + } + + if (it == parent->begin()) + node = parent; + else + node = &(--it)->get_node(0); + return *this; + } + + base_const_iterator operator++(int) + { + base_const_iterator tmp = *this; + operator++(); + return tmp; + } + + protected : + + const subtree* node; + }; + + class const_iterator : public base_const_iterator + { + public: + + using base_const_iterator::node; + + typedef std::forward_iterator_tag iterator_category; + typedef const subtree value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef const subtree* pointer; + typedef const subtree& reference; + + const_iterator() : base_const_iterator() {} + const_iterator(const subtree* n): base_const_iterator(n) {} + const_iterator& operator=(const const_iterator& org) + { base_const_iterator::operator=(org); return *this; } + + const subtree& operator*(void) { return *node; } + const subtree* operator->(void) { return node; } + }; + + class embedded_const_iterator : public base_const_iterator + { + public: + + using base_const_iterator::node; + + typedef std::forward_iterator_tag iterator_category; + typedef const T value_type; + typedef size_t distance_type; + typedef size_t difference_type; + typedef const T* pointer; + typedef const T& reference; + + embedded_const_iterator() : base_const_iterator() {} + embedded_const_iterator(const subtree* n): base_const_iterator(n) {} + embedded_const_iterator& operator=(const embedded_const_iterator& org) + { base_const_iterator::operator=(org); return *this; } + + embedded_const_iterator operator+(size_t n) const + { + embedded_const_iterator tmp = *this; + + for(;n != 0; --n) + { + ++tmp; + } + + return tmp; + } + + const T& operator*(void) const { return **node; } + const T* operator->(void) const { return node->operator->(); } + }; + + /* Iterator access */ + + iterator begin(void) { return iterator(&operator[](0)); } + const_iterator begin(void) const { return const_iterator(&operator[](0)); } + iterator end(void) { return iterator(0); } + const_iterator end(void) const { return const_iterator(0);} + + embedded_iterator ebegin(void) { return embedded_iterator(&operator[](0)); } + embedded_const_iterator ebegin(void) const { return embedded_const_iterator(&operator[](0)); } + embedded_iterator eend(void) { return embedded_iterator(0); } + embedded_const_iterator eend(void) const { return embedded_const_iterator(0);} + + bool empty(void) const { return size() == 0; } + bool valid(void) const { return pushed.empty(); } + + /* push_back */ + + void push_back(const parse_tree& tree) + { + if (!empty()) + pushed.push_back(_root); + + _root = tree.back(); + } + + void push_back(const T& t) + { + if (!empty()) + pushed.push_back(_root); + + _root = t; + + for (typename subtree::iterator it = _root.begin(); it != _root.end(); it++) + { + *it = pushed.back(); + pushed.pop_back(); + } + + } + + /* Access to subtrees */ + + subtree& back(void) { return _root; } + const subtree& back(void) const { return _root; } + subtree& root(void) { return _root; } + const subtree& root(void) const { return _root; } + + subtree& front(void) { return _root[0]; } + const subtree& front(void) const { return _root[0]; } + + subtree& operator[](size_t i) + { return const_cast(_root.get_node(i)); } + const subtree& operator[](size_t i) const + { return _root.get_node(i); } + + subtree& get_cumulative(size_t i) + { return const_cast(_root.get_cumulative(i)); } + const subtree& get_cumulative(size_t i) const + { return get_cumulative(i); } + + private : + + parse_tree& copy(const parse_tree& org) + { + _root = org._root; + pushed = org.pushed; + + return *this; + } + + parse_tree& copy(const subtree& sub) + { _root = sub; pushed.resize(0); return *this; } + + subtree _root; + std::vector pushed; +}; // end class parse_tree + + +} // end namespace gp_parse_tree + +namespace std +{ // for use with stlport on MSVC + +template inline +std::forward_iterator_tag iterator_category(typename gp_parse_tree::parse_tree::embedded_iterator) +{ + return std::forward_iterator_tag(); +} + +template inline +ptrdiff_t* distance_type(typename gp_parse_tree::parse_tree::embedded_iterator) +{ + return 0; +} + +template inline +std::forward_iterator_tag iterator_category(typename gp_parse_tree::parse_tree::iterator) +{ + return std::forward_iterator_tag(); +} + +template inline +ptrdiff_t* distance_type(typename gp_parse_tree::parse_tree::iterator) +{ + return 0; +} + +/* Put customized swaps also in std... + +template inline +void swap(gp_parse_tree::parse_tree& a, gp_parse_tree::parse_tree& b) +{ + a.swap(b); +} + +template inline +void iter_swap(std::vector >::iterator a, std::vector > b) +{ + a->swap(*b); +}*/ + + +} // namespace std + + +#endif diff --git a/trunk/eo/src/other/eoExternalEO.h b/trunk/eo/src/other/eoExternalEO.h new file mode 100644 index 000000000..4440b428f --- /dev/null +++ b/trunk/eo/src/other/eoExternalEO.h @@ -0,0 +1,100 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoExternalEO.h + Definition of an object that allows an external struct to be inserted in EO + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoExternalEO_h +#define eoExternalEO_h + +#include // EO + +/** + * Definition of an object that allows an external struct + * to be inserted in EO. This struct or class can be of any + * form, the only thing this class does is attach a fitness + * value to it and makes it the appropriate type (derives it from EO). + * + * @ingroup Utilities +*/ +template +class eoExternalEO : public EO, virtual public External +{ +public : + + eoExternalEO() + : External(), EO() + {} + + /** Init externalEo with the struct itself and set fitness to zero */ + eoExternalEO(const External& ext) + : EO(), External(ext) + {} + + eoExternalEO(std::istream& is, const External& ext) + : EO(), External(ext) + { readFrom(is); } + + /** + * Read object, the external struct needs to have an operator>> defined + */ + virtual void readFrom(std::istream& _is) + { + EO::readFrom(_is); + _is >> static_cast(*this); + } + + /** + * Write object. Called printOn since it prints the object _on_ a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + EO::printOn(_os); + _os << static_cast(*this); + } + +}; +/** @example t-eoExternalEO.cpp + */ + +/** To remove ambiguities between EO and External, streaming operators are defined yet again + * @ingroup Utilities + */ +template +std::ostream& operator<<(std::ostream& os, const eoExternalEO& eo) +{ + eo.printOn(os); + return os; +} + +/** To remove ambiguities between EO and External, streaming operators are defined yet again + * @ingroup Utilities + */ +template +std::istream& operator>>(std::istream& is, eoExternalEO& eo) +{ + eo.readFrom(is); + return is; +} + +#endif diff --git a/trunk/eo/src/other/eoExternalOpFunctions.h b/trunk/eo/src/other/eoExternalOpFunctions.h new file mode 100644 index 000000000..d86b49c45 --- /dev/null +++ b/trunk/eo/src/other/eoExternalOpFunctions.h @@ -0,0 +1,180 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoExternalOpFunc.h + Defines eoExternalInitOpFunc, eoExternalMonOpFunc, eoExternalBinOpFunc, eoExternalQuadOpFunc + that are used to wrap a function pointer to externally defined initialization + and 'genetic' operators + + (c) Maarten Keijzer (mkeijzer@mad.scientist.com) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef eoExternalOpFunc_h +#define eoExternalOpFunc_h + +#include +#include +#include +#include + +/** + Initialization of external struct, ctor expects a function of the following + signature: + + External func(); + + Where External is the user defined struct or class + + @ingroup Utilities +*/ +template > +class eoExternalInit : public eoInit +{ + +public : + + eoExternalInit(External (*_init)(void)) : init(_init) {} + + + void operator()(ExternalEO& _eo) + { + _eo.External::operator=( (*init)() ); + _eo.invalidate(); + } + +private : + + External (*init)(void); +}; + +/** + Evaluation of external struct, ctor expects a function of the following + signature: + + Fit func(External&); + + Where External is the user defined struct or class and Fit the fitness type + +@ingroup Utilities +*/ +template > +class eoExternalEvalFunc : public eoEvalFunc +{ + public : + + eoExternalEvalFunc(F (*_eval)(const External&)) : eval(_eval) {} + + void operator()(ExternalEO& eo) + { + if (eo.invalid()) + eo.fitness( (*eval)(eo) ); + } + + private : + + F (*eval)(const External&); +}; + +/** + Mutation of external struct, ctor expects a function of the following + signature: + + bool func(External&); + + + Where External is the user defined struct or class. + The function should return true when it changed something, false otherwise + + @ingroup Utilities +*/ + +template > +class eoExternalMonOp : public eoMonOp +{ + public : + + eoExternalMonOp(bool (*_mutate)(External&)) : mutate(_mutate) {} + + bool operator()(ExternalEO& eo) + { + return (*mutate)(eo); + } + + private : + + bool (*mutate)(External&); +}; + +/** + Crossover of external struct, ctor expects a function of the following + signature: + + bool func(External&, const External&); + + Where External is the user defined struct or class + The function should return true when it changed something, false otherwise + + @ingroup Utilities +*/ +template > +class eoExternalBinOp : public eoBinOp +{ + public : + + eoExternalBinOp(bool (*_binop)(External&, const External&)) : binop(_binop) {} + + bool operator()(ExternalEO& eo1, const ExternalEO& eo2) + { + return (*binop)(eo1, eo2); + } + + private : + + bool (*binop)(External&, const External&); +}; + +/** + Crossover of external struct, ctor expects a function of the following + signature: + + bool func(External&, External&); + + Where External is the user defined struct or class + The function should return true when it changed something, false otherwise + + @ingroup Utilities +*/ +template > +class eoExternalQuadOp : public eoQuadOp +{ + public : + + eoExternalQuadOp(bool (*_quadop)(External&, External&)) : quadop(_quadop) {} + + bool operator()(ExternalEO& eo1, ExternalEO& eo2) + { + return (*quadop)(eo1, eo2); + } + + private : + + bool (*quadop)(External&, External&); +}; + +#endif diff --git a/trunk/eo/src/other/eoString.h b/trunk/eo/src/other/eoString.h new file mode 100644 index 000000000..3071d1ee6 --- /dev/null +++ b/trunk/eo/src/other/eoString.h @@ -0,0 +1,84 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoString.h +// (c) GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ +//----------------------------------------------------------------------------- + +#ifndef _eoString_H +#define _eoString_H + +// STL libraries +#include +#include +#include + + +#include + +//----------------------------------------------------------------------------- +// eoString +//----------------------------------------------------------------------------- + +/** Adaptor that turns an STL std::string into an EO + + @ingroup Representations + @ingroup Utilities + */ +template +class eoString: public EO, public std::string +{ +public: + + typedef char Type; + typedef char AtomType; + typedef std::string ContainerType; + + + /// Canonical part of the objects: several ctors, copy ctor, dtor and assignment operator + //@{ + /// ctor + eoString( const std::string& _str ="" ) + : std::string( _str ) {}; + + /// printing... + virtual void printOn(std::ostream& os) const + { + EO::printOn(os); + os << ' '; + + os << size() << ' ' << substr() << std::endl; + + } + + /** @name Methods from eoObject + readFrom and printOn are directly inherited from eo1d + */ + //@{ + /** Inherited from eoObject + @see eoObject + */ + virtual std::string className() const {return "eoString";}; + //@} + + +}; + +#endif diff --git a/trunk/eo/src/other/external_eo b/trunk/eo/src/other/external_eo new file mode 100644 index 000000000..aeaaaab6b --- /dev/null +++ b/trunk/eo/src/other/external_eo @@ -0,0 +1,2 @@ +#include +#include diff --git a/trunk/eo/src/pyeo/AUTHORS b/trunk/eo/src/pyeo/AUTHORS new file mode 100644 index 000000000..e1d909968 --- /dev/null +++ b/trunk/eo/src/pyeo/AUTHORS @@ -0,0 +1,3 @@ + +Maarten Keijzer (mkeijzer@cs.vu.nl) + diff --git a/trunk/eo/src/pyeo/BUILDING b/trunk/eo/src/pyeo/BUILDING new file mode 100644 index 000000000..3db7de1b7 --- /dev/null +++ b/trunk/eo/src/pyeo/BUILDING @@ -0,0 +1,174 @@ + + +To build PyEO, a number of steps are neccessary. PyEO depends on Boost.Python v2, +which in turn expects the presence of python2.2. As we can't expect people to have +this installed some instructions are in order to help people build PyEO.so + +First of all, currently Windows is not supported. I don't develop on windows and +don't have access to a compiler on it. + +PyEO has been developed on Debian, using gcc 2.95-4. + +My primary platform is debian, so the default Makefile provides for that. Below you +will also find instructions for rpm-based distributions. As far as I know this includes +RedHat, Mandrake, Suse, Yellowdog, and probably a lot more. If I recall correctly, the RPM +format is the LSB default. + +===== Building PyEO on Debian ===== + +Point your /etc/apt/sources.list to the unstable distribution (if it's not there already), +and install: + +for Python: + +$ apt-get install python2.2 +$ apt-get install python2.2-dev + +It might also be a good idea to install the numeric library + +$ apt-get install python2.2-numeric + + +For Boost.Python: + +$ apt-get install libboost-python1.29.0 +$ apt-get install libboost-python-dev + +If all goes well, this will also install libstlport. If it doesn't, + +$ apt-get install libstlport4.5 + +and maybe + +$ apt-get install libstlport4.5-dev + +but I'm not sure about the latter. + +Now you can type + +$ make + +And after (a long) wait, a file called PyEO.so will be produced. + +===== Building PyEO on an RPM-based Distro ===== + +The following recipe has only been tested on a RedHat 7.1 installation, on other +systems some stuff might be different. + +== Getting Python2.2 == + +If you don't have python2.2 installed (newer distro's install this by default), +you can either install it from a binary specifically build for your distro, or +you can build it from source by going to: + +http://www.python.org/2.2.1/rpms.html + +and getting the source by clicking the link to python2-2.2.1-2.src.rpm + +This actually links to: + +http://www.python.org/ftp/python/2.2.1/rpms/python2-2.2.1-2.src.rpm + +for your convenience I mirrored this file at: + +http://www.cs.vu.nl/~mkeijzer/PyEO/python2-2.2.1-2.src.rpm + +by usuing the command: + +$ rpm --rebuild python2-2.2.1-2.src.rpm + +or with newer versions of rpm + +$ rpmbuild python2-2.2.1-2.src.rpm + +It will build a binary rpm for your computer. On this Redhat 7.1 box it put the +RPMS it build in + +/usr/src/redhat/RPMS/i386/ + +The ones you need to install are: + +python2-2.2.1-2.i386.rpm +python2-devel-2.2.1-2.i386.rpm + +But you might want to install the rest as well. + +== Getting Boost.Python == + +First of all, do a quick check. At the prompt type: + +$ python + +If you see something like: + +Python 2.2.2 (#4, Oct 15 2002, 04:21:28) +[GCC 2.95.4 20011002 (Debian prerelease)] on linux2 +Type "help", "copyright", "credits" or "license" for more information. + +(don't mind the second line, It's the version info we're interested in) + +You're set to go. Unfortunately, on this Redhat 7.1 box I tested things on, /usr/bin/python +insisted on pointing to /usr/bin/python1.5 . Unfortunately, the boost source rpm depends +on python to provide 2.2. If this is the case on your machine as well, there are two +possible fixes (of which one I tested). + +/usr/bin/python is a symlink, let it point to /usr/bin/python2.2 (this one I tested) + +DON'T forget to repoint /usr/bin/python to /usr/bin/python1.5 after you build the boost libraries: Redhat tools +depend on this! + +or + +alias python=/usr/bin/python2.2 (which would be better if it works, but untested.) + +So given that you are in a shell that uses python2.2 if you issue +the command 'python', get two boost source rpms at: + +http://www.starostik.de/malte/boost/ + +namely + +boost-jam-3.1.3-1.src.rpm +boost-1.29.0-2.src.rpm + +Which I also mirrored at + +http://www.cs.vu.nl/~mkeijzer/PyEO/boost-jam-3.1.3-1.src.rpm +http://www.cs.vu.nl/~mkeijzer/PyEO/boost-1.29.0-2.src.rpm + +First build and install jam using either rpm --rebuild or rpmbuild. + +The file you have to install is: + +boost-jam-3.1.3-1.i386.rpm + +This is the 'make' replacement that is used by boost. + +Next, build boost-1.29.0.src.rpm using 'rpm --rebuild' or 'rpmbuild' + +The only rpm's that this procedure produces that you need to install is: + +boost-python-1.29.0-2.i386.rpm +boost-python-devel-1.29.0-2.i386.rpm + + +When installing boost-python-devel, I got a dependency problem with libpython-dev, +this was probably caused by the same problem I had with python2.2, python1.5. I ignored +it by using: + +$ rpm -i --nodep boost-python-devel-1.29.0-2.i386.rpm + +and you're all set to type + +$ make -fMakefile.rpm + +in the PyEO build directory + +==== Testing PyEO========== + +After building go to the test directory and type + +$ ./run_tests.sh + +If you don't see errors, all is well and you're ready to go + diff --git a/trunk/eo/src/pyeo/CMakeLists.txt b/trunk/eo/src/pyeo/CMakeLists.txt new file mode 100644 index 000000000..760283a85 --- /dev/null +++ b/trunk/eo/src/pyeo/CMakeLists.txt @@ -0,0 +1,63 @@ +# -------------------------------------------------------------------------- +# +# PyEO - cmake version +# +# -------------------------------------------------------------------------- +# +# Hochschule fuer Gestaltung und Kunst Zuerich +# Studienberreich Interaction Design +# http://interaction.hgkz.ch +# +# -------------------------------------------------------------------------- +# +# prog: max rheiner;xohm@users.sourceforge.net +# date: 7/27/2007 (m/d/y) +# +# ---------------------------------------------------------------------------- + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +PROJECT(PyEO) + +FIND_PACKAGE(Boost 1.42 COMPONENTS python) +FIND_PACKAGE(PythonLibs) + +INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) +INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) + +LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) + +IF(APPLE) + # osx internal + FIND_LIBRARY(APPLE_CARBON Carbon) +ENDIF(APPLE) + +# includes +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +#INCLUDE_DIRECTORIES(../) + +# source +FILE(GLOB SOURCES *.cpp) + +# EO dependencies +SET(EO_SOURCES + ${EO_SOURCE_DIR}/src/eoFunctorStore.cpp + ${EO_SOURCE_DIR}/src/utils/eoLogger.cpp + ${EO_SOURCE_DIR}/src/utils/eoParallel.cpp + ) + +# shared library +ADD_LIBRARY(PyEO MODULE ${SOURCES} ${EO_SOURCES}) +INSTALL(TARGETS PyEO LIBRARY DESTINATION lib COMPONENT libraries) + +# python 2.5 must have pyd +IF(WIN32 AND NOT CYGWIN) + SET_TARGET_PROPERTIES(PyEO PROPERTIES SUFFIX ".pyd") +ENDIF(WIN32 AND NOT CYGWIN) + +# add the libs +IF(APPLE) + TARGET_LINK_LIBRARIES(PyEO ${APPLE_CARBON} ${PYTHON_LIBRARY} ${Boost_LIBRARIES}) +ELSE(APPLE) + TARGET_LINK_LIBRARIES(PyEO ${PYTHON_LIBRARY} ${Boost_LIBRARIES}) +ENDIF(APPLE) diff --git a/trunk/eo/src/pyeo/COPYING b/trunk/eo/src/pyeo/COPYING new file mode 100644 index 000000000..d60c31a97 --- /dev/null +++ b/trunk/eo/src/pyeo/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/trunk/eo/src/pyeo/Makefile b/trunk/eo/src/pyeo/Makefile new file mode 100644 index 000000000..61c4f89f4 --- /dev/null +++ b/trunk/eo/src/pyeo/Makefile @@ -0,0 +1,35 @@ +# Note for however is foolish enough to attempt to build this thing +# +# You need: +# Python 2.2 +# Boost.Python v2 +# + +CXX = g++ +CPPFLAGS = -Wall -O2 #-g #-O2 +LDFLAGS = +COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c +LINK = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) +INC=-I/usr/include/python2.6 -I.. -I../.. -ftemplate-depth-50 + +OBJECTS=eoFunctorStore.o PyEO.o abstract1.o algos.o \ + random_numbers.o geneticOps.o selectOne.o continuators.o\ + reduce.o replacement.o selectors.o breeders.o\ + mergers.o valueParam.o perf2worth.o monitors.o\ + statistics.o + +LIB=../libeo.a ../utils/libeoutils.a + +all: PyEO/PyEO.so + +clean: + rm PyEO/*.so *.o test/*.pyc + +PyEO/PyEO.so: $(OBJECTS) + $(LINK) -o PyEO/PyEO.so $(OBJECTS) -lboost_python -lpython2.6 ${LIB} -shared #-lstlport + +eoFunctorStore.o: ../eoFunctorStore.h ../eoFunctorStore.cpp + $(COMPILE) -o eoFunctorStore.o ../eoFunctorStore.cpp $(INC) + +%.o:%.cpp PyEO.h def_abstract_functor.h + $(COMPILE) $< $(INC) diff --git a/trunk/eo/src/pyeo/Makefile.rpm b/trunk/eo/src/pyeo/Makefile.rpm new file mode 100644 index 000000000..4db4bccac --- /dev/null +++ b/trunk/eo/src/pyeo/Makefile.rpm @@ -0,0 +1,29 @@ +# Makefile for people that build boost using the rpm-recipe + +CXX = g++ #-3.2 +CXXFLAGS = #-g #-DNDEBUG +CPPFLAGS = -Wall -O2 +LDFLAGS = -L/usr/lib/python2.2/config/ +COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c +LINK = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) +INC=-I/usr/include/python2.2 -I/usr/include/stlport -I.. -ftemplate-depth-50 + +OBJECTS=eoFunctorStore.o PyEO.o abstract1.o algos.o \ + random_numbers.o geneticOps.o selectOne.o continuators.o\ + reduce.o replacement.o selectors.o breeders.o\ + mergers.o valueParam.o perf2worth.o monitors.o\ + statistics.o + +all: PyEO.so + +clean: + rm *.so *.o test/*.pyc + +PyEO.so: $(OBJECTS) + $(LINK) -o PyEO.so $(OBJECTS) -lboost_python -lpython2.2 -shared #-lstlport + +eoFunctorStore.o: ../eoFunctorStore.h ../eoFunctorStore.cpp + $(COMPILE) -o eoFunctorStore.o ../eoFunctorStore.cpp $(INC) + +%.o:%.cpp PyEO.h def_abstract_functor.h + $(COMPILE) $< $(INC) diff --git a/trunk/eo/src/pyeo/NEWS b/trunk/eo/src/pyeo/NEWS new file mode 100644 index 000000000..e69de29bb diff --git a/trunk/eo/src/pyeo/PyEO.cpp b/trunk/eo/src/pyeo/PyEO.cpp new file mode 100644 index 000000000..7c3f1b93f --- /dev/null +++ b/trunk/eo/src/pyeo/PyEO.cpp @@ -0,0 +1,231 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include + +#include "PyEO.h" +#include + +using namespace std; +//using namespace boost::python; + +// static member, needs to be instantiated somewhere +std::vector PyFitness::objective_info; + +bool PyFitness::dominates(const PyFitness& oth) const +{ + bool dom = false; + + for (unsigned i = 0; i < nObjectives(); ++i) + { + int objective = objective_info[i]; + + if (objective == 0) // ignore + continue; + + bool maxim = objective > 0; + + double aval = maxim? (*this)[i] : -(*this)[i]; + double bval = maxim? oth[i] : -oth[i]; + + if (fabs(aval - bval) > tol()) + { + if (aval < bval) + { + return false; // cannot dominate + } + // else aval < bval + dom = true; // for the moment: goto next objective + } + //else they're equal in this objective, goto next + } + + return dom; +} + +bool dominates(const PyEO& a, const PyEO& b) +{ + return PyFitness(a.fitness()).dominates(b.fitness()); +} + +ostream& operator<<(ostream& os, const PyEO& _eo) +{ + os << _eo.to_string(); + return os; +} + +struct pyPop_pickle_suite : boost::python::pickle_suite +{ + static boost::python::tuple getstate(const eoPop& _pop) + { + boost::python::list entries; + for (unsigned i = 0; i != _pop.size(); ++i) + entries.append( PyEO_pickle_suite::getstate(_pop[i]) ); + + return boost::python::make_tuple(boost::python::object(_pop.size()), entries); + } + + static void setstate( eoPop& _pop, boost::python::tuple pickled) + { + int sz = boost::python::extract(pickled[0]); + boost::python::list entries = boost::python::list(pickled[1]); + _pop.resize(sz); + for (unsigned i = 0; i != _pop.size(); ++i) + { + PyEO_pickle_suite::setstate(_pop[i], boost::python::tuple(entries[i]) ); + } + } +}; + + +template +boost::python::str to_string(T& _p) +{ + std::ostringstream os; + _p.printOn(os); + return boost::python::str(os.str().c_str()); +} + +void pop_sort(eoPop& pop) { pop.sort(); } +void pop_shuffle(eoPop& pop) { pop.shuffle(); } + +void translate_index_error(index_error const& e) +{ + PyErr_SetString(PyExc_IndexError, e.what.c_str()); +} + +PyEO& pop_getitem(eoPop& pop, boost::python::object key) +{ + boost::python::extract x(key); + if (!x.check()) + throw index_error("Slicing not allowed"); + + int i = x(); + + if (static_cast(i) >= pop.size()) + { + throw index_error("Index out of bounds"); + } + return pop[i]; +} + +void pop_setitem(eoPop& pop, boost::python::object key, PyEO& value) +{ + boost::python::extract x(key); + if (!x.check()) + throw index_error("Slicing not allowed"); + + int i = x(); + + if (static_cast(i) >= pop.size()) + { + throw index_error("Index out of bounds"); + } + + pop[i] = value; +} + +void pop_push_back(eoPop& pop, PyEO& p) { pop.push_back(p); } +void pop_resize( eoPop& pop, unsigned i) { pop.resize(i); } +int pop_size( eoPop& pop) { return pop.size(); } + +extern void abstract1(); +extern void algos(); +extern void random_numbers(); +extern void geneticOps(); +extern void selectOne(); +extern void continuators(); +extern void reduce(); +extern void replacement(); +extern void selectors(); +extern void breeders(); +extern void mergers(); +extern void valueParam(); +extern void perf2worth(); +extern void monitors(); +extern void statistics(); + +BOOST_PYTHON_MODULE(libPyEO) +{ + using namespace boost::python; + + boost::python::register_exception_translator(&translate_index_error); + + boost::python::class_("EO") + .add_property("fitness", &PyEO::getFitness, &PyEO::setFitness) + .add_property("genome", &PyEO::getGenome, &PyEO::setGenome) + .def_pickle(PyEO_pickle_suite()) + .def("invalidate", &PyEO::invalidate) + .def("invalid", &PyEO::invalid) + .def("__str__", &PyEO::to_string) + ; + + boost::python::class_ >("eoPop", init<>() ) + .def( init< unsigned, eoInit& >()[with_custodian_and_ward<1,3>()] ) + .def("append", &eoPop::append, "docstring?") + .def("__str__", to_string >) + .def("__len__", pop_size) + .def("sort", pop_sort ) + .def("shuffle", pop_shuffle) + .def("__getitem__", pop_getitem, return_internal_reference<>() ) + .def("__setitem__", pop_setitem) + .def("best", &eoPop::best_element, return_internal_reference<>() ) + .def("push_back", pop_push_back) + .def("resize", pop_resize) + .def_pickle(pyPop_pickle_suite()) + ; + + + // Other definitions in different compilation units, + // this to avoid having g++ to choke on the load + random_numbers(); + valueParam(); + abstract1(); + geneticOps(); + selectOne(); + selectors(); + perf2worth(); + monitors(); + statistics(); + continuators(); + reduce(); + replacement(); + breeders(); + mergers(); + algos(); + + // The traits class + class_("PyFitness"); + + def("nObjectives", &PyFitness::nObjectives); + def("tol", &PyFitness::tol); + def("maximizing", &PyFitness::maximizing); + def("setObjectivesSize", &PyFitness::setObjectivesSize); + def("setObjectivesValue", &PyFitness::setObjectivesValue); + def("dominates", dominates); +} + + +// to avoid having to build with libeo.a +ostream & operator << ( ostream& _os, const eoPrintable& _o ) +{ + _o.printOn(_os); + return _os; +}; diff --git a/trunk/eo/src/pyeo/PyEO.h b/trunk/eo/src/pyeo/PyEO.h new file mode 100644 index 000000000..188b7f8da --- /dev/null +++ b/trunk/eo/src/pyeo/PyEO.h @@ -0,0 +1,156 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef PYEO_H +#define PYEO_H + +#include +#include +#include +#include + +#include + +struct index_error : public std::exception +{ + index_error(std::string w) : what(w) {}; + virtual ~index_error() throw() {} + std::string what; +}; + +class PyFitness : public boost::python::object +{ +public : + + typedef PyFitness fitness_traits; // it's its own traits class :-) + + PyFitness() : boost::python::object() {} + + template + PyFitness(const T& o) : boost::python::object(o) {} + + static unsigned nObjectives() { return objective_info.size(); } + static double tol() { return 1e-6; } + static bool maximizing(int which) { return objective_info[which] > 0; } + + static void setObjectivesSize(int sz) { objective_info.resize(sz, 0); } + static void setObjectivesValue(unsigned which, int value) + { + if (which >= objective_info.size()) + { + throw index_error("Too few elements allocated, resize objectives first"); + } + + objective_info[which] = value; + } + + static std::vector objective_info; + + bool dominates(const PyFitness& oth) const; + + double operator[](int i) const + { + boost::python::extract x(object::operator[](i)); + + if (!x.check()) + throw std::runtime_error("PyFitness: does not contain doubles"); + return x(); + } + + bool operator<(const PyFitness& other) const + { + if (objective_info.size() == 0) + { + const object& self = *this; + const object& oth = other; + return self < oth; + } + // otherwise use objective_info + + for (unsigned i = 0; i < objective_info.size(); ++i) + { + double a = objective_info[i] * operator[](i); + double b = objective_info[i] * other[i]; + + if ( fabs(a - b) > tol()) + { + if (a < b) + return true; + return false; + } + } + + return false; + } + + bool operator>(const PyFitness& other) const + { + return other.operator<(*this); + } + + void printOn(std::ostream& os) const { const boost::python::object& o = *this; boost::python::api::operator<<(os,o); } + friend std::ostream& operator<<(std::ostream& os, const PyFitness& p) { p.printOn(os); return os; } + friend std::istream& operator>>(std::istream& is, PyFitness& p) { boost::python::object o; is >> o; p = o; return is; } +}; + +struct PyEO : public EO< PyFitness > +{ + typedef PyFitness Fitness; + + boost::python::object getFitness() const { return invalid()? Fitness(): fitness(); } + void setFitness(boost::python::object f) { if (f == Fitness()) invalidate(); else fitness(f); } + + boost::python::object getGenome() const { return genome; } + void setGenome(boost::python::object g) { genome = g; } + boost::python::object genome; + + std::string to_string() const + { + std::string result; + result += boost::python::extract(boost::python::str(getFitness())); + result += ' '; + result += boost::python::extract(boost::python::str(genome)); + return result; + } + + bool operator<(const PyEO& other) const { return EO::operator<(other); } + bool operator>(const PyEO& other) const { return EO::operator>(other); } + +}; + +std::ostream& operator<<(std::ostream& os, const PyEO& _eo); + +struct PyEO_pickle_suite : boost::python::pickle_suite +{ + typedef PyEO::Fitness Fitness; + + static boost::python::tuple getstate(const PyEO& _eo) + { + return boost::python::make_tuple(_eo.getFitness(), _eo.genome); + } + + static void setstate(PyEO& _eo, boost::python::tuple pickled) + { + _eo.setFitness( Fitness(pickled[0]) ); + _eo.genome = pickled[1]; + } +}; + +#endif diff --git a/trunk/eo/src/pyeo/PyEO/__init__.py b/trunk/eo/src/pyeo/PyEO/__init__.py new file mode 100644 index 000000000..2818319b6 --- /dev/null +++ b/trunk/eo/src/pyeo/PyEO/__init__.py @@ -0,0 +1,83 @@ +from PyEO import * + +try: + import Gnuplot +except ImportError: + print "Python support for Gnuplot not found" +else: + + class eoGnuplot1DMonitor(eoMonitor): + def __init__(self): + eoMonitor.__init__(self) + self.values = [] + self.indices = [] + self.g = Gnuplot.Gnuplot() + self.g.reset(); + + def handleParam(self, i, param): + param = float(param) + + while len(self.values) <= i: + self.values.append( [] ) + + self.values[i].append(param) + + def __call__(self): + l = len(self) + + if l > 3 or l == 0: + print 'Can only handle 1 to 3 params currently' + + i = 0 + for param in self: + self.handleParam(i,param) + i += 1 + + self.indices.append( len(self.indices) ) + + + data1 = Gnuplot.Data(self.indices, self.values[0], with = 'lines') + + if l == 1: + self.g.plot(data1) + else: + data2 = Gnuplot.Data(self.indices, self.values[1], with = 'lines') + + if l == 2: + self.g.plot(data1, data2) + else: + data3 = Gnuplot.Data(self.indices, self.values[2], with = 'lines') + + self.g.plot(data1, data2, data3) + +def SeperatedVolumeMonitor(eoMonitor): + def __init__(self, file): + eoMonitor.__init__(self) + self.file = file + self.initialized = None; + + def __call__(self): + pass + +class eoStat(eoStatBase, eoValueParam): + def __init__(self): + eoStatBase.__init__(self) + eoValueParam.__init__(self) + +class eoSortedStat(eoSortedStatBase, eoValueParam): + def __init__(self): + eoSortedStatBase.__init__(self) + eoValueParam.__init__(self) + +class eoAverageStat(eoStat): + def __call__(self, pop): + sum = 0.0; + for indy in pop: + sum += indy.fitness + + sum /= len(pop) + self.object = sum + +class eoBestFitnessStat(eoSortedStat): + def __call__(self, pop): + self.object = pop[0].fitness diff --git a/trunk/eo/src/pyeo/README b/trunk/eo/src/pyeo/README new file mode 100644 index 000000000..072fe3ad2 --- /dev/null +++ b/trunk/eo/src/pyeo/README @@ -0,0 +1,4 @@ + +See BUILDING for details on how to build this thing + + diff --git a/trunk/eo/src/pyeo/abstract1.cpp b/trunk/eo/src/pyeo/abstract1.cpp new file mode 100644 index 000000000..43c0dadb9 --- /dev/null +++ b/trunk/eo/src/pyeo/abstract1.cpp @@ -0,0 +1,52 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include + +#include "PyEO.h" +#include "def_abstract_functor.h" + +using namespace boost::python; + +void abstract1() +{ + /* Abstract Classes: overrideble from python */ + def_abstract_functor >("eoEvalFunc"); + def_abstract_functor >("eoInit"); + + def_abstract_functor >("eoTransform"); + + class_, bases > > + ("eoSGATransform", + init< + eoQuadOp&, + double, + eoMonOp&, + double + >() + ) + .def("__call__", &eoSGATransform::operator()); + + def_abstract_functor >("eoPopEvalFunc"); +} diff --git a/trunk/eo/src/pyeo/algos.cpp b/trunk/eo/src/pyeo/algos.cpp new file mode 100644 index 000000000..caa2fcd33 --- /dev/null +++ b/trunk/eo/src/pyeo/algos.cpp @@ -0,0 +1,126 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include + +#include "PyEO.h" +#include "def_abstract_functor.h" + +using namespace boost::python; + +void algos() +{ + def_abstract_functor >("eoAlgo"); + + /* Algorithms */ + class_, bases >, boost::noncopyable> + ("eoSGA", + init< + eoSelectOne&, + eoQuadOp&, + float, + eoMonOp&, + float, + eoEvalFunc&, + eoContinue& + >() + [ + with_custodian_and_ward<1,2, + with_custodian_and_ward<1,3, + with_custodian_and_ward<1,5, + with_custodian_and_ward<1,7, + with_custodian_and_ward<1,8> + > + > + > + >() + ] + ) + .def("__call__", &eoSGA::operator()) + ; + + class_, bases > > + ("eoEasyEA", + init< + eoContinue&, + eoEvalFunc&, + eoBreed&, + eoReplacement& + >() + ) + .def( init< + eoContinue&, + eoEvalFunc&, + eoBreed&, + eoReplacement&, + unsigned + >() ) + .def( init< + eoContinue&, + eoPopEvalFunc&, + eoBreed&, + eoReplacement& + >() ) + .def( init< + eoContinue&, + eoEvalFunc&, + eoBreed&, + eoMerge&, + eoReduce& + >() ) + .def( init< + eoContinue&, + eoEvalFunc&, + eoSelect&, + eoTransform&, + eoReplacement& + >() ) + .def( init< + eoContinue&, + eoEvalFunc&, + eoSelect&, + eoTransform&, + eoMerge&, + eoReduce& + >() ) + .def("__call__", &eoEasyEA::operator()) + ; + + /* + class_, bases< eoAlgo > >("eoCellularEasyEA", + init< eoContinue&, + eoEvalFunc&, + eoSelectOne&, + eoBinOp&, + eoMonOp&, + eoSelectOne&>()) + .def( + init< eoContinue&, + eoEvalFunc&, + eoSelectOne&, + eoQuadOp&, + eoMonOp&, + eoSelectOne&>()) + ; + */ +} diff --git a/trunk/eo/src/pyeo/breeders.cpp b/trunk/eo/src/pyeo/breeders.cpp new file mode 100644 index 000000000..c66b6bccd --- /dev/null +++ b/trunk/eo/src/pyeo/breeders.cpp @@ -0,0 +1,59 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include + +#include "PyEO.h" +#include "def_abstract_functor.h" + +using namespace boost::python; + +#define DEF3(x, i1, i2) \ + class_, bases > > \ + (#x, \ + init() \ + [ \ + with_custodian_and_ward<1,2, \ + with_custodian_and_ward<1,3 \ + > \ + > \ + () \ + ] \ + ) \ + .def("__call__", &eoBreed::operator()) + +void breeders() +{ + def_abstract_functor >("eoBreed"); + + DEF3(eoSelectTransform, eoSelect&, eoTransform&); + + DEF3(eoGeneralBreeder, eoSelectOne&, eoGenOp&) + .def( init&, eoGenOp&, double>()[WC2]) + .def( init&, eoGenOp&, double, bool>()[WC2] ) + .def( init&, eoGenOp&, eoHowMany>() ); + + + DEF3(eoOneToOneBreeder, eoGenOp&, eoEvalFunc&) + .def( init&, eoEvalFunc&, double>()[WC2] ) + .def( init&, eoEvalFunc&, double, eoHowMany>()[WC2] ); +} diff --git a/trunk/eo/src/pyeo/continuators.cpp b/trunk/eo/src/pyeo/continuators.cpp new file mode 100644 index 000000000..d31613d2c --- /dev/null +++ b/trunk/eo/src/pyeo/continuators.cpp @@ -0,0 +1,96 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include "PyEO.h" +#include "def_abstract_functor.h" + +using namespace boost::python; + +#define DEF(x) class_, bases > >(#x).def("__call__", &eoContinue::operator()) +#define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoContinue::operator()) +#define DEF3(x, i1, i2) class_, bases > >(#x, init() ).def("__call__", &eoContinue::operator()) + +void add_checkpoint(); + +void continuators() +{ + /* Counters, wrappers etc */ + + class_, bases > > + ("eoEvalFuncCounter", + init< eoEvalFunc&, std::string>() + ) + .def("__call__", &eoEvalFuncCounter::operator()) + ; + /* Continuators */ + def_abstract_functor >("eoContinue"); + + class_, bases >, boost::noncopyable > + ("eoGenContinue", init() ) + .def("__call__", &eoGenContinue::operator()) + ; + + class_, bases > > + ("eoCombinedContinue", init&>()[WC1]) + .def( init&, eoContinue& >()[WC2] ) + .def("add", &eoCombinedContinue::add, WC1) + .def("__call__", &eoCombinedContinue::operator()) + ; + + class_, bases > > + ("eoEvalContinue", + init&, unsigned long>()[WC1] + ) + .def("__call__", &eoEvalContinue::operator()) + ; + + DEF2(eoFitContinue, object); // object is the fitness type + + DEF3(eoSteadyFitContinue, unsigned long, unsigned long); + + add_checkpoint(); +} + +void addContinue(eoCheckPoint& c, eoContinue& cc) { c.add(cc); } +void addMonitor(eoCheckPoint& c, eoMonitor& m) { c.add(m);} +void addStat(eoCheckPoint& c, eoStatBase& s) { c.add(s);} +void addSortedStat(eoCheckPoint& c, eoSortedStatBase& s) { c.add(s);} + +void add_checkpoint() +{ + class_, bases< eoContinue > > + ("eoCheckPoint", + init&> ()[with_custodian_and_ward<1,2>()] + ) + .def("add", addContinue, with_custodian_and_ward<1,2>() ) + .def("add", addMonitor, with_custodian_and_ward<1,2>() ) + .def("add", addStat, with_custodian_and_ward<1,2>()) + .def("add", addSortedStat, with_custodian_and_ward<1,2>()) + .def("__call__", &eoCheckPoint::operator()) + ; +} diff --git a/trunk/eo/src/pyeo/def_abstract_functor.h b/trunk/eo/src/pyeo/def_abstract_functor.h new file mode 100644 index 000000000..4c3101dfd --- /dev/null +++ b/trunk/eo/src/pyeo/def_abstract_functor.h @@ -0,0 +1,139 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef MAKE_ABSTRACT_FUNCTOR_H +#define MAKE_ABSTRACT_FUNCTOR_H + +#include + +// DEFINES for call +#define WC1 boost::python::with_custodian_and_ward<1,2>() +#define WC2 boost::python::with_custodian_and_ward<1,2, with_custodian_and_ward<1,3> >() + +namespace eoutils { + + using namespace boost::python; + + template + class ProcWrapper : public Proc + { + public: + PyObject* self; + ProcWrapper(PyObject* s) : self(s) {} + + typename Proc::result_type operator()(void) + { + return boost::python::call_method(self, "__call__"); + } + }; + + template + void make_abstract_functor(std::string name, typename eoFunctorBase::procedure_tag) + { + typedef ProcWrapper Wrapper; + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator()); + } + + template + void make_abstract_functor_ref(std::string name, typename eoFunctorBase::procedure_tag) + { + typedef ProcWrapper Wrapper; + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator(), boost::python::return_internal_reference<>()); + } + + template + class UnaryWrapper : public Unary + { + public: + PyObject* self; + UnaryWrapper(PyObject* s) : self(s) {} + + typename Unary::result_type operator()(typename Unary::argument_type a) + { + return boost::python::call_method(self, "__call__", boost::ref(a) ); + } + }; + + template + void make_abstract_functor(std::string name, typename eoFunctorBase::unary_function_tag) + { + typedef UnaryWrapper Wrapper; + + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator()) + ; + } + + template + void make_abstract_functor_ref(std::string name, typename eoFunctorBase::unary_function_tag) + { + typedef UnaryWrapper Wrapper; + + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator(), boost::python::return_internal_reference<>() ) + ; + } + + template + class BinaryWrapper : public Binary + { + public: + PyObject* self; + BinaryWrapper(PyObject* s) : self(s) {} + typename Binary::result_type operator()(typename Binary::first_argument_type a1, typename Binary::second_argument_type a2) + { + return boost::python::call_method< + typename Binary::result_type>(self, "__call__", boost::ref(a1), boost::ref(a2) ); + } + }; + + template + void make_abstract_functor(std::string name, typename eoFunctorBase::binary_function_tag) + { + typedef BinaryWrapper Wrapper; + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator()); + } + + template + void make_abstract_functor_ref(std::string name, typename eoFunctorBase::binary_function_tag) + { + typedef BinaryWrapper Wrapper; + boost::python::class_(name.c_str(), boost::python::init<>() ) + .def("__call__", &Wrapper::operator(), boost::python::return_internal_reference<>() ); + } + +}// namespace eoutils + +template +void def_abstract_functor(std::string name) +{ + eoutils::make_abstract_functor(name, Functor::functor_category()); +} + +template +void def_abstract_functor_ref(std::string name) +{ + eoutils::make_abstract_functor_ref(name, Functor::functor_category()); +} + +#endif diff --git a/trunk/eo/src/pyeo/geneticOps.cpp b/trunk/eo/src/pyeo/geneticOps.cpp new file mode 100644 index 000000000..40617680e --- /dev/null +++ b/trunk/eo/src/pyeo/geneticOps.cpp @@ -0,0 +1,158 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include + +#include "PyEO.h" +#include "def_abstract_functor.h" + +using namespace boost::python; + +class GenOpWrapper : public eoGenOp +{ +public: + + PyObject* self; + GenOpWrapper(PyObject* p) : self(p) {} + unsigned max_production(void) + { + return call_method(self,"max_production"); + } + std::string className() const + { + return "GenOpDerivative"; // never saw the use of className anyway + } + + void apply(eoPopulator& populator ) + { + boost::python::call_method(self,"apply", boost::ref( populator ) ); + } +}; + +class PopulatorWrapper : public eoPopulator +{ +public: + PyObject* self; + PopulatorWrapper(PyObject* p, const eoPop& src, eoPop& dest) + : eoPopulator(src, dest), self(p) + { + //throw std::runtime_error("abstract base class"); + } + + const PyEO& select() + { + return call_method(self,"select"); + } +}; + +class MonOpWrapper : public eoMonOp +{ +public: + PyObject* self; + MonOpWrapper(PyObject* p) : self(p) {} + bool operator()(PyEO& _eo) + { return boost::python::call_method(self, "__call__", boost::ref( _eo )); } +}; +class BinOpWrapper : public eoBinOp +{ +public: + PyObject* self; + BinOpWrapper(PyObject* p) : self(p) {} + bool operator()(PyEO& _eo, const PyEO& _eo2) + { return boost::python::call_method(self, "__call__", boost::ref( _eo ), boost::ref(_eo2)); } +}; +class QuadOpWrapper : public eoQuadOp +{ +public: + PyObject* self; + QuadOpWrapper(PyObject* p) : self(p) {} + bool operator()(PyEO& _eo, PyEO& _eo2) + { return boost::python::call_method(self, "__call__", boost::ref( _eo ), boost::ref(_eo2)); } +}; + +void geneticOps() +{ + class_, PopulatorWrapper, boost::noncopyable> + ("eoPopulator", init&, eoPop&>() ) + .def("select", &PopulatorWrapper::select, return_internal_reference<>() ) + .def("get", &eoPopulator::operator*, return_internal_reference<>() ) + .def("next", &eoPopulator::operator++, return_internal_reference<>() ) + .def("insert", &eoPopulator::insert) + .def("reserve", &eoPopulator::reserve) + .def("source", &eoPopulator::source, return_internal_reference<>() ) + .def("offspring", &eoPopulator::offspring, return_internal_reference<>() ) + .def("tellp", &eoPopulator::tellp) + .def("seekp", &eoPopulator::seekp) + .def("exhausted", &eoPopulator::exhausted) + ; + + class_, bases > > + ("eoSeqPopulator", init&, eoPop&>() ) + .def("select", &eoSeqPopulator::select, return_internal_reference<>() ) + ; + + class_, bases > > + ("eoSelectivePopulator", init&, eoPop&, eoSelectOne& >() ) + .def("select", &eoSeqPopulator::select, return_internal_reference<>() ) + ; + enum_::OpType>("OpType") + .value("unary", eoOp::unary) + .value("binary", eoOp::binary) + .value("quadratic", eoOp::quadratic) + .value("general", eoOp::general) + ; + + class_ >("eoOp", init::OpType>()) + .def("getType", &eoOp::getType); + + class_, MonOpWrapper, bases >, boost::noncopyable>("eoMonOp", init<>()) + .def("__call__", &MonOpWrapper::operator(), "an example docstring"); + class_, BinOpWrapper, bases >, boost::noncopyable>("eoBinOp", init<>()) + .def("__call__", &BinOpWrapper::operator()); + class_, QuadOpWrapper, bases >, boost::noncopyable>("eoQuadOp", init<>()) + .def("__call__", &QuadOpWrapper::operator()); + + class_, GenOpWrapper, bases >, boost::noncopyable>("eoGenOp", init<>()) + .def("max_production", &GenOpWrapper::max_production) + .def("className", &GenOpWrapper::className) + .def("apply", &GenOpWrapper::apply) + .def("__call__", &eoGenOp::operator()) + ; + + class_, bases >, boost::noncopyable>("eoSequentialOp", init<>()) + .def("add", &eoSequentialOp::add, WC1) + .def("apply", &eoSequentialOp::apply) + ; + + class_, bases >, boost::noncopyable>("eoProportionalOp", init<>()) + .def("add", &eoProportionalOp::add, WC1) + .def("apply", &eoProportionalOp::apply) + ; + + /* Cloning */ + class_, bases > >("eoMonCloneOp").def("__call__", &eoMonCloneOp::operator()); + class_, bases > >("eoBinCloneOp").def("__call__", &eoBinCloneOp::operator()); + class_, bases > >("eoQuadCloneOp").def("__call__", &eoQuadCloneOp::operator()); + +} diff --git a/trunk/eo/src/pyeo/mergers.cpp b/trunk/eo/src/pyeo/mergers.cpp new file mode 100644 index 000000000..f41af0490 --- /dev/null +++ b/trunk/eo/src/pyeo/mergers.cpp @@ -0,0 +1,40 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include "PyEO.h" +#include "def_abstract_functor.h" + +using namespace boost::python; + +#define DEF(x) class_, bases > >(#x).def("__call__", &eoMerge::operator()) +#define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoMerge::operator()) +#define DEF3(x, i1, i2) class_, bases > >(#x, init() ).def("__call__", &eoMerge::operator()) + +void mergers() +{ + def_abstract_functor >("eoMerge"); + + DEF2(eoElitism, double) + .def( init() ); + DEF(eoNoElitism); + DEF(eoPlus); + +} diff --git a/trunk/eo/src/pyeo/monitors.cpp b/trunk/eo/src/pyeo/monitors.cpp new file mode 100644 index 000000000..02d011d89 --- /dev/null +++ b/trunk/eo/src/pyeo/monitors.cpp @@ -0,0 +1,71 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include "PyEO.h" + +using namespace boost::python; + +class MonitorWrapper : public eoMonitor +{ +public: + PyObject* self; + list objects; + + MonitorWrapper(PyObject* p) :self(p) {} + + eoMonitor& operator()() + { + call_method(self, "__call__"); + return *this; + } + + std::string getString(int i) + { + if (static_cast(i) >= vec.size()) + { + throw index_error("Index out of bounds"); + } + + return vec[i]->getValue(); + } + + unsigned size() { return vec.size(); } +}; + +void monitors() +{ + /** + * Change of interface: I encountered some difficulties with + * transferring eoParams from and to Python, so now we can + * only get at the strings contained in the eoParams. + * sorry + */ + + class_("eoMonitor", init<>()) + .def("lastCall", &eoMonitor::lastCall) + .def("add", &eoMonitor::add) + .def("__call__", &MonitorWrapper::operator(), return_internal_reference<1>() ) + .def("__getitem__", &MonitorWrapper::getString, + "Returns the string value of the indexed Parameter") + .def("__len__", &MonitorWrapper::size) + ; +} diff --git a/trunk/eo/src/pyeo/perf2worth.cpp b/trunk/eo/src/pyeo/perf2worth.cpp new file mode 100644 index 000000000..a257b0cd9 --- /dev/null +++ b/trunk/eo/src/pyeo/perf2worth.cpp @@ -0,0 +1,89 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include + +#include "PyEO.h" + +using namespace boost::python; + +struct Perf2WorthWrapper : public eoPerf2Worth +{ + PyObject* self; + Perf2WorthWrapper(PyObject* p) : self(p) {} + + void operator()( const eoPop& pop) + { + call_method(self, "__call__", boost::ref(pop)); + } +}; + +numeric::array get_worths(eoPerf2Worth& p) +{ + std::vector& worths = p.value(); + list result; + + for (unsigned i = 0; i < worths.size(); ++i) + result.append(worths[i]); + + return numeric::array(result); +} + +struct CachedPerf2WorthWrapper : public eoPerf2WorthCached +{ + PyObject* self; + CachedPerf2WorthWrapper(PyObject* p) : self(p) {} + + void calculate_worths(const eoPop& pop) + { + call_method(self, "calculate_worths", boost::ref(pop)); + } +}; + +void perf2worth() +{ + //numeric::array::set_module_and_type("Numeric", "ArrayType"); + + class_, + Perf2WorthWrapper, + bases< eoValueParam > >, + boost::noncopyable>("eoPerf2Worth", init<>()) + + .def("__call__", &Perf2WorthWrapper::operator()) + .def("sort_pop", &eoPerf2Worth::sort_pop) + //.def("value", get_worths) + ; + + class_, + CachedPerf2WorthWrapper, + bases >, + boost::noncopyable>("eoPerf2WorthCached", init<>()) + + .def("__call__", &eoPerf2WorthCached::operator()) + .def("calculate_worths", &CachedPerf2WorthWrapper::calculate_worths) + ; + + //class_, bases > >("eoNoPerf2Worth") + // .def("__call__", &eoNoPerf2Worth::operator()); + + class_, + bases > >("eoNDSorting_II") + .def("calculate_worths", &eoNDSorting_II::calculate_worths); +} diff --git a/trunk/eo/src/pyeo/pickle.h b/trunk/eo/src/pyeo/pickle.h new file mode 100644 index 000000000..0e30654a9 --- /dev/null +++ b/trunk/eo/src/pyeo/pickle.h @@ -0,0 +1,70 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef PICKLE_H +#define PICKLE_h + +// #ifndef WIN32 +// #include +// #endif + +#include +#include +/** Implements pickle support for eoPersistent derivatives */ + +template +struct T_pickle_suite : boost::python::pickle_suite +{ + static + std::string print_to_string(const T& t) + { + std::ostringstream os; + t.printOn(os); + os << std::ends; + return os.str(); + } + + static + boost::python::tuple getstate(const T& t) + { + std::string s = print_to_string(t); + return boost::python::make_tuple( boost::python::str(s)); + } + + static + void setstate(T& t, boost::python::tuple pickled) + { + std::string s = boost::python::extract(pickled[0]); + std::istringstream is(s); + t.readFrom(is); + } +}; + +/** Defines persistency through pickle support by using std::strings + * so while we're at it, we will .def("__str__") as well + */ +template +boost::python::class_& pickle(boost::python::class_& c) +{ + return c.def_pickle(T_pickle_suite()) + .def("__str__", T_pickle_suite::print_to_string); +} + +#endif diff --git a/trunk/eo/src/pyeo/random_numbers.cpp b/trunk/eo/src/pyeo/random_numbers.cpp new file mode 100644 index 000000000..c9047385d --- /dev/null +++ b/trunk/eo/src/pyeo/random_numbers.cpp @@ -0,0 +1,112 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include + +using namespace boost::python; + +#include +#include + +using namespace boost::python; + +// initialize static constants +const uint32_t eoRng::K(0x9908B0DFU); +const int eoRng::M(397); +const int eoRng::N(624); + +namespace eo +{ + eoRng rng(time(0)); +} + +eoRng& get_rng() { return rng; } +double normal(eoRng& rng) { return rng.normal(); } + +std::string rng_to_string(const eoRng& _rng) +{ + std::ostringstream os; + _rng.printOn(os); + os << std::ends; + return os.str(); +} + + +void rng_from_string(eoRng& _rng, std::string s) +{ + std::istringstream is(s); + _rng.readFrom(is); +} + +struct RNG_pickle_suite : boost::python::pickle_suite +{ + static + boost::python::tuple getstate(const eoRng& _rng) + { + return boost::python::make_tuple(str(rng_to_string(_rng))); + } + static + void setstate(eoRng& _rng, boost::python::tuple pickled) + { + std::string state = extract(pickled[0]); + rng_from_string(_rng, state); + } +}; + +int spin(eoRng& _rng, numeric::array values, double total) +{ + if (total == 0.0) + { + unsigned sz = len(values); + for (unsigned i = 0; i < sz; ++i) + { + total += extract(values[i]); //extract? + } + } + + double chance = _rng.uniform() * total; + + int i = 0; + while (chance >= 0.0) + chance -= extract(values[i++]); + + return --i; +} + +void random_numbers() +{ + class_("eoRng", init()) + .def("flip", &eoRng::flip) + .def("random", &eoRng::random) + .def("rand", &eoRng::rand) + .def("rand_max", &eoRng::rand_max) + .def("reseed", &eoRng::reseed) + // .def("uniform", &eoRng::uniform) + .def("normal", normal) + .def("negexp", &eoRng::negexp) + .def("to_string", rng_to_string) + .def("from_string", rng_from_string) + .def("roulette_wheel", spin) + .def_pickle(RNG_pickle_suite()) + ; + + def("rng", get_rng, return_value_policy()); +} diff --git a/trunk/eo/src/pyeo/reduce.cpp b/trunk/eo/src/pyeo/reduce.cpp new file mode 100644 index 000000000..6c9b78c64 --- /dev/null +++ b/trunk/eo/src/pyeo/reduce.cpp @@ -0,0 +1,63 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include + +#include "PyEO.h" + +using namespace boost::python; + +// unfortunately have to define it specially +class eoReduceWrapper : public eoReduce +{ +public: + PyObject* self; + eoReduceWrapper(PyObject* s) : self(s) {} + void operator()(eoPop& pop, unsigned i) + { + boost::python::call_method(self, "__call__", pop, i ); + } +}; + +void reduce() +{ + // ref trick in def_abstract_functor does not work for unsigned int :-( + class_, eoReduceWrapper, boost::noncopyable>("eoReduce", init<>()) + .def("__call__", &eoReduceWrapper::operator()); + + class_, bases > >("eoTruncate", init<>() ) + .def("__call__", &eoReduce::operator()) + ; + class_, bases > >("eoRandomReduce") + .def("__call__", &eoReduce::operator()) + ; + class_, bases > >("eoEPReduce", init()) + .def("__call__", &eoReduce::operator()) + ; + class_, bases > >("eoLinearTruncate") + .def("__call__", &eoReduce::operator()) + ; + class_, bases > >("eoDetTournamentTruncate", init()) + .def("__call__", &eoReduce::operator()) + ; + class_, bases > >("eoStochTournamentTruncate", init()) + .def("__call__", &eoReduce::operator()) + ; +} diff --git a/trunk/eo/src/pyeo/replacement.cpp b/trunk/eo/src/pyeo/replacement.cpp new file mode 100644 index 000000000..eb1bc5d70 --- /dev/null +++ b/trunk/eo/src/pyeo/replacement.cpp @@ -0,0 +1,72 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include + +#include "PyEO.h" +#include "def_abstract_functor.h" + +using namespace boost::python; + +#define DEF(x) class_, bases > >(#x).def("__call__", &eoReplacement::operator()) +#define DEF2(x, i1) class_, bases > >(#x, init() ).def("__call__", &eoReplacement::operator()) +#define DEF3(x, i1, i2) class_, bases > > \ + (#x, \ + init() [WC2]) \ + .def("__call__", &eoReplacement::operator()) + +void replacement() +{ + def_abstract_functor >("eoReplacement"); + + // eoReplacement.h + DEF(eoGenerationalReplacement); + + class_, bases > > + ("eoWeakElitistReplacement", + init< eoReplacement& >()[WC1]); + + // eoMergeReduce.h + DEF3(eoMergeReduce, eoMerge&, eoReduce& ); + DEF(eoPlusReplacement); + DEF(eoCommaReplacement); + DEF2(eoEPReplacement, unsigned); + + // eoReduceMerge.h + DEF3(eoReduceMerge, eoReduce&, eoMerge& ); + DEF(eoSSGAWorseReplacement); + DEF2(eoSSGADetTournamentReplacement, unsigned); + DEF2(eoSSGAStochTournamentReplacement, double); + + // eoReduceMergeReduce.h + //class_, bases > >("eoReplacement", + // init&, + // eoHowMany, eoReduce&, eoReduce&>()) + // .def("__call__", &eoReplacement::operator()); + + //eoMGGReplacement + DEF(eoMGGReplacement) + .def( init() ) + .def( init() ); +} diff --git a/trunk/eo/src/pyeo/selectOne.cpp b/trunk/eo/src/pyeo/selectOne.cpp new file mode 100644 index 000000000..5a28fcff3 --- /dev/null +++ b/trunk/eo/src/pyeo/selectOne.cpp @@ -0,0 +1,108 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include +#include + +#include "PyEO.h" +#include "pickle.h" +#include "def_abstract_functor.h" + +using namespace boost::python; + +class eoSelectOneWrapper : public eoSelectOne +{ +public: + PyObject* self; + eoSelectOneWrapper(PyObject* p) : self(p) {} + const PyEO& operator()(const eoPop& pop) + { + return boost::python::call_method< const PyEO& >(self, "__call__", boost::ref(pop)); + } +}; + +template +void add_select(std::string name) +{ + class_ > >(name.c_str(), init<>() ) + .def("__call__", &Select::operator(), return_internal_reference<>() ) + ; +} + +template +void add_select(std::string name, Init init) +{ + class_ > >(name.c_str(), init) + .def("__call__", &Select::operator(), return_internal_reference<>() ) + ; +} + +template +void add_select(std::string name, Init1 init1, Init2 init2) +{ + class_ > >(name.c_str(), init1) + .def( init2 ) + .def("__call__", &Select::operator(), return_internal_reference<>() ) + .def("setup", &Select::setup); +} + +void selectOne() +{ + /* Concrete classes */ + + pickle(class_("eoHowMany", init<>()) + .def( init() ) + .def( init() ) + .def( init() ) + .def("__call__", &eoHowMany::operator()) + .def("__neg__", &eoHowMany::operator-) + ); + + class_, eoSelectOneWrapper, boost::noncopyable>("eoSelectOne", init<>()) + .def("__call__", &eoSelectOneWrapper::operator(), return_internal_reference<>() ) + .def("setup", &eoSelectOne::setup); + + /* SelectOne derived classes */ + + add_select >("eoDetTournamentSelect", init<>(), init() ); + add_select >("eoStochTournamentSelect", init<>(), init() ); + add_select >("eoTruncatedSelectOne", + init&, double>()[WC1], + init&, eoHowMany >()[WC1] + ); + + // eoProportionalSelect is not feasible to implement at this point as fitness is not recognizable as a float + // use eoDetTournament instead: with a t-size of 2 it is equivalent to eoProportional with linear scaling + //add_select >("eoProportionalSelect", init&>() ); + + add_select >("eoRandomSelect"); + add_select >("eoBestSelect"); + add_select >("eoNoSelect"); + + add_select >("eoSequentialSelect", init<>(), init()); + add_select >("eoEliteSequentialSelect"); + /* + * eoSelectFromWorth.h:class eoSelectFromWorth : public eoSelectOne + */ +} diff --git a/trunk/eo/src/pyeo/selectors.cpp b/trunk/eo/src/pyeo/selectors.cpp new file mode 100644 index 000000000..7c8f4096a --- /dev/null +++ b/trunk/eo/src/pyeo/selectors.cpp @@ -0,0 +1,60 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include "PyEO.h" +#include "def_abstract_functor.h" + +using namespace boost::python; + +#define DEF(x) class_, bases > >(#x).def("__call__", &eoSelect::operator()) +#define DEF2(x, i1) class_, bases > >(#x, init()[WC1] ).def("__call__", &eoSelect::operator()) +#define DEF3(x, i1, i2) class_, bases > >(#x, init()[WC1] ).def("__call__", &eoSelect::operator()) + +void selectors() +{ + def_abstract_functor >("eoSelect"); + + DEF(eoDetSelect).def( init() ).def( init() ); + DEF3(eoSelectMany, eoSelectOne&, double) + .def( init< eoSelectOne&, double, bool>()[WC1] ) + .def( init< eoSelectOne&, eoHowMany>()[WC1] ); + + DEF2(eoSelectNumber, eoSelectOne&) + .def( init< eoSelectOne&, unsigned>()[WC1]); + + DEF2(eoSelectPerc, eoSelectOne&) + .def( init&, float>()[WC1] ); + + DEF3(eoTruncSelect, eoSelectOne&, eoHowMany); + + class_, bases > >("eoTruncatedSelectMany", + init&, double, double>()[WC1]) + .def(init&, double, double, bool> ()[WC1]) + .def(init&, double, double, bool, bool> ()[WC1]) + .def(init&, eoHowMany, eoHowMany> ()[WC1]); +} diff --git a/trunk/eo/src/pyeo/statistics.cpp b/trunk/eo/src/pyeo/statistics.cpp new file mode 100644 index 000000000..fbad92694 --- /dev/null +++ b/trunk/eo/src/pyeo/statistics.cpp @@ -0,0 +1,61 @@ +#include + +#include "PyEO.h" +#include "valueParam.h" + +using namespace boost::python; + +class StatBaseWrapper : public eoStatBase +{ +public: + PyObject* self; + StatBaseWrapper(PyObject* p) : self(p) {} + + void operator()(const eoPop& pop) + { + call_method(self, "__call__", boost::ref(pop)); + } +}; + +class SortedStatBaseWrapper : public eoSortedStatBase +{ +public: + PyObject* self; + SortedStatBaseWrapper(PyObject* p) : self(p) {} + + void operator()(const std::vector& pop) + { + call_method(self, "__call__", boost::ref(pop)); + } +}; + +typedef std::vector eoPopView; + +const PyEO& popview_getitem(const std::vector& pop, int it) +{ + unsigned item = unsigned(it); + if (item > pop.size()) + throw index_error("too much"); + + return *pop[item]; +} + +void statistics() +{ + class_, StatBaseWrapper, boost::noncopyable> + ("eoStatBase", init<>()) + .def("lastCall", &eoStatBase::lastCall) + .def("__call__", &StatBaseWrapper::operator()) + ; + + class_< eoPopView >("eoPopView") + .def("__getitem__", popview_getitem, return_internal_reference<>() ) + .def("__len__", &eoPopView::size) + ; + + class_, SortedStatBaseWrapper, boost::noncopyable> + ("eoSortedStatBase", init<>()) + .def("lastCall", &eoSortedStatBase::lastCall) + .def("__call__", &SortedStatBaseWrapper::operator()) + ; +} diff --git a/trunk/eo/src/pyeo/test/maxone.py b/trunk/eo/src/pyeo/test/maxone.py new file mode 100644 index 000000000..0c4bbd012 --- /dev/null +++ b/trunk/eo/src/pyeo/test/maxone.py @@ -0,0 +1,88 @@ +import sys +sys.path.append('..') + +print 'importing pyeo' +from libPyEO import * +print 'done' + +from copy import copy + +class MinimFit(float): + def __cmp__(self, other): + if other == None: # I seem to be getting None's, don't know why + return 1 + return float.__cmp__(other, self) + +class EvalFunc(eoEvalFunc): + def __call__(self, eo): + eo.fitness = reduce(lambda x,y: x+y, eo.genome, 0) + +class MinEvalFunc(eoEvalFunc): + def __call__(self, eo): + f = reduce(lambda x,y: x+y, eo.genome, 0 ) + eo.fitness = MinimFit(f) + +class Init(eoInit): + def __init__(self, genome_length = 10): + eoInit.__init__(self) + self.length = genome_length + def __call__(self, eo): + eo.genome = [rng().flip(0.5) for x in range(self.length)] + +class Mutate(eoMonOp): + def __call__(self, eo): + eo.genome = copy(eo.genome) + + prob = 1. / len(eo.genome) + for i in range(len(eo.genome)): + if rng().flip(0.5): + eo.genome[i] = 1-eo.genome[i]; + return 1 + +class Crossover(eoQuadOp): + def __call__(self, eo1, eo2): + eo1.genome = copy(eo1.genome); + eo2.genome = copy(eo2.genome); + + point = rng().random( len(eo1.genome) ); + + eo1.genome[:point] = eo2.genome[:point]; + eo2.genome[point:] = eo1.genome[point:]; + + return 1 + +evaluate = EvalFunc() +init = Init(3) +mutate = Mutate() +xover = Crossover() + +if __name__ == '__main__': + + eo = EO() + eo1 = EO() + + init(eo1) + init(eo) + evaluate(eo) + print eo + + for i in range(10): + xover(eo, eo1) + mutate(eo) + + evaluate(eo) + print eo, eo1 + + print + print + print + + pop = eoPop(1, init) + + pop[0] = eo; + + mutate(pop[0]) + pop[0].invalidate() + evaluate(pop[0]) + + print pop[0], eo diff --git a/trunk/eo/src/pyeo/test/run_tests.sh b/trunk/eo/src/pyeo/test/run_tests.sh new file mode 100755 index 000000000..8a2ebca13 --- /dev/null +++ b/trunk/eo/src/pyeo/test/run_tests.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +for i in *.py +do + python2 $i > /dev/null + +done diff --git a/trunk/eo/src/pyeo/test/test_breeders.py b/trunk/eo/src/pyeo/test/test_breeders.py new file mode 100644 index 000000000..c23d47873 --- /dev/null +++ b/trunk/eo/src/pyeo/test/test_breeders.py @@ -0,0 +1,30 @@ +from maxone import * +import unittest + +class TestBreeders(unittest.TestCase): + def runtest(self, breed): + pop = eoPop(50, Init(20)) + evaluate = EvalFunc() + print 'HERE' + for indy in pop: evaluate(indy) + newpop = eoPop(); + + breed(pop,newpop) + + print pop.best() + for indy in newpop: evaluate(indy) + print newpop.best() + + def testGeneralBreeder(self): + seq = eoSequentialOp(); + seq.add(Crossover(), 0.7) + seq.add(Mutate(), 0.1) + + breed = eoGeneralBreeder(eoDetTournamentSelect(3), seq) + self.runtest(breed) + +def suite(): + return unittest.makeSuite(TestSGA,'test') + +if __name__=='__main__': + unittest.main() diff --git a/trunk/eo/src/pyeo/test/test_mo.py b/trunk/eo/src/pyeo/test/test_mo.py new file mode 100644 index 000000000..5a7a79a41 --- /dev/null +++ b/trunk/eo/src/pyeo/test/test_mo.py @@ -0,0 +1,166 @@ +from maxone import * +from math import exp +import unittest + +class MyInit(eoInit): + def __call__(self, eo): + eo.genome = [rng().normal(), rng().normal(), rng().normal()]; + +class MyMutate(eoMonOp): + def __call__(self, eo): + std = 0.05 + eo.genome = copy(eo.genome) + + eo.genome[0] += rng().normal() * std + eo.genome[1] += rng().normal() * std + eo.genome[2] += rng().normal() * std + return 1 + +class AnEval(eoEvalFunc): + def __init__(self): + eoEvalFunc.__init__(self) + + setObjectivesSize(2); + setObjectivesValue(0,1); + setObjectivesValue(1,1); + + def __call__(self, eo): + x = abs(eo.genome[0]) + y = abs(eo.genome[1]) + z = abs(eo.genome[2]) + + eo.fitness = [ x / (x+y+z), y /(x+y+z) ] + +import Gnuplot + +g = Gnuplot.Gnuplot() +g.reset() + +def do_plot(pop): + l1 = [] + l2 = [] + + for indy in pop: + l1.append(indy.fitness[0]) + l2.append(indy.fitness[1]) + + d = Gnuplot.Data(l1,l2, with = 'points') + + d2 = Gnuplot.Data([0,1],[1,0], with='lines') + + g.plot(d,d2) + +class NSGA_II(eoAlgo): + def __init__(self, ngens): + self.cont = eoGenContinue(ngens); + + self.selectOne = eoDetTournamentSelect(2); + self.evaluate = AnEval() + self.mutate = MyMutate() + self.init = MyInit() + + self.seq = eoProportionalOp() + self.seq.add(self.mutate, 1.0) + + self.perf2worth = eoNDSorting_II() + + def __call__(self, pop): + sz = len(pop) + i = 0 + while self.cont(pop): + newpop = eoPop() + populator = eoSelectivePopulator(pop, newpop, self.selectOne); + + while len(newpop) < sz: + self.seq(populator) + + for indy in newpop: + self.evaluate(indy) + pop.push_back(indy) + + self.perf2worth(pop) + self.perf2worth.sort_pop(pop) + + #print pop[0].fitness, pop[0].genome + pop.resize(sz) + + #worth = self.perf2worth.getValue() + #print worth[0], worth[sz-1] + + i += 1 + if i%100 == 0: + pass + do_plot(pop) + + worths = self.perf2worth.getValue() + + w0 = int(worths[0]-0.001) + + for i in range(len(pop)): + if worths[i] <= w0: + break; + + print pop[i].genome + print pop[i].fitness + +class TestNSGA_II(unittest.TestCase): + def testIndividuals(self): + setObjectivesSize(2); + setObjectivesValue(0,1); + setObjectivesValue(1,1); + + eo1 = EO(); + eo2 = EO(); + + eo1.fitness = [0,1]; + eo2.fitness = [1,1]; + + self.failUnlessEqual(dominates(eo1, eo2), 0) + self.failUnlessEqual(dominates(eo2, eo1), 1) + self.failUnlessEqual(dominates(eo2, eo2), 0) + + setObjectivesValue(0,-1) + setObjectivesValue(1,-1); + + self.failUnlessEqual(dominates(eo1, eo2), 1) + self.failUnlessEqual(dominates(eo2, eo1), 0) + self.failUnlessEqual(dominates(eo2, eo2), 0) + + def testNDSorting(self): + setObjectivesSize(2); + setObjectivesValue(0,-1) + setObjectivesValue(1,-1); + + pop = eoPop() + pop.resize(6) + + pop[5].fitness = [0.15,0.87] + pop[4].fitness = [0.1,0.9] + pop[3].fitness = [0,1]; + pop[2].fitness = [1,0]; + pop[1].fitness = [1,1]; + pop[0].fitness = [2,1]; + + srt = eoNDSorting_II() + + srt(pop) + srt.sort_pop(pop) + + for indy in pop: + print indy.fitness + + worths = srt.getValue() + print worths + print type(worths) + + def testNSGA_II(self): + evaluate = AnEval(); + pop = eoPop(25, MyInit()) + for indy in pop: evaluate(indy) + + nsga = NSGA_II(50) + + nsga(pop) + +if __name__=='__main__': + unittest.main() diff --git a/trunk/eo/src/pyeo/test/test_pickling.py b/trunk/eo/src/pyeo/test/test_pickling.py new file mode 100644 index 000000000..81b3b9f5f --- /dev/null +++ b/trunk/eo/src/pyeo/test/test_pickling.py @@ -0,0 +1,91 @@ +from maxone import * +import unittest +import cPickle +import tempfile +import os + +class TestPickling(unittest.TestCase): + def do_pickle(self, object): + filename = tempfile.mktemp() + file = open(filename, 'wb') + pickler = cPickle.Pickler(file) + + pickler.dump(object); + del pickler + file.close() + + file = open(filename) + + unpickler = cPickle.Unpickler(file) + + object2 = unpickler.load() + + del unpickler + file.close() + os.remove(filename) + + return object2 + + def testInvalidEO(self): + eo = EO(); + eo.genome = [1,2,3]; + + eo2 = self.do_pickle(eo) + self.failUnlessEqual( str(eo), str(eo2) ) + + def testValidEO(self): + eo = EO(); + eo.genome = [1,2,3]; + eo.fitness = 10 + + eo2 = self.do_pickle(eo) + + self.failUnlessEqual( str(eo), str(eo2) ) + + def testPop(self): + pop = eoPop(40, init) + for indy in pop: + evaluate(indy) + + pop2 = self.do_pickle(pop) + + self.failUnlessEqual( str(pop), str(pop2) ) + + def testHowMany(self): + howmany = eoHowMany(0.8); + howmany2 = self.do_pickle(howmany) + + self.failUnlessEqual(howmany(10), howmany2(10)) + self.failUnlessEqual( str(howmany), str(howmany) ) + + def testRNG(self): + for i in range(10): + rng().rand() + + rng2 = self.do_pickle(rng()) + + for i in range(100): + a = rng().rand() + b = rng2.rand() + self.failUnlessEqual(a,b) + + def vParam(self,v): + v2 = self.do_pickle(v); + self.failUnlessEqual(v.value, v2.value) + + def testValueParam(self): + import Numeric + + self.vParam(eoValueParamInt(42,'int')) + self.vParam(eoValueParamFloat(4.2,'float')) + + v = eoValueParamVec() + v.value = Numeric.arange(10) + self.vParam(v) + + v = eoValueParamPair() + v.value = (0.3,0.5) + self.vParam(v) + +if __name__=='__main__': + unittest.main() diff --git a/trunk/eo/src/pyeo/test/test_populator.py b/trunk/eo/src/pyeo/test/test_populator.py new file mode 100644 index 000000000..12335956a --- /dev/null +++ b/trunk/eo/src/pyeo/test/test_populator.py @@ -0,0 +1,82 @@ +print 'importing maxone' +from maxone import * +print 'done' +import unittest + +class Mut(Mutate): + def __init__(self): + Mutate.__init__(self) + self.cnt = 0; + def __call__(self, eo): + self.cnt += 1; + return Mutate.__call__(self, eo) + +class Xover(Crossover): + def __init__(self): + Crossover.__init__(self) + self.cnt = 0; + def __call__(self, eo1, eo2): + self.cnt += 1; + return Crossover.__call__(self, eo1, eo2) + +class TestPopulator(unittest.TestCase): + def make_pop(self): + pop = eoPop(20, init) + for indy in pop: evaluate(indy) + return pop + + def test_sequential(self): + pop = self.make_pop() + populator = eoSeqPopulator(pop, pop) + + print populator.get() + print populator.get() + + def test_selective(self): + sel = eoDetTournamentSelect(2) + pop = self.make_pop() + + populator = eoSelectivePopulator(pop, pop, sel) + + print populator.get() + print populator.get() + + def runOpContainer(self, opcontainer): + mutate = Mut() + xover = Xover() + + print 'making seq' + seq = opcontainer() + + print "xovertype", xover.getType() + print "mutationtype", mutate.getType() + + seq.add(mutate, 0.4) + seq.add(xover, 0.8) + + pop = self.make_pop(); + offspring = eoPop() + + sel = eoDetTournamentSelect(2) + + print "making populator" + populator = eoSelectivePopulator(pop, offspring, sel) + print 'made' + + for i in xrange(1000): + seq(populator) + + print mutate.cnt + print xover.cnt + + + def test_sequentialOp(self): + print '*'*20, "SequentialOp", '*'*20 + self.runOpContainer(eoSequentialOp) + + def test_proportionalOp(self): + print '*'*20, "ProportionalOp", '*'*20 + self.runOpContainer(eoProportionalOp) + +if __name__=='__main__': + unittest.main() diff --git a/trunk/eo/src/pyeo/test/test_reduce.py b/trunk/eo/src/pyeo/test/test_reduce.py new file mode 100644 index 000000000..3e279168a --- /dev/null +++ b/trunk/eo/src/pyeo/test/test_reduce.py @@ -0,0 +1,32 @@ +from maxone import * +import unittest + +class TestReduce(unittest.TestCase): + def run_test(self, ReduceClass, Arg = None): + pop = eoPop(10, init) + for indy in pop: evaluate(indy) + + if Arg: + red = ReduceClass(Arg) + else: + red = ReduceClass() + + red(pop, 5); + + self.failUnlessEqual( len(pop), 5) + + def test_eoTruncate(self): + self.run_test(eoTruncate) + def test_eoRandomeReduce(self): + self.run_test(eoRandomReduce) + def test_eoEPRReduce(self): + self.run_test(eoEPReduce, 2) + def test_eoLinearTruncate(self): + self.run_test(eoLinearTruncate) + def test_eoDetTournamentTruncate(self): + self.run_test(eoDetTournamentTruncate, 2) + def test_eoStochTournamentTruncate(self): + self.run_test(eoStochTournamentTruncate, 0.9) + +if __name__=='__main__': + unittest.main() diff --git a/trunk/eo/src/pyeo/test/test_selectone.py b/trunk/eo/src/pyeo/test/test_selectone.py new file mode 100644 index 000000000..f71913b98 --- /dev/null +++ b/trunk/eo/src/pyeo/test/test_selectone.py @@ -0,0 +1,62 @@ +from maxone import * +import unittest + +class Init(eoInit): + def __call__(self, eo): + pass + +class TestSGA(unittest.TestCase): + def __init__(self, a): + unittest.TestCase.__init__(self, a) + self.pop = eoPop(4, Init()) + + for i in range(len(self.pop)): + self.pop[i].fitness = i; + + + def do_test(self, selectOne): + print '*'*20, "Testing", str(selectOne.__class__), '*'*20 + selection = [0. for i in range(len(self.pop))] + + nTries = 500 + for i in range(nTries): + selection[ selectOne(self.pop).fitness ] += 1 + + for i in range(len(self.pop)): + print i, selection[i], selection[i] / nTries + + return selection, nTries + + def test_eoDetTournamenSelect(self): + selectOne = eoDetTournamentSelect(2) + self.do_test(selectOne) + + def test_eoRandomSelect(self): + selectOne = eoRandomSelect() + self.do_test(selectOne) + + def test_eoBestSelect(self): + selectOne = eoBestSelect() + (sel, nTries) = self.do_test(selectOne) + + self.failUnlessEqual(sel[0], 0); + self.failUnlessEqual(sel[-1], nTries); + + def test_eoNoSelect(self): + selectOne = eoNoSelect() + self.do_test(selectOne) + + def test_eoStochTournament(self): + selectOne = eoStochTournamentSelect(0.75) + self.do_test(selectOne) + + def test_eoSequentialSelect(self): + selectOne = eoSequentialSelect(); + self.do_test(selectOne) + + def test_eoEliteSequentialSelect(self): + selectOne = eoEliteSequentialSelect(); + self.do_test(selectOne) + +if __name__=='__main__': + unittest.main() diff --git a/trunk/eo/src/pyeo/test/test_sga.py b/trunk/eo/src/pyeo/test/test_sga.py new file mode 100644 index 000000000..5f6d1c22a --- /dev/null +++ b/trunk/eo/src/pyeo/test/test_sga.py @@ -0,0 +1,45 @@ +from maxone import * +import unittest + +class TestSGA(unittest.TestCase): + def dotestSGA(self, evaluate): + init = Init(20) + mutate = Mutate() + xover = Crossover() + + pop = eoPop(50, init) + for indy in pop: evaluate(indy) + + select = eoDetTournamentSelect(3); + cont1 = eoGenContinue(20); + + cont = eoCheckPoint(cont1) + + mon = eoGnuplot1DMonitor() + + avg = eoAverageStat() + bst = eoBestFitnessStat() + mon.add(avg) + mon.add(bst) + + # add it to the checkpoint + cont.add(avg) + #cont.add(mon) + cont.add(bst) + + sga = eoSGA(select, xover, 0.6, mutate, 0.4, evaluate, cont); + + sga(pop) + + print pop.best() + + def testSGA_Max(self): + evaluate = EvalFunc() + self.dotestSGA(evaluate) + + def testSGA_Min(self): + evaluate = MinEvalFunc() + self.dotestSGA(evaluate) + +if __name__=='__main__': + unittest.main() diff --git a/trunk/eo/src/pyeo/test/test_transform.py b/trunk/eo/src/pyeo/test/test_transform.py new file mode 100644 index 000000000..7359342e5 --- /dev/null +++ b/trunk/eo/src/pyeo/test/test_transform.py @@ -0,0 +1,62 @@ +"""Test script for the eoSGATranform class""" + +from copy import deepcopy +from libPyEO import * +from maxone import * + +pop = eoPop() + +for i in range(10): + eo = EO() + init(eo) + evaluate(eo) + pop.push_back(eo) + +transform = eoSGATransform(xover, 0.8, mutate, 0.2) + +def test1(pop, transform): + pop = deepcopy(pop) + print "test 1" + print "Initial population:" + print pop + + transform(pop) + + print "GM pop:" + print pop + +def test2(pop, transform): + pop = deepcopy(pop) + + print "test 2" + print "Initial population" + print pop + + checkpoint = eoCheckPoint(eoGenContinue(50)) + select = eoSelectNumber(eoDetTournamentSelect(3), 10) + replace = eoGenerationalReplacement() + + algo = eoEasyEA(checkpoint, evaluate, select, transform, replace) + algo(pop) + + print "Evoluated pop:" + print pop + +if __name__ == "__main__": + try: + test1(pop, transform) + except: + import sys + print + print "Caught an exception:" + print sys.exc_type, sys.exc_value + print + + try: + test2(pop, transform) + except: + import sys + print + print "Caught an exception:" + print sys.exc_type, sys.exc_value + print diff --git a/trunk/eo/src/pyeo/valueParam.cpp b/trunk/eo/src/pyeo/valueParam.cpp new file mode 100644 index 000000000..59ed1a472 --- /dev/null +++ b/trunk/eo/src/pyeo/valueParam.cpp @@ -0,0 +1,191 @@ +/* + PyEO + + Copyright (C) 2003 Maarten Keijzer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include + +// Here's 'len'. Why? dunno +#include "valueParam.h" +#include + +using namespace boost::python; + +class ParamWrapper : public eoParam +{ +public: + PyObject* self; + ParamWrapper(PyObject* p) : self(p) {} + ParamWrapper(PyObject* p, + std::string a, + std::string b, + std::string c, + char d, + bool e) : eoParam(a,b,c,d,e), self(p) {} + + std::string getValue() const + { + return call_method(self, "getValueAsString"); + } + + void setValue(const std::string& s) + { + call_method(self, "setValueAsString", s); + } +}; + +template +struct ValueParam_pickle_suite : boost::python::pickle_suite +{ + static + boost::python::tuple getstate(const eoValueParam& _param) + { + str v(_param.getValue()); + str d(_param.description()); + str def(_param.defValue()); + str l(_param.longName()); + object s(_param.shortName()); + object r(_param.required()); + return make_tuple(v,d,def,l,s,r); + } + static + void setstate(eoValueParam& _param, boost::python::tuple pickled) + { + std::string v = extract(pickled[0]); + std::string d = extract(pickled[1]); + std::string def = extract(pickled[2]); + std::string l = extract(pickled[3]); + char s = extract(pickled[4]); + bool r = extract(pickled[5]); + + _param = eoValueParam(T(), l, d, s, r); + _param.defValue(d); + _param.setValue(v); + } +}; + +template +U getv(const eoValueParam& v) { return v.value(); } + +template +void setv(eoValueParam& v, U val) { v.value() = val; } + +template <> +numeric::array getv< std::vector, numeric::array > +(const eoValueParam< std::vector >& param) +{ + const std::vector& v = param.value(); + list result; + + for (unsigned i =0; i < v.size(); ++i) + result.append(v[i]); + + return numeric::array(result); +} + +template <> +void setv< std::vector, numeric::array > +(eoValueParam< std::vector >& param, numeric::array val) +{ + std::vector& v = param.value(); + v.resize( boost::python::len(val) ); + for (unsigned i = 0; i < v.size(); ++i) + { + extract x(val[i]); + if (!x.check()) + throw std::runtime_error("double expected"); + + v[i] = x(); + } +} + +template <> +tuple getv, tuple > + (const eoValueParam< std::pair >& p) +{ + return make_tuple(p.value().first, p.value().second); +} + +template <> +void setv< std::pair, tuple > +(eoValueParam< std::pair >& p, tuple val) +{ + extract first(val[0]); + extract second(val[1]); + + if (!first.check()) + throw std::runtime_error("doubles expected"); + if (!second.check()) + throw std::runtime_error("doubles expected"); + + p.value().first = first(); + p.value().second = second(); +} + +template +void define_valueParam(std::string prefix) +{ + std::string name = "eoValueParam"; + name += prefix; + + class_, bases >(name.c_str(), init<>()) + .def(init()) + .def(init()) + .def(init()) + .def(init()) + .def("getValueAsString", &eoValueParam::getValue) + .def("__str__", &eoValueParam::getValue) + .def("setValueAsString", &eoValueParam::setValue) + .def("getValue", getv) + .def("setValue", setv) + .add_property("value", getv, setv) + .def_pickle(ValueParam_pickle_suite()) + ; +} + +void valueParam() +{ + class_("eoParam", init<>()) + .def(init< std::string, std::string, std::string, char, bool>()) + .def("getValueAsString", &ParamWrapper::getValue) + .def("setValueAsString", &ParamWrapper::setValue) + .def("longName", &eoParam::longName, return_value_policy()) + //.def("defValue", &eoParam::defValue, return_value_policy()) + .def("description", &eoParam::description, return_value_policy()) + .def("shortName", &eoParam::shortName) + .def("required", &eoParam::required) + ; + + define_valueParam("Int"); + define_valueParam("Float"); + define_valueParam, numeric::array >("Vec"); + define_valueParam< std::pair, tuple >("Pair"); + //define_valueParam< object, object >("Py"); + + class_ >("eoValueParam", init<>()) + //.def(init()) + //.def(init()) + //.def(init()) + .def(init()) + .def("getValueAsString", &ValueParam::getValue) + .def("__str__", &ValueParam::getValue) + .def("setValueAsString", &ValueParam::setValue) + .add_property("object", &ValueParam::getObj, &ValueParam::setObj) + ; +} diff --git a/trunk/eo/src/pyeo/valueParam.h b/trunk/eo/src/pyeo/valueParam.h new file mode 100644 index 000000000..940a43518 --- /dev/null +++ b/trunk/eo/src/pyeo/valueParam.h @@ -0,0 +1,41 @@ +#ifndef VALUEPARAM_H +#define VALUEPARAM_H + +#include +#include + +class ValueParam : public eoParam // ValueParam containing python object +{ + boost::python::object obj; + +public: + + ValueParam() : eoParam(), obj() {} + + ValueParam(boost::python::object o, + std::string longName, + std::string d = "No Description", + char s = 0, + bool r = false) : eoParam(longName, "", d, s, r) + { + std::cerr << "HI" << std::endl; + obj = o; + eoParam::defValue(getValue()); + } + + std::string getValue() const + { + boost::python::str s = boost::python::str(obj); + return std::string(boost::python::extract(s)); + } + + void setValue(const std::string& v) + { + std::cerr << "not implemented yet" << std::endl; + } + + boost::python::object getObj() const { return obj;} + void setObj(boost::python::object o) { obj = o; } +}; + +#endif diff --git a/trunk/eo/src/utils/CMakeLists.txt b/trunk/eo/src/utils/CMakeLists.txt new file mode 100644 index 000000000..ab1a6c826 --- /dev/null +++ b/trunk/eo/src/utils/CMakeLists.txt @@ -0,0 +1,46 @@ +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +###################################################################################### +### 2) Define the ga target +###################################################################################### + +SET(EOUTILS_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) +SET(LIBRARY_OUTPUT_PATH ${EOUTILS_LIB_OUTPUT_PATH}) + +SET(EOUTILS_SOURCES + eoData.cpp + eoFileMonitor.cpp + eoGnuplot.cpp + eoGnuplot1DMonitor.cpp + eoGnuplot1DSnapshot.cpp + eoIntBounds.cpp + eoParser.cpp + eoRealBounds.cpp + eoRNG.cpp + eoState.cpp + eoOStreamMonitor.cpp + eoUpdater.cpp + make_help.cpp + pipecom.cpp + eoLogger.cpp + eoParallel.cpp + eoSignal.cpp + ) + +ADD_LIBRARY(eoutils STATIC ${EOUTILS_SOURCES}) +INSTALL(TARGETS eoutils ARCHIVE DESTINATION ${LIB} COMPONENT libraries) + + +###################################################################################### +### 3) Optionnal +###################################################################################### + +SET(EOUTILS_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(eoutils PROPERTIES VERSION "${EOUTILS_VERSION}") + +###################################################################################### diff --git a/trunk/eo/src/utils/ChangeLog b/trunk/eo/src/utils/ChangeLog new file mode 100644 index 000000000..dac74c49c --- /dev/null +++ b/trunk/eo/src/utils/ChangeLog @@ -0,0 +1,42 @@ +2007-08-22 Jochen Küpper + + * eoRNG.h (eoRng::random): Add comment on truncation as standard way of + floating point to integer conversion. + +2006-12-04 Jochen Küpper + + * eoRNG.h (eoRng::normal(stdev)): Revert erroneous change. + +2006-12-02 Jochen Küpper + + * eoTimedMonitor.h (eoTimedMonitor::seconds): Make unsigned. + + * eoRNG.h: Cleanup docs and document /all/ members. + + * eoRNG.cpp, eoRNG.h (K, M, N): Declare static and initialize in cpp. + +2006-12-01 Jochen Küpper + + * eoRNG.cpp: Use C++ style cast. + + * Makefile.am: Add missing header for distribution. + +2006-11-30 Jochen Küpper + + * eoRNG.h: Generally include + +2006-11-16 Jochen Küpper + + * eoParser.h (eoParser::getORcreateParam): Make this a real if-then-else + clause around ptParam (found or not). + + * eoParam.h (eoValueParam::setValue): Document. + (eoValueParam >::setValue): Allow delimiters ',' and + ';'. A plain ' ' does not work, as it is not correctly read by + eoParser::readFrom. + + * Local Variables: + * coding: iso-8859-1 + * mode: flyspell + * fill-column: 80 + * End: diff --git a/trunk/eo/src/utils/checkpointing b/trunk/eo/src/utils/checkpointing new file mode 100644 index 000000000..f7fd0e55b --- /dev/null +++ b/trunk/eo/src/utils/checkpointing @@ -0,0 +1,56 @@ +/* + ----------------------------------------------------------------------------- + checkpointing + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef _CHECKPOINTING_ +#define _CHECKPOINTING_ + +#include +#include +#include +#include +#include +#include +#include +#ifndef _MSC_VER +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// and make_help - any better suggestion to include it? +void make_help(eoParser & _parser); + +#endif // !_CHECKPOINTING_ + +// Local Variables: +// mode: C++ +// End: diff --git a/trunk/eo/src/utils/compatibility.h b/trunk/eo/src/utils/compatibility.h new file mode 100644 index 000000000..937ab8a03 --- /dev/null +++ b/trunk/eo/src/utils/compatibility.h @@ -0,0 +1,82 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + compatibility.h + File to store some compiler specific stuff in. Currently handles, or + least tries to handle the min() max() problems when using MSVC + + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef COMPAT_H +#define COMPAT_H + +#include +#include + +#ifdef __GNUC__ +#if __GNUC__ < 3 + // check for stdlibc++v3 which does have ios_base + #ifndef _CPP_BITS_IOSBASE_H + typedef ios ios_base; // not currently defined in GCC + #endif +#endif +#endif + +#if defined(_MSC_VER) && (_MSC_VER < 1300) +/* +Maarten: added this code here because Mirkosoft has the +nasty habit of #define min and max in stdlib.h (and windows.h) +I'm trying to undo this horrible macro magic (microsoft yet macrohard) +here. Sure hope it works +Olivier: this has been removed in .NET :) One step more standard... +*/ +#pragma warning(disable:4786) + +#include + +#ifdef min +#undef min +#undef max // as they come in std::pairs +#endif + +// add min and max to std... +namespace std +{ + template const T& min(const T& a, const T& b) + { + if(a < b) + return a; + // else + return b; + } + + template const T& max(const T& a, const T& b) + { + if(a > b) + return a; + // else + return b; + } +} + +#endif + // _MSC_VER +#endif diff --git a/trunk/eo/src/utils/eoAssembledFitnessStat.h b/trunk/eo/src/utils/eoAssembledFitnessStat.h new file mode 100644 index 000000000..44586932b --- /dev/null +++ b/trunk/eo/src/utils/eoAssembledFitnessStat.h @@ -0,0 +1,117 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoAssembledFitnessStat.h +// Marc Wintermantel & Oliver Koenig +// IMES-ST@ETHZ.CH +// April 2003 + +//----------------------------------------------------------------------------- +// eoStat.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoAssembledFitnessStat_h +#define _eoAssembledFitnessStat_h + +#include +#include + +/** @addtogroup Stats + * @{ + */ + +/** + Average fitness values of a population, where the fitness is + of type eoScalarAssembledFitness. Specify in the constructor, + for which fitness term (index) the average should be evaluated. + Only values of object where the failed boolean = false is set are counted. +*/ +template +class eoAssembledFitnessAverageStat : public eoStat +{ +public : + + using eoStat::value; + + typedef typename EOT::Fitness Fitness; + + + eoAssembledFitnessAverageStat(unsigned _whichTerm=0, std::string _description = "Average Fitness") + : eoStat(Fitness(), _description), whichFitnessTerm(_whichTerm) + {} + + + virtual void operator()(const eoPop& _pop) { + if( whichFitnessTerm >= _pop[0].fitness().size() ) + throw std::logic_error("Fitness term requested out of range"); + + double result =0.0; + unsigned count = 0; + for (typename eoPop::const_iterator it = _pop.begin(); it != _pop.end(); ++it){ + if ( it->fitness().failed == false ){ + result+= it->fitness()[whichFitnessTerm]; + ++count; + } + } + + value() = result / (double) count; + } + +private: + // Store an index of the fitness term to be evaluated in eoScalarFitnessAssembled + unsigned whichFitnessTerm; +}; + +/** + Fitness values of best individuum in a population, where the fitness is + of type eoScalarAssembledFitness. Specify in the constructor, + for which fitness term (index) the value should be evaluated. +*/ +template +class eoAssembledFitnessBestStat : public eoStat +{ +public: + + using eoStat::value; + + typedef typename EOT::Fitness Fitness; + + eoAssembledFitnessBestStat(unsigned _whichTerm=0, std::string _description = "Best Fitness") + : eoStat(Fitness(), _description), whichFitnessTerm(_whichTerm) + {} + + virtual void operator()(const eoPop& _pop) { + if( whichFitnessTerm >= _pop[0].fitness().size() ) + throw std::logic_error("Fitness term requested out of range"); + + value() = _pop.best_element().fitness()[whichFitnessTerm]; + } + +private: + + // Store an index of the fitness term to be evaluated in eoScalarFitnessAssembled + unsigned whichFitnessTerm; +}; + +/** @} */ +#endif diff --git a/trunk/eo/src/utils/eoCheckPoint.h b/trunk/eo/src/utils/eoCheckPoint.h new file mode 100644 index 000000000..ea562e8bf --- /dev/null +++ b/trunk/eo/src/utils/eoCheckPoint.h @@ -0,0 +1,183 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoCheckPoint.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoCheckPoint_h +#define _eoCheckPoint_h + +#include +#include +#include +#include + +/** @defgroup Checkpoints Checkpointing + * + * Checkpoints are supposed to be called perodically (for instance at each generation) and + * will call every functors you put in them. + * + * Use them with eoStats, eoUpdater and eoMonitor to get statistics at each generation. + * + * @see eoStat + * @see eoMonitor + * @see eoUpdater + * + * Example of a test program using checkpointing: + * @include t-eoCheckpointing.cpp + * + * @ingroup Utilities + * + * @{ + */ + +/** eoCheckPoint is a container class. + It contains std::vectors of (pointers to) + eoContinue (modif. MS July 16. 2002) + eoStats, eoUpdater and eoMonitor + it is an eoContinue, so its operator() will be called every generation - + and will return the contained-combined-eoContinue result + but before that it will call in turn every single + {statistics, updaters, monitors} that it has been given, + and after that, if stopping, all lastCall methods of the above. +*/ +template +class eoCheckPoint : public eoContinue +{ +public : + + eoCheckPoint(eoContinue& _cont) + { + continuators.push_back(&_cont); + } + + bool operator()(const eoPop& _pop); + + void add(eoContinue& _cont) { continuators.push_back(&_cont); } + void add(eoSortedStatBase& _stat) { sorted.push_back(&_stat); } + void add(eoStatBase& _stat) { stats.push_back(&_stat); } + void add(eoMonitor& _mon) { monitors.push_back(&_mon); } + void add(eoUpdater& _upd) { updaters.push_back(&_upd); } + + virtual std::string className(void) const { return "eoCheckPoint"; } + std::string allClassNames() const ; + +private : + + std::vector*> continuators; + std::vector*> sorted; + std::vector*> stats; + std::vector monitors; + std::vector updaters; +}; + +template +bool eoCheckPoint::operator()(const eoPop& _pop) +{ + unsigned i; + + std::vector sorted_pop; + if (!sorted.empty()) + { + _pop.sort(sorted_pop); + + for (i = 0; i < sorted.size(); ++i) + { + (*sorted[i])(sorted_pop); + } + } + + for (i = 0; i < stats.size(); ++i) + (*stats[i])(_pop); + + for (i = 0; i < updaters.size(); ++i) + (*updaters[i])(); + + for (i = 0; i < monitors.size(); ++i) + (*monitors[i])(); + + bool bContinue = true; + for (i = 0; i < continuators.size(); ++i) + if ( !(*continuators[i])(_pop) ) + bContinue = false; + + if (! bContinue) // we're going to stop: lastCall, gentlemen + { + if (!sorted.empty()) + { + for (i = 0; i < sorted.size(); ++i) + { + sorted[i]->lastCall(sorted_pop); + } + } + for (i = 0; i < stats.size(); ++i) + stats[i]->lastCall(_pop); + + for (i = 0; i < updaters.size(); ++i) + updaters[i]->lastCall(); + + for (i = 0; i < monitors.size(); ++i) + monitors[i]->lastCall(); + } + return bContinue; +} + +/** returns a string with all className() + * of data separated with "\n" (for debugging) + */ +template +std::string eoCheckPoint::allClassNames() const +{ + unsigned i; + std::string s = "\n" + className() + "\n"; + + s += "Sorted Stats\n"; + for (i = 0; i < sorted.size(); ++i) + s += sorted[i]->className() + "\n"; + s += "\n"; + + s += "Stats\n"; + for (i = 0; i < stats.size(); ++i) + s += stats[i]->className() + "\n"; + s += "\n"; + + s += "Updaters\n"; + for (i = 0; i < updaters.size(); ++i) + s += updaters[i]->className() + "\n"; + s += "\n"; + + s += "Monitors\n"; + for (i = 0; i < monitors.size(); ++i) + s += monitors[i]->className() + "\n"; + s += "\n"; + + s += "Continuators\n"; + for (i = 0; i < continuators.size(); ++i) + s += continuators[i]->className() + "\n"; + s += "\n"; + + return s; +} + +/** @} */ +#endif diff --git a/trunk/eo/src/utils/eoData.cpp b/trunk/eo/src/utils/eoData.cpp new file mode 100644 index 000000000..7e4457075 --- /dev/null +++ b/trunk/eo/src/utils/eoData.cpp @@ -0,0 +1,11 @@ +// Copyright (C) 2005 Jochen Küpper + + +#include "eoData.h" + + + +// Local Variables: +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/eo/src/utils/eoData.h b/trunk/eo/src/utils/eoData.h new file mode 100644 index 000000000..876b00955 --- /dev/null +++ b/trunk/eo/src/utils/eoData.h @@ -0,0 +1,47 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +----------------------------------------------------------------------------- + eoData.h + + (c) GeNeura Team & Maarten Keijzer, 1998, 1999, 2000 + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef EODATA_H +#define EODATA_H + +#ifndef _MSC_VER +#include +#define _isnan isnan +#endif + + +//----------------------------------------------------------------------------- +// some defines to make things easier to get at first sight + +// to be used in selection / replacement procedures to indicate whether +// the argument (rate, a double) shoudl be treated as a rate (number=rate*popSize) +// or as an absolute integer (number=rate regardless of popsize). +// the default value shoudl ALWAYS be true (eo_as_a_rate). +// +// this construct is mandatory because in some cases you might not know the +// population size that will enter the replacement for instance - so you +// cannot simply have a pre-computed (double) rate of 1/popSize +#define eo_is_a_rate true +#define eo_is_an_integer false + +#endif diff --git a/trunk/eo/src/utils/eoDistance.h b/trunk/eo/src/utils/eoDistance.h new file mode 100644 index 000000000..b26f249d6 --- /dev/null +++ b/trunk/eo/src/utils/eoDistance.h @@ -0,0 +1,104 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoDistance.h +// (c) GeNeura Team, 1998, Marc Schoenauer 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifndef _eoDistance_H +#define _eoDistance_H + +#include + +/** @addtogroup Stats + * @{ + * */ + +/** + This is a generic class for distance functors: + takes 2 things and returns a double +*/ +template< class EOT > +class eoDistance : public eoBF +{}; + + +/** + This is a generic class for Euclidain distance (L2 norm) computation: + assumes the 2 things are std::vectors of something that is double-castable +*/ +template< class EOT > +class eoQuadDistance : public eoDistance +{ +public: + double operator()(const EOT & _v1, const EOT & _v2) + { + double sum=0.0; + for (unsigned i=0; i<_v1.size(); i++) + { + double r = static_cast (_v1[i]) - static_cast (_v2[i]); + sum += r*r; + } + return sqrt(sum); + } +}; + +/** + This is a generic class for L1 distance computation: + assumes the 2 things are std::vectors of something + that is double-castable + For bitstrings, this is the Hamming distance +*/ +template< class EOT > +class eoHammingDistance : public eoDistance +{ +public: + double operator()(const EOT & _v1, const EOT & _v2) + { + double sum=0.0; + for (unsigned i=0; i<_v1.size(); i++) + { + double r = static_cast (_v1[i]) - static_cast (_v2[i]); + sum += fabs(r); + } + return sum; + } +}; + +/* this distance measures the difference in fitness + * I am not sure it can be of any use, though ... + * except for some testing + */ +template< class EOT > +class eoFitnessDistance : public eoDistance +{ +public: + double operator()(const EOT & _v1, const EOT & _v2) + { + double d = _v1.fitness() - _v2.fitness(); + return sqrt(d*d); + } +}; + + +/** @} */ + +#endif diff --git a/trunk/eo/src/utils/eoFDCStat.h b/trunk/eo/src/utils/eoFDCStat.h new file mode 100644 index 000000000..1d2050b78 --- /dev/null +++ b/trunk/eo/src/utils/eoFDCStat.h @@ -0,0 +1,144 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFDCStat.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFDCStat_h +#define _eoFDCStat_h + +#include +#include +#include + +/** + The Fitness Distance Correlation computation. + + Stores the values into eoValueParam +so they can be snapshot by some eoGnuplotSnapshot ... + +@ingroup Stats +*/ +template +class eoFDCStat : public eoStat +{ +public: + + using eoStat::value; + + /** Ctor without the optimum */ + eoFDCStat(eoDistance & _dist, std::string _description = "FDC") : + eoStat(0, _description), dist(_dist), boolOpt(false) {} + + /** Ctor with the optimum + */ + eoFDCStat(eoDistance & _dist, EOT & _theBest, + std::string _description = "FDC") : + eoStat(0, _description), dist(_dist), + theBest(_theBest), boolOpt(true) {} + + /** Compute the FDC - either from best in pop, or from absolute best + * if it was passed in the constructor + */ + virtual void operator()(const eoPop& _pop) + { + unsigned i; + if (!boolOpt) // take the local best + theBest = _pop.best_element(); + unsigned int pSize = _pop.size(); + distToBest.value().resize(pSize); + fitnesses.value().resize(pSize); + double sumFit = 0.0, sumDist = 0.0; + for (i=0; i > + */ + const eoValueParam > & theDist() + { return distToBest; } + const eoValueParam > & theFit() + { return fitnesses; } + + +private: + eoDistance & dist; + EOT theBest; + bool boolOpt; // whether the best is known or not + eoValueParam > distToBest; + eoValueParam > fitnesses; +}; + +/** Specific class for FDCStat monitoring: + * As I failed to have FDC stat as an eoStat, this is the trick + * to put the 2 eoParam > into a monitor + * This class does nothing else. + +@ingroup Stats + */ +template +class eoFDCFileSnapshot : public eoFileSnapshot // is an eoMonitor +{ +public: + /** Ctor: in addition to the parameters of the ctor of an eoFileSnapshot + we need here an eoFDCStat. The 2 std::vectors (distances to optimum + and fitnesses) are added to the monitor so they can be processed + later to a file - and eventually by gnuplot + */ + eoFDCFileSnapshot(eoFDCStat & _FDCstat, + std::string _dirname = "tmpFDC", unsigned _frequency = 1, + std::string _filename = "FDC", std::string _delim = " "): + eoFileSnapshot(_dirname, _frequency, _filename, _delim), + FDCstat(_FDCstat) + { + eoFileSnapshot::add(FDCstat.theDist()); + eoFileSnapshot::add(FDCstat.theFit()); + } + + /** just to be sure the add method is not called further + */ + virtual void add(const eoParam& _param) + { throw std::runtime_error("eoFDCFileSnapshot::add(). Trying to add stats to an eoFDCFileSnapshot"); } + +private: + eoFDCStat & FDCstat; +}; + +#endif diff --git a/trunk/eo/src/utils/eoFeasibleRatioStat.h b/trunk/eo/src/utils/eoFeasibleRatioStat.h new file mode 100644 index 000000000..cbbe17386 --- /dev/null +++ b/trunk/eo/src/utils/eoFeasibleRatioStat.h @@ -0,0 +1,66 @@ +/* + +(c) 2010 Thales group + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; version 2 + of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: + Johann Dréo + +*/ + +#ifndef _eoFeasibleRatioStat_h_ +#define _eoFeasibleRatioStat_h_ + +#include + +#include +#include + +#include "eoStat.h" + +/** Ratio of the number of individuals with a feasible dual fitness in the population (@see eoDualFitness) + * + * @ingroup Stats + */ +template +class eoFeasibleRatioStat : public eoStat< EOT, double > +{ +public: + using eoStat::value; + + eoFeasibleRatioStat( std::string description = "FeasibleRatio" ) : eoStat( 0.0, description ) {} + + virtual void operator()( const eoPop & pop ) + { +#ifndef NDEBUG + assert( pop.size() > 0 ); + + double count = static_cast( std::count_if( pop.begin(), pop.end(), eoIsFeasible ) ); + double size = static_cast( pop.size() ); + double ratio = count/size; + eo::log << eo::xdebug << "eoFeasibleRatioStat: " << count << " / " << size << " = " << ratio << std::endl; + value() = ratio; +#else + value() = static_cast( std::count_if( pop.begin(), pop.end(), eoIsFeasible ) ) / static_cast( pop.size() ); +#endif + } + + virtual std::string className(void) const { return "eoFeasibleRatioStat"; } +}; + +#endif // _eoFeasibleRatioStat_h_ diff --git a/trunk/eo/src/utils/eoFileMonitor.cpp b/trunk/eo/src/utils/eoFileMonitor.cpp new file mode 100644 index 000000000..3cc96deb1 --- /dev/null +++ b/trunk/eo/src/utils/eoFileMonitor.cpp @@ -0,0 +1,89 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#include +#include +#include + +#include +#include +#include + +using namespace std; + +void eoFileMonitor::printHeader(std::ostream& os) +{ + iterator it = vec.begin(); + + os << (*it)->longName(); + + ++it; + + for (; it != vec.end(); ++it) + { + // use the longName of the eoParam for the header + os << delim.c_str() << (*it)->longName(); + } + os << std::endl; +} + +void eoFileMonitor::printHeader() +{ + // create file + ofstream os(filename.c_str()); + + if (!os) + { + string str = "eoFileMonitor could not open: " + filename; + throw runtime_error(str); + } + + printHeader(os); +} + +eoMonitor& eoFileMonitor::operator()(void) +{ + ofstream os(filename.c_str(), + overwrite ? + ios_base::out|ios_base::trunc // truncate + : + ios_base::out|ios_base::app // append + ); + + if (!os) + { + string str = "eoFileMonitor could not write to: " + filename; + throw runtime_error(str); + } + + if ( + header // we want to write headers + && firstcall // we do not want to write headers twice + && !keep // if we append to an existing file, headers are useless + && !overwrite // we do not want to write headers if the file is to be overwriten + ) { + printHeader(); + firstcall = false; + } + + return operator()(os); +} + +eoMonitor& eoFileMonitor::operator()(std::ostream& os) +{ + + iterator it = vec.begin(); + + os << (*it)->getValue(); + + for(++it; it != vec.end(); ++it) + { + os << delim.c_str() << (*it)->getValue(); + } + + os << std::endl; + + return *this; +} diff --git a/trunk/eo/src/utils/eoFileMonitor.h b/trunk/eo/src/utils/eoFileMonitor.h new file mode 100644 index 000000000..9438d25c3 --- /dev/null +++ b/trunk/eo/src/utils/eoFileMonitor.h @@ -0,0 +1,121 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFileMonitor.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef EO_eoFileMonitor_h +#define EO_eoFileMonitor_h + +#include +#include +#include + +#include "utils/eoMonitor.h" +#include "eoObject.h" + + +/** Prints statistics to file + +Modified the default behavior, so that it erases existing files. Can +be modified in the ctor. + +@version MS 25/11/00 +@ingroup Monitors +*/ +class eoFileMonitor : public eoMonitor +{ +public : + + /*! Constructor + * + * Try to create the file in writing mode, erasing it if asked. + * + * @param _filename complete filename to write to + * @param _delim delimiter string to use between each item of the registered vector (e.g. of eoStats) + * @param _keep_existing if true, overwrite any existing file with the same name prior to any output + * @param _header print the header (with the descriptions of registered eoStats) at the beginning of the file (WARNING: true will discards header printing) + * @param _overwrite if true, overwrite the existing file + */ + eoFileMonitor( + std::string _filename, + std::string _delim = " ", + bool _keep_existing = false, + bool _header = false, + bool _overwrite = false + ) + : filename(_filename), + delim(_delim), + keep(_keep_existing), + header(_header), + firstcall(true), + overwrite(_overwrite) + { + if (!_keep_existing) { + std::ofstream os (filename.c_str ()); + + if (!os) { + std::string str = "Error, eoFileMonitor could not open: " + filename; + throw std::runtime_error (str); + } + } // if ! keep + } + + //! Called first, try to open the file in append mode and write the header if asked + virtual eoMonitor& operator()(void); + + /*! Main call, normally called at each generation. + Write the content of the registered vector into the file, each item being separated by delim + */ + virtual eoMonitor& operator()(std::ostream& os); + + //! Try to open the file, and then call printHeader(file) + void printHeader(void); + + //! Print long names of the registered items, separated by delim. + virtual void printHeader(std::ostream& os); + + virtual std::string getFileName() { return filename;} + +private : + + //! complete filename to write to + std::string filename; + + //! delimiter to use between each write + std::string delim; + + //! should we append or create a new file + bool keep; + + //! printing header at begin of file? + bool header; + + //! flag to avoid calling twice operator()(void) + bool firstcall; + + //! erase the entire file prior to writing in it (mode eos_base:: + bool overwrite; +}; + +#endif diff --git a/trunk/eo/src/utils/eoFileSnapshot.h b/trunk/eo/src/utils/eoFileSnapshot.h new file mode 100644 index 000000000..cdd2e36cc --- /dev/null +++ b/trunk/eo/src/utils/eoFileSnapshot.h @@ -0,0 +1,200 @@ +//----------------------------------------------------------------------------- +// eoFileSnapshot.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFileSnapshot_h +#define _eoFileSnapshot_h + +#include +#include +#include + +#include +#include +#include + + +/** + Prints snapshots of fitnesses to a (new) file every N generations + +Assumes that the parameters that are passed to the monitor +(method add in eoMonitor.h) are eoValueParam > of same size. + +A dir is created and one file per snapshot is created there - +so you can later generate a movie! + +@todo The counter is handled internally, but this should be changed +so that you can pass e.g. an evalcounter (minor) + +I failed to templatize everything so that it can handle eoParam > +for any type T, simply calling their getValue method ... + +@ingroup Monitors +*/ +class eoFileSnapshot : public eoMonitor +{ +public : + typedef std::vector vDouble; + typedef eoValueParam > vDoubleParam; + + eoFileSnapshot(std::string _dirname, unsigned _frequency = 1, std::string _filename = "gen", + std::string _delim = " ", unsigned _counter = 0, bool _rmFiles = true): + dirname(_dirname), frequency(_frequency), + filename(_filename), delim(_delim), counter(_counter), boolChanged(true) + { + std::string s = "test -d " + dirname; + + int res = system(s.c_str()); + // test for (unlikely) errors + if ( (res==-1) || (res==127) ) + throw std::runtime_error("Problem executing test of dir in eoFileSnapshot"); + // now make sure there is a dir without any genXXX file in it + if (res) // no dir present + { + s = std::string("mkdir ")+dirname; + } + else if (!res && _rmFiles) + { + s = std::string("/bin/rm ")+dirname+ "/" + filename + "*"; + } + else + s = " "; + + res=system(s.c_str()); + // all done + } + + /** accessor: has something changed (for gnuplot subclass) + */ + virtual bool hasChanged() {return boolChanged;} + + /** accessor to the counter: needed by the gnuplot subclass + */ + unsigned getCounter() {return counter;} + + /** accessor to the current filename: needed by the gnuplot subclass + */ + std::string getFileName() {return currentFileName;} + + /** sets the current filename depending on the counter + */ + void setCurrentFileName() + { + std::ostringstream oscount; + oscount << counter; + currentFileName = dirname + "/" + filename + oscount.str(); + } + + /** The operator(void): opens the std::ostream and calls the write method + */ + eoMonitor& operator()(void) + { + if (counter % frequency) + { + boolChanged = false; // subclass with gnuplot will do nothing + counter++; + return (*this); + } + counter++; + boolChanged = true; + setCurrentFileName(); + std::ofstream os(currentFileName.c_str()); + + if (!os) + { + std::string str = "eoFileSnapshot: Could not open " + currentFileName; + throw std::runtime_error(str); + } + + return operator()(os); + } + + /** The operator(): write on an std::ostream + */ + eoMonitor& operator()(std::ostream& _os) + { + const eoValueParam > * ptParam = + static_cast >* >(vec[0]); + + const std::vector v = ptParam->value(); + if (vec.size() == 1) // only one std::vector: -> add number in front + { + for (unsigned k=0; k > vv(vec.size()); + vv[0]=v; + for (unsigned i=1; i >* >(vec[1]); + vv[i] = ptParam->value(); + if (vv[i].size() != v.size()) + throw std::runtime_error("Dimension error in eoSnapshotMonitor"); + } + for (unsigned k=0; k >*>(&_param)) + { + throw std::logic_error(std::string("eoFileSnapshot: I can only monitor std::vectors of doubles, sorry. The offending parameter name = ") + _param.longName()); + } + eoMonitor::add(_param); + } + +private : + std::string dirname; + unsigned frequency; + std::string filename; + std::string delim; + unsigned int counter; + std::string currentFileName; + bool boolChanged; +}; + +#endif + + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-offsets: ((c . 0)) +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/eo/src/utils/eoFuncPtrStat.h b/trunk/eo/src/utils/eoFuncPtrStat.h new file mode 100644 index 000000000..c77281577 --- /dev/null +++ b/trunk/eo/src/utils/eoFuncPtrStat.h @@ -0,0 +1,80 @@ +#ifndef eoFuncPtrStat_h +#define eoFuncPtrStat_h + +#include +#include + + + +/** Wrapper to turn any stand-alone function and into an eoStat. + * + * The function should take an eoPop as argument. + * + * @ingroup Stats + */ +template +class eoFuncPtrStat : public eoStat +{ +public : + typedef T (*func_t)(const eoPop&); + + + eoFuncPtrStat(func_t f, std::string _description = "func_ptr") + : eoStat(T(), _description), func(f) + {} + + using eoStat::value; + + void operator()(const eoPop& pop) { + value() = func(pop); + } + +private: + func_t func; +}; + +/** + * @ingroup Stats + */ +template +eoFuncPtrStat& makeFuncPtrStat( T (*func)(const eoPop&), eoFunctorStore& store, std::string description = "func") { + return store.storeFunctor( + new eoFuncPtrStat( func, description) + ); +} + +/** Wrapper to turn any stand-alone function and into an eoStat. + * + * The function should take an eoPop as argument. + * + * @ingroup Stats + */ +template +class eoFunctorStat : public eoStat +{ +public : + eoFunctorStat(eoUF< const eoPop&, T >& f, std::string _description = "functor") + : eoStat(T(), _description), func(f) + {} + + using eoStat::value; + + void operator()(const eoPop& pop) { + value() = func(pop); + } + +private: + eoUF< const eoPop&, T >& func; +}; + +/** + * @ingroup Stats + */ +template +eoFunctorStat& makeFunctorStat( eoUF< const eoPop&, T >& func, eoFunctorStore& store, std::string description = "func") { + return store.storeFunctor( + new eoFunctorStat( func, description) + ); +} + +#endif diff --git a/trunk/eo/src/utils/eoGenCounter.h b/trunk/eo/src/utils/eoGenCounter.h new file mode 100644 index 000000000..a06949c21 --- /dev/null +++ b/trunk/eo/src/utils/eoGenCounter.h @@ -0,0 +1,46 @@ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (c) Thales group 2011 + + Author: johann.dreo@thalesgroup.com + */ + +#ifndef _eoGenCounter_h +#define _eoGenCounter_h + +#include +#include + +/** + An eoStat that simply gives the current generation index + + @ingroup Stats +*/ +class eoGenCounter : public eoUpdater, public eoValueParam +{ +public: + eoGenCounter( unsigned int start = 0, std::string label = "Gen" ) : eoValueParam(start, label), _nb(start) {} + + virtual void operator()() + { + value() = _nb++; + } + +private: + unsigned int _nb; +}; + +#endif diff --git a/trunk/eo/src/utils/eoGnuplot.cpp b/trunk/eo/src/utils/eoGnuplot.cpp new file mode 100644 index 000000000..2905e6161 --- /dev/null +++ b/trunk/eo/src/utils/eoGnuplot.cpp @@ -0,0 +1,99 @@ +//----------------------------------------------------------------------------- +// (c) Marc Schoenauer, 2001 +// Copyright (C) 2005 Jochen Küpper +/* + This library is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + details. + + You should have received a copy of the GNU Lesser General Public License + along with this library; if not, write to the Free Software Foundation, Inc., + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +#include "eoGnuplot.h" + + +unsigned eoGnuplot::numWindow=0; + + + +eoGnuplot::eoGnuplot(std::string _title, std::string _extra) + : firstTime(true) +{ + initGnuPlot(_title, _extra); +} + + + +eoGnuplot::~eoGnuplot() +{ +#ifdef HAVE_GNUPLOT + if( gpCom ) { + PipeComSend( gpCom, "quit\n" ); + PipeComClose( gpCom ); + gpCom =NULL; + } +#endif +} + + + +void eoGnuplot::gnuplotCommand(const char *_command) +{ +#ifdef HAVE_GNUPLOT + if(gpCom) { + PipeComSend( gpCom, _command ); + PipeComSend( gpCom, "\n" ); + } +#endif +} + + + +void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) +{ +#ifdef HAVE_GNUPLOT + std::ostringstream os; + os << "250x150-0+" << 170 * numWindow++; + char *args[6]; + args[0] = strdup( GNUPLOT_PROGRAM ); + args[1] = strdup( "-geometry" ); + args[2] = strdup( os.str().c_str()); + args[3] = strdup( "-title" ); + args[4] = strdup( _title.c_str() ); + args[5] = 0; + gpCom = PipeComOpenArgv( GNUPLOT_PROGRAM, args ); + if(! gpCom ) + throw std::runtime_error("Cannot spawn gnuplot\n"); + else { + PipeComSend( gpCom, "set grid\n" ); + PipeComSend( gpCom, _extra.c_str() ); + PipeComSend( gpCom, "\n" ); + } +#endif +} + + + +// Local Variables: +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/eo/src/utils/eoGnuplot.h b/trunk/eo/src/utils/eoGnuplot.h new file mode 100644 index 000000000..783d44ccb --- /dev/null +++ b/trunk/eo/src/utils/eoGnuplot.h @@ -0,0 +1,101 @@ +//----------------------------------------------------------------------------- +// eoGnuplot1DMonitor.h +// (c) Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- +#ifndef EO_eoGnuplot_H +#define EO_eoGnuplot_H + +#include + +#include "pipecom.h" + + +/** Base class for calls to gnuplot + +This class is the abstract class that will be used by further gnuplot +calls to plots what is already written by some eoMonitor into a file + +@author Marc Schoenauer +@version 0.0 (2001) + +@ingroup Monitors +*/ +class eoGnuplot +{ +public: + + /** Open pipe to Gnuplot. + + @param _title Title for gnuplot window. + @param _extra Extra parameters to gnuplot (default to none: ""). + */ + eoGnuplot(std::string _title, std::string _extra = std::string("")); + + /** Destructor + + Close the gnuplot windows if pipe was correctly opened + */ + virtual ~eoGnuplot(); + + /** Class name */ + virtual std::string className() const + { return "eoGnuplot"; } + + /** Send command to gnuplot */ + void gnuplotCommand(const char * _command); + + /** Send command to gnuplot + + @overload + */ + void gnuplotCommand(std::string _command) + { gnuplotCommand(_command.c_str()); } + + +protected: + + /** Initialize gnuplot + + @param _title Title for gnuplot window. + @param _extra Extra parameters to gnuplot. + */ + void initGnuPlot(std::string _title, std::string _extra); + + /** The stats might be unknown in Ctor */ + bool firstTime; + + /** Communication with gnuplot OK */ + PCom *gpCom; + + /** Internal counter for gnuplot windows */ + static unsigned numWindow; +}; + + +#endif // EO_eoGnuplot_H + + + +// Local Variables: +// c-file-style: "Stroustrup" +// comment-column: 35 +// fill-column: 80 +// mode: C++ +// End: diff --git a/trunk/eo/src/utils/eoGnuplot1DMonitor.cpp b/trunk/eo/src/utils/eoGnuplot1DMonitor.cpp new file mode 100644 index 000000000..c0cff842c --- /dev/null +++ b/trunk/eo/src/utils/eoGnuplot1DMonitor.cpp @@ -0,0 +1,85 @@ +//----------------------------------------------------------------------------- +// eoGnuplot1DMonitor.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + +#include "utils/eoGnuplot1DMonitor.h" +#include "utils/eoParam.h" + + +eoMonitor& eoGnuplot1DMonitor::operator() (void) +{ + // update file using the eoFileMonitor + eoFileMonitor::operator()(); +#ifdef HAVE_GNUPLOT + // sends plot order to gnuplot + // assumes successive plots will have same nb of columns!!! + if (firstTime) + { + FirstPlot(); + firstTime = false; + } + else + { + if( gpCom ) { + PipeComSend( gpCom, "replot\n" ); + } + } +#endif + return *this; +} + + + +void eoGnuplot1DMonitor::FirstPlot() +{ + if (this->vec.size() < 2) + { + throw std::runtime_error("Must have some stats to plot!\n"); + } +#ifdef HAVE_GNUPLOT + std::ostringstream os; + os << "plot"; + for (unsigned i=1; ivec.size(); i++) { + os << " '" << getFileName().c_str() << + "' using 1:" << i+1 << " title '" << (this->vec[i])->longName() << "' with lines" ; + if (ivec.size()-1) + os << ", "; + } + os << '\n'; + PipeComSend( gpCom, os.str().c_str()); +#endif +} + + + +// Local Variables: +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/eo/src/utils/eoGnuplot1DMonitor.h b/trunk/eo/src/utils/eoGnuplot1DMonitor.h new file mode 100644 index 000000000..e32e22275 --- /dev/null +++ b/trunk/eo/src/utils/eoGnuplot1DMonitor.h @@ -0,0 +1,85 @@ +//----------------------------------------------------------------------------- +// eoGnuplot1DMonitor.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- +#ifndef EO_eoGnuplot1DMonitor_H +#define EO_eoGnuplot1DMonitor_H + +#include +#include + +#include "eoObject.h" +#include "utils/eoFileMonitor.h" +#include "utils/eoGnuplot.h" +#include "utils/pipecom.h" + +/** Plot eoStat + +@author Marc Schoenauer +@version 0.0 (2000) + +This class plots through gnuplot the eoStat given as argument + +eoGnuplot1DMonitor plots stats through gnuplot + +Assumes that the same file is appened every so and so, and replots it +everytime + +@ingroup Monitors +*/ +class eoGnuplot1DMonitor : public eoFileMonitor, public eoGnuplot +{ +public: + + // this "using" directive generates a compiler internal error in GCC 4.0.0 ... + // it's been removed, and the only call to vec was replaced by this->vec in eoGnuplot1DMonitor.cpp + // using eoMonitor::vec; + + /** Constructor */ + eoGnuplot1DMonitor(std::string _filename, bool _top=false) : + eoFileMonitor(_filename, " "), + eoGnuplot(_filename,(_top?"":"set key bottom")) + {} + + /** Destructor */ + virtual ~eoGnuplot1DMonitor(){} + + virtual eoMonitor& operator()(); + + virtual void FirstPlot(); + + /** Class name */ + virtual std::string className() const + { return "eoGnuplot1DMonitor"; } +}; + + +#endif // EO_eoGnuplot1DMonitor_H + + + +// Local Variables: +// c-file-style: "Stroustrup" +// comment-column: 35 +// fill-column: 80 +// mode: C++ +// End: diff --git a/trunk/eo/src/utils/eoGnuplot1DSnapshot.cpp b/trunk/eo/src/utils/eoGnuplot1DSnapshot.cpp new file mode 100644 index 000000000..b41477a22 --- /dev/null +++ b/trunk/eo/src/utils/eoGnuplot1DSnapshot.cpp @@ -0,0 +1,33 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "eoGnuplot1DSnapshot.h" + + + +eoMonitor& eoGnuplot1DSnapshot::operator()() +{ + // update file using the eoFileMonitor method + eoFileSnapshot::operator()(); +#ifdef HAVE_GNUPLOT + // sends plot order to gnuplot + std::ostringstream os; + os << "set title 'Gen. " << getCounter() << "'; plot '" + // mk: had to use getFilename().c_str(), + // because it seems the string(stream) lib is screwed in gcc3.2 + << getFileName().c_str() << "' notitle with points ps " << pointSize + << std::endl; + PipeComSend(gpCom, os.str().c_str()); +#endif + return *this; +} + + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-offsets: ((c . 0)) +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/eo/src/utils/eoGnuplot1DSnapshot.h b/trunk/eo/src/utils/eoGnuplot1DSnapshot.h new file mode 100644 index 000000000..38c5af745 --- /dev/null +++ b/trunk/eo/src/utils/eoGnuplot1DSnapshot.h @@ -0,0 +1,121 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGnuplot1DSnapshot.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + + +#ifndef EO_eoGnuplot1DSnapshot_H +#define EO_eoGnuplot1DSnapshot_H + +#include +#include +#include + +#include +#include "eoRealVectorBounds.h" +#include +#include +#include + +/** Plot stats through gnuplot + +@author Marc Schoenauer 2000 +@version 0.0 + +This class plots through gnuplot the eoStat given as argument + +Assumes that the same file is re-written every so and so, and plots it +from scratch everytime it's called + +@ingroup Monitors + */ +class eoGnuplot1DSnapshot: public eoFileSnapshot, public eoGnuplot +{ + public: + // Ctor + eoGnuplot1DSnapshot(std::string _dirname, unsigned _frequency = 1, + std::string _filename = "gen", std::string _delim = " ", + unsigned _counter = 0, bool _rmFiles = true) : + eoFileSnapshot(_dirname, _frequency, _filename, _delim, _counter, _rmFiles), + eoGnuplot(_filename,"set data style points"), + pointSize(5) + {} + + // Ctor + eoGnuplot1DSnapshot(std::string _dirname, eoRealVectorBounds & _bounds, + unsigned _frequency = 1, std::string _filename = "gen", + std::string _delim = " ", unsigned _counter = 0, bool _rmFiles = true ) : + eoFileSnapshot(_dirname, _frequency, _filename, _delim, _counter, _rmFiles), + eoGnuplot(_filename,"set data style points"), + pointSize(5) + { + handleBounds(_bounds); + } + // Ctor + eoGnuplot1DSnapshot(eoFileSnapshot & _fSnapshot) : + eoFileSnapshot(_fSnapshot), + eoGnuplot(_fSnapshot.baseFileName(),"set data style points"), + pointSize(5) + {} + + // Ctor with range + eoGnuplot1DSnapshot(eoFileSnapshot & _fSnapshot, eoRealVectorBounds & _bounds) : + eoFileSnapshot(_fSnapshot), + eoGnuplot(_fSnapshot.baseFileName(),"set data style points"), + pointSize(5) + { + handleBounds(_bounds); + } + + // Dtor + virtual ~eoGnuplot1DSnapshot(){} + + virtual eoMonitor& operator()(); + + /// Class name. + virtual std::string className() const { return "eoGnuplot1DSnapshot"; } + + virtual void handleBounds(eoRealVectorBounds & _bounds) + { + std::ostringstream os; + os << "set autoscale\nset yrange [" ; + if (_bounds.isMinBounded(0)) + os << _bounds.minimum(0); + os << ":" ; + if (_bounds.isMaxBounded(0)) + os << _bounds.maximum(0); + os << "]\n"; + gnuplotCommand(os.str()); + } + + void setPointSize(unsigned _pointSize) + { pointSize = _pointSize; } + +protected: + + unsigned pointSize; +}; + + +#endif diff --git a/trunk/eo/src/utils/eoHowMany.h b/trunk/eo/src/utils/eoHowMany.h new file mode 100644 index 000000000..1105f3b73 --- /dev/null +++ b/trunk/eo/src/utils/eoHowMany.h @@ -0,0 +1,205 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoHowMany_h.h +// Base class for choosing a number of guys to apply something from a popsize +// (c) Marc Schoenauer, 2000 +// (c) Thales group, 2010 (Johann Dréo ) + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +*/ +//----------------------------------------------------------------------------- + +#ifndef eoHowMany_h +#define eoHowMany_h + +#include + +#include + + +/** A helper class, to determine a number of individuals from another one + * Typically, is used in selection / replacement procedures, e.g. + * the number of offspring from the number of parents, or + * the number of survivors for an eoReduce functor, ... + * + * Such construct is very useful because in some cases you might not know the + * population size that will enter the replacement. For instance, you + * cannot simply have a pre-computed (double) rate of 1/popSize + * if you want to select or kill just 1 guy. Using an eoHowMany + * allows one to modify the population size without touching anything else. + * + * There are 4 possible way to compute the return value from the argument: + * - an absolute POSITIVE integer --> return it (regardless of popsize) + * - a POSITIVE rate --> return rate*popSize + * - an absolute NEGATIVE integer --> return popsize-rate (if positive) + * - a NEGATIVE rate in [-1,0] --> store and use 1-|rate| (positive) + * Note that a negative rate should be have been necessary because a rate is + * relative, but it is there for consistency reasons - and because it + * is needed in eoG3Replacement + * + * It has 2 private members, a double and an integer to cover all cases + * + * Example use: in eoGeneralBreeder.h + * Example reading from parser: in + * do/make_algo_scalar.h line 141 + + * MS 10/04/2002: + * Added the possibility to have a negative number - + * when treated as a number: returns then (size - count) + * Should not modify anything when a positive number is passed in the ctor + * + * MS 20/06/2002: + * Added the negative rate and the operator-() (for + * eoG3Repalcement) + * + * It is an eoPersistent because we need to be able to use eoParamValue + * + * @ingroup Core + */ +class eoHowMany : public eoPersistent +{ +public: + /** Original Ctor from direct rate + bool + @param _rate the rate, OR the integer to store, depending on 2nd arg. + @param _interpret_as_rate to tell whether the rate actually is a rate + */ + eoHowMany(double _rate = 0.0, bool _interpret_as_rate = true): + rate(_rate), count(0) + { + if (_interpret_as_rate) + { + if (_rate<0) + { + rate = 1.0+_rate; + if (rate < 0) // was < -1 + throw std::logic_error("rate<-1 in eoHowMany!"); + } + } + else + { + rate = 0.0; // just in case, but shoud be unused + count = int(_rate); // negative values are allowed here + if (count != _rate) + eo::log << eo::warnings << "Number was rounded in eoHowMany"; + } + } + + /** Ctor from an int - both from int and unsigned int are needed + * to avoid ambiguity with the Ctor from a double */ + eoHowMany(int _count) : rate(0.0), count(_count) {} + + /** Ctor from an unsigned int - both from int and unsigned int are needed + * to avoid ambiguity with the Ctor from a double */ + eoHowMany(unsigned int _count) : rate(0.0), count(_count) {} + + /// Virtual dtor. They are needed in virtual class hierarchies. + virtual ~eoHowMany() {} + + /** Does what it was designed for + * - count==0 : return rate*_size + * - else + * - count>0 : return count (regardless of _size) + * - count<0 : return _size-|count| + */ + unsigned int operator()(unsigned int _size) + { + if (count == 0) + { + unsigned int res = static_cast( std::ceil( rate * _size ) ); + + if( res == 0 ) { + eo::log << eo::warnings << "Call to a eoHowMany instance returns 0 (rate=" << rate << ", size=" << _size << ")" << std::endl; + } + + return res; + } + if (count < 0) + { + unsigned int combloc = -count; + if (_size> value; + readFrom(value); + return; + } + + void readFrom(std::string _value) + { + // check for % + bool interpret_as_rate = false; // == no % + size_t pos = _value.find('%'); + if (pos < _value.size()) // found a % + { + interpret_as_rate = true; + _value.resize(pos); // get rid of % + } + + std::istringstream is(_value); + is >> rate; + // now store + if (interpret_as_rate) + { + count = 0; + rate /= 100.0; + } + else + count = int(rate); // and rate will not be used + + // minimal check + if ( rate < 0.0 ) + throw std::runtime_error("Negative rate read in eoHowMany::readFrom"); + } + + /** The unary - operator: reverses the computation */ + eoHowMany operator-() + { + if (!count) // only rate is used + rate = 1.0-rate; + else + count = -count; + return (*this); + } + +private : + double rate; + int count; +}; + + + +#endif diff --git a/trunk/eo/src/utils/eoIntBounds.cpp b/trunk/eo/src/utils/eoIntBounds.cpp new file mode 100644 index 000000000..11cd942d2 --- /dev/null +++ b/trunk/eo/src/utils/eoIntBounds.cpp @@ -0,0 +1,98 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include + +#include "eoIntBounds.h" + + +// the global dummy bounds +// (used for unbounded variables when bounds are required) +eoIntNoBounds eoDummyIntNoBounds; + +///////////// helper read functions defined in eoRealBounds.cpp +extern bool remove_leading(std::string & _s, const std::string _delim); +extern double read_double(std::string _s); +extern long int read_int(std::string _s); + + +/** the constructor for eoGeneralIntBound - from a string + */ +eoIntBounds* eoGeneralIntBounds::getBoundsFromString(std::string _value) +{ + // now read + std::string delim(",; "); + std::string beginOrClose("[(])"); + if (!remove_leading(_value, delim)) // only delimiters were left + throw std::runtime_error("Syntax error in eoGeneralIntBounds Ctor"); + + // look for opening char + size_t posDeb = _value.find_first_of(beginOrClose); // allow ]a,b] + if (posDeb >= _value.size()) // nothing left to read + throw std::runtime_error("Syntax error in eoGeneralIntBounds Ctor"); + + // ending char: next {}() after posDeb + size_t posFin = _value.find_first_of(beginOrClose,posDeb+1); + if (posFin >= _value.size()) // not found + throw std::runtime_error("Syntax error in eoGeneralIntBounds Ctor"); + + // the bounds + std::string sBounds = _value.substr(posDeb+1, posFin-posDeb-1); + // and remove from original string + _value = _value.substr(posFin+1); + + remove_leading(sBounds, delim); + size_t posDelim = sBounds.find_first_of(delim); + if (posDelim >= sBounds.size()) + throw std::runtime_error("Syntax error in eoGeneralIntBounds Ctor"); + + bool minBounded=false, maxBounded=false; + long int minBound=0, maxBound=0; + + // min bound + std::string sMinBounds = sBounds.substr(0,posDelim); + + if ( (sMinBounds != std::string("-inf")) && + (sMinBounds != std::string("-infinity")) + ) + { + minBounded = true; + minBound = read_int(sMinBounds); + } + + // max bound + size_t posEndDelim = sBounds.find_first_not_of(delim,posDelim); + + std::string sMaxBounds = sBounds.substr(posEndDelim); + + if ( (sMaxBounds != std::string("+inf")) && + (sMaxBounds != std::string("+infinity")) + ) + { + maxBounded = true; + maxBound = read_int(sMaxBounds); + } + + // now create the embedded eoIntBounds object + eoIntBounds * locBound; + if (minBounded && maxBounded) + { + if (maxBound <= minBound) + throw std::runtime_error("Syntax error in eoGeneralIntBounds Ctor"); + locBound = new eoIntInterval(minBound, maxBound); + } + else if (!minBounded && !maxBounded) // no bound at all + locBound = new eoIntNoBounds; + else if (!minBounded && maxBounded) + locBound = new eoIntAboveBound(maxBound); + else if (minBounded && !maxBounded) + locBound = new eoIntBelowBound(minBound); + return locBound; +} diff --git a/trunk/eo/src/utils/eoIntBounds.h b/trunk/eo/src/utils/eoIntBounds.h new file mode 100644 index 000000000..2127c92f7 --- /dev/null +++ b/trunk/eo/src/utils/eoIntBounds.h @@ -0,0 +1,729 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoIntBounds.h +// (c) Marc Schoenauer 2001, Maarten Keijzer 2000, GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoIntBounds_h +#define _eoIntBounds_h + +#include // std::exceptions! +#include + +/** +\class eoIntBounds eoIntBounds.h es/eoIntBounds.h +\ingroup Real +\ingroup Bounds + + Defines bound classes for real numbers. + +Scalar type: +------------ +Basic class is eoIntBounds, a pure virtual. + +The following pure virtual methods are to be used in mutations: +- void foldsInBounds(long int &) that folds any value that falls out of + the bounds back into the bounds, by bouncing on the limit (if any) +- bool isInBounds(long int) that simply says whether or not the argument + is in the bounds +- void truncate(long int &) that set the argument to the bound value it +it exceeds it + +So mutation can choose +- iterate trying until they fall in bounds, +- only try once and "restd::pair" by using the foldsInBounds method +- only try once and restd::pair using the truncate method (will create a + huge bias toward the bound if the soluiton is not far from the bounds) + +There is also a uniform() method that generates a uniform value +(if possible, i.e. if bounded) in the interval. + +Derived class are +eoIntInterval that holds a minimum and maximum value, +eoIntNoBounds the "unbounded bounds" (-infinity, +infinity) +eoIntBelowBound the half-bounded interval [min, +infinity) +eoIntAboveBound the half-bounded interval (-infinity, max] + +THis file also contains the declaration of *the* global object that +is the unbounded bound +*/ +class eoIntBounds : public eoPersistent +{ +public: + virtual ~eoIntBounds(){} + + /** Self-Test: true if ***both*** a min and a max + */ + virtual bool isBounded(void) const = 0; + + /** Self-Test: true if no min ***and*** no max + * hence no further need to test/truncate/fold anything + */ + virtual bool hasNoBoundAtAll(void) const = 0; + + /** Self-Test: bounded from below??? + */ + virtual bool isMinBounded(void) const = 0; + + /** Self-Test: bounded from above??? + */ + virtual bool isMaxBounded(void) const = 0; + + /** Test on a value: is it in bounds? + */ + virtual bool isInBounds(double) const = 0; + + /** Put value back into bounds - by folding back and forth + */ + virtual void foldsInBounds(double &) const = 0; + + /** foldsInBounds for ints: + * call the method for double and convert back */ + virtual void foldsInBounds(long int & i) const + { + double r = double(i); + foldsInBounds(r); + i = (long int)(r); + } + + /** Put value back into bounds - by truncating to a boundary value + */ + virtual void truncate(double &) const = 0; + + /** truncate for ints: call the method for double and convert back + */ + virtual void truncate(long int & i) const + { + double r = double(i); + truncate(r); + i = (long int)(r); + } + + /** get minimum value + * std::exception if does not exist + */ + virtual long int minimum() const = 0 ; + /** get maximum value + * std::exception if does not exist + */ + virtual long int maximum() const = 0 ; + /** get range + * std::exception if unbounded + */ + virtual long int range() const = 0; + + /** random generator of uniform numbers in bounds + * uses same naming convention than eo::rng + * std::exception if unbounded + */ + virtual double uniform(eoRng & _rng = eo::rng) const = 0; + virtual long int random(eoRng & _rng = eo::rng) const = 0; + + /** for memory managements - ugly */ + virtual eoIntBounds * dup() const = 0; +}; + +/** A default class for unbounded variables + * + * @ingroup Real + * @ingroup Bounds + */ +class eoIntNoBounds : public eoIntBounds +{ +public: + virtual ~eoIntNoBounds(){} + + virtual bool isBounded(void) const {return false;} + virtual bool hasNoBoundAtAll(void) const {return true;} + virtual bool isMinBounded(void) const {return false;} + virtual bool isMaxBounded(void) const {return false;} + virtual void foldsInBounds(double &) const {return;} + virtual void truncate(double &) const {return;} + virtual bool isInBounds(double) const {return true;} + + virtual long int minimum() const + { + throw std::logic_error("Trying to get minimum of unbounded eoIntBounds"); + } + virtual long int maximum() const + { + throw std::logic_error("Trying to get maximum of unbounded eoIntBounds"); + } + virtual long int range() const + { + throw std::logic_error("Trying to get range of unbounded eoIntBounds"); + } + + virtual double uniform(eoRng & _rng = eo::rng) const + { + (void)_rng; + + throw std::logic_error("Trying to generate uniform values in unbounded eoIntBounds"); + } + + virtual long int random(eoRng & _rng = eo::rng) const + { + (void)_rng; + + throw std::logic_error("Trying to generate uniform values in unbounded eoIntBounds"); + } + + // methods from eoPersistent + /** + * Read object. + * @param _is A std::istream. + * but reading should not be done here, because of bound problems + * see eoIntVectorBounds + */ + virtual void readFrom(std::istream& _is) + { + (void)_is; + + throw std::runtime_error("Should not use eoIntBounds::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + _os << "[-inf,+inf]"; + } + + /** for memory managements - ugly */ + virtual eoIntBounds * dup() const + { + return new eoIntNoBounds(*this); + } + +}; + +/** one object for all - see eoIntBounds.cpp + * + * @ingroup Real + * @ingroup Bounds + */ +extern eoIntNoBounds eoDummyIntNoBounds; + +/** + * fully bounded eoIntBound == interval + * + * @ingroup Real + * @ingroup Bounds + */ +class eoIntInterval : public eoIntBounds +{ +public : + virtual ~eoIntInterval(){} + + /** + Simple bounds = minimum and maximum (allowed) + */ + eoIntInterval(long int _min=0, long int _max=1) : + repMinimum(_min), repMaximum(_max), repRange(_max-_min) + { + if (repRange<=0) + throw std::logic_error("Void range in eoIntBounds"); + } + + // accessors + virtual long int minimum() const { return repMinimum; } + virtual long int maximum() const { return repMaximum; } + virtual long int range() const { return repRange; } + + // description + virtual bool isBounded(void) const {return true;} + virtual bool hasNoBoundAtAll(void) const {return false;} + virtual bool isMinBounded(void) const {return true;} + virtual bool isMaxBounded(void) const {return true;} + + virtual double uniform(eoRng & _rng = eo::rng) const + { + return repMinimum + _rng.uniform(repRange); + } + + virtual long int random(eoRng & _rng = eo::rng) const + { + return repMinimum + _rng.random(repRange); + } + + // says if a given double is within the bounds + virtual bool isInBounds(double _r) const + { + if (_r < repMinimum) + return false; + if (_r > repMaximum) + return false; + return true; + } + + // folds a value into bounds + virtual void foldsInBounds(double & _r) const + { + long iloc; + double dlargloc = 2 * range() ; + + if (fabs(_r) > 1.0E9) // iloc too large! + { + _r = uniform(); + return; + } + + if ( (_r > maximum()) ) + { + iloc = (long) ( (_r-minimum()) / dlargloc ) ; + _r -= dlargloc * iloc ; + if ( _r > maximum() ) + _r = 2*maximum() - _r ; + } + + if (_r < minimum()) + { + iloc = (long) ( (maximum()-_r) / dlargloc ) ; + _r += dlargloc * iloc ; + if (_r < minimum()) + _r = 2*minimum() - _r ; + } + } + + // truncates to the bounds + virtual void truncate(double & _r) const + { + if (_r < repMinimum) + _r = repMinimum; + else if (_r > repMaximum) + _r = repMaximum; + return; + } + + // methods from eoPersistent + /** + * Read object. + * @param _is A std::istream. + * but reading should not be done here, because of bound problems + * see eoIntVectorBounds + */ + virtual void readFrom(std::istream& _is) + { + (void)_is; + + throw std::runtime_error("Should not use eoIntInterval::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + _os << "[" << repMinimum << "," << repMaximum << "]"; + } + + /** for memory managements - ugly */ + virtual eoIntBounds * dup() const + { + return new eoIntInterval(*this); + } + +private : + long int repMinimum; + long int repMaximum; + long int repRange; // to minimize operations ??? +}; + +/** + * an eoIntBound bounded from below only + * + * @ingroup Real + * @ingroup Bounds + */ +class eoIntBelowBound : public eoIntBounds +{ +public : + virtual ~eoIntBelowBound(){} + /** + Simple bounds = minimum + */ + eoIntBelowBound(long int _min=0) : + repMinimum(_min) + {} + + // accessors + virtual long int minimum() const { return repMinimum; } + + virtual long int maximum() const + { + throw std::logic_error("Trying to get maximum of eoIntBelowBound"); + } + virtual long int range() const + { + throw std::logic_error("Trying to get range of eoIntBelowBound"); + } + + virtual double uniform(eoRng & _rng = eo::rng) const + { + (void)_rng; + + throw std::logic_error("Trying to generate uniform values in eoIntBelowBound"); + } + + virtual long int random(eoRng & _rng = eo::rng) const + { + (void)_rng; + + throw std::logic_error("Trying to generate uniform values in eoIntBelowBound"); + } + + // description + virtual bool isBounded(void) const {return false;} + virtual bool hasNoBoundAtAll(void) const {return false;} + virtual bool isMinBounded(void) const {return true;} + virtual bool isMaxBounded(void) const {return false;} + + // says if a given double is within the bounds + virtual bool isInBounds(double _r) const + { + if (_r < repMinimum) + return false; + return true; + } + + // folds a value into bounds + virtual void foldsInBounds(double & _r) const + { + // easy as a pie: symmetry w.r.t. minimum + if (_r < repMinimum) // nothing to do otherwise + _r = 2*repMinimum - _r; + return ; + } + + // truncates to the bounds + virtual void truncate(double & _r) const + { + if (_r < repMinimum) + _r = repMinimum; + return; + } + + // methods from eoPersistent + /** + * Read object. + * @param _is A std::istream. + * but reading should not be done here, because of bound problems + * see eoIntVectorBounds + */ + virtual void readFrom(std::istream& _is) + { + (void)_is; + + throw std::runtime_error("Should not use eoIntBelowBound::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + _os << "[" << repMinimum << ",+inf]"; + } + + /** for memory managements - ugly */ + virtual eoIntBounds * dup() const + { + return new eoIntBelowBound(*this); + } + +private : + long int repMinimum; +}; + +/** +An eoIntBound bounded from above only + * + * @ingroup Real + * @ingroup Bounds +*/ +class eoIntAboveBound : public eoIntBounds +{ +public : + virtual ~eoIntAboveBound(){} + + /** + Simple bounds = minimum + */ + eoIntAboveBound(long int _max=0) : + repMaximum(_max) + {} + + // accessors + virtual long int maximum() const { return repMaximum; } + + virtual long int minimum() const + { + throw std::logic_error("Trying to get minimum of eoIntAboveBound"); + } + virtual long int range() const + { + throw std::logic_error("Trying to get range of eoIntAboveBound"); + } + + virtual double uniform(eoRng & _rng = eo::rng) const + { + (void)_rng; + + throw std::logic_error("Trying to generate uniform values in eoIntAboveBound"); + } + + virtual long int random(eoRng & _rng = eo::rng) const + { + (void)_rng; + + throw std::logic_error("Trying to generate uniform values in eoIntAboveBound"); + } + + // description + virtual bool isBounded(void) const {return false;} + virtual bool hasNoBoundAtAll(void) const {return false;} + virtual bool isMinBounded(void) const {return false;} + virtual bool isMaxBounded(void) const {return true;} + + // says if a given double is within the bounds + virtual bool isInBounds(double _r) const + { + if (_r > repMaximum) + return false; + return true; + } + + // folds a value into bounds + virtual void foldsInBounds(double & _r) const + { + // easy as a pie: symmetry w.r.t. maximum + if (_r > repMaximum) // nothing to do otherwise + _r = 2*repMaximum - _r; + return ; + } + + // truncates to the bounds + virtual void truncate(double & _r) const + { + if (_r > repMaximum) + _r = repMaximum; + return; + } + + // methods from eoPersistent + /** + * Read object. + * @param _is A std::istream. + * but reading should not be done here, because of bound problems + * see eoIntVectorBounds + */ + virtual void readFrom(std::istream& _is) + { + (void)_is; + + throw std::runtime_error("Should not use eoIntAboveBound::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + _os << "[-inf," << repMaximum << "]"; + } + + /** for memory managements - ugly */ + virtual eoIntBounds * dup() const + { + return new eoIntAboveBound(*this); + } + +private : + long int repMaximum; +}; + +//////////////////////// tentative for a general BOUND class that is constructed from a string + +/** A class that encapsulate all possible eoIntBounds. + * Mandatory in order to read through the parser + * + * @ingroup Real + * @ingroup Bounds + */ +class eoGeneralIntBounds : public eoIntBounds +{ +public: + /** Ctor: from a string, chooses the type of bound */ + eoGeneralIntBounds(std::string _s = "[-infinity,+infinity]") + { + repBound = getBoundsFromString(_s); + } + + /** Need a Cpy Ctor because we are allocating memory */ + eoGeneralIntBounds(const eoGeneralIntBounds & _b) : eoIntBounds(_b) + { + // replicate the embedded bound (I'm pretty sure there is another + // way to do that !!! + + bool minBounded = _b.isMinBounded(); + bool maxBounded = _b.isMaxBounded(); + long int minimum, maximum; + const eoIntBounds & bb = _b.theBounds(); + if (minBounded) minimum = bb.minimum(); + if (maxBounded) maximum = bb.maximum(); + + if (minBounded && maxBounded) + repBound = new eoIntInterval(minimum, maximum); + else if (!minBounded && !maxBounded) // no bound at all + repBound = new eoIntNoBounds; + else if (!minBounded && maxBounded) + repBound = new eoIntAboveBound(maximum); + else if (minBounded && !maxBounded) + repBound = new eoIntBelowBound(minimum); + } + + eoGeneralIntBounds& operator=(const eoGeneralIntBounds& _b) + { + // replicate the embedded bound (I'm pretty sure there is another + // way to do that !!! + + bool minBounded = _b.isMinBounded(); + bool maxBounded = _b.isMaxBounded(); + long int minimum, maximum; + const eoIntBounds & bb = _b.theBounds(); + if (minBounded) minimum = bb.minimum(); + if (maxBounded) maximum = bb.maximum(); + + // first delete the embedded bounds if necessary + if (repBound) + delete repBound; + // now reallocate + if (minBounded && maxBounded) + repBound = new eoIntInterval(minimum, maximum); + else if (!minBounded && !maxBounded) // no bound at all + repBound = new eoIntNoBounds; + else if (!minBounded && maxBounded) + repBound = new eoIntAboveBound(maximum); + else if (minBounded && !maxBounded) + repBound = new eoIntBelowBound(minimum); + return (*this); + } + + + /** Need a Dtor because we allocate an actual bound */ + ~eoGeneralIntBounds() + { + delete repBound; + } + + ///// and now all methods from the embedded bounds + /** Self-Test: true if ***both*** a min and a max + */ + virtual bool isBounded(void) const {return repBound->isBounded();} + + /** Self-Test: true if no min ***and*** no max + * hence no further need to test/truncate/fold anything + */ + virtual bool hasNoBoundAtAll(void) const {return repBound->hasNoBoundAtAll();} + + /** Self-Test: bounded from below??? + */ + virtual bool isMinBounded(void) const {return repBound->isMinBounded();} + + /** Self-Test: bounded from above??? + */ + virtual bool isMaxBounded(void) const {return repBound->isMaxBounded();} + + /** Test on a value: is it in bounds? + */ + virtual bool isInBounds(double _x) const {return repBound->isInBounds(_x);} + + /** Put value back into bounds - by folding back and forth + */ + virtual void foldsInBounds(double & _x) const {return repBound->foldsInBounds(_x);} + + /** Put value back into bounds - by truncating to a boundary value + */ + virtual void truncate(double & _x) const {return repBound->truncate(_x);} + + /** get minimum value + * std::exception if does not exist + */ + virtual long int minimum() const {return repBound->minimum();} + /** get maximum value + * std::exception if does not exist + */ + virtual long int maximum() const {return repBound->maximum();} + /** get range + * std::exception if unbounded + */ + virtual long int range() const {return repBound->range();} + + /** random generator of uniform doubles in bounds + * std::exception if unbounded + */ + virtual double uniform(eoRng & _rng = eo::rng) const {(void)_rng; return repBound->uniform();} + + /** random generator of uniform ints in bounds + * std::exception if unbounded + */ + virtual long int random(eoRng & _rng = eo::rng) const {(void)_rng; return repBound->random();} + + /** for memory managements - ugly */ + virtual eoIntBounds * dup() const {return repBound->dup();} + + /** for efficiency, it's better to use the embedded boud directly */ + const eoIntBounds & theBounds() const { return *repBound;} + + /** don't forget the printOn method - + * again that of the embedded bound + */ + virtual void printOn(std::ostream& _os) const + { + repBound->printOn(_os); + } + + /** no readFrom ??? Have to check that later */ + virtual void readFrom(std::istream& _is) + { + std::string s; + _is >> s; + if (repBound) + delete repBound; + repBound = getBoundsFromString(s); + } + +private: + // reading from a string + eoIntBounds * getBoundsFromString(std::string); + + eoIntBounds * repBound; +}; + + +#endif diff --git a/trunk/eo/src/utils/eoLogger.cpp b/trunk/eo/src/utils/eoLogger.cpp new file mode 100644 index 000000000..f052d7955 --- /dev/null +++ b/trunk/eo/src/utils/eoLogger.cpp @@ -0,0 +1,225 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/* + +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Johann Dréo +Caner Candan + +*/ + +#ifdef _WIN32 +#include +#else // _WIN32 +#include +#endif // ! _WIN32 + +#include +#include +#include // used to define EOF + +#include + +#include "eoLogger.h" + +void eoLogger::_init() +{ + _standard_io_streams[&std::cout] = 1; + _standard_io_streams[&std::clog] = 2; + _standard_io_streams[&std::cerr] = 2; + + // /!\ If you want to add a level dont forget to add it at the header file in the enumerator Levels + + addLevel("quiet", eo::quiet); + addLevel("errors", eo::errors); + addLevel("warnings", eo::warnings); + addLevel("progress", eo::progress); + addLevel("logging", eo::logging); + addLevel("debug", eo::debug); + addLevel("xdebug", eo::xdebug); +} + +eoLogger::eoLogger() : + std::ostream(&_obuf), + + _verbose("quiet", "verbose", "Set the verbose level", 'v'), + _printVerboseLevels(false, "print-verbose-levels", "Print verbose levels", 'l'), + _output("", "output", "Redirect a standard output to a file", 'o'), + + _selectedLevel(eo::progress), + _contextLevel(eo::quiet), + _fd(2), + _obuf(_fd, _contextLevel, _selectedLevel) +{ + _init(); +} + +eoLogger::eoLogger(eo::file file) : + std::ostream(&_obuf), + + _verbose("quiet", "verbose", "Set the verbose level", 'v'), + _printVerboseLevels(false, "print-verbose-levels", "Print verbose levels", 'l'), + _output("", "output", "Redirect a standard output to a file", 'o'), + + _selectedLevel(eo::progress), + _contextLevel(eo::quiet), + _fd(2), + _obuf(_fd, _contextLevel, _selectedLevel) +{ + _init(); + *this << file; +} + +eoLogger::~eoLogger() +{ + if (_fd > 2) { ::close(_fd); } +} + +void eoLogger::_createParameters( eoParser& parser ) +{ + //------------------------------------------------------------------ + // we are saying to eoParser to create the parameters created above. + //------------------------------------------------------------------ + + std::string section("Logger"); + parser.processParam(_verbose, section); + parser.processParam(_printVerboseLevels, section); + parser.processParam(_output, section); + + //------------------------------------------------------------------ + + + //------------------------------------------------------------------ + // we're gonna redirect the log to the given filename if -o is used. + //------------------------------------------------------------------ + + if ( ! _output.value().empty() ) + { + eo::log << eo::file( _output.value() ); + } + + //------------------------------------------------------------------ + + + //------------------------------------------------------------------ + // we're gonna print the list of levels if -l parameter is used. + //------------------------------------------------------------------ + + if ( _printVerboseLevels.value() ) + { + eo::log.printLevels(); + } + + //------------------------------------------------------------------ +} + +std::string eoLogger::className() const +{ + return ("eoLogger"); +} + +void eoLogger::addLevel(std::string name, eo::Levels level) +{ + _levels[name] = level; + _sortedLevels.push_back(name); +} + +void eoLogger::printLevels() const +{ + std::cout << "Available verbose levels:" << std::endl; + + for (std::vector::const_iterator it = _sortedLevels.begin(), end = _sortedLevels.end(); + it != end; ++it) + { + std::cout << "\t" << *it << std::endl; + } + + ::exit(0); +} + +eoLogger& operator<<(eoLogger& l, const eo::Levels lvl) +{ + l._contextLevel = lvl; + return l; +} + +eoLogger& operator<<(eoLogger& l, eo::file f) +{ + l._fd = ::open(f._f.c_str(), O_WRONLY | O_APPEND | O_CREAT, 0644); + return l; +} + +eoLogger& operator<<(eoLogger& l, eo::setlevel v) +{ + l._selectedLevel = (v._lvl < 0 ? l._levels[v._v] : v._lvl); + return l; +} + +eoLogger& operator<<(eoLogger& l, std::ostream& os) +{ + if (l._standard_io_streams.find(&os) != l._standard_io_streams.end()) + { + l._fd = l._standard_io_streams[&os]; + } + return l; +} + +eoLogger::outbuf::outbuf(const int& fd, + const eo::Levels& contexlvl, + const eo::Levels& selectedlvl) + : _fd(fd), _contextLevel(contexlvl), _selectedLevel(selectedlvl) +{} + +int eoLogger::outbuf::overflow(int_type c) +{ + if (_selectedLevel >= _contextLevel) + { + if (_fd >= 0 && c != EOF) + { + ::write(_fd, &c, 1); + } + } + return c; +} + +namespace eo +{ + file::file(const std::string f) + : _f(f) + {} + + setlevel::setlevel(const std::string v) + : _v(v), _lvl((Levels)-1) + {} + + setlevel::setlevel(const Levels lvl) + : _v(std::string("")), _lvl(lvl) + {} +} + +void make_verbose(eoParser& parser) +{ + eo::log._createParameters( parser ); + + eo::log << eo::setlevel(eo::log._verbose.value()); +} + +eoLogger eo::log; diff --git a/trunk/eo/src/utils/eoLogger.h b/trunk/eo/src/utils/eoLogger.h new file mode 100644 index 000000000..e5faf8f34 --- /dev/null +++ b/trunk/eo/src/utils/eoLogger.h @@ -0,0 +1,288 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Johann Dréo +Caner Candan + +*/ + +/** @defgroup Logging Logging + * @ingroup Utilities + + Global logger for EO. + + Here's an example explaning how to use eoLogger: +\code + #include + + int main(int ac, char** av) + { + // We are declaring the usual eoParser class + eoParser parser(ac, av); + + // This call is important to allow -v parameter to change user level. + make_verbose(parser); + + // At this time we are switching to warning message and messages + // which are going to follow it are going to be warnings message too. + // These messages can be displayed only if the user level (sets with + // eo::setlevel function) is set to eo::warnings. + eo::log << eo::warnings; + + // With the following eo::file function we are defining that + // all future logs are going to this new file resource which is + // test.txt + eo::log << eo::file("test.txt") << "In FILE" << std::endl; + + // Now we are changing again the resources destination to cout which + // is the standard output. + eo::log << std::cout << "In COUT" << std::endl; + + // Here are 2 differents examples of how to set the errors user level + // in using either a string or an identifier. + eo::log << eo::setlevel("errors"); + eo::log << eo::setlevel(eo::errors); + + // Now we are writting a message, that will be displayed only if we are above the "quiet" level + eo::log << eo::quiet << "1) Must be in quiet mode to see that" << std::endl; + + // And so on... + eo::log << eo::setlevel(eo::warnings) << eo::warnings << "2) Must be in warnings mode to see that" << std::endl; + + eo::log << eo::setlevel(eo::logging); + + eo::log << eo::errors; + eo::log << "3) Must be in errors mode to see that"; + eo::log << std::endl; + + eo::log << eo::debug << 4 << ')' + << " Must be in debug mode to see that\n"; + + return 0; + } +\endcode + +@{ +*/ + +#ifndef eoLogger_h +#define eoLogger_h + +#include +#include +#include +#include + +#include "eoObject.h" +#include "eoParser.h" + +namespace eo +{ + /** + * Levels contents all the available levels in eoLogger + * + * /!\ If you want to add a level dont forget to add it at the implementation of the class eoLogger in the ctor + */ + enum Levels {quiet = 0, + errors, + warnings, + progress, + logging, + debug, + xdebug}; + + /** + * file + * this structure combined with the friend operator<< below is an easy way to select a file as output. + */ + struct file + { + file(const std::string f); + const std::string _f; + }; + + /** + * setlevel + * this structure combined with the friend operator<< below is an easy way to set a verbose level. + */ + struct setlevel + { + setlevel(const std::string v); + setlevel(const Levels lvl); + const std::string _v; + const Levels _lvl; + }; +} + +/** + * eoLogger + * Class providing a verbose management through EO + * Use of a global variable eo::log to easily use the logger like std::cout + */ +class eoLogger : public eoObject, + public std::ostream +{ +public: + //! default ctor + eoLogger(); + + //! overidded ctor in order to instanciate a logger with a file define in parameter + eoLogger(eo::file file); + + //! dtor + ~eoLogger(); + + //! common function for all eo objects + virtual std::string className() const; + + //! Print the available levels on the standard output + //! enablable with the option -l + void printLevels() const; + + /*! Returns the selected levels, that is the one asked by the user + * + * Use this function if you want to be able to compare selected levels to a given one, like: + * if( eo::log.getLevelSelected() >= eo::progress ) {...} + */ + inline eo::Levels getLevelSelected() const { return _selectedLevel; } + + /*! Returns the current level of the context + * the one given when you output message with the logger + */ + inline eo::Levels getLevelContext() const { return _contextLevel; } + +protected: + //! in order to add a level of verbosity + void addLevel(std::string name, eo::Levels level); + +private: + //! used by the function make_verbose in order to add options to specify the verbose level + void _createParameters( eoParser& ); + + //! used by the set of ctors to initiate some useful variables + void _init(); + +private: + /** + * outbuf + * this class inherits from std::streambuf which is used by eoLogger to write the buffer in an output stream + */ + class outbuf : public std::streambuf + { + public: + outbuf(const int& fd, const eo::Levels& contexlvl, const eo::Levels& selectedlvl); + protected: + virtual int overflow(int_type c); + private: + const int& _fd; + const eo::Levels& _contextLevel; + const eo::Levels& _selectedLevel; + }; + +private: + /** + * MapLevel is the type used by the map member _levels. + */ + typedef std::map MapLevel; + +public: + /** + * operator<< used there to set a verbose mode. + */ + //! in order to use stream style to define the context verbose level where the following logs will be saved + friend eoLogger& operator<<(eoLogger&, const eo::Levels); + + /** + * operator<< used there to set a filename through the class file. + */ + //! in order to use stream style to define a file to dump instead the standart output + friend eoLogger& operator<<(eoLogger&, eo::file); + + /** + * operator<< used there to set a verbose level through the class setlevel. + */ + //! in order to use stream style to define manually the verbose level instead using options + friend eoLogger& operator<<(eoLogger&, eo::setlevel); + + /** + * operator<< used there to be able to use std::cout to say that we wish to redirect back the buffer to a standard output. + */ + //! in order to use stream style to go back to a standart output defined by STL + //! and to get retro-compatibility + friend eoLogger& operator<<(eoLogger&, std::ostream&); + +private: + friend void make_verbose(eoParser&); + + eoValueParam _verbose; + eoValueParam _printVerboseLevels; + eoValueParam _output; + + /** + * _selectedLevel is the member storing verbose level setted by the user thanks to operator() + */ + eo::Levels _selectedLevel; + eo::Levels _contextLevel; + + /** + * _fd in storing the file descriptor at this place we can disable easily the buffer in + * changing the value at -1. It is used by operator <<. + */ + int _fd; + + /** + * _obuf std::ostream mandates to use a buffer. _obuf is a outbuf inheriting of std::streambuf. + */ + outbuf _obuf; + + /** + * _levels contains all the existing level order by position + */ + MapLevel _levels; + + /** + * _levelsOrder is just a list to keep the order of levels + */ + std::vector _sortedLevels; + + /** + * _standard_io_streams + */ + std::map< std::ostream*, int > _standard_io_streams; +}; +/** @example t-eoLogger.cpp + */ + +//! make_verbose gets level of verbose and sets it in eoLogger +void make_verbose(eoParser&); + +namespace eo +{ + /** + * log is an external global variable defined to easily use a same way than std::cout to write a log. + */ + extern eoLogger log; +} + +/** @} */ + +#endif // !eoLogger_h diff --git a/trunk/eo/src/utils/eoMOFitnessStat.h b/trunk/eo/src/utils/eoMOFitnessStat.h new file mode 100644 index 000000000..8e1b2d3fd --- /dev/null +++ b/trunk/eo/src/utils/eoMOFitnessStat.h @@ -0,0 +1,91 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoFitnessStat.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoFitnessStat_h +#define _eoFitnessStat_h + +#include + +/** + The fitnesses of a whole population, as a vector +*/ +template +class eoFitnessStat : public eoSortedStat > +{ +public : + + using eoSortedStat >::value; + + eoFitnessStat(std::string _description = "AllFitnesses") : + eoSortedStat >(std::vector(0), _description) {} + + virtual void operator()(const std::vector& _popPters) + { + value().resize(_popPters.size()); + for (unsigned i=0; i<_popPters.size(); i++) + value()[i] = _popPters[i]->fitness(); + } +}; + + +/** For multi-objective fitness, we need to translate a stat > + into a vector, so each objective gets a seperate stat +*/ +#ifdef _MSC_VER +// The follownig is needed to avoid some bug in Visual Studio 6.0 +typedef double PartFitDefault; +template +class eoMOFitnessStat : public eoSortedStat > +#else +template +class eoMOFitnessStat : public eoSortedStat > +#endif + +{ +public: + + using eoSortedStat >::value; + + /** Ctor: say what component you want + */ + eoMOFitnessStat(unsigned _objective, std::string _description = "MO-Fitness") : + eoSortedStat >(std::vector(0), _description), + objective(_objective) {} + + virtual void operator()(const std::vector& _popPters) + { + value().resize(_popPters.size()); + + for (unsigned i=0; i<_popPters.size(); i++) + { + value()[i] = _popPters[i]->fitness()[objective]; + } + } +private: + unsigned int objective; // The objective we're storing + +}; +#endif diff --git a/trunk/eo/src/utils/eoMonitor.h b/trunk/eo/src/utils/eoMonitor.h new file mode 100644 index 000000000..1c92e9c00 --- /dev/null +++ b/trunk/eo/src/utils/eoMonitor.h @@ -0,0 +1,80 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ + +#ifndef _eoMonitor_h +#define _eoMonitor_h + + +#include +#include +#include + +/** @defgroup Monitors Monitoring + * + * Monitors take a set of value parameters (eoValueParam) objects and + * output them on a given stream, file, pipe, etc. + * + * They can be called from within an eoCheckPoint, to print different values + * of parameters or of eoStat at each generation. + * + * @see eoCheckPoint + * @see eoStat + * @ingroup Utilities + */ + + +class eoParam; +template class eoCheckPoint; + +/** + The abstract monitor class is a std::vector of parameter pointers. Use + either push_back a pointer or add a reference to a parameter. + Derived classes will then implement the operator()(void) which + will stream or pipe the current values of the parameters to wherever you + want it streamed or piped to. + + @ingroup Monitors +*/ +class eoMonitor : public eoF +{ +public : + + virtual void lastCall() {} + + /** + Adds a parameter to the monitor. It is virtual so you can do some type checking + in derived classes if you must. + */ + virtual void add(const eoParam& _param) { vec.push_back(&_param); } + + virtual std::string className(void) const { return "eoMonitor"; } + + template + eoMonitor& addTo(eoCheckPoint& cp) { cp.add(*this); return *this; } + +protected : + typedef std::vector::iterator iterator; + std::vector vec; +}; + +#endif diff --git a/trunk/eo/src/utils/eoOStreamMonitor.cpp b/trunk/eo/src/utils/eoOStreamMonitor.cpp new file mode 100644 index 000000000..3365301e9 --- /dev/null +++ b/trunk/eo/src/utils/eoOStreamMonitor.cpp @@ -0,0 +1,58 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +//using namespace std; + +eoMonitor& eoOStreamMonitor::operator()(void) +{ + if (!out) { + std::string str = "eoOStreamMonitor: Could not write to the ooutput stream"; + throw std::runtime_error(str); + } + + if (firsttime) { + + eo::log << eo::debug << "First Generation" << std::endl; + + for (iterator it = vec.begin (); it != vec.end (); ++it) { + out << (*it)->longName (); + out << delim << std::left << std::setfill(fill) << std::setw(width); + } + out << std::endl; + + firsttime = false; + } // if firstime + + // ok, now the real saving. write out + //! @todo old verbose formatting, do we still need it? + /* + for (iterator it = vec.begin (); it != vec.end (); ++it) { + // name: value + out << (*it)->longName () << ": " << (*it)->getValue () << std::endl; + } // for it in vec + */ + + for (iterator it = vec.begin (); it != vec.end (); ++it) { + // value only + out << (*it)->getValue (); + out << delim << std::left << std::setfill(fill) << std::setw(width); + } // for it in vec + + out << std::endl; + eo::log << eo::debug << "End of Generation" << std::endl; + + return *this; +} diff --git a/trunk/eo/src/utils/eoOStreamMonitor.h b/trunk/eo/src/utils/eoOStreamMonitor.h new file mode 100644 index 000000000..b941b05f2 --- /dev/null +++ b/trunk/eo/src/utils/eoOStreamMonitor.h @@ -0,0 +1,72 @@ +/* + +(c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the Free + Software Foundation; version 2 of the license. + + This library is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along + with this library; if not, write to the Free Software Foundation, Inc., 59 + Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: + todos@geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + Johann Dréo +*/ + +#ifndef _eoOStreamMonitor_h_ +#define _eoOStreamMonitor_h_ + +#include +#include + +#include +#include +#include + +/** + Prints statistics to a given ostream. + + You can pass any instance of an ostream to the constructor, like, for example, std::clog. + + @ingroup Monitors +*/ +class eoOStreamMonitor : public eoMonitor +{ +public : + eoOStreamMonitor( std::ostream & _out, bool /*_verbose*/=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true) + { +#ifndef DEPRECATED_MESSAGES + eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release" << std::endl; +#pragma message "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release" +#endif // !DEPRECATED_MESSAGES + } + + eoOStreamMonitor( std::ostream & _out, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true) + {} + + eoMonitor& operator()(void); + + virtual std::string className(void) const { return "eoOStreamMonitor"; } + +private : + std::ostream & out; + std::string delim; + unsigned int width; + char fill; + bool firsttime; +}; + +#endif // _eoOStreamMonitor_h_ diff --git a/trunk/eo/src/utils/eoParallel.cpp b/trunk/eo/src/utils/eoParallel.cpp new file mode 100644 index 000000000..d9d09c38b --- /dev/null +++ b/trunk/eo/src/utils/eoParallel.cpp @@ -0,0 +1,115 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/* + +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Caner Candan + +*/ + +#include + +#include "eoParallel.h" +#include "eoLogger.h" + +eoParallel::eoParallel() : + _isEnabled( false, "parallelize-loop", "Enable memory shared parallelization into evaluation's loops", '\0' ), + _isDynamic( false, "parallelize-dynamic", "Enable dynamic memory shared parallelization", '\0' ), + _prefix( "results", "parallelize-prefix", "Here's the prefix filename where the results are going to be stored", '\0' ), + _nthreads( 0, "parallelize-nthreads", "Define the number of threads you want to use, nthreads = 0 means you want to use all threads available", '\0' ), + _enableResults( false, "parallelize-enable-results", "Enable the generation of results", '\0' ), + _doMeasure( false, "parallelize-do-measure", "Do some measures during execution", '\0' ), + _t_start(0) +{ +} + +eoParallel::~eoParallel() +{ +#ifdef _OPENMP + if ( doMeasure() ) + { + double _t_end = omp_get_wtime(); + eoLogger log; + log << eo::file("measure_" + prefix()) << _t_end - _t_start << std::endl; + } +#endif // !_OPENMP +} + +std::string eoParallel::className() const +{ + return "eoParallel"; +} + +std::string eoParallel::prefix() const +{ + std::string value( _prefix.value() ); + + if ( _isEnabled.value() ) + { + if ( _isDynamic.value() ) + { + value += "_dynamic.out"; + } + else + { + value += "_parallel.out"; + } + } + else + { + value += "_sequential.out"; + } + + return value; +} + +void eoParallel::_createParameters( eoParser& parser ) +{ + std::string section("Parallelization"); + parser.processParam( _isEnabled, section ); + parser.processParam( _isDynamic, section ); + parser.processParam( _prefix, section ); + parser.processParam( _nthreads, section ); + parser.processParam( _enableResults, section ); + parser.processParam( _doMeasure, section ); +} + +void make_parallel(eoParser& parser) +{ + eo::parallel._createParameters( parser ); + +#ifdef _OPENMP + if ( eo::parallel.isEnabled() ) + { + if ( eo::parallel.nthreads() > 0 ) + { + omp_set_num_threads( eo::parallel.nthreads() ); + } + } + + if ( eo::parallel.doMeasure() ) + { + eo::parallel._t_start = omp_get_wtime(); + } +#endif // !_OPENMP +} + +eoParallel eo::parallel; diff --git a/trunk/eo/src/utils/eoParallel.h b/trunk/eo/src/utils/eoParallel.h new file mode 100644 index 000000000..3f22f6c43 --- /dev/null +++ b/trunk/eo/src/utils/eoParallel.h @@ -0,0 +1,88 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Caner Candan + +*/ + +/** @defgroup Parallel Parallel + * @ingroup Utilities + @{ +*/ + +#ifndef eoParallel_h +#define eoParallel_h + +#include "eoObject.h" +#include "eoParser.h" + +/** + * eoParallel + * Class providing parameters for parallelization + * Use of a global variable eo::parallel to easily use the parallelization parameters anywhere + */ +class eoParallel : public eoObject +{ +public: + eoParallel(); + ~eoParallel(); + + virtual std::string className() const; + + inline bool isEnabled() const { return _isEnabled.value(); } + inline bool isDynamic() const { return _isDynamic.value(); } + + std::string prefix() const; + + inline unsigned int nthreads() const { return _nthreads.value(); } + + inline bool enableResults() const { return _enableResults.value(); } + inline bool doMeasure() const { return _doMeasure.value(); } + + friend void make_parallel(eoParser&); + +private: + void _createParameters( eoParser& ); + +private: + eoValueParam _isEnabled; + eoValueParam _isDynamic; + eoValueParam _prefix; + eoValueParam _nthreads; + eoValueParam _enableResults; + eoValueParam _doMeasure; + double _t_start; +}; + +void make_parallel(eoParser&); + +namespace eo +{ + /** + * parallel is an external global variable defined in order to use where ever you want the parallel parameters + */ + extern eoParallel parallel; +} + +/** @} */ + +#endif // !eoParallel_h diff --git a/trunk/eo/src/utils/eoParam.h b/trunk/eo/src/utils/eoParam.h new file mode 100644 index 000000000..948092c93 --- /dev/null +++ b/trunk/eo/src/utils/eoParam.h @@ -0,0 +1,486 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParam.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk +*/ +//----------------------------------------------------------------------------- + +#ifndef eoParam_h +#define eoParam_h + +#include +#include +#include +#include +#include +#include +#include + +/** @defgroup Parameters Parameters management + * + * A parameter is basically an object that stores a value and that can read/print it from/on streams. + * + * It is mainly used for command-line options (see eoParser) and eoStat. + * + * @ingroup Utilities + * @{ + */ + +/** + eoParam: Base class for monitoring and parsing parameters +*/ +class eoParam +{ +public: + + /** Empty constructor - called from outside any parser */ + eoParam () + : repLongName(""), repDefault(""), repDescription(""), + repShortHand(0), repRequired(false) + {} + + /** Construct a Param. + * + * @param _longName Long name of the argument + * @param _default The default value + * @param _description Description of the parameter. What is useful for. + * @param _shortName Short name of the argument (Optional) + * @param _required If it is a necessary parameter or not + */ + eoParam (std::string _longName, std::string _default, + std::string _description, char _shortName = 0, bool _required = false) + : repLongName(_longName), repDefault(_default), + repDescription(_description ), + repShortHand(_shortName), repRequired( _required) + {} + + /** + * Virtual destructor is needed. + */ + virtual ~eoParam () {} + + /** + * Pure virtual function to get the value out. + */ + virtual std::string getValue () const = 0; + + /** + * Pure virtual function to set the value + */ + virtual void setValue(const std::string& _value) = 0 ; + + /** + * Returns the short name. + */ + char shortName() const { return repShortHand; }; + + /** + * Returns the long name. + */ + const std::string& longName() const { return repLongName; }; + + /** + * Returns the description of the argument + */ + const std::string& description() const { return repDescription; }; + + /** + * Returns the default value of the argument + */ + const std::string& defValue() const { return repDefault; }; + + /** + * Sets the default value of the argument, + */ + void defValue( const std::string& str ) { repDefault = str; }; + + /** + * ALlows to change the name (see the prefix in eoParser.h) + */ + void setLongName(std::string _longName) { repLongName = _longName;} + + /** + * Returns if required or not. + */ + bool required() const { return repRequired; }; + +private: + std::string repLongName; + std::string repDefault; + std::string repDescription; + char repShortHand; + bool repRequired; +}; + + + +/** + eoValueParam: templatized derivation of eoParam. Can be used to contain + any scalar value type. It makes use of std::strstream to get and set values. + + @todo This should be changed to std::stringstream when that class is available in g++. + + Note also that there is a template specialization for std::pair and + for std::vector. These stream their contents delimited with whitespace. +*/ +template +class eoValueParam : public eoParam +{ +public : + + /** Construct a Param. */ + eoValueParam(void) : eoParam() {} + + /** Construct a Param. + * + * @param _defaultValue The default value + * @param _longName Long name of the argument + * @param _description Description of the parameter. What is useful for. + * @param _shortHand Short name of the argument (Optional) + * @param _required If it is a necessary parameter or not + */ + eoValueParam(ValueType _defaultValue, + std::string _longName, + std::string _description = "No description", + char _shortHand = 0, + bool _required = false) + : eoParam(_longName, "", _description, _shortHand, _required), + repValue(_defaultValue) + { + eoParam::defValue(getValue()); + } + + /** Get a reference on the parameter value + + @return parameter value + */ + ValueType& value() { return repValue; } + + /** Get a const reference on the parameter value + + @overload + + @return parameter value + */ + const ValueType& value() const { return repValue; } + + + /** Change the parameter value + */ + void value( ValueType val ) + { + // convert to string + std::ostringstream os; + os << val; + + // convert to ValueType + std::istringstream is( os.str() ); + is >> repValue; + } + + + /** Get the string representation of the value + */ + std::string getValue(void) const + { + std::ostringstream os; + os << repValue; + return os.str(); + } + + + /** @brief Set the value according to the speciied string + + For scalar types the textual represenation is typically quite + straigtforward. + + For vector we expect a list of numbers, where the first is + an unsigned integer taken as the length ot the vector and then + successively the vector elements. Vector elements can be separated + by ',', ';', or ' '. Note, however, that eoParser does not deal + correctly with parameter values contianing spaces (' '). + + @param _value Textual representation of the new value + */ + void setValue(const std::string& _value) + { + std::istringstream is(_value); + is >> repValue; + } + +protected: + + ValueType repValue; +}; + +/* + Specialization for std::string +*/ +template <> +inline std::string eoValueParam::getValue() const +{ + return repValue; +} + + +template <> +inline void eoValueParam::setValue(const std::string& _value) +{ + if (_value.empty()) + { + repValue = true; + return; + } + std::istringstream is(_value); + is >> repValue; +} + + +/// Because MSVC does not support partial specialization, the std::pair is a double, not a T +template <> +inline std::string eoValueParam >::getValue(void) const +{ + // use own buffer as MSVC's buffer leaks! + std::ostringstream os; + os << repValue.first << ' ' << repValue.second; + return os.str(); +} + +/// Because MSVC does not support partial specialization, the std::pair is a double, not a T +template <> +inline void eoValueParam >::setValue(const std::string& _value) +{ + std::istringstream is(_value); + is >> repValue.first; + is >> repValue.second; +} + +// The std::vector > +////////////////////////////////// +/// Because MSVC does not support partial specialization, the std::vector is a std::vector of doubles, not a T +template <> +inline std::string eoValueParam > >::getValue(void) const +{ + std::ostringstream os; + os << repValue.size() << ' '; + for (unsigned i = 0; i < repValue.size(); ++i) + { + os << repValue[i].size() << ' '; + std::copy(repValue[i].begin(), repValue[i].end(), std::ostream_iterator(os, " ")); + } + return os.str(); +} + +/// Because MSVC does not support partial specialization, the std::vector is a std::vector of doubles, not a T +template <> +inline void eoValueParam > >::setValue(const std::string& _value) +{ + std::istringstream is(_value); + unsigned i,j,sz; + is >> sz; + repValue.resize(sz); + + for (i = 0; i < repValue.size(); ++i) + { + unsigned sz2; + is >> sz2; + repValue[i].resize(sz2); + for (j = 0; j < sz2; ++j) + { + is >> repValue[i][j]; + } + } +} + +// The std::vector +////////////////////////////////// +/// Because MSVC does not support partial specialization, the std::vector is a double, not a T +template <> +inline std::string eoValueParam >::getValue(void) const +{ + std::ostringstream os; + os << repValue.size() << ' '; + std::copy(repValue.begin(), repValue.end(), std::ostream_iterator(os, " ")); + return os.str(); +} + +/// Because MSVC does not support partial specialization, the std::vector is a double, not a T +template <> +inline void eoValueParam >::setValue(const std::string& _value) +{ + static const std::string delimiter(",;"); + std::istringstream is(_value); + unsigned sz; + is >> sz; + repValue.resize(sz); + for(unsigned i=0; i> c; + } while((std::string::npos != delimiter.find(c)) && (! is.eof())); + is >> repValue[i]; + } +} + +// The std::vector +////////////////////////////////// +/// Because MSVC does not support partial specialization, the std::vector is a eoMinimizingFitness, not a T +template <> +inline std::string eoValueParam >::getValue(void) const +{ + std::ostringstream os; + os << repValue.size() << ' '; + std::copy(repValue.begin(), repValue.end(), std::ostream_iterator(os, " ")); + return os.str(); +} + +/// Because MSVC does not support partial specialization, the std::vector is a eoMinimizingFitness, not a T +// NOTE: g++ doesn support it either!!! +template <> +inline void eoValueParam >::setValue(const std::string& _value) +{ + std::istringstream is(_value); + unsigned sz; + is >> sz; + repValue.resize(sz); + std::copy(std::istream_iterator(is), std::istream_iterator(), repValue.begin()); +} + +// The std::vector +////////////////////////////////// +template <> +inline std::string eoValueParam >::getValue(void) const +{ + throw std::runtime_error("I cannot getValue for a std::vector"); + return std::string(""); +} + +template <> +inline void eoValueParam >::setValue(const std::string&) +{ + throw std::runtime_error("I cannot setValue for a std::vector"); + return; +} + +/*template + class eoContainerParam : public eoParam + { + public : + eoContainerParam (ContainerType& value, std::string _shortName, std::string _longName, + std::string _default, + std::string _description, + bool _required, + bool _change ) + : value(_value), eoParam(_shortName, _longName, _description, _default, _required, _change) + {} + + + // void setValue(const std::string & _value) + // { + // std::istd::stringstream is(_value); + // copy(std::istream_iterator(is), std::istream_iterator(), back_inserter(value)); + // } + + private : + ContainerType& value; + };*/ + +/** + * Another helper class for parsing parameters like + * Keyword(arg1, arg2, ...) + * + * It is basically a std::pair > + * first std::string is keyword + * the std::vector contains all arguments (as std::strings) + * See make_algo.h + */ + +class eoParamParamType : public std::pair > +{ +public: + eoParamParamType(std::string _value) + { + readFrom(_value); + } + + std::ostream & printOn(std::ostream & _os) const + { + _os << first; + unsigned narg = second.size(); + if (!narg) + return _os; + + // Here, we do have args + _os << "("; + if (narg == 1) // 1 arg only + { + _os << second[0] << ")" ; + return _os; + } + // and here more than 1 arg + for (unsigned i=0; i> value; + readFrom(value); + return _is; + } + + void readFrom(std::string & _value) + { + second.resize(0); // just in case + size_t pos = _value.find('('); + if (pos >= _value.size()) // no arguments + { + first = _value; + return; + } + // so here we do have arguments + std::string t = _value.substr(pos+1);// the arguments + _value.resize(pos); + first = _value; // done for the keyword (NOTE: may be empty std::string!) + + // now all arguments + std::string delim(" (),"); + while ( (pos=t.find_first_not_of(delim)) < t.size()) + { + size_t posEnd = t.find_first_of(delim, pos); + std::string u = t.substr(pos,posEnd);//(t, pos); + /*u.resize(posEnd - pos);*/ + second.push_back(u); + t = t.substr(posEnd+1); + } + } +}; + +// at the moment, the following are defined in eoParser.cpp +std::ostream & operator<<(std::ostream & _os, const eoParamParamType & _rate); +std::istream & operator>>(std::istream & _is, eoParamParamType & _rate); + +/** @} */ +#endif diff --git a/trunk/eo/src/utils/eoParser.cpp b/trunk/eo/src/utils/eoParser.cpp new file mode 100644 index 000000000..cc306bf73 --- /dev/null +++ b/trunk/eo/src/utils/eoParser.cpp @@ -0,0 +1,451 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoParser.cpp +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net +Authors: + todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + Johann Dréo + */ +//----------------------------------------------------------------------------- + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include +#include +#include + +#include +#include +#include + + +using namespace std; + +std::ostream& printSectionHeader(std::ostream& os, std::string section) +{ + if (section == "") + section = "General"; + + // convert each character to upper case + std::transform( section.begin(), section.end(), section.begin(), ::toupper); + + // the formating with setfill would not permits to add this extra space as + // one more call to stream operator, thus it is inserted here + section += ' '; + + // pretty print so as to print the section, followed by as many # as + // necessary to fill the line until 80 characters + os << std::endl + << "### " + << std::left + << std::setfill('#') + << std::setw(80) // TODO do not hard code the width of the line + << section + << std::endl; + return os; +} + +eoParameterLoader::~eoParameterLoader() +{ + for (unsigned i = 0; i < ownedParams.size(); ++i) + { + delete ownedParams[i]; + } +} + +eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, + string _lFileParamName, char _shortHand) : + programName(_argv[0]), + programDescription( _programDescription), + needHelpMessage( false ), + needHelp(false, "help", "Prints this message", 'h'), + stopOnUnknownParam(true, "stopOnUnknownParam", "Stop if unkown param entered", '\0') +{ + // need to process the param file first + // if we want command-line to have highest priority + unsigned i; + for (i = 1; i < _argc; ++i) + { + if(_argv[i][0] == '@') + { // read response file + char *pts = _argv[i]+1; // yes a char*, sorry :-) + ifstream ifs (pts); + ifs.peek(); // check if it exists + if (!ifs) + { + string msg = string("Could not open response file: ") + pts; + throw runtime_error(msg); + } + // read - will be overwritten by command-line + readFrom(ifs); + break; // stop reading command line args for '@' + } + } + // now read arguments on command-line + stringstream stream; + for (i = 1; i < _argc; ++i) + { + stream << _argv[i] << '\n'; + } + readFrom(stream); + processParam(needHelp); + processParam(stopOnUnknownParam); +} + + +std::string eoParser::get( const std::string & name) const +{ + return getParamWithLongName( name )->getValue(); +} + + +eoParam * eoParser::getParamWithLongName(const std::string& _name) const +{ + typedef std::multimap MultiMapType; + typedef MultiMapType::const_iterator iter; + std::string search(prefix+_name); + for(iter p = params.begin(); p != params.end(); ++p) + if(p->second->longName() == search) + return p->second; + return 0; +} + +eoParam * eoParser::getParam(const std::string& _name) const +{ + eoParam * p = getParamWithLongName( _name ); + if( p == NULL ) { + throw eoMissingParamException(_name ); + } else { + return p; + } +} + +void eoParser::processParam(eoParam& param, std::string section) +{ + // this param enters the parser: add the prefix to the long name + if (prefix != "") + { + param.setLongName(prefix+param.longName()); + section = prefix + section; // and to section + } + doRegisterParam(param); // plainly register it + params.insert(make_pair(section, ¶m)); +} + +void eoParser::doRegisterParam(eoParam& param) +{ + if (param.required() && !isItThere(param)) + { + string msg = "Required parameter: " + param.longName() + " missing"; + needHelpMessage = true; + messages.push_back(msg); + } + pair value = getValue(param); + if (value.first) + { + param.setValue(value.second); + } +} + +pair eoParser::getValue(eoParam& _param) const +{ + pair result(false, ""); + + if (_param.shortName() != 0) + { + map::const_iterator it = shortNameMap.find(_param.shortName()); + if (it != shortNameMap.end()) + { + result.second = it->second; + result.first = true; + return result; + } + } + map::const_iterator it = longNameMap.find(_param.longName()); + if (it != longNameMap.end()) + { + result.second = it->second; + result.first = true; + return result; + } + //! @todo check environment, just long names + return result; +} + +void eoParser::updateParameters() +{ + typedef MultiMapType::const_iterator It; + + for (It p = params.begin(); p != params.end(); ++p) + { + doRegisterParam(*p->second); + } +} + +void eoParser::readFrom(istream& is) +{ + string str; + // we must avoid processing \section{xxx} if xxx is NOT "Parser" + bool processing = true; + while (is >> str) + { + if (str.find(string("\\section{"))==0) // found section begin + processing = (str.find(string("Parser"))= 3) + value = string(str.begin() + 3, str.end()); + } + else + { + value = string(str.begin() + 2, str.end()); + } + } + + shortNameMap[str[1]] = value; + } + } + } + } + + updateParameters(); +} + +void eoParser::printOn(ostream& os) const +{ + typedef MultiMapType::const_iterator It; + + It p = params.begin(); + + std::string section = p->first; + + printSectionHeader(os, section); + //print every param with its value + for (; p != params.end(); ++p) + { + std::string newSection = p->first; + + if (newSection != section) + { + section = newSection; + printSectionHeader(os, section); + } + + eoParam* param = p->second; + + if (!isItThere(*param)) // comment out the ones not set by the user + os << "# "; + + string str = "--" + param->longName() + "=" + param->getValue(); + + os.setf(ios_base::left, ios_base::adjustfield); + os << setfill(' ') << setw(40) << str; + + os << setw(0) << " # "; + if (param->shortName()) + os << '-' << param->shortName() << " : "; + os << param->description(); + + if (param->required()) + { + os << " REQUIRED "; + } + + os << '\n'; + } +} + +void eoParser::printHelp(ostream& os) +{ + if (needHelp.value() == false && !messages.empty()) + { + std::copy(messages.begin(), messages.end(), ostream_iterator(os, "\n")); + messages.clear(); + return; + } + + // print program name and description + os << this->programName <<": "<< programDescription << "\n\n"; + + // print the usage when calling the program from the command line + os << "Usage: "<< programName<<" [Options]\n"; + // only short usage! + os << "Options of the form \"-f[=Value]\" or \"--Name[=value]\"" << endl; + + os << "Where:"<first; + + printSectionHeader(os, section); + + //print every param with its value + for (; p != params.end(); ++p) + { + std::string newSection = p->first; + + if (newSection != section) + { + section = newSection; + printSectionHeader(os, section); + } + + if (p->second->shortName()) + os << "-" << p->second->shortName() << ", "; + + os << "--" <second->longName() <<" :\t" + << p->second->description() ; + + os << " (" << ( (p->second->required())?"required":"optional" ); + os <<", default: "<< p->second->defValue() << ')' << std::endl; + } // for p + + os << "\n@param_file \t defines a file where the parameters are stored\n"; + os << '\n'; + +} + +bool eoParser::userNeedsHelp(void) +{ + /* + check whether there are long or short names entered + without a corresponding parameter + */ + // first, check if we want to check that ! + if (stopOnUnknownParam.value()) + { + // search for unknown long names + for (LongNameMapType::const_iterator lIt = longNameMap.begin(); lIt != longNameMap.end(); ++lIt) + { + string entry = lIt->first; + + MultiMapType::const_iterator it; + + for (it = params.begin(); it != params.end(); ++it) + { + if (entry == it->second->longName()) + { + break; + } + } + + if (it == params.end()) + { + string msg = "Unknown parameter: --" + entry + " entered"; + needHelpMessage = true; + messages.push_back(msg); + } + } // for lIt + + // search for unknown short names + for (ShortNameMapType::const_iterator sIt = shortNameMap.begin(); sIt != shortNameMap.end(); ++sIt) + { + char entry = sIt->first; + + MultiMapType::const_iterator it; + + for (it = params.begin(); it != params.end(); ++it) + { + if (entry == it->second->shortName()) + { + break; + } + } + + if (it == params.end()) + { + string entryString(1, entry); + string msg = "Unknown parameter: -" + entryString + " entered"; + needHelpMessage = true; + messages.push_back(msg); + } + } // for sIt + + if( needHelpMessage ) { + string msg = "Use -h or --help to get help about available parameters"; + messages.push_back( msg ); + } + + } // if stopOnUnknownParam + + return needHelp.value() || !messages.empty(); +} + +///////////////// I put these here at the moment +ostream & operator<<(ostream & _os, const eoParamParamType & _rate) +{ + _rate.printOn(_os); + return _os; +} + +istream & operator>>(istream & _is, eoParamParamType & _rate) +{ + _rate.readFrom(_is); + return _is; +} diff --git a/trunk/eo/src/utils/eoParser.h b/trunk/eo/src/utils/eoParser.h new file mode 100644 index 000000000..be680ab0c --- /dev/null +++ b/trunk/eo/src/utils/eoParser.h @@ -0,0 +1,343 @@ +/* (c) Marc Schoenauer, Maarten Keijzer, GeNeura Team, Thales group + +This library is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 2 of the License, or (at your option) any +later version. + +This library is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this library; if not, write to the Free Software Foundation, Inc., 59 +Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net +Authors: + todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + Johann Dréo +*/ + + +#ifndef EO_PARSER_H +#define EO_PARSER_H + +#include +#include +#include + +#include "eoParam.h" +#include "eoObject.h" +#include "eoPersistent.h" +#include "eoExceptions.h" + +/** Parameter saving and loading + +eoParameterLoader is an abstract class that can be used as a base for your own +parameter loading and saving. The command line parser eoParser is derived from +this class. + +@ingroup Parameters +*/ +class eoParameterLoader +{ +public : + + /** Need a virtual destructor */ + virtual ~eoParameterLoader(); + + /** Register a parameter and set its value if it is known + + @param param the parameter to process + @param section the section where this parameter belongs + */ + virtual void processParam(eoParam& param, std::string section = "") = 0; + + /** + * checks if _param has been actually entered + */ + virtual bool isItThere(eoParam& _param) const = 0; + + /** + * Construct a Param and sets its value. The loader will own the memory thus created + * + * @param _defaultValue The default value + * @param _longName Long name of the argument + * @param _description Description of the parameter. What is useful for. + * @param _shortHand Short name of the argument (Optional) + * @param _section Name of the section where the parameter belongs + * @param _required If it is a necessary parameter or not + */ + template + eoValueParam& createParam(ValueType _defaultValue, + std::string _longName, + std::string _description, + char _shortHand = 0, + std::string _section = "", + bool _required = false) + { + eoValueParam* p = new eoValueParam(_defaultValue, + _longName, + _description, + _shortHand, + _required); + ownedParams.push_back(p); + processParam(*p, _section); + return *p; + } + + +private : + + std::vector ownedParams; +}; + +/** + eoParser: command line parser and configuration file reader + This class is persistent, so it can be stored and reloaded to restore + parameter settings. + + Parameters can be read from argv, strings or streams, and must be specified + using the following convention: --name=value or -n=value + + You should not use space as a separator between the parameter and its value. + + @ingroup Parameters +*/ +class eoParser : public eoParameterLoader, public eoObject, public eoPersistent +{ + +public: + + /** + * Constructor + * a complete constructor that reads the command line an optionally reads + * a configuration file. + + * + * myEo --param-file=param.rc will then load using the parameter file param.rc + * + * @param _argc command line arguments count + * @param _argv command line parameters + * @param _programDescription Description of the work the program does + * @param _lFileParamName Name of the parameter specifying the configuration file (--param-file) + * @param _shortHand Single charachter shorthand for specifying the configuration file + */ + eoParser ( unsigned _argc, char **_argv , std::string _programDescription = "", + std::string _lFileParamName = "param-file", char _shortHand = 'p'); + + /** + Processes the parameter and puts it in the appropriate section for readability + */ + void processParam(eoParam& param, std::string section = ""); + + /** Read from a stream + * @param is the input stream + */ + void readFrom(std::istream& is); + + /** Pint on a stream + * @param os the output stream + */ + void printOn(std::ostream& os) const; + + /// className for readibility + std::string className(void) const { return "Parser"; } + + /// true if the user made an error or asked for help + bool userNeedsHelp(void); + /** + * Prints an automatic help in the specified output using the information + * provided by parameters + */ + void printHelp(std::ostream& os); + + std::string ProgramName() { return programName; } + + /** Has param been entered by user? + + Checks if _param has been actually entered by the user + */ + virtual bool isItThere(eoParam& _param) const + { return getValue(_param).first; } + + + std::string get( const std::string & name) const; + + + /** + * get a handle on a param from its longName + * + * if not found, returns 0 (null pointer :-) + * + * Not very clean (requires hard-coding of the long name twice!) + * but very useful in many occasions... + */ + eoParam * getParamWithLongName(const std::string& _name) const; + + + /** + * Get a handle on a param from its long name + * If not found, raise an eoMissingParamException + */ + eoParam * getParam(const std::string& _name) const; + + + /** + * Get the value of a param from its long name + * If not found, raise an eoMissingParamException + * + * Remember to specify the expected return type with a templated call: + * unsigned int popSize = eoparser.value("popSize"); + * + * If the template type is not the good one, an eoWrongParamTypeException is raised. + */ + template + ValueType valueOf(const std::string& _name) const + { + eoParam* param = getParam(_name); + + // Note: eoParam is the polymorphic base class of eoValueParam, thus we can do a dynamix cast + eoValueParam* vparam = dynamic_cast< eoValueParam* >(param); + + if( vparam == NULL ) { + // if the dynamic cast has failed, chances are that ValueType + // is not the same than the one used at declaration. + throw eoWrongParamTypeException( _name ); + } else { + return vparam->value(); + } + } + + + + /** Get or create parameter + + It seems finally that the easiest use of the above method is + through the following, whose interface is similar to that of the + widely-used createParam. + */ + template + eoValueParam& getORcreateParam(ValueType _defaultValue, + std::string _longName, + std::string _description, + char _shortHand = 0, + std::string _section = "", + bool _required = false) + { + eoParam* ptParam = getParamWithLongName(_longName); + if (ptParam) { + // found + eoValueParam* ptTypedParam( + dynamic_cast*>(ptParam)); + return *ptTypedParam; + } else { + // not found -> create it + return createParam(_defaultValue, _longName, _description, + _shortHand, _section, _required); + } + } + + + + /** Set parameter value or create parameter + + This makes sure that the specified parameter has the given value. + If the parameter does not exist yet, it is created. + + This requires that operator<< is defined for ValueType. + + + @param _defaultValue Default value. + @param _longName Long name of the argument. + @param _description Description of the parameter. + @param _shortHand Short name of the argument (Optional) + @param _section Name of the section where the parameter belongs. + @param _required Is the parameter mandatory? + @return Corresponding parameter. + */ + template + eoValueParam& setORcreateParam(ValueType _defaultValue, + std::string _longName, + std::string _description, + char _shortHand = 0, + std::string _section = "", + bool _required = false) + { + eoValueParam& param = createParam(_defaultValue, _longName, _description, + _shortHand, _section, _required); + std::ostringstream os; + os << _defaultValue; + if(isItThere(param)) { + param.setValue(os.str()); + } else { + longNameMap[_longName] = os.str(); + shortNameMap[_shortHand] = os.str(); + } + return param; + } + + + + /** accessors to the stopOnUnknownParam value */ + void setStopOnUnknownParam(bool _b) {stopOnUnknownParam.value()=_b;} + bool getStopOnUnknownParam() {return stopOnUnknownParam.value();} + + /** Prefix handling */ + void setPrefix(const std:: string & _prefix) {prefix = _prefix;} + + void resetPrefix() {prefix = "";} + + std::string getPrefix() {return prefix;} + +private: + + void doRegisterParam(eoParam& param); + + std::pair getValue(eoParam& _param) const; + + void updateParameters(); + + typedef std::multimap MultiMapType; + + // used to store all parameters that are processed + MultiMapType params; + + std::string programName; + std::string programDescription; + + typedef std::map ShortNameMapType; + ShortNameMapType shortNameMap; + + typedef std::map LongNameMapType; + LongNameMapType longNameMap; + + // flag that marks if the user need to know that there was a problem + // used to display the message about "-h" only once + bool needHelpMessage; + + eoValueParam needHelp; + eoValueParam stopOnUnknownParam; + + mutable std::vector messages; + + std::string prefix; // used for all created params - in processParam + +}; + + + +#endif // EO_PARSER_H + + + +// Local Variables: +// coding: iso-8859-1 +// mode:C++ +// c-file-style: "Stroustrup" +// comment-column: 35 +// fill-column: 80 +// End: diff --git a/trunk/eo/src/utils/eoParserLogger.h b/trunk/eo/src/utils/eoParserLogger.h new file mode 100644 index 000000000..de6f06e6a --- /dev/null +++ b/trunk/eo/src/utils/eoParserLogger.h @@ -0,0 +1,36 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/* +(c) Thales group, 2010 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; + version 2 of the License. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + +Authors: +Caner Candan + +*/ + +#ifndef EO_PARSER_LOGGER_H +#define EO_PARSER_LOGGER_H + +#include "eoParser.h" + +#warning "[eoParserLogger] is deprecated" + +typedef eoParser eoParserLogger; + +#endif // !EO_PARSER_LOGGER_H diff --git a/trunk/eo/src/utils/eoPopStat.h b/trunk/eo/src/utils/eoPopStat.h new file mode 100644 index 000000000..f3f091a6e --- /dev/null +++ b/trunk/eo/src/utils/eoPopStat.h @@ -0,0 +1,137 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoPopStat.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +/** WARNING: this file contains 2 classes: + +eoPopString and eoSortedPopString + +that transform the population into a std::string +that can be used to dump to the screen +*/ + +#ifndef _eoPopStat_h +#define _eoPopStat_h + +#include + + +/** Thanks to MS/VC++, eoParam mechanism is unable to handle std::vectors of stats. +This snippet is a workaround: +This class will "print" a whole population into a std::string - that you can later +send to any stream +This is the plain version - see eoPopString for the Sorted version + +Note: this Stat should probably be used only within eoStdOutMonitor, and not +inside an eoFileMonitor, as the eoState construct will work much better there. + +@ingroup Stats +*/ +template +class eoPopStat : public eoStat +{ +public: + + using eoStat::value; + + /** default Ctor, void std::string by default, as it appears + on the description line once at beginning of evolution. and + is meaningless there. _howMany defaults to 0, that is, the whole + population*/ + eoPopStat(unsigned _howMany = 0, std::string _desc ="") + : eoStat("", _desc), combien( _howMany) {} + +/** Fills the value() of the eoParam with the dump of the population. +Adds a \n before so it does not get mixed up with the rest of the stats +that are written by the monitor it is probably used from. +*/ +void operator()(const eoPop& _pop) +{ + value() = "\n# ====== pop dump =====\n"; + unsigned howmany=combien?combien:_pop.size(); + for (unsigned i = 0; i < howmany; ++i) + { + std::ostringstream os; + os << _pop[i] << std::endl; + + // paranoid: + value() += os.str(); + } +} + +private: + unsigned combien; +}; + +/** Thanks to MS/VC++, eoParam mechanism is unable to handle std::vectors of stats. +This snippet is a workaround: +This class will "print" a whole population into a std::string - that you can later +send to any stream +This is the Sorted version - see eoPopString for the plain version + +Note: this Stat should probably be used only within eoStdOutMonitor, and not +inside an eoFileMonitor, as the eoState construct will work much better there. + +@ingroup Stats +*/ +template +class eoSortedPopStat : public eoSortedStat +{ +public: + + using eoSortedStat::value; + + /** default Ctor, void std::string by default, as it appears on + the description line once at beginning of evolution. and is + meaningless there _howMany defaults to 0, that is, the whole + population + */ + eoSortedPopStat(unsigned _howMany = 0, std::string _desc ="") + : eoSortedStat("", _desc) , combien( _howMany) + {} + + /** Fills the value() of the eoParam with the dump of the + population. Adds a \n before so it does not get mixed up with + the rest of the stats that are written by the monitor it is + probably used from. + */ + void operator()(const std::vector& _pop) + { + value() = ""; // empty + unsigned howMany=combien?combien:_pop.size(); + for (unsigned i = 0; i < howMany; ++i) + { + std::ostringstream os; + os << *_pop[i] << std::endl; + + // paranoid: + value() += os.str(); + } + } +private: + unsigned combien; +}; + +#endif diff --git a/trunk/eo/src/utils/eoRNG.cpp b/trunk/eo/src/utils/eoRNG.cpp new file mode 100644 index 000000000..b538499f1 --- /dev/null +++ b/trunk/eo/src/utils/eoRNG.cpp @@ -0,0 +1,18 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#include +#include "eoRNG.h" + +// initialize static constants +const uint32_t eoRng::K(0x9908B0DFU); +const int eoRng::M(397); +const int eoRng::N(624); + +namespace eo +{ + // global random number generator object + eoRng rng(static_cast(time(0))); +} diff --git a/trunk/eo/src/utils/eoRNG.h b/trunk/eo/src/utils/eoRNG.h new file mode 100644 index 000000000..984e76271 --- /dev/null +++ b/trunk/eo/src/utils/eoRNG.h @@ -0,0 +1,598 @@ +/** Random number generator adapted from (see comments below) + +The random number generator is modified into a class +by Maarten Keijzer (mak@dhi.dk). Also added the Box-Muller +transformation to generate normal deviates. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: eodev-main@lists.sourceforge.net +Old contact information: todos@geneura.ugr.es, http://geneura.ugr.es +*/ + +#ifndef EO_RANDOM_NUMBER_GENERATOR +#define EO_RANDOM_NUMBER_GENERATOR + +/** @addtogroup Random + * @{ + * */ + +# if (defined _MSC_VER) +/** uint32_t is an unsigned integer type capable of holding 32 bits. + + In the applicatione here exactly 32 are used. + 64 bits might be better on an Alpha or other 64 bit systems with GCC at high + optimization levels so feel free to try your options and see what's best for + you. +*/ +typedef unsigned long uint32_t; +#else +#if (! defined __sun) +// The C99-standard defines uint32_t to be declared in stdint.h, but some +// systems don't have that and implement it in inttypes.h. +#include +#else +#include +#endif +#endif + +#include +#include +#include "eoPersistent.h" +#include "eoObject.h" + + +/** Random Number Generator + +@class eoRng eoRNG.h utils/eoRNG.h + +eoRng is a persistent class that uses the ``Mersenne Twister'' random +number generator MT19937 for generating random numbers. The various +member functions implement useful functions for evolutionary +algorithms. Included are: rand(), random(), flip() and normal(). + +EO provides a global random number generator rng that is seeded by the +current UNIX time at program start. Moreover some global convenience functions +are provided that use the global random number generator: random, +normal. + +@warning If you want to repeatedly generated the same sequence of pseudo-random +numbers, you should always reseed the generator at the beginning of your code. + + + +

Documentation in original file

+ +This is the ``Mersenne Twister'' random number generator MT19937, which +generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) starting +from any odd seed in 0..(2^32 - 1). This version is a recode by Shawn Cokus +(Cokus@math.washington.edu) on March 8, 1998 of a version by Takuji Nishimura +(who had suggestions from Topher Cooper and Marc Rieffel in July-August 1997). + +Effectiveness of the recoding (on Goedel2.math.washington.edu, a DEC Alpha +running OSF/1) using GCC -O3 as a compiler: before recoding: 51.6 sec. to +generate 300 million random numbers; after recoding: 24.0 sec. for the same +(i.e., 46.5% of original time), so speed is now about 12.5 million random number +generations per second on this machine. + +According to the URL (and +paraphrasing a bit in places), the Mersenne Twister is ``designed with +consideration of the flaws of various existing generators,'' has a period of +2^19937 - 1, gives a sequence that is 623-dimensionally equidistributed, and +``has passed many std::stringent tests, including the die-hard test of G. +Marsaglia and the load test of P. Hellekalek and S. Wegenkittl.'' It is +efficient in memory usage (typically using 2506 to 5012 bytes of static data, +depending on data type sizes, and the code is quite short as well). It generates +random numbers in batches of 624 at a time, so the caching and pipelining of +modern systems is exploited. It is also divide- and mod-free. + +The code as Shawn received it included the following notice: Copyright (C) +1997 Makoto Matsumoto and Takuji Nishimura. When you use this, send an e-mail to + with an appropriate reference to your work. It +would be nice to Cc: and + when you write. + + +

Portability

+ +Note for people porting EO to other platforms: please make sure that the type +uint32_t in the file eoRNG.h is exactly 32 bits long. It may in principle be +longer, but not shorter. If it is longer, file compatibility between EO on +different platforms may be broken. +*/ +class eoRng : public eoObject, public eoPersistent +{ +public : + + /** Constructor + + @param s Random seed; if you want another seed, use reseed. + + @see reseed for details on usage of the seeding value. + */ + eoRng(uint32_t s) + : state(0), next(0), left(-1), cached(false) + { + state = new uint32_t[N+1]; + initialize(2*s); + } + + /** Destructor */ + ~eoRng() + { + delete [] state; + } + + /** Re-initializes the Random Number Generator. + + WARNING: Jeroen Eggermont noticed that initialize does + not differentiate between odd and even numbers, therefore the argument to + reseed is now doubled before being passed on. + + Manually divide the seed by 2 if you want to re-run old runs + + @version MS. 5 Oct. 2001 + */ + void reseed(uint32_t s) + { + initialize(2*s); + } + + /** Re-initializes the Random Number Generator + + This is the traditional seeding procedure. This version is deprecated and + only provided for compatibility with old code. In new projects you should + use reseed. + + @see reseed for details on usage of the seeding value. + + @version old version (deprecated) + */ + void oldReseed(uint32_t s) + { + initialize(s); + } + + /** Random number from unifom distribution + + @param m Define interval for random number to [0, m) + @return random number in the range [0, m) + */ + double uniform(double m = 1.0) + { // random number between [0, m] + return m * double(rand()) / double(1.0 + rand_max()); + } + + /** Random number from unifom distribution + + @param min Define minimum for interval in the range [min, max) + @param max Define maximum for interval in the range [min, max) + @return random number in the range [min, max) + */ + double uniform(double min, double max) + { // random number between [min, max] + return min + uniform(max - min); + } + + /** Random integer number from unifom distribution + + @param m Define interval for random number to [0, m) + @return random integer in the range [0, m) + */ + uint32_t random(uint32_t m) + { + // C++ Standard (4.9 Floatingintegral conversions [conv.fpint]) + // defines floating point to integer conversion as truncation + // ("rounding towards zero"): "An rvalue of a floating point type + // can be converted to an rvalue of an integer type. The conversion + // truncates; that is, the fractional part is discarded" + return uint32_t(uniform() * double(m)); + } + + /** Biased coin toss + + This tosses a biased coin such that flip(x/100.0) will true x% of the time + + @param bias The coins' bias (the \e x above) + @return The result of the biased coin toss + */ + bool flip(double bias=0.5) + { + return uniform() < bias; + } + + /** Gaussian deviate + + Zero mean Gaussian deviate with standard deviation 1. + Note: Use the Marsaglia polar method. + + @return Random Gaussian deviate + */ + double normal(); + + /** Gaussian deviate + + Gaussian deviate with zero mean and specified standard deviation. + + @param stdev Standard deviation for Gaussian distribution + @return Random Gaussian deviate + */ + double normal(double stdev) + { return stdev * normal(); } + + /** Gaussian deviate + + Gaussian deviate with specified mean and standard deviation. + + @param mean Mean for Gaussian distribution + @param stdev Standard deviation for Gaussian distribution + @return Random Gaussian deviate + */ + double normal(double mean, double stdev) + { return mean + normal(stdev); } + + /** Random numbers using a negative exponential distribution + + @param mean Mean value of distribution + @return Random number from a negative exponential distribution + */ + double negexp(double mean) + { + return -mean*log(double(rand()) / rand_max()); + } + + /** + rand() returns a random number in the range [0, rand_max) + */ + uint32_t rand(); + + /** + rand_max() the maximum returned by rand() + */ + uint32_t rand_max() const { return uint32_t(0xffffffff); } + + /** Roulette wheel selection + + roulette_wheel(vec, total = 0) does a roulette wheel selection + on the input std::vector vec. If the total is not supplied, it is + calculated. It returns an integer denoting the selected argument. + */ + template + int roulette_wheel(const std::vector& vec, TYPE total = 0) + { + if (total == 0) + { // count + for (unsigned i = 0; i < vec.size(); ++i) + total += vec[i]; + } + double fortune = uniform() * total; + int i = 0; + while (fortune >= 0) + { + fortune -= vec[i++]; + } + return --i; + } + + + /** Randomly select element from vector. + + @return Uniformly chosen element from the vector. + */ + template + const TYPE& choice(const std::vector& vec) + { return vec[random(vec.size())]; } + + + /** Randomly select element from vector. + + @overload + + Provide a version returning a non-const element reference. + + @return Uniformly chosen element from the vector. + + @warning Changing the return value does alter the vector. + */ + template + TYPE& choice(std::vector& vec) + { return vec[random(vec.size())]; } + + /** @brief Print RNG + + @param _os Stream to print RNG on + */ + void printOn(std::ostream& _os) const + { + for (int i = 0; i < N; ++i) + { + _os << state[i] << ' '; + } + _os << int(next - state) << ' '; + _os << left << ' ' << cached << ' ' << cacheValue; + } + + /** @brief Read RNG + + @param _is Stream to read RNG from + */ + void readFrom(std::istream& _is) + { + for (int i = 0; i < N; ++i) + { + _is >> state[i]; + } + + int n; + _is >> n; + next = state + n; + + _is >> left; + _is >> cached; + _is >> cacheValue; + } + + std::string className() const { return "Mersenne-Twister"; } + +private: + + uint32_t restart(); + + /* @brief Initialize state + + We initialize state[0..(N-1)] via the generator + + x_new = (69069 * x_old) mod 2^32 + + from Line 15 of Table 1, p. 106, Sec. 3.3.4 of Knuth's _The Art of Computer + Programming_, Volume 2, 3rd ed. + + Notes (SJC): I do not know what the initial state requirements of the + Mersenne Twister are, but it seems this seeding generator could be better. + It achieves the maximum period for its modulus (2^30) iff x_initial is odd + (p. 20-21, Sec. 3.2.1.2, Knuth); if x_initial can be even, you have + sequences like 0, 0, 0, ...; 2^31, 2^31, 2^31, ...; 2^30, 2^30, 2^30, ...; + 2^29, 2^29 + 2^31, 2^29, 2^29 + 2^31, ..., etc. so I force seed to be odd + below. + + Even if x_initial is odd, if x_initial is 1 mod 4 then + + the lowest bit of x is always 1, + the next-to-lowest bit of x is always 0, + the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , + the 3rd-from-lowest bit of x 4-cycles ... 0 1 1 0 0 1 1 0 ... , + the 4th-from-lowest bit of x has the 8-cycle ... 0 0 0 1 1 1 1 0 ... , + ... + + and if x_initial is 3 mod 4 then + + the lowest bit of x is always 1, + the next-to-lowest bit of x is always 1, + the 2nd-from-lowest bit of x alternates ... 0 1 0 1 0 1 0 1 ... , + the 3rd-from-lowest bit of x 4-cycles ... 0 0 1 1 0 0 1 1 ... , + the 4th-from-lowest bit of x has the 8-cycle ... 0 0 1 1 1 1 0 0 ... , + ... + + The generator's potency (min. s>=0 with (69069-1)^s = 0 mod 2^32) is 16, + which seems to be alright by p. 25, Sec. 3.2.1.3 of Knuth. It also does well + in the dimension 2..5 spectral tests, but it could be better in dimension 6 + (Line 15, Table 1, p. 106, Sec. 3.3.4, Knuth). + + Note that the random number user does not see the values generated here + directly since restart() will always munge them first, so maybe none of all + of this matters. In fact, the seed values made here could even be + extra-special desirable if the Mersenne Twister theory says so-- that's why + the only change I made is to restrict to odd seeds. + */ + void initialize(uint32_t seed); + + /** @brief Array for the state */ + uint32_t *state; + + /** Pointer to next available random number */ + uint32_t *next; + + /** Number of random numbers currently left */ + int left; + + /** @brief Is there a valid cached value for the normal distribution? */ + bool cached; + + /** @brief Cached value for normal distribution? */ + double cacheValue; + + /** @brief Size of the state-vector */ + static const int N; + + /** Internal constant */ + static const int M; + + /** @brief Magic constant */ + static const uint32_t K; + + + /** @brief Copy constructor + + Private copy ctor and assignment operator to make sure that nobody + accidentally copies the random number generator. If you want similar RNG's, + make two RNG's and initialize them with the same seed. + + As it cannot be called, we do not provide an implementation. + */ + eoRng(const eoRng&); + + /** @brief Assignment operator + + @see Copy constructor eoRng(const eoRng&). + */ + eoRng& operator=(const eoRng&); +}; +/** @example t-eoRNG.cpp + */ + + + +namespace eo +{ + /** The one and only global eoRng object */ + extern eoRng rng; +} +using eo::rng; + +/** @} */ + + + + +// Implementation of some eoRng members.... Don't mind the mess, it does work. + +#define hiBit(u) ((u) & 0x80000000U) // mask all but highest bit of u +#define loBit(u) ((u) & 0x00000001U) // mask all but lowest bit of u +#define loBits(u) ((u) & 0x7FFFFFFFU) // mask the highest bit of u +#define mixBits(u, v) (hiBit(u)|loBits(v)) // move hi bit of u to hi bit of v + + +inline void eoRng::initialize(uint32_t seed) +{ + left = -1; + + register uint32_t x = (seed | 1U) & 0xFFFFFFFFU, *s = state; + register int j; + + for(left=0, *s++=x, j=N; --j; + *s++ = (x*=69069U) & 0xFFFFFFFFU) ; +} + + + +inline uint32_t eoRng::restart() +{ + register uint32_t *p0=state, *p2=state+2, *pM=state+M, s0, s1; + register int j; + + left=N-1, next=state+1; + + for(s0=state[0], s1=state[1], j=N-M+1; --j; s0=s1, s1=*p2++) + *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + + for(pM=state, j=M; --j; s0=s1, s1=*p2++) + *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + + s1=state[0], *p0 = *pM ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U); + s1 ^= (s1 >> 11); + s1 ^= (s1 << 7) & 0x9D2C5680U; + s1 ^= (s1 << 15) & 0xEFC60000U; + return(s1 ^ (s1 >> 18)); +} + + + +inline uint32_t eoRng::rand() +{ + if(--left < 0) + return(restart()); + uint32_t y = *next++; + y ^= (y >> 11); + y ^= (y << 7) & 0x9D2C5680U; + y ^= (y << 15) & 0xEFC60000U; + return(y ^ (y >> 18)); +} + + + +inline double eoRng::normal() +{ + if (cached) { + cached = false; + return cacheValue; + } + double rSquare, var1, var2; + do { + var1 = 2.0 * uniform() - 1.0; + var2 = 2.0 * uniform() - 1.0; + rSquare = var1 * var1 + var2 * var2; + } while (rSquare >= 1.0 || rSquare == 0.0); + double factor = sqrt(-2.0 * log(rSquare) / rSquare); + cacheValue = var1 * factor; + cached = true; + return (var2 * factor); +} + + + +namespace eo +{ + /** @brief Random function + + This is a convenience function for generating random numbers using the + global eo::rng object. + + Templatized random function, returns a random double in the range [min, max). + It works with most basic types such as: + - char + - int (short, long, signed and unsigned) + - float, double + + @param min Minimum for distribution + @param max Maximum for distribution + + @see random(const T& max) + */ + template + inline T random(const T& min, const T& max) { + return static_cast(rng.uniform() * (max-min)) + min; } + + /** @brief Random function + + @overload + + This is a convenience function for generating random numbers using the + global eo::rng object. + + Templatized random function, returns a random double in the range [0, max). + It works with most basic types such as: + - char + - int (short, long, signed and unsigned) + - float, double + + @param max Maximum for distribution + + @see random(const T& min, const T& max) + */ + template + inline T random(const T& max) { + return static_cast(rng.uniform() * max); } + + /** Normal distribution + + This is a convenience function for generating random numbers using the + global eo::rng object. + + @return ormally distributed random number + */ + inline double normal() { return rng.normal(); } +} + + +#endif + + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-offsets: ((c . 0)) +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/eo/src/utils/eoRealBounds.cpp b/trunk/eo/src/utils/eoRealBounds.cpp new file mode 100644 index 000000000..89dcb3584 --- /dev/null +++ b/trunk/eo/src/utils/eoRealBounds.cpp @@ -0,0 +1,259 @@ +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include + +#include "eoRealBounds.h" +#include "eoRealVectorBounds.h" + + +// the global dummy bounds +// (used for unbounded variables when bounds are required) +eoRealNoBounds eoDummyRealNoBounds; +eoRealVectorNoBounds eoDummyVectorNoBounds(0); + +///////////// helper read functions - could be somewhere else + +// removes leading delimiters - return false if nothing else left +bool remove_leading(std::string & _s, const std::string _delim) +{ + size_t posDebToken = _s.find_first_not_of(_delim); + if (posDebToken >= _s.size()) + return false; + _s = _s.substr(posDebToken); + return true; +} + +double read_double(std::string _s) +{ + std::istringstream is(_s); + double r; + is >> r; + return r; +} + +long int read_int(std::string _s) +{ + std::istringstream is(_s); + long int i; + is >> i; + return i; +} + +// need to rewrite copy ctor and assignement operator because of ownedBounds +eoRealVectorBounds::eoRealVectorBounds(const eoRealVectorBounds & _b): + eoRealBaseVectorBounds(_b), eoPersistent() +{ + factor = _b.factor; + ownedBounds = _b.ownedBounds; + // duplicate all pointers! + if (ownedBounds.size()>0) + for (unsigned i=0; idup(); +} + + +// the readFrom method of eoRealVectorNoBounds: +// only calls the readFrom(string) - for param reading +void eoRealVectorBounds::readFrom(std::istream& _is) +{ + std::string value; + _is >> value; + readFrom(value); + return; +} + +void eoRealVectorBounds::readFrom(std::string _value) +{ + // keep track of old size - to adjust in the end + unsigned oldSize = size(); + // clean-up before filling in + if (ownedBounds.size()>0) + for (unsigned i = 0; i < ownedBounds.size(); ++i) + { + delete ownedBounds[i]; + } + ownedBounds.resize(0); + factor.resize(0); + resize(0); + + // now read + std::string delim(",; "); + while (_value.size()>0) + { + if (!remove_leading(_value, delim)) // only delimiters were left + break; + // look for opening char + size_t posDeb = _value.find_first_of("[("); + if (posDeb >= _value.size()) // nothing left to read (though probably a syntax error there) + { + break; + } + // ending char + std::string closeChar = (_value[posDeb] == '(' ? std::string(")") : std::string("]") ); + + size_t posFin = _value.find_first_of(std::string(closeChar)); + if (posFin >= _value.size()) + throw std::runtime_error("Syntax error when reading bounds"); + + // y a-t-il un nbre devant + unsigned count = 1; + if (posDeb > 0) // something before opening + { + std::string sCount = _value.substr(0, posDeb); + count = read_int(sCount); + if (count <= 0) + throw std::runtime_error("Syntax error when reading bounds"); + } + + // the bounds + std::string sBounds = _value.substr(posDeb+1, posFin-posDeb-1); + // and remove from original string + _value = _value.substr(posFin+1); + + remove_leading(sBounds, delim); + size_t posDelim = sBounds.find_first_of(delim); + if (posDelim >= sBounds.size()) + throw std::runtime_error("Syntax error when reading bounds"); + + bool minBounded=false, maxBounded=false; + double minBound=0, maxBound=0; + + // min bound + std::string sMinBounds = sBounds.substr(0,posDelim); + if (sMinBounds != std::string("-inf")) + { + minBounded = true; + minBound = read_double(sMinBounds); + } + + // max bound + size_t posEndDelim = sBounds.find_first_not_of(delim,posDelim); + + std::string sMaxBounds = sBounds.substr(posEndDelim); + if (sMaxBounds != std::string("+inf")) + { + maxBounded = true; + maxBound = read_double(sMaxBounds); + } + + // now create the eoRealBounds objects + eoRealBounds *ptBounds; + if (minBounded && maxBounded) + ptBounds = new eoRealInterval(minBound, maxBound); + else if (!minBounded && !maxBounded) // no bound at all + ptBounds = new eoRealNoBounds; + else if (!minBounded && maxBounded) + ptBounds = new eoRealAboveBound(maxBound); + else if (minBounded && !maxBounded) + ptBounds = new eoRealBelowBound(minBound); + // store it for memory management + ownedBounds.push_back(ptBounds); + // push the count + factor.push_back(count); + // and add count of it to the actual bounds + for (unsigned i=0; i 1 already!) + factor[factor.size()-1] += missing; + } +} + +/** the constructor for eoGeneralRealBound - from a string + * very similar to the eoRealVectorBounds::readFrom above + * but was written much later so the readFrom does not call this one + * as it should do + */ +eoRealBounds* eoGeneralRealBounds::getBoundsFromString(std::string _value) +{ + // now read + std::string delim(",; "); + std::string beginOrClose("[(])"); + if (!remove_leading(_value, delim)) // only delimiters were left + throw std::runtime_error("Syntax error in eoGeneralRealBounds Ctor"); + + // look for opening char + size_t posDeb = _value.find_first_of(beginOrClose); // allow ]a,b] + if (posDeb >= _value.size()) // nothing left to read + throw std::runtime_error("Syntax error in eoGeneralRealBounds Ctor"); + + // ending char: next {}() after posDeb + size_t posFin = _value.find_first_of(beginOrClose,posDeb+1); + if (posFin >= _value.size()) // not found + throw std::runtime_error("Syntax error in eoGeneralRealBounds Ctor"); + + // the bounds + std::string sBounds = _value.substr(posDeb+1, posFin-posDeb-1); + // and remove from original string + _value = _value.substr(posFin+1); + + remove_leading(sBounds, delim); + size_t posDelim = sBounds.find_first_of(delim); + if (posDelim >= sBounds.size()) + throw std::runtime_error("Syntax error in eoGeneralRealBounds Ctor"); + + bool minBounded=false, maxBounded=false; + double minBound=0, maxBound=0; + + // min bound + std::string sMinBounds = sBounds.substr(0,posDelim); + + if ( (sMinBounds != std::string("-inf")) && + (sMinBounds != std::string("-infinity")) + ) + { + minBounded = true; + minBound = read_double(sMinBounds); + } + + // max bound + size_t posEndDelim = sBounds.find_first_not_of(delim,posDelim); + + std::string sMaxBounds = sBounds.substr(posEndDelim); + + if ( (sMaxBounds != std::string("+inf")) && + (sMaxBounds != std::string("+infinity")) + ) + { + maxBounded = true; + maxBound = read_double(sMaxBounds); + } + + // now create the embedded eoRealBounds object + eoRealBounds * locBound; + if (minBounded && maxBounded) + { + if (maxBound <= minBound) + throw std::runtime_error("Syntax error in eoGeneralRealBounds Ctor"); + locBound = new eoRealInterval(minBound, maxBound); + } + else if (!minBounded && !maxBounded) // no bound at all + locBound = new eoRealNoBounds; + else if (!minBounded && maxBounded) + locBound = new eoRealAboveBound(maxBound); + else if (minBounded && !maxBounded) + locBound = new eoRealBelowBound(minBound); + return locBound; +} diff --git a/trunk/eo/src/utils/eoRealBounds.h b/trunk/eo/src/utils/eoRealBounds.h new file mode 100644 index 000000000..47c061005 --- /dev/null +++ b/trunk/eo/src/utils/eoRealBounds.h @@ -0,0 +1,686 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRealBounds.h +// (c) Marc Schoenauer 2001, Maarten Keijzer 2000, GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoRealBounds_h +#define _eoRealBounds_h + +#include // std::exceptions! +#include + +/** +\defgroup Real Vector of reals + +Set of classes related to continuous black-box optimization problems. + +Here are several examples of test programs using eoReal, eoEsSimple, eoEsStdev or eoEsFull to build an Evoution Strategies algorithm: +@include t-eoESAll.cpp +@include t-eoESFull.cpp + +@ingroup Representations + +*/ + + +/** +\class eoRealBounds eoRealBounds.h es/eoRealBounds.h +\ingroup Real + + Defines bound classes for real numbers. + +Scalar type: +------------ +Basic class is eoRealBounds, a pure virtual. + +The following pure virtual methods are to be used in mutations: +- void foldsInBounds(double &) that folds any value that falls out of + the bounds back into the bounds, by bouncing on the limit (if any) +- bool isInBounds(double) that simply says whether or not the argument + is in the bounds +- void truncate(double &) that set the argument to the bound value it +it exceeds it + +So mutation can choose +- iterate trying until they fall in bounds, +- only try once and "restd::pair" by using the foldsInBounds method +- only try once and restd::pair using the truncate method (will create a + huge bias toward the bound if the soluiton is not far from the bounds) + +There is also a uniform() method that generates a uniform value +(if possible, i.e. if bounded) in the interval. + +Derived class are +eoRealInterval that holds a minimum and maximum value, +eoRealNoBounds the "unbounded bounds" (-infinity, +infinity) +eoRealBelowBound the half-bounded interval [min, +infinity) +eoRealAboveBound the half-bounded interval (-infinity, max] + +THis file also contains the declaration of *the* global object that +is the unbounded bound + +@ingroup Bounds +*/ +class eoRealBounds : public eoPersistent +{ +public: + virtual ~eoRealBounds(){} + + /** Self-Test: true if ***both*** a min and a max + */ + virtual bool isBounded(void) const = 0; + + /** Self-Test: true if no min ***and*** no max + * hence no further need to test/truncate/fold anything + */ + virtual bool hasNoBoundAtAll(void) const = 0; + + /** Self-Test: bounded from below??? + */ + virtual bool isMinBounded(void) const = 0; + + /** Self-Test: bounded from above??? + */ + virtual bool isMaxBounded(void) const = 0; + + /** Test on a value: is it in bounds? + */ + virtual bool isInBounds(double) const = 0; + + /** Put value back into bounds - by folding back and forth + */ + virtual void foldsInBounds(double &) const = 0; + + /** Put value back into bounds - by truncating to a boundary value + */ + virtual void truncate(double &) const = 0; + + /** get minimum value + * std::exception if does not exist + */ + virtual double minimum() const = 0 ; + /** get maximum value + * std::exception if does not exist + */ + virtual double maximum() const = 0 ; + /** get range + * std::exception if unbounded + */ + virtual double range() const = 0; + + /** random generator of uniform numbers in bounds + * std::exception if unbounded + */ + virtual double uniform(eoRng & _rng = eo::rng) const = 0; + + /** for memory managements - ugly */ + virtual eoRealBounds * dup() const = 0; +}; + +/** A default class for unbounded variables + +@ingroup Bounds + */ +class eoRealNoBounds : public eoRealBounds +{ +public: + virtual ~eoRealNoBounds(){} + + virtual bool isBounded(void) const {return false;} + virtual bool hasNoBoundAtAll(void) const {return true;} + virtual bool isMinBounded(void) const {return false;} + virtual bool isMaxBounded(void) const {return false;} + virtual void foldsInBounds(double &) const {return;} + virtual void truncate(double &) const {return;} + virtual bool isInBounds(double) const {return true;} + + virtual double minimum() const + { + throw std::logic_error("Trying to get minimum of unbounded eoRealBounds"); + } + virtual double maximum() const + { + throw std::logic_error("Trying to get maximum of unbounded eoRealBounds"); + } + virtual double range() const + { + throw std::logic_error("Trying to get range of unbounded eoRealBounds"); + } + + virtual double uniform(eoRng & _rng = eo::rng) const + { + (void)_rng; + + throw std::logic_error("Trying to generate uniform values in unbounded eoRealBounds"); + } + + // methods from eoPersistent + /** + * Read object. + * @param _is A std::istream. + * but reading should not be done here, because of bound problems + * see eoRealVectorBounds + */ + virtual void readFrom(std::istream& _is) + { + (void)_is; + + throw std::runtime_error("Should not use eoRealBounds::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + _os << "[-inf,+inf]"; + } + + /** for memory managements - ugly */ + virtual eoRealBounds * dup() const + { + return new eoRealNoBounds(*this); + } + +}; + +/** one object for all - see eoRealBounds.cpp +@ingroup Bounds +*/ +extern eoRealNoBounds eoDummyRealNoBounds; + +/** + * fully bounded eoRealBound == interval + +@ingroup Bounds + */ +class eoRealInterval : public eoRealBounds +{ +public : + virtual ~eoRealInterval(){} + + /** + Simple bounds = minimum and maximum (allowed) + */ + eoRealInterval(double _min=0, double _max=1) : + repMinimum(_min), repMaximum(_max), repRange(_max-_min) + { + if (repRange<=0) + throw std::logic_error("Void range in eoRealBounds"); + } + + // accessors + virtual double minimum() const { return repMinimum; } + virtual double maximum() const { return repMaximum; } + virtual double range() const { return repRange; } + + // description + virtual bool isBounded(void) const {return true;} + virtual bool hasNoBoundAtAll(void) const {return false;} + virtual bool isMinBounded(void) const {return true;} + virtual bool isMaxBounded(void) const {return true;} + + virtual double uniform(eoRng & _rng = eo::rng) const + { + return repMinimum + _rng.uniform(repRange); + } + + // says if a given double is within the bounds + virtual bool isInBounds(double _r) const + { + if (_r < repMinimum) + return false; + if (_r > repMaximum) + return false; + return true; + } + + // folds a value into bounds + virtual void foldsInBounds(double & _r) const + { + long iloc; + double dlargloc = 2 * range() ; + + if (fabs(_r) > 1.0E9) // iloc too large! + { + _r = uniform(); + return; + } + + if ( (_r > maximum()) ) + { + iloc = (long) ( (_r-minimum()) / dlargloc ) ; + _r -= dlargloc * iloc ; + if ( _r > maximum() ) + _r = 2*maximum() - _r ; + } + + if (_r < minimum()) + { + iloc = (long) ( (maximum()-_r) / dlargloc ) ; + _r += dlargloc * iloc ; + if (_r < minimum()) + _r = 2*minimum() - _r ; + } + } + + // truncates to the bounds + virtual void truncate(double & _r) const + { + if (_r < repMinimum) + _r = repMinimum; + else if (_r > repMaximum) + _r = repMaximum; + return; + } + + // methods from eoPersistent + /** + * Read object. + * @param _is A std::istream. + * but reading should not be done here, because of bound problems + * see eoRealVectorBounds + */ + virtual void readFrom(std::istream& _is) + { + (void)_is; + + throw std::runtime_error("Should not use eoRealInterval::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + _os << "[" << repMinimum << "," << repMaximum << "]"; + } + + /** for memory managements - ugly */ + virtual eoRealBounds * dup() const + { + return new eoRealInterval(*this); + } + +private : + double repMinimum; + double repMaximum; + double repRange; // to minimize operations ??? +}; + +/** + * an eoRealBound bounded from below only + +@ingroup Bounds + */ +class eoRealBelowBound : public eoRealBounds +{ +public : + virtual ~eoRealBelowBound(){} + /** + Simple bounds = minimum + */ + eoRealBelowBound(double _min=0) : + repMinimum(_min) + {} + + // accessors + virtual double minimum() const { return repMinimum; } + + virtual double maximum() const + { + throw std::logic_error("Trying to get maximum of eoRealBelowBound"); + } + virtual double range() const + { + throw std::logic_error("Trying to get range of eoRealBelowBound"); + } + + // random generators + virtual double uniform(eoRng & _rng = eo::rng) const + { + (void)_rng; + + throw std::logic_error("Trying to generate uniform values in eoRealBelowBound"); + } + + // description + virtual bool isBounded(void) const {return false;} + virtual bool hasNoBoundAtAll(void) const {return false;} + virtual bool isMinBounded(void) const {return true;} + virtual bool isMaxBounded(void) const {return false;} + + // says if a given double is within the bounds + virtual bool isInBounds(double _r) const + { + if (_r < repMinimum) + return false; + return true; + } + + // folds a value into bounds + virtual void foldsInBounds(double & _r) const + { + // easy as a pie: symmetry w.r.t. minimum + if (_r < repMinimum) // nothing to do otherwise + _r = 2*repMinimum - _r; + return ; + } + + // truncates to the bounds + virtual void truncate(double & _r) const + { + if (_r < repMinimum) + _r = repMinimum; + return; + } + + // methods from eoPersistent + /** + * Read object. + * @param _is A std::istream. + * but reading should not be done here, because of bound problems + * see eoRealVectorBounds + */ + virtual void readFrom(std::istream& _is) + { + (void)_is; + + throw std::runtime_error("Should not use eoRealBelowBound::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + _os << "[" << repMinimum << ",+inf]"; + } + + /** for memory managements - ugly */ + virtual eoRealBounds * dup() const + { + return new eoRealBelowBound(*this); + } + +private : + double repMinimum; +}; + +/** +An eoRealBound bounded from above only +*/ +class eoRealAboveBound : public eoRealBounds +{ +public : + virtual ~eoRealAboveBound(){} + + /** + Simple bounds = minimum + */ + eoRealAboveBound(double _max=0) : + repMaximum(_max) + {} + + // accessors + virtual double maximum() const { return repMaximum; } + + virtual double minimum() const + { + throw std::logic_error("Trying to get minimum of eoRealAboveBound"); + } + virtual double range() const + { + throw std::logic_error("Trying to get range of eoRealAboveBound"); + } + + // random generators + virtual double uniform(eoRng & _rng = eo::rng) const + { + (void)_rng; + + throw std::logic_error("Trying to generate uniform values in eoRealAboveBound"); + } + + // description + virtual bool isBounded(void) const {return false;} + virtual bool hasNoBoundAtAll(void) const {return false;} + virtual bool isMinBounded(void) const {return false;} + virtual bool isMaxBounded(void) const {return true;} + + // says if a given double is within the bounds + virtual bool isInBounds(double _r) const + { + if (_r > repMaximum) + return false; + return true; + } + + // folds a value into bounds + virtual void foldsInBounds(double & _r) const + { + // easy as a pie: symmetry w.r.t. maximum + if (_r > repMaximum) // nothing to do otherwise + _r = 2*repMaximum - _r; + return ; + } + + // truncates to the bounds + virtual void truncate(double & _r) const + { + if (_r > repMaximum) + _r = repMaximum; + return; + } + + // methods from eoPersistent + /** + * Read object. + * @param _is A std::istream. + * but reading should not be done here, because of bound problems + * see eoRealVectorBounds + */ + virtual void readFrom(std::istream& _is) + { + (void)_is; + + throw std::runtime_error("Should not use eoRealAboveBound::readFrom"); + } + + /** + * Write object. It's called printOn since it prints the object on a stream. + * @param _os A std::ostream. + */ + virtual void printOn(std::ostream& _os) const + { + _os << "[-inf," << repMaximum << "]"; + } + + /** for memory managements - ugly */ + virtual eoRealBounds * dup() const + { + return new eoRealAboveBound(*this); + } + +private : + double repMaximum; +}; + +//////////////////////// tentative for a general BOUND class that is constructed from a string + +/** A class that encapsulate all possible eoIntBounds. + * Mandatory in order to read through the parser + +@ingroup Bounds + */ +class eoGeneralRealBounds : public eoRealBounds +{ +public: + /** Ctor: from a string, chooses the type of bound */ + eoGeneralRealBounds(std::string _s = "[-infinity,+infinity]") + { + repBound = getBoundsFromString(_s); + } + + /** Need a Cpy Ctor because we are allocating memory */ + eoGeneralRealBounds(const eoGeneralRealBounds & _b):eoRealBounds(_b) + { + // replicate the embedded bound (I'm pretty sure there is another + // way to do that !!! + + bool minBounded = _b.isMinBounded(); + bool maxBounded = _b.isMaxBounded(); + double minimum, maximum; + const eoRealBounds & bb = _b.theBounds(); + if (minBounded) minimum = bb.minimum(); + if (maxBounded) maximum = bb.maximum(); + + if (minBounded && maxBounded) + repBound = new eoRealInterval(minimum, maximum); + else if (!minBounded && !maxBounded) // no bound at all + repBound = new eoRealNoBounds; + else if (!minBounded && maxBounded) + repBound = new eoRealAboveBound(maximum); + else if (minBounded && !maxBounded) + repBound = new eoRealBelowBound(minimum); + } + + eoGeneralRealBounds& operator=(const eoGeneralRealBounds& _b) + { + // replicate the embedded bound (I'm pretty sure there is another + // way to do that !!! + + bool minBounded = _b.isMinBounded(); + bool maxBounded = _b.isMaxBounded(); + double minimum, maximum; + const eoRealBounds & bb = _b.theBounds(); + if (minBounded) minimum = bb.minimum(); + if (maxBounded) maximum = bb.maximum(); + + // first delete the embedded bounds if necessary + if (repBound) + delete repBound; + // now reallocate + if (minBounded && maxBounded) + repBound = new eoRealInterval(minimum, maximum); + else if (!minBounded && !maxBounded) // no bound at all + repBound = new eoRealNoBounds; + else if (!minBounded && maxBounded) + repBound = new eoRealAboveBound(maximum); + else if (minBounded && !maxBounded) + repBound = new eoRealBelowBound(minimum); + return (*this); + } + + + /** Need a Dtor because we allocate an actual bound */ + ~eoGeneralRealBounds() + { + delete repBound; + } + + ///// and now all methods from the embedded bounds + /** Self-Test: true if ***both*** a min and a max + */ + virtual bool isBounded(void) const {return repBound->isBounded();} + + /** Self-Test: true if no min ***and*** no max + * hence no further need to test/truncate/fold anything + */ + virtual bool hasNoBoundAtAll(void) const {return repBound->hasNoBoundAtAll();} + + /** Self-Test: bounded from below??? + */ + virtual bool isMinBounded(void) const {return repBound->isMinBounded();} + + /** Self-Test: bounded from above??? + */ + virtual bool isMaxBounded(void) const {return repBound->isMaxBounded();} + + /** Test on a value: is it in bounds? + */ + virtual bool isInBounds(double _x) const {return repBound->isInBounds(_x);} + + /** Put value back into bounds - by folding back and forth + */ + virtual void foldsInBounds(double & _x) const {return repBound->foldsInBounds(_x);} + + /** Put value back into bounds - by truncating to a boundary value + */ + virtual void truncate(double & _x) const {return repBound->truncate(_x);} + + /** get minimum value + * std::exception if does not exist + */ + virtual double minimum() const {return repBound->minimum();} + /** get maximum value + * std::exception if does not exist + */ + virtual double maximum() const {return repBound->maximum();} + /** get range + * std::exception if unbounded + */ + virtual double range() const {return repBound->range();} + + /** random generator of uniform numbers in bounds + * std::exception if unbounded + */ + virtual double uniform(eoRng & _rng = eo::rng) const {(void)_rng; return repBound->uniform();} + + /** for memory managements - ugly */ + virtual eoRealBounds * dup() const {return repBound->dup();} + + /** for efficiency, it's better to use the embedded boud directly */ + const eoRealBounds & theBounds() const { return *repBound;} + + /** don't forget the printOn method - + * again that of the embedded bound + */ + virtual void printOn(std::ostream& _os) const + { + repBound->printOn(_os); + } + + /** no readFrom ??? Have to check that later */ + virtual void readFrom(std::istream& _is) + { + std::string s; + _is >> s; + if (repBound) + delete repBound; + repBound = getBoundsFromString(s); + } + +private: + // reading from a string + eoRealBounds * getBoundsFromString(std::string); + + eoRealBounds * repBound; +}; + + +#endif diff --git a/trunk/eo/src/utils/eoRealVectorBounds.h b/trunk/eo/src/utils/eoRealVectorBounds.h new file mode 100644 index 000000000..56feff345 --- /dev/null +++ b/trunk/eo/src/utils/eoRealVectorBounds.h @@ -0,0 +1,429 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoRealVectorBounds.h +// (c) Marc Schoenauer 2001, Maarten Keijzer 2000, GeNeura Team, 1998 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoRealVectorBounds_h +#define _eoRealVectorBounds_h + +#include // std::exceptions! +#include +#include + +/** +Vector type for bounds (see eoRealBounds.h for scalar types) +------------ +Class eoRealVectorBounds implements the std::vectorized version: +it is basically a std::vector of eoRealBounds * and forwards all request +to the elements of the std::vector. + +This file also contains the global variables and eoDummyVectorNoBounds +that are used as defaults in ctors (i.e. when no +bounds are given, it is assumed unbounded values) + +THe 2 main classes defined here are + +eoRealBaseVectorBounds, base class that handles all useful functions +eoRealVectorBounds which derives from the preceding *and* eoPersistent + and also has a mechanism for memory handling of the pointers + it has to allocate + +@ingroup Bounds +*/ +class eoRealBaseVectorBounds : public std::vector +{ +public: + // virtual desctructor (to avoid warning?) + virtual ~eoRealBaseVectorBounds(){} + + /** Default Ctor. + */ + eoRealBaseVectorBounds() : std::vector(0) {} + + /** Ctor: same bounds for everybody, given as an eoRealBounds + */ + eoRealBaseVectorBounds(unsigned _dim, eoRealBounds & _bounds) : + std::vector(_dim, &_bounds) + {} + + /** Ctor, particular case of dim-2 + */ + eoRealBaseVectorBounds(eoRealBounds & _xbounds, eoRealBounds & _ybounds) : + std::vector(0) + { + push_back( &_xbounds); + push_back( &_ybounds); + } + + /** test: is i_th component bounded + */ + virtual bool isBounded(unsigned _i) + { + return (*this)[_i]->isBounded(); + } + + /** test: bounded iff all are bounded + */ + virtual bool isBounded(void) + { + for (unsigned i=0; iisBounded()) + return false; + return true; + } + + /** Self-test: true iff i_th component has no bounds at all + */ + virtual bool hasNoBoundAtAll(unsigned _i) + { + return (*this)[_i]->hasNoBoundAtAll(); + } + + /** Self-test: true iff all components have no bound at all + */ + virtual bool hasNoBoundAtAll(void) + { + for (unsigned i=0; ihasNoBoundAtAll()) + return false; + return true; + } + + virtual bool isMinBounded(unsigned _i) + { return (*this)[_i]->isMinBounded();} ; + + virtual bool isMaxBounded(unsigned _i) + { return (*this)[_i]->isMaxBounded();} ; + + /** Folds a real value back into the bounds - i_th component + */ + virtual void foldsInBounds(unsigned _i, double & _r) + { + (*this)[_i]->foldsInBounds(_r); + } + + /** Folds all variables of a std::vector of real values into the bounds + */ + virtual void foldsInBounds(std::vector & _v) + { + for (unsigned i=0; ifoldsInBounds(_v[i]); + } + } + + /** Truncates a real value to the bounds - i_th component + */ + virtual void truncate(unsigned _i, double & _r) + { + (*this)[_i]->truncate(_r); + } + + /** truncates all variables of a std::vector of real values to the bounds + */ + virtual void truncate(std::vector & _v) + { + for (unsigned i=0; itruncate(_v[i]); + } + } + + /** test: is i_th component within the bounds? + */ + virtual bool isInBounds(unsigned _i, double _r) + { return (*this)[_i]->isInBounds(_r); } + + /** test: are ALL components within the bounds? + */ + virtual bool isInBounds(std::vector _v) + { + for (unsigned i=0; iminimum();} + virtual double maximum(unsigned _i) {return (*this)[_i]->maximum();} + virtual double range(unsigned _i) {return (*this)[_i]->range();} + + /** Computes the average range + * An std::exception will be raised if one of the component is unbounded + */ + virtual double averageRange() + { + double r=0.0; + for (unsigned i=0; iuniform(); + return r; + } + + /** fills a std::vector with uniformly chosen variables in bounds + * An std::exception will be raised if one of the component is unbounded + */ + void uniform(std::vector & _v, eoRng & _rng = eo::rng) + { + _v.resize(size()); + for (unsigned i=0; iprintOn(_os); + _os << ";"; + } + } +}; + +//////////////////////////////////////////////////////////////////// +/** Now a derived class, for parser reading + * It holds some of the bounds (and destroy them when dying) + +@ingroup Bounds + */ +class eoRealVectorBounds : public eoRealBaseVectorBounds, public eoPersistent +{ +public: + /** Default Ctor will call base class default ctor + */ + eoRealVectorBounds():eoRealBaseVectorBounds() {} + + /** Ctor: same bounds for everybody, given as an eoRealBounds + */ + eoRealVectorBounds(unsigned _dim, eoRealBounds & _bounds) : + eoRealBaseVectorBounds(_dim, _bounds), factor(1,_dim), ownedBounds(0) + {} + + /** Ctor, particular case of dim-2 + */ + eoRealVectorBounds(eoRealBounds & _xbounds, eoRealBounds & _ybounds) : + eoRealBaseVectorBounds(_xbounds, _ybounds), factor(2,1), ownedBounds(0) + {} + + /** Simple bounds = minimum and maximum (allowed) + */ + eoRealVectorBounds(unsigned _dim, double _min, double _max) : + eoRealBaseVectorBounds(), factor(1, _dim), ownedBounds(0) + { + if (_max-_min<=0) + throw std::logic_error("Void range in eoRealVectorBounds"); + eoRealBounds *ptBounds = new eoRealInterval(_min, _max); + // handle memory once + ownedBounds.push_back(ptBounds); + // same bound for everyone + for (unsigned int i=0; i<_dim; i++) + push_back(ptBounds); + } + + /** Ctor: different bounds for different variables, std::vectors of double + */ + eoRealVectorBounds(std::vector _min, std::vector _max) : + factor(_min.size(), 1), ownedBounds(0) + { + if (_max.size() != _min.size()) + throw std::logic_error("Dimensions don't match in eoRealVectorBounds"); + // the bounds + eoRealBounds *ptBounds; + for (unsigned i=0; i<_min.size(); i++) + { + ptBounds = new eoRealInterval(_min[i], _max[i]); + ownedBounds.push_back(ptBounds); + push_back(ptBounds); + } + } + + /** Ctor from a std::string + * and don't worry, the readFrom(std::string) starts by setting everything to 0! + */ + eoRealVectorBounds(std::string _s) : eoRealBaseVectorBounds() + { + readFrom(_s); + } + + /** Dtor: destroy all ownedBounds - BUG ???*/ + virtual ~eoRealVectorBounds() + { +// std::cout << "Dtor, avec size = " << ownedBounds.size() << std::endl; +// for (unsigned i = 0; i < ownedBounds.size(); ++i) +// { +// delete ownedBounds[i]; +// } +} + + + // methods from eoPersistent + /** + * Read object from a stream + * only calls the readFrom(std::string) - for param reading + * @param _is A std::istream. + */ + virtual void readFrom(std::istream& _is) ; + + /** + * Read object from a std::string + * @param _s A std::istream. + */ + virtual void readFrom(std::string _s) ; + + /** overload printOn method to save space */ + virtual void printOn(std::ostream& _os) const + { + if (factor[0]>1) + _os << factor[0] ; + operator[](0)->printOn(_os); + + // other bounds + unsigned int index=factor[0]; + if (factor.size()>1) + for (unsigned i=1; i 1) + _os << factor[i]; + operator[](index)->printOn(_os); + index += factor[i]; + } + } + + /** Eventually increases the size by duplicating last bound */ + void adjust_size(unsigned _dim); + + /** need to rewrite copy ctor and assignement operator + * because of ownedBounds */ + eoRealVectorBounds(const eoRealVectorBounds &); + +private:// WARNING: there is no reason for both std::vector below + //to be synchronized in any manner + std::vector factor; // std::list of nb of "grouped" bounds + std::vector ownedBounds; +// keep this one private + eoRealVectorBounds& operator=(const eoRealVectorBounds&); + }; + +////////////////////////////////////////////////////////////// +/** the dummy unbounded eoRealVectorBounds: usefull if you don't need bounds! + * everything is inlined. + * Warning: we do need this class, and not only a std::vector + +@ingroup Bounds + */ +class eoRealVectorNoBounds: public eoRealVectorBounds +{ +public: + // virtual desctructor (to avoid warning?) + virtual ~eoRealVectorNoBounds(){} + + /** + * Ctor: nothing to do, but beware of dimension: call base class ctor + */ + eoRealVectorNoBounds(unsigned _dim) : + eoRealVectorBounds( (_dim?_dim:1), eoDummyRealNoBounds) + {} + + + virtual bool isBounded(unsigned) {return false;} + virtual bool isBounded(void) {return false;} + + virtual bool hasNoBoundAtAll(unsigned) {return true;} + virtual bool hasNoBoundAtAll(void) {return true;} + + virtual bool isMinBounded(unsigned) {return false;} + virtual bool isMaxBounded(unsigned) {return false;} + + virtual void foldsInBounds(unsigned, double &) {return;} + virtual void foldsInBounds(std::vector &) {return;} + + virtual void truncate(unsigned, double &) {return;} + virtual void truncate(std::vector &) {return;} + + virtual bool isInBounds(unsigned, double) {return true;} + virtual bool isInBounds(std::vector) {return true;} + + // accessors + virtual double minimum(unsigned) + { + throw std::logic_error("Trying to get minimum of eoRealVectorNoBounds"); + } + virtual double maximum(unsigned) + { + throw std::logic_error("Trying to get maximum of eoRealVectorNoBounds"); + } + virtual double range(unsigned) + { + throw std::logic_error("Trying to get range of eoRealVectorNoBounds"); + } + + virtual double averageRange() + { + throw std::logic_error("Trying to get average range of eoRealVectorNoBounds"); + } + + // random generators + virtual double uniform(unsigned, eoRng & _rng = eo::rng) + { + (void)_rng; + + throw std::logic_error("No uniform distribution on eoRealVectorNoBounds"); + } + + // fills a std::vector with uniformly chosen variables in bounds + void uniform(std::vector &, eoRng & _rng = eo::rng) + { + (void)_rng; + + throw std::logic_error("No uniform distribution on eoRealVectorNoBounds"); + } + +}; + + + +/** one object for all - see eoRealBounds.cpp +@ingroup Bounds +*/ +extern eoRealVectorNoBounds eoDummyVectorNoBounds; +#endif diff --git a/trunk/eo/src/utils/eoRndGenerators.h b/trunk/eo/src/utils/eoRndGenerators.h new file mode 100644 index 000000000..62e62ccff --- /dev/null +++ b/trunk/eo/src/utils/eoRndGenerators.h @@ -0,0 +1,161 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoRndGenerators.h + + mimics the rnd_generator.h by putting the generators in the EO-hierarchy + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +//----------------------------------------------------------------------------- + +#ifndef eoRndGenerators_h +#define eoRndGenerators_h + +#include "eoRNG.h" +#include +#include + +/** @defgroup Random Random number generation + * + * @ingroup Utilities + * @{ + */ + +using eo::rng; + +/** + By popular demand re-introducing a base class for a family of + random number generators. Derived members of this class are useful + to initialize fixed/variable length genotypes that have an 'atomic' type + in an indepent way (thus without employing any knowledge about the problem domain). + + See derived classes eoUniformGenerator, eoBooleanGenerator, eoNormalGenerator and eoNegExpGenerator +*/ +template +class eoRndGenerator : public eoF +{ + typedef T AtomType; +}; + +/** + The class eoUniform can be used in the STL generate function + to easily generate random floats and doubles. It can also + be used for ints and unsigneds by virtue of the static_cast + in the generator function. + + Also present is a specialization for boolean, that will + ignore the minima and maxima that are possibly set and will + return an unbiased flip of a coin. For a biased flip, use the eoBoolean + + either in [0, _max) if only 1 value (_max) is given + (or none, as _max defaults to 1.0) + or in [_min,_max) if 2 values are given (_min, _max) +*/ +template class eoUniformGenerator : public eoRndGenerator +{ + // added new ctor with 2 params, and modified the data to minim and range + // (was maxim only). MS 3/11/2000 + public : + eoUniformGenerator(T _max = T(1.0), eoRng& _rng = rng) : + minim(T(0.0)), range(_max), uniform(_rng) {} + eoUniformGenerator(T _min, T _max, eoRng& _rng = rng) : + minim(_min), range(_max-_min), uniform(_rng) + { + if (_min>_max) + throw std::logic_error("Min is greater than Max in uniform_generator"); + } + + /** + Generates the number, uses a static_cast to get the right behaviour + for ints and unsigneds + */ + T operator()(void) { return minim+static_cast(uniform.uniform(range)); } + /** @example t-eoUniform.cpp + */ + +private : + T minim; + T range; + eoRng& uniform; +}; +/** @example t-eoRandom.cpp + */ + + +/// Specialization for bool, does an unbiased coin flip +template <> +inline bool eoUniformGenerator::operator()(void) +{ + return uniform.flip(0.5); +} + +/** + The class eoBooleanGenerator can be used in the STL generate function + to easily generate random booleans with a specified bias + \ingroup bitstring +*/ +class eoBooleanGenerator : public eoRndGenerator +{ + public : + eoBooleanGenerator(float _bias = 0.5, eoRng& _rng = rng) : bias(_bias), gen(_rng) {} + + bool operator()(void) { return gen.flip(bias); } + private : + float bias; + eoRng& gen; +}; + +/** + The class normal_generator can be used in the STL generate function + to easily generate gaussian distributed floats and doubles. The user + can supply a standard deviation which defaults to 1. +*/ +template class eoNormalGenerator : public eoRndGenerator +{ + public : + eoNormalGenerator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + + T operator()(void) { return (T) normal.normal(stdev); } + + private : + T stdev; + eoRng& normal; +}; + +/** + The class negexp_generator can be used in the STL generate function + to easily generate negative exponential distributed floats and doubles. The user + can supply a mean. +*/ +template class eoNegExpGenerator : public eoRndGenerator +{ + public : + eoNegExpGenerator(T _mean = 1.0, eoRng& _rng = rng) : mean(_mean), negexp(_rng) {} + + T operator()(void) { return (T) negexp.negexp(mean); } + + private : + T mean; + eoRng& negexp; +}; + +/** @} */ +#endif diff --git a/trunk/eo/src/utils/eoScalarFitnessStat.h b/trunk/eo/src/utils/eoScalarFitnessStat.h new file mode 100644 index 000000000..e56e46822 --- /dev/null +++ b/trunk/eo/src/utils/eoScalarFitnessStat.h @@ -0,0 +1,65 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoScalarFitnessStat.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoScalarFitnessStat_h +#define _eoScalarFitnessStat_h + +#include +#include + +/** + The fitnesses of a whole population, as a std::vector + + @ingroup Stats +*/ +template +class eoScalarFitnessStat : public eoSortedStat > +{ +public: + + using eoSortedStat >::value; + + eoScalarFitnessStat(std::string _description = "FitnessES", + eoRealVectorBounds & _bounds = eoDummyVectorNoBounds) + : eoSortedStat >(std::vector(0), _description), + range(*_bounds[0]) + {} + + virtual void operator()(const std::vector& _popPters) + { + value().resize(_popPters.size()); + for (unsigned i=0; i<_popPters.size(); i++) + { + value()[i] = _popPters[i]->fitness(); + range.truncate(value()[i]); + } + } + +private : + eoRealBounds & range; +}; + +#endif diff --git a/trunk/eo/src/utils/eoSignal.cpp b/trunk/eo/src/utils/eoSignal.cpp new file mode 100644 index 000000000..745d21bd3 --- /dev/null +++ b/trunk/eo/src/utils/eoSignal.cpp @@ -0,0 +1,36 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/** + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: http://eodev.sourceforge.net + + Autors: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + Caner.Candan@univ-angers.fr +*/ + +#include + +/** + * @addtogroup Continuators + * @{ + */ + +// --- Global variables - but don't know what else to do - MS --- +std::map< int, bool > signals_called; + +/** @} */ diff --git a/trunk/eo/src/utils/eoSignal.h b/trunk/eo/src/utils/eoSignal.h new file mode 100644 index 000000000..9a89cb196 --- /dev/null +++ b/trunk/eo/src/utils/eoSignal.h @@ -0,0 +1,106 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/** + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: http://eodev.sourceforge.net + + Authors: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mak@dhi.dk + Caner.Candan@univ-angers.fr +*/ + +#ifndef _eoSignal_h +#define _eoSignal_h + +#include +#include +#include + +#include +#include + +/** + * @addtogroup Continuators + * @{ + */ + +extern std::map< int, bool > signals_called; + +/** eoSignal inherits from eoCheckPoint including signals handling (see signal(7)) + * + * @ingroup Utilities + */ +template +class eoSignal : public eoCheckPoint +{ +public : + + eoSignal( int sig = SIGINT ) : eoCheckPoint( _dummyContinue ), _sig( sig ) + { + ::signals_called[_sig] = false; + +#ifndef _WINDOWS +#ifdef SIGQUIT + ::signal( _sig, handler ); +#endif // !SIGQUIT +#endif // !_WINDOWS + } + + eoSignal( eoContinue& _cont, int sig = SIGINT ) : eoCheckPoint( _cont ), _sig( sig ) + { + ::signals_called[_sig] = false; + +#ifndef _WINDOWS +#ifdef SIGQUIT + ::signal( _sig, handler ); +#endif // !SIGQUIT +#endif // !_WINDOWS + } + + bool operator()( const eoPop& _pop ) + { + bool& called = ::signals_called[_sig]; + if ( called ) + { + eo::log << eo::logging << "Signal granted…" << std::endl ; + called = false; + return this->eoCheckPoint::operator()( _pop ); + } + return true; + } + + virtual std::string className(void) const { return "eoSignal"; } + + static void handler( int sig ) + { + ::signals_called[sig] = true; + eo::log << eo::logging << "Signal wished…" << std::endl ; + } + +private: + class DummyContinue : public eoContinue + { + public: + bool operator() ( const eoPop& ) { return true; } + } _dummyContinue; + + int _sig; +}; + +/** @} */ + +#endif // !_eoSignal_h diff --git a/trunk/eo/src/utils/eoStat.h b/trunk/eo/src/utils/eoStat.h new file mode 100644 index 000000000..32c3bf9f6 --- /dev/null +++ b/trunk/eo/src/utils/eoStat.h @@ -0,0 +1,495 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoStat.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +// (c) 2010 Thales group +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Contact: http://eodev.sourceforge.net + + Authors: + todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + Johann Dréo + */ +//----------------------------------------------------------------------------- + +#ifndef _eoStat_h +#define _eoStat_h + +#include // accumulate + +#include +#include +#include +#include +//#include + +/** @defgroup Stats Statistics computation + * + * Compute various statistics on a population. + * + * Objects of those classes are generally called by an eoCheckPoint + * to compute statistics about the population at a given generation. + * As they inherit from eoValueParam, they can be printed drectly, + * for instance by an eoMonitor. + * + * @see eoCheckPoint + * @see eoMonitor + * + * @ingroup Utilities + * @{ + */ + +/** + Base class for all statistics that need to be calculated + over the (unsorted) population + (I guess it is not really necessary? MS. + Depstd::ends, there might be reasons to have a stat that is not an eoValueParam, + but maybe I'm just kidding myself, MK) +*/ +template +class eoStatBase : public eoUF&, void> +{ +public: + virtual void lastCall(const eoPop&) {} + virtual std::string className(void) const { return "eoStatBase"; } +}; + + +template class eoCheckPoint; + +/** + The actual class that will be used as base for all statistics + that need to be calculated over the (unsorted) population + It is an eoStatBase AND an eoValueParam so it can be used in Monitors. +*/ +template +class eoStat : public eoValueParam, public eoStatBase +{ +public: + + eoStat(T _value, std::string _description) + : eoValueParam(_value, _description) + {} + + virtual std::string className(void) const + { return "eoStat"; } + + + eoStat& addTo(eoCheckPoint& cp) { cp.add(*this); return *this; } + eoStat& addTo(eoMonitor& mon) { mon.add(*this); return *this; } +}; + + + +/** + Base class for statistics calculated over a sorted snapshot of the population +*/ +template +class eoSortedStatBase : public eoUF&, void> +{ +public: + virtual void lastCall(const std::vector&) {} + virtual std::string className(void) const { return "eoSortedStatBase"; } + +}; + +/** + The actual class that will be used as base for all statistics + that need to be calculated over the sorted population + It's an eoSortedStatBase AND an eoValueParam so it can be used in Monitors. +*/ +template +class eoSortedStat : public eoSortedStatBase, public eoValueParam +{ +public : + eoSortedStat(ParamType _value, std::string _desc) : eoValueParam(_value, _desc) {} + virtual std::string className(void) const { return "eoSortedStat"; } + + eoSortedStat& addTo(eoCheckPoint& cp) { cp.add(*this); return *this; } + eoSortedStat& addTo(eoMonitor& mon) { mon.add(*this); return *this; } +}; + +/** + Average fitness of a population. Fitness can be: + - double + - eoMinimizingFitness or eoMaximizingFitness + The average of each objective is evaluated. + + ( For eoScalarFitnessAssembled user eoAssembledFitnessStat classes.) +*/ +#if defined(_MSC_VER) && (_MSC_VER < 1300) +template class eoAverageStat : public eoStat +#else +template class eoAverageStat : public eoStat +#endif +{ +public : + + using eoStat::value; + + typedef typename EOT::Fitness Fitness; + + eoAverageStat(std::string _description = "Average Fitness") + : eoStat(Fitness(), _description) {} + + static Fitness sumFitness(double _sum, const EOT& _eot){ + _sum += _eot.fitness(); + return _sum; + } + + eoAverageStat(double _value, std::string _desc) : eoStat(_value, _desc) {} + + virtual void operator()(const eoPop& _pop){ + doit(_pop, Fitness()); // specializations for scalar and std::vector + } + + virtual std::string className(void) const { return "eoAverageStat"; } + +private : + + // Default behavior + template + void doit(const eoPop& _pop, T) + { + Fitness v = std::accumulate(_pop.begin(), _pop.end(), Fitness(0.0), eoAverageStat::sumFitness); + + value() = v / _pop.size(); + } + +}; + +/** + Average fitness + Std. dev. of a population, fitness needs to be scalar. +*/ +template +class eoSecondMomentStats : public eoStat > +{ +public : + + using eoStat >::value; + + typedef typename EOT::Fitness fitness_type; + + typedef std::pair SquarePair; + + eoSecondMomentStats(std::string _description = "Average & Stdev") + : eoStat(std::make_pair(0.0,0.0), _description) + {} + + static SquarePair sumOfSquares(SquarePair _sq, const EOT& _eo) + { + double fitness = _eo.fitness(); + + _sq.first += fitness; + _sq.second += fitness * fitness; + return _sq; + } + + virtual void operator()(const eoPop& _pop) + { + SquarePair result = std::accumulate(_pop.begin(), _pop.end(), std::make_pair(0.0, 0.0), eoSecondMomentStats::sumOfSquares); + + double n = _pop.size(); + value().first = result.first / n; // average + value().second = sqrt( (result.second - n * value().first * value().first) / (n - 1.0)); // stdev + } + + virtual std::string className(void) const { return "eoSecondMomentStats"; } +}; + +/** + The n_th element fitness in the population (see eoBestFitnessStat) +*/ +#if defined(_MSC_VER) && (_MSC_VER < 1300) +template +class eoNthElementFitnessStat : public eoSortedStat +#else +template +class eoNthElementFitnessStat : public eoSortedStat +#endif +{ +public : + using eoSortedStat::value; + + typedef typename EOT::Fitness Fitness; + + eoNthElementFitnessStat(unsigned _whichElement, std::string _description = "nth element fitness") + : eoSortedStat(Fitness(), _description), whichElement(_whichElement) {} + + virtual void operator()(const std::vector& _pop) + { + if (whichElement > _pop.size()) + throw std::logic_error("fitness requested of element outside of pop"); + + doit(_pop, Fitness()); + } + + virtual std::string className(void) const { return "eoNthElementFitnessStat"; } +private : + + struct CmpFitness + { + CmpFitness(unsigned _whichElement, bool _maxim) : whichElement(_whichElement), maxim(_maxim) {} + + bool operator()(const EOT* a, const EOT* b) + { + if (maxim) + return a->fitness()[whichElement] > b->fitness()[whichElement]; + + return a->fitness()[whichElement] < b->fitness()[whichElement]; + } + + unsigned whichElement; + bool maxim; + }; + + // for everything else + template + void doit(const std::vector& _pop, T) + { + value() = _pop[whichElement]->fitness(); + } + + unsigned whichElement; +}; + +/* Actually, you shouldn't need to sort the population to get the best fitness + MS - 17/11/00 + + But then again, if another stat needs sorted fitness anyway, getting the best + out would be very fast. + MK - 09/01/03 + +template +class eoBestFitnessStat : public eoStat +{ +public : + typedef typename EOT::Fitness Fitness; + + eoBestFitnessStat(std::string _description = "Best Fitness") : + eoStat(Fitness(), _description) {} + + virtual void operator()(const eoPop& _pop) + { + value() = _pop.nth_element_fitness(0); + } + +}; +*/ + +/** + Best fitness of a population. Fitness can be: + - double + - eoMinimizingFitness or eoMaximizingFitness + + ( For eoScalarFitnessAssembled look at eoAssembledFitnessStat ) +*/ + +#if defined(_MSC_VER) && (_MSC_VER < 1300) +template +class eoBestFitnessStat : public eoStat +#else +template +class eoBestFitnessStat : public eoStat +#endif +{ +public: + + using eoStat::value; + + typedef typename EOT::Fitness Fitness; + + eoBestFitnessStat(std::string _description = "Best ") + : eoStat(Fitness(), _description) + {} + + void operator()(const eoPop& _pop) { + doit(_pop, Fitness() ); // specializations for scalar and std::vector + } + + virtual std::string className(void) const { return "eoBestFitnessStat"; } + + +private : + + struct CmpFitness + { + CmpFitness(unsigned _which, bool _maxim) : which(_which), maxim(_maxim) {} + + bool operator()(const EOT& a, const EOT& b) + { + if (maxim) + return a.fitness()[which] < b.fitness()[which]; + + return a.fitness()[which] > b.fitness()[which]; + } + + unsigned which; + bool maxim; + }; + + // default + template + void doit(const eoPop& _pop, T) + { // find the largest elements + value() = _pop.best_element().fitness(); + } + +}; +/** @example t-eoSSGA.cpp + */ + +template +class eoDistanceStat : public eoStat +{ +public: + + using eoStat::value; + + eoDistanceStat(std::string _name = "distance") + : eoStat(0.0, _name) + {} + + template + double distance(T a, T b) + { + T res = a-b; + return res < 0? -res : res; + } + + double distance(bool a, bool b) + { + return (a==b)? 0 : 1; + } + + void operator()(const eoPop& _pop) + { + double& v = value(); + v = 0.0; + + for (unsigned i = 0; i < _pop.size(); ++i) + { + for (unsigned j = 0; j < _pop.size(); ++j) + { + for (unsigned k = 0; k < _pop[i].size(); ++k) + { + v += distance(_pop[i][k], _pop[j][k]); + } + } + } + + double sz = _pop.size(); + v /= sz * sz * _pop[0].size(); + } + virtual std::string className(void) const { return "eoDistanceStat"; } + +}; + + + +/* +template +class eoStdevStat : public eoStat +{ +public : + typedef typename eoSecondMomentStats::SquarePair SquarePair; + + eoStdevStat(std::string _description = "Stdev") : eoStat(0.0, _description) {} + + virtual void operator()(const eoPop& _pop) + { + SquarePair result = std::accumulate(pop.begin(), pop.end(), std::make_pair(0.0, 0.0), eoSecondMomentStats::sumOfSquares); + + double n = pop.size(); + value() = sqrt( (result.second - (result.first / n)) / (n - 1.0)); // stdev + } +}; +*/ + + +//! A robust measure of dispersion (also called midspread or middle fifty) that is the difference between the third and the first quartile. +template +class eoInterquartileRangeStat : public eoStat< EOT, typename EOT::Fitness > +{ +public: + using eoStat::value; + + eoInterquartileRangeStat( typename EOT::Fitness start, std::string description = "IQR" ) : eoStat( start, description ) {} + + virtual void operator()( const eoPop & _pop ) + { + if( _pop.size() == 0 ) { + // how to implement value() = 0 ? + + } else { + eoPop pop = _pop; + + unsigned int quartile = pop.size()/4; + std::nth_element( pop.begin(), pop.begin()+quartile*1, pop.end() ); + typename EOT::Fitness Q1 = pop[quartile].fitness(); + + std::nth_element( pop.begin(), pop.begin()+quartile*3, pop.end() ); + typename EOT::Fitness Q3 = pop[quartile*3].fitness(); + + value() = Q3 - Q1; + } + } + + virtual std::string className(void) const { return "eoInterquartileRangeStat"; } +}; +/** @example t-eoIQRStat.cpp + */ + +/** Compute the average size of indivudals over the population + * + * Obviously, will work only on representations that implement the (standard) "size()" method, + * like any STL container. + */ +template +class eoAverageSizeStat : public eoStat< EOT, double> +{ +public: + + using eoStat::value; + + eoAverageSizeStat( std::string description = "Av.Size" ) : + eoStat( 0.0, description ) {} // 0 by default + + virtual void operator()( const eoPop & pop ) + { + size_t pop_size = pop.size(); + + std::vector sizes; + sizes.reserve(pop_size); + + for( unsigned int i=0, s = pop_size; i(sum) / static_cast(pop_size); + } + + virtual std::string className(void) const { return "eoAverageSizeStat"; } +}; + +/** @} */ +#endif diff --git a/trunk/eo/src/utils/eoState.cpp b/trunk/eo/src/utils/eoState.cpp new file mode 100644 index 000000000..d9d06d99e --- /dev/null +++ b/trunk/eo/src/utils/eoState.cpp @@ -0,0 +1,194 @@ +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +#include "eoState.h" +#include "eoObject.h" +#include "eoPersistent.h" + +using namespace std; + + + +void removeComment(string& str, string comment) +{ + string::size_type pos = str.find(comment); + + if (pos != string::npos) + { + str.erase(pos, str.size()); + } +} + +bool is_section(const string& str, string& name) +{ + string::size_type pos = str.find("\\section{"); + + if (pos == string::npos) + return false; + //else + + string::size_type end = str.find("}"); + + if (end == string::npos) + return false; + // else + + name = str.substr(pos + 9, end-9); + + return true; +} + +eoState::~eoState(void) +{ + for (unsigned i = 0; i < ownedObjects.size(); ++i) + { + delete ownedObjects[i]; + } +} + +void eoState::registerObject(eoPersistent& registrant) +{ + string name = createObjectName(dynamic_cast(®istrant)); + + pair res = objectMap.insert(make_pair(name, ®istrant)); + + if (res.second == true) + { + creationOrder.push_back(res.first); + } + else + { + throw logic_error("Interval error: object already present in the state"); + } +} + +void eoState::load(const string& _filename) +{ + ifstream is (_filename.c_str()); + + if (!is) + { + string str = "Could not open file " + _filename; + throw runtime_error(str); + } + + load(is); +} + +void eoState::load(std::istream& is) +{ + string str; + string name; + + getline(is, str); + + if (is.fail()) + { + string str = "Error while reading stream"; + throw runtime_error(str); + } + + while(! is.eof()) + { // parse section header + if (is_section(str, name)) + { + string fullString; + ObjectMap::iterator it = objectMap.find(name); + + if (it == objectMap.end()) + { // ignore + while (getline(is, str)) + { + if (is_section(str, name)) + break; + } + } + else + { + + eoPersistent* object = it->second; + + // now we have the object, get lines, remove comments etc. + + string fullstring; + + while (getline(is, str)) + { + if (is.eof()) + throw runtime_error("No section in load file"); + if (is_section(str, name)) + break; + + removeComment(str, getCommentString()); + fullstring += str + "\n"; + } + istringstream the_stream(fullstring); + object->readFrom(the_stream); + } + } + else // if (is_section(str, name)) - what if file empty + { + getline(is, str); // try next line! + // if (is.eof()) + // throw runtime_error("No section in load file"); + } + } + +} + +void eoState::save(const string& filename) const +{ // saves in order of insertion + ofstream os(filename.c_str()); + + if (!os) + { + string msg = "Could not open file: " + filename + " for writing!"; + throw runtime_error(msg); + } + + save(os); +} + +void eoState::save(std::ostream& os) const +{ // saves in order of insertion + for (vector::const_iterator it = creationOrder.begin(); it != creationOrder.end(); ++it) + { + os << "\\section{" << (*it)->first << "}\n"; + (*it)->second->printOn(os); + os << '\n'; + } +} + +string eoState::createObjectName(eoObject* obj) +{ + if (obj == 0) + { + ostringstream os; + os << objectMap.size(); + return os.str(); + } + // else + + string name = obj->className(); + ObjectMap::const_iterator it = objectMap.find(name); + + unsigned count = 1; + while (it != objectMap.end()) + { + ostringstream os; + os << obj->className().c_str() << count++; + name = os.str(); + it = objectMap.find(name); + } + + return name; +} diff --git a/trunk/eo/src/utils/eoState.h b/trunk/eo/src/utils/eoState.h new file mode 100644 index 000000000..53c3a83d5 --- /dev/null +++ b/trunk/eo/src/utils/eoState.h @@ -0,0 +1,138 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoState.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef eoState_h +#define eoState_h + +#include +#include +#include +#include + +#include + +class eoObject; +class eoPersistent; + +/** + eoState can be used to register derivants of eoPersistent. It will + then in turn implement the persistence framework through members load + and save, that will call readFrom and printOn for the registrated objects. + + It is derived from eoFunctorStore, so that it also serves as a place where + all those nifty eo functors can be stored. This is useful in the case you + want to use one of the make_* functions. These functions generally take as their + last argument an eoFunctorStore (or a state) which is used to hold all dynamically + generated data. Note however, that unlike with eoPersistent derived classes, eoFunctorBase + derived classes are not saved or loaded. To govern the creation of functors, + command-line parameters (which can be stored) are needed. + + @ingroup Utilities +*/ +class eoState : public eoFunctorStore +{ +public : + + eoState(void) {} + + ~eoState(void); + + /** + * Object registration function, note that it does not take ownership! + */ + void registerObject(eoPersistent& registrant); + + /** + * Copies the object (MUST be derived from eoPersistent) + * and returns a reference to the owned object. + * Note: it does not register the object, this must be done afterwards! + */ + template + T& takeOwnership(const T& persistent) + { + // If the compiler budges here, T is not a subclass of eoPersistent + ownedObjects.push_back(new T(persistent)); + return static_cast(*ownedObjects.back()); + } + + /** + * Loading error thrown when nothing seems to work. + */ + struct loading_error : public std::runtime_error + { + loading_error(std::string huh = "Error while loading") : std::runtime_error(huh) {} + }; + + std::string getCommentString(void) const { return "#"; } + + /** + * Reads the file specified + * + * @param _filename the name of the file to load from + */ + void load(const std::string& _filename); + + /** + * Reads the file specified + * + * @param is the stream to load from + */ + void load(std::istream& is); + + /** + * Saves the state in file specified + * + * @param _filename the name of the file to save into + */ + void save(const std::string& _filename) const; + + /** + * Saves the state in file specified + * + * @param os the stream to save into + */ + void save(std::ostream& os) const; + +private : + std::string createObjectName(eoObject* obj); + + // first is Persistent, second is the raw data associated with it. + typedef std::map ObjectMap; + + ObjectMap objectMap; + + std::vector creationOrder; + std::vector ownedObjects; + + // private copy and assignment as eoState is supposed to be unique + eoState(const eoState&); + eoState& operator=(const eoState&); + +}; +/** @example t-eoStateAndParser.cpp + */ + +#endif diff --git a/trunk/eo/src/utils/eoStdoutMonitor.h b/trunk/eo/src/utils/eoStdoutMonitor.h new file mode 100644 index 000000000..07c5a02f6 --- /dev/null +++ b/trunk/eo/src/utils/eoStdoutMonitor.h @@ -0,0 +1,61 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +/* +(c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2000 +(c) Thales group, 2010 + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Contact: http://eodev.sourceforge.net + +Authors: + todos@geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + Johann Dréo +*/ + +#ifndef _eoStdoutMonitor_h +#define _eoStdoutMonitor_h + +#include + +#include +#include + +/** + Prints statistics to stdout + + @ingroup Monitors +*/ +class eoStdoutMonitor : public eoOStreamMonitor +{ +public : + eoStdoutMonitor(bool _verbose, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + eoOStreamMonitor( std::cout, _verbose, _delim, _width, _fill) + { +#ifndef DEPRECATED_MESSAGES + eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoStdoutMonitor constructor is deprecated and will be removed in the next release" << std::endl; +#endif // !DEPRECATED_MESSAGES + } + + eoStdoutMonitor(std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) : + eoOStreamMonitor( std::cout, _delim, _width, _fill) + {} + + virtual std::string className(void) const { return "eoStdoutMonitor"; } +}; + +#endif diff --git a/trunk/eo/src/utils/eoTimeCounter.h b/trunk/eo/src/utils/eoTimeCounter.h new file mode 100644 index 000000000..623714156 --- /dev/null +++ b/trunk/eo/src/utils/eoTimeCounter.h @@ -0,0 +1,74 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoTimeCounter.h +// (c) Marc Schoenauer, Maarten Keijzer, and GeNeura Team, 2002 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoTimeCounter_h +#define _eoTimeCounter_h + +#include +#include + + +/** + An eoStat that simply gives the user time since first generation + It has to be tempatized by EOT because it must be an eoStat + + @ingroup Stats +*/ +class eoTimeCounter : public eoUpdater, public eoValueParam +{ +public: + eoTimeCounter() : eoValueParam(0.0, "Time") // : firstTime(true) + { + start = time(NULL); + } + + /** simply stores the time spent in process in its value() */ + virtual void operator()() + { + // ask for system time + utime = clock(); + + // if (firstTime) /* first generation */ + // { + // firstTime=false; + // firstUtime = tmsStruct.tms_utime; + // } + // store elapsed user time + // value(tmsStruct.tms_utime - firstUtime); + // value()=double(utime)/CLOCKS_PER_SEC; + double seconds_elapsed = time(NULL) - start; + + value() = (seconds_elapsed > 2140) ? seconds_elapsed : double(utime)/CLOCKS_PER_SEC; + } + +private: +// bool firstTime; +// clock_t firstUtime; + clock_t utime; + time_t start; +}; + +#endif diff --git a/trunk/eo/src/utils/eoTimedMonitor.h b/trunk/eo/src/utils/eoTimedMonitor.h new file mode 100644 index 000000000..a06ae6cce --- /dev/null +++ b/trunk/eo/src/utils/eoTimedMonitor.h @@ -0,0 +1,88 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoTimedMonitor.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2005 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoTimedMonitor_h +#define _eoTimedMonitor_h + +#include +#include + +#include +#include + +/** + Holds a collection of monitors and only fires them when a time limit + has been reached + + @ingroup Monitors +*/ +class eoTimedMonitor : public eoMonitor +{ +public: + + /** Constructor + + No negative time can be specified, use 0 if you want it to fire "always". + @param seconds_ Specify time limit (s). + */ + eoTimedMonitor(unsigned seconds_) : last_tick(0), seconds(seconds_) {} + + eoMonitor& operator()(void) { + bool monitor = false; + if (last_tick == 0) { + monitor = true; + last_tick = clock(); + } + + clock_t tick = clock(); + + if ( (unsigned)(tick-last_tick) >= seconds * CLOCKS_PER_SEC) { + monitor = true; + } + + if (monitor) { + for (unsigned i = 0; i < monitors.size(); ++i) { + (*monitors[i])(); + } + last_tick = clock(); + } + return *this; + } + + void add(eoMonitor& mon) { monitors.push_back(&mon); } + + virtual std::string className(void) const { return "eoTimedMonitor"; } + +private: + + clock_t last_tick; + + unsigned seconds; + + std::vector monitors; +}; + +#endif diff --git a/trunk/eo/src/utils/eoUniformInit.h b/trunk/eo/src/utils/eoUniformInit.h new file mode 100644 index 000000000..cede61b73 --- /dev/null +++ b/trunk/eo/src/utils/eoUniformInit.h @@ -0,0 +1,161 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + eoUniformInit.h + + (c) Maarten Keijzer, GeNeura Team, Marc Schoenauer, 1999 - 2002 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + */ + +//----------------------------------------------------------------------------- +/** Copied from the eoRndGenerators to have objects deriving from eoInit + * As the whole initialization mechanism in EO is based on eoInit rather than + * eoRndGenerators, we might as well have these directly written without + * overhead + +@class eoUniformInit uniform initialization for doubles, floats, ints, ... +@class eoBooleanInit biased init for booleans +@class eoNormalInit normal intialization for doubles and floats +@class eoNegExpInit negative exponential distributions " +*/ + +#ifndef eoUniformInit_h +#define eoUniformInit_h + +#include "eoRNG.h" +#include "eoInit.h" +#include "eoRealBounds.h" +#include + + +/** @addtogroup Initializators + * @{ + */ + +using eo::rng; + +/** + The class eoUniformInit can be used in the STL apply function + to easily randomize floats and doubles. It can also + be used for ints and unsigneds by virtue of the static_cast + + Also present is a specialization for boolean, that will + ignore the minima and maxima that are possibly set and will + return an unbiased flip of a coin. For a biased flip, use the eoBoolean + + either in [0, _max) if only 1 value (_max) is given + (or none, as _max defaults to 1.0) + or in [_min,_max) if 2 values are given (_min, _max) + +*/ +template class eoUniformInit : public eoInit +{ + public : + /** Ctor with only a max bound */ + eoUniformInit(T _max = T(1.0), eoRng& _rng = rng) : + minim(T(0.0)), range(_max), uniform(_rng) + {} + + /** Ctor with an eoRealBound */ + eoUniformInit(eoRealBounds & _bound, eoRng& _rng = rng) : + minim(_bound.minimum()), range(_bound.range()), uniform(_rng) + {} + + /** Ctor with explicit min and max */ + eoUniformInit(T _min, T _max, eoRng& _rng = rng) : + minim(_min), range(_max-_min), uniform(_rng) + { + if (_min>_max) + throw std::logic_error("Min is greater than Max in uniform_generator"); + } + + /** + Generates the number, uses a static_cast to get the right behaviour + for ints and unsigneds + */ + void operator()(T & _t) + { + _t = minim+static_cast(uniform.uniform(range)); + } + +private : + T minim; + T range; + eoRng& uniform; +}; + + +/** Specialization for bool, does an unbiased coin flip */ +template <> +inline void eoUniformInit::operator()(bool & _b) +{ + _b = uniform.flip(0.5); +} + +/** + The class eoBooleanInit can be used in the STL apply function + to easily generate random booleans with a specified bias +*/ +class eoBooleanInit : public eoInit +{ + public : + eoBooleanInit(float _bias = 0.5, eoRng& _rng = rng) : bias(_bias), gen(_rng) {} + + void operator()(bool & _b) { _b = gen.flip(bias); } + private : + float bias; + eoRng& gen; +}; + +/** + The class normal_generator can be used in the STL generate function + to easily generate gaussian distributed floats and doubles. The user + can supply a standard deviation which defaults to 1. +*/ +template class eoNormalInit : public eoInit +{ + public : + eoNormalInit(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + + void operator()(T & _t) { _t = (T) normal.normal(stdev); } + + private : + T stdev; + eoRng& normal; +}; + +/** + The class negexp_generator can be used in the STL generate function + to easily generate negative exponential distributed floats and doubles. The user + can supply a mean. +*/ +template class eoNegExpInit : public eoInit +{ + public : + eoNegExpInit(T _mean = 1.0, eoRng& _rng = rng) : mean(_mean), negexp(_rng) {} + + void operator()(T & _t) { _t = (T) negexp.negexp(mean); } + + private : + T mean; + eoRng& negexp; +}; + +/** @} */ +#endif diff --git a/trunk/eo/src/utils/eoUpdatable.h b/trunk/eo/src/utils/eoUpdatable.h new file mode 100644 index 000000000..202ef962c --- /dev/null +++ b/trunk/eo/src/utils/eoUpdatable.h @@ -0,0 +1,119 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoUpdatable.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoUpdatable_h +#define _eoUpdatable_h + +#include + +/** + eoUpdatable is a generic class for adding updatation to an existing class + Just says it has an update() method + + @ingroup Utilities +*/ +class eoUpdatable +{ +public: + + /** @brief Virtual destructor */ + virtual ~eoUpdatable() {}; + + virtual void update() = 0; +}; + + + +/** + A base class to actually update an eoUpdatable object + + @ingroup Utilities +*/ +class eoDynUpdater : public eoUpdater +{public : + eoDynUpdater(eoUpdatable & _toUpdate) : toUpdate(_toUpdate) {}; + + virtual void operator()() + { + toUpdate.update(); + } + +private: + eoUpdatable& toUpdate; +}; + +/** + An eoUpdater to update an eoUpdatable object every given time interval + + @ingroup Utilities +*/ +class eoTimedDynUpdate : public eoDynUpdater +{ +public : + eoTimedDynUpdate(eoUpdatable & _toUpdate, time_t _interval) : + eoDynUpdater(_toUpdate), + interval(_interval), last_time(time(0)), first_time(time(0)) {} + + void operator()(void) + { + time_t now = time(0); + + if (now >= last_time + interval) + { + last_time = now; + eoDynUpdater::operator() (); + } + } +private : + const time_t interval; + time_t last_time; + const time_t first_time; +}; + +/** + An eoUpdater to update an eoUpdatable object every given tic + + @ingroup Utilities +*/ +class eoCountedDynUpdate : public eoDynUpdater +{ +public : + eoCountedDynUpdate(eoUpdatable & _toUpdate, unsigned _interval) + : eoDynUpdater(_toUpdate), interval(_interval), counter(0) {} + + void operator()(void) + { + if (++counter % interval == 0) + { + eoDynUpdater::operator() (); + } + } +private : + const unsigned interval; + unsigned counter; +}; + +#endif diff --git a/trunk/eo/src/utils/eoUpdater.cpp b/trunk/eo/src/utils/eoUpdater.cpp new file mode 100644 index 000000000..dd6a38960 --- /dev/null +++ b/trunk/eo/src/utils/eoUpdater.cpp @@ -0,0 +1,46 @@ +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + +#include +#include + +using namespace std; + +void eoTimedStateSaver::operator()(void) +{ + time_t now = time(0); + + if (now >= last_time + interval) + { + last_time = now; + ostringstream os; + os << prefix << (now - first_time) << '.' << extension; + state.save(os.str()); + } +} + +void eoCountedStateSaver::doItNow(void) +{ + ostringstream os; + os << prefix << counter << '.' << extension; + state.save(os.str()); +} + +void eoCountedStateSaver::operator()(void) +{ + if (++counter % interval == 0) + doItNow(); +} + +void eoCountedStateSaver::lastCall(void) +{ + if (saveOnLastCall) + doItNow(); +} diff --git a/trunk/eo/src/utils/eoUpdater.h b/trunk/eo/src/utils/eoUpdater.h new file mode 100644 index 000000000..072b9a9bb --- /dev/null +++ b/trunk/eo/src/utils/eoUpdater.h @@ -0,0 +1,172 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoUpdater.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2000 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _eoUpdater_h +#define _eoUpdater_h + +#include +#include +#include +#include + +template class eoCheckPoint; + +/** + eoUpdater is a generic procudere for updating whatever you want. + Yet again an empty name + + @ingroup Utilities +*/ +class eoUpdater : public eoF +{ +public: + virtual void lastCall() {} + virtual std::string className(void) const { return "eoUpdater"; } + + template + eoUpdater& addTo(eoCheckPoint& cp) { cp.add(*this); return *this; } +}; + +/** + an eoUpdater that simply increments a counter + + @ingroup Utilities +*/ +template +class eoIncrementor : public eoUpdater +{public : + /** Default Ctor - requires a reference to the thing to increment */ + eoIncrementor(T& _counter, T _stepsize = 1) : counter(_counter), stepsize(_stepsize) {} + + /** Simply increments */ + virtual void operator()() + { + counter += stepsize; + } + + virtual std::string className(void) const { return "eoIncrementor"; } +private: + T& counter; + T stepsize; +}; + +/** an eoUpdater that is an eoValueParam (and thus OWNS its counter) + * Mandatory for generation counter in make_checkpoint + + @ingroup Utilities +*/ +template +class eoIncrementorParam : public eoUpdater, public eoValueParam +{ +public: + + using eoValueParam::value; + + /** Default Ctor : a name and optionally an increment*/ + eoIncrementorParam( std::string _name, T _stepsize = 1) : + eoValueParam(T(0), _name), stepsize(_stepsize) {} + + /** Ctor with a name and non-zero initial value + * and mandatory stepSize to remove ambiguity + */ + eoIncrementorParam( std::string _name, T _countValue, T _stepsize) : + eoValueParam(_countValue, _name), stepsize(_stepsize) {} + + /** Simply increments */ + virtual void operator()() + { + value() += stepsize; + } + + virtual std::string className(void) const { return "eoIncrementorParam"; } + +private: + T stepsize; +}; + +#include + +/** + an eoUpdater that saves a state every given time interval + + @ingroup Utilities +*/ +class eoTimedStateSaver : public eoUpdater +{ +public : + eoTimedStateSaver(time_t _interval, const eoState& _state, std::string _prefix = "state", std::string _extension = "sav") : state(_state), + interval(_interval), last_time(time(0)), first_time(time(0)), + prefix(_prefix), extension(_extension) {} + + void operator()(void); + + virtual std::string className(void) const { return "eoTimedStateSaver"; } +private : + const eoState& state; + + const time_t interval; + time_t last_time; + const time_t first_time; + const std::string prefix; + const std::string extension; +}; + +/** + an eoUpdater that saves a state every given generations + + @ingroup Utilities +*/ +class eoCountedStateSaver : public eoUpdater +{ +public : + eoCountedStateSaver(unsigned _interval, const eoState& _state, std::string _prefix, bool _saveOnLastCall, std::string _extension = "sav", unsigned _counter = 0) + : state(_state), interval(_interval), counter(_counter), + saveOnLastCall(_saveOnLastCall), + prefix(_prefix), extension(_extension) {} + + eoCountedStateSaver(unsigned _interval, const eoState& _state, std::string _prefix = "state", std::string _extension = "sav", unsigned _counter = 0) + : state(_state), interval(_interval), counter(_counter), + saveOnLastCall(true), + prefix(_prefix), extension(_extension) {} + + virtual void lastCall(void); + void operator()(void); + + virtual std::string className(void) const { return "eoCountedStateSaver"; } +private : + void doItNow(void); + + const eoState& state; + const unsigned interval; + unsigned counter; + bool saveOnLastCall; + + const std::string prefix; + const std::string extension; +}; + + +#endif diff --git a/trunk/eo/src/utils/make_help.cpp b/trunk/eo/src/utils/make_help.cpp new file mode 100644 index 000000000..a7ab040cd --- /dev/null +++ b/trunk/eo/src/utils/make_help.cpp @@ -0,0 +1,120 @@ +//----------------------------------------------------------------------------- +// make_help.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- +#ifdef _MSC_VER +// to avoid long name warnings +#pragma warning(disable:4786) +#endif + +#include +#include +#include + +#include + +using namespace std; + +/** Generation of the status file, and output of the help message if needed + * + * MUST be called after ALL parameters have been read in order to list them + * + * Warning: this is a plain .cpp file and shoudl NOT be included anywhere, + * but compiled separately and stored in a library. + * + * It is declared in all make_xxx.h files in representation-dependent dirs + * but it is NOT representation-dependent itself - that's why it's in utils + */ +void make_help(eoParser & _parser) +{ + // name of the "status" file where all actual parameter values will be saved + string str_status = _parser.ProgramName() + ".status"; // default value + eoValueParam& statusParam = _parser.createParam(str_status, "status","Status file",'\0', "Persistence" ); + + // dump status file BEFORE help, so the user gets a chance to use it: + // it's probably the case where she/he needs it most!!! + // Only help parameter will not be in status file - but who cares??? + if (statusParam.value() != "") + { + ofstream os(statusParam.value().c_str()); + os << _parser; // and you can use that file as parameter file + } + // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED + // i.e. in case you need parameters somewhere else, postpone these + if (_parser.userNeedsHelp()) + { + _parser.printHelp(cout); + cout << "You can use an edited copy of file " << statusParam.value() + << " as parameter file" << endl; + exit(1); + } +} + +/** test a dir. + * Creates it if does not exist + * If exists, throws an exception or erase everything there, + * depending on last parameter + * + * Always return true (for code easy writing on the other side :-) + */ +bool testDirRes(std::string _dirName, bool _erase=true) +{ + string s = "test -d " + _dirName; + int res = system(s.c_str()); + // test for (unlikely) errors + if ( (res==-1) || (res==127) ) + { + s = "Problem executing test of dir " + _dirName; + throw runtime_error(s); + } + // now make sure there is a dir without any file in it - or quit + if (res) // no dir present + { + s = string("mkdir ")+ _dirName; + int res = system(s.c_str()); + (void)res; + return true; + } + // else + if (_erase) // OK to erase + { + s = string("/bin/rm ")+ _dirName + "/*"; + int res = system(s.c_str()); + (void)res; + return true; + } + //else + // WARNING: bug if dir exists and is empty; this says it is not! + // shoudl use scandir instead - no time now :-((( MS Aug. 01 + s = "Dir " + _dirName + " is not empty"; + throw runtime_error(s); + return true; +} + + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-offsets: ((c . 0)) +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/eo/src/utils/pipecom.cpp b/trunk/eo/src/utils/pipecom.cpp new file mode 100644 index 000000000..a175112f9 --- /dev/null +++ b/trunk/eo/src/utils/pipecom.cpp @@ -0,0 +1,175 @@ +/* ---------------------------------------------------------------------- + * Where........: CMAP - Polytechnique + * File.........: pipecom.c + * Author.......: Bertrand Lamy (Equipe genetique) + * Created......: Mon Mar 13 13:50:11 1995 + * Description..: Communication par pipe bidirectionnel avec un autre process + * ---------------------------------------------------------------------- + */ + +// MSC equivalent must be written and tested or some #idef instructions added +// with a clear message at compile time that this is for Unix only ??? + +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifndef _WINDOWS + +#include +#include +#include +#include +#include + +#include "pipecom.h" + + + +int Check( PCom *com ) +{ + if( ! com ) { + fprintf( stderr, "PipeCom: Null pointer.\n" ); + fflush( stderr ); + return 0; + } + if( kill( com->pid, 0 ) != 0 ) { + fprintf( stderr, "PipeCom: process doesn't exists.\n" ); + fflush( stderr ); + return 0; + } + return 1; +} + + +PCom * PipeComOpen( char *prog ) +{ + char *args[2]; + args[0] = prog; + args[1] = NULL; + return PipeComOpenArgv( prog, args ); +} + + +PCom * PipeComOpenArgv( char *prog, char *argv[] ) +{ + int toFils[2]; + int toPere[2]; + int sonPid; + PCom * ret = NULL; + + if( pipe( toFils ) < 0 ) { + perror( "PipeComOpen: Creating pipes" ); + return ret; + } + if( pipe( toPere ) < 0 ) { + perror( "PipeComOpen: Creating pipes" ); + return ret; + } + + switch( (sonPid = vfork()) ) { + case -1: + perror("PipeComOpen: fork failed" ); + return ret; + break; + + case 0: + /* --- Here's the son --- */ + /* --- replace old stdin --- */ + if( dup2( toFils[0], fileno(stdin) ) < 0 ) { + perror( "PipeComOpen(son): could not connect" ); + exit( -1 ); + /* --- AVOIR: kill my father --- */ + } + if( dup2( toPere[1], fileno(stdout) ) < 0 ) { + perror( "PipeComOpen(son): could not connect" ); + exit( -1 ); + } + if( execvp( prog, argv ) < 0 ) { + perror( prog ); + perror( "PipeComOpen: can't exec" ); + exit(1); + } + break; + default: + ret = (PCom *) malloc( sizeof(PCom) ); + if( ! ret ) + return NULL; + + ret->fWrit = (FILE *)fdopen( toFils[1], "w" ); + ret->fRead = (FILE *)fdopen( toPere[0], "r" ); + ret->pid = sonPid; + } + return ret; +} + + +int PipeComSend( PCom *to, const char *line ) +{ + int nb = 0; + if( ! Check(to ) ) + return nb; + nb = fprintf( to->fWrit, line, 0 ); + fflush( to->fWrit ); + return nb; +} + + +int PipeComSendn( PCom *to, const char *data, int n ) +{ + int nb = 0; + if( ! Check(to) ) + return nb; + + nb = fwrite( data, 1, n, to->fWrit ); + fflush( to->fWrit ); + return nb; +} + + +int PipeComReceive( PCom *from, char *data, int max ) +{ + if( ! Check(from) ) + return 0; + if( ! data ) { + fprintf( stderr, "PipeComReceive: Invalid data pointer\n" ); + fflush( stderr ); + return 0; + } + if( fgets( data, max, from->fRead ) ) + return strlen(data); + return 0; +} + + + +int PipeComClose( PCom *to ) +{ + if( ! Check(to) ) + return 0; + fclose( to->fRead ); + fclose( to->fWrit ); + free( to ); + return 1; +} + + + +int PipeComWaitFor( PCom *from, char *what ) +{ + char buffer[256]; + do { + if( ! PipeComReceive( from, buffer, 256 ) ) + return 0; + } while( strcmp( buffer, what ) ); + return 1; +} + +#endif /*_MSC_VER*/ + + +// Local Variables: +// coding: iso-8859-1 +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/eo/src/utils/pipecom.h b/trunk/eo/src/utils/pipecom.h new file mode 100644 index 000000000..56b031708 --- /dev/null +++ b/trunk/eo/src/utils/pipecom.h @@ -0,0 +1,47 @@ +/* ---------------------------------------------------------------------- + * Where........: CMAP - Polytechnique + * File.........: pipecom.h + * Author.......: Bertrand Lamy (EEAAX) + * Created......: Thu Mar 9 17:21:15 1995 + * Description..: Pipe communication with a process + * ---------------------------------------------------------------------- + */ + +// This file cannot be used from C any more due to some const additions. +// However, if you remove the const, it should work in C as well. + +#ifndef EO_PIPECOM_H +#define EO_PIPECOM_H + +#include + + +typedef struct PipeCommunication { + FILE *fWrit; + FILE *fRead; + int pid; +} PCom; + + +extern PCom *PipeComOpen( char *prog ); +extern PCom *PipeComOpenArgv( char *prog, char *argv[] ); + +extern int PipeComSend( PCom *to, const char *line ); +extern int PipeComSendn( PCom *to, const char *data, int n ); + +extern int PipeComReceive( PCom *from, char *data, int max ); + +extern int PipeComClose( PCom *to ); +extern int PipeComWaitFor( PCom *from, char *what ); + + +#endif // EO_PIPECOM_H + + + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/eo/src/utils/rnd_generators.h b/trunk/eo/src/utils/rnd_generators.h new file mode 100644 index 000000000..d71caf803 --- /dev/null +++ b/trunk/eo/src/utils/rnd_generators.h @@ -0,0 +1,173 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + rnd_generators.h + Some utility functors for generating random generators: + uniform_generator : generates uniform floats or doubles + random_generator : generates unsigneds, ints etc. + normal_generator : normally distributed floats or doubles + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +//----------------------------------------------------------------------------- + +#ifndef eoRND_GENERATORS_H +#define eoRND_GENERATORS_H + +#include "eoRNG.h" +#include + +/** @addtogroup Random + * @{ + */ + +/** + The class uniform_generator can be used in the STL generate function + to easily generate random floats and doubles + either in [0, _max) if only 1 value (_max) is given + (or none, as _max defaults to 1.0) + or in [_min,_max) if 2 values are given (_min, _max) +*/ +template class uniform_generator +{ + // added new ctor with 2 params, and modified the data to minim and range + // (was maxim only). MS 3/11/2000 + public : + uniform_generator(T _max = T(1.0), eoRng& _rng = rng) : + minim(T(0.0)), range(_max), uniform(_rng) {} + uniform_generator(T _min, T _max, eoRng& _rng = rng) : + minim(_min), range(_max-_min), uniform(_rng) + { + if (_min>_max) + throw std::logic_error("Min is greater than Max in uniform_generator"); + } + + T operator()(void) { return minim+static_cast(uniform.uniform(range)); } + +private : + T minim; + T range; + eoRng& uniform; +}; + +/** + The class boolean_generator can be used in the STL generate function + to easily generate random booleans with a specified bias +*/ +class boolean_generator +{ + public : + boolean_generator(float _bias = 0.5, eoRng& _rng = rng) : bias(_bias), gen(_rng) {} + + bool operator()(void) { return gen.flip(bias); } + private : + float bias; + eoRng& gen; +}; + +/** + The class random_generator can be used in the STL generate function + to easily generate random ints + either between [0, _max) if only one value (_max) is given to the ctor + or in [_min,_max) if 2 values are given (_min, _max) +*/ +template class random_generator +{ + public : + // added new ctor with 2 params, and modified the data to minim and range + // (was maxim only). MS 3/11/2000 + random_generator(T _max, eoRng& _rng = rng) : + minim(T(0.0)), range(_max), random(_rng) {} + random_generator(T _min, T _max, eoRng& _rng = rng) : + minim(_min), range(_max-_min), random(_rng) + { + if (_min>_max) + throw std::logic_error("Min is greater than Max in random_generator"); + } + + T operator()(void) { return (T) (minim + random.random(range)); } + +private : + T minim; + T range; + eoRng& random; +}; + +/// Specialization for bool +template <> +inline bool random_generator::operator()(void) +{ + return random.flip(0.5); +} + +/** + Another class random_generator that can be used in the STL random_shuffle + function (see eoPop::shuffle): its operator() takes an unsigned argument m + and must return an unsigned uniformly distributed in [0,m} +*/ +template class UF_random_generator +{ + public : + UF_random_generator(eoRng& _rng = rng) : + random(_rng) {} + + T operator()(T _t) { return (T) (random.random(_t)); } + +private : + eoRng& random; +}; + + +/** + The class normal_generator can be used in the STL generate function + to easily generate gaussian distributed floats and doubles. The user + can supply a standard deviation which defaults to 1. +*/ +template class normal_generator +{ + public : + normal_generator(T _stdev = T(1.0), eoRng& _rng = rng) : stdev(_stdev), normal(_rng) {} + + T operator()(void) { return (T) normal.normal(stdev); } + + private : + T stdev; + eoRng& normal; +}; + +/** + The class negexp_generator can be used in the STL generate function + to easily generate negative exponential distributed floats and doubles. The user + can supply a mean. +*/ +template class negexp_generator +{ + public : + negexp_generator(T _mean = 1.0, eoRng& _rng = rng) : mean(_mean), negexp(_rng) {} + + T operator()(void) { return (T) negexp.negexp(mean); } + + private : + T mean; + eoRng& negexp; +}; + +/** @} */ +#endif diff --git a/trunk/eo/src/utils/selectors.h b/trunk/eo/src/utils/selectors.h new file mode 100644 index 000000000..37df7997b --- /dev/null +++ b/trunk/eo/src/utils/selectors.h @@ -0,0 +1,340 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + ----------------------------------------------------------------------------- + selectors.h + A bunch of useful selector functions. They generally have three forms: + + template + It select(It begin, It end, params, eoRng& gen = rng); + + template + const EOT& select(const eoPop& pop, params, eoRng& gen = rng); + + template + EOT& select(eoPop& pop, params, eoRng& gen = rng); + + where select is one of: roulette_wheel, deterministic_tournament + and stochastic_tournament (at the moment). + + (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + */ + +#ifndef SELECT__H +#define SELECT__H + +#include + +#include "eoRNG.h" +#include +/** +@addtogroup Selectors +@{ +*/ + +template +bool minimizing_fitness() +{ + EOT eo1; // Assuming people don't do anything fancy in the default constructor! + EOT eo2; + + /* Dear user, when the two line below do not compile you are most + likely not working with scalar fitness values. In that case we're sorry + but you cannot use lottery or roulette_wheel selection... + */ + +#ifdef _MSC_VER + eo1.fitness( EOT::Fitness(0.0) ); + eo2.fitness( EOT::Fitness(1.0) ); +#else + eo1.fitness( typename EOT::Fitness(0.0) ); // tried to cast it to an EOT::Fitness, but for some reason GNU barfs on this + eo2.fitness( typename EOT::Fitness(1.0) ); +#endif + + return eo2 < eo1; // check whether we have a minimizing fitness +} + +inline double scale_fitness(const std::pair& _minmax, double _value) +{ + if (_minmax.first == _minmax.second) + { + return 0.0; // no differences in fitness, population converged! + } + // else + + return (_value - _minmax.first) / (_minmax.second - _minmax.first); +} + +template +double sum_fitness(It begin, It end) +{ + double sum = 0.0; + + for (; begin != end; ++begin) + { + double v = static_cast(begin->fitness()); + if (v < 0.0) + throw std::logic_error("sum_fitness: negative fitness value encountered"); + sum += v; + } + + return sum; +} + +template +double sum_fitness(const eoPop& _pop) +{ + return sum_fitness(_pop.begin(), _pop.end()); +} + +template +double sum_fitness(const eoPop& _pop, std::pair& _minmax) +{ + double rawTotal, scaledTotal; + + typename eoPop::const_iterator it = _pop.begin(); + + _minmax.first = it->fitness(); + _minmax.second = it++->fitness(); + + for(; it != _pop.end(); ++it) + { + double v = static_cast(it->fitness()); + + _minmax.first = std::min(_minmax.first, v); + _minmax.second = std::max(_minmax.second, v); + + rawTotal += v; + } + + if (minimizing_fitness()) + { + std::swap(_minmax.first, _minmax.second); + } + + scaledTotal = 0.0; + + // unfortunately a second loop is neccessary to scale the fitness + for (it = _pop.begin(); it != _pop.end(); ++it) + { + double v = scale_fitness(_minmax, static_cast(it->fitness())); + + scaledTotal += v; + } + + return scaledTotal; +} + +template +It roulette_wheel(It _begin, It _end, double total, eoRng& _gen = rng) +{ + + double roulette = _gen.uniform(total); + + if (roulette == 0.0) // covers the case where total==0.0 + return _begin + _gen.random(_end - _begin); // uniform choice + + It i = _begin; + + while (roulette > 0.0) + { + roulette -= static_cast(*(i++)); + } + + return --i; +} + +template +const EOT& roulette_wheel(const eoPop& _pop, double total, eoRng& _gen = rng) +{ + double roulette = _gen.uniform(total); + + if (roulette == 0.0) // covers the case where total==0.0 + return _pop[_gen.random(_pop.size())]; // uniform choice + + typename eoPop::const_iterator i = _pop.begin(); + + while (roulette > 0.0) + { + roulette -= static_cast((i++)->fitness()); + } + + return *--i; +} + +template +EOT& roulette_wheel(eoPop& _pop, double total, eoRng& _gen = rng) +{ + float roulette = _gen.uniform(total); + + if (roulette == 0.0) // covers the case where total==0.0 + return _pop[_gen.random(_pop.size())]; // uniform choice + + typename eoPop::iterator i = _pop.begin(); + + while (roulette > 0.0) + { + roulette -= static_cast((i++)->fitness()); + } + + return *--i; +} + +template +It deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) +{ + It best = _begin + _gen.random(_end - _begin); + + for (unsigned i = 0; i < _t_size - 1; ++i) + { + It competitor = _begin + _gen.random(_end - _begin); + + if (*best < *competitor) + { + best = competitor; + } + } + + return best; +} + +template +const EOT& deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +EOT& deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +It inverse_deterministic_tournament(It _begin, It _end, unsigned _t_size, eoRng& _gen = rng) +{ + It worst = _begin + _gen.random(_end - _begin); + + for (unsigned i = 1; i < _t_size; ++i) + { + It competitor = _begin + _gen.random(_end - _begin); + + if (competitor == worst) + { + --i; + continue; // try again + } + + if (*competitor < *worst) + { + worst = competitor; + } + } + + return worst; +} + +template +const EOT& inverse_deterministic_tournament(const eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +EOT& inverse_deterministic_tournament(eoPop& _pop, unsigned _t_size, eoRng& _gen = rng) +{ + return *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen); +} + +template +It stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) +{ + It i1 = _begin + _gen.random(_end - _begin); + It i2 = _begin + _gen.random(_end - _begin); + + bool return_better = _gen.flip(_t_rate); + + if (*i1 < *i2) + { + if (return_better) return i2; + // else + + return i1; + } + else + { + if (return_better) return i1; + // else + } + // else + + return i2; +} + +template +const EOT& stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +EOT& stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +It inverse_stochastic_tournament(It _begin, It _end, double _t_rate, eoRng& _gen = rng) +{ + It i1 = _begin + _gen.random(_end - _begin); + It i2 = _begin + _gen.random(_end - _begin); + + bool return_worse = _gen.flip(_t_rate); + + if (*i1 < *i2) + { + if (return_worse) return i1; + // else + + return i2; + } + else + { + if (return_worse) return i2; + // else + } + // else + + return i1; +} + +template +const EOT& inverse_stochastic_tournament(const eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +template +EOT& inverse_stochastic_tournament(eoPop& _pop, double _t_rate, eoRng& _gen = rng) +{ + return *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen); +} + +/** @} */ + +#endif diff --git a/trunk/eo/test/CMakeLists.txt b/trunk/eo/test/CMakeLists.txt new file mode 100644 index 000000000..860968ffb --- /dev/null +++ b/trunk/eo/test/CMakeLists.txt @@ -0,0 +1,116 @@ +############################################################################### +## +## CMakeLists file for eo/test +## +############################################################################### + + +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/contrib) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/contrib/MGE) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +###################################################################################### +### 2) Specify where CMake can find the libraries +###################################################################################### + +LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) + +###################################################################################### +### 3) Define your targets and link the librairies +###################################################################################### + +SET (TEST_LIST + t-eofitness + t-eoRandom + t-eobin + t-eoVirus + t-MGE + t-MGE1bit + t-MGE-control + t-eoStateAndParser + t-eoCheckpointing + t-eoSSGA + t-eoExternalEO + t-eoSymreg + t-eo + t-eoReplacement + t-eoSelect + t-eoGenOp + t-eoGA + t-eoReal + t-eoVector + t-eoESAll + t-eoPBIL + t-eoFitnessAssembled + t-eoFitnessAssembledEA + t-eoRoulette + t-eoSharing + t-eoCMAES + t-eoSecondsElapsedContinue + t-eoRNG + t-eoEasyPSO + t-eoInt + t-eoInitPermutation + t-eoSwapMutation + t-eoShiftMutation + t-eoTwoOptMutation + t-eoRingTopology + t-eoSyncEasyPSO + t-eoOrderXover + t-eoExtendedVelocity + t-eoLogger + #t-eoIQRStat # Temporary by-passed in order to test coverage + t-eoParallel + #t-openmp # does not work anymore since functions used in this test were removed from EO + #t-eoDualFitness + t-eoParser + ) + + +FOREACH (test ${TEST_LIST}) + SET ("T_${test}_SOURCES" "${test}.cpp") +ENDFOREACH (test) + + +IF(ENABLE_MINIMAL_CMAKE_TESTING) + + SET (MIN_TEST_LIST t-eoEasyPSO) + FOREACH (mintest ${MIN_TEST_LIST}) + SET ("T_${mintest}_SOURCES" "${mintest}.cpp") + ADD_EXECUTABLE(${mintest} ${T_${mintest}_SOURCES}) + ADD_TEST(${mintest} ${mintest}) + TARGET_LINK_LIBRARIES(${mintest} ga es cma eoutils eo) + ENDFOREACH (mintest) + +ELSEIF(ENABLE_CMAKE_TESTING) + + FOREACH (test ${TEST_LIST}) + ADD_EXECUTABLE(${test} ${T_${test}_SOURCES}) + ADD_TEST(${test} ${test}) + TARGET_LINK_LIBRARIES(${test} ga es cma eoutils eo) + INSTALL(TARGETS ${test} RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/test COMPONENT test) + ENDFOREACH (test) + + SET(RESOURCES + boxplot.py + boxplot_to_png.py + boxplot_to_pdf.py + t-openmp.py + ) + + FOREACH(file ${RESOURCES}) + EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_CURRENT_SOURCE_DIR}/${file} + ${CMAKE_CURRENT_BINARY_DIR}/${file} + ) + ENDFOREACH(file) + +ENDIF(ENABLE_MINIMAL_CMAKE_TESTING) + +###################################################################################### diff --git a/trunk/eo/test/ChangeLog b/trunk/eo/test/ChangeLog new file mode 100644 index 000000000..747025387 --- /dev/null +++ b/trunk/eo/test/ChangeLog @@ -0,0 +1,36 @@ +2006-12-04 Jochen Kpper + + * Makefile.am: Add t-eoRNG + + * t-eoRNG.cpp: Start test for random number generator. + +2006-12-02 Jochen Kpper + + * t-MGE1bit.cpp: Change float to double. + + * t-eoGenOp.cpp (init): Do not add std::ends to end of string, as this + results in escape-codes (^@) to be printed at runtime and is not + necessary anyway. + + * test/t-eoSymreg.cpp (SymregNode::operator()): Initialize r1 and r2 to + avoid compiler warnings. + + +2006-07-02 Thomas Legrand + + * test/t-eoEasyPSO.cpp: added PSO test + + * test/Makefile.am: added PSO test + + +2006-02-27 Thomas Legrand + + * test/t-eoSyncEasyPSO.cpp: added synchronous PSO test + * test/t-eoEasyPSO.cpp: customized PSO test (initialization) + * test/Makefile.am: added synchronous PSO test + + * Local Variables: + * coding: iso-8859-1 + * mode: flyspell + * fill-column: 80 + * End: diff --git a/trunk/eo/test/RoyalRoad.h b/trunk/eo/test/RoyalRoad.h new file mode 100644 index 000000000..5592f3cd5 --- /dev/null +++ b/trunk/eo/test/RoyalRoad.h @@ -0,0 +1,60 @@ +/* + RoyalRoad.h + -- Implementation of the Royal Road function for any length and block size + (c) GeNeura Team 2001, Marc Schoenauer 2000 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr +CVS Info: $Date: 2001-06-21 12:03:17 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/test/RoyalRoad.h,v 1.3 2001-06-21 12:03:17 jmerelo Exp $ $Author: jmerelo $ +*/ + +#ifndef RoyalRoad_h +#define RoyalRoad_h + +template +class RoyalRoad: public eoEvalFunc { + + public: + + typedef typename EOT::Fitness FitT; + + /// Ctor: takes a length, and divides that length in equal parts + RoyalRoad( unsigned _div ): eoEvalFunc(), div( _div ) {}; + + // Applies the function + virtual void operator() ( EOT & _eo ) { + FitT fitness = 0; + if (_eo.invalid()) { + for ( unsigned i = 0; i < _eo.size()/div; i ++ ) { + bool block = true; + for ( unsigned j = 0; j < div; j ++ ) { + block &= _eo[i*div+j]; + } + if (block) { + fitness += div; + } + } + _eo.fitness( fitness ); + } + }; + + private: + unsigned div; + +}; + +#endif diff --git a/trunk/eo/test/binary_value.h b/trunk/eo/test/binary_value.h new file mode 100644 index 000000000..59dc4cc3c --- /dev/null +++ b/trunk/eo/test/binary_value.h @@ -0,0 +1,16 @@ +#include + +//----------------------------------------------------------------------------- + +/** Just the simple function that takes binary value of a chromosome and sets + the fitnes. + @param _chrom A binary chromosome +*/ + +template double binary_value(const Chrom& _chrom) +{ + double sum = 0.0; + for (unsigned i=0; i<_chrom.size(); i++) + sum += _chrom[i]; + return sum; +} diff --git a/trunk/eo/test/boxplot.py b/trunk/eo/test/boxplot.py new file mode 100755 index 000000000..20273c18f --- /dev/null +++ b/trunk/eo/test/boxplot.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +import pylab +import sys + +if __name__ == '__main__': + if len(sys.argv) < 2: + print 'Usage: boxplot.py [Results files, ...]' + sys.exit() + + for i in range(1, len(sys.argv)): + pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] ) + + pylab.xlabel('iterations') + pylab.show() diff --git a/trunk/eo/test/boxplot_to_pdf.py b/trunk/eo/test/boxplot_to_pdf.py new file mode 100755 index 000000000..f29edeb21 --- /dev/null +++ b/trunk/eo/test/boxplot_to_pdf.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +import pylab +import sys + +if __name__ == '__main__': + if len(sys.argv) < 3: + print 'Usage: boxplot_to_pdf.py [Results files, ...] [output file in .pdf]' + sys.exit() + + for i in range(1, len(sys.argv) - 1): + pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] ) + + pylab.xlabel('iterations') + pylab.savefig( sys.argv[ len(sys.argv) - 1 ], format='pdf', transparent=True ) diff --git a/trunk/eo/test/boxplot_to_png.py b/trunk/eo/test/boxplot_to_png.py new file mode 100755 index 000000000..17fb35bc9 --- /dev/null +++ b/trunk/eo/test/boxplot_to_png.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +import pylab +import sys + +if __name__ == '__main__': + if len(sys.argv) < 3: + print 'Usage: boxplot_to_png.py [Results files, ...] [output file in .png]' + sys.exit() + + for i in range(1, len(sys.argv) - 1): + pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] ) + + pylab.xlabel('iterations') + pylab.savefig( sys.argv[ len(sys.argv) - 1 ], format='png', transparent=True, papertype='a0' ) diff --git a/trunk/eo/test/fitness_traits.cpp b/trunk/eo/test/fitness_traits.cpp new file mode 100644 index 000000000..4af0e34bb --- /dev/null +++ b/trunk/eo/test/fitness_traits.cpp @@ -0,0 +1,431 @@ +#include // for pair +#include +#include +#include +#include +#include // for exp + +using namespace std; + +/* fitness_traits.h */ + +// default traits: defaults to a double that needs to be maximized +template +struct fitness_traits +{ + // Needs mapping can be used to figure out whether you need to do fitness scaling (or not) + const static bool needs_mapping = false; + + // storage_type: what to store next to the genotype + typedef T storage_type; + + // performance_type: what the eoEvalFunc calculates + typedef T performance_type; + + // worth_type: what the scaling function does + typedef T worth_type; + + // access_performance: how to get from what is stored to a mutable performance + static performance_type& access_performance(storage_type& a) { return a; } + + // access_worth: how to get from what is stored to a mutable worth + static worth_type& access_worth(storage_type& a) { return a; } + + // get_performance: from storage_type to a performance figure + static performance_type get_performance(storage_type a) { return a; } + + // get_worth: from storage_type to a worth figure + static worth_type get_worth(storage_type a) { return a; } + + // get the fitness out of the individual + template + static worth_type get_fitness(const EOT& _eo) { return _eo.performance(); } + + // compare the two individuals + template + static bool is_better(const EOT& _eo1, const EOT& _eo2) + { + return _eo1.performance() > _eo2.performance(); + } +}; + +struct minimization {}; +struct maximization {}; + +struct fitness_traits : public fitness_traits +{ + // for minimization, invert the is_better + template + static bool is_better(const EOT& _eo1, const EOT& _eo2) + { + return _eo1.performance() < _eo2.performance(); + } +}; + +// for maximization, just take the default behaviour +struct fitness_traits : public fitness_traits {}; + +// forward declaration +//template class eoPop; +//template class EO; + +// unfortunately, partial template specialization is not approved by Microsoft (though ANSI says it's ok) +// Probably need some macro-magic to make this work (MicroSoft == MacroHard) +// A pair class: first == performance, second == worth, redefine all types, data and functions +template +struct fitness_traits< pair > +{ + typedef pair storage_type; + typedef Performance performance_type; + typedef Worth worth_type; + + const static bool needs_mapping = true; + + static performance_type& access_performance(storage_type& a) { return a.first; } + static worth_type& access_worth(storage_type& a) { return a.second; } + + static performance_type get_performance(const storage_type& a) { return a.first; } + static worth_type get_worth(const storage_type& a) { return a.second; } + + // This function calls _eo.worth() which in turn checks the fitness flag and calls get_worth above + // The compiler should be able to inline all these calls and come up with a very compact solution + template + static worth_type get_fitness(const EOT& _eo) { return _eo.worth(); } + + template + static bool is_better(const EOT& _eo1, const EOT& _eo2) + { + return _eo1.worth() > _eo2.worth(); + } +}; + +/* end fitness_traits.h */ + +/* EO.h + +The Fitness template argument is there for backward compatibility reasons + +*/ + +template > +class EO +{ +public : + + typedef Traits fitness_traits; + typedef typename Traits::storage_type storage_type; + typedef typename Traits::performance_type performance_type; + typedef typename Traits::worth_type worth_type; + + EO() : valid_performance(false), valid_worth(false), rep_fitness() {} + + // for backwards compatibility + void fitness(performance_type perf) + { + performance(perf); + } + + void performance(performance_type perf) + { + valid_performance = true; + Traits::access_performance(rep_fitness) = perf; + } + + performance_type performance(void) const + { + if(!valid_performance) throw runtime_error("no performance"); + return Traits::get_performance(rep_fitness); + } + + void worth(worth_type worth) + { + valid_worth = true; + Traits::access_worth(rep_fitness) = worth; + } + + worth_type worth(void) const + { + if(!valid_worth) throw runtime_error("no worth"); + if(!Traits::needs_mapping) throw runtime_error("no mapping"); + return Traits::get_worth(rep_fitness); + } + + worth_type fitness(void) const + { + return Traits::get_fitness(*this); + } + + void invalidate(void) + { + valid_performance = false; + valid_worth = false; + } + + void invalidate_worth(void) + { + valid_worth = false; + } + + bool operator<(const EO& other) const + { + return !Traits::is_better(other, *this); + } + + bool operator>(const EO& other) const + { + return Traits::is_better(other, *this); + } + + private : + + bool valid_performance; + bool valid_worth; + storage_type rep_fitness; +}; + +/* end EO.h */ + +/* eoPerf2Worth.h */ + +// get the name known +template class eoPop; + +template +void exponential_scaling(eoPop& _pop) +{ + for (unsigned i = 0; i < _pop.size(); ++i) + { // change minimimization into maximization + _pop[i].worth(exp(-_pop[i].performance())); + } +} + +template +class eoPerf2Worth /* : public eoUF&, void> */ +{ +public : + virtual void operator()(eoPop& _pop) + { + return exponential_scaling(_pop); + } +}; + +/* end eoPerf2Worth.h */ + + +/* eoPop.h */ + +template +class eoPop : public vector +{ +public : + + typedef typename EOT::fitness_traits fitness_traits; + + eoPop(void) : p2w(0) {} + + void sort() + { + scale(); // get the worths up to date + + std::sort(begin(), end(), greater()); + } + + void scale() + { + if (p2w) + { + if (!fitness_traits::needs_mapping) + { + throw runtime_error("eoPop: no scaling needed, yet a scaling function is defined"); + } + + (*p2w)(*this); + } + else if (fitness_traits::needs_mapping) + { + throw runtime_error("eoPop: no scaling function attached to the population, while one was certainly called for"); + } + } + + void setPerf2Worth(eoPerf2Worth& _p2w) + { + p2w = &_p2w; + } + + void setPerf2Worth(eoPerf2Worth* _p2w) + { + p2w = _p2w; + } + + eoPerf2Worth* getPerf2Worth() { return p2w; } + + void swap(eoPop& other) + { + vector::swap(other); + eoPerf2Worth* tmp = p2w; + p2w = other.p2w; + other.p2w = tmp; + } + +private : + + // a pointer as it can be emtpy + eoPerf2Worth* p2w; +}; + +// need this one to be able to swap the members as well... +template +void swap(eoPop& _p1, eoPop& _p2) +{ + _p1.swap(_p2); +} + +/* end eoPop.h */ + +/* main and test */ + +template +void algo(eoPop& _pop) +{ + eoPop offspring; // how to get the scaling info into this guy?? + offspring.setPerf2Worth(_pop.getPerf2Worth()); // like this! + + std::copy(_pop.begin(), _pop.end(), back_inserter(offspring)); + + offspring.sort(); // should call scale + + swap(_pop, offspring); +} + +void minimization_test() +{ + typedef EO eo_type; + + eo_type eo1; + eo_type eo2; + + eo1.performance(1.0); + eo2.performance(2.0); + + std::cout << "With minimizing fitness" << std::endl; + std::cout << eo1.fitness() << " < " << eo2.fitness() << " returns " << (eo1 < eo2) << std::endl; + std::cout << eo2.fitness() << " < " << eo1.fitness() << " returns " << (eo2 < eo1) << std::endl; +} + +void the_main() +{ + typedef EO simple_eo; + typedef EO > scaled_eo; + + simple_eo eo1; + simple_eo eo3; + +/* First test some simple comparisons */ + + eo1.fitness(10); // could also use performance() + eo3.fitness(5); + + std::cout << eo1.fitness() << std::endl; + std::cout << eo3.fitness() << std::endl; + + std::cout << "eo1 < eo3 = " << (eo1 < eo3) << std::endl; + + + scaled_eo eo2; + scaled_eo eo4; + eo2.performance(10); + eo4.performance(8); + +/* Now test if the worth gets accessed and if the flag protects it */ + + try + { + std::cout << eo2.fitness() << std::endl; + std::cout << "did not throw" << std::endl; + assert(false); // should throw + } + catch(std::exception& e) + { + std::cout << "Fitness threw exception, as it should" << std::endl; + std::cout << e.what() << std::endl; + } + +/* Set the worth and all is well (this is normally done by some perf2worth functor */ + + eo2.worth(3); + eo4.worth(5); + + std::cout << "with maximization " << std::endl; + std::cout << eo2.fitness() << std::endl; + std::cout << eo4.fitness() << std::endl; + std::cout << eo2.fitness() << " < " << eo4.fitness() << " returns " << (eo2 < eo4) << std::endl; + +/* Test the minimization of fitness */ + minimization_test(); + + +/* Populations */ + +// test pop without scaling, should have no overhead save for a single empty pointer in pop + eoPop pop0; + pop0.resize(1); + pop0[0].fitness(1); + + algo(pop0); + + std::cout << pop0[0].fitness() << std::endl; + + assert(pop0[0].fitness() == 1); + +/* test pop with scaling */ + + eoPerf2Worth perf2worth; + eoPop pop1; + + pop1.resize(1); + + pop1[0].fitness(1.0); // emulate evaluation + + // at this point getting the fitness should throw + try + { + std::cout << pop1[0].fitness() << std::endl; + std::cout << "did not throw" << std::endl; + assert(false); // should throw + } + catch(std::exception& e) + { + std::cout << "Fitness threw exception, as it should" << std::endl; + std::cout << e.what() << std::endl; + } + + // at this point trying to scale should throw + try + { + algo(pop1); // should complain that it cannot scale + assert(false); // so it would never get here + } + catch(std::exception& e) + { // but rather ends here + std::cout << e.what() << std::endl; + } + + // ok, now set the scaling + pop1.setPerf2Worth(perf2worth); + + algo(pop1); + + std::cout << "the fitness has been transformed from " << pop1[0].performance() << " to exp(-1) = " << pop1[0].fitness() << std::endl; +} + +int main() +{ + try + { + the_main(); + } + catch(std::exception& e) + { + std::cout << e.what() << std::endl; + } +} diff --git a/trunk/eo/test/real_value.h b/trunk/eo/test/real_value.h new file mode 100644 index 000000000..8b58d3175 --- /dev/null +++ b/trunk/eo/test/real_value.h @@ -0,0 +1,16 @@ +#include +//----------------------------------------------------------------------------- + + +/** Just a simple function that takes an eoEsBase and sets the fitnes + to sphere + @param _ind vector +*/ + +double real_value(const std::vector& _ind) +{ + double sum = 0; + for (unsigned i = 0; i < _ind.size(); i++) + sum += _ind[i] * _ind[i]; + return sum/_ind.size(); +} diff --git a/trunk/eo/test/run_tests b/trunk/eo/test/run_tests new file mode 100755 index 000000000..22b9644ac --- /dev/null +++ b/trunk/eo/test/run_tests @@ -0,0 +1,9 @@ +#!/bin/sh + +echo "Testing -h" +./t-eoCheckpointing -h + +echo "Finished" + +#TODO test if an error occured +echo "Ok" diff --git a/trunk/eo/test/t-MGE-control.cpp b/trunk/eo/test/t-MGE-control.cpp new file mode 100644 index 000000000..240dd3688 --- /dev/null +++ b/trunk/eo/test/t-MGE-control.cpp @@ -0,0 +1,104 @@ +//----------------------------------------------------------------------------- +// t-eoMGE.cpp +//----------------------------------------------------------------------------- + +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifndef __GNUG__ +// to avoid long name warnings +#pragma warning(disable:4786) +#endif // __GNUG__ + +#include "eo" +#include "ga/eoBitOp.h" + +#include "RoyalRoad.h" + +// Viri +#include "VirusOp.h" +#include "eoVirus.h" +#include "eoInitVirus.h" + +//----------------------------------------------------------------------------- + +typedef eoVirus Chrom; + +//----------------------------------------------------------------------------- + +int main() +{ + const unsigned POP_SIZE = 10, CHROM_SIZE = 12; + unsigned i; + eoBooleanGenerator gen; + + // the populations: + eoPop pop; + + // Evaluation + RoyalRoad rr( 8 ); + eoEvalFuncCounter eval( rr ); + + eoInitVirus random(CHROM_SIZE, gen); + for (i = 0; i < POP_SIZE; ++i) { + Chrom chrom; + random(chrom); + eval(chrom); + pop.push_back(chrom); + } + + std::cout << "population:" << std::endl; + for (i = 0; i < pop.size(); ++i) + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + + // selection + eoStochTournamentSelect lottery(0.9 ); + + // breeder + eoOneBitFlip vm; + eoUBitXover xover; + eoProportionalOp propSel; + eoGeneralBreeder breeder( lottery, propSel ); + propSel.add(vm, 0.2); + propSel.add(xover, 0.8); + + // Replace a single one + eoCommaReplacement replace; + + // Terminators + eoGenContinue continuator1(10); + eoFitContinue continuator2(CHROM_SIZE); + eoCombinedContinue continuator(continuator1, continuator2); + eoCheckPoint checkpoint(continuator); + eoStdoutMonitor monitor; + checkpoint.add(monitor); + eoSecondMomentStats stats; + eoPopStat dumper( 10 ); + monitor.add(stats); + checkpoint.add(dumper); + checkpoint.add(stats); + + // GA generation + eoEasyEA ea(checkpoint, eval, breeder, replace ); + + // evolution + try + { + ea(pop); + } + catch (std::exception& e) + { + std::cout << "exception: " << e.what() << std::endl;; + exit(EXIT_FAILURE); + } + + std::cout << "pop" << std::endl; + for (i = 0; i < pop.size(); ++i) + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + + std::cout << "\n --> Number of Evaluations = " << eval.getValue() << std::endl; + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-MGE.cpp b/trunk/eo/test/t-MGE.cpp new file mode 100644 index 000000000..a122b5e70 --- /dev/null +++ b/trunk/eo/test/t-MGE.cpp @@ -0,0 +1,108 @@ +//----------------------------------------------------------------------------- +// t-eoMGE.cpp +//----------------------------------------------------------------------------- + +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifndef __GNUG__ +// to avoid long name warnings +#pragma warning(disable:4786) +#endif // __GNUG__ + +#include +#include + +#include "RoyalRoad.h" + +// Viri +#include "VirusOp.h" +#include "eoVirus.h" +#include "eoInitVirus.h" + +//----------------------------------------------------------------------------- + +typedef eoVirus Chrom; + +//----------------------------------------------------------------------------- + +int main() +{ + const unsigned POP_SIZE = 10, CHROM_SIZE = 12; + unsigned i; + eoBooleanGenerator gen; + + // the populations: + eoPop pop; + + // Evaluation + RoyalRoad rr( 8 ); + eoEvalFuncCounter eval( rr ); + + eoInitVirus random(CHROM_SIZE, gen); + for (i = 0; i < POP_SIZE; ++i) { + Chrom chrom; + random(chrom); + eval(chrom); + pop.push_back(chrom); + } + + std::cout << "population:" << std::endl; + for (i = 0; i < pop.size(); ++i) + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + + // selection + eoStochTournamentSelect lottery(0.9 ); + + // breeder + VirusMutation vm; + VirusTransmission vt; + VirusBitFlip vf; + eoUBitXover xover; + eoProportionalOp propSel; + eoGeneralBreeder breeder( lottery, propSel ); + propSel.add(vm, 0.1); + propSel.add(vf, 0.05); + propSel.add(vt, 0.05); + propSel.add(xover, 0.8); + + // Replace a single one + eoCommaReplacement replace; + + // Terminators + eoGenContinue continuator1(10); + eoFitContinue continuator2(CHROM_SIZE); + eoCombinedContinue continuator(continuator1, continuator2); + eoCheckPoint checkpoint(continuator); + eoStdoutMonitor monitor; + checkpoint.add(monitor); + eoSecondMomentStats stats; + eoPopStat dumper( 10 ); + monitor.add(stats); + checkpoint.add(dumper); + checkpoint.add(stats); + + // GA generation + eoEasyEA ea(checkpoint, eval, breeder, replace ); + + // evolution + try + { + ea(pop); + } + catch (std::exception& e) + { + std::cout << "exception: " << e.what() << std::endl;; + exit(EXIT_FAILURE); + } + + std::cout << "pop" << std::endl; + for (i = 0; i < pop.size(); ++i) + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + + std::cout << "\n --> Number of Evaluations = " << eval.getValue() << std::endl; + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-MGE1bit.cpp b/trunk/eo/test/t-MGE1bit.cpp new file mode 100644 index 000000000..842f5cd77 --- /dev/null +++ b/trunk/eo/test/t-MGE1bit.cpp @@ -0,0 +1,111 @@ +//----------------------------------------------------------------------------- +// t-eoMGE.cpp +//----------------------------------------------------------------------------- + +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifndef __GNUG__ +// to avoid long name warnings +#pragma warning(disable:4786) +#endif // __GNUG__ + +#include "eo" +#include "ga/eoBitOp.h" +#include "RoyalRoad.h" + +// Viri +#include "VirusOp.h" +#include "eoVirus.h" +#include "eoInitVirus.h" + +//----------------------------------------------------------------------------- + +typedef eoVirus Chrom; + +//----------------------------------------------------------------------------- + +int main() +{ + const unsigned POP_SIZE = 10, CHROM_SIZE = 12; + unsigned i; + eoBooleanGenerator gen; + + // the populations: + eoPop pop; + + // Evaluation + RoyalRoad rr( 8 ); + eoEvalFuncCounter eval( rr ); + + eoInitVirus1bit random(CHROM_SIZE, gen); + for (i = 0; i < POP_SIZE; ++i) { + Chrom chrom; + random(chrom); + eval(chrom); + pop.push_back(chrom); + } + + std::cout << "population:" << std::endl; + for (i = 0; i < pop.size(); ++i) + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + + // selection + eoStochTournamentSelect lottery(0.9 ); + + // breeder + VirusShiftMutation vm; + VirusTransmission vt; + VirusBitFlip vf; + eoUBitXover xover; + eoProportionalOp propSel; + eoGeneralBreeder breeder( lottery, propSel ); + propSel.add(vm, 0.8); + propSel.add(vf, 0.05); + propSel.add(vt, 0.05); + propSel.add(xover, 0.1); + + // Replace a single one + eoCommaReplacement replace; + + // Terminators + eoGenContinue continuator1(10); + eoFitContinue continuator2(CHROM_SIZE); + eoCombinedContinue continuator(continuator1, continuator2); + eoCheckPoint checkpoint(continuator); + eoStdoutMonitor monitor; + checkpoint.add(monitor); + eoSecondMomentStats stats; + eoPopStat dumper( 10 ); + monitor.add(stats); + checkpoint.add(dumper); + checkpoint.add(stats); + + // GA generation + eoEasyEA ea(checkpoint, eval, breeder, replace); + + // evolution + try { + ea(pop); + } catch (std::exception& e) { + std::cerr << "exception: " << e.what() << std::endl;; + exit(EXIT_FAILURE); + } + + std::cout << "pop" << std::endl; + for (i = 0; i < pop.size(); ++i) + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + + std::cout << "\n --> Number of Evaluations = " << eval.getValue() << std::endl; + return EXIT_SUCCESS; +} + +//----------------------------------------------------------------------------- + + + +// Local Variables: +// mode: C++ +// c-file-style: "Stroustrup" +// End: diff --git a/trunk/eo/test/t-eo.cpp b/trunk/eo/test/t-eo.cpp new file mode 100644 index 000000000..f2c0e177b --- /dev/null +++ b/trunk/eo/test/t-eo.cpp @@ -0,0 +1,14 @@ +#include + +typedef EO Chrom; + +int main() +{ + Chrom chrom1, chrom2; + + // EO objects can be printed with stream operators + std::cout << "chrom1 = " << chrom1 << std::endl + << "chrom2 = " << chrom2 << std::endl; + + return 0; +} diff --git a/trunk/eo/test/t-eo2dVector.cc b/trunk/eo/test/t-eo2dVector.cc new file mode 100644 index 000000000..0288fdc50 --- /dev/null +++ b/trunk/eo/test/t-eo2dVector.cc @@ -0,0 +1,220 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- +/* +----------------------------------------------------------------------------- +File............: t-eo2dVector.cc +Author..........: Geneura Team (this file: Victor Rivas, vrivas@ujaen.es) +Date............: 01-Oct-1999, at Fac. of Sciences, Univ. of Granada (Spain) +Description.....: Test for 2 dimensional eoVector. + + ================ Modif. 1 ================ + Author........: + Date..........: + Description...: + +----------------------------------------------------------------------------- +*/ + +#include +#include // eo2dVector +#include // Random generator + +//----------------------------------------------------------------------------- + +typedef unsigned T; +typedef double fitnessT; +typedef eo2dVector C; + +//----------------------------------------------------------------------------- + +main() +{ + { + C c1; + cout << "Default constructor: " << endl + << c1 << endl; + } + { + C c1( 5,6,1 ); + cout << "Default constructor with values: " << endl + << c1 << endl; + + } + { + eoUniform aleat( 1,10 ); + C c1( 5,6, aleat ); + cout << "Random constructor: " << endl + << c1 << endl; + + } + { + C c1( 3,4,1 ), c2( c1 ); + cout << "Copy constructor: " << endl + << "Original chromosome: " << endl + << c1 << endl + << "Copy chromosome: " << endl + << c2 << endl; + } + + eoUniform aleat( 1,10 ); + C c1( 3,4,aleat ); + + cout << "-----------------------------------------------------" << endl + << "Since now on all the operations are applied to " << endl + << c1 + << "-----------------------------------------------------" << endl; + { + cout << "getGene(2,2): " + << c1.getGene(2,2) << endl; + } + { + c1.setGene( 2,2,300 ); + cout << "setGene(2,2,300): " << endl + << c1 << endl; + } + { + unsigned u1=0, u3=333, u5=555; + vector v1( 4,u1 ), v2( 4,u3 ), v3( 4,u5 ); + c1.insertRow( 0,v1 ); + c1.insertRow( 3,v2 ); + c1.insertRow( 5,v3 ); + cout << "Insert rows at positions 0, 3 and 5: " << endl + << c1 << endl; + } + { + c1.deleteRow( 5 ); + c1.deleteRow( 3 ); + c1.deleteRow( 0 ); + cout << "Delete rows at positions 5, 3 and 0: " << endl + << c1 << endl; + } + { + unsigned u1=0, u3=333, u6=666; + vector v1( 3,u1 ), v2( 3,u3 ), v3( 3,u6 ); + c1.insertCol( 0,v1 ); + c1.insertCol( 3,v2 ); + c1.insertCol( 6,v3 ); + cout << "Insert columns at positions 0, 3 and 6: " << endl + << c1 << endl; + } + { + c1.deleteCol( 6 ); + c1.deleteCol( 3 ); + c1.deleteCol( 0 ); + cout << "Delete columns at positions 6, 3 and 0: " << endl + << c1 << endl; + } + { + cout << "Number of Rows: " << endl + << c1.numOfRows() << endl; + } + { + cout << "Number of Columns: " << endl + << c1.numOfCols() << endl; + } + + { + cout << "Class Name: " << endl + << c1.className() << endl; + } + + + cout << "-----------------------------------------------------" << endl + << "Catching exceptions: " << endl + << c1 + << "-----------------------------------------------------" << endl; + { + cout << "* Trying getGene(10,1): " << endl; + try { + c1.getGene( 10,1 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + { + cout << "* Trying getGene(1,10): " << endl; + try { + c1.getGene( 1,10) ; + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + { + cout << "* Trying setGene( 10,1,999 ): " << endl; + try { + c1.setGene( 10,1,999 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + { + cout << "* Trying setGene( 1,10,999 ): " << endl; + try { + c1.setGene( 1,10,999 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + { + unsigned u1=111; + vector v1( 4, u1 ); + cout << "* Trying insertRow( 10, v1 ): " << endl; + try { + c1.insertRow( 10,v1 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + { + unsigned u1=111; + vector v1( 5, u1 ); + cout << "* Trying insertRow( 1, v1 ) with v1.size()=5: " << endl; + try { + c1.insertRow( 1,v1 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + + { + cout << "* Trying deleteRow( 10 ): " << endl; + try { + c1.deleteRow( 10 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + + { + unsigned u1=111; + vector v1( 3, u1 ); + cout << "* Trying insertCol( 10,v1 ): " << endl; + try { + c1.insertCol( 10,v1 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + + { + unsigned u1=111; + vector v1( 5, u1 ); + cout << "* Trying insertCol( 1,v1 ) with v1.size()=5: " << endl; + try { + c1.insertCol( 1,v1 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + + { + cout << "* Trying deleteCol( 10 ): " << endl; + try { + c1.deleteCol( 10 ); + } catch (exception& e ) { + cerr << e.what() << endl; + } + } + +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-eoCMAES.cpp b/trunk/eo/test/t-eoCMAES.cpp new file mode 100644 index 000000000..07b59509a --- /dev/null +++ b/trunk/eo/test/t-eoCMAES.cpp @@ -0,0 +1,124 @@ +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +using namespace eo; +using namespace std; + +typedef eoMinimizingFitness FitT; +typedef eoVector EoType; + +double sqr(double x) { return x*x; } + +eoValueParam evals(0,"Function Evals","Number of Evaluations"); + +double f_sphere(const vector& values) { + double sum = 0.0; + for (unsigned i = 0; i < values.size(); ++i) { + sum += values[i] * values[i]; + } + ++evals.value(); + return sum; +} + +double f_rosen(const vector& x) { + double sum =0.0; + + for (unsigned i = 0; i < x.size()-1; ++i) { + sum += 100 * sqr(sqr(x[i])-x[i+1]) + sqr(1.-x[i]); + } + ++evals.value(); + return sum; +} + + + +int main(int argc, char* argv[]) { + + // make sure we have a dimensionality parameter (for testing) + char** rargv = new char*[argc+1]; + rargv[0] = argv[0]; + rargv[1] = (char*)"-N10"; + for (int i = 2; i < argc; ++i) { + rargv[i] = argv[i-1]; + } + + eoParser parser(argc+1, rargv); + + CMAParams params(parser); + + vector initial_point(params.n, 0.0); + + CMAState state(params, initial_point); + + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + return 1; + } + + eoCMAInit init(state); + + eoPop pop(params.mu, init); + + eoEvalFuncPtr&> eval( f_rosen ); + + eoCMABreed breed(state, params.lambda); + + for (unsigned i = 0; i < pop.size(); ++i) { + eval(pop[i]); + } + + eoCommaReplacement comma; + + eoGenContinue gen(params.maxgen); + eoFitContinue fit(1e-10); + + eoCheckPoint checkpoint(gen); + checkpoint.add(fit); + + eoBestFitnessStat stat; + + eoStdoutMonitor mon; + mon.add(stat); + mon.add(evals); + + eoTimedMonitor timed(1);// 1 seconds + timed.add(mon); // wrap it + + checkpoint.add(timed); + checkpoint.add(stat); + + eoEasyEA algo( + checkpoint, + eval, + breed, + comma); + + + algo(pop); + pop.sort(); + + cout << pop[0] << endl; + cout << "Fitness achieved = " << pop[0].fitness() << endl; + cout << "Function evaluations = " << evals.value() << endl; +} diff --git a/trunk/eo/test/t-eoCheckpointing.cpp b/trunk/eo/test/t-eoCheckpointing.cpp new file mode 100644 index 000000000..134b05cc4 --- /dev/null +++ b/trunk/eo/test/t-eoCheckpointing.cpp @@ -0,0 +1,173 @@ +// to avoid long name warnings +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include // runtime_error + +// general +#include // Random number generators +#include +#include +#include +#include + +// include package checkpointing +#include + +struct Dummy : public EO +{ + typedef double Type; +}; + + +struct eoDummyPop : public eoPop +{ +public : + eoDummyPop(int s = 2) { resize(s); } +}; + + +int the_main(int argc, char **argv) +{ // ok, we have a command line parser and a state + + typedef eoBit Chrom; + + eoParser parser(argc, argv); + + // Define Parameters + eoValueParam rate(0.01, "mutationRatePerBit", "Initial value for mutation rate per bit"); + eoValueParam factor(0.99, "mutationFactor", "Decrease factor for mutation rate"); + eoValueParam seed(time(0), "seed", "Random number seed"); + eoValueParam load_name("", "Load","Load",'L'); + eoValueParam save_name("", "Save","Save",'S'); + + // Register them + parser.processParam(rate, "Genetic Operators"); + parser.processParam(factor, "Genetic Operators"); + parser.processParam(load_name, "Persistence"); + parser.processParam(save_name, "Persistence"); + parser.processParam(seed, "Rng seeding"); + + eoState state; + state.registerObject(parser); + + if (load_name.value() != "") + { // load the parser. This is only neccessary when the user wants to + // be able to change the parameters in the state file by hand. + state.load(load_name.value()); // load the parser + } + + // Create the algorithm here + typedef Dummy EoType; + + eoDummyPop pop; + + eoGenContinue genTerm(5); // run for 5 generations + + eoCheckPoint checkpoint(genTerm); + // The algorithm will now quit after five generations + + // Create a counter parameter + eoValueParam generationCounter(0, "Generation"); + + // Create an incrementor (wich is an eoUpdater). Note that the + // Parameter's value is passed by reference, so every time the incrementer increments, + // the data in generationCounter will change. + eoIncrementor increment(generationCounter.value()); + + // Add it to the checkpoint, this will result in the counter being incremented every generation + checkpoint.add(increment); + + // The file monitor will print parameters to a comma seperated file + eoFileMonitor monitor("monitor.csv"); + + // the checkpoint mechanism can handle multiple monitors + checkpoint.add(monitor); + + // the monitor can monitor parameters such as the generationCounter + monitor.add(generationCounter); + + // Second moment stats: average and stdev + eoSecondMomentStats stats; + + // Add it to the checkpoint to get it called at the appropriate time + checkpoint.add(stats); + + // Add it to the monitor to get it written to the file + monitor.add(stats); + + // save state every third generation + eoCountedStateSaver stateSaver1(3, state, "generation"); + // save state every 2 seconds + eoTimedStateSaver stateSaver2(2, state, "time"); + + // And add the two savers to the checkpoint + checkpoint.add(stateSaver1); + checkpoint.add(stateSaver2); + + // Register the algorithm + state.registerObject(rng); + state.registerObject(pop); + + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + return 0; + } + + // Either load or initialize + if (load_name.value() != "") + { + state.load(load_name.value()); // load the rest + } + else + { + // else + + // initialize rng and population + + rng.reseed(seed.value()); + + pop.resize(2); + + pop[0].fitness(1); + pop[1].fitness(2); + } + + while(checkpoint(pop)) + { + pop[0].fitness(pop[0].fitness() + 1); + + time_t now = time(0); + + while (time(0) == now) {} // wait a second to test timed saver + + std::cout << "gen " << generationCounter.value() << std::endl; + } + + // run the algorithm + + // Save when needed + if (save_name.value() != "") + { + std::string file_name = save_name.value(); + save_name.value() = ""; // so that it does not appear in the parser section of the state file + state.save(file_name); + } + + return 1; +} + +int main(int argc, char **argv) +{ + try + { + the_main(argc, argv); + } + catch(std::exception& e) + { + std::cout << "Exception: " << e.what() << std::endl; + } + +} diff --git a/trunk/eo/test/t-eoDualFitness.cpp b/trunk/eo/test/t-eoDualFitness.cpp new file mode 100644 index 000000000..6b8fd6e17 --- /dev/null +++ b/trunk/eo/test/t-eoDualFitness.cpp @@ -0,0 +1,88 @@ +#include + +#include +#include +#include + +typedef eoVector,double> DualVector; + +template +class DualSphere : public eoEvalFunc +{ +public: + virtual void operator()( EOT & x ) + { + if( x.invalid() ) { return; } + + double sum = 0; + int sign = 1; + for( unsigned int i=0, s=x.size(); i0 ? true : false ) ); + } +}; + + +double test( eoPop& pop, double target_value ) +{ + DualSphere eval; + + eoPopLoopEval pop_eval(eval); + + pop_eval(pop,pop); + + eoInterquartileRangeStat iqr_stat( std::make_pair(0.0,false), "IQR" ); + + iqr_stat( pop ); + + std::cout << iqr_stat.longName() << "=" << iqr_stat.value() << " should be " << target_value << std::endl; + + return iqr_stat.value().value(); +} + + +int main() +{ + eoPop pop; + + // fixed test + DualVector sol1(2,-1); + DualVector sol2(2,-1); + DualVector sol3(2,1); + DualVector sol4(2,1); + pop.push_back( sol1 ); + pop.push_back( sol2 ); + pop.push_back( sol3 ); + pop.push_back( sol4 ); + // on the sphere function everyone has the same fitness of 1 + if( test(pop, 0) != 0 ) { + exit(1); + } + + pop.erase(pop.begin(),pop.end()); + + // fixed test + sol1 = DualVector(2,0); + sol2 = DualVector(2,0); + sol3 = DualVector(2,1); + sol4 = DualVector(2,1); + pop.push_back( sol1 ); + pop.push_back( sol2 ); + pop.push_back( sol3 ); + pop.push_back( sol4 ); + if( test(pop, 1) != 1 ) { + exit(1); + } + + // test on a random normal distribution + eoNormalGenerator normal(1,rng); + eoInitFixedLength init_N(2, normal); + pop = eoPop( 1000000, init_N ); + double iqr = test(pop, 1.09); + if( iqr < 1.08 || iqr > 1.11 ) { + exit(1); + } +} diff --git a/trunk/eo/test/t-eoESAll.cpp b/trunk/eo/test/t-eoESAll.cpp new file mode 100644 index 000000000..3a77b6292 --- /dev/null +++ b/trunk/eo/test/t-eoESAll.cpp @@ -0,0 +1,150 @@ +// Program to test several EO-ES features + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include +#include +#include +#include + +#ifdef _MSC_VER + #include +#endif + +using namespace std; + +#include + +// representation specific +#include + +#include "real_value.h" // the sphere fitness + +// Now the main +/////////////// +typedef eoMinimizingFitness FitT; + +template +void runAlgorithm(EOT, eoParser& _parser, eoState& _state); + +int main_function(int argc, char *argv[]) +{ + // Create the command-line parser + eoParser parser(argc, argv); // for user-parameter reading + eoState state; // keeps all things allocated + eoValueParam& simpleParam = parser.getORcreateParam(true, "Isotropic", + "Isotropic self-adaptive mutation", + 'i', "ES mutation"); + eoValueParam& stdevsParam = parser.getORcreateParam(false, "Stdev", + "One self-adaptive stDev per variable", + 's', "ES mutation"); + eoValueParam& corrParam = parser.getORcreateParam(false, "Correl", + "Use correlated mutations", + 'c', "ES mutation"); + // Run the appropriate algorithm + if (simpleParam.value() == false) + { + std::cout << "Using eoReal" << std::endl; + runAlgorithm(eoReal(), parser, state); + } + else if (stdevsParam.value() == false) + { + std::cout << "Using eoEsSimple" << std::endl; + runAlgorithm(eoEsSimple(), parser, state); + } + else if (corrParam.value() == false) + { + std::cout << "Using eoEsStdev" << std::endl; + runAlgorithm(eoEsStdev(), parser, state); + } + else + { + std::cout << "Using eoEsFull" << std::endl; + runAlgorithm(eoEsFull(), parser, state); + } + return 0; +} + + + +// A main that catches the exceptions +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + // rng.reseed(42); + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); + // _CrtSetBreakAlloc(100); +#endif + try + { + main_function(argc, argv); + } + catch(std::exception& e) + { + std::cout << "Exception: " << e.what() << '\n'; + } +} + + + +/** The templatized main (sort of) + +quite similar to the main of other genotypes (e.g. t-eoReal and t-eoGA +in test dir) +*/ +template +void runAlgorithm(EOT, eoParser& _parser, eoState& _state) +{ + typedef typename EOT::Fitness FitT; + + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// + + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr&> mainEval( real_value ); + eoEvalFuncCounter eval(mainEval); + + // the genotype - through a genotype initializer + eoRealInitBounded& init = make_genotype(_parser, _state, EOT()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(_parser, _state, init); + + //// Now the representation-independent things + ////////////////////////////////////////////// + + // initialize the population - and evaluate + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(_parser, _state, init); + apply(eval, pop); + + // stopping criteria + eoContinue & term = make_continue(_parser, _state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(_parser, _state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(_parser, _state, eval, checkpoint, op); + + ///// End of construction of the algorith + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(_parser); + + //// GO + /////// + std::cout << "Initial Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; + + run_ea(ga, pop); // run the ga + + std::cout << "Final Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; +} diff --git a/trunk/eo/test/t-eoESFull.cpp b/trunk/eo/test/t-eoESFull.cpp new file mode 100644 index 000000000..7c5e84d99 --- /dev/null +++ b/trunk/eo/test/t-eoESFull.cpp @@ -0,0 +1,180 @@ +// Program to test several EO-ES features + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include +#include +#include +#include + +using namespace std; + +#include + +// representation specific +#include + +#include "real_value.h" // the sphere fitness + +// Now the main +/////////////// +typedef eoMinimizingFitness FitT; + +template +void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _bounds, eoValueParam _load_name); + +int main_function(int argc, char *argv[]) +{ + // Create the command-line parser + eoParser parser( argc, argv, "Basic EA for vector with adaptive mutations"); + + // Define Parameters and load them + eoValueParam& seed = parser.createParam(static_cast(time(0)), + "seed", "Random number seed"); + eoValueParam& load_name = parser.createParam(string(), "Load","Load a state file",'L'); + eoValueParam& save_name = parser.createParam(string(), "Save","Saves a state file",'S'); + eoValueParam& stdevs = parser.createParam(false, "Stdev", "Use adaptive mutation rates", 's'); + eoValueParam& corr = parser.createParam(false, "Correl", "Use correlated mutations", 'c'); + eoValueParam& chromSize = parser.createParam(unsigned(50), "ChromSize", "Number of chromosomes", 'n'); + eoValueParam& minimum = parser.createParam(-1.0, "Min", "Minimum for Objective Variables", 'l'); + eoValueParam& maximum = parser.createParam(1.0, "Max", "Maximum for Objective Variables", 'h'); + + eoState state; + state.registerObject(parser); + rng.reseed(seed.value()); + + if (!load_name.value().empty()) + { // load the parser. This is only neccessary when the user wants to + // be able to change the parameters in the state file by hand + // Note that only parameters inserted in the parser at this point + // will be loaded!. + state.load(load_name.value()); // load the parser + } + + state.registerObject(rng); + + eoRealVectorBounds bounds(chromSize.value(), minimum.value(), maximum.value()); + + // Run the appropriate algorithm + if (stdevs.value() == false && corr.value() == false) + { + runAlgorithm(eoEsSimple() ,parser, state, bounds, load_name); + } + else if (corr.value() == true) + { + runAlgorithm(eoEsFull(),parser, state, bounds, load_name); + } + else + { + runAlgorithm(eoEsStdev(), parser, state, bounds, load_name); + } + + // and save + if (!save_name.value().empty()) + { + string file_name = save_name.value(); + save_name.value() = ""; // so that it does not appear in the parser section of the state file + state.save(file_name); + } + + return 0; +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + // rng.reseed(42); + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(argc, argv); + } + catch(std::exception& e) + { + std::cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} + +template +void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _bounds, eoValueParam _load_name) +{ + // evaluation + eoEvalFuncPtr&> eval( real_value ); + + // population parameters, unfortunately these can not be altered in the state file + eoValueParam mu = _parser.createParam(unsigned(7), "mu","Size of the population"); + eoValueParamlambda_rate = _parser.createParam(double(7.0), "lambda_rate", "Factor of children to produce"); + + if (lambda_rate.value() < 1.0f) + { + throw logic_error("lambda_rate must be larger than 1 in a comma strategy"); + } + + // Initialization + eoEsChromInit init(_bounds); + + // State takes ownership of pop because it needs to save it in caller + eoPop& pop = _state.takeOwnership(eoPop(mu.value(), init)); + + _state.registerObject(pop); + + if (!_load_name.value().empty()) + { // The real loading happens here when all objects are registered + _state.load(_load_name.value()); // load all and everything + } + else + { + // evaluate initial population + apply(eval, pop); + } + + // Ok, time to set up the algorithm + // Proxy for the mutation parameters + eoEsMutationInit mutateInit(_parser); + + eoEsMutate mutate(mutateInit, _bounds); + + // monitoring, statistics etc. + eoAverageStat average; + eoStdoutMonitor monitor; + + monitor.add(average); + + eoGenContinue cnt(100); + eoCheckPoint checkpoint(cnt); + checkpoint.add(monitor); + checkpoint.add(average); + + // only mutation (== with rate 1.0) + eoMonGenOp op(mutate); + + // the selection: sequential selection + eoSequentialSelect select; + // the general breeder (lambda is a rate -> true) + eoGeneralBreeder breed(select, op, lambda_rate.value(), true); + + // the replacement - hard-coded Comma replacement + eoCommaReplacement replace; + + // now the eoEasyEA + eoEasyEA es(checkpoint, eval, breed, replace); + + es(pop); + + pop.sort(); + std::cout << "Final population\n" << pop << std::endl; + +} diff --git a/trunk/eo/test/t-eoEasyEA.cpp b/trunk/eo/test/t-eoEasyEA.cpp new file mode 100644 index 000000000..ba3035d22 --- /dev/null +++ b/trunk/eo/test/t-eoEasyEA.cpp @@ -0,0 +1,74 @@ +#ifndef __GNUG__ +// to avoid long name warnings +#pragma warning(disable:4786) +#endif // __GNUG__ + +#include + +#include "binary_value.h" + +typedef eoBin Chrom; + +main() +{ + const unsigned POP_SIZE = 8, CHROM_SIZE = 16; + unsigned i; + +// a chromosome randomizer + eoBinRandom random; +// the populations: + eoPop pop; + + // Evaluation + eoEvalFuncPtr eval( binary_value ); + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + eval(chrom); + pop.push_back(chrom); + } + + std::cout << "population:" << std::endl; + for (i = 0; i < pop.size(); ++i) + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + + + // selection + eoLottery lottery; + + // breeder + eoBinBitFlip bitflip; + eoBinCrossover xover; + eoProportionalOpSel propSel; + eoBreeder breeder( propSel ); + propSel.addOp(bitflip, 0.25); + propSel.addOp(xover, 0.75); + + // replacement + eoInclusion inclusion; + + // Terminators + eoFitTerm term( pow(2.0, CHROM_SIZE), 1 ); + + // GA generation + eoEasyEA ea(lottery, breeder, inclusion, eval, term); + + // evolution + try + { + ea(pop); + } + catch (std::exception& e) + { + std::cout << "exception: " << e.what() << std::endl;; + exit(EXIT_FAILURE); + } + + std::cout << "pop" << std::endl; + for (i = 0; i < pop.size(); ++i) + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + + return 0; +} diff --git a/trunk/eo/test/t-eoEasyPSO.cpp b/trunk/eo/test/t-eoEasyPSO.cpp new file mode 100644 index 000000000..af290e13f --- /dev/null +++ b/trunk/eo/test/t-eoEasyPSO.cpp @@ -0,0 +1,102 @@ +//----------------------------------------------------------------------------- +// t-eoEasyPSO.cpp +//----------------------------------------------------------------------------- + +#ifndef __GNUG__ +// to avoid long name warnings +#pragma warning(disable:4786) +#endif // __GNUG__ + +#include + +//----------------------------------------------------------------------------- +typedef eoMinimizingFitness FitT; +typedef eoRealParticle < FitT > Particle; +//----------------------------------------------------------------------------- + +// the objective function +double real_value (const Particle & _particle) +{ + double sum = 0; + for (unsigned i = 0; i < _particle.size ()-1; i++) + sum += pow(_particle[i],2); + return (sum); +} + + +int main() +{ + const unsigned int VEC_SIZE = 2; + const unsigned int POP_SIZE = 20; + const unsigned int NEIGHBORHOOD_SIZE= 5; + unsigned i; + + // the population: + eoPop pop; + + // Evaluation + eoEvalFuncPtr eval( real_value ); + + // position init + eoUniformGenerator < double >uGen (-3, 3); + eoInitFixedLength < Particle > random (VEC_SIZE, uGen); + + // velocity init + eoUniformGenerator < double >sGen (-2, 2); + eoVelocityInitFixedLength < Particle > veloRandom (VEC_SIZE, sGen); + + // local best init + eoFirstIsBestInit < Particle > localInit; + + // perform position initialization + pop.append (POP_SIZE, random); + + // topology + eoLinearTopology topology(NEIGHBORHOOD_SIZE); + + // the full initializer + eoInitializer init(eval,veloRandom,localInit,topology,pop); + init(); + + + // bounds + eoRealVectorBounds bnds(VEC_SIZE,-1.5,1.5); + + // velocity + eoStandardVelocity velocity (topology,1,1.6,2,bnds); + + // flight + eoStandardFlight flight; + + // Terminators + eoGenContinue genCont1 (50); + eoGenContinue genCont2 (50); + + // PS flight + eoEasyPSO pso1(genCont1, eval, velocity, flight); + + eoEasyPSO pso2(init,genCont2, eval, velocity, flight); + + // flight + try + { + pso1(pop); + std::cout << "FINAL POPULATION AFTER PSO n°1:" << std::endl; + for (i = 0; i < pop.size(); ++i) + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + + pso2(pop); + std::cout << "FINAL POPULATION AFTER PSO n°2:" << std::endl; + for (i = 0; i < pop.size(); ++i) + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + } + catch (std::exception& e) + { + std::cout << "exception: " << e.what() << std::endl;; + exit(EXIT_FAILURE); + } + + + + return 0; +} diff --git a/trunk/eo/test/t-eoExtendedVelocity.cpp b/trunk/eo/test/t-eoExtendedVelocity.cpp new file mode 100644 index 000000000..3fca3f30c --- /dev/null +++ b/trunk/eo/test/t-eoExtendedVelocity.cpp @@ -0,0 +1,76 @@ +//----------------------------------------------------------------------------- +// t-eoExtendedVelocity.cpp +//----------------------------------------------------------------------------- + + +#include + +typedef eoRealParticle < double > Particle; + +//Evaluation function +double f (const Particle & _particle) +{ + double sum = 0; + for (unsigned i = 0; i < _particle.size (); i++) + sum += pow(_particle[i],2); + return (-sum); +} + +int main_function(int argc, char **argv) +{ + const unsigned POP_SIZE = 6, VEC_SIZE = 2, NEIGHBORHOOD_SIZE=2; + + // the population: + eoPop pop; + + // Evaluation + eoEvalFuncPtr eval( f ); + + // position + velocity + best init + eoUniformGenerator < double >uGen (-3, 3); + eoInitFixedLength < Particle > random (VEC_SIZE, uGen); + eoUniformGenerator < double >sGen (-2, 2); + eoVelocityInitFixedLength < Particle > veloRandom (VEC_SIZE, sGen); + eoFirstIsBestInit < Particle > localInit; + pop.append (POP_SIZE, random); + + // topology + eoLinearTopology topology(NEIGHBORHOOD_SIZE); + eoInitializer init(eval,veloRandom,localInit,topology,pop); + init(); + + // velocity + eoExtendedVelocity velocity (topology,1,1,1,1); + + // the test itself + for (unsigned int i = 0; i < POP_SIZE; i++) + { + std::cout << " Initial particle n°" << i << " velocity: " << std::endl; + for (unsigned int j = 0; j < VEC_SIZE; j++) + std::cout << " v" << j << "=" << pop[i].velocities[j] << std::endl; + } + + for (unsigned int i = 0; i < POP_SIZE; i++) + velocity (pop[i],i); + + for (unsigned int i = 0; i < POP_SIZE; i++) + { + std::cout << " Final particle n°" << i << " velocity: " << std::endl; + for (unsigned int j = 0; j < VEC_SIZE; j++) + std::cout << " v" << j << "=" << pop[i].velocities[j] << std::endl; + } + return EXIT_SUCCESS; +} + +int main(int argc, char **argv) +{ + try + { + main_function(argc, argv); + } + catch(std::exception& e) + { + std::cout << "Exception: " << e.what() << " in t-eoExtendedVelocity" << std::endl; + } + return EXIT_SUCCESS; +} diff --git a/trunk/eo/test/t-eoExternalEO.cpp b/trunk/eo/test/t-eoExternalEO.cpp new file mode 100644 index 000000000..8246863f6 --- /dev/null +++ b/trunk/eo/test/t-eoExternalEO.cpp @@ -0,0 +1,132 @@ +// to avoid long name warnings +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include // runtime_error + +#include +#include +#include + +using namespace std; + +struct UserDefStruct +{ + int a; + float b; + double c; + enum Enum { just, another, test } d; +}; + +std::ostream& operator<<(std::ostream& os, const UserDefStruct& str) +{ + return os << str.a << ' ' << str.b << ' ' << str.c << ' ' << static_cast(str.d) << ' '; +} + +istream& operator>>(istream& is, UserDefStruct& str) +{ + is >> str.a; + is >> str.b; + is >> str.c; + int i; + is >> i; + str.d = static_cast(i); + + return is; +} + + +UserDefStruct RandomStruct() +{ + std::cout << "RandomStruct\n"; + + UserDefStruct result; + + result.a = rng.random(5); + result.b = rng.uniform(); + result.c = rng.uniform(); + result.d = UserDefStruct::another; + + return result; +} + +// reading and writing + + +bool UserDefMutate(UserDefStruct& a) +{ + std::cout << "UserDefMutate\n"; + a = RandomStruct(); // just for testing + + if (rng.flip(0.1f)) + a.d = UserDefStruct::test; + else + a.d = UserDefStruct::another; + return true; +} + +bool UserDefBinCrossover(UserDefStruct& a, const UserDefStruct& b) +{ + std::cout << "UserDefBinCrossover\n"; + + if (rng.flip(0.5)) + a.a = b.a; + if (rng.flip(0.5)) + a.b = b.b; + if (rng.flip(0.5)) + a.c = b.c; + if (rng.flip(0.5)) + a.d = b.d; + return true; +} + +bool UserDefQuadCrossover(UserDefStruct& a, UserDefStruct& b) +{ + std::cout << "UserDefQuadCrossover\n"; + if (rng.flip(0.5)) + swap(a.a, b.a); + if (rng.flip(0.5)) + swap(a.b, b.b); + if (rng.flip(0.5)) + swap(a.c, b.c); + if (rng.flip(0.5)) + swap(a.d, b.d); + + return true; +} + +float UserDefEvalFunc(const UserDefStruct& a) +{ + std::cout << "UserDefEvalFunc\n"; + return a.b; +} + +int main() +{ + typedef UserDefStruct External; + typedef float FitnessType; + typedef eoExternalEO EoType; + + eoExternalInit init(RandomStruct); + eoExternalMonOp mutate(UserDefMutate); + eoExternalBinOp cross1(UserDefBinCrossover); + eoExternalQuadOp cross2(UserDefQuadCrossover); + + // eoExternalEvalFunc eval(UserDefEvalFunc); + + EoType eo1; + init(eo1); + EoType eo2; + init(eo2); + + std::cout << "before mutation " << eo1 << '\n'; + mutate(eo1); + std::cout << "after mutation " << eo1 << '\n'; + cross1(eo1, eo2); + std::cout << "after crossover " << eo1 << '\n'; + + cross2(eo1,eo2); + +} diff --git a/trunk/eo/test/t-eoFitnessAssembled.cpp b/trunk/eo/test/t-eoFitnessAssembled.cpp new file mode 100644 index 000000000..018d739a4 --- /dev/null +++ b/trunk/eo/test/t-eoFitnessAssembled.cpp @@ -0,0 +1,104 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// t-eoFitnessAssembled.cpp +// Marc Wintermantel & Oliver Koenig +// IMES-ST@ETHZ.CH +// March 2003 + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- +#include +#include + +#include "eoScalarFitnessAssembled.h" + +void test_eoScalarFitnessAssembledClass(){ + + // Create instances + eoAssembledMinimizingFitness A,B,C(5, 1.3, "C value"); + + // Add some values to them + A.push_back( 5.6, "first value" ); + A.push_back( 3.2, "second value" ); + A.push_back( 2.6, "third value" ); + + B.push_back( 1.2 ); + B.push_back( 3.2 ); + B.push_back( 5.2 ); + + B.setDescription( 1, "B descr" ); + + std::cout << "Created instances A,B and C, added some vals; testing << operator " << std::endl; + std::cout << "A= " << A << std::endl; + std::cout << "B= " << B << std::endl; + std::cout << "C= " << C << std::endl; + std::cout << "Printing values and descriptions: " << std::endl; + std::cout << "A: "; A.printAll( std::cout ); std::cout << std::endl; + std::cout << "B: "; B.printAll( std::cout ); std::cout << std::endl; + std::cout << "C: "; C.printAll( std::cout ); std::cout << std::endl; + + A.resize(8, 100.3, "A resized"); + std::cout << "Resized A: "; A.printAll( std::cout ); std::cout << std::endl; + + std::cout << "Access fitness values of A and B: " << "f(A)= " << (double) A << " f(B)= " << (double) B << std::endl; + + // Testing constructors and assignments + eoAssembledMinimizingFitness D(A) ,E(3.2); + std::cout << "D(A) = " << D << "\t" << "E(3.2)= " << E << std::endl; + eoAssembledMinimizingFitness F,G; + F=A; + G= 7.5; + std::cout << "F = A : " << F << "\t G = 7.5 : " << G << std::endl; + + // Comparing... + std::cout << "AB: " << (A>B) << std::endl; + std::cout << "A<=B: " << (A<=B) << std::endl; + std::cout << "A>=B: " << (A>=B) << std::endl; + +} + + + +int main(){ + + std::cout << "-----------------------------------" << std::endl; + std::cout << "START t-eoFitnessAssembled" << std::endl; + + try{ + // Test the fitness class itself + test_eoScalarFitnessAssembledClass(); + + + + } + catch(std::exception& e){ + std::cout << e.what() << std::endl; + return 1; + } + + std::cout << "END t-eoFitnessAssembled" << std::endl; + std::cout << "----------------------------------" << std::endl; + + return 0; + +} diff --git a/trunk/eo/test/t-eoFitnessAssembledEA.cpp b/trunk/eo/test/t-eoFitnessAssembledEA.cpp new file mode 100644 index 000000000..e04535673 --- /dev/null +++ b/trunk/eo/test/t-eoFitnessAssembledEA.cpp @@ -0,0 +1,174 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// t-eoFitnessAssembledEA.cpp +// Marc Wintermantel & Oliver Koenig +// IMES-ST@ETHZ.CH +// March 2003 + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@inria.fr + mak@dhi.dk +*/ +//----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include + +// General eo includes +#include +#include // The real bounds (not yet in general eo include) + +// Representation dependent includes and typedefs +#include // Definition of representation +#include // Uniformly initializes real vector in bounds +#include // Initialization of a genotype +#include // Base class for fitness evaluation +#include // Variation operators using standard Real operators +#include // The fitness class +typedef eoReal Indi; + +// Representation independent modules +#include // Initialization of population +#include // The stopping criterion +#include // Outputs (stats, population dumps, ...) +#include // Evolution engine (selection and replacement) +#include // simple call to the algo.stays there for consistency reasons + +// Define a fitness class +template +class eoAssembledEvalFunc : public eoEvalFunc{ +public: + // Constructor defining number and descriptions of fitness terms + eoAssembledEvalFunc() { + + // Define a temporary fitness object to have access to its static traits + typename EOT::Fitness tmpfit(3, 0.0); + tmpfit.setDescription(0,"Fitness"); + tmpfit.setDescription(1,"Some Value"); + tmpfit.setDescription(2,"Other Value"); + + } + + void operator()(EOT& _eo){ + + // Define temporary fitness object + // (automatically gets initialized with size given in constructor) + typename EOT::Fitness tmpfit; + + // Eval some dummy fitness + double sum1=0.0, sum2=0.0; + for (unsigned i=0; i < _eo.size(); ++i){ + sum1 += _eo[i]*_eo[i]; + sum2 += fabs(_eo[i]) + fabs(_eo[i]); + } + + // Store some fitness terms + tmpfit[1]= sum1; + tmpfit[2]= sum2; + + // Store the fitness + tmpfit = (sum1 + sum2)/_eo.size(); + + // Pass it + _eo.fitness( tmpfit ); + + } +}; + +// checks for help demand, and writes the status file and make_help; in libutils +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +int main(int argc, char* argv[]){ + + std::cout << "-----------------------------------" << std::endl; + std::cout << "START t-eoFitnessAssembledEA" << std::endl; + + try{ + + // Parser & State + eoParser parser(argc, argv); // for user-parameter reading + eoState state; // keeps all things allocated + + //// + // A) Representation dependent stuff + //// + + // The fitness + eoAssembledEvalFunc plainEval; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + // The genotype + eoRealInitBounded& init = do_make_genotype(parser, state, Indi() ); + + // The variation operators + eoGenOp& op = do_make_op(parser, state, init); + + //// + // B) Create representation independent stuff + //// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = do_make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = do_make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = do_make_checkpoint_assembled(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = do_make_algo_scalar(parser, state, eval, checkpoint, op); + + + make_help(parser); // To be called after all parameters have been read ! + + //// + // C) Run the algorithm + //// + + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out + std::cout << "Initial Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; + + do_run(ga, pop); // run the ga + + std::cout << "Final Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; + + } + catch(std::exception& e) + { + std::cout << e.what() << std::endl; + return 1; + } + + std::cout << "-----------------------------------" << std::endl; + std::cout << "END t-eoFitnessAssembledEA" << std::endl; + + return 0; + +} diff --git a/trunk/eo/test/t-eoFunctor.cpp b/trunk/eo/test/t-eoFunctor.cpp new file mode 100644 index 000000000..f309eebcf --- /dev/null +++ b/trunk/eo/test/t-eoFunctor.cpp @@ -0,0 +1,48 @@ +#include +#include + +void f(eoInit& func) +{ + int i; + func(i); +} + +class Tester : public eoInit +{ +public : + void operator()(int& i) + { + i=1; + } +}; + +#include +#include +#include + +using namespace std; + +int main(void) +{ + Tester test; + + eoFunctorStore store; + + /// make a counter and store it in 'store' + eoInit& cntr = make_counter(functor_category(test), test, store); + + eoUnaryFunctorCounter > cntr2(test); + + f(cntr); + f(cntr2); + f(cntr2); + f(test); + + typedef eoVariableLength EoType; + EoType eo; + + eo.push_back(1); + eo.push_back(2); + + return 1; +} diff --git a/trunk/eo/test/t-eoGA.cpp b/trunk/eo/test/t-eoGA.cpp new file mode 100644 index 000000000..fafed297d --- /dev/null +++ b/trunk/eo/test/t-eoGA.cpp @@ -0,0 +1,72 @@ +#include + +#include +#include +#include "binary_value.h" +#include + +using namespace std; + +int main(int argc, char* argv[]) +{ + + try + { + typedef eoBit EOT; + + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// + + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr mainEval( binary_value ); + eoEvalFuncCounter eval(mainEval); + + // the genotype - through a genotype initializer + eoInit& init = make_genotype(parser, state, EOT()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + + //// Now the representation-independent things + ////////////////////////////////////////////// + + // initialize the population - and evaluate + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorith + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // print it out + std::cout << "Initial Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; + + run_ea(ga, pop); // run the ga + + std::cout << "Final Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; + } + catch(std::exception& e) + { + std::cout << e.what() << std::endl; + } +} diff --git a/trunk/eo/test/t-eoGenOp.cpp b/trunk/eo/test/t-eoGenOp.cpp new file mode 100644 index 000000000..c959a3bb9 --- /dev/null +++ b/trunk/eo/test/t-eoGenOp.cpp @@ -0,0 +1,427 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// eoGenOp.cpp +// (c) Maarten Keijzer and Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: mkeijzer@dhi.dk + Marc.Schoenauer@polytechnique.fr + */ +//----------------------------------------------------------------------------- + +/** test program for the general operator - millenium version! + * uses dummy individuals + */ + +#include + +#include +#include +#include + +struct Dummy : public EO +{ + Dummy(std::string _s="") : s(_s) {} + + void printOn(std::ostream & _os) const + { + EO::printOn(_os); + _os << " - " << s ; + } + + std::string s; +}; + +typedef Dummy EOT; + +unsigned int pSize; // global to be used as marker in the fitness + +// DEFINITIONS of the eoOps +class monop : public eoMonOp +{ + public : + monop(char * _sig){sig=_sig;} + bool operator()(EOT& _eo) + { + _eo.s = sig + "(" + _eo.s + ")"; + _eo.fitness(_eo.fitness()+pSize); + return false; + } + std::string className() const {return sig;} + private: + std::string sig; +}; + +class binop: public eoBinOp +{ + public : + bool operator()(EOT& _eo1, const EOT& _eo2) + { + _eo1.s = "bin(" + _eo1.s + "," + _eo2.s + ")"; + double f= (_eo1.fitness()+_eo2.fitness()) * pSize; + _eo1.fitness(_eo1.fitness()+f); + return false; + } + std::string className() const {return "binop";} +}; + +class quadop: public eoQuadOp +{ + public : + std::string className() const {return "quadop";} + bool operator()(EOT& a, EOT& b) + { + EOT oi = a; + EOT oj = b; + + a.s = "quad1(" + oi.s + "," + oj.s + ")"; + b.s = "quad2(" + oj.s + "," + oi.s + ")"; + double f= (a.fitness()+b.fitness()+2*pSize) * pSize; + a.fitness(a.fitness()+f); + b.fitness(b.fitness()+f); + return false; + } +}; +// an eoQuadOp that does nothing +class quadClone: public eoQuadOp +{ + public : + std::string className() const {return "quadclone";} + bool operator()(EOT& , EOT& ) {return false;} +}; + +// User defined General Operator... adapted from Marc's example + +class one2threeOp : public eoGenOp // :-) +{ + public: + unsigned max_production(void) { return 3; } + + void apply(eoPopulator& _plop) + { + EOT& eo = *_plop; // select the guy + + ++_plop; // advance + _plop.insert("v(" + eo.s + ", 1)"); + ++_plop; + _plop.insert("v(" + eo.s + ", 2)"); + eo.s = "v(" + eo.s + ", 0)"; // only now change the thing + // oh right, and invalidate fitnesses + } + virtual std::string className() const {return "one2threeOp";} +}; + + +class two2oneOp : public eoGenOp // :-) +{ + public: + unsigned max_production(void) { return 1; } + + void apply(eoPopulator& _plop) + { + EOT& eo = *_plop; // select the guy + const EOT& eo2 = _plop.select(); + eo.s = "221(" + eo.s + ", " + eo2.s + ")"; + // oh right, and invalidate fitnesses + } + virtual std::string className() const {return "two2oneOp";} +}; + +class three2threeOp : public eoGenOp // :-) +{ + public: + unsigned max_production(void) { return 3; } + + void apply(eoPopulator& _plop) + { + EOT& eo1 = *_plop; // select 1st guy + EOT& eo2 = *++_plop; // select 2nd guy + EOT& eo3 = *++_plop; // select 3rd guy + EOT a = eo1; + EOT b = eo2; + EOT c = eo3; + std::cout << "les selectionnes: a=" << a << " et b=" << b << " et c=" << c << std::endl; + eo1.s = "323-1(" + a.s + ", " + b.s + ", " + c.s + ")"; + eo2.s = "323-2(" + a.s + ", " + b.s + ", " + c.s + ")"; + eo3.s = "323-3(" + a.s + ", " + b.s + ", " + c.s + ")"; + // oh right, and invalidate fitnesses + std::cout << "les enfants: a=" << eo1 << " et b=" << eo2 << " et c=" << eo3 << std::endl; + } + virtual std::string className() const {return "three2threeOp";} +}; + + +// dummy intialization. Re-init if no pSize, resize first if pSize +void init(eoPop & _pop, unsigned _pSize) +{ + if (_pSize) + { + _pop.resize(_pSize); + } + else + { + throw std::runtime_error("init pop with 0 size"); + } + for (unsigned i=0; i<_pSize; i++) + { + std::ostringstream os; + os << i; + _pop[i] = Dummy(os.str()); + _pop[i].fitness(i); + } +} + +// ok, now for the real work +int the_main(int argc, char **argv) +{ + eoParser parser(argc, argv); + eoValueParam parentSizeParam( + parser.createParam(unsigned(10), "parentSize", "Parent size",'P')); + pSize = parentSizeParam.value(); // global variable + + eoValueParam seedParam(time(0), "seed", "Random number seed", 'S'); + parser.processParam( seedParam ); + eo::rng.reseed(seedParam.value()); + + // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED + // i.e. in case you need parameters somewhere else, postpone these + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + exit(1); + } + + ////////////////////////////////// define operators + monop mon((char*)"mon1"); + monop clone((char*)"clone"); + binop bin; + quadop quad; + quadClone quadclone; + + // our own operator + one2threeOp o2t; + two2oneOp t2o; + three2threeOp t2t; + + + // a selector + eoDetTournamentSelect select; + // and a recognizable selector for testing the inbedded selector mechanism + eoBestSelect selectBest; + + // proportional selection between quad and bin + // so we either do a quad or a bin + eoProportionalOp pOp; + pOp.add(quad, 0.1); + pOp.add(bin, 0.1); + + // sequential selection between pOp and mon + eoSequentialOp sOp; + sOp.add(pOp, 0.9); + sOp.add(mon, 0.1); + + // with one2three op + eoSequentialOp sOp2; + sOp2.add(o2t, 1); + // sOp2.add(quad, 1); + + // with three2three op + eoSequentialOp sOp3; + sOp3.add(t2t, 1); + +// eoSequentialOp sOp3; +// sOp3.add(t2o, 1); +// sOp3.add(bin, 1); +// sOp3.add(quad, 1); + // try adding quads and bins to see what results you'll get + + // now a sequential selection that is a simple "addition" + eoSequentialOp sOpQuadPlusMon; + sOpQuadPlusMon.add(quad, 1); + sOpQuadPlusMon.add(mon, 1); + + // this corresponds + eoProportionalOp pOpSAGLike; + pOpSAGLike.add(sOpQuadPlusMon, 0.24); + pOpSAGLike.add(quad, 0.56); + pOpSAGLike.add(mon, 0.06); + pOpSAGLike.add(clone, 0.14); + + // init + eoPop pop; + eoPop offspring; + + init(pop, pSize); +// sort pop so seqPopulator is identical to SelectPopulator(SequentialSelect) + pop.sort(); + std::cout << "Population initiale" << std::endl << pop << std::endl; + + // To simulate SGA: first a prop between quadOp and quadClone + eoProportionalOp pSGAOp; + pSGAOp.add(quad, 0.8); + pSGAOp.add(quadclone, 0.2); + // sequential selection between pSGAOp and mon + eoSequentialOp virtualSGA; + virtualSGA.add(pSGAOp, 1.0); + virtualSGA.add(mon, 0.3); + + eoSeqPopulator popit(pop, offspring); // no selection, a copy of pop + + // until we filled a new population + try + { + while (offspring.size() < pop.size()) + { + virtualSGA(popit); + std::cout << "SeqPopulator boucle et incremente\n"; + ++popit; + } + } + catch(eoPopulator::OutOfIndividuals&) + { + std::cout << "Warning: not enough individuals to handle\n"; + } + + + std::swap(pop, offspring); + offspring.clear(); + + // ok, now print + std::cout << "Apres virtualSGA \n" << pop << std::endl; + init(pop, pSize); + + std::cout << "=========================================================\n"; + std::cout << "Now the eoSelectPopulator version !" << std::endl; + + eoSequentialSelect seqSelect; + // select.init(); should be sorted out: is it the setup method??? + eoSelectivePopulator it_step3(pop, offspring, seqSelect); + + while (offspring.size() < 2*pop.size()) + { + virtualSGA(it_step3); + std::cout << "SelectPopulator boucle et incremente\n"; + ++it_step3; + } + + std::swap(pop, offspring); + offspring.clear(); + + // ok, now print + std::cout << "Apres SGA-like eoSelectivePopulator\n" << pop << std::endl; + + std::cout << "=========================================================\n"; + std::cout << "Now the pure addition !" << std::endl; + + init(pop, pSize); + eoSelectivePopulator it_step4(pop, offspring, seqSelect); + while (offspring.size() < 2*pop.size()) + { + sOpQuadPlusMon(it_step4); + ++it_step4; + } + + std::swap(pop, offspring); + offspring.clear(); + + // ok, now print + std::cout << "Apres Quad+Mon ds un eoSelectivePopulator\n" << pop << std::endl; + + // On teste 1->3 + init(pop, pSize); + eoSelectivePopulator it_step5(pop, offspring, seqSelect); + while (offspring.size() < 2*pop.size()) + { + sOp2(it_step5); + ++it_step5; + } + + std::swap(pop, offspring); + offspring.clear(); + + // ok, now print + std::cout << "Apres 1->3 seul ds un eoSelectivePopulator\n" << pop << std::endl; + + // On teste 3->3 + init(pop, pSize); + eoSelectivePopulator it_step6(pop, offspring, seqSelect); + while (offspring.size() < 2*pop.size()) + { + sOp3(it_step6); + ++it_step6; + } + + std::swap(pop, offspring); + offspring.clear(); + + // ok, now print + std::cout << "Apres 3->3 seul ds un eoSelectivePopulator\n" << pop << std::endl; + + + return 1; +} + +int main(int argc, char **argv) +{ + try + { + the_main(argc, argv); + } + catch(std::exception& e) + { + std::cout << "Exception: " << e.what() << std::endl; + } + +} + +/* +If you want to build an SGA, you will need a copying quad op: + +class quadclone : ... +{ + operator(EOT& a, EOT& b) + { + // do nothing + } + +} + +Then the SGA operator will look like: + +quadop quad; +guadclone clone; + +ProportionalGenOp pOp; +pOp.add(quad, 0.8); +pOp.add(clone, 0.2); // so 80% xover rate + +SequentialGenOp sOp; +sOp.add(pOp, 1,0); // always try a xover (clone 20%) +sOp.add(mut, 0.1); // low mutation rate + +will result in an algorithm with: + +p_xover = 0.8 +p_mut = 0.1; + +p_reproduction = 0.2 * 0.9 = 0.18 + +this does not add up to 1 because xover and mutation can be applied to a single indi + +So what do you think? + +*/ diff --git a/trunk/eo/test/t-eoIQRStat.cpp b/trunk/eo/test/t-eoIQRStat.cpp new file mode 100644 index 000000000..e49dc38d4 --- /dev/null +++ b/trunk/eo/test/t-eoIQRStat.cpp @@ -0,0 +1,67 @@ +#include +#include +#include + +#include "real_value.h" + +typedef eoReal realVec; + +double test( eoPop& pop, double target_value ) +{ + eoEvalFuncPtr&> eval( real_value ); + + eoPopLoopEval pop_eval(eval); + + pop_eval(pop,pop); + + eoInterquartileRangeStat iqr_stat(0.0, "IQR"); + + iqr_stat( pop ); + + std::cout << iqr_stat.longName() << "=" << iqr_stat.value() << " should be " << target_value << std::endl; + + return iqr_stat.value(); +} + +int main() +{ + eoPop pop; + + // fixed test + realVec sol1(2,-1); + realVec sol2(2,-1); + realVec sol3(2,1); + realVec sol4(2,1); + pop.push_back( sol1 ); + pop.push_back( sol2 ); + pop.push_back( sol3 ); + pop.push_back( sol4 ); + // on the sphere function everyone has the same fitness of 1 + if( test(pop, 0) != 0 ) { + exit(1); + } + + pop.erase(pop.begin(),pop.end()); + + // fixed test + sol1 = realVec(2,0); + sol2 = realVec(2,0); + sol3 = realVec(2,1); + sol4 = realVec(2,1); + pop.push_back( sol1 ); + pop.push_back( sol2 ); + pop.push_back( sol3 ); + pop.push_back( sol4 ); + if( test(pop, 1) != 1 ) { + exit(1); + } + + // test on a random normal distribution + eoNormalGenerator normal(1,rng); + eoInitFixedLength init_N(2, normal); + pop = eoPop( 1000000, init_N ); + double iqr = test(pop, 1.09); + if( iqr < 1.08 || iqr > 1.11 ) { + exit(1); + } +} diff --git a/trunk/eo/test/t-eoInitPermutation.cpp b/trunk/eo/test/t-eoInitPermutation.cpp new file mode 100644 index 000000000..e4a683b15 --- /dev/null +++ b/trunk/eo/test/t-eoInitPermutation.cpp @@ -0,0 +1,68 @@ +//----------------------------------------------------------------------------- +// t-eoInitPermutation.cpp +//----------------------------------------------------------------------------- + +#include + +#include + +//----------------------------------------------------------------------------- + +typedef eoInt Chrom; + +//----------------------------------------------------------------------------- + + +double real_value(const Chrom & _chrom) +{ + double sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + sum += _chrom[i]; + return sum/_chrom.size(); +} + +// Return true if the given chromosome corresponds to a permutation +// There must be an nicer way to do it (set?) ... +bool check_permutation(const Chrom & _chrom) +{ + for (unsigned i = 0; i < _chrom.size(); ++i) + for (unsigned j = 0; j < _chrom.size(); ++j) + if(i!=j) + if(_chrom[i]==_chrom[j]){ + std::cout << " Error: Wrong permutation !" << std::endl; + std::string s; + s.append( " Wrong permutation in t-eoInitPermutation"); + throw std::runtime_error( s ); + } + return true; +} + +int main() +{ + const unsigned POP_SIZE = 8, CHROM_SIZE = 16; + unsigned i; + + // a chromosome randomizer + eoInitPermutation random(CHROM_SIZE); + + // the population: + eoPop pop; + + // Evaluation + eoEvalFuncPtr eval( real_value ); + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + std::cout << " Initial chromosome n°" << i << " : " << chrom << "..." << std::endl; + random(chrom); + eval(chrom); + std::cout << " ... becomes : " << chrom << " after initialization" << std::endl; + check_permutation(chrom); + pop.push_back(chrom); + } + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-eoInt.cpp b/trunk/eo/test/t-eoInt.cpp new file mode 100644 index 000000000..279803ce3 --- /dev/null +++ b/trunk/eo/test/t-eoInt.cpp @@ -0,0 +1,24 @@ +//----------------------------------------------------------------------------- +// t-eoInt.cpp +//----------------------------------------------------------------------------- + +#include +#include + +//----------------------------------------------------------------------------- + +typedef eoInt Chrom; + +//----------------------------------------------------------------------------- + +int main() +{ + Chrom chrom1, chrom2; + + std::cout << "chrom1 = " << chrom1 << std::endl + << "chrom2 = " << chrom2 << std::endl; + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-eoLogger.cpp b/trunk/eo/test/t-eoLogger.cpp new file mode 100644 index 000000000..198a88720 --- /dev/null +++ b/trunk/eo/test/t-eoLogger.cpp @@ -0,0 +1,50 @@ +//----------------------------------------------------------------------------- +// t-eoLogger.cpp +//----------------------------------------------------------------------------- + +#include + +//----------------------------------------------------------------------------- + +int main(int ac, char** av) +{ + eoParser parser(ac, av); + + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + exit(1); + } + + make_help(parser); + make_verbose(parser); + + eo::log << eo::setlevel(eo::debug); + + eo::log << eo::warnings; + + eo::log << "We are writing on the default output stream" << std::endl; + + eo::log << eo::file("test.txt") << "In FILE" << std::endl; + eo::log << std::cout << "on COUT" << std::endl; + + eo::log << eo::setlevel("errors"); + eo::log << eo::setlevel(eo::errors); + + eo::log << eo::quiet << "1) in quiet mode" << std::endl; + + eo::log << eo::setlevel(eo::warnings) << eo::warnings << "2) in warnings mode" << std::endl; + + eo::log << eo::setlevel(eo::logging); + + eo::log << eo::errors; + eo::log << "3) in errors mode"; + eo::log << std::endl; + + eo::log << eo::debug << 4 << ')' + << "4) in debug mode\n"; + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-eoOrderXover.cpp b/trunk/eo/test/t-eoOrderXover.cpp new file mode 100644 index 000000000..32e44dad9 --- /dev/null +++ b/trunk/eo/test/t-eoOrderXover.cpp @@ -0,0 +1,72 @@ +//----------------------------------------------------------------------------- +// t-eoOrderXover.cpp +//----------------------------------------------------------------------------- + +#include + +#include +#include +#include + + +//----------------------------------------------------------------------------- + +typedef eoInt Chrom; + +//----------------------------------------------------------------------------- +// Return true if the given chromosome corresponds to a permutation +bool check_permutation(const Chrom& _chrom){ + unsigned size= _chrom.size(); + std::set verif; + for(unsigned i=0; i< size; i++){ + if(verif.insert(_chrom[i]).second==false){ + std::cout << " Error: Wrong permutation !" << std::endl; + std::string s; + s.append( " Wrong permutation in t-eoShiftMutation"); + throw std::runtime_error( s ); + return false; + } + } + return true; +} + + +int main() +{ + const unsigned POP_SIZE = 3, CHROM_SIZE = 8; + unsigned i; + + // a chromosome randomizer + eoInitPermutation random(CHROM_SIZE); + + // the population: + eoPop pop; + + // Evaluation + //eoEvalFuncPtr eval( real_value ); + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + //eval(chrom); + pop.push_back(chrom); + } + + // a shift mutation + eoOrderXover cross; + + for (i = 0; i < POP_SIZE; ++i) + std::cout << " Initial chromosome n�" << i << " : " << pop[i] << "..." << std::endl; + + cross(pop[0],pop[1]); + cross(pop[1],pop[2]); + + for (i = 0; i < POP_SIZE; ++i) { + std::cout << " Initial chromosome n�" << i << " becomes : " << pop[i] << " after orderXover" << std::endl; + check_permutation(pop[i]); + } + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-eoPBIL.cpp b/trunk/eo/test/t-eoPBIL.cpp new file mode 100644 index 000000000..1d2654b83 --- /dev/null +++ b/trunk/eo/test/t-eoPBIL.cpp @@ -0,0 +1,148 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// t-eoPBIL.cpp +// (c) Marc Schoenauer, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Marc.Schoenauer@inria.fr + */ +//----------------------------------------------------------------------------- + +/** test program for PBIL algorithm */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include "binary_value.h" +#include +#include +#include +#include +#include + + +using namespace std; + +typedef eoBit Indi; + +// instanciating the outside subroutine that creates the distribution +#include "ga/make_PBILdistrib.h" +eoPBILDistrib & make_PBILdistrib(eoParser& _parser, eoState&_state, Indi _eo) +{ + return do_make_PBILdistrib(_parser, _state, _eo); +} + +// instanciating the outside subroutine that creates the update rule +#include "ga/make_PBILupdate.h" +eoDistribUpdater & make_PBILupdate(eoParser& _parser, eoState&_state, Indi _eo) +{ + return do_make_PBILupdate(_parser, _state, _eo); +} + + +int main(int argc, char* argv[]) +{ + + try + { + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// + + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr mainEval( binary_value); + eoEvalFuncCounter eval(mainEval); + + // Construction of the distribution + eoPBILDistrib & distrib = make_PBILdistrib(parser, state, Indi()); + // and the update rule + eoDistribUpdater & update = make_PBILupdate(parser, state, Indi()); + + //// Now the representation-independent things + ////////////////////////////////////////////// + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + + // add a graphical output for the distribution + // first, get the direname from the parser + // it has been enetered in make_checkoint + + eoParam* ptParam = parser.getParamWithLongName(string("resDir")); + eoValueParam* ptDirNameParam = dynamic_cast*>(ptParam); + if (!ptDirNameParam) // not found + throw runtime_error("Parameter resDir not found where it was supposed to be"); + + // now create the snapshot monitor + eoValueParam& plotDistribParam = parser.getORcreateParam(false, "plotDistrib", + "Plot Distribution", '\0', + "Output - Graphical"); + if (plotDistribParam.value()) + { +#ifdef HAVE_GNUPLOT + unsigned frequency=1; // frequency of plots updates + eoGnuplot1DSnapshot *distribSnapshot = new eoGnuplot1DSnapshot(ptDirNameParam->value(), + frequency, "distrib"); + state.storeFunctor(distribSnapshot); + // add the distribution (it is an eoValueParam >) + distribSnapshot->add(distrib); + // and of course add it to the checkpoint + checkpoint.add(*distribSnapshot); +#endif + } + + // the algorithm: EDA + // don't know where else to put the population size! + unsigned popSize = parser.getORcreateParam(unsigned(100), "popSize", + "Population Size", 'P', "Algorithm").value(); + eoSimpleEDA eda(update, eval, popSize, checkpoint); + + ///// End of construction of the algorith + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + + eda(distrib); // run the eda + + std::cout << "Final Distribution\n"; + distrib.printOn(std::cout); + std::cout << std::endl; + + // wait - for graphical output + if (plotDistribParam.value()) + { + string foo; + cin >> foo; + } + } + catch(std::exception& e) + { + std::cout << e.what() << std::endl; + } +} diff --git a/trunk/eo/test/t-eoParallel.cpp b/trunk/eo/test/t-eoParallel.cpp new file mode 100644 index 000000000..72d4f264a --- /dev/null +++ b/trunk/eo/test/t-eoParallel.cpp @@ -0,0 +1,56 @@ +//----------------------------------------------------------------------------- +// t-eoParallel.cpp +//----------------------------------------------------------------------------- + +#include + +#include +#include +//#include +#include "real_value.h" + +//----------------------------------------------------------------------------- + +typedef eoReal< eoMinimizingFitness > EOT; + +int main(int ac, char** av) +{ + eoParser parser(ac, av); + + unsigned int popSize = parser.getORcreateParam((unsigned int)100, "popSize", "Population Size", 'P', "Evolution Engine").value(); + unsigned int dimSize = parser.getORcreateParam((unsigned int)10, "dimSize", "Dimension Size", 'd', "Evolution Engine").value(); + + uint32_t seedParam = parser.getORcreateParam((uint32_t)0, "seed", "Random number seed", 0).value(); + if (seedParam == 0) { seedParam = time(0); } + + make_parallel(parser); + make_help(parser); + + rng.reseed( seedParam ); + + eoUniformGenerator< double > gen(-5, 5); + eoInitFixedLength< EOT > init( dimSize, gen ); + + eoEvalFuncPtr< EOT, double, const std::vector< double >& > mainEval( real_value ); + eoEvalFuncCounter< EOT > eval( mainEval ); + + eoPop< EOT > pop( popSize, init ); + + //apply< EOT >( eval, pop ); + eoPopLoopEval< EOT > popEval( eval ); + popEval( pop, pop ); + + eo::log << eo::quiet << "DONE!" << std::endl; + +#pragma omp parallel + { + if ( 0 == omp_get_thread_num() ) + { + eo::log << "num of threads: " << omp_get_num_threads() << std::endl; + } + } + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-eoParser.cpp b/trunk/eo/test/t-eoParser.cpp new file mode 100644 index 000000000..1fd6c7fdb --- /dev/null +++ b/trunk/eo/test/t-eoParser.cpp @@ -0,0 +1,31 @@ +#include +#include + +int main(int ac, char** av) +{ + eoParser parser(ac, av); + + unsigned int alpha1 = parser.createParam(10, "alpha1", "Alpha parameter").value(); + unsigned int alpha2 = parser.createParam(10, "alpha2", "Alpha parameter").value(); + unsigned int alpha3 = parser.createParam(10, "alpha3", "Alpha parameter").value(); + unsigned int alpha4 = parser.createParam(10, "alpha4", "Alpha parameter").value(); + unsigned int alpha5 = parser.createParam(10, "alpha5", "Alpha parameter").value(); + unsigned int alpha6 = parser.createParam(10, "alpha6", "Alpha parameter").value(); + + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + exit(1); + } + + make_help(parser); + + std::cout << "alpha1: " << alpha1 << std::endl; + std::cout << "alpha2: " << alpha2 << std::endl; + std::cout << "alpha3: " << alpha3 << std::endl; + std::cout << "alpha4: " << alpha4 << std::endl; + std::cout << "alpha5: " << alpha5 << std::endl; + std::cout << "alpha6: " << alpha6 << std::endl; + + return 0; +} diff --git a/trunk/eo/test/t-eoRNG.cpp b/trunk/eo/test/t-eoRNG.cpp new file mode 100644 index 000000000..1ece31a06 --- /dev/null +++ b/trunk/eo/test/t-eoRNG.cpp @@ -0,0 +1,53 @@ +//----------------------------------------------------------------------------- +// t-rng.cpp +//----------------------------------------------------------------------------- + +// This file really needs to be implementes usign some stringent tests, for now +// we simply check that the impementation of some methods does generally work... + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + + +using namespace std; + + +int main() +{ + const size_t num(10000); + double mean(100.); + double sigma(5.); + double sum(0.); + for(size_t i=0; i sigma / 0.68) { + cerr << "Normal distribution seems out of bounds; " + << "rerun to make sure it wasn't a statistical outlier" << endl; + return -1; + } + sum = 0.; + for(size_t i=0; i sigma / 0.68) { + cerr << "Normal distribution seems out of bounds; " + << "rerun to make sure it wasn't a statistical outlier" << endl; + return -1; + } + return 0; +} + + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-offsets: ((c . 0)) +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/eo/test/t-eoRandom.cpp b/trunk/eo/test/t-eoRandom.cpp new file mode 100644 index 000000000..30da63e30 --- /dev/null +++ b/trunk/eo/test/t-eoRandom.cpp @@ -0,0 +1,66 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + t-eoRandom.cpp + Test program for random generator + + (c) GeNeura Team, 1999 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ + +/** +CVS Info: $Date: 2003-02-27 19:20:24 $ $Author: okoenig $ $Revision: 1.13 $ +*/ + +//----------------------------------------------------------------------------- + +#include // cout +#include // ostrstream, istrstream +#include // eoBin +//#include +//#include + +//----------------------------------------------------------------------------- + +int main() { + eoUniformGenerator u1(-2.5,3.5); + eoUniformGenerator u2(0.003, 0.05 ); + eoUniformGenerator u3( 10000U, 10000000U); + + try + { // throws an error + eoUniformGenerator utest( 10000000U, 10000U); + throw; // if this succeeds something is wrong, make sure that that is noticed + } + catch (std::logic_error& e) + { + std::cout << e.what() << std::endl; + } + + std::ofstream os("t-eoRandom.out"); + + for ( unsigned i = 0; i < 100; i ++) + { + os << u1() << "\t" << u2() << "\t" << u3() << std::endl; + } + + return 0; // to avoid VC++ complaints + +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-eoReal.cpp b/trunk/eo/test/t-eoReal.cpp new file mode 100644 index 000000000..163b0ea86 --- /dev/null +++ b/trunk/eo/test/t-eoReal.cpp @@ -0,0 +1,72 @@ +#include + +#include +#include "real_value.h" +#include + +using namespace std; + +int main(int argc, char* argv[]) +{ + + try + { + typedef eoReal EOT; + + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// + + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr&> + mainEval( real_value ); + eoEvalFuncCounter eval(mainEval); + + // the genotype - through a genotype initializer + eoRealInitBounded& init = make_genotype(parser, state, EOT()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + + //// Now the representation-independent things + ////////////////////////////////////////////// + + // initialize the population - and evaluate + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ea = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorith + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // print it out + std::cout << "Initial Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; + + run_ea(ea, pop); // run the ea + + std::cout << "Final Population\n"; + pop.sortedPrintOn(std::cout); + std::cout << std::endl; + } + catch(std::exception& e) + { + std::cout << e.what() << std::endl; + } +} diff --git a/trunk/eo/test/t-eoReplacement.cpp b/trunk/eo/test/t-eoReplacement.cpp new file mode 100644 index 000000000..fc44543d8 --- /dev/null +++ b/trunk/eo/test/t-eoReplacement.cpp @@ -0,0 +1,223 @@ +//----------------------------------------------------------------------------- + +// to avoid long name warnings +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include // runtime_error + +//----------------------------------------------------------------------------- +// tt.cpp: +// +//----------------------------------------------------------------------------- + + +// general +#include +//----------------------------------------------------------------------------- + +struct Dummy : public EO +{ + typedef double Type; + void printOn(std::ostream & _os) const + { + _os << " - "; + EO::printOn(_os); + } +}; + + +struct eoDummyPop : public eoPop +{ +public : + eoDummyPop(int s=0) { resize(s); } +}; + +//----------------------------------------------------------------------------- + +int the_main(int argc, char **argv) +{ + eoParser parser(argc, argv); + eoValueParam parentSizeParam(10, "parentSize", "Parent size",'P'); + parser.processParam( parentSizeParam ); + unsigned int pSize = parentSizeParam.value(); + + eoValueParam offsrpringSizeParam(10, "offsrpringSize", "Offsrpring size",'O'); + parser.processParam( offsrpringSizeParam ); + unsigned int oSize = offsrpringSizeParam.value(); + + eoValueParam tournamentSizeParam(2, "tournamentSize", "Deterministic tournament size",'T'); + parser.processParam( tournamentSizeParam ); + unsigned int tSize = tournamentSizeParam.value(); + + eoValueParam tournamentRateParam(0.75, "tournamentRate", "Stochastic tournament rate",'R'); + parser.processParam( tournamentRateParam ); + double tRate = tournamentRateParam.value(); + + eoValueParam sParentsElitismRateParam(0.1, "sParentsElitismRateParam", "Strong elitism rate for parents",'E'); + parser.processParam( sParentsElitismRateParam ); + double sParentsElitismRate = sParentsElitismRateParam.value(); + + eoValueParam sParentsEugenismRateParam(0, "sParentsEugenismRateParam", "Strong Eugenism rate",'e'); + parser.processParam( sParentsEugenismRateParam ); + double sParentsEugenismRate = sParentsEugenismRateParam.value(); + + eoValueParam sOffspringElitismRateParam(0, "sOffspringElitismRateParam", "Strong elitism rate for parents",'E'); + parser.processParam( sOffspringElitismRateParam ); + double sOffspringElitismRate = sOffspringElitismRateParam.value(); + + eoValueParam sOffspringEugenismRateParam(0, "sOffspringEugenismRateParam", "Strong Eugenism rate",'e'); + parser.processParam( sOffspringEugenismRateParam ); + double sOffspringEugenismRate = sOffspringEugenismRateParam.value(); + + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + exit(1); + } + + unsigned i; + + std::cout << "Testing the replacements\nParents SIze = " << pSize + << " and offspring size = " << oSize << std::endl; + + rng.reseed(42); + + + eoDummyPop orgParents(pSize); + eoDummyPop orgOffspring(oSize); + + // initialize so we can recognize them later! + for (i=0; i genReplace; + eoPlusReplacement plusReplace; + eoEPReplacement epReplace(tSize); + eoCommaReplacement commaReplace; + eoWeakElitistReplacement weakElitistReplace(commaReplace); + // the SSGA replacements + eoSSGAWorseReplacement ssgaWorseReplace; + eoSSGADetTournamentReplacement ssgaDTReplace(tSize); + eoSSGAStochTournamentReplacement ssgaDSReplace(tRate); + + // here we go + // Generational + parents = orgParents; + offspring = orgOffspring; + + std::cout << "eoGenerationalReplacement\n"; + std::cout << "=========================\n"; + genReplace(parents, offspring); +std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (orogonally even\n" << offspring << std::endl; + + // Plus + parents = orgParents; + offspring = orgOffspring; + + std::cout << "eoPlusReplacement\n"; + std::cout << "=================\n"; + plusReplace(parents, offspring); +std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << std::endl; + + // EP (proche d'un PLUS + parents = orgParents; + offspring = orgOffspring; + + std::cout << "eoEPReplacement\n"; + std::cout << "===============\n"; + epReplace(parents, offspring); +std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << std::endl; + + // Comma + parents = orgParents; + offspring = orgOffspring; + + if (parents.size() > offspring.size() ) + std::cout << "Skipping Comma Replacement, more parents than offspring\n"; + else + { + std::cout << "eoCommaReplacement\n"; + std::cout << "==================\n"; + commaReplace(parents, offspring); + std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << std::endl; + + // Comma with weak elitism + parents = orgParents; + offspring = orgOffspring; + + std::cout << "The same, with WEAK elitism\n"; + std::cout << "===========================\n"; + weakElitistReplace(parents, offspring); + std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << std::endl; + } + + // preparing SSGA replace worse + parents = orgParents; + offspring = orgOffspring; + + if (parents.size() < offspring.size() ) + std::cout << "Skipping all SSGA Replacements, more offspring than parents\n"; + else + { + std::cout << "SSGA replace worse\n"; + std::cout << "==================\n"; + ssgaWorseReplace(parents, offspring); + std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << std::endl; + + // SSGA deterministic tournament + parents = orgParents; + offspring = orgOffspring; + + std::cout << "SSGA deterministic tournament\n"; + std::cout << "=============================\n"; + ssgaDTReplace(parents, offspring); + std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << std::endl; + + // SSGA stochastic tournament + parents = orgParents; + offspring = orgOffspring; + + std::cout << "SSGA stochastic tournament\n"; + std::cout << "==========================\n"; + ssgaDTReplace(parents, offspring); + std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << std::endl; + } + + // the general replacement + eoDeterministicSaDReplacement sAdReplace(sParentsElitismRate, sParentsEugenismRate, sOffspringElitismRate, sOffspringEugenismRate);// 10% parents survive + + parents = orgParents; + offspring = orgOffspring; + + std::cout << "General - strong elitism\n"; + std::cout << "========================\n"; + sAdReplace(parents, offspring); + std::cout << "Parents (originally odd)\n" << parents << "\n And offsprings (originally even)\n" << offspring << std::endl; + + + return 1; +} + +int main(int argc, char **argv) +{ + try + { + the_main(argc, argv); + } + catch(std::exception& e) + { + std::cout << "Exception: " << e.what() << std::endl; + } + +} diff --git a/trunk/eo/test/t-eoRingTopology.cpp b/trunk/eo/test/t-eoRingTopology.cpp new file mode 100644 index 000000000..de2824c26 --- /dev/null +++ b/trunk/eo/test/t-eoRingTopology.cpp @@ -0,0 +1,67 @@ +//----------------------------------------------------------------------------- +// t-eoRingTopology.cpp +//----------------------------------------------------------------------------- + + +#include + +typedef eoRealParticle < double >Indi; + +//Evaluation function +double f (const Indi & _indi) +{ + double sum = 0; + for (unsigned i = 0; i < _indi.size (); i++) + sum += pow(_indi[i],2); + return (-sum); +} + +int main_function(int argc, char **argv) +{ + //Parameters + const unsigned int VEC_SIZE = 2; + const unsigned int POP_SIZE = 10; + const unsigned int NEIGHBORHOOD_SIZE= 3; + + rng.reseed (33); + eoEvalFuncPtr plainEval(f); + eoEvalFuncCounter < Indi > eval (plainEval); + eoUniformGenerator < double >uGen (0., 5.); + eoInitFixedLength < Indi > random (VEC_SIZE, uGen); + eoUniformGenerator < double >sGen (-1., 1.); + eoVelocityInitFixedLength < Indi > veloRandom (VEC_SIZE, sGen); + eoFirstIsBestInit < Indi > localInit; + eoPop < Indi > pop; + pop.append (POP_SIZE, random); + apply(eval, pop); + apply < Indi > (veloRandom, pop); + apply < Indi > (localInit, pop); + eoRingTopology topology(NEIGHBORHOOD_SIZE); + topology.setup(pop); + std::cout<<"\n\n\nPopulation :\n\n"< +#include +#include +#include + +class TestEO : public EO { public: unsigned index; }; + +using namespace std; + +template +int test_select() +{ + vector probs(4); + probs[0] = 0.1; + probs[1] = 0.4; + probs[2] = 0.2; + probs[3] = 0.3; + + vector counts(4,0.0); + + // setup population + eoPop pop; + for (unsigned i = 0; i < probs.size(); ++i) + { + pop.push_back( TestEO()); + pop.back().fitness( probs[i] * 2.1232 ); // some number to check scaling + pop.back().index = i; + } + + Select select; + + unsigned ndraws = 10000; + + for (unsigned i = 0; i < ndraws; ++i) + { + const TestEO& eo = select(pop); + + counts[eo.index]++; + } + + cout << "Threshold = " << 1./sqrt(double(ndraws)) << endl; + + for (unsigned i = 0; i < 4; ++i) + { + cout << counts[i]/ndraws << ' '; + + double c = counts[i]/ndraws; + + if (fabs(c - probs[i]) > 1./sqrt((double)ndraws)) { + cout << "ERROR" << endl; + return 1; + } + } + + cout << endl; + return 0; +} + +int main() +{ + rng.reseed(44); + + if (test_select >()) return 1; + + return test_select >(); +} diff --git a/trunk/eo/test/t-eoSSGA.cpp b/trunk/eo/test/t-eoSSGA.cpp new file mode 100644 index 000000000..d1c467e5a --- /dev/null +++ b/trunk/eo/test/t-eoSSGA.cpp @@ -0,0 +1,117 @@ +#include + +// tests a Steady State GA + +// Needed to define this breeder, maybe make it a breeder +template +class eoBreedOne : public eoBreed +{ +public : + eoBreedOne(eoSelectOne& _select, eoGenOp& _op) : select(_select), op(_op) {} + + void operator()(const eoPop& _src, eoPop& _dest) + { + _dest.clear(); + eoSelectivePopulator pop(_src, _dest, select); + op(pop); + } + +private : + eoSelectOne& select; + eoGenOp& op; +}; + +typedef eoMinimizingFitness FitnessType; +typedef eoVector EoType; + +template +class eoMyEval : public eoEvalFunc +{ + public : + + void operator()(EOT& _eo) + { + _eo.fitness(*std::max_element(_eo.begin(), _eo.end())); + } +}; + +template +class Xover : public eoBinOp +{ + bool operator()(EOT& _eo, const EOT& _eo2) + { + unsigned point = rng.random(_eo.size()); + std::copy(_eo2.begin() + point, _eo2.end(), _eo.begin() + point); + return true; + } +}; + +template +class Mutate : public eoMonOp +{ + bool operator()(EOT& _eo) + { + unsigned point = rng.random(_eo.size()); + _eo[point] = rng.random(1024); + return true; + } +}; + + +int main() +{ + int pop_size = 10; + + eoGenContinue cnt(10); + eoCheckPoint cp(cnt); + + + Xover xover; + Mutate mutate; + + eoProportionalOp opsel; + + opsel.add(xover, 0.8); + opsel.add(mutate, 0.2); + + + eoDetTournamentSelect selector(3); + eoBreedOne breed(selector, opsel); + + // Replace a single one + eoSSGAWorseReplacement replace; + + +// eoRandomSelect selector; +// eoGeneralBreeder breed(selector, opsel); +// eoPlusReplacement replace; + + + eoMyEval eval; + + eoEasyEA algo(cp, eval, breed, replace); + + eoUniformGenerator unif(0,1024); + eoInitFixedLength init(20, unif); + + eoPop pop(pop_size, init); + + // evaluate + apply(eval, pop); + + eoBestFitnessStat best("Best_Fitness"); + eoAverageStat avg("Avg_Fitness"); + eoStdoutMonitor mon; + + cp.add(best); + cp.add(avg); + +// cp.add(mon); + + mon.add(best); + mon.add(avg); + + // and run + algo(pop); + +} diff --git a/trunk/eo/test/t-eoSecondsElapsedContinue.cpp b/trunk/eo/test/t-eoSecondsElapsedContinue.cpp new file mode 100644 index 000000000..d6124c22e --- /dev/null +++ b/trunk/eo/test/t-eoSecondsElapsedContinue.cpp @@ -0,0 +1,30 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include + +class Dummy : public EO {}; + +int main() { + + eoPop pop; + + eoSecondsElapsedContinue cnt(1); + + time_t start_time = time(0); + + while (cnt(pop)) {} + + time_t end_time = time(0); + + int diff = end_time = start_time; + + if (diff < 1) return 1; + + return 0; + +} diff --git a/trunk/eo/test/t-eoSelect.cpp b/trunk/eo/test/t-eoSelect.cpp new file mode 100644 index 000000000..23d76c48c --- /dev/null +++ b/trunk/eo/test/t-eoSelect.cpp @@ -0,0 +1,222 @@ +// to avoid long name warnings +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include + +#include + +//----------------------------------------------------------------------------- + +struct Dummy : public EO +{ + typedef double Type; + void printOn(std::ostream & _os) const + { + _os << " - "; + EO::printOn(_os); + } +}; + +bool operator==(const Dummy & _d1, const Dummy & _d2) +{ + return _d1.fitness() == _d2.fitness(); +} + +struct eoDummyPop : public eoPop +{ +public : + eoDummyPop(int s=0) { resize(s); } +}; + +// helper - DOES NOT WORK if different individuals have same fitness!!! +template +unsigned isInPop(EOT & _indi, eoPop & _pop) +{ + for (unsigned i=0; i<_pop.size(); i++) + if (_pop[i] == _indi) + return i; + return _pop.size(); +} + +unsigned int pSize; // global variable, bouh! +std::string fitnessType; // yes, a global variable :-) +eoDummyPop parentsOrg; + +template +void testSelectMany(eoSelect & _select, std::string _name) +{ + unsigned i; + std::cout << "\n\n" << fitnessType + _name << std::endl; + std::cout << "===============\n"; + + eoDummyPop parents(parentsOrg); + eoDummyPop offspring(0); + + // do the selection + _select(parents, offspring); + + // compute stats + std::vector nb(parents.size(), 0); + for (i=0; i(offspring[i], parents); + if (trouve == parents.size()) // pas trouve + throw std::runtime_error("Pas trouve ds parents"); + nb[trouve]++; + } + // dump to file so you can plot using gnuplot - dir name is hardcoded! + std::string fName = "ResSelect/" + fitnessType + _name + ".select"; + std::ofstream os(fName.c_str()); + for (i=0; i " << ( (double)nb[i])/offspring.size() << std::endl; + os << i << " " << ( (double)nb[i])/offspring.size() << std::endl; + } + +} + +template +void testSelectOne(eoSelectOne & _select, eoHowMany & _offspringRate, + eoHowMany & _fertileRate, std::string _name) +{ + eoTruncatedSelectOne truncSelect(_select, _fertileRate); + eoSelectMany percSelect(truncSelect, _offspringRate); + testSelectMany(percSelect, _name); +} + + +//----------------------------------------------------------------------------- + +int the_main(int argc, char **argv) +{ + eoParser parser(argc, argv); + eoValueParam parentSizeParam = parser.createParam(unsigned(10), "parentSize", "Parent size",'P'); + pSize = parentSizeParam.value(); // global variable + +// eoValueParam offsrpringRateParam = parser.createParam(1.0, "offsrpringRate", "Offsrpring rate",'O'); +// double oRate = offsrpringRateParam.value(); + eoValueParam offsrpringRateParam = parser.createParam(eoHowMany(1.0), "offsrpringRate", "Offsrpring rate (% or absolute)",'O'); + eoHowMany oRate = offsrpringRateParam.value(); + + eoValueParam fertileRateParam = parser.createParam(eoHowMany(1.0), "fertileRate", "Fertility rate (% or absolute)",'F'); + eoHowMany fRate = fertileRateParam.value(); + +eoValueParam tournamentSizeParam = parser.createParam(unsigned(2), "tournamentSize", "Deterministic tournament size",'T'); + unsigned int tSize = tournamentSizeParam.value(); + + eoValueParam tournamentRateParam = parser.createParam(1.0, "tournamentRate", "Stochastic tournament rate",'t'); + double tRate = tournamentRateParam.value(); + + eoValueParam rankingPressureParam = parser.createParam(2.0, "rankingPressure", "Selective pressure for the ranking selection",'p'); + double rankingPressure = rankingPressureParam.value(); + + eoValueParam rankingExponentParam = parser.createParam(1.0, "rankingExponent", "Exponent for the ranking selection",'e'); + double rankingExponent = rankingExponentParam.value(); + + eoValueParam fitTypeParam = parser.createParam(std::string("linear"), "fitType", "Type of fitness (linear, exp, log, super",'f'); + fitnessType = fitTypeParam.value(); + + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + exit(0); + } + + // hard-coded directory name ... + system("mkdir ResSelect"); + std::cout << "Testing the Selections\nParents size = " << pSize + << ", offspring rate = " << oRate; + std::cout << " and putting rsulting files in dir ResSelect" << std::endl; + + // initialize parent population + parentsOrg.resize(pSize); + if (fitnessType == std::string("linear")) + for (unsigned i=0; i& seedParam = parser.createParam(uint32_t(0), "seed", + "Random number seed", 'S'); + if (seedParam.value() == 0) + seedParam.value() = time(0); + rng.reseed(seedParam.value()); + + char fileName[1024]; + +// the selection procedures under test + // eoDetSelect detSelect(oRate); + // testSelectMany(detSelect, "detSelect"); + + // Roulette + eoProportionalSelect propSelect; + testSelectOne(propSelect, oRate, fRate, "PropSelect"); + + // Linear ranking using the perf2Worth construct + eoRankingSelect newRankingSelect(rankingPressure); + sprintf(fileName,"LinRank_%g",rankingPressure); + testSelectOne(newRankingSelect, oRate, fRate, fileName); + + // Exponential ranking using the perf2Worth construct + std::cout << "rankingExponent " << rankingExponent << std::endl; + eoRankingSelect expRankingSelect(rankingPressure,rankingExponent); + sprintf(fileName,"ExpRank_%g_%g",rankingPressure, rankingExponent); + testSelectOne(expRankingSelect, oRate, fRate, fileName); + + // Det tournament + eoDetTournamentSelect detTourSelect(tSize); + sprintf(fileName,"DetTour_%d",tSize); + testSelectOne(detTourSelect, oRate, fRate, fileName); + + // Stoch tournament + eoStochTournamentSelect stochTourSelect(tRate); + sprintf(fileName,"StochTour_%g",tRate); + testSelectOne(stochTourSelect, oRate, fRate, fileName); + + // Fitness scaling + eoFitnessScalingSelect newFitScaleSelect(rankingPressure); + sprintf(fileName,"LinFitScale_%g",rankingPressure); + testSelectOne(newFitScaleSelect, oRate, fRate, fileName); + + // Sequential selections + eoSequentialSelect seqSel(false); + strcpy(fileName,"Sequential"); + testSelectOne(seqSel, oRate, fRate, fileName); + + eoEliteSequentialSelect eliteSeqSel; + strcpy(fileName,"EliteSequential"); + testSelectOne(eliteSeqSel, oRate, fRate, fileName); + + return 1; +} + +int main(int argc, char **argv) +{ + try + { + the_main(argc, argv); + } + catch(std::exception& e) + { + std::cout << "Exception: " << e.what() << std::endl; + return 1; + } +} diff --git a/trunk/eo/test/t-eoSharing.cpp b/trunk/eo/test/t-eoSharing.cpp new file mode 100644 index 000000000..86721b098 --- /dev/null +++ b/trunk/eo/test/t-eoSharing.cpp @@ -0,0 +1,240 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +// to avoid long name warnings +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include +#include + +// general +#include +#include + +//----------------------------------------------------------------------------- + +struct Dummy : public EO +{ + typedef double Type; + void printOn(std::ostream & _os) const + { + EO::printOn(_os); + std::cout << " " << xdist ; + } + double xdist; +}; + +class +eoDummyDistance : public eoDistance +{ + double operator()(const Dummy & _v1, const Dummy & _v2) + { + double r= _v1.xdist - _v2.xdist; + return sqrt(r*r); + } +}; + + +bool operator==(const Dummy & _d1, const Dummy & _d2) +{ + return _d1.fitness() == _d2.fitness(); +} + +struct eoDummyPop : public eoPop +{ +public : + eoDummyPop(int s=0) { resize(s); } +}; + +// helper - DOES NOT WORK if different individuals have same fitness!!! +template +unsigned isInPop(EOT & _indi, eoPop & _pop) +{ + for (unsigned i=0; i<_pop.size(); i++) + if (_pop[i] == _indi) + return i; + return _pop.size(); +} + +unsigned int pSize; // global variable, bouh! +std::string fitnessType; // yes, a global variable :-) +eoDummyPop parentsOrg; + +template +void testSelectMany(eoSelect & _select, std::string _name) +{ + unsigned i; + std::cout << "\n\n" << fitnessType + _name << std::endl; + std::cout << "===============\n"; + + eoDummyPop parents(parentsOrg); + eoDummyPop offspring(0); + + // do the selection + _select(parents, offspring); + + // cout << "Pop offspring \n" << offspring << endl; + + // compute stats + std::vector nb(parents.size(), 0); + for (i=0; i(offspring[i], parents); + if (trouve == parents.size()) // pas trouve + throw std::runtime_error("Pas trouve ds parents"); + nb[trouve]++; + } + // dump to file so you can plot using gnuplot - dir name is hardcoded! + std::string fName = "ResSelect/" + fitnessType + _name + ".select"; + std::ofstream os(fName.c_str()); + for (i=0; i " << ( (double)nb[i])/offspring.size() << std::endl; + os << i << " " << ( (double)nb[i])/offspring.size() << std::endl; + } + +} + +template +void testSelectOne(eoSelectOne & _select, eoHowMany & _offspringRate, + eoHowMany & _fertileRate, std::string _name) +{ + eoTruncatedSelectOne truncSelect(_select, _fertileRate); + eoSelectMany percSelect(truncSelect, _offspringRate); + testSelectMany(percSelect, _name); +} + + +//----------------------------------------------------------------------------- + +int the_main(int argc, char **argv) +{ + eoParser parser(argc, argv); + + // random seed + eoValueParam& seedParam = parser.createParam(uint32_t(0), "seed", "Random number seed", 'S'); + if (seedParam.value() == 0) + seedParam.value() = time(0); + rng.reseed(seedParam.value()); + + + // pSize global variable ! + eoValueParam pSizeParam = parser.createParam(unsigned(10), "parentSize", "Parent size",'P'); + pSize = pSizeParam.value(); + + eoHowMany oRate = parser.createParam(eoHowMany(1.0), "offsrpringRate", "Offsrpring rate (% or absolute)",'O').value(); + + eoHowMany fRate = parser.createParam(eoHowMany(1.0), "fertileRate", "Fertility rate (% or absolute)",'F').value(); + + + double nicheSize = parser.createParam(0.1, "nicheSize", "Paramter Sigma for Sharing",'\0').value(); + + eoParamParamType & peakParam = parser.createParam(eoParamParamType("2(1,2)"), "peaks", "Description of the peaks: N(nb1,nb2,...,nbN)", 'p').value(); + + // the number of peaks: first item of the paramparam + unsigned peakNumber = atoi(peakParam.first.c_str()); + if (peakNumber < 2) + { + std::cerr << "WARNING, nb of peaks must be larger than 2, using 2" << std::endl; + peakNumber = 2; + } + + std::vector nbIndiPerPeak(peakNumber); + unsigned i, sum=0; + + // the second item is a vector containing all values + if (!peakParam.second.size()) // no other parameter : equal peaks + { + std::cerr << "WARNING, no nb of indis per peaks, using equal nbs" << std::endl; + for (i=0; i detSelect(oRate); + // testSelectMany(detSelect, "detSelect"); + + // Sharing using the perf2Worth construct + // need a distance for that + eoDummyDistance dist; + eoSharingSelect newSharingSelect(nicheSize, dist); + sprintf(fileName,"Niche_%g",nicheSize); + testSelectOne(newSharingSelect, oRate, fRate, fileName); + + return 1; +} + +int main(int argc, char **argv) +{ + try + { + the_main(argc, argv); + } + catch(std::exception& e) + { + std::cout << "Exception: " << e.what() << std::endl; + return 1; + } +} diff --git a/trunk/eo/test/t-eoShiftMutation.cpp b/trunk/eo/test/t-eoShiftMutation.cpp new file mode 100644 index 000000000..15c4e6b92 --- /dev/null +++ b/trunk/eo/test/t-eoShiftMutation.cpp @@ -0,0 +1,79 @@ +//----------------------------------------------------------------------------- +// t-eoShiftMutation.cpp +//----------------------------------------------------------------------------- + +#include + +#include +#include +#include + +//----------------------------------------------------------------------------- + +typedef eoInt Chrom; + +//----------------------------------------------------------------------------- + + +double real_value(const Chrom & _chrom) +{ + double sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + sum += _chrom[i]; + return sum/_chrom.size(); +} + +// Return true if the given chromosome corresponds to a permutation +bool check_permutation(const Chrom& _chrom){ + unsigned size= _chrom.size(); + std::set verif; + for(unsigned i=0; i< size; i++){ + if(verif.insert(_chrom[i]).second==false){ + std::cout << " Error: Wrong permutation !" << std::endl; + std::string s; + s.append( " Wrong permutation in t-eoShiftMutation"); + throw std::runtime_error( s ); + return false; + } + } + return true; +} + + +int main() +{ + const unsigned POP_SIZE = 3, CHROM_SIZE = 8; + unsigned i; + + // a chromosome randomizer + eoInitPermutation random(CHROM_SIZE); + + // the population: + eoPop pop; + + // Evaluation + eoEvalFuncPtr eval( real_value ); + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + eval(chrom); + pop.push_back(chrom); + } + + // a shift mutation + eoShiftMutation shift; + + for (i = 0; i < POP_SIZE; ++i) + { + std::cout << " Initial chromosome n°" << i << " : " << pop[i] << "..." << std::endl; + shift(pop[i]); + std::cout << " ... becomes : " << pop[i] << " after shift mutation" << std::endl; + check_permutation(pop[i]); + } + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-eoStateAndParser.cpp b/trunk/eo/test/t-eoStateAndParser.cpp new file mode 100644 index 000000000..a851cb595 --- /dev/null +++ b/trunk/eo/test/t-eoStateAndParser.cpp @@ -0,0 +1,139 @@ +//----------------------------------------------------------------------------- + +// to avoid long name warnings +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include // runtime_error + +//----------------------------------------------------------------------------- +// tt.cpp: +// +//----------------------------------------------------------------------------- + + +// general +#include // Random number generators +#include +#include +#include + +//----------------------------------------------------------------------------- + +// include package checkpointing +#include +// and provisions for Bounds reading +#include + +struct Dummy : public EO +{ + typedef double Type; +}; + + +//----------------------------------------------------------------------------- + +int the_main(int argc, char **argv) +{ // ok, we have a command line parser and a state + + typedef eoBit Chrom; + + eoParser parser(argc, argv); + + // Define Parameters + eoValueParam dimParam((unsigned int)(5), "dimension", "dimension"); + eoValueParam rate(0.01, "mutationRatePerBit", "Initial value for mutation rate per bit"); + eoValueParam factor(0.99, "mutationFactor", "Decrease factor for mutation rate"); + eoValueParam seed(time(0), "seed", "Random number seed"); + // test if user entered or if default value used + if (parser.isItThere(seed)) + std::cout << "YES\n"; + else + std::cout << "NO\n"; + + eoValueParam load_name("", "Load","Load",'L'); + eoValueParam save_name("", "Save","Save",'S'); + + + // Register them + parser.processParam(dimParam, "Genetic Operators"); + parser.processParam(rate, "Genetic Operators"); + parser.processParam(factor, "Genetic Operators"); + parser.processParam(load_name, "Persistence"); + parser.processParam(save_name, "Persistence"); + parser.processParam(seed, "Rng seeding"); + + // a bound param (need dim) + eoValueParam boundParam(eoRealVectorBounds(dimParam.value(),eoDummyRealNoBounds), "bounds","bounds",'b'); + + parser.processParam(boundParam, "Genetic Operators"); + + std::cout << "Bounds: " << boundParam.value() << std::endl; + + eoState state; + state.registerObject(parser); + + + if (load_name.value() != "") + { // load the parser. This is only neccessary when the user wants to + // be able to change the parameters in the state file by hand. + state.load(load_name.value()); // load the parser + } + + // Create the algorithm here + + // Register the algorithm + state.registerObject(rng); + //state.registerObject(pop); + + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + return 0; + } + + // Either load or initialize + if (load_name.value() != "") + { + state.load(load_name.value()); // load the rest + } + else + { + // else + + // initialize rng and population + + rng.reseed(seed.value()); + } + + // run the algorithm + + // Save when needed + if (save_name.value() != "") + { + std::string file_name = save_name.value(); + save_name.value() = ""; // so that it does not appear in the parser section of the state file + state.save(file_name); + } + + for (int i = 0; i < 100; ++i) + rng.rand(); + + std::cout << "a random number is " << rng.random(1024) << std::endl;; + + return 1; +} + +int main(int argc, char **argv) +{ + try + { + the_main(argc, argv); + } + catch(std::exception& e) + { + std::cout << "Exception: " << e.what() << std::endl; + } + +} diff --git a/trunk/eo/test/t-eoSwapMutation.cpp b/trunk/eo/test/t-eoSwapMutation.cpp new file mode 100644 index 000000000..3099d7075 --- /dev/null +++ b/trunk/eo/test/t-eoSwapMutation.cpp @@ -0,0 +1,81 @@ +//----------------------------------------------------------------------------- +// t-eoSwapMutation.cpp +//----------------------------------------------------------------------------- + +#include + +#include +#include +#include + +//----------------------------------------------------------------------------- + +typedef eoInt Chrom; + +//----------------------------------------------------------------------------- + + +double real_value(const Chrom & _chrom) +{ + double sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + sum += _chrom[i]; + return sum/_chrom.size(); +} + +//----------------------------------------------------------------------------- +// Return true if the given chromosome corresponds to a permutation +bool check_permutation(const Chrom& _chrom){ + unsigned size= _chrom.size(); + std::set verif; + for(unsigned i=0; i< size; i++){ + if(verif.insert(_chrom[i]).second==false){ + std::cout << " Error: Wrong permutation !" << std::endl; + std::string s; + s.append( " Wrong permutation in t-eoShiftMutation"); + throw std::runtime_error( s ); + return false; + } + } + return true; +} + + +int main() +{ + const unsigned POP_SIZE = 8, CHROM_SIZE = 16; + unsigned i; + + // a chromosome randomizer + eoInitPermutation random(CHROM_SIZE); + + // the population: + eoPop pop; + + // Evaluation + eoEvalFuncPtr eval( real_value ); + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + eval(chrom); + pop.push_back(chrom); + } + + + // a swap mutation + eoSwapMutation swap; + + for (i = 0; i < POP_SIZE; ++i) + { + std::cout << " Initial chromosome n°" << i << " : " << pop[i] << "..." << std::endl; + swap(pop[i]); + std::cout << " ... becomes : " << pop[i] << " after swap mutation" << std::endl; + check_permutation(pop[i]); + } + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-eoSymreg.cpp b/trunk/eo/test/t-eoSymreg.cpp new file mode 100644 index 000000000..d332789ba --- /dev/null +++ b/trunk/eo/test/t-eoSymreg.cpp @@ -0,0 +1,299 @@ +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include + +using namespace gp_parse_tree; +using namespace std; + +//----------------------------------------------------------------------------- + +class SymregNode +{ +public : + + enum Operator {X = 'x', Plus = '+', Min = '-', Mult = '*', PDiv = '/'}; + + SymregNode() { init(); } + SymregNode(Operator _op) { op = _op; } + virtual ~SymregNode() {} + + // arity function, need this function! + int arity() const { return op == X? 0 : 2; } + + void randomize() {} + + // evaluation function, single case, using first argument to give value of variable + template + void operator()(double& result, Children args, double var) const + { + double r1(0.), r2(0.); + if (arity() == 2) + { + args[0].apply(r1, var); + args[1].apply(r2, var); + } + switch (op) + { + case Plus : result = r1 + r2; break; + case Min : result = r1 - r2; break; + case Mult : result = r1 * r2; break; + case PDiv : { + if (r2 == 0.0) + // protection a la Koza, realistic implementations + // should maybe throw an exception + result = 1.0; + else + result = r1 / r2; + break; + } + case X : result = var; break; + } + } + + /// 'Pretty' print to ostream function + template + void operator()(string& result, Children args) const + { + static const string lb = "("; + static const string rb = ")"; + char opStr[4] = " "; + opStr[1] = op; + + if (arity() == 0) + { + result = "x"; + return; + } + // else + string r1; + args[0].apply(r1); + result = lb + r1; + result += opStr; + args[1].apply(r1); + result += r1 + rb; + } + + Operator getOp() const { return op; } + +protected : + + void init() { op = X; } + +private : + + Operator op; // the type of node +}; + +/// initializor +static SymregNode init_sequence[5] = {SymregNode::X, SymregNode::Plus, SymregNode::Min, SymregNode::Mult, SymregNode::PDiv}; // needed for intialization + +// MSVC does not recognize the lt_arity in eoParseTreeDepthInit +// without this specialization ... +// 2 months later, it seems it does not accept this definition ... +// but dies accept the lt_arity in eoParseTreeDepthInit +// !!! +// #ifdef _MSC_VER +// template <> +// bool lt_arity(const SymregNode &node1, const SymregNode &node2) +// { +// return (node1.arity() < node2.arity()); +// } +// #endif + +//----------------------------------------------------------- +// saving, loading + +std::ostream& operator<<(std::ostream& os, const SymregNode& eot) +{ + os << static_cast(eot.getOp()); + return os; +} + +std::istream& operator>>(std::istream& is, SymregNode& eot) +{ + char type; + type = (char) is.get(); + eot = SymregNode(static_cast(type)); + return is; +} + + +//----------------------------------------------------------------------------- +/** Implementation of a function evaluation object. */ + +double targetFunction(double x) +{ + return x * x * x * x - x * x * x + x * x * x - x * x + x - 10; +} + +// parameters controlling the sampling of points +const double xbegin = -10.0f; +const double xend = 10.0f; +const double xstep = 1.3f; + +template struct RMS: public eoEvalFunc< eoParseTree > +{ +public : + + typedef eoParseTree EoType; + + typedef eoParseTree argument_type; + typedef double fitness_type; + + RMS() : eoEvalFunc() + { + int n = int( (xend - xbegin) / xstep); + + inputs.resize(n); + target.resize(n); + + int i = 0; + + for (double x = xbegin; x < xend && i < n; ++i, x+=xstep) + { + target[i] = targetFunction(x); + inputs[i] = x; + } + } + + ~RMS() {} + + void operator()( EoType & _eo ) + { + vector outputs; + outputs.resize(inputs.size()); + + double fitness = 0.0; + + for (unsigned i = 0; i < inputs.size(); ++i) + { + _eo.apply(outputs[i], inputs[i]); + fitness += (outputs[i] - target[i]) * (outputs[i] - target[i]); + } + + fitness /= (double) target.size(); + fitness = sqrt(fitness); + + if (fitness > 1e+20) + fitness = 1e+20; + + _eo.fitness(fitness); + } + +private : + vector inputs; + vector target; +}; + +template +void print_best(eoPop& pop) +{ + std::cout << std::endl; + FitnessType best = pop[0].fitness(); + int index = 0; + + for (unsigned i = 1; i < pop.size(); ++i) + { + if (best < pop[i].fitness()) + { + best = pop[i].fitness(); + index = i; + } + } + + std::cout << "\t"; + + string str; + pop[index].apply(str); + + std::cout << str.c_str(); + std::cout << std::endl << "RMS Error = " << pop[index].fitness() << std::endl; +} + +int main() +{ + typedef eoMinimizingFitness FitnessType; + typedef SymregNode GpNode; + + typedef eoParseTree EoType; + typedef eoPop Pop; + + const int MaxSize = 100; + const int nGenerations = 10; // only a test, so few generations + + // Initializor sequence, contains the allowable nodes + vector init(init_sequence, init_sequence + 5); + + // Depth Initializor, defaults to grow method. + eoGpDepthInitializer initializer(10, init); + + // Root Mean Squared Error Measure + RMS eval; + + Pop pop(50, initializer); + + apply(eval, pop); + + eoSubtreeXOver xover(MaxSize); + eoBranchMutation mutation(initializer, MaxSize); + + // The operators are encapsulated into an eoTRansform object, + // that performs sequentially crossover and mutation + eoSGATransform transform(xover, 0.75, mutation, 0.25); + + // The robust tournament selection + eoDetTournamentSelect selectOne(2); // tSize in [2,POPSIZE] + // is now encapsulated in a eoSelectMany: 2 at a time -> SteadyState + eoSelectMany select(selectOne,2, eo_is_an_integer); + + // and the Steady-State replacement + eoSSGAWorseReplacement replace; + + // Terminators + eoGenContinue term(nGenerations); + + eoCheckPoint checkPoint(term); + + eoAverageStat avg; + eoBestFitnessStat best; + eoStdoutMonitor monitor; + + checkPoint.add(monitor); + checkPoint.add(avg); + checkPoint.add(best); + + monitor.add(avg); + monitor.add(best); + + // GP generation + eoEasyEA gp(checkPoint, eval, select, transform, replace); + + std::cout << "Initialization done" << std::endl; + + print_best(pop); + + try + { + gp(pop); + } + catch (std::exception& e) + { + std::cout << "exception: " << e.what() << std::endl;; + exit(EXIT_FAILURE); + } + + print_best(pop); +} + + + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-offsets: ((c . 0)) +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/eo/test/t-eoSyncEasyPSO.cpp b/trunk/eo/test/t-eoSyncEasyPSO.cpp new file mode 100644 index 000000000..68d9838bd --- /dev/null +++ b/trunk/eo/test/t-eoSyncEasyPSO.cpp @@ -0,0 +1,104 @@ +//----------------------------------------------------------------------------- +// t-eoEasySyncPSO.cpp +//----------------------------------------------------------------------------- + +#ifndef __GNUG__ +// to avoid long name warnings +#pragma warning(disable:4786) +#endif // __GNUG__ + +#include + +//----------------------------------------------------------------------------- +typedef eoMinimizingFitness FitT; +typedef eoRealParticle < FitT > Particle; +//----------------------------------------------------------------------------- + +// the objective function +double real_value (const Particle & _particle) +{ + double sum = 0; + for (unsigned i = 0; i < _particle.size ()-1; i++) + sum += pow(_particle[i],2); + return (sum); +} + + +int main() +{ + const unsigned int VEC_SIZE = 2; + const unsigned int POP_SIZE = 20; + const unsigned int NEIGHBORHOOD_SIZE= 5; + unsigned i; + + // the population: + eoPop pop; + + // Evaluation + eoEvalFuncPtr eval( real_value ); + + // position init + eoUniformGenerator < double >uGen (-3, 3); + eoInitFixedLength < Particle > random (VEC_SIZE, uGen); + + // velocity init + eoUniformGenerator < double >sGen (-2, 2); + eoVelocityInitFixedLength < Particle > veloRandom (VEC_SIZE, sGen); + + // local best init + eoFirstIsBestInit < Particle > localInit; + + // perform position initialization + pop.append (POP_SIZE, random); + + // topology + eoLinearTopology topology(NEIGHBORHOOD_SIZE); + + // the full initializer + eoInitializer init(eval,veloRandom,localInit,topology,pop); + init(); + + + // bounds + eoRealVectorBounds bnds(VEC_SIZE,-1.5,1.5); + + // velocity + eoStandardVelocity velocity (topology,1,1.6,2,bnds); + + // flight + eoStandardFlight flight; + + // Terminators + eoGenContinue genCont1 (50); + eoGenContinue genCont2 (50); + + // PS flight + eoSyncEasyPSO pso1(genCont1, eval, velocity, flight); + + eoSyncEasyPSO pso2(init,genCont2, eval, velocity, flight); + + // flight + try + { + pso1(pop); + std::cout << "FINAL POPULATION AFTER SYNC PSO n°1:" << std::endl; + for (i = 0; i < pop.size(); ++i) + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + + pso2(pop); + std::cout << "FINAL POPULATION AFTER SYNC PSO n°2:" << std::endl; + for (i = 0; i < pop.size(); ++i) + std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl; + } + catch (std::exception& e) + { + std::cout << "exception: " << e.what() << std::endl;; + exit(EXIT_FAILURE); + } + + + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-eoTwoOptMutation.cpp b/trunk/eo/test/t-eoTwoOptMutation.cpp new file mode 100644 index 000000000..60ef89a15 --- /dev/null +++ b/trunk/eo/test/t-eoTwoOptMutation.cpp @@ -0,0 +1,80 @@ +//----------------------------------------------------------------------------- +// t-eoTwoOptMutation.cpp +//----------------------------------------------------------------------------- + +#include + +#include +#include +#include + +//----------------------------------------------------------------------------- + +typedef eoInt Chrom; + +//----------------------------------------------------------------------------- + + +double real_value(const Chrom & _chrom) +{ + double sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + sum += _chrom[i]; + return sum/_chrom.size(); +} + +//----------------------------------------------------------------------------- +// Return true if the given chromosome corresponds to a permutation +bool check_permutation(const Chrom& _chrom){ + unsigned size= _chrom.size(); + std::set verif; + for(unsigned i=0; i< size; i++){ + if(verif.insert(_chrom[i]).second==false){ + std::cout << " Error: Wrong permutation !" << std::endl; + std::string s; + s.append( " Wrong permutation in t-eoShiftMutation"); + throw std::runtime_error( s ); + return false; + } + } + return true; +} + + +int main() +{ + const unsigned POP_SIZE = 3, CHROM_SIZE = 8; + unsigned i; + + // a chromosome randomizer + eoInitPermutation random(CHROM_SIZE); + + // the population: + eoPop pop; + + // Evaluation + eoEvalFuncPtr eval( real_value ); + + for (i = 0; i < POP_SIZE; ++i) + { + Chrom chrom(CHROM_SIZE); + random(chrom); + eval(chrom); + pop.push_back(chrom); + } + + // a twoOpt mutation + eoTwoOptMutation twoOpt; + + for (i = 0; i < POP_SIZE; ++i) + { + std::cout << " Initial chromosome n°" << i << " : " << pop[i] << "..." << std::endl; + twoOpt(pop[i]); + std::cout << " ... becomes : " << pop[i] << " after twoOpt mutation" << std::endl; + check_permutation(pop[i]); + } + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-eoUniform.cpp b/trunk/eo/test/t-eoUniform.cpp new file mode 100644 index 000000000..c4f188d48 --- /dev/null +++ b/trunk/eo/test/t-eoUniform.cpp @@ -0,0 +1,22 @@ +//----------------------------------------------------------------------------- +// t-eouniform +//----------------------------------------------------------------------------- + +#include // std::cout +#include // ostrstream, istrstream +#include // eoBin + +//----------------------------------------------------------------------------- + +main() { + eoUniform u1(-2.5,3.5); + eoUniform u2(0.003, 0 ); + eoUniform u3( 10000U, 10000000U); + std::cout << "u1\t\tu2\t\tu3" << std::endl; + for ( unsigned i = 0; i < 100; i ++) { + std::cout << u1() << "\t" << u2() << "\t" << u3() << std::endl; + } + +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-eoVector.cpp b/trunk/eo/test/t-eoVector.cpp new file mode 100644 index 000000000..768178c3f --- /dev/null +++ b/trunk/eo/test/t-eoVector.cpp @@ -0,0 +1,74 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + t-eoVector.cpp + This program tests vector-like chromosomes + (c) GeNeura Team, 1999, 2000 + + Modified by Maarten Keijzer 2001 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ +//----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include + +#include +#include // eoVector +#include +#include + +//----------------------------------------------------------------------------- + +typedef eoVector Chrom1; +typedef eoVector Chrom2; + +//----------------------------------------------------------------------------- + +int main() +{ + const unsigned SIZE = 4; + + // check if the appropriate ctor gets called + Chrom1 chrom(SIZE, 5); + + for (unsigned i = 0; i < chrom.size(); ++i) + { + assert(chrom[i] == 5); + } + + eoUniformGenerator uniform(-1,1); + eoInitFixedLength init(SIZE, uniform); + + init(chrom); + + std::cout << chrom << std::endl; + + Chrom2 chrom2(chrom); + + std::cout << chrom2 << std::endl; + +// eoInitVariableLength initvar( + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-eoVirus.cpp b/trunk/eo/test/t-eoVirus.cpp new file mode 100644 index 000000000..8ecdf207e --- /dev/null +++ b/trunk/eo/test/t-eoVirus.cpp @@ -0,0 +1,76 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + t-eoVirus.cpp + This program tests the the binary cromosomes and several genetic operators + (c) GeNeura Team, 1999 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ +//----------------------------------------------------------------------------- + +#include // std::cout +#include // general EO +#include "MGE/VirusOp.h" +#include "MGE/eoVirus.h" +#include "MGE/eoInitVirus.h" +#include + +#include "binary_value.h" + +//----------------------------------------------------------------------------- + +typedef eoVirus Chrom; + +//----------------------------------------------------------------------------- + +int main() +{ + const unsigned SIZE = 8; + eoBooleanGenerator gen; + eo::rng.reseed( time( 0 ) ); + + Chrom chrom(SIZE), chrom2(SIZE); + chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); + std::cout << chrom << std::endl; + std::cout << chrom2 << std::endl; + + // Virus Mutation + VirusBitFlip vf; + unsigned i; + for ( i = 0; i < 10; i++ ) { + vf( chrom ); + std::cout << chrom << std::endl; + } + + // Chrom Mutation + std::cout << "Chrom mutation--------" << std::endl; + VirusMutation vm; + for ( i = 0; i < 10; i++ ) { + vm( chrom ); + std::cout << chrom << std::endl; + } + + // Chrom Transmision + std::cout << "Chrom transmission--------" << std::endl; + VirusTransmission vt; + vt( chrom2, chrom ); + std::cout << chrom2 << std::endl; + + return 0; + +} diff --git a/trunk/eo/test/t-eobin.cpp b/trunk/eo/test/t-eobin.cpp new file mode 100644 index 000000000..d857dd822 --- /dev/null +++ b/trunk/eo/test/t-eobin.cpp @@ -0,0 +1,218 @@ +/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + + t-eobin.cpp + This program tests the the binary cromosomes and several genetic operators + (c) GeNeura Team, 1999 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ +//----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + +#include // std::cout +#include + +#include // general EO +#include // bitstring representation & operators +#include +#include "binary_value.h" + +//----------------------------------------------------------------------------- + +typedef eoBit Chrom; + +//----------------------------------------------------------------------------- + +void main_function() +{ + const unsigned SIZE = 8; + unsigned i, j; + eoBooleanGenerator gen; + + Chrom chrom(SIZE), chrom2; + chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); + + std::cout << "chrom: " << chrom << std::endl; + chrom[0] = chrom[SIZE - 1] = true; chrom.fitness(binary_value(chrom)); + std::cout << "chrom: " << chrom << std::endl; + chrom[0] = chrom[SIZE - 1] = false; chrom.fitness(binary_value(chrom)); + std::cout << "chrom: " << chrom << std::endl; + chrom[0] = chrom[SIZE - 1] = true; chrom.fitness(binary_value(chrom)); + + std::cout << "chrom.className() = " << chrom.className() << std::endl; + + std::cout << "chrom: " << chrom << std::endl + << "chrom2: " << chrom2 << std::endl; + + std::ostringstream os; + os << chrom; + std::istringstream is(os.str()); + is >> chrom2; chrom.fitness(binary_value(chrom2)); + + std::cout << "\nTesting reading, writing\n"; + std::cout << "chrom: " << chrom << "\nchrom2: " << chrom2 << '\n'; + + std::fill(chrom.begin(), chrom.end(), false); + std::cout << "--------------------------------------------------" + << std::endl << "eoMonOp's aplied to .......... " << chrom << std::endl; + + eoInitFixedLength + random(chrom.size(), gen); + + random(chrom); chrom.fitness(binary_value(chrom)); + std::cout << "after eoBinRandom ............ " << chrom << std::endl; + + eoOneBitFlip bitflip; + bitflip(chrom); chrom.fitness(binary_value(chrom)); + std::cout << "after eoBitFlip .............. " << chrom << std::endl; + + eoBitMutation mutation(0.5); + mutation(chrom); chrom.fitness(binary_value(chrom)); + std::cout << "after eoBinMutation(0.5) ..... " << chrom << std::endl; + + eoBitInversion inversion; + inversion(chrom); chrom.fitness(binary_value(chrom)); + std::cout << "after eoBinInversion ......... " << chrom << std::endl; + + eoBitNext next; + next(chrom); chrom.fitness(binary_value(chrom)); + std::cout << "after eoBinNext .............. " << chrom << std::endl; + + eoBitPrev prev; + prev(chrom); chrom.fitness(binary_value(chrom)); + std::cout << "after eoBinPrev .............. " << chrom << std::endl; + + std::fill(chrom.begin(), chrom.end(), false); chrom.fitness(binary_value(chrom)); + std::fill(chrom2.begin(), chrom2.end(), true); chrom2.fitness(binary_value(chrom2)); + std::cout << "--------------------------------------------------" + << std::endl << "eoBinOp's aplied to ... " + << chrom << " " << chrom2 << std::endl; + + eo1PtBitXover xover; + std::fill(chrom.begin(), chrom.end(), false); + std::fill(chrom2.begin(), chrom2.end(), true); + xover(chrom, chrom2); + chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); + std::cout << "eoBinCrossover ........ " << chrom << " " << chrom2 << std::endl; + + for (i = 1; i < SIZE; i++) + { + eoNPtsBitXover nxover(i); + std::fill(chrom.begin(), chrom.end(), false); + std::fill(chrom2.begin(), chrom2.end(), true); + nxover(chrom, chrom2); + chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); + std::cout << "eoBinNxOver(" << i << ") ........ " + << chrom << " " << chrom2 << std::endl; + } + + for (i = 1; i < SIZE / 2; i++) + for (j = 1; j < SIZE / 2; j++) + { + eoBitGxOver gxover(i, j); + std::fill(chrom.begin(), chrom.end(), false); + std::fill(chrom2.begin(), chrom2.end(), true); + gxover(chrom, chrom2); + chrom.fitness(binary_value(chrom)); chrom2.fitness(binary_value(chrom2)); + std::cout << "eoBinGxOver(" << i << ", " << j << ") ..... " + << chrom << " " << chrom2 << std::endl; + } + + // test SGA algorithm + eoGenContinue continuator1(50); + eoFitContinue continuator2(65535.f); + + eoCombinedContinue continuator(continuator1, continuator2); + + eoCheckPoint checkpoint(continuator); + + eoStdoutMonitor monitor; + + checkpoint.add(monitor); + + eoSecondMomentStats stats; + + monitor.add(stats); + checkpoint.add(stats); + + eoProportionalSelect select; + eoEvalFuncPtr eval(binary_value); + + eoSGA sga(select, xover, 0.8f, bitflip, 0.1f, eval, checkpoint); + + eoInitFixedLength init(16, gen); + eoPop pop(100, init); + + apply(eval, pop); + + sga(pop); + + pop.sort(); + + std::cout << "Population " << pop << std::endl; + + std::cout << "\nBest: " << pop[0].fitness() << '\n'; + + /* + + Commented this out, waiting for a definite decision what to do with the mOp's + + // Check multiOps + eoMultiMonOp mOp( &next ); + mOp.adOp( &bitflip ); + std::cout << "before multiMonOp............ " << chrom << std::endl; + mOp( chrom ); + std::cout << "after multiMonOp .............. " << chrom << std::endl; + + eoBinGxOver gxover(2, 4); + eoMultiBinOp mbOp( &gxover ); + mOp.adOp( &bitflip ); + std::cout << "before multiBinOp............ " << chrom << " " << chrom2 << std::endl; + mbOp( chrom, chrom2 ); + std::cout << "after multiBinOp .............. " << chrom << " " << chrom2 < +#endif + +int main() +{ +#ifdef _MSC_VER + // rng.reseed(42); + int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + flag |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetDbgFlag(flag); +// _CrtSetBreakAlloc(100); +#endif + + try + { + main_function(); + } + catch(std::exception& e) + { + std::cout << "Exception: " << e.what() << '\n'; + } + +} diff --git a/trunk/eo/test/t-eofitness.cpp b/trunk/eo/test/t-eofitness.cpp new file mode 100644 index 000000000..1cc55e65a --- /dev/null +++ b/trunk/eo/test/t-eofitness.cpp @@ -0,0 +1,89 @@ +//----------------------------------------------------------------------------- +// t-eofitness.cpp +// (c) GeNeura Team 1998 +//----------------------------------------------------------------------------- + +#include // time +#include // srand, rand +#include // std::cout + +#include + +using namespace std; + +//----------------------------------------------------------------------------- + +template +int test_fitness(Fitness a, Fitness b) +{ +// srand(time(0)); + +// Fitness a = aval; //static_cast(rand()) / RAND_MAX; +// Fitness b = bval; //static_cast(rand()) / RAND_MAX; + + std::cout.precision(2); + + unsigned repeat = 2; + while (repeat--) + { + std::cout << "------------------------------------------------------" << std::endl; + std::cout << "testing < "; + if (a < b) + std::cout << a << " < " << b << " is true" << std::endl; + else + std::cout << a << " < " << b << " is false" < "; + if (a > b) + std::cout << a << " > " << b << " is true" << std::endl; + else + std::cout << a << " > " << b << " is false" < + +*/ + +//----------------------------------------------------------------------------- +// t-openmp.cpp +//----------------------------------------------------------------------------- + +#include +#include +#include + +#include +#include + +#include + +#include + +#include + +#include "real_value.h" + +//----------------------------------------------------------------------------- + +typedef eoReal< eoMinimizingFitness > EOT; + +//----------------------------------------------------------------------------- + +inline uint32_t get_rdtsc() { __asm__ ("xor %eax, %eax; cpuid; rdtsc"); } + +double variable_time_function(const std::vector&) +{ + eoRng myrng( get_rdtsc() ); + ::usleep( myrng.random( 10 ) ); + return 0.0; +} + +double measure_apply( size_t p, + void (*fct)(eoUF&, std::vector&), + eoInitFixedLength< EOT >& init, + eoEvalFuncCounter< EOT >& eval ) +{ + eoPop< EOT > pop( p, init ); + double t1 = omp_get_wtime(); + fct( eval, pop ); + double t2 = omp_get_wtime(); + return t2 - t1; +} + +void measure( size_t p, + eoInitFixedLength< EOT >& init, + eoEvalFuncCounter< EOT >& eval, + std::ofstream& speedupFile, + std::ofstream& efficiencyFile, + std::ofstream& dynamicityFile, + size_t nbtask ) +{ + // sequential scope + double Ts = measure_apply( p, apply< EOT >, init, eval ); + // parallel scope + double Tp = measure_apply( p, omp_apply< EOT >, init, eval ); + // parallel scope dynamic + double Tpd = measure_apply( p, omp_dynamic_apply< EOT >, init, eval ); + + double speedup = Ts / Tp; + + if ( speedup > nbtask ) { return; } + + double efficiency = speedup / nbtask; + + speedupFile << speedup << ' '; + efficiencyFile << efficiency << ' '; + + eo::log << eo::debug; + eo::log << "Ts = " << Ts << std::endl; + eo::log << "Tp = " << Tp << std::endl; + eo::log << "S_p = " << speedup << std::endl; + eo::log << "E_p = " << efficiency << std::endl; + + double dynamicity = Tp / Tpd; + + if ( dynamicity > nbtask ) { return; } + + eo::log << "Tpd = " << Tpd << std::endl; + eo::log << "D_p = " << dynamicity << std::endl; + + dynamicityFile << dynamicity << ' '; +} + + +int main(int ac, char** av) +{ + eoParser parser(ac, av); + + unsigned int popMin = parser.getORcreateParam((unsigned int)1, "popMin", "Population Min", 'p', "Evolution Engine").value(); + unsigned int popStep = parser.getORcreateParam((unsigned int)1, "popStep", "Population Step", 0, "Evolution Engine").value(); + unsigned int popMax = parser.getORcreateParam((unsigned int)100, "popMax", "Population Max", 'P', "Evolution Engine").value(); + + unsigned int dimMin = parser.getORcreateParam((unsigned int)1, "dimMin", "Dimension Min", 'd', "Evolution Engine").value(); + unsigned int dimStep = parser.getORcreateParam((unsigned int)1, "dimStep", "Dimension Step", 0, "Evolution Engine").value(); + unsigned int dimMax = parser.getORcreateParam((unsigned int)100, "dimMax", "Dimension Max", 'D', "Evolution Engine").value(); + + unsigned int nRun = parser.getORcreateParam((unsigned int)100, "nRun", "Number of runs", 'r', "Evolution Engine").value(); + + std::string fileNamesPrefix = parser.getORcreateParam(std::string(""), "fileNamesPrefix", "Prefix of all results files name", 'H', "Results").value(); + + std::string speedupFileName = parser.getORcreateParam(std::string("speedup"), "speedupFileName", "Speedup file name", 0, "Results").value(); + std::string efficiencyFileName = parser.getORcreateParam(std::string("efficiency"), "efficiencyFileName", "Efficiency file name", 0, "Results").value(); + std::string dynamicityFileName = parser.getORcreateParam(std::string("dynamicity"), "dynamicityFileName", "Dynamicity file name", 0, "Results").value(); + + uint32_t seedParam = parser.getORcreateParam((uint32_t)0, "seed", "Random number seed", 0).value(); + if (seedParam == 0) { seedParam = time(0); } + + unsigned int measureConstTime = parser.getORcreateParam((unsigned int)1, "measureConstTime", "Toggle measure of constant time", 'C', "Results").value(); + unsigned int measureVarTime = parser.getORcreateParam((unsigned int)1, "measureVarTime", "Toggle measure of variable time", 'V', "Results").value(); + + if (parser.userNeedsHelp()) + { + parser.printHelp(std::cout); + exit(1); + } + + make_help(parser); + make_verbose(parser); + + rng.reseed( seedParam ); + + eoEvalFuncPtr< EOT, double, const std::vector< double >& > mainEval( real_value ); + eoEvalFuncCounter< EOT > eval( mainEval ); + + eoEvalFuncPtr< EOT, double, const std::vector< double >& > mainEval_variable( variable_time_function ); + eoEvalFuncCounter< EOT > eval_variable( mainEval_variable ); + + eoUniformGenerator< double > gen(-5, 5); + + std::ostringstream params; + params << "_p" << popMin << "_pS" << popStep << "_P" << popMax + << "_d" << dimMin << "_dS" << dimStep << "_D" << dimMax + << "_r" << nRun << "_s" << seedParam; + + std::ofstream speedupFile( std::string( fileNamesPrefix + speedupFileName + params.str() ).c_str() ); + std::ofstream efficiencyFile( std::string( fileNamesPrefix + efficiencyFileName + params.str() ).c_str() ); + std::ofstream dynamicityFile( std::string( fileNamesPrefix + dynamicityFileName + params.str() ).c_str() ); + + std::ofstream speedupFile_variable( std::string( fileNamesPrefix + "variable_" + speedupFileName + params.str() ).c_str() ); + std::ofstream efficiencyFile_variable( std::string( fileNamesPrefix + "variable_" + efficiencyFileName + params.str() ).c_str() ); + std::ofstream dynamicityFile_variable( std::string( fileNamesPrefix + "variable_" + dynamicityFileName + params.str() ).c_str() ); + + size_t nbtask = 1; +#pragma omp parallel + { + nbtask = omp_get_num_threads(); + } + + eo::log << eo::logging << "Nb task: " << nbtask << std::endl; + + for ( size_t p = popMin; p <= popMax; p += popStep ) + { + for ( size_t d = dimMin; d <= dimMax; d += dimStep ) + { + eo::log << eo::logging << p << 'x' << d << std::endl; + + for ( size_t r = 0; r < nRun; ++r ) + { + eoInitFixedLength< EOT > init( d, gen ); + + // for constant time measure + if ( measureConstTime == 1 ) + { + measure( p, init, eval, speedupFile, efficiencyFile, dynamicityFile, nbtask ); + } + + // for variable time measure + if ( measureVarTime == 1 ) + { + measure( p, init, eval_variable, speedupFile_variable, efficiencyFile_variable, dynamicityFile_variable, nbtask ); + } + } // end of runs + + if ( measureConstTime == 1 ) + { + speedupFile << std::endl; + efficiencyFile << std::endl; + dynamicityFile << std::endl; + } + + if ( measureVarTime == 1 ) + { + speedupFile_variable << std::endl; + efficiencyFile_variable << std::endl; + dynamicityFile_variable << std::endl; + } + + } // end of dimension + + } // end of population + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/eo/test/t-openmp.py b/trunk/eo/test/t-openmp.py new file mode 100755 index 000000000..0b0ea157b --- /dev/null +++ b/trunk/eo/test/t-openmp.py @@ -0,0 +1,161 @@ +#!/usr/bin/env python + +# +# (c) Thales group, 2010 +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; +# version 2 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Contact: http://eodev.sourceforge.net +# +# Authors: +# Caner Candan +# + +import optparse, logging, sys, os +from datetime import datetime + +LEVELS = {'debug': logging.DEBUG, + 'info': logging.INFO, + 'warning': logging.WARNING, + 'error': logging.ERROR, + 'critical': logging.CRITICAL} + +LOG_DEFAULT_FILENAME='notitle.log' + +RESULT_FILE_FORMAT='%s%s_p%d_pS%d_P%d_d%d_dS%d_D%d_r%d_s%d' + +def parser(parser=optparse.OptionParser()): + # general parameters + parser.add_option('-v', '--verbose', choices=LEVELS.keys(), default='info', help='set a verbose level') + parser.add_option('-f', '--file', help='give an input project filename', default='') + parser.add_option('-o', '--output', help='give an output filename for logging', default=LOG_DEFAULT_FILENAME) + # general parameters ends + + parser.add_option('-r', '--nRun', type='int', default=100, help='how many times you would compute each iteration ?') + parser.add_option('-s', '--seed', type='int', default=1, help='give here a seed value') + parser.add_option('-n', '--nProc', type='int', default=1, help='give a number of processus, this value is multiplied by the measures bounds') + parser.add_option('-F', '--fixedBound', type='int', default=1000, help='give the fixed bound value common for all measures') + + topic = str(datetime.today()) + for char in [' ', ':', '-', '.']: topic = topic.replace(char, '_') + parser.add_option('-t', '--topic', default='openmp_measures_' + topic + '/', help='give here a topic name used to create the folder') + + parser.add_option('-E', '--onlyexecute', action='store_true', default=False, help='used this option if you only want to execute measures without generating images') + parser.add_option('-X', '--onlyprint', action='store_true', default=False, help='used this option if you only want to generate images without executing measures, dont forget to set the good path in using --topic with a "/" at the end') + + parser.add_option('-C', '--onlyConstTime', action='store_true', default=False, help='only measures constant time problem') + parser.add_option('-V', '--onlyVarTime', action='store_true', default=False, help='only measures variable time problem') + + parser.add_option('-m', '--measure', action='append', type='int', help='select all measure you want to produce, by default all are produced') + + options, args = parser.parse_args() + + logger(options.verbose, options.output) + + return options + +def logger(level_name, filename=LOG_DEFAULT_FILENAME): + logging.basicConfig( + level=logging.DEBUG, + format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', + filename=filename, filemode='a' + ) + + console = logging.StreamHandler() + console.setLevel(LEVELS.get(level_name, logging.NOTSET)) + console.setFormatter(logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s')) + logging.getLogger('').addHandler(console) + +options = parser() + +if not options.onlyexecute: + import pylab + +def get_boxplot_data( filename ): + try: + f = open( filename ) + return [ [ float(value) for value in line.split() ] for line in f.readlines() ] + except: + raise ValueError('got an issue during the reading of file %s' % filename) + +def do_measure( name, p, ps, P, d, ds, D, r=options.nRun, s=options.seed, v='logging' ): + OPENMP_EXEC_FORMAT='./test/t-openmp -p=%d --popStep=%d -P=%d -d=%d --dimStep=%d -D=%d -r=%d --seed=%d -v=%s -H=%s -C=%d -V=%d' + + pwd = options.topic + name + '_' + cmd = OPENMP_EXEC_FORMAT % (p, ps, P, d, ds, D, r, s, v, pwd, + 0 if options.onlyVarTime else 1, + 0 if options.onlyConstTime else 1) + logging.info( cmd ) + if not options.onlyprint: + os.system( cmd ) + + if not options.onlyexecute: + def generate( filenames ): + for cur in filenames: + filename = RESULT_FILE_FORMAT % (pwd, cur, p, ps, P, d, ds, D, r, s) + pylab.boxplot( get_boxplot_data( filename ) ) + nonzero = lambda x: x if x > 0 else 1 + iters = ( nonzero( P - p ) / ps ) * ( nonzero( D - d ) / ds ) + pylab.xlabel('%d iterations from %d,%d to %d,%d' % ( iters, p, d, P, D) ) + pylab.ylabel('%s - %s' % (cur, name)) + pylab.savefig( filename + '.pdf', format='pdf' ) + pylab.savefig( filename + '.png', format='png' ) + pylab.cla() + pylab.clf() + + if not options.onlyVarTime: + generate( ['speedup', 'efficiency', 'dynamicity'] ) + if not options.onlyConstTime: + generate( ['variable_speedup', 'variable_efficiency', 'variable_dynamicity'] ) + +def main(): + if not options.onlyprint: + logging.info('creates first the new topic repository %s', options.topic) + os.mkdir( options.topic ) + + logging.info('do all tests with r = %d and a common seed value = %d' % (options.nRun, options.seed)) + + logging.info('EA in time O(1) and O(n) - speedup measure Sp, Ep and Dp for P & D') + + n = options.nProc + F = options.fixedBound + + if options.measure is None or 1 in options.measure: + logging.info('(1) measure for all combinaisons of P n D') + do_measure( '1', 1*n, 10*n, 101*n, 1*n, 10*n, 101*n ) + + if options.measure is None or 2 in options.measure: + logging.info('(2) measure for P \in [%d, %d[ with D fixed to %d' % (1*n, 101*n, F)) + do_measure( '2', 1*n, 1*n, 101*n, F, 1, F ) + + if options.measure is None or 3 in options.measure: + logging.info('(3) measure for P \in [%d, %d[ with ps = %d and D fixed to %d' % (1*n, 1001*n, 10*n, F)) + do_measure( '3', 1*n, 10*n, 1001*n, F, 1, F ) + + if options.measure is None or 4 in options.measure: + logging.info('(4) measure for D \in [%d, %d[ with P fixed to %d' % (1*n, 101*n, F)) + do_measure( '4', F, 1, F, 1*n, 1*n, 101*n ) + + if options.measure is None or 5 in options.measure: + logging.info('(5) measure for D \in [%d, %d[ with ds = %d and P fixed to %d' % (1*n, 1001*n, 10*n, F)) + do_measure( '5', F, 1, F, 1*n, 10*n, 1001*n ) + +# when executed, just run main(): +if __name__ == '__main__': + logging.debug('### plotting started ###') + + main() + + logging.debug('### plotting ended ###') diff --git a/trunk/eo/test/t-selectOne.cpp b/trunk/eo/test/t-selectOne.cpp new file mode 100644 index 000000000..0647d5d23 --- /dev/null +++ b/trunk/eo/test/t-selectOne.cpp @@ -0,0 +1,88 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// t-selectOne.cpp +// This program test the breeder object +// (c) GeNeura Team, 1998 +/* + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + +*/ +//----------------------------------------------------------------------------- + +#ifndef __GNUG__ +// to avoid long name warnings +#pragma warning(disable:4786) +#endif // __GNUG__ + +#include // eoBin, eoPop, eoBreeder +#include +#include + +#include +#include +#include + + +//----------------------------------------------------------------------------- + +typedef eoBin Chrom; + +#include "binary_value.h" + +//----------------------------------------------------------------------------- + +main() +{ + const unsigned POP_SIZE = 8, CHROM_SIZE = 4; + unsigned i; + + eoBinRandom random; + eoPop pop; + + // Create the population + for (i = 0; i < POP_SIZE; ++i) { + Chrom chrom(CHROM_SIZE); + random(chrom); + BinaryValue()(chrom); + pop.push_back(chrom); + } + + // print population + std::cout << "population:" << std::endl; + for (i = 0; i < pop.size(); ++i) + std::cout << pop[i] << " " << pop[i].fitness() << std::endl; + + // Declare 1-selectors + eoUniformSelect uSelect; + + Chrom aChrom; + aChrom = uSelect( pop ); + std::cout << "Uniform Select " << aChrom << " " << aChrom.fitness() << std::endl; + + eoStochTournament sSelect(0.7); + aChrom = sSelect( pop ); + std::cout << "Stochastic Tournament " << aChrom << " " << aChrom.fitness() << std::endl; + + eoDetTournament dSelect(3); + aChrom = dSelect( pop ); + std::cout << "Deterministic Tournament " << aChrom << " " << aChrom.fitness() << std::endl; + + return 0; +} + +//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/tutorial/examples/CMakeLists.txt b/trunk/eo/tutorial/CMakeLists.txt similarity index 59% rename from trunk/paradiseo-old-mo/tutorial/examples/CMakeLists.txt rename to trunk/eo/tutorial/CMakeLists.txt index d9b5e13c8..6462b5a58 100644 --- a/trunk/paradiseo-old-mo/tutorial/examples/CMakeLists.txt +++ b/trunk/eo/tutorial/CMakeLists.txt @@ -2,10 +2,15 @@ ### 1) Where must cmake go now ? ###################################################################################### -#SUBDIRS(tsp function) -ADD_SUBDIRECTORY(tsp) -ADD_SUBDIRECTORY(function) +IF(ENABLE_EO_TUTORIAL) + + ADD_SUBDIRECTORY(Lesson1) + ADD_SUBDIRECTORY(Lesson2) + ADD_SUBDIRECTORY(Lesson3) + ADD_SUBDIRECTORY(Lesson4) + ADD_SUBDIRECTORY(Lesson5) + ADD_SUBDIRECTORY(Lesson6) + +ENDIF() ###################################################################################### - - diff --git a/trunk/eo/tutorial/Lesson1/CMakeLists.txt b/trunk/eo/tutorial/Lesson1/CMakeLists.txt new file mode 100644 index 000000000..9f707750b --- /dev/null +++ b/trunk/eo/tutorial/Lesson1/CMakeLists.txt @@ -0,0 +1,64 @@ +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils) + +###################################################################################### +### 2) Specify where CMake can find the libraries +###################################################################################### + +IF(NOT WIN32 OR CYGWIN) + LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) +ENDIF(NOT WIN32 OR CYGWIN) + +# especially for Visual Studio +IF(WIN32 AND NOT CYGWIN) + LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) +ENDIF(WIN32 AND NOT CYGWIN) + +###################################################################################### +### 3) Define your targets +###################################################################################### + +# no matter what is the OS, hopefully +ADD_EXECUTABLE(FirstBitGA FirstBitGA.cpp) +ADD_EXECUTABLE(FirstRealGA FirstRealGA.cpp) +ADD_EXECUTABLE(exercise1.3 exercise1.3.cpp) + +ADD_DEPENDENCIES(FirstBitGA ga eo eoutils) +ADD_DEPENDENCIES(FirstRealGA ga eo eoutils) +ADD_DEPENDENCIES(exercise1.3 ga eo eoutils) + +###################################################################################### +### 4) Optionnal +###################################################################################### + +SET(FIRSTBITGA_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(FirstBitGA PROPERTIES VERSION "${FIRSTBITGA_VERSION}") + +SET(FIRSTREALGA_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(FirstRealGA PROPERTIES VERSION "${FIRSTREALGA_VERSION}") + +SET(EXERCICE13_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(exercise1.3 PROPERTIES VERSION "${EXERCICE13_VERSION}") + +###################################################################################### +### 5) Link the librairies for the targets +###################################################################################### + +TARGET_LINK_LIBRARIES(FirstBitGA ga eo eoutils) +TARGET_LINK_LIBRARIES(FirstRealGA ga eo eoutils) +TARGET_LINK_LIBRARIES(exercise1.3 ga eo eoutils) + +###################################################################################### +### 6) Configure project installation paths +###################################################################################### + +INSTALL(TARGETS FirstBitGA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples) +INSTALL(TARGETS FirstRealGA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples) +INSTALL(TARGETS exercise1.3 RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples) + +###################################################################################### diff --git a/trunk/eo/tutorial/Lesson1/FirstBitGA.cpp b/trunk/eo/tutorial/Lesson1/FirstBitGA.cpp new file mode 100644 index 000000000..cc187a81e --- /dev/null +++ b/trunk/eo/tutorial/Lesson1/FirstBitGA.cpp @@ -0,0 +1,167 @@ +//----------------------------------------------------------------------------- +// FirstBitGA.cpp +//----------------------------------------------------------------------------- +//* +// An instance of a VERY simple Bitstring Genetic Algorithm +// +//----------------------------------------------------------------------------- + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include + +#include +#include + +// Use functions from namespace std +using namespace std; + +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your individuals +typedef eoBit Indi; // A bitstring with fitness double + +// EVAL +//----------------------------------------------------------------------------- +// a simple fitness function that computes the number of ones of a bitstring +// @param _indi A biststring individual + +double binary_value(const Indi & _indi) +{ + double sum = 0; + for (unsigned i = 0; i < _indi.size(); i++) + sum += _indi[i]; + return sum; +} +// GENERAL +//----------------------------------------------------------------------------- +void main_function(int argc, char **argv) +{ +// PARAMETRES + // all parameters are hard-coded! + const unsigned int SEED = 42; // seed for random number generator + const unsigned int T_SIZE = 3; // size for tournament selection + const unsigned int VEC_SIZE = 16; // Number of bits in genotypes + const unsigned int POP_SIZE = 100; // Size of population + const unsigned int MAX_GEN = 400; // Maximum number of generation before STOP + const float CROSS_RATE = 0.8; // Crossover rate + const double P_MUT_PER_BIT = 0.01; // probability of bit-flip mutation + const float MUT_RATE = 1.0; // mutation rate + +// GENERAL + ////////////////////////// + // Random seed + ////////////////////////// + //reproducible random seed: if you don't change SEED above, + // you'll aways get the same result, NOT a random run + rng.reseed(SEED); + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object + eoEvalFuncPtr eval( binary_value ); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + + // declare the population + eoPop pop; + // fill it! + for (unsigned int igeno=0; igeno select(T_SIZE); // T_SIZE in [2,POP_SIZE] + +// REPLACE + // The simple GA evolution engine uses generational replacement + // so no replacement procedure is needed + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // 1-point crossover for bitstring + eo1PtBitXover xover; +// MUTATION + // standard bit-flip mutation for bitstring + eoBitMutation mutation(P_MUT_PER_BIT); + +// STOP +// CHECKPOINT + ////////////////////////////////////// + // termination condition + ///////////////////////////////////// + // stop after MAX_GEN generations + eoGenContinue continuator(MAX_GEN); + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + // standard Generational GA requires as parameters + // selection, evaluation, crossover and mutation, stopping criterion + + + eoSGA gga(select, xover, CROSS_RATE, mutation, MUT_RATE, + eval, continuator); + + // Apply algo to pop - that's it! + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + // A main that catches the exceptions + +int main(int argc, char **argv) +{ + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/trunk/eo/tutorial/Lesson1/FirstRealGA.cpp b/trunk/eo/tutorial/Lesson1/FirstRealGA.cpp new file mode 100644 index 000000000..074c5ae86 --- /dev/null +++ b/trunk/eo/tutorial/Lesson1/FirstRealGA.cpp @@ -0,0 +1,162 @@ +//----------------------------------------------------------------------------- +// FirstRealGA.cpp +//----------------------------------------------------------------------------- +//* +// An instance of a VERY simple Real-coded Genetic Algorithm +// +//----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +#include +#include + +// Use functions from namespace std +using namespace std; + +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your individuals + typedef eoReal Indi; + +// EVAL +//----------------------------------------------------------------------------- +// a simple fitness function that computes the euclidian norm of a real vector +// @param _indi A real-valued individual + +double real_value(const Indi & _indi) +{ + double sum = 0; + for (unsigned i = 0; i < _indi.size(); i++) + sum += _indi[i]*_indi[i]; + return (-sum); // maximizing only +} +// GENERAL +//----------------------------------------------------------------------------- +void main_function(int argc, char **argv) +{ +// PARAMETRES + // all parameters are hard-coded! + const unsigned int SEED = 42; // seed for random number generator + const unsigned int VEC_SIZE = 8; // Number of object variables in genotypes + const unsigned int POP_SIZE = 20; // Size of population + const unsigned int T_SIZE = 3; // size for tournament selection + const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP + const float CROSS_RATE = 0.8; // Crossover rate + const double EPSILON = 0.01; // range for real uniform mutation + const float MUT_RATE = 0.5; // mutation rate + +// GENERAL + ////////////////////////// + // Random seed + ////////////////////////// + //reproducible random seed: if you don't change SEED above, + // you'll aways get the same result, NOT a random run + rng.reseed(SEED); + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object + eoEvalFuncPtr eval( real_value ); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + + // declare the population + eoPop pop; + // fill it! + for (unsigned int igeno=0; igeno select(T_SIZE); // T_SIZE in [2,POP_SIZE] + +// REPLACE + // eoSGA uses generational replacement by default + // so no replacement procedure has to be given + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // offspring(i) is a linear combination of parent(i) + eoSegmentCrossover xover; +// MUTATION + // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] + eoUniformMutation mutation(EPSILON); + +// STOP +// CHECKPOINT + ////////////////////////////////////// + // termination condition + ///////////////////////////////////// + // stop after MAX_GEN generations + eoGenContinue continuator(MAX_GEN); + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + // standard Generational GA requires + // selection, evaluation, crossover and mutation, stopping criterion + + + eoSGA gga(select, xover, CROSS_RATE, mutation, MUT_RATE, + eval, continuator); + + // Apply algo to pop - that's it! + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/trunk/eo/tutorial/Lesson1/Makefile.simple b/trunk/eo/tutorial/Lesson1/Makefile.simple new file mode 100644 index 000000000..cca13043b --- /dev/null +++ b/trunk/eo/tutorial/Lesson1/Makefile.simple @@ -0,0 +1,25 @@ +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src + +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp + +firstGA = FirstRealGA FirstBitGA + +ALL = $(firstGA) exercise1.3 + +lesson1 : $(firstGA) + +all : $(ALL) + +clean : + @/bin/rm $(ALL) *.o *~ diff --git a/trunk/eo/tutorial/Lesson1/exercise1.3.cpp b/trunk/eo/tutorial/Lesson1/exercise1.3.cpp new file mode 100644 index 000000000..89965d511 --- /dev/null +++ b/trunk/eo/tutorial/Lesson1/exercise1.3.cpp @@ -0,0 +1,162 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +//----------------------------------------------------------------------------- +// FirstBitGA.cpp +//----------------------------------------------------------------------------- +//* +// An instance of a VERY simple Bitstring Genetic Algorithm +// +//----------------------------------------------------------------------------- +// standard includes +#include +#include + +// the general include for eo +#include + +//----------------------------------------------------------------------------- +// Include the corresponding file +#include // bitstring representation & operators +// define your individuals +typedef eoBit Indi; // A bitstring with fitness double + +using namespace std; + +//----------------------------------------------------------------------------- +/** a simple fitness function that computes the number of ones of a bitstring + @param _indi A biststring individual +*/ + +double binary_value(const Indi & _indi) +{ + double sum = 0; + for (unsigned i = 0; i < _indi.size(); i++) + sum += _indi[i]; + return sum; +} + +//----------------------------------------------------------------------------- + +void main_function(int argc, char **argv) +{ + const unsigned int SEED = 42; // seed for random number generator + const unsigned int VEC_SIZE = 8; // Number of bits in genotypes + const unsigned int POP_SIZE = 20; // Size of population + const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP + const float CROSS_RATE = 0.8; // Crossover rate + const double P_MUT_PER_BIT = 0.01; // probability of bit-flip mutation + const float MUT_RATE = 1.0; // mutation rate + + ////////////////////////// + // Random seed + ////////////////////////// + //reproducible random seed: if you don't change SEED above, + // you'll aways get the same result, NOT a random run + rng.reseed(SEED); + + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object + eoEvalFuncPtr eval( binary_value ); + + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + + // declare the population + eoPop pop; + // fill it! + for (unsigned int igeno=0; igeno select; + + // could also use stochastic binary tournament selection + // + // const double RATE = 0.75; + // eoStochTournamentSelect select(RATE); // RATE in ]0.5,1] + // The robust tournament selection + const unsigned int T_SIZE = 3; // size for tournament selection + eoDetTournamentSelect select(T_SIZE); // T_SIZE in [2,POP_SIZE] + + // and of course the random selection + // eoRandomSelect select; + + // The simple GA evolution engine uses generational replacement + // so no replacement procedure is needed + + ////////////////////////////////////// + // termination condition + ///////////////////////////////////// + // stop after MAX_GEN generations + eoGenContinue continuator(MAX_GEN); + + + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// + // standard bit-flip mutation for bitstring + eoBitMutation mutation(P_MUT_PER_BIT); + // 1-point mutation for bitstring + eo1PtBitXover xover; + + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + // standard Generational GA requires as parameters + // selection, evaluation, crossover and mutation, stopping criterion + + + eoSGA gga(select, xover, CROSS_RATE, mutation, MUT_RATE, + eval, continuator); + + // Apply algo to pop - that's it! + gga(pop); + + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/trunk/eo/tutorial/Lesson2/CMakeLists.txt b/trunk/eo/tutorial/Lesson2/CMakeLists.txt new file mode 100644 index 000000000..28b4fada8 --- /dev/null +++ b/trunk/eo/tutorial/Lesson2/CMakeLists.txt @@ -0,0 +1,60 @@ +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils) + +###################################################################################### +### 2) Specify where CMake can find the libraries +###################################################################################### + +IF(NOT WIN32 OR CYGWIN) + LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) +ENDIF(NOT WIN32 OR CYGWIN) + +# especially for Visual Studio +IF(WIN32 AND NOT CYGWIN) + LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) +ENDIF(WIN32 AND NOT CYGWIN) + +###################################################################################### +### 3) Define your targets +###################################################################################### + +# no matter what is the OS, hopefully +ADD_EXECUTABLE(FirstBitEA FirstBitEA.cpp) +ADD_EXECUTABLE(FirstRealEA FirstRealEA.cpp) +ADD_EXECUTABLE(exercise2.3 exercise2.3.cpp) + +###################################################################################### +### 4) Optionnal +###################################################################################### + +SET(FIRSTBITEA_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(FirstBitEA PROPERTIES VERSION "${FIRSTBITEA_VERSION}") + +SET(FIRSTREALEA_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(FirstRealEA PROPERTIES VERSION "${FIRSTREALEA_VERSION}") + +SET(EXERCICE23_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(exercise2.3 PROPERTIES VERSION "${EXERCICE23_VERSION}") + +###################################################################################### +### 5) Link the librairies for the targets +###################################################################################### + +TARGET_LINK_LIBRARIES(FirstBitEA ga eo eoutils) +TARGET_LINK_LIBRARIES(FirstRealEA ga eo eoutils) +TARGET_LINK_LIBRARIES(exercise2.3 ga eo eoutils) + +###################################################################################### +### 6) Configure project installation paths +###################################################################################### + +INSTALL(TARGETS FirstBitEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples) +INSTALL(TARGETS FirstRealEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples) +INSTALL(TARGETS exercise2.3 RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples) + +###################################################################################### diff --git a/trunk/eo/tutorial/Lesson2/FirstBitEA.cpp b/trunk/eo/tutorial/Lesson2/FirstBitEA.cpp new file mode 100644 index 000000000..fd508a55c --- /dev/null +++ b/trunk/eo/tutorial/Lesson2/FirstBitEA.cpp @@ -0,0 +1,193 @@ +//----------------------------------------------------------------------------- +// FirstBitEA.cpp +//----------------------------------------------------------------------------- +//* +// Still an instance of a VERY simple Bitstring Genetic Algorithm +// (see FirstBitGA.cpp) but now with Breeder - and Combined Ops +// +//----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + +// standard includes +#include // runtime_error +#include // cout + +// the general include for eo +#include +#include + +// Use functions from namespace std +using namespace std; + +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your individuals +typedef eoBit Indi; // A bitstring with fitness double + +// EVALFUNC +//----------------------------------------------------------------------------- +// a simple fitness function that computes the number of ones of a bitstring +// Now in a separate file, and declared as binary_value(const vector &) + +#include "binary_value.h" + +// GENERAL +//----------------------------------------------------------------------------- + +void main_function(int argc, char **argv) +{ +// PARAMETRES + const unsigned int SEED = 42; // seed for random number generator + const unsigned int T_SIZE = 3; // size for tournament selection + const unsigned int VEC_SIZE = 8; // Number of bits in genotypes + const unsigned int POP_SIZE = 20; // Size of population + + const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP + const unsigned int MIN_GEN = 10; // Minimum number of generation before ... + const unsigned int STEADY_GEN = 50; // stop after STEADY_GEN gen. without improvelent + + const double P_CROSS = 0.8; // Crossover probability + const double P_MUT = 1.0; // mutation probability + + const double P_MUT_PER_BIT = 0.01; // internal probability for bit-flip mutation + // some parameters for chosing among different operators + const double onePointRate = 0.5; // rate for 1-pt Xover + const double twoPointsRate = 0.5; // rate for 2-pt Xover + const double URate = 0.5; // rate for Uniform Xover + const double bitFlipRate = 0.5; // rate for bit-flip mutation + const double oneBitRate = 0.5; // rate for one-bit mutation + +// GENERAL + ////////////////////////// + // Random seed + ////////////////////////// + //reproducible random seed: if you don't change SEED above, + // you'll aways get the same result, NOT a random run + rng.reseed(SEED); + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object + // you need to give the full description of the function + eoEvalFuncPtr& > eval( binary_value ); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + + // based on boolean_generator class (see utils/eoRndGenerators.h) + eoUniformGenerator uGen; + eoInitFixedLength random(VEC_SIZE, uGen); + // Initialization of the population + eoPop pop(POP_SIZE, random); + + // and evaluate it in one loop + apply(eval, pop); // STL syntax + +// OUTPUT + // sort pop before printing it! + pop.sort(); + // Print (sorted) intial population (raw printout) + cout << "Initial Population" << endl; + cout << pop; + +// ENGINE + ///////////////////////////////////// + // selection and replacement + //////////////////////////////////// +// SELECT + // The robust tournament selection + eoDetTournamentSelect selectOne(T_SIZE); // T_SIZE in [2,POP_SIZE] + // is now encapsulated in a eoSelectPerc (entage) + eoSelectPerc select(selectOne);// by default rate==1 + +// REPLACE + // And we now have the full slection/replacement - though with + // no replacement (== generational replacement) at the moment :-) + eoGenerationalReplacement replace; + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // 1-point crossover for bitstring + eo1PtBitXover xover1; + // uniform crossover for bitstring + eoUBitXover xoverU; + // 2-pots xover + eoNPtsBitXover xover2(2); + // Combine them with relative rates + eoPropCombinedQuadOp xover(xover1, onePointRate); + xover.add(xoverU, URate); + xover.add(xover2, twoPointsRate, true); + +// MUTATION + // standard bit-flip mutation for bitstring + eoBitMutation mutationBitFlip(P_MUT_PER_BIT); + // mutate exactly 1 bit per individual + eoDetBitFlip mutationOneBit; + // Combine them with relative rates + eoPropCombinedMonOp mutation(mutationBitFlip, bitFlipRate); + mutation.add(mutationOneBit, oneBitRate, true); + + // The operators are encapsulated into an eoTRansform object + eoSGATransform transform(xover, P_CROSS, mutation, P_MUT); + +// STOP +// CHECKPOINT + ////////////////////////////////////// + // termination conditions: use more than one + ///////////////////////////////////// + // stop after MAX_GEN generations + eoGenContinue genCont(MAX_GEN); + // do MIN_GEN gen., then stop after STEADY_GEN gen. without improvement + eoSteadyFitContinue steadyCont(MIN_GEN, STEADY_GEN); + // stop when fitness reaches a target (here VEC_SIZE) + eoFitContinue fitCont(VEC_SIZE); + // do stop when one of the above says so + eoCombinedContinue continuator(genCont); + continuator.add(steadyCont); + continuator.add(fitCont); + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + + // Easy EA requires + // selection, transformation, eval, replacement, and stopping criterion + eoEasyEA gga(continuator, eval, select, transform, replace); + + // Apply algo to pop - that's it! + cout << "\n Here we go\n\n"; + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ + + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/trunk/eo/tutorial/Lesson2/FirstRealEA.cpp b/trunk/eo/tutorial/Lesson2/FirstRealEA.cpp new file mode 100644 index 000000000..6c259b3bf --- /dev/null +++ b/trunk/eo/tutorial/Lesson2/FirstRealEA.cpp @@ -0,0 +1,192 @@ +//----------------------------------------------------------------------------- +// FirstRealEA.cpp +//----------------------------------------------------------------------------- +//* +// Still an instance of a VERY simple Real-coded Genetic Algorithm +// (see FirstBitGA.cpp) but now with Breeder - and Combined Ops +// +//----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + +// standard includes +#include // runtime_error +#include // cout + +// the general include for eo +#include +#include + +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your individuals +typedef eoReal Indi; + +// Use functions from namespace std +using namespace std; + +// EVALFUNC +//----------------------------------------------------------------------------- +// a simple fitness function that computes the euclidian norm of a real vector +// Now in a separate file, and declared as binary_value(const vector &) + +#include "real_value.h" + +// GENERAL +//----------------------------------------------------------------------------- + +void main_function(int argc, char **argv) +{ +// PARAMETRES + const unsigned int SEED = 42; // seed for random number generator + const unsigned int T_SIZE = 3; // size for tournament selection + const unsigned int VEC_SIZE = 8; // Number of object variables in genotypes + const unsigned int POP_SIZE = 20; // Size of population + + const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP + const unsigned int MIN_GEN = 10; // Minimum number of generation before ... + const unsigned int STEADY_GEN = 50; // stop after STEADY_GEN gen. without improvelent + + const float P_CROSS = 0.8; // Crossover probability + const float P_MUT = 0.5; // mutation probability + + const double EPSILON = 0.01; // range for real uniform mutation + double SIGMA = 0.3; // std dev. for normal mutation + // some parameters for chosing among different operators + const double hypercubeRate = 0.5; // relative weight for hypercube Xover + const double segmentRate = 0.5; // relative weight for segment Xover + const double uniformMutRate = 0.5; // relative weight for uniform mutation + const double detMutRate = 0.5; // relative weight for det-uniform mutation + const double normalMutRate = 0.5; // relative weight for normal mutation + +// GENERAL + ////////////////////////// + // Random seed + ////////////////////////// + //reproducible random seed: if you don't change SEED above, + // you'll aways get the same result, NOT a random run + rng.reseed(SEED); + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object + // you need to give the full description of the function + eoEvalFuncPtr& > eval( real_value ); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + // based on a uniform generator + eoUniformGenerator uGen(-1.0, 1.0); + eoInitFixedLength random(VEC_SIZE, uGen); + // Initialization of the population + eoPop pop(POP_SIZE, random); + + // and evaluate it in one loop + apply(eval, pop); // STL syntax + +// OUTPUT + // sort pop before printing it! + pop.sort(); + // Print (sorted) intial population (raw printout) + cout << "Initial Population" << endl; + cout << pop; + +// ENGINE + ///////////////////////////////////// + // selection and replacement + //////////////////////////////////// +// SELECT + // The robust tournament selection + eoDetTournamentSelect selectOne(T_SIZE); + // is now encapsulated in a eoSelectPerc (entage) + eoSelectPerc select(selectOne);// by default rate==1 + +// REPLACE + // And we now have the full slection/replacement - though with + // no replacement (== generational replacement) at the moment :-) + eoGenerationalReplacement replace; + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // uniform chooce on segment made by the parents + eoSegmentCrossover xoverS; + // uniform choice in hypercube built by the parents + eoHypercubeCrossover xoverA; + // Combine them with relative weights + eoPropCombinedQuadOp xover(xoverS, segmentRate); + xover.add(xoverA, hypercubeRate, true); + +// MUTATION + // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] + eoUniformMutation mutationU(EPSILON); + // k (=1) coordinates of parents are uniformly modified + eoDetUniformMutation mutationD(EPSILON); + // all coordinates of parents are normally modified (stDev SIGMA) + eoNormalMutation mutationN(SIGMA); + // Combine them with relative weights + eoPropCombinedMonOp mutation(mutationU, uniformMutRate); + mutation.add(mutationD, detMutRate); + mutation.add(mutationN, normalMutRate, true); + +// STOP +// CHECKPOINT + ////////////////////////////////////// + // termination conditions: use more than one + ///////////////////////////////////// + // stop after MAX_GEN generations + eoGenContinue genCont(MAX_GEN); + // do MIN_GEN gen., then stop after STEADY_GEN gen. without improvement + eoSteadyFitContinue steadyCont(MIN_GEN, STEADY_GEN); + // stop when fitness reaches a target (here VEC_SIZE) + eoFitContinue fitCont(0); + // do stop when one of the above says so + eoCombinedContinue continuator(genCont); + continuator.add(steadyCont); + continuator.add(fitCont); + + // The operators are encapsulated into an eoTRansform object + eoSGATransform transform(xover, P_CROSS, mutation, P_MUT); + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + + // Easy EA requires + // selection, transformation, eval, replacement, and stopping criterion + eoEasyEA gga(continuator, eval, select, transform, replace); + + // Apply algo to pop - that's it! + cout << "\n Here we go\n\n"; + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/trunk/eo/tutorial/Lesson2/Makefile.simple b/trunk/eo/tutorial/Lesson2/Makefile.simple new file mode 100644 index 000000000..d5cba2250 --- /dev/null +++ b/trunk/eo/tutorial/Lesson2/Makefile.simple @@ -0,0 +1,34 @@ +### This Makefile is part of the tutorial of the EO library +# Unlike other Makefiles in EO, it is not using the automake/autoconf +# so that it stays easy to understant (you are in the tutorial, remember!) +# MS, Oct. 2002 + +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src + +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp + +firstEA = FirstRealEA FirstBitEA + +ALL = $(firstEA) exercise2.3 + +lesson2 : $(firstEA) + +all : $(ALL) + +clean : + @/bin/rm $(ALL) *.o *~ + +FirstRealEA : real_value.h + +FirstBitEA : binary_value.h diff --git a/trunk/eo/tutorial/Lesson2/binary_value.h b/trunk/eo/tutorial/Lesson2/binary_value.h new file mode 100644 index 000000000..66d2823ec --- /dev/null +++ b/trunk/eo/tutorial/Lesson2/binary_value.h @@ -0,0 +1,16 @@ +#include + +//----------------------------------------------------------------------------- + +/** Just a simple function that takes binary value of a chromosome and sets + the fitnes. + @param _chrom A binary chromosome +*/ +// INIT +double binary_value(const std::vector& _chrom) +{ + double sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + sum += _chrom[i]; + return sum; +} diff --git a/trunk/eo/tutorial/Lesson2/exercise2.3.cpp b/trunk/eo/tutorial/Lesson2/exercise2.3.cpp new file mode 100644 index 000000000..c1b51aa00 --- /dev/null +++ b/trunk/eo/tutorial/Lesson2/exercise2.3.cpp @@ -0,0 +1,197 @@ +//----------------------------------------------------------------------------- +// FirstBitEA.cpp +//----------------------------------------------------------------------------- +//* +// Still an instance of a VERY simple Bitstring Genetic Algorithm +// (see FirstBitGA.cpp) but now with Breeder - and Combined Ops +// +//----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + +// standard includes +#include // runtime_error +#include // cout + +// the general include for eo +#include + +// REPRESENTATION +//----------------------------------------------------------------------------- +// Include the corresponding file +#include // bitstring representation & operators +// define your individuals +typedef eoBit Indi; // A bitstring with fitness double + +// EVAL +//----------------------------------------------------------------------------- +// a simple fitness function that computes the number of ones of a bitstring +// Now in a separate file, and declared as binary_value(const vector &) + +#include "binary_value.h" + +// GENERAL +//----------------------------------------------------------------------------- + +using namespace std; + +void main_function(int argc, char **argv) +{ +// PARAMETRES + const unsigned int SEED = 42; // seed for random number generator + const unsigned int T_SIZE = 3; // size for tournament selection + const unsigned int VEC_SIZE = 20; // Number of bits in genotypes + const unsigned int POP_SIZE = 20; // Size of population + + const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP + const unsigned int MIN_GEN = 10; // Minimum number of generation before ... + const unsigned int STEADY_GEN = 50; // stop after STEADY_GEN gen. without improvelent + + const double P_CROSS = 0.8; // Crossover probability + const double P_MUT = 1.0; // mutation probability + + const double P_MUT_PER_BIT = 0.01; // internal probability for bit-flip mutation + // some parameters for chosing among different operators + const double onePointRate = 0.5; // rate for 1-pt Xover + const double twoPointsRate = 0.5; // rate for 2-pt Xover + const double URate = 0.5; // rate for Uniform Xover + const double bitFlipRate = 0.5; // rate for bit-flip mutation + const double oneBitRate = 0.5; // rate for one-bit mutation + +// GENERAL + ////////////////////////// + // Random seed + ////////////////////////// + //reproducible random seed: if you don't change SEED above, + // you'll aways get the same result, NOT a random run + rng.reseed(SEED); + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object + // you need to give the full description of the function + eoEvalFuncPtr& > eval( binary_value ); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + + // based on boolean_generator class (see utils/rnd_generator.h) + eoUniformGenerator uGen; + eoInitFixedLength random(VEC_SIZE, uGen); + // Initialization of the population + eoPop pop(POP_SIZE, random); + + // and evaluate it in one loop + apply(eval, pop); // STL syntax + +// OUTPUT + // sort pop before printing it! + pop.sort(); + // Print (sorted) intial population (raw printout) + cout << "Initial Population" << endl; + cout << pop; + +// ENGINE + ///////////////////////////////////// + // selection and replacement + //////////////////////////////////// +// SELECT + // The robust tournament selection + eoDetTournamentSelect selectOne(T_SIZE); // T_SIZE in [2,POP_SIZE] + // solution solution solution solution solution solution solution + // modify the nb offspring / rate in the constructor. 2 ways: + // second arg treated as integer + eoSelectMany select(selectOne,2, eo_is_an_integer); + // second arg treated as a rate (default behavior) + // eoSelectMany select(selectOne,0.1); + +// REPLACE + // solution solution solution solution solution solution solution + // eoCommaReplacement keeps the best among offspring + // eoPlusReplacement keeps the best among parents + offspring + // eoCommaReplacement replace; + eoPlusReplacement replace; + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // 1-point crossover for bitstring + eo1PtBitXover xover1; + // uniform crossover for bitstring + eoUBitXover xoverU; + // 2-pots xover + eoNPtsBitXover xover2(2); + // Combine them with relative rates + eoPropCombinedQuadOp xover(xover1, onePointRate); + xover.add(xoverU, URate); + xover.add(xover2, twoPointsRate, true); + +// MUTATION + // standard bit-flip mutation for bitstring + eoBitMutation mutationBitFlip(P_MUT_PER_BIT); + // mutate exactly 1 bit per individual + eoDetBitFlip mutationOneBit; + // Combine them with relative rates + eoPropCombinedMonOp mutation(mutationBitFlip, bitFlipRate); + mutation.add(mutationOneBit, oneBitRate, true); + + // The operators are encapsulated into an eoTRansform object + eoSGATransform transform(xover, P_CROSS, mutation, P_MUT); + +// STOP +// CHECKPOINT + ////////////////////////////////////// + // termination conditions: use more than one + ///////////////////////////////////// + // stop after MAX_GEN generations + eoGenContinue genCont(MAX_GEN); + // do MIN_GEN gen., then stop after STEADY_GEN gen. without improvement + eoSteadyFitContinue steadyCont(MIN_GEN, STEADY_GEN); + // stop when fitness reaches a target (here VEC_SIZE) + eoFitContinue fitCont(VEC_SIZE); + // do stop when one of the above says so + eoCombinedContinue continuator(genCont); + continuator.add(steadyCont); + continuator.add(fitCont); + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + + // Easy EA requires + // selection, transformation, eval, replacement, and stopping criterion + eoEasyEA gga(continuator, eval, select, transform, replace); + + // Apply algo to pop - that's it! + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/trunk/eo/tutorial/Lesson2/real_value.h b/trunk/eo/tutorial/Lesson2/real_value.h new file mode 100644 index 000000000..866e2941a --- /dev/null +++ b/trunk/eo/tutorial/Lesson2/real_value.h @@ -0,0 +1,17 @@ +#include +//----------------------------------------------------------------------------- +/** Just a simple function that takes an vector and sets the fitnes + to the sphere function. Please use doubles not float!!! + @param _ind A floatingpoint vector +*/ + +// INIT +double real_value(const std::vector& _ind) +{ + double sum = 0; + for (unsigned i = 0; i < _ind.size(); i++) + { + sum += _ind[i] * _ind[i]; + } + return -sum; +} diff --git a/trunk/eo/tutorial/Lesson3/CMakeLists.txt b/trunk/eo/tutorial/Lesson3/CMakeLists.txt new file mode 100644 index 000000000..0d5467d45 --- /dev/null +++ b/trunk/eo/tutorial/Lesson3/CMakeLists.txt @@ -0,0 +1,64 @@ +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils) + +###################################################################################### +### 2) Specify where CMake can find the libraries +###################################################################################### + +IF(NOT WIN32 OR CYGWIN) + LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) +ENDIF(NOT WIN32 OR CYGWIN) + +# especially for Visual Studio +IF(WIN32 AND NOT CYGWIN) + LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) +ENDIF(WIN32 AND NOT CYGWIN) + +###################################################################################### +### 3) Define your targets +###################################################################################### + +# no matter what is the OS, hopefully +ADD_EXECUTABLE(SecondBitEA SecondBitEA.cpp) +ADD_EXECUTABLE(SecondRealEA SecondRealEA.cpp) +ADD_EXECUTABLE(exercise3.1 exercise3.1.cpp) + +ADD_DEPENDENCIES(SecondBitEA ga eoutils eo) +ADD_DEPENDENCIES(SecondRealEA ga eoutils eo) +ADD_DEPENDENCIES(exercise3.1 ga eoutils eo) + +###################################################################################### +### 4) Optionnal +###################################################################################### + +SET(SECONDBITEA_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(SecondBitEA PROPERTIES VERSION "${SECONDBITEA_VERSION}") + +SET(SECONDREALEA_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(SecondRealEA PROPERTIES VERSION "${SECONDREALEA_VERSION}") + +SET(EXERCICE31_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(exercise3.1 PROPERTIES VERSION "${EXERCICE31_VERSION}") + +###################################################################################### +### 5) Link the librairies for the targets +###################################################################################### + +TARGET_LINK_LIBRARIES(SecondBitEA ga eoutils eo) +TARGET_LINK_LIBRARIES(SecondRealEA ga eoutils eo) +TARGET_LINK_LIBRARIES(exercise3.1 ga eoutils eo) + +###################################################################################### +### 6) Configure project installation paths +###################################################################################### + +INSTALL(TARGETS SecondBitEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples) +INSTALL(TARGETS SecondRealEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples) +INSTALL(TARGETS exercise3.1 RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples) + +###################################################################################### diff --git a/trunk/eo/tutorial/Lesson3/Makefile.simple b/trunk/eo/tutorial/Lesson3/Makefile.simple new file mode 100644 index 000000000..3e63424da --- /dev/null +++ b/trunk/eo/tutorial/Lesson3/Makefile.simple @@ -0,0 +1,33 @@ +### This Makefile is part of the tutorial of the EO library +# Unlike other Makefiles in EO, it is not using the automake/autoconf +# so that it stays easy to understant (you are in the tutorial, remember!) +# MS, Oct. 2002 + +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src + +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp + +secondEA = SecondBitEA SecondRealEA + +ALL = $(secondEA) exercise3.1 + +lesson3 : $(secondEA) + +all : $(ALL) + +SecondBitEA : binary_value.h +SecondRealEA : real_value.h + +clean : + @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/trunk/eo/tutorial/Lesson3/SecondBitEA.cpp b/trunk/eo/tutorial/Lesson3/SecondBitEA.cpp new file mode 100644 index 000000000..92e181284 --- /dev/null +++ b/trunk/eo/tutorial/Lesson3/SecondBitEA.cpp @@ -0,0 +1,348 @@ +//----------------------------------------------------------------------------- +// SecondGA.cpp +//----------------------------------------------------------------------------- +//* +// Same code than FirstBitEA as far as Evolutionary Computation is concerned +// but now you learn to enter the parameters in a more flexible way +// and to twidle the output to your preferences! +//----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + +// standard includes +#include +#include // cout +#include // runtime_error + +// the general include for eo +#include +#include + +// Use functions from namespace std +using namespace std; + +// EVAL +#include "binary_value.h" + +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your genotype and fitness types +typedef eoBit Indi; + +// the main_function: nothing changed(!), except variable initialization +void main_function(int argc, char **argv) +{ +// PARAMETRES +//----------------------------------------------------------------------------- +// instead of having all values of useful parameters as constants, read them: +// either on the command line (--option=value or -o=value) +// or in a parameter file (same syntax, order independent, +// # = usual comment character +// or in the environment (TODO) + + // First define a parser from the command-line arguments + eoParser parser(argc, argv); + + // For each parameter, define Parameter, read it through the parser, + // and assign the value to the variable + + eoValueParam seedParam(time(0), "seed", "Random number seed", 'S'); + parser.processParam( seedParam ); + unsigned seed = seedParam.value(); + + // description of genotype + eoValueParam vecSizeParam(8, "vecSize", "Genotype size",'V'); + parser.processParam( vecSizeParam, "Representation" ); + unsigned vecSize = vecSizeParam.value(); + + // parameters for evolution engine + eoValueParam popSizeParam(10, "popSize", "Population size",'P'); + parser.processParam( popSizeParam, "Evolution engine" ); + unsigned popSize = popSizeParam.value(); + + eoValueParam tSizeParam(10, "tSize", "Tournament size",'T'); + parser.processParam( tSizeParam, "Evolution Engine" ); + unsigned tSize = tSizeParam.value(); + + // init and stop + eoValueParam loadNameParam("", "Load","A save file to restart from",'L'); + parser.processParam( loadNameParam, "Persistence" ); + string loadName = loadNameParam.value(); + + eoValueParam maxGenParam(100, "maxGen", "Maximum number of generations",'G'); + parser.processParam( maxGenParam, "Stopping criterion" ); + unsigned maxGen = maxGenParam.value(); + + eoValueParam minGenParam(100, "minGen", "Minimum number of generations",'g'); + parser.processParam( minGenParam, "Stopping criterion" ); + unsigned minGen = minGenParam.value(); + + eoValueParam steadyGenParam(100, "steadyGen", "Number of generations with no improvement",'s'); + parser.processParam( steadyGenParam, "Stopping criterion" ); + unsigned steadyGen = steadyGenParam.value(); + + // operators probabilities at the algorithm level + eoValueParam pCrossParam(0.6, "pCross", "Probability of Crossover", 'C'); + parser.processParam( pCrossParam, "Genetic Operators" ); + double pCross = pCrossParam.value(); + + eoValueParam pMutParam(0.1, "pMut", "Probability of Mutation", 'M'); + parser.processParam( pMutParam, "Genetic Operators" ); + double pMut = pMutParam.value(); + + // relative rates for crossovers + eoValueParam onePointRateParam(1, "onePointRate", "Relative rate for one point crossover", '1'); + parser.processParam( onePointRateParam, "Genetic Operators" ); + double onePointRate = onePointRateParam.value(); + + eoValueParam twoPointsRateParam(1, "twoPointRate", "Relative rate for two point crossover", '2'); + parser.processParam( twoPointsRateParam, "Genetic Operators" ); + double twoPointsRate = twoPointsRateParam.value(); + + eoValueParam uRateParam(2, "uRate", "Relative rate for uniform crossover", 'U'); + parser.processParam( uRateParam, "Genetic Operators" ); + double URate = uRateParam.value(); + + // relative rates and private parameters for mutations; + eoValueParam pMutPerBitParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b'); + parser.processParam( pMutPerBitParam, "Genetic Operators" ); + double pMutPerBit = pMutPerBitParam.value(); + + eoValueParam bitFlipRateParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 'B'); + parser.processParam( bitFlipRateParam, "Genetic Operators" ); + double bitFlipRate = bitFlipRateParam.value(); + + eoValueParam oneBitRateParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D'); + parser.processParam( oneBitRateParam, "Genetic Operators" ); + double oneBitRate = oneBitRateParam.value(); + + // the name of the "status" file where all actual parameter values will be saved + string str_status = parser.ProgramName() + ".status"; // default value + eoValueParam statusParam(str_status.c_str(), "status","Status file",'S'); + parser.processParam( statusParam, "Persistence" ); + + // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED + // i.e. in case you need parameters somewhere else, postpone these + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + exit(1); + } + if (statusParam.value() != "") + { + ofstream os(statusParam.value().c_str()); + os << parser; // and you can use that file as parameter file + } + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object ... + eoEvalFuncPtr& > plainEval( binary_value ); + // ... to an object that counts the nb of actual evaluations + eoEvalFuncCounter eval(plainEval); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + // Either load or initialize + // create an empty pop + eoPop pop; + // create a state for reading + eoState inState; // a state for loading - WITHOUT the parser + // register the rng and the pop in the state, so they can be loaded, + // and the present run will be the exact conitnuation of the saved run + // eventually with different parameters + inState.registerObject(rng); + inState.registerObject(pop); + + if (loadName != "") + { + inState.load(loadName); // load the pop and the rng + // the fitness is read in the file: + // do only evaluate the pop if the fitness has changed + } + else + { + rng.reseed(seed); + // a Indi random initializer + // based on boolean_generator class (see utils/rnd_generator.h) + eoUniformGenerator uGen; + eoInitFixedLength random(vecSize, uGen); + + // Init pop from the randomizer: need to use the append function + pop.append(popSize, random); + // and evaluate pop (STL syntax) + apply(eval, pop); + } // end of initializatio of the population + +// OUTPUT + // sort pop for pretty printout + pop.sort(); + // Print (sorted) intial population (raw printout) + cout << "Initial Population" << endl << pop << endl; + +// ENGINE + ///////////////////////////////////// + // selection and replacement + //////////////////////////////////// +// SELECT + // The robust tournament selection + eoDetTournamentSelect selectOne(tSize); // tSize in [2,POPSIZE] + // is now encapsulated in a eoSelectPerc (stands for Percentage) + eoSelectPerc select(selectOne); + +// REPLACE + // And we now have the full slection/replacement - though with + // the same generational replacement at the moment :-) + eoGenerationalReplacement replace; + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // 1-point crossover for bitstring + eo1PtBitXover xover1; + // uniform crossover for bitstring + eoUBitXover xoverU; + // 2-pots xover + eoNPtsBitXover xover2(2); + // Combine them with relative rates + eoPropCombinedQuadOp xover(xover1, onePointRate); + xover.add(xoverU, URate); + xover.add(xover2, twoPointsRate, true); + +// MUTATION + // standard bit-flip mutation for bitstring + eoBitMutation mutationBitFlip(pMutPerBit); + // mutate exactly 1 bit per individual + eoDetBitFlip mutationOneBit; + // Combine them with relative rates + eoPropCombinedMonOp mutation(mutationBitFlip, bitFlipRate); + mutation.add(mutationOneBit, oneBitRate, true); + + // The operators are encapsulated into an eoTRansform object + eoSGATransform transform(xover, pCross, mutation, pMut); + +// STOP + ////////////////////////////////////// + // termination condition see FirstBitEA.cpp + ///////////////////////////////////// + eoGenContinue genCont(maxGen); + eoSteadyFitContinue steadyCont(minGen, steadyGen); + eoFitContinue fitCont(vecSize); + eoCombinedContinue continuator(genCont); + continuator.add(steadyCont); + continuator.add(fitCont); + + +// CHECKPOINT + // but now you want to make many different things every generation + // (e.g. statistics, plots, ...). + // the class eoCheckPoint is dedicated to just that: + + // Declare a checkpoint (from a continuator: an eoCheckPoint + // IS AN eoContinue and will be called in the loop of all algorithms) + eoCheckPoint checkpoint(continuator); + + // Create a counter parameter + eoValueParam generationCounter(0, "Gen."); + + // Create an incrementor (sub-class of eoUpdater). Note that the + // parameter's value is passed by reference, + // so every time the incrementer is updated (every generation), + // the data in generationCounter will change. + eoIncrementor increment(generationCounter.value()); + + // Add it to the checkpoint, + // so the counter is updated (here, incremented) every generation + checkpoint.add(increment); + + // now some statistics on the population: + // Best fitness in population + eoBestFitnessStat bestStat; + // Second moment stats: average and stdev + eoSecondMomentStats SecondStat; + + // Add them to the checkpoint to get them called at the appropriate time + checkpoint.add(bestStat); + checkpoint.add(SecondStat); + + // The Stdout monitor will print parameters to the screen ... + eoStdoutMonitor monitor(false); + + // when called by the checkpoint (i.e. at every generation) + checkpoint.add(monitor); + + // the monitor will output a series of parameters: add them + monitor.add(generationCounter); + monitor.add(eval); // because now eval is an eoEvalFuncCounter! + monitor.add(bestStat); + monitor.add(SecondStat); + + // A file monitor: will print parameters to ... a File, yes, you got it! + eoFileMonitor fileMonitor("stats.xg", " "); + + // the checkpoint mechanism can handle multiple monitors + checkpoint.add(fileMonitor); + + // the fileMonitor can monitor parameters, too, but you must tell it! + fileMonitor.add(generationCounter); + fileMonitor.add(bestStat); + fileMonitor.add(SecondStat); + + // Last type of item the eoCheckpoint can handle: state savers: + eoState outState; + // Register the algorithm into the state (so it has something to save!!) + outState.registerObject(parser); + outState.registerObject(pop); + outState.registerObject(rng); + + // and feed the state to state savers + // save state every 100th generation + eoCountedStateSaver stateSaver1(20, outState, "generation"); + // save state every 1 seconds + eoTimedStateSaver stateSaver2(1, outState, "time"); + + // Don't forget to add the two savers to the checkpoint + checkpoint.add(stateSaver1); + checkpoint.add(stateSaver2); + // and that's it for the (control and) output + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + + // Easy EA requires + // stopping criterion, eval, selection, transformation, replacement + eoEasyEA gga(checkpoint, eval, select, transform, replace); + + // Apply algo to pop - that's it! + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// A main that catches the exceptions +int main(int argc, char **argv) +{ + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/trunk/eo/tutorial/Lesson3/SecondRealEA.cpp b/trunk/eo/tutorial/Lesson3/SecondRealEA.cpp new file mode 100644 index 000000000..b5ca0c800 --- /dev/null +++ b/trunk/eo/tutorial/Lesson3/SecondRealEA.cpp @@ -0,0 +1,329 @@ +//----------------------------------------------------------------------------- +// SecondRealEA.cpp +//----------------------------------------------------------------------------- +//* +// Same code than FirstBitEA as far as Evolutionary Computation is concerned +// but now you learn to enter the parameters in a more flexible way +// (also slightly different than in SecondBitEA.cpp) +// and to twidle the output to your preferences (as in SecondBitEA.cpp) +// +//----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + +// standard includes +#include +#include // cout +#include // runtime_error + +// the general include for eo +#include +#include + +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your individuals +typedef eoReal Indi; + +// Use functions from namespace std +using namespace std; + +// EVALFUNC +//----------------------------------------------------------------------------- +// a simple fitness function that computes the euclidian norm of a real vector +// Now in a separate file, and declared as binary_value(const vector &) + +#include "real_value.h" + +// GENERAL +//----------------------------------------------------------------------------- + +void main_function(int argc, char **argv) +{ +// PARAMETRES +//----------------------------------------------------------------------------- +// instead of having all values of useful parameters as constants, read them: +// either on the command line (--option=value or -o=value) +// or in a parameter file (same syntax, order independent, +// # = usual comment character +// or in the environment (TODO) + + // First define a parser from the command-line arguments + eoParser parser(argc, argv); + + // For each parameter, you can in on single line + // define the parameter, read it through the parser, and assign it + + unsigned seed = parser.createParam(unsigned(time(0)), "seed", "Random number seed", 'S').value(); // will be in default section General + + // description of genotype + unsigned vecSize = parser.createParam(unsigned(8), "vecSize", "Genotype size",'V', "Representation" ).value(); + + // parameters for evolution engine + unsigned popSize = parser.createParam(unsigned(10), "popSize", "Population size",'P', "Evolution engine" ).value(); + + unsigned tSize = parser.createParam(unsigned(2), "tSize", "Tournament size",'T', "Evolution Engine" ).value(); + + // init and stop + string loadName = parser.createParam(string(""), "Load","A save file to restart from",'L', "Persistence" ).value(); + + unsigned maxGen = parser.createParam(unsigned(100), "maxGen", "Maximum number of generations",'G', "Stopping criterion" ).value(); + + unsigned minGen = parser.createParam(unsigned(100), "minGen", "Minimum number of generations",'g', "Stopping criterion" ).value(); + + unsigned steadyGen = parser.createParam(unsigned(100), "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion" ).value(); + + // operators probabilities at the algorithm level + double pCross = parser.createParam(double(0.6), "pCross", "Probability of Crossover", 'C', "Genetic Operators" ).value(); + + double pMut = parser.createParam(double(0.1), "pMut", "Probability of Mutation", 'M', "Genetic Operators" ).value(); + + // relative rates for crossovers + double hypercubeRate = parser.createParam(double(1), "hypercubeRate", "Relative rate for hypercube crossover", '\0', "Genetic Operators" ).value(); + + double segmentRate = parser.createParam(double(1), "segmentRate", "Relative rate for segment crossover", '\0', "Genetic Operators" ).value(); + + // internal parameters for the mutations + double EPSILON = parser.createParam(double(0.01), "EPSILON", "Width for uniform mutation", '\0', "Genetic Operators" ).value(); + + double SIGMA = parser.createParam(double(0.3), "SIGMA", "Sigma for normal mutation", '\0', "Genetic Operators" ).value(); + + // relative rates for mutations + double uniformMutRate = parser.createParam(double(1), "uniformMutRate", "Relative rate for uniform mutation", '\0', "Genetic Operators" ).value(); + + double detMutRate = parser.createParam(double(1), "detMutRate", "Relative rate for det-uniform mutation", '\0', "Genetic Operators" ).value(); + + double normalMutRate = parser.createParam(double(1), "normalMutRate", "Relative rate for normal mutation", '\0', "Genetic Operators" ).value(); + + // the name of the "status" file where all actual parameter values will be saved + string str_status = parser.ProgramName() + ".status"; // default value + string statusName = parser.createParam(str_status, "status","Status file",'S', "Persistence" ).value(); + + // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED + // i.e. in case you need parameters somewhere else, postpone these + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + exit(1); + } + if (statusName != "") + { + ofstream os(statusName.c_str()); + os << parser; // and you can use that file as parameter file + } + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object + // you need to give the full description of the function + eoEvalFuncPtr& > plainEval( real_value ); + // ... to an object that counts the nb of actual evaluations + eoEvalFuncCounter eval(plainEval); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + // Either load or initialize + // create an empty pop + eoPop pop; + // create a state for reading + eoState inState; // a state for loading - WITHOUT the parser + // register the rng and the pop in the state, so they can be loaded, + // and the present run will be the exact conitnuation of the saved run + // eventually with different parameters + inState.registerObject(rng); + inState.registerObject(pop); + + if (loadName != "") + { + inState.load(loadName); // load the pop and the rng + // the fitness is read in the file: + // do only evaluate the pop if the fitness has changed + } + else + { + rng.reseed(seed); + // a Indi random initializer + // based on boolean_generator class (see utils/rnd_generator.h) + eoUniformGenerator uGen(-1.0, 1.0); + eoInitFixedLength random(vecSize, uGen); + + // Init pop from the randomizer: need to use the append function + pop.append(popSize, random); + // and evaluate pop (STL syntax) + apply(eval, pop); + } // end of initializatio of the population + +// OUTPUT + // sort pop before printing it! + pop.sort(); + // Print (sorted) intial population (raw printout) + cout << "Initial Population" << endl; + cout << pop; + +// ENGINE + ///////////////////////////////////// + // selection and replacement + //////////////////////////////////// +// SELECT + // The robust tournament selection + eoDetTournamentSelect selectOne(tSize); + // is now encapsulated in a eoSelectPerc (entage) + eoSelectPerc select(selectOne);// by default rate==1 + +// REPLACE + // And we now have the full slection/replacement - though with + // no replacement (== generational replacement) at the moment :-) + eoGenerationalReplacement replace; + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // uniform chooce on segment made by the parents + eoSegmentCrossover xoverS; + // uniform choice in hypercube built by the parents + eoHypercubeCrossover xoverA; + // Combine them with relative weights + eoPropCombinedQuadOp xover(xoverS, segmentRate); + xover.add(xoverA, hypercubeRate, true); + +// MUTATION + // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] + eoUniformMutation mutationU(EPSILON); + // k (=1) coordinates of parents are uniformly modified + eoDetUniformMutation mutationD(EPSILON); + // all coordinates of parents are normally modified (stDev SIGMA) + eoNormalMutation mutationN(SIGMA); + // Combine them with relative weights + eoPropCombinedMonOp mutation(mutationU, uniformMutRate); + mutation.add(mutationD, detMutRate); + mutation.add(mutationN, normalMutRate, true); + + // The operators are encapsulated into an eoTRansform object + eoSGATransform transform(xover, pCross, mutation, pMut); + +// STOP + ////////////////////////////////////// + // termination condition see FirstBitEA.cpp + ///////////////////////////////////// + eoGenContinue genCont(maxGen); + eoSteadyFitContinue steadyCont(minGen, steadyGen); + eoFitContinue fitCont(0); + eoCombinedContinue continuator(genCont); + continuator.add(steadyCont); + continuator.add(fitCont); + + +// CHECKPOINT + // but now you want to make many different things every generation + // (e.g. statistics, plots, ...). + // the class eoCheckPoint is dedicated to just that: + + // Declare a checkpoint (from a continuator: an eoCheckPoint + // IS AN eoContinue and will be called in the loop of all algorithms) + eoCheckPoint checkpoint(continuator); + + // Create a counter parameter + eoValueParam generationCounter(0, "Gen."); + + // Create an incrementor (sub-class of eoUpdater). Note that the + // parameter's value is passed by reference, + // so every time the incrementer is updated (every generation), + // the data in generationCounter will change. + eoIncrementor increment(generationCounter.value()); + + // Add it to the checkpoint, + // so the counter is updated (here, incremented) every generation + checkpoint.add(increment); + + // now some statistics on the population: + // Best fitness in population + eoBestFitnessStat bestStat; + // Second moment stats: average and stdev + eoSecondMomentStats SecondStat; + + // Add them to the checkpoint to get them called at the appropriate time + checkpoint.add(bestStat); + checkpoint.add(SecondStat); + + // The Stdout monitor will print parameters to the screen ... + eoStdoutMonitor monitor(false); + + // when called by the checkpoint (i.e. at every generation) + checkpoint.add(monitor); + + // the monitor will output a series of parameters: add them + monitor.add(generationCounter); + monitor.add(eval); // because now eval is an eoEvalFuncCounter! + monitor.add(bestStat); + monitor.add(SecondStat); + + // A file monitor: will print parameters to ... a File, yes, you got it! + eoFileMonitor fileMonitor("stats.xg", " "); + + // the checkpoint mechanism can handle multiple monitors + checkpoint.add(fileMonitor); + + // the fileMonitor can monitor parameters, too, but you must tell it! + fileMonitor.add(generationCounter); + fileMonitor.add(bestStat); + fileMonitor.add(SecondStat); + + // Last type of item the eoCheckpoint can handle: state savers: + eoState outState; + // Register the algorithm into the state (so it has something to save!!) + outState.registerObject(parser); + outState.registerObject(pop); + outState.registerObject(rng); + + // and feed the state to state savers + // save state every 100th generation + eoCountedStateSaver stateSaver1(20, outState, "generation"); + // save state every 1 seconds + eoTimedStateSaver stateSaver2(1, outState, "time"); + + // Don't forget to add the two savers to the checkpoint + checkpoint.add(stateSaver1); + checkpoint.add(stateSaver2); + // and that's it for the (control and) output + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + + // Easy EA requires + // stopping criterion, eval, selection, transformation, replacement + eoEasyEA gga(checkpoint, eval, select, transform, replace); + + // Apply algo to pop - that's it! + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/trunk/eo/tutorial/Lesson3/binary_value.h b/trunk/eo/tutorial/Lesson3/binary_value.h new file mode 100644 index 000000000..66d2823ec --- /dev/null +++ b/trunk/eo/tutorial/Lesson3/binary_value.h @@ -0,0 +1,16 @@ +#include + +//----------------------------------------------------------------------------- + +/** Just a simple function that takes binary value of a chromosome and sets + the fitnes. + @param _chrom A binary chromosome +*/ +// INIT +double binary_value(const std::vector& _chrom) +{ + double sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + sum += _chrom[i]; + return sum; +} diff --git a/trunk/eo/tutorial/Lesson3/exercise3.1.cpp b/trunk/eo/tutorial/Lesson3/exercise3.1.cpp new file mode 100644 index 000000000..f21e5930e --- /dev/null +++ b/trunk/eo/tutorial/Lesson3/exercise3.1.cpp @@ -0,0 +1,404 @@ +//----------------------------------------------------------------------------- +// SecondBitGA.cpp +//----------------------------------------------------------------------------- +//* +// Same code than FirstBitEA as far as Evolutionary Computation is concerned +// but now you learn to enter the parameters in a more flexible way +// and to twidle the output to your preferences! +//----------------------------------------------------------------------------- +#ifdef HAVE_CONFIG_H +#include +#endif + +// standard includes +#include +#include // cout +#include // runtime_error + +// the general include for eo +#include + +// EVAL +#include "binary_value.h" + +// REPRESENTATION +//----------------------------------------------------------------------------- +// Include the corresponding file +#include // bitstring representation & operators +// define your genotype and fitness types +typedef eoBit Indi; + +using namespace std; + +// the main_function: nothing changed(!), except variable initialization +void main_function(int argc, char **argv) +{ +// PARAMETRES +//----------------------------------------------------------------------------- +// instead of having all values of useful parameters as constants, read them: +// either on the command line (--option=value or -o=value) +// or in a parameter file (same syntax, order independent, +// # = usual comment character +// or in the environment (TODO) + + // First define a parser from the command-line arguments + eoParser parser(argc, argv); + + // For each parameter, define Parameter, read it through the parser, + // and assign the value to the variable + + eoValueParam seedParam(time(0), "seed", "Random number seed", 'S'); + parser.processParam( seedParam ); + unsigned seed = seedParam.value(); + + // description of genotype + eoValueParam vecSizeParam(100, "vecSize", "Genotype size",'V'); + parser.processParam( vecSizeParam, "Representation" ); + unsigned vecSize = vecSizeParam.value(); + + // parameters for evolution engine + eoValueParam popSizeParam(100, "popSize", "Population size",'P'); + parser.processParam( popSizeParam, "Evolution engine" ); + unsigned popSize = popSizeParam.value(); + + eoValueParam tSizeParam(10, "tSize", "Tournament size",'T'); + parser.processParam( tSizeParam, "Evolution Engine" ); + unsigned tSize = tSizeParam.value(); + + // init and stop + eoValueParam loadNameParam("", "Load","A save file to restart from",'L'); + parser.processParam( loadNameParam, "Persistence" ); + string loadName = loadNameParam.value(); + + eoValueParam maxGenParam(500, "maxGen", "Maximum number of generations",'G'); + parser.processParam( maxGenParam, "Stopping criterion" ); + unsigned maxGen = maxGenParam.value(); + + eoValueParam minGenParam(500, "minGen", "Minimum number of generations",'g'); + parser.processParam( minGenParam, "Stopping criterion" ); + unsigned minGen = minGenParam.value(); + + eoValueParam steadyGenParam(100, "steadyGen", "Number of generations with no improvement",'s'); + parser.processParam( steadyGenParam, "Stopping criterion" ); + unsigned steadyGen = steadyGenParam.value(); + + // operators probabilities at the algorithm level + eoValueParam pCrossParam(0.6, "pCross", "Probability of Crossover", 'C'); + parser.processParam( pCrossParam, "Genetic Operators" ); + double pCross = pCrossParam.value(); + + eoValueParam pMutParam(0.1, "pMut", "Probability of Mutation", 'M'); + parser.processParam( pMutParam, "Genetic Operators" ); + double pMut = pMutParam.value(); + + // relative rates for crossovers + eoValueParam onePointRateParam(1, "onePointRate", "Relative rate for one point crossover", '1'); + parser.processParam( onePointRateParam, "Genetic Operators" ); + double onePointRate = onePointRateParam.value(); + + eoValueParam twoPointsRateParam(1, "twoPointRate", "Relative rate for two point crossover", '2'); + parser.processParam( twoPointsRateParam, "Genetic Operators" ); + double twoPointsRate = twoPointsRateParam.value(); + + eoValueParam uRateParam(2, "uRate", "Relative rate for uniform crossover", 'U'); + parser.processParam( uRateParam, "Genetic Operators" ); + double URate = uRateParam.value(); + + // relative rates and private parameters for mutations; + eoValueParam pMutPerBitParam(0.01, "pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b'); + parser.processParam( pMutPerBitParam, "Genetic Operators" ); + double pMutPerBit = pMutPerBitParam.value(); + + eoValueParam bitFlipRateParam(0.01, "bitFlipRate", "Relative rate for bit-flip mutation", 'B'); + parser.processParam( bitFlipRateParam, "Genetic Operators" ); + double bitFlipRate = bitFlipRateParam.value(); + + eoValueParam oneBitRateParam(0.01, "oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D'); + parser.processParam( oneBitRateParam, "Genetic Operators" ); + double oneBitRate = oneBitRateParam.value(); + + // the name of the "status" file where all actual parameter values will be saved + string str_status = parser.ProgramName() + ".status"; // default value + eoValueParam statusParam(str_status.c_str(), "status","Status file",'S'); + parser.processParam( statusParam, "Persistence" ); + + // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED + // i.e. in case you need parameters somewhere else, postpone these + if (parser.userNeedsHelp()) + { + parser.printHelp(cout); + exit(1); + } + if (statusParam.value() != "") + { + ofstream os(statusParam.value().c_str()); + os << parser; // and you can use that file as parameter file + } + +// EVAL + ///////////////////////////// + // Fitness function + //////////////////////////// + // Evaluation: from a plain C++ fn to an EvalFunc Object ... + eoEvalFuncPtr& > plainEval( binary_value ); + // ... to an object that counts the nb of actual evaluations + eoEvalFuncCounter eval(plainEval); + +// INIT + //////////////////////////////// + // Initilisation of population + //////////////////////////////// + // Either load or initialize + // create an empty pop + eoPop pop; + // create a state for reading + eoState inState; // a state for loading - WITHOUT the parser + // register the rng and the pop in the state, so they can be loaded, + // and the present run will be the exact conitnuation of the saved run + // eventually with different parameters + inState.registerObject(rng); + inState.registerObject(pop); + + if (loadName != "") + { + inState.load(loadName); // load the pop and the rng + // the fitness is read in the file: + // do only evaluate the pop if the fitness has changed + } + else + { + rng.reseed(seed); + // a Indi random initializer + // based on boolean_generator class (see utils/rnd_generator.h) + eoUniformGenerator uGen; + eoInitFixedLength random(vecSize, uGen); + + // Init pop from the randomizer: need to use the append function + pop.append(popSize, random); + // and evaluate pop (STL syntax) + apply(eval, pop); + } // end of initializatio of the population + +// OUTPUT + // sort pop for pretty printout + // pop.sort(); + // Print (sorted) intial population (raw printout) + cout << "Initial Population" << endl << pop ; + cout << "and best is " << pop.best_element() << "\n\n"; + cout << "and worse is " << pop.worse_element() << "\n\n"; +// ENGINE + ///////////////////////////////////// + // selection and replacement + //////////////////////////////////// +// SELECT + // The robust tournament selection + eoDetTournamentSelect selectOne(tSize); // tSize in [2,POPSIZE] + // is now encapsulated in a eoSelectPerc (entage) + eoSelectPerc select(selectOne);// by default rate==1 + +// REPLACE + // And we now have the full slection/replacement - though with + // generational replacement at the moment :-) + eoGenerationalReplacement replace; + // want to add (weak) elitism? easy! + // rename the eoGenerationalReplacement replace_main, + // then encapsulate it in the elitist replacement + // eoWeakElitistReplacement replace(replace_main); + +// OPERATORS + ////////////////////////////////////// + // The variation operators + ////////////////////////////////////// +// CROSSOVER + // 1-point crossover for bitstring + eo1PtBitXover xover1; + // uniform crossover for bitstring + eoUBitXover xoverU; + // 2-pots xover + eoNPtsBitXover xover2(2); + // Combine them with relative rates + eoPropCombinedQuadOp xover(xover1, onePointRate); + xover.add(xoverU, URate); + xover.add(xover2, twoPointsRate, true); + +// MUTATION + // standard bit-flip mutation for bitstring + eoBitMutation mutationBitFlip(pMutPerBit); + // mutate exactly 1 bit per individual + eoDetBitFlip mutationOneBit; + // Combine them with relative rates + eoPropCombinedMonOp mutation(mutationBitFlip, bitFlipRate); + mutation.add(mutationOneBit, oneBitRate, true); + + // The operators are encapsulated into an eoTRansform object + eoSGATransform transform(xover, pCross, mutation, pMut); + +// STOP + ////////////////////////////////////// + // termination condition see FirstBitEA.cpp + ///////////////////////////////////// + eoGenContinue genCont(maxGen); + eoSteadyFitContinue steadyCont(minGen, steadyGen); + // eoFitContinue fitCont(vecSize); // remove if minimizing :-) + eoCombinedContinue continuator(genCont); + continuator.add(steadyCont); + // continuator.add(fitCont); + // Ctrl C signal handling: don't know if that works in MSC ... +#ifndef _MSC_VER + eoCtrlCContinue ctrlC; + continuator.add(ctrlC); +#endif + +// CHECKPOINT + // but now you want to make many different things every generation + // (e.g. statistics, plots, ...). + // the class eoCheckPoint is dedicated to just that: + + // Declare a checkpoint (from a continuator: an eoCheckPoint + // IS AN eoContinue and will be called in the loop of all algorithms) + eoCheckPoint checkpoint(continuator); + + // Create a counter parameter + eoValueParam generationCounter(0, "Gen."); + + // Create an incrementor (sub-class of eoUpdater). Note that the + // parameter's value is passed by reference, + // so every time the incrementer is updated (every generation), + // the data in generationCounter will change. + eoIncrementor increment(generationCounter.value()); + + // Add it to the checkpoint, + // so the counter is updated (here, incremented) every generation + checkpoint.add(increment); + + // now some statistics on the population: + // Best fitness in population + eoBestFitnessStat bestStat; + eoAverageStat averageStat; + // Second moment stats: average and stdev + eoSecondMomentStats SecondStat; + // the Fitness Distance Correlation + // need first an object to compute the distances + eoQuadDistance dist; // Hamming distance + eoFDCStat fdcStat(dist); + + // Add them to the checkpoint to get them called at the appropriate time + checkpoint.add(bestStat); + checkpoint.add(averageStat); + checkpoint.add(SecondStat); + checkpoint.add(fdcStat); + + // The Stdout monitor will print parameters to the screen ... + eoStdoutMonitor monitor(false); + + // when called by the checkpoint (i.e. at every generation) + checkpoint.add(monitor); + + // the monitor will output a series of parameters: add them + monitor.add(generationCounter); + monitor.add(eval); // because now eval is an eoEvalFuncCounter! + monitor.add(bestStat); + monitor.add(SecondStat); + monitor.add(fdcStat); + + // test de eoPopStat and/or eoSortedPopStat. + // Dumps the whole pop every 10 gen. + // eoSortedPopStat popStat(10, "Dump of whole population"); +// eoPopStat popStat(10, "Dump of whole population"); +// checkpoint.add(popStat); +// monitor.add(popStat); + + // A file monitor: will print parameters to ... a File, yes, you got it! + eoFileMonitor fileMonitor("stats.xg", " "); + + // the checkpoint mechanism can handle monitors + checkpoint.add(fileMonitor); + + // the fileMonitor can monitor parameters, too, but you must tell it! + fileMonitor.add(generationCounter); + fileMonitor.add(bestStat); + fileMonitor.add(SecondStat); + +#ifndef _MSC_VER + // and an eoGnuplot1DMonitor will 1-print to a file, and 2- plot on screen + eoGnuplot1DMonitor gnuMonitor("best_average.xg",minimizing_fitness()); + // the checkpoint mechanism can handle multiple monitors + checkpoint.add(gnuMonitor); + // the gnuMonitor can monitor parameters, too, but you must tell it! + gnuMonitor.add(eval); + gnuMonitor.add(bestStat); + gnuMonitor.add(averageStat); + + // send a scaling command to gnuplot + gnuMonitor.gnuplotCommand("set yrange [0:500]"); + + // a specific plot monitor for FDC + // first into a file (it adds everything ti itself + eoFDCFileSnapshot fdcFileSnapshot(fdcStat); + // then to a Gnuplot monitor + eoGnuplot1DSnapshot fdcGnuplot(fdcFileSnapshot); + // and of coruse add them to the checkPoint + checkpoint.add(fdcFileSnapshot); + checkpoint.add(fdcGnuplot); + + // want to see how the fitness is spread? + eoScalarFitnessStat fitStat; + checkpoint.add(fitStat); + // a gnuplot-based monitor for snapshots: needs a dir name + // where to store the files + eoGnuplot1DSnapshot fitSnapshot("Fitnesses"); + // add any stat that is a vector to it + fitSnapshot.add(fitStat); + // and of course add it to the checkpoint + checkpoint.add(fitSnapshot); +#endif + // Last type of item the eoCheckpoint can handle: state savers: + eoState outState; + // Register the algorithm into the state (so it has something to save!!) + outState.registerObject(rng); + outState.registerObject(pop); + + // and feed the state to state savers + // save state every 100th generation + eoCountedStateSaver stateSaver1(100, outState, "generation"); + // save state every 1 seconds + eoTimedStateSaver stateSaver2(1, outState, "time"); + + // Don't forget to add the two savers to the checkpoint + checkpoint.add(stateSaver1); + checkpoint.add(stateSaver2); + // and that's it for the (control and) output + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + + // Easy EA requires + // selection, transformation, eval, replacement, and stopping criterion + eoEasyEA gga(checkpoint, eval, select, transform, replace); + + // Apply algo to pop - that's it! + gga(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL Population\n" << pop << endl; +// GENERAL +} + +// A main that catches the exceptions +int main(int argc, char **argv) +{ + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} diff --git a/trunk/eo/tutorial/Lesson3/real_value.h b/trunk/eo/tutorial/Lesson3/real_value.h new file mode 100644 index 000000000..525bf393f --- /dev/null +++ b/trunk/eo/tutorial/Lesson3/real_value.h @@ -0,0 +1,17 @@ +#include +//----------------------------------------------------------------------------- +/** Just a simple function that takes an vector and sets the fitnes + to the sphere function. Please use doubles not float!!! + @param _ind A floatingpoint vector +*/ + +// INIT +double real_value(const std::vector& _ind) +{ + double sum = 0; + for (unsigned i = 0; i < _ind.size(); i++) + { + sum += _ind[i] * _ind[i]; + } + return sum; +} diff --git a/trunk/eo/tutorial/Lesson4/BitEA.cpp b/trunk/eo/tutorial/Lesson4/BitEA.cpp new file mode 100644 index 000000000..97a6cc435 --- /dev/null +++ b/trunk/eo/tutorial/Lesson4/BitEA.cpp @@ -0,0 +1,95 @@ +#include + +#include +#include + +// EVAL +#include "binary_value.h" + +// GENERAL +using namespace std; + +int main(int argc, char* argv[]) +{ + + try + { +// REPRESENTATION +//----------------------------------------------------------------------------- +// define your genotype and fitness types + typedef eoBit EOT; + +// PARAMETRES + eoParser parser(argc, argv); // for user-parameter reading + +// GENERAL + eoState state; // keeps all things allocated + + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// + +// EVAL + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr mainEval( binary_value ); + eoEvalFuncCounter eval(mainEval); + +// REPRESENTATION + // the genotype - through a genotype initializer + eoInit& init = make_genotype(parser, state, EOT()); + + // if you want to do sharing, you'll need a distance. + // here Hamming distance + eoHammingDistance dist; + +// OPERATORS + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + +// GENERAL + //// Now the representation-independent things + ////////////////////////////////////////////// + + // initialize the population - and evaluate + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + +// STOP + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); +// GENERATION + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op, &dist); + + ///// End of construction of the algorith + ///////////////////////////////////////// +// PARAMETRES + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// +// EVAL + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); +// STOP + // print it out (sort witout modifying) + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + +// GENERATION + run_ea(ga, pop); // run the ga +// STOP + // print it out (sort witout modifying) + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; +// GENERAL + } + catch(exception& e) + { + cout << e.what() << endl; + } +} diff --git a/trunk/eo/tutorial/Lesson4/CMakeLists.txt b/trunk/eo/tutorial/Lesson4/CMakeLists.txt new file mode 100644 index 000000000..f85b2898d --- /dev/null +++ b/trunk/eo/tutorial/Lesson4/CMakeLists.txt @@ -0,0 +1,98 @@ +###################################################################################### +### 0) Copy the ESEA.param and RealEA.param files in the build directory for an easy use. +###################################################################################### + +EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param + ${EO_BINARY_DIR}/tutorial/Lesson4/ESEA.param + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param + ${EO_BINARY_DIR}/tutorial/Lesson4/RealEA.param +) + +############## +# OLD_TARGETS +############## +#ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param) +#ADD_CUSTOM_COMMAND( +# TARGET param +# POST_BUILD +# COMMAND ${CMAKE_COMMAND} +# ARGS -E copy_if_different +# ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param +# ${EO_BINARY_DIR}/tutorial/Lesson4) +#ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param) +#ADD_CUSTOM_COMMAND( +# TARGET param +# POST_BUILD +# COMMAND ${CMAKE_COMMAND} +# ARGS -E copy_if_different +# ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param +# ${EO_BINARY_DIR}/tutorial/Lesson4) + +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/es) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga) + +###################################################################################### +### 2) Specify where CMake can find the libraries +###################################################################################### + +IF(NOT WIN32 OR CYGWIN) + LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) +ENDIF(NOT WIN32 OR CYGWIN) + +# especially for Visual Studio +IF(WIN32 AND NOT CYGWIN) + LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) +ENDIF(WIN32 AND NOT CYGWIN) + +###################################################################################### +### 3) Define your targets +###################################################################################### + +# no matter what is the OS, hopefully +ADD_EXECUTABLE(BitEA BitEA.cpp) +ADD_EXECUTABLE(RealEA RealEA.cpp) +ADD_EXECUTABLE(ESEA ESEA.cpp) + +#ADD_DEPENDENCIES(BitEA es ga eo eoutils) +#ADD_DEPENDENCIES(RealEA es ga eo eoutils) +#ADD_DEPENDENCIES(ESEA es ga eo eoutils) + +###################################################################################### +### 4) Optionnal +###################################################################################### + +SET(BITEA_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(BitEA PROPERTIES VERSION "${BITEA_VERSION}") + +SET(REALEA_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(RealEA PROPERTIES VERSION "${REALEA_VERSION}") + +SET(ESEA_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(ESEA PROPERTIES VERSION "${ESEA_VERSION}") + +###################################################################################### +### 5) Link the librairies for the targets +###################################################################################### + +TARGET_LINK_LIBRARIES(BitEA es ga eo eoutils) +TARGET_LINK_LIBRARIES(RealEA es ga eo eoutils) +TARGET_LINK_LIBRARIES(ESEA es ga eo eoutils) + +###################################################################################### +### 6) Configure project installation paths +###################################################################################### + +INSTALL(TARGETS BitEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples) +INSTALL(TARGETS RealEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples) +INSTALL(TARGETS ESEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples) + +###################################################################################### diff --git a/trunk/eo/tutorial/Lesson4/ESEA.cpp b/trunk/eo/tutorial/Lesson4/ESEA.cpp new file mode 100644 index 000000000..6a2b51a23 --- /dev/null +++ b/trunk/eo/tutorial/Lesson4/ESEA.cpp @@ -0,0 +1,137 @@ +// Program to test several EO-ES features + +#ifdef _MSC_VER +#pragma warning(disable:4786) +#endif + +#include +#include +#include +#include +#include +#include + +using namespace std; + +#include + +// representation specific +#include + +#include "real_value.h" // the sphere fitness + +// Now the main +/////////////// +typedef eoMinimizingFitness FitT; + +template +void runAlgorithm(EOT, eoParser& _parser, eoState& _state); + +int main_function(int argc, char *argv[]) +{ + // Create the command-line parser + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + + eoValueParam& simpleParam = parser.createParam(true, "Isotropic", "Isotropic self-adaptive mutation", 'i', "ES mutation"); + eoValueParam& stdevsParam = parser.createParam(false, "Stdev", "One self-adaptive stDev per variable", 's', "ES mutation"); + eoValueParam& corrParam = parser.createParam(false, "Correl", "Use correlated mutations", 'c', "ES mutation"); + + // Run the appropriate algorithm + if (simpleParam.value() == false) + { + cout << "Using eoReal" << endl; + runAlgorithm(eoReal(), parser, state); + } + else if (stdevsParam.value() == false) + { + cout << "Using eoEsSimple" << endl; + runAlgorithm(eoEsSimple(), parser, state); + } + else if (corrParam.value() == false) + { + cout << "Using eoEsStdev" << endl; + runAlgorithm(eoEsStdev(), parser, state); + } + else + { + cout << "Using eoEsFull" << endl; + runAlgorithm(eoEsFull(), parser, state); + } + + return 0; +} + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} + +/** The templatized main (sort of) + * quite similar to the main of other genotypes + * (e.g. t-eoReal and t-eoGA in test dir) + */ +template +void runAlgorithm(EOT, eoParser& _parser, eoState& _state) +{ + typedef typename EOT::Fitness FitT; + + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// + + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr&> + mainEval( real_value ); + eoEvalFuncCounter eval(mainEval); + + // the genotype - through a genotype initializer + eoRealInitBounded& init = make_genotype(_parser, _state, EOT()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(_parser, _state, init); + + //// Now the representation-independent things + ////////////////////////////////////////////// + + // initialize the population - and evaluate + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(_parser, _state, init); + apply(eval, pop); + + // stopping criteria + eoContinue & term = make_continue(_parser, _state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(_parser, _state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(_parser, _state, eval, checkpoint, op); + + ///// End of construction of the algorith + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(_parser); + + //// GO + /////// + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; +} diff --git a/trunk/eo/tutorial/Lesson4/ESEA.param b/trunk/eo/tutorial/Lesson4/ESEA.param new file mode 100644 index 000000000..b5dc6d016 --- /dev/null +++ b/trunk/eo/tutorial/Lesson4/ESEA.param @@ -0,0 +1,61 @@ +###### General ###### +# --help=0 # -h : Prints this message +# --stopOnUnknownParam=1 # Stop if unkown param entered +# --seed=1104133126 # -S : Random number seed + +###### ES mutation ###### +# --Isotropic=1 # -i : Isotropic self-adaptive mutation +# --Stdev=0 # -s : One self-adaptive stDev per variable +# --Correl=0 # -c : Use correlated mutations + +###### Evolution Engine ###### +--popSize=1 # -P : Population Size +--selection=Sequential # -S : Selection: DetTour(T), StochTour(t), Roulette, Ranking(p,e) or Sequential(ordered/unordered) +--nbOffspring=700% # -O : Nb of offspring (percentage or absolute) +--replacement=Comma # -R : Replacement: Comma, Plus or EPTour(T), SSGAWorst, SSGADet(T), SSGAStoch(t) +--weakElitism=0 # -w : Old best parent replaces new worst offspring *if necessary* + +###### Genotype Initialization ###### +# --vecSize=10 # -n : The number of variables +# --initBounds=10[-1,1] # -B : Bounds for initialization (MUST be bounded) +--sigmaInit=0.3% # -s : Initial value for Sigmas (with a '%' -> scaled by the range of each variable) + +###### Output ###### +# --useEval=1 # Use nb of eval. as counter (vs nb of gen.) +# --useTime=1 # Display time (s) every generation +# --printBestStat=1 # Print Best/avg/stdev every gen. +# --printPop=0 # Print sorted pop. every gen. + +###### Output - Disk ###### +# --resDir=Res # Directory to store DISK outputs +# --eraseDir=1 # erase files in dirName if any +# --fileBestStat=0 # Output bes/avg/std to file + +###### Output - Graphical ###### +# --plotBestStat=0 # Plot Best/avg Stat +# --plotHisto=0 # Plot histogram of fitnesses + +###### Persistence ###### +# --Load= # -L : A save file to restart from +# --recomputeFitness=0 # -r : Recompute the fitness after re-loading the pop.? +# --saveFrequency=0 # Save every F generation (0 = only final state, absent = never) +# --saveTimeInterval=0 # Save every T seconds (0 or absent = never) +# --status=t-eoESAll.status # Status file + +###### Stopping criterion ###### +# --maxGen=100 # -G : Maximum number of generations () = none) +# --steadyGen=100 # -s : Number of generations with no improvement +# --minGen=0 # -g : Minimum number of generations +# --maxEval=0 # -E : Maximum number of evaluations (0 = none) +# --targetFitness=0 # -T : Stop when fitness reaches +# --CtrlC=0 # -C : Terminate current generation upon Ctrl C + +###### Variation Operators ###### +# --objectBounds=10[-inf,+inf] # -B : Bounds for variables +# --operator=SGA # -o : Description of the operator (SGA only now) +# --pCross=1 # -C : Probability of Crossover +# --pMut=1 # -M : Probability of Mutation +# --crossType=global # -C : Type of ES recombination (global or standard) +# --crossObj=discrete # -O : Recombination of object variables (discrete, intermediate or none) +# --crossStdev=intermediate # -S : Recombination of mutation strategy parameters (intermediate, discrete or none) +# --TauLoc=1 # -l : Local Tau (before normalization) diff --git a/trunk/eo/tutorial/Lesson4/Makefile.simple b/trunk/eo/tutorial/Lesson4/Makefile.simple new file mode 100644 index 000000000..72c02565e --- /dev/null +++ b/trunk/eo/tutorial/Lesson4/Makefile.simple @@ -0,0 +1,33 @@ +### This Makefile is part of the tutorial of the EO library +# Unlike other Makefiles in EO, it is not using the automake/autoconf +# so that it stays easy to understant (you are in the tutorial, remember!) +# MS, Oct. 2002 + +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src + +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp + +ALL = BitEA RealEA ESEA + +all : $(ALL) + +BitEA : BitEA.o ; + $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/ga/libga.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +RealEA : RealEA.o ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/es/libes.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +ESEA : ESEA.o ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.2\" -Wall -g -o $@ $< $(DIR_EO)/es/libes.a $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +clean : + @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/trunk/eo/tutorial/Lesson4/RealEA.cpp b/trunk/eo/tutorial/Lesson4/RealEA.cpp new file mode 100644 index 000000000..1775b12b7 --- /dev/null +++ b/trunk/eo/tutorial/Lesson4/RealEA.cpp @@ -0,0 +1,72 @@ +#include + +#include +#include "real_value.h" +#include + +using namespace std; + +int main(int argc, char* argv[]) +{ + + try + { + typedef eoReal EOT; + + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + ///// FIRST, problem or representation dependent stuff + ////////////////////////////////////////////////////// + + // The evaluation fn - encapsulated into an eval counter for output + eoEvalFuncPtr&> + mainEval( real_value ); + eoEvalFuncCounter eval(mainEval); + + // the genotype - through a genotype initializer + eoRealInitBounded& init = make_genotype(parser, state, EOT()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + + //// Now the representation-independent things + ////////////////////////////////////////////// + + // initialize the population - and evaluate + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ea = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorith + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // print it out + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + run_ea(ea, pop); // run the ea + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + } + catch(exception& e) + { + cout << e.what() << endl; + } +} diff --git a/trunk/eo/tutorial/Lesson4/RealEA.param b/trunk/eo/tutorial/Lesson4/RealEA.param new file mode 100644 index 000000000..d1f8cfc4e --- /dev/null +++ b/trunk/eo/tutorial/Lesson4/RealEA.param @@ -0,0 +1,56 @@ +###### General ###### +# --help=0 # -h : Prints this message +# --stopOnUnknownParam=1 # Stop if unkown param entered +# --seed=1104133126 # -S : Random number seed + +###### Evolution Engine ###### +--popSize=10 # -P : Population Size +--selection=Sequential # -S : Selection: DetTour(T), StochTour(t), Roulette, Ranking(p,e) or Sequential(ordered/unordered) +--nbOffspring=700% # -O : Nb of offspring (percentage or absolute) +--replacement=Plus # -R : Replacement: Comma, Plus or EPTour(T), SSGAWorst, SSGADet(T), SSGAStoch(t) +--weakElitism=0 # -w : Old best parent replaces new worst offspring *if necessary* + +###### Genotype Initialization ###### +# --vecSize=10 # -n : The number of variables +# --initBounds=10[-1,1] # -B : Bounds for initialization (MUST be bounded) +--sigmaInit=0.3% # -s : Initial value for Sigmas (with a '%' -> scaled by the range of each variable) + +###### Output ###### +# --useEval=1 # Use nb of eval. as counter (vs nb of gen.) +# --useTime=1 # Display time (s) every generation +# --printBestStat=1 # Print Best/avg/stdev every gen. +# --printPop=0 # Print sorted pop. every gen. + +###### Output - Disk ###### +# --resDir=Res # Directory to store DISK outputs +# --eraseDir=1 # erase files in dirName if any +# --fileBestStat=0 # Output bes/avg/std to file + +###### Output - Graphical ###### +# --plotBestStat=0 # Plot Best/avg Stat +# --plotHisto=0 # Plot histogram of fitnesses + +###### Persistence ###### +# --Load= # -L : A save file to restart from +# --recomputeFitness=0 # -r : Recompute the fitness after re-loading the pop.? +# --saveFrequency=0 # Save every F generation (0 = only final state, absent = never) +# --saveTimeInterval=0 # Save every T seconds (0 or absent = never) +# --status=t-eoESAll.status # Status file + +###### Stopping criterion ###### +# --maxGen=100 # -G : Maximum number of generations () = none) +# --steadyGen=100 # -s : Number of generations with no improvement +# --minGen=0 # -g : Minimum number of generations +# --maxEval=0 # -E : Maximum number of evaluations (0 = none) +# --targetFitness=0 # -T : Stop when fitness reaches +# --CtrlC=0 # -C : Terminate current generation upon Ctrl C + +###### Variation Operators ###### +# --objectBounds=10[-inf,+inf] # -B : Bounds for variables +# --operator=SGA # -o : Description of the operator (SGA only now) +# --pCross=1 # -C : Probability of Crossover +# --pMut=1 # -M : Probability of Mutation +# --crossType=global # -C : Type of ES recombination (global or standard) +# --crossObj=discrete # -O : Recombination of object variables (discrete, intermediate or none) +# --crossStdev=intermediate # -S : Recombination of mutation strategy parameters (intermediate, discrete or none) +# --TauLoc=1 # -l : Local Tau (before normalization) diff --git a/trunk/eo/tutorial/Lesson4/binary_value.h b/trunk/eo/tutorial/Lesson4/binary_value.h new file mode 100644 index 000000000..f8dd5891d --- /dev/null +++ b/trunk/eo/tutorial/Lesson4/binary_value.h @@ -0,0 +1,25 @@ +#include + +//----------------------------------------------------------------------------- + +/** Just a simple function that takes binary value of a chromosome and sets + the fitnes. + @param _chrom A binary chromosome +*/ + +template double binary_value(const Chrom& _chrom) +{ + double sum = 0; + for (unsigned i = 0; i < _chrom.size(); i++) + if (_chrom[i]) + sum += _chrom[i]; + return sum; +} + +struct BinaryValue +{ + template void operator()(Chrom& _chrom) + { + _chrom.fitness(binary_value(_chrom)); + } +}; diff --git a/trunk/eo/tutorial/Lesson4/real_value.h b/trunk/eo/tutorial/Lesson4/real_value.h new file mode 100644 index 000000000..f8ef3e589 --- /dev/null +++ b/trunk/eo/tutorial/Lesson4/real_value.h @@ -0,0 +1,16 @@ +#include +//----------------------------------------------------------------------------- + + +/** Just a simple function that takes an eoEsBase and sets the fitnes + to sphere + @param _ind vector +*/ + +double real_value(const std::vector& _ind) +{ + double sum = 0; + for (unsigned i = 0; i < _ind.size(); i++) + sum += _ind[i] * _ind[i]; + return sqrt(sum); +} diff --git a/trunk/eo/tutorial/Lesson5/CMakeLists.txt b/trunk/eo/tutorial/Lesson5/CMakeLists.txt new file mode 100644 index 000000000..c79c45875 --- /dev/null +++ b/trunk/eo/tutorial/Lesson5/CMakeLists.txt @@ -0,0 +1,56 @@ +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +###################################################################################### +### 2) Specify where CMake can find the libraries +###################################################################################### + +IF(NOT WIN32 OR CYGWIN) + LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) +ENDIF(NOT WIN32 OR CYGWIN) + +# especially for Visual Studio +IF(WIN32 AND NOT CYGWIN) + LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) +ENDIF(WIN32 AND NOT CYGWIN) + +###################################################################################### +### 3) Define your targets +###################################################################################### + +# no matter what is the OS, hopefully +ADD_EXECUTABLE(OneMaxEA OneMaxEA.cpp) +ADD_EXECUTABLE(OneMaxLibEA OneMaxLibEA.cpp make_OneMax.cpp) + +ADD_DEPENDENCIES(OneMaxEA es ga eo eoutils) +ADD_DEPENDENCIES(OneMaxLibEA es ga eo eoutils) + +###################################################################################### +### 4) Optionnal +###################################################################################### + +SET(ONEMAXEA_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(OneMaxEA PROPERTIES VERSION "${ONEMAXEA_VERSION}") + +SET(ONEMAXLIBEA_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(OneMaxLibEA PROPERTIES VERSION "${ONEMAXLIBEA_VERSION}") + +###################################################################################### +### 5) Link the librairies for the targets +###################################################################################### + +TARGET_LINK_LIBRARIES(OneMaxEA es ga eo eoutils) +TARGET_LINK_LIBRARIES(OneMaxLibEA es ga eo eoutils) + +###################################################################################### +### 6) Configure project installation paths +###################################################################################### + +INSTALL(TARGETS OneMaxEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson5 COMPONENT examples) +INSTALL(TARGETS OneMaxLibEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson5 COMPONENT examples) + +###################################################################################### diff --git a/trunk/eo/tutorial/Lesson5/Makefile.simple b/trunk/eo/tutorial/Lesson5/Makefile.simple new file mode 100644 index 000000000..ace0df586 --- /dev/null +++ b/trunk/eo/tutorial/Lesson5/Makefile.simple @@ -0,0 +1,56 @@ +### This Makefile is part of the tutorial of the EO library +# Unlike other Makefiles in EO, it is not using the automake/autoconf +# so that it stays easy to understant (you are in the tutorial, remember!) +# MS, Oct. 2002 + +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src + +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c $*.cpp + +# local sources +COMMON_SOURCES = eoOneMax.h \ + eoOneMaxEvalFunc.h \ + eoOneMaxInit.h \ + eoOneMaxMutation.h \ + eoOneMaxQuadCrossover.h \ + make_genotype_OneMax.h \ + make_op_OneMax.h + +NO_LIB_SOURCES = OneMaxEA.cpp + +LIB_SOURCES = OneMaxLibEA.cpp make_OneMax.cpp + + +SOURCES = $(COMMON_SOURCES) OneMaxEA.cpp OneMaxLibEA.cpp make_OneMax.cpp + +LIB_EO = $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +ALL = OneMaxEA OneMaxLibEA + +OneMaxEA : OneMaxEA.o + $(CXX) -g -o $@ OneMaxEA.o $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -lm + +OneMaxLibEA : OneMaxLibEA.o make_OneMax.o + $(CXX) -g -o $@ OneMaxLibEA.o make_OneMax.o $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a -lm + +tar : ; tar czvf OneMax.tgz *.h *.cpp Makefile + +all : $(ALL) + +clean : ; /bin/rm *.o $(ALL) + +########## local dependencies +OneMaxEA.o : $(COMMON_SOURCES) OneMaxEA.cpp +OneMaxLibEA.o : $(COMMON_SOURCES) OneMaxLibEA.cpp +make_OneMax.o : make_OneMax.cpp eoOneMax.h diff --git a/trunk/eo/tutorial/Lesson5/OneMaxEA.cpp b/trunk/eo/tutorial/Lesson5/OneMaxEA.cpp new file mode 100644 index 000000000..14a0f4c5e --- /dev/null +++ b/trunk/eo/tutorial/Lesson5/OneMaxEA.cpp @@ -0,0 +1,188 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +This is the template main file. +It includes all other files that have been generated by the script create.sh +so it is the only file to compile. + +In case you want to build up a separate library for your new Evolving Object, +you'll need some work - follow what's done in the src/ga dir, used in the +main file BitEA in tutorial/Lesson4 dir. +Or you can wait until we do it :-) +*/ + +// Miscilaneous include and declaration +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoOneMax MUST derive from EO for some fitness + */ +#include "eoOneMax.h" + +/** definition of initilizqtion: + * class eoOneMaxInit MUST derive from eoInit + */ +#include "eoOneMaxInit.h" + +/** definition of evaluation: + * class eoOneMaxEvalFunc MUST derive from eoEvalFunc + * and should test for validity before doing any computation + * see tutorial/Templates/evalFunc.tmpl + */ +#include "eoOneMaxEvalFunc.h" + +// GENOTYPE eoOneMax ***MUST*** be templatized over the fitness + +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +// START fitness type: double or eoMaximizingFitness if you are maximizing +// eoMinimizingFitness if you are minimizing +typedef eoMaximizingFitness MyFitT ; // type of fitness +// END fitness type +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + +// Then define your EO objects using that fitness type +typedef eoOneMax Indi; // ***MUST*** derive from EO + +// create an initializer +#include "make_genotype_OneMax.h" +eoInit & make_genotype(eoParser& _parser, eoState&_state, Indi _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + +// and the variation operaotrs +#include "make_op_OneMax.h" +eoGenOp& make_op(eoParser& _parser, eoState& _state, eoInit& _init) +{ + return do_make_op(_parser, _state, _init); +} + +// Use existing modules to define representation independent routines +// These are parser-based definitions of objects + +// how to initialize the population +// it IS representation independent if an eoInit is given +#include +eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +// the stopping criterion +#include +eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +// outputs (stats, population dumps, ...) +#include +eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +// evolution engine (selection and replacement) +#include +eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +// simple call to the algo. stays there for consistency reasons +// no template for that one +#include +// the instanciating fitnesses +#include +void run_ea(eoAlgo& _ga, eoPop& _pop) +{ + do_run(_ga, _pop); +} + +// checks for help demand, and writes the status file +// and make_help; in libutils +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +int main(int argc, char* argv[]) +{ + + try + { + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + // The fitness + ////////////// + eoOneMaxEvalFunc plainEval/* (varType _anyVariable) */; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + // the genotype - through a genotype initializer + eoInit& init = make_genotype(parser, state, Indi()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + + + //// Now the representation-independent things + // + // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT + // unless you want to add specific statistics to the checkpoint + ////////////////////////////////////////////// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorithm + + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + } + catch(exception& e) + { + cout << e.what() << endl; + } + return 0; +} diff --git a/trunk/eo/tutorial/Lesson5/OneMaxLibEA.cpp b/trunk/eo/tutorial/Lesson5/OneMaxLibEA.cpp new file mode 100644 index 000000000..febcca445 --- /dev/null +++ b/trunk/eo/tutorial/Lesson5/OneMaxLibEA.cpp @@ -0,0 +1,162 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +This is the template main file for compiling after creating a +library. +See make_OneMax.cpp file. +*/ + +// Miscilaneous include and declaration +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoOneMax MUST derive from EO for some fitness + */ +#include "eoOneMax.h" + +/** definition of initilizqtion: + * class eoOneMaxInit MUST derive from eoInit + */ +#include "eoOneMaxInit.h" + +/** definition of evaluation: + * class eoOneMaxEvalFunc MUST derive from eoEvalFunc + * and should test for validity before doing any computation + * see tutorial/Templates/evalFunc.tmpl + */ +#include "eoOneMaxEvalFunc.h" + +// GENOTYPE eoOneMax ***MUST*** be templatized over the fitness + +// +// START fitness type: double or eoMaximizingFitness if you are maximizing +// eoMinimizingFitness if you are minimizing +typedef eoMinimizingFitness MyFitT ; // type of fitness +// END fitness type +// + +// Then define your EO objects using that fitness type +typedef eoOneMax Indi; // ***MUST*** derive from EO + +// create an initializer - done here and NOT in make_OneMax.cpp +// because it is NOT representation independent +#include "make_genotype_OneMax.h" +eoInit & make_genotype(eoParser& _parser, eoState&_state, Indi _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + +// same thing for the variation operaotrs +#include "make_op_OneMax.h" +eoGenOp& make_op(eoParser& _parser, eoState& _state, eoInit& _init) +{ + return do_make_op(_parser, _state, _init); +} + +// The representation independent routines are simply declared here + +// how to initialize the population +// it IS representation independent if an eoInit is given +eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init); + +// the stopping criterion +eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval); + +// outputs (stats, population dumps, ...) +eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue); + +// evolution engine (selection and replacement) +eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op); + +// simple call to the algo. stays there for consistency reasons +// no template for that one +void run_ea(eoAlgo& _ga, eoPop& _pop); + +// checks for help demand, and writes the status file +// and make_help; in libutils - just a declaration, code in libeoutils.a +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +// from here on, no difference with eoOneMax.cpp +int main(int argc, char* argv[]) +{ + + try + { + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + // The fitness + ////////////// + eoOneMaxEvalFunc plainEval/* (varType _anyVariable) */; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + // the genotype - through a genotype initializer + eoInit& init = make_genotype(parser, state, Indi()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + + + //// Now the representation-independent things + // + // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT + // unless you want to add specific statistics to the checkpoint + ////////////////////////////////////////////// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorithm + + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + } + catch(exception& e) + { + cout << e.what() << endl; + } + return 0; +} diff --git a/trunk/eo/tutorial/Lesson5/eoOneMax.h b/trunk/eo/tutorial/Lesson5/eoOneMax.h new file mode 100644 index 000000000..e78b90505 --- /dev/null +++ b/trunk/eo/tutorial/Lesson5/eoOneMax.h @@ -0,0 +1,110 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ +*/ + +#ifndef _eoOneMax_h +#define _eoOneMax_h + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + + * Note that you MUST derive your structure from EO + * but you MAY use some other already prepared class in the hierarchy + * like eoVector for instance, if you handle a vector of something.... + + * If you create a structure from scratch, + * the only thing you need to provide are + * a default constructor + * IO routines printOn and readFrom + * + * Note that operator<< and operator>> are defined at EO level + * using these routines + */ +template< class FitT> +class eoOneMax: public EO { +public: + /** Ctor: you MUST provide a default ctor. + * though such individuals will generally be processed + * by some eoInit object + */ + eoOneMax() + { + // START Code of default Ctor of an eoOneMax object + // END Code of default Ctor of an eoOneMax object + } + + virtual ~eoOneMax() + { + // START Code of Destructor of an eoEASEAGenome object + // END Code of Destructor of an eoEASEAGenome object + } + + virtual string className() const { return "eoOneMax"; } + + /** printing... */ + void printOn(ostream& _os) const + { + // First write the fitness + EO::printOn(_os); + _os << ' '; + // START Code of default output + + /** HINTS + * in EO we systematically write the sizes of things before the things + * so readFrom is easier to code (see below) + */ + _os << b.size() << ' ' ; + for (unsigned i=0; i::readFrom(_is); + // START Code of input + + /** HINTS + * remember the eoOneMax object will come from the default ctor + * this is why having the sizes written out is useful + */ + unsigned s; + _is >> s; + b.resize(s); + for (unsigned i=0; i> bTmp; + b[i] = bTmp; + } + // END Code of input + } + + // accessing and setting values + void setB(vector & _b) + { + b=_b; + } + const vector & B() + { + return b; + } + +private: // put all data here + // START Private data of an eoOneMax object + std::vector b; + // END Private data of an eoOneMax object +}; + +#endif diff --git a/trunk/eo/tutorial/Lesson5/eoOneMaxEvalFunc.h b/trunk/eo/tutorial/Lesson5/eoOneMaxEvalFunc.h new file mode 100644 index 000000000..e9c31d793 --- /dev/null +++ b/trunk/eo/tutorial/Lesson5/eoOneMaxEvalFunc.h @@ -0,0 +1,68 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for evaluator in EO, a functor that computes the fitness of an EO +========================================================================== +*/ + +#ifndef _eoOneMaxEvalFunc_h +#define _eoOneMaxEvalFunc_h + +// include whatever general include you need +#include +#include + +// include the base definition of eoEvalFunc +#include "eoEvalFunc.h" + +/** + Always write a comment in this format before class definition + if you want the class to be documented by Doxygen +*/ +template +class eoOneMaxEvalFunc : public eoEvalFunc +{ +public: + /// Ctor - no requirement +// START eventually add or modify the anyVariable argument + eoOneMaxEvalFunc() + // eoOneMaxEvalFunc( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoOneMaxEvalFunc object + // END Code of Ctor of an eoOneMaxEvalFunc object + } + + /** Actually compute the fitness + * + * @param EOT & _eo the EO object to evaluate + * it should stay templatized to be usable + * with any fitness type + */ + void operator()(EOT & _eo) + { + // test for invalid to avoid recomputing fitness of unmodified individuals + if (_eo.invalid()) + { + double fit; // to hold fitness value + // START Code of computation of fitness of the eoOneMax object + const vector & b = _eo.B(); + fit = 0; + for (unsigned i=0; i + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * There is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO (e.g. to initialize + * atoms of an eoVector you will need an eoInit) + */ +template +class eoOneMaxInit: public eoInit { +public: + /// Ctor - no requirement +// START eventually add or modify the anyVariable argument +// eoOneMaxInit() + eoOneMaxInit( unsigned _vecSize) : vecSize(_vecSize) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoOneMaxInit object + // END Code of Ctor of an eoOneMaxInit object + } + + + /** initialize a genotype + * + * @param _genotype generally a genotype that has been default-constructed + * whatever it contains will be lost + */ + void operator()(GenotypeT & _genotype) + { + // START Code of random initialization of an eoOneMax object + vector b(vecSize); + for (unsigned i=0; i + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * THere is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO + */ +template +class eoOneMaxMutation: public eoMonOp +{ +public: + /** + * Ctor - no requirement + */ + // START eventually add or modify the anyVariable argument + eoOneMaxMutation() + // eoOneMaxMutation( varType _anyVariable) : anyVariable(_anyVariable) + // END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoOneMaxEvalFunc object + // END Code of Ctor of an eoOneMaxEvalFunc object + } + + /// The class name. Used to display statistics + string className() const { return "eoOneMaxMutation"; } + + /** + * modifies the parent + * @param _genotype The parent genotype (will be modified) + */ + bool operator()(GenotypeT & _genotype) + { + bool isModified(true); + // START code for mutation of the _genotype object + + /** Requirement + * if (_genotype has been modified) + * isModified = true; + * else + * isModified = false; + */ + return isModified; + // END code for mutation of the _genotype object + } + +private: +// START Private data of an eoOneMaxMutation object + // varType anyVariable; // for example ... +// END Private data of an eoOneMaxMutation object +}; + +#endif diff --git a/trunk/eo/tutorial/Lesson5/eoOneMaxQuadCrossover.h b/trunk/eo/tutorial/Lesson5/eoOneMaxQuadCrossover.h new file mode 100644 index 000000000..b10942157 --- /dev/null +++ b/trunk/eo/tutorial/Lesson5/eoOneMaxQuadCrossover.h @@ -0,0 +1,70 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors +*/ + +/* +Template for simple quadratic crossover operators +================================================= + +Quadratic crossover operators modify the both genotypes +*/ + +#ifndef eoOneMaxQuadCrossover_H +#define eoOneMaxQuadCrossover_H + +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * THere is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO + */ +template +class eoOneMaxQuadCrossover: public eoQuadOp +{ +public: + /** + * Ctor - no requirement + */ +// START eventually add or modify the anyVariable argument + eoOneMaxQuadCrossover() + // eoOneMaxQuadCrossover( varType _anyVariable) : anyVariable(_anyVariable) + // END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoOneMaxEvalFunc object + // END Code of Ctor of an eoOneMaxEvalFunc object + } + + /// The class name. Used to display statistics + string className() const { return "eoOneMaxQuadCrossover"; } + + /** + * eoQuad crossover - modifies both parents + * @param _genotype1 The first parent + * @param _genotype2 The second parent + */ + bool operator()(GenotypeT& _genotype1, GenotypeT & _genotype2) + { + bool oneAtLeastIsModified(true); + // START code for crossover of _genotype1 and _genotype2 objects + + /** Requirement + * if (at least one genotype has been modified) // no way to distinguish + * oneAtLeastIsModified = true; + * else + * oneAtLeastIsModified = false; + */ + return oneAtLeastIsModified; + // END code for crossover of _genotype1 and _genotype2 objects + } + +private: +// START Private data of an eoOneMaxQuadCrossover object + // varType anyVariable; // for example ... +// END Private data of an eoOneMaxQuadCrossover object +}; + +#endif diff --git a/trunk/eo/tutorial/Lesson5/make_OneMax.cpp b/trunk/eo/tutorial/Lesson5/make_OneMax.cpp new file mode 100644 index 000000000..7c2c05ee6 --- /dev/null +++ b/trunk/eo/tutorial/Lesson5/make_OneMax.cpp @@ -0,0 +1,128 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +This is the template file that llows separate compilation of +everything that is representation independant (evolution engine and +general output) for an Evolutionary Algorithm with scalar fitness. + +It includes of course the definition of the genotype (eoOneMax.h) and +is written like the make_xxx.cpp files in dirs src/ga (for bitstrings) +and src/es (for real vectors). + +*/ + +// Miscilaneous include and declaration +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoOneMax MUST derive from EO for some fitness + */ +#include "eoOneMax.h" + +// create an initializer: this is NOT representation-independent +// and will be done in the main file +// However, should you decide to freeze that part, you could use the +// following (and remove it from the main file, of course!!!) +//------------------------------------------------------------------ +// #include "make_genotype_OneMax.h" +// eoInit> & make_genotype(eoParser& _parser, eoState&_state, eoOneMax _eo) +// { +// return do_make_genotype(_parser, _state, _eo); +// } + +// eoInit> & make_genotype(eoParser& _parser, eoState&_state, eoOneMax _eo) +// { +// return do_make_genotype(_parser, _state, _eo); +// } + +// same thing for the variation operaotrs +//--------------------------------------- +// #include "make_op_OneMax.h" +// eoGenOp>& make_op(eoParser& _parser, eoState& _state, eoInit>& _init) +// { +// return do_make_op(_parser, _state, _init); +// } + +// eoGenOp>& make_op(eoParser& _parser, eoState& _state, eoInit>& _init) +// { +// return do_make_op(_parser, _state, _init); +// } + +// The following modules use ***representation independent*** routines + +// how to initialize the population +// it IS representation independent if an eoInit is given +#include +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +// the stopping criterion +#include +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +// outputs (stats, population dumps, ...) +#include +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +// evolution engine (selection and replacement) +#include +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +// simple call to the algo. stays there for consistency reasons +// no template for that one +#include +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} diff --git a/trunk/eo/tutorial/Lesson5/make_genotype_OneMax.h b/trunk/eo/tutorial/Lesson5/make_genotype_OneMax.h new file mode 100644 index 000000000..ebbdd306e --- /dev/null +++ b/trunk/eo/tutorial/Lesson5/make_genotype_OneMax.h @@ -0,0 +1,75 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_genotype.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_genotype_h +#define _make_genotype_h + +#include +#include + // also need the parser and param includes +#include +#include + + +/* + * This fuction does the create an eoInit + * + * It could be here tempatized only on the fitness, as it can be used + * to evolve structures with any fitness. + * However, for consistency reasons, it was finally chosen, as in + * the rest of EO, to templatize by the full EOT, as this eventually + * allows to choose the type of genotype at run time (see in es dir) + * + * It returns an eoInit that can later be used to initialize + * the population (see make_pop.h). + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is to disambiguate the call upon different instanciations. + * + * WARNING: that last argument will generally be the result of calling + * the default ctor of EOT, resulting in most cases in an EOT + * that is ***not properly initialized*** +*/ + +template +eoInit & do_make_genotype(eoParameterLoader& _parser, eoState& _state, EOT) +{ + // read any useful parameter here from the parser + // the param itself will belong to the parser (as far as memory is concerned) + + // paramType & param = _parser.createParam(deafultValue, "Keyword", "Comment to appear in help and status", 'c',"Section of status file").value(); + + unsigned vecSize = _parser.createParam(unsigned(8), "VecSize", "Size of the bitstrings", 'v',"Representation").value(); + + // Then built the initializer - a pointer, stored in the eoState + eoInit* init = new eoOneMaxInit(vecSize); + // store in state + _state.storeFunctor(init); + // and return a reference + return *init; +} + +#endif diff --git a/trunk/eo/tutorial/Lesson5/make_op_OneMax.h b/trunk/eo/tutorial/Lesson5/make_op_OneMax.h new file mode 100644 index 000000000..e157720fa --- /dev/null +++ b/trunk/eo/tutorial/Lesson5/make_op_OneMax.h @@ -0,0 +1,210 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op_OneMax.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_op_OneMax_h +#define _make_op_OneMax_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +/** definition of mutation: + * class eoOneMaxMonop MUST derive from eoMonOp + */ +#include "eoOneMaxMutation.h" + +/** definition of crossover (either as eoBinOp (2->1) or eoQuadOp (2->2): + * class eoOneMaxBinCrossover MUST derive from eoBinOp + * OR + * class eoOneMaxQuadCrossover MUST derive from eoQuadOp + */ +// #include "eoOneMaxBinOp.h" +// OR +#include "eoOneMaxQuadCrossover.h" + + // also need the parser and state includes +#include +#include + + +/////////////////// variation operators /////////////// +// canonical (crossover + mutation) only at the moment // + +/* + * This function builds the operators that will be applied to the eoOneMax + * + * It uses a parser (to get user parameters), a state (to store the memory) + * the last parameter is an eoInit: if some operator needs some info + * about the genotypes, the init has it all (e.g. bounds, ...) + * Simply do + * EOT myEO; + * _init(myEO); + * and myEO is then an ACTUAL object + * + * As usual, the template is the complete EOT even though only the fitness + * is actually templatized here: the following only applies to eoOneMax +*/ + +template +eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& _init) +{ + // this is a temporary version, while Maarten codes the full tree-structured + // general operator input + // BTW we must leave that simple version available somehow, as it is the one + // that 90% people use! + + + ///////////////////////////// + // Variation operators + //////////////////////////// + // read crossover and mutations, combine each in a proportional Op + // and create the eoGenOp that calls crossover at rate pCross + // then mutation with rate pMut + + // the crossovers + ///////////////// + + // here we can have eoQuadOp (2->2) only - no time for the eoBinOp case + + // you can have more than one - combined in a proportional way + + // first, define the crossover objects and read their rates from the parser + + // A first crossover + eoQuadOp *cross = new eoOneMaxQuadCrossover /* (varType _anyVariable) */; + // store in the state + _state.storeFunctor(cross); + + // read its relative rate in the combination + double cross1Rate = _parser.createParam(1.0, "cross1Rate", "Relative rate for crossover 1", '1', "Variation Operators").value(); + + // and create the combined operator with this one + eoPropCombinedQuadOp *propXover = + new eoPropCombinedQuadOp(*cross, cross1Rate); + // and of course stor it in the state + _state.storeFunctor(propXover); + + + // Optional: A second(and third, and ...) crossover + // of course you must create the corresponding classes + // and all ***MUST*** derive from eoQuadOp + + /* Uncomment if necessary - and replicate as many time as you need + cross = new eoOneMaxSecondCrossover(varType _anyVariable); + _state.storeFunctor(cross); + double cross2Rate = _parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value(); + propXover.add(*cross, cross2Rate); + */ + // if you want some gentle output, the last one shoudl be like + // propXover.add(*cross, crossXXXRate, true); + + + // the mutation: same story + //////////////// + // you can have more than one - combined in a proportional way + + // for each mutation, + // - define the mutator object + // - read its rate from the parser + // - add it to the proportional combination + + // a first mutation + eoMonOp *mut = new eoOneMaxMutation/* (varType _anyVariable) */; + _state.storeFunctor(mut); + // its relative rate in the combination + double mut1Rate = _parser.createParam(1.0, "mut1Rate", "Relative rate for mutation 1", '1', "Variation Operators").value(); + // and the creation of the combined operator with this one + eoPropCombinedMonOp *propMutation = new eoPropCombinedMonOp(*mut, mut1Rate); + _state.storeFunctor(propMutation); + + // Optional: A second(and third, and ...) mutation with their rates + // of course you must create the corresponding classes + // and all ***MUST*** derive from eoMonOp + + /* Uncomment if necessary - and replicate as many time as you need + mut = new eoOneMaxSecondMutation(varType _anyVariable); + _state.storeFunctor(mut); + double mut2Rate = _parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); + propMutation.add(*mut, mut2Rate); + */ + // if you want some gentle output, the last one shoudl be like + // propMutation.add(*mut, mutXXXRate, true); + + // end of crossover and mutation definitions + //////////////////////////////////////////// + +// END Modify definitions of objects by eventually add parameters +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + +// from now on, you do not need to modify anything +// though you CAN add things to the checkpointing (see tutorial) + + // now build the eoGenOp: + // to simulate SGA (crossover with proba pCross + mutation with proba pMut + // we must construct + // a sequential combination of + // with proba 1, a proportional combination of + // a QuadCopy and our crossover + // with proba pMut, our mutation + + // but of course you're free to use any smart combination you could think of + // especially, if you have to use eoBinOp rather than eoQuad Op youùll have + // to modify that part + + // First read the individual level parameters + eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw runtime_error("Invalid pCross"); + + eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw runtime_error("Invalid pMut"); + + + // the crossover - with probability pCross + eoProportionalOp * propOp = new eoProportionalOp ; + _state.storeFunctor(propOp); + eoQuadOp *ptQuad = new eoQuadCloneOp; + _state.storeFunctor(ptQuad); + propOp->add(*propXover, pCrossParam.value()); // crossover, with proba pcross + propOp->add(*ptQuad, 1-pCrossParam.value()); // nothing, with proba 1-pcross + + // now the sequential + eoSequentialOp *op = new eoSequentialOp; + _state.storeFunctor(op); + op->add(*propOp, 1.0); // always do combined crossover + op->add(*propMutation, pMutParam.value()); // then mutation, with proba pmut + + // that's it - return a reference + return *op; +} +#endif diff --git a/trunk/eo/tutorial/Lesson6/BinaryPSO.cpp b/trunk/eo/tutorial/Lesson6/BinaryPSO.cpp new file mode 100644 index 000000000..2e670f536 --- /dev/null +++ b/trunk/eo/tutorial/Lesson6/BinaryPSO.cpp @@ -0,0 +1,182 @@ +//----------------------------------------------------------------------------- +// BinaryPSO.cpp +//----------------------------------------------------------------------------- +//* +// An instance of a VERY simple Real-coded binary Particle Swarm Optimization Algorithm +// +//----------------------------------------------------------------------------- +#include +#include +#include + +#include + +// Use functions from namespace std +using namespace std; + +//----------------------------------------------------------------------------- +typedef eoMinimizingFitness FitT; +typedef eoBitParticle < FitT > Particle; +//----------------------------------------------------------------------------- + + +// EVALFUNC +//----------------------------------------------------------------------------- +// Just a simple function that takes binary value of a chromosome and sets +// the fitness +double binary_value (const Particle & _particle) +{ + double sum = 0; + for (unsigned i = 0; i < _particle.size(); i++) + sum +=_particle[i]; + return (sum); +} + + + +void main_function(int argc, char **argv) +{ +// PARAMETRES + // all parameters are hard-coded! + const unsigned int SEED = 42; // seed for random number generator + + const unsigned int MAX_GEN=500; + const unsigned int VEC_SIZE = 10; + const unsigned int POP_SIZE = 20; + const unsigned int NEIGHBORHOOD_SIZE= 3; + + const double VELOCITY_INIT_MIN= -1; + const double VELOCITY_INIT_MAX= 1; + + const double VELOCITY_MIN= -1.5; + const double VELOCITY_MAX= 1.5; + + const double INERTIA= 1; + const double LEARNING_FACTOR1= 1.7; + const double LEARNING_FACTOR2= 2.3; + + +////////////////////////// +// RANDOM SEED +////////////////////////// + //reproducible random seed: if you don't change SEED above, + // you'll aways get the same result, NOT a random run + rng.reseed(SEED); + + +/// SWARM + // population <=> swarm + eoPop pop; + +/// EVALUATION + // Evaluation: from a plain C++ fn to an EvalFunc Object + eoEvalFuncPtr eval( binary_value ); + + +/////////////// +/// TOPOLOGY +////////////// + // ring topology + eoRingTopology topology(NEIGHBORHOOD_SIZE); + + +///////////////////// +// INITIALIZATION +//////////////////// + // position initialization + eoUniformGenerator uGen; + eoInitFixedLength < Particle > random (VEC_SIZE, uGen); + pop.append (POP_SIZE, random); + + // velocities initialization component + eoUniformGenerator < double >sGen (VELOCITY_INIT_MIN, VELOCITY_INIT_MAX); + eoVelocityInitFixedLength < Particle > veloRandom (VEC_SIZE, sGen); + + // first best position initialization component + eoFirstIsBestInit < Particle > localInit; + + // Create an eoInitialier that: + // - performs a first evaluation of the particles + // - initializes the velocities + // - the first best positions of each particle + // - setups the topology + eoInitializer fullInit(eval,veloRandom,localInit,topology,pop); + + // Full initialization here to be able to print the initial population + // Else: give the "init" component in the eoEasyPSO constructor + fullInit(); + +///////////// +// OUTPUT +//////////// +// sort pop before printing it! + pop.sort(); + + // Print (sorted) the initial population (raw printout) + cout << "INITIAL POPULATION:" << endl; + for (unsigned i = 0; i < pop.size(); ++i) + cout << "\t best fit=" << pop[i] << endl; + + +/////////////// +/// VELOCITY +////////////// + // Create the bounds for the velocity not go to far away + eoRealVectorBounds bnds(VEC_SIZE,VELOCITY_MIN,VELOCITY_MAX); + + // the velocity itself that needs the topology and a few constants + eoStandardVelocity velocity (topology,INERTIA,LEARNING_FACTOR1,LEARNING_FACTOR2,bnds); + + +/////////////// +/// FLIGHT +////////////// + // Binary flight based on sigmoid function + eoSigBinaryFlight flight; + + +//////////////////////// +/// STOPPING CRITERIA +/////////////////////// + // the algo will run for MAX_GEN iterations + eoGenContinue genCont (MAX_GEN); + + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + // standard PSO requires + // stopping criteria, evaluation,velocity, flight + + eoEasyPSO pso(genCont, eval, velocity, flight); + + // Apply the algo to the swarm - that's it! + pso(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL POPULATION:" << endl; + for (unsigned i = 0; i < pop.size(); ++i) + cout << "\t best fit=" << pop[i] << endl; + +} + + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} +//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/CMakeLists.txt b/trunk/eo/tutorial/Lesson6/CMakeLists.txt similarity index 54% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/CMakeLists.txt rename to trunk/eo/tutorial/Lesson6/CMakeLists.txt index afa830922..b29e76fac 100644 --- a/trunk/paradiseo-moeo/tutorial/examples/flowshop/CMakeLists.txt +++ b/trunk/eo/tutorial/Lesson6/CMakeLists.txt @@ -2,54 +2,50 @@ ### 1) Include the sources ###################################################################################### -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${ParadisEO-MOEO_SOURCE_DIR}/src) -INCLUDE_DIRECTORIES(${FLOWSHOP_SRC_DIR}) - -###################################################################################### - +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) ###################################################################################### ### 2) Specify where CMake can find the libraries ###################################################################################### -LINK_DIRECTORIES(${EO_BIN_DIR}/lib) +IF(NOT WIN32 OR CYGWIN) + LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) +ENDIF(NOT WIN32 OR CYGWIN) + +# especially for Visual Studio +IF(WIN32 AND NOT CYGWIN) + LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) +ENDIF(WIN32 AND NOT CYGWIN) ###################################################################################### - - -###################################################################################### -### 3) Define your target(s): just the flowshop lib here +### 3) Define your targets ###################################################################################### -SET(FLOWSHOP_LIB_OUTPUT_PATH ${FLOWSHOP_BINARY_DIR}/lib) -SET(LIBRARY_OUTPUT_PATH ${FLOWSHOP_LIB_OUTPUT_PATH}) - -SET (FLOWSHOP_SOURCES FlowShopBenchmarkParser.cpp - FlowShopEval.cpp - FlowShopObjectiveVectorTraits.cpp - FlowShopOpCrossoverQuad.cpp - FlowShop.cpp) - -ADD_LIBRARY(flowshop STATIC ${FLOWSHOP_SOURCES}) -ADD_DEPENDENCIES(flowshop moeo) -###################################################################################### - - +ADD_EXECUTABLE(BinaryPSO BinaryPSO.cpp) +ADD_EXECUTABLE(RealPSO RealPSO.cpp) ###################################################################################### -### 4) Optionnal: define your target(s)'s version: no effect for windows +### 4) Optionnal ###################################################################################### -SET(FLOWSHOP_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(flowshop PROPERTIES VERSION "${FLOWSHOP_VERSION}") -###################################################################################### +SET(BINARYPSO_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(BinaryPSO PROPERTIES VERSION "${BINARYPSO_VERSION}") +SET(REALPSO_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(RealPSO PROPERTIES VERSION "${REALPSO_VERSION}") ###################################################################################### -### 5) Link the librairies for your target(s) +### 5) Link the librairies for the targets ###################################################################################### -TARGET_LINK_LIBRARIES(flowshop eo) +TARGET_LINK_LIBRARIES(BinaryPSO eo eoutils) +TARGET_LINK_LIBRARIES(RealPSO eo eoutils) + +###################################################################################### +### 6) Configure project installation paths +###################################################################################### + +INSTALL(TARGETS BinaryPSO RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson6 COMPONENT examples) +INSTALL(TARGETS RealPSO RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson6 COMPONENT examples) ###################################################################################### diff --git a/trunk/eo/tutorial/Lesson6/Makefile.simple b/trunk/eo/tutorial/Lesson6/Makefile.simple new file mode 100644 index 000000000..5cdc5a466 --- /dev/null +++ b/trunk/eo/tutorial/Lesson6/Makefile.simple @@ -0,0 +1,31 @@ +### This Makefile is part of the tutorial of the EO library +# Unlike other Makefiles in EO, it is not using the automake/autoconf +# so that it stays easy to understant (you are in the tutorial, remember!) +# MS, Oct. 2002 + +# if you use this Makefile as a starting point for another application +# you might need to modify the following +DIR_EO = ../../src + +.SUFFIXES: .cpp + +# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++ +# However, if you are using this Makefile within xemacs, +# and have problems with the interpretation of the output (and its colors) +# then you should use c++ instead (make CXX=c++ will do) + +.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp +#$(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a + +.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp + +PSO = BinaryPSO RealPSO + +ALL = $(PSO) + +lesson6 : $(PSO) + +all : $(ALL) + +clean : + @/bin/rm $(ALL) *.o *.sav *.xg *.status *~ diff --git a/trunk/eo/tutorial/Lesson6/RealPSO.cpp b/trunk/eo/tutorial/Lesson6/RealPSO.cpp new file mode 100644 index 000000000..23f67100f --- /dev/null +++ b/trunk/eo/tutorial/Lesson6/RealPSO.cpp @@ -0,0 +1,183 @@ +//----------------------------------------------------------------------------- +// RealPSO.cpp +//----------------------------------------------------------------------------- +//* +// An instance of a VERY simple Real-coded Particle Swarm Optimization Algorithm +// +//----------------------------------------------------------------------------- +#include +#include +#include + +#include + +// Use functions from namespace std +using namespace std; + +//----------------------------------------------------------------------------- +typedef eoMinimizingFitness FitT; +typedef eoRealParticle < FitT > Particle; +//----------------------------------------------------------------------------- + + +// EVALFUNC +//----------------------------------------------------------------------------- +// a simple fitness function that computes the euclidian norm of a real vector +FitT real_value (const Particle & _particle) +{ + double sum = 0; + for (unsigned i = 0; i < _particle.size(); i++) + sum += pow(_particle[i],2); + return (sqrt(sum)); +} + + + +void main_function(int argc, char **argv) +{ +// PARAMETRES + // all parameters are hard-coded! + const unsigned int SEED = 42; // seed for random number generator + + const unsigned int MAX_GEN=100; + const unsigned int VEC_SIZE = 2; + const unsigned int POP_SIZE = 20; + const unsigned int NEIGHBORHOOD_SIZE= 5; + + const double POS_INIT_MIN= -2; + const double POS_INIT_MAX= 2; + + const double VELOCITY_INIT_MIN= -1; + const double VELOCITY_INIT_MAX= 1; + + const double VELOCITY_MIN= -1.5; + const double VELOCITY_MAX= 1.5; + + const double INERTIA= 1; + const double LEARNING_FACTOR1= 1.7; + const double LEARNING_FACTOR2= 2.3; + +////////////////////////// +// RANDOM SEED +////////////////////////// + //reproducible random seed: if you don't change SEED above, + // you'll aways get the same result, NOT a random run + rng.reseed(SEED); + + +/// SWARM + // population <=> swarm + eoPop pop; + +/// EVALUATION + // Evaluation: from a plain C++ fn to an EvalFunc Object + eoEvalFuncPtr eval( real_value ); + + +/////////////// +/// TOPOLOGY +////////////// + // linear topology + eoLinearTopology topology(NEIGHBORHOOD_SIZE); + + +///////////////////// +// INITIALIZATION +//////////////////// + // position initialization + eoUniformGenerator < double >uGen (POS_INIT_MIN, POS_INIT_MAX); + eoInitFixedLength < Particle > random (VEC_SIZE, uGen); + pop.append (POP_SIZE, random); + + // velocities initialization component + eoUniformGenerator < double >sGen (VELOCITY_INIT_MIN, VELOCITY_INIT_MAX); + eoVelocityInitFixedLength < Particle > veloRandom (VEC_SIZE, sGen); + + // first best position initialization component + eoFirstIsBestInit < Particle > localInit; + + // Create an eoInitialier that: + // - performs a first evaluation of the particles + // - initializes the velocities + // - the first best positions of each particle + // - setups the topology + eoInitializer fullInit(eval,veloRandom,localInit,topology,pop); + + // Full initialization here to be able to print the initial population + // Else: give the "init" component in the eoEasyPSO constructor + fullInit(); + +///////////// +// OUTPUT +//////////// +// sort pop before printing it! + pop.sort(); + + // Print (sorted) the initial population (raw printout) + cout << "INITIAL POPULATION:" << endl; + for (unsigned i = 0; i < pop.size(); ++i) + cout << "\t best fit=" << pop[i] << endl; + + +/////////////// +/// VELOCITY +////////////// + // Create the bounds for the velocity not go to far away + eoRealVectorBounds bnds(VEC_SIZE,VELOCITY_MIN,VELOCITY_MAX); + + // the velocity itself that needs the topology and a few constants + eoStandardVelocity velocity (topology,INERTIA,LEARNING_FACTOR1,LEARNING_FACTOR2,bnds); + + +/////////////// +/// FLIGHT +////////////// + // flight + eoStandardFlight flight; + + +//////////////////////// +/// STOPPING CRITERIA +/////////////////////// + // the algo will run for MAX_GEN iterations + eoGenContinue genCont (MAX_GEN); + + +// GENERATION + ///////////////////////////////////////// + // the algorithm + //////////////////////////////////////// + // standard PSO requires + // stopping criteria, evaluation,velocity, flight + + eoEasyPSO pso(genCont, eval, velocity, flight); + + // Apply the algo to the swarm - that's it! + pso(pop); + +// OUTPUT + // Print (sorted) intial population + pop.sort(); + cout << "FINAL POPULATION:" << endl; + for (unsigned i = 0; i < pop.size(); ++i) + cout << "\t best fit=" << pop[i] << endl; + +} + + +// A main that catches the exceptions + +int main(int argc, char **argv) +{ + try + { + main_function(argc, argv); + } + catch(exception& e) + { + cout << "Exception: " << e.what() << '\n'; + } + + return 1; +} +//----------------------------------------------------------------------------- diff --git a/trunk/eo/tutorial/Makefile.simple b/trunk/eo/tutorial/Makefile.simple new file mode 100644 index 000000000..b82ca27fe --- /dev/null +++ b/trunk/eo/tutorial/Makefile.simple @@ -0,0 +1,32 @@ +SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 Lesson6 + +all: + for i in $(SUBDIRS); do cd $$i && $(MAKE) all; cd ..; done + +lesson1 : + cd Lesson1; make + +lesson2 : + cd Lesson2; make + +lesson3 : + cd Lesson3; make + +lesson4 : + cd Lesson4; make + +lesson5 : + cd Lesson5; make + +lesson6 : + cd Lesson6; make + +#empty dist and distdir to let top-level 'make' do its job +dist : + +distdir : + +check : + +clean: + for i in $(SUBDIRS); do cd $$i && $(MAKE) clean; cd ..; done diff --git a/trunk/eo/tutorial/README b/trunk/eo/tutorial/README new file mode 100644 index 000000000..e9d994100 --- /dev/null +++ b/trunk/eo/tutorial/README @@ -0,0 +1,12 @@ +Eo Tutorial - corresponding to EO version 0.9.1+ + +To start the tutorial, read index.html in your favorite browser. + +Many things are missing, including many solutions for the exercises, +the introduction to EC and most of the Component-based pages. +More important, all examples of this tutorial have only been tested +on a Linux computer, and the Makefile will not work with MS-Windows +systems. Any help is welcome! + +Be patient ... +evoMarc diff --git a/trunk/paradiseo-peo/src/rmc/mpi/CMakeLists.txt b/trunk/eo/tutorial/Templates/CMakeLists.txt.src-tmpl old mode 100644 new mode 100755 similarity index 55% rename from trunk/paradiseo-peo/src/rmc/mpi/CMakeLists.txt rename to trunk/eo/tutorial/Templates/CMakeLists.txt.src-tmpl index 5ced140fe..ee23cd0d4 --- a/trunk/paradiseo-peo/src/rmc/mpi/CMakeLists.txt +++ b/trunk/eo/tutorial/Templates/CMakeLists.txt.src-tmpl @@ -1,57 +1,45 @@ -SET(CMAKE_CXX_FLAGS_RELEASE "-O0 -g") - -###################################################################################### -### 0) Set the compiler -###################################################################################### - -SET (CMAKE_CXX_COMPILER mpicxx) - -###################################################################################### - - ###################################################################################### ### 1) Include the sources ###################################################################################### -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XML2_CFLAGS}") +INCLUDE_DIRECTORIES(${MyStruct_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/do) + +###################################################################################### + + + +###################################################################################### +### 2) Specify where CMake can find the libraries +###################################################################################### + +IF(NOT WIN32 OR CYGWIN) + LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) +ENDIF(NOT WIN32 OR CYGWIN) + +# especially for Visual Studio +IF(WIN32 AND NOT CYGWIN) + LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) +ENDIF(WIN32 AND NOT CYGWIN) + +###################################################################################### + + + +###################################################################################### +### 3) Define your targets +###################################################################################### + +ADD_EXECUTABLE(MyStructEA MyStructEA.cpp) ###################################################################################### ###################################################################################### -### 2) Define your target(s): just the rmc_mpi library here -###################################################################################### - -SET(RMC_MPI_LIB_OUTPUT_PATH ${ParadisEO-PEO_BINARY_DIR}/lib) -SET(LIBRARY_OUTPUT_PATH ${RMC_MPI_LIB_OUTPUT_PATH}) - -SET (RMC_MPI_SOURCES node.cpp - param.cpp - comm.cpp - cooperative.cpp - mess.cpp - rmc.cpp - scheduler.cpp - synchron.cpp - worker.cpp - send.cpp - recv.cpp - xml_parser.cpp - schema.cpp - runner.cpp - service.cpp) - -ADD_LIBRARY(rmc_mpi STATIC ${RMC_MPI_SOURCES}) -ADD_DEPENDENCIES(rmc_mpi peo) +### 4) Link the librairies for the targets ###################################################################################### +TARGET_LINK_LIBRARIES(MyStructEA eo eoutils ga es) ###################################################################################### -### 3) Optionnal: define your lib version: -###################################################################################### - -SET(RMC_MPI_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(rmc_mpi PROPERTIES VERSION "${RMC_MPI_VERSION}") -###################################################################################### - diff --git a/trunk/paradiseo-peo/peo-conf.cmake b/trunk/eo/tutorial/Templates/CMakeLists.txt.top-tmpl old mode 100644 new mode 100755 similarity index 61% rename from trunk/paradiseo-peo/peo-conf.cmake rename to trunk/eo/tutorial/Templates/CMakeLists.txt.top-tmpl index ba4c4c037..c653b6815 --- a/trunk/paradiseo-peo/peo-conf.cmake +++ b/trunk/eo/tutorial/Templates/CMakeLists.txt.top-tmpl @@ -1,24 +1,40 @@ - -###################################################################################### -###################################################################################### -### In this file, you can specify many CMake variables used to build paradisEO-PEO. -###################################################################################### -###################################################################################### - - -###################################################################################### -### 1) OPTIONNAL -###################################################################################### - -# SET (MYVAR MYVALUE) - -###################################################################################### - - -##################################################################################### -### 2) OPTIONNAL - Overwrite subdirs -###################################################################################### - -# SUBDIRS(doc tutorial) - -###################################################################################### +###################################################################################### +### 1) Main project config +###################################################################################### + +# set the project name +PROJECT(MyStructEA) + +# set a language for the entire project. +ENABLE_LANGUAGE(CXX) + +##################################################################################### + + +###################################################################################### +### 2) We need to know where EO is installed +###################################################################################### + +IF(NOT EO_SOURCE_DIR) + SET( EO_SOURCE_DIR + EO_SRC_DIR CACHE STRING + "EO source directory" + FORCE) +ENDIF(NOT EO_SOURCE_DIR) + +IF(NOT EO_BINARY_DIR) + SET( EO_BINARY_DIR + EO_BIN_DIR CACHE STRING + "EO binary directory" + FORCE) +ENDIF(NOT EO_BINARY_DIR) +###################################################################################### + + +###################################################################################### +### 3) Where must cmake go now ? +###################################################################################### + +SUBDIRS(src) + +###################################################################################### diff --git a/trunk/eo/tutorial/Templates/ChangeLog b/trunk/eo/tutorial/Templates/ChangeLog new file mode 100644 index 000000000..2ede582ea --- /dev/null +++ b/trunk/eo/tutorial/Templates/ChangeLog @@ -0,0 +1,48 @@ +2007-02-22 Jochen Küpper + + * mutation.tmpl, quadCrossover.tmpl, stat.tmpl: Initialize + formerly uninitialized variables. + + * README.tmpl: Hint to regular Templates/README for details. + + * README: Add documentation for adding new source-files. + + * Makefile.am.src-tmpl (noinst_HEADERS): Add + (MyStruct_SOURCES): Move header files from here to the new + noinst_HEADERS variable. + +2007-01-16 Jochen Küpper + + * README: Add instructions for bash. + +2007-01-14 Jochen Küpper + + * createEOproject.sh: Set TargetDir to /tmp/. This is a workaround + for automake finding the scripts of eo itself if we run it in a embedded + subdirectory. + (COPYING, INSTALL): create. + + * README: State more explicitly what a "complete installation" means. + Give build-instructions for moved directories. + +2006-12-16 Jochen Küpper + + * Makefile.am (EXTRA_DIST): Distribute exactly the necessary files + + * EO.tpl, MyStructEA.cpp, MyStructSEA.cpp, make_MyStruct.cpp: Use + correct names for includes. + + * README.manual: This is a copy of the old README. + + * README: Describe the new way and setup of creating a new EO project. + + * createEOproject.sh, Makefile.am.src-tmpl, Makefile.am.top-tmpl: + * configure.ac.tmpl: New files to create a standalone EO project from + templates. + + + * Local Variables: + * coding: iso-8859-1 + * mode: flyspell + * fill-column: 80 + * End: diff --git a/trunk/eo/tutorial/Templates/EO.tpl b/trunk/eo/tutorial/Templates/EO.tpl new file mode 100644 index 000000000..959ad56a8 --- /dev/null +++ b/trunk/eo/tutorial/Templates/EO.tpl @@ -0,0 +1,938 @@ +\TEMPLATE_START// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*- +// +// (The above line is useful in Emacs-like editors) +// +//************************************* +// +// EASEA.cpp +// +// C++ file generated by AESAE-EO v0.7 +// +//************************************* +// +// +// Main file for creating a new representation in EO +// ================================================= +// +// This main file includes all other files that have been generated by the +// script create.sh, so it is the only file to compile. +// +// In case you want to build up a separate library for your new Evolving Object, +// you'll need some work - follow what's done in the src/ga dir, used in the +// main file BitEA in tutorial/Lesson4 dir. +// Or you can wait until we do it :-) + +// Miscellany includes and declarations +#include +using namespace std; + +// eo general include +#include "eo" +// real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +unsigned *pCurrentGeneration; +unsigned *pEZ_NB_GEN; +double EZ_MUT_PROB, EZ_XOVER_PROB, EZ_REPL_PERC=0.0; +int EZ_NB_GEN, EZ_POP_SIZE; +unsigned long EZ_NB_EVALUATIONS=0L; + +inline int random(int b1=0, int b2=1){ + return rng.random(b2-b1)+b1; +} +inline double random(double b1=0, double b2=1){ + return rng.uniform(b2-b1)+b1; +} +inline float random(float b1=0, float b2=1){ + return rng.uniform(b2-b1)+b1; +} + +\ANALYSE_PARAMETERS +\INSERT_USER_DECLARATIONS +\INSERT_INITIALISATION_FUNCTION + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class EASEAGenome MUST derive from EO for some fitness + */ +#include "EASEAGenome.h" + +// GENOTYPE EASEAGenome ***MUST*** be templatized over the fitness + +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +// START fitness type: double or eoMaximizingFitness if you are maximizing +// eoMinimizingFitness if you are minimizing +typedef \MINIMAXI MyFitT ; // type of fitness +// END fitness type +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + +// Then define your EO objects using that fitness type +typedef EASEAGenome Indi; // ***MUST*** derive from EO + +\INSERT_USER_FUNCTIONS + +/** definition of evaluation: + * class EASEAEvalFunc MUST derive from eoEvalFunc + * and should test for validity before doing any computation + * see tutorial/Templates/evalFunc.tmpl + */ +#include "EASEAEvalFunc.h" + +/** definition of initialization: + * class EASEAGenomeInit MUST derive from eoInit + */ +#include "EASEAInit.h" + +/** include all files defining variation operator classes + */ +#include "EASEAMutation.h" +#include "EASEAQuadCrossover.h" + +// Use existing modules to define representation independent routines +// These are parser-based definitions of objects + +// how to initialize the population +// it IS representation independent if an eoInit is given +#include +eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init){ + return do_make_pop(_parser, _state, _init); +} + +// the stopping criterion +#include "make_continue.h" +eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval){ + return do_make_continue(_parser, _state, _eval); +} + +// outputs (stats, population dumps, ...) +#include +eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) { + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +// evolution engine (selection and replacement) +#include +eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op){ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +// simple call to the algo. stays there for consistency reasons +// no template for that one +#include +// the instanciating fitnesses +#include +void run_ea(eoAlgo& _ga, eoPop& _pop){ + do_run(_ga, _pop); +} + +// checks for help demand, and writes the status file +// and make_help; in libutils +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +int main(int argc, char* argv[]){ + +try { +\INSERT_INIT_FCT_CALL + + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + // The fitness + ////////////// + EASEAEvalFunc plainEval/* (varType _anyVariable) */; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + // a genotype initializer + EASEAInit init; + // or, if you need some parameters, you might as well + // - write a constructor of the eoMyStructInit that uses a parser + // - call it from here: + // eoEASEAInit init(parser); + + + // Build the variation operator (any seq/prop construct) + // here, a simple example with only 1 crossover (2->2, a QuadOp) and + // one mutation, is given. + // Hints to have choice among multiple crossovers and mutations are given + + // A (first) crossover (possibly use the parser in its Ctor) + EASEAQuadCrossover cross /* (eoParser parser) */; + + // IF MORE THAN ONE: + + // read its relative rate in the combination +// double cross1Rate = parser.createParam(1.0, "cross1Rate", "Relative rate for crossover 1", '1', "Variation Operators").value(); + + // create the combined operator with the first one (rename it cross1 !!!) +// eoPropCombinedQuadOp cross(cross1, cross1Rate); + + // and as many as you want the following way: + // 1- write the new class by mimicking eoEASEAQuadCrossover.h + // 2- include that file here together with eoEASEAQuadCrossover above + // 3- uncomment and duplicate the following lines: + // +// eoEASEASecondCrossover cross2(eoParser parser); +// double cross2Rate = parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value(); +// cross.add(cross2, cross2Rate); + + // NOTE: if you want some gentle output, the last one shoudl be like + // cross.add(cross, crossXXXRate, true); + + /////////////// Same thing for MUTATION + + // a (first) mutation (possibly use the parser in its Ctor) + EASEAMutation mut /* (eoParser parser) */; + + // IF MORE THAN ONE: + + // read its relative rate in the combination +// double mut1Rate = parser.createParam(1.0, "mut1Rate", "Relative rate for mutation 1", '1', "Variation Operators").value(); + + // create the combined operator with the first one (rename it cross1 !!!) +// eoPropCombinedMonOp mut(mut1, mut1Rate); + + // and as many as you want the following way: + // 1- write the new class by mimicking eoEASEAMutation.h + // 2- include that file here together with eoEASEAMutation above + // 3- uncomment and duplicate the following lines: + // +// eoEASEASecondMutation mut2(eoParser parser); +// double mut2Rate = parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); +// mut.add(mut2, mut2Rate); + + // NOTE: if you want some gentle output, the last one shoudl be like + // mut.add(mut, mutXXXRate, true); + + // now encapsulate your crossover(s) and mutation(s) into an eoGeneralOp + // so you can fully benefit of the existing evolution engines + + // First read the individual level parameters + double pCross = parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ).value(); + // minimum check + if ( (pCross < 0) || (pCross > 1) ) + throw runtime_error("Invalid pCross"); + + double pMut = parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ).value(); + // minimum check + if ( (pMut < 0) || (pMut > 1) ) + throw runtime_error("Invalid pMut"); + + // now create the generalOp + eoSGAGenOp op(cross, pCross, mut, pMut); + + + + //// Now the representation-independent things + // + // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT + // unless you want to add specific statistics to the checkpoint + ////////////////////////////////////////////// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + // give popSize to AESAE control + EZ_POP_SIZE = pop.size(); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorithm + + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out +// cout << "Initial Population\n"; +// pop.sortedPrintOn(cout); +// cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Best individual in final population\n"; + cout << pop.best_element() << endl; + + } + catch(exception& e) + { + cout << e.what() << endl; + } + return 0; +} + +\START_EO_GENOME_H_TPL// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*- +// +// (The above line is useful in Emacs-like editors) +// +//************************************* +// +// EASEAGenome.h +// +// C++ file generated by AESAE-EO v0.7 +// +//************************************* +// + +#ifndef _EASEAGenome_h +#define _EASEAGenome_h + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + + * Note that you MUST derive your structure from EO + * but you MAY use some other already prepared class in the hierarchy + * like eoVector for instance, if you handle a vector of something.... + + * If you create a structure from scratch, + * the only thing you need to provide are + * a default constructor + * IO routines printOn and readFrom + * + * Note that operator<< and operator>> are defined at EO level + * using these routines + */ +\ANALYSE_USER_CLASSES +\INSERT_USER_CLASSES + +template< class FitT> +class EASEAGenome: public EO { +public: + /** Ctor: you MUST provide a default ctor. + * though such individuals will generally be processed + * by some eoInit object + */ + EASEAGenome() : EO() + { + // START Code of default Ctor of an EASEAGenome object +\GENOME_CTOR + // END Code of default Ctor of an EASEAGenome object + } + + EASEAGenome(const EASEAGenome & arg) : EO() + { +\GENOME_CTOR + copy(arg); + } + + virtual ~EASEAGenome() + { + // START Code of Destructor of an EASEAGenome object + \GENOME_DTOR + // END Code of Destructor of an EASEAGenome object + } + + virtual string className() const { return "EASEAGenome"; } + + EASEAGenome& operator=(const EASEAGenome & arg) { + copy(arg); + return *this; + } + + void copy(const EASEAGenome& genome) + { + if(&genome != this){ + \GENOME_DTOR + \COPY_CTOR + if (genome.invalid()) { // copying an invalid genome + fitness(FitT()); // put a valid value (i.e. non NAN) + invalidate(); // but INVALIDATE the genome + } + else + fitness(genome.fitness()); + } + } + + bool operator==(const EASEAGenome & genome) const { + \EQUAL + return true; + } + + bool operator!=(const EASEAGenome & genome) const { + return !(*this==genome); + } + + /** printing... */ + void printOn(ostream& os) const + { + // First write the fitness + EO::printOn(os); + os << ' '; + // START Code of default output + + /** HINTS + * in EO we systematically write the sizes of things before the things + * so readFrom is easier to code (see below) + */ +\INSERT_DISPLAY +\WRITE + // END Code of default output + } + + /** reading... + * of course, your readFrom must be able to read what printOn writes!!! + */ + void readFrom(istream& is) + { + // of course you should read the fitness first! + EO::readFrom(is); + // START Code of input + + /** HINTS + * remember the EASEAGenome object will come from the default ctor + * this is why having the sizes written out is useful + */ +\READ + // END Code of input + } + + //private: // put all data here - no privacy in EASEA + // START Private data of an EASEAGenome object +\INSERT_GENOME + // END Private data of an EASEAGenome object +}; +#endif + +\START_EO_EVAL_TPL// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*- +// +// (The above line is useful in Emacs-like editors) +// +//************************************* +// +// EASEAEvalFunc.h +// +// C++ file generated by AESAE-EO v0.7 +// +//************************************* +// + +/* +Evaluator in EO: a functor that computes the fitness of an EO +============================================================= +*/ + +#ifndef _EASEAEvalFunc_h +#define _EASEAEvalFunc_h + +// include whatever general include you need +#include +#include + +// include the base definition of eoEvalFunc +#include "eoEvalFunc.h" + +/** + Always write a comment in this format before class definition + if you want the class to be documented by Doxygen +*/ +template +class EASEAEvalFunc : public eoEvalFunc +{ +public: + /// Ctor - no requirement +// START eventually add or modify the anyVariable argument + EASEAEvalFunc() + // EASEAEvalFunc( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an EASEAEvalFunc object + // END Code of Ctor of an EASEAEvalFunc object + } + + /** Actually compute the fitness + * + * @param EOT & _eo the EO object to evaluate + * it should stay templatized to be usable + * with any fitness type + */ + void operator()(EOT & genome) + { + // test for invalid to avoid recomputing fitness of unmodified individuals + if (genome.invalid()) + { + // START Code of computation of fitness of the EASEA object +\INSERT_EVALUATOR + // END Code of computation of fitness of the EASEA object + } + } + +private: +// START Private data of an EASEAEvalFunc object + // varType anyVariable; // for example ... +// END Private data of an EASEAEvalFunc object +}; + + +#endif + +\START_EO_INITER_TPL// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*- +// +// (The above line is useful in Emacs-like editors) +// +//************************************* +// +// EASEAInit.h +// +// C++ file generated by AESAE-EO v0.7 +// +//************************************* +// + +/* +objects initialization in EO +============================ +*/ + +#ifndef _EASEAInit_h +#define _EASEAInit_h + +// include the base definition of eoInit +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * There is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO (e.g. to initialize + * atoms of an eoVector you will need an eoInit) + */ +template +class EASEAInit: public eoInit { +public: + /// Ctor - no requirement +// START eventually add or modify the anyVariable argument + EASEAInit() + // EASEAInit( varType & _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an EASEAInit object + // END Code of Ctor of an EASEAInit object + } + + + /** initialize a genotype + * + * @param _genotype generally a genotype that has been default-constructed + * whatever it contains will be lost + */ + void operator()(GenotypeT & _genotype) + { + // START Code of random initialization of an EASEAGenome object +\INSERT_EO_INITIALISER + // END Code of random initialization of an EASEAGenome object + _genotype.invalidate(); // IMPORTANT in case the _genotype is old + } + +private: +// START Private data of an EASEAInit object + // varType & anyVariable; // for example ... +// END Private data of an EASEAInit object +}; + +#endif + + +\START_EO_MUT_TPL// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*- +// +// (The above line is useful in Emacs-like editors) +// +//************************************* +// +// EASEAMutation.h +// +// C++ file generated by AESAE-EO v0.7 +// +//************************************* +// + +/* +simple mutation operators +========================= +*/ + +#ifndef EASEAMutation_H +#define EASEAMutation_H + + +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * THere is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO + */ +template +class EASEAMutation: public eoMonOp +{ +public: + /** + * Ctor - no requirement + */ +// START eventually add or modify the anyVariable argument + EASEAMutation() + // EASEAMutation( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an EASEAMutation object + // END Code of Ctor of an EASEAMutation object + } + + /// The class name. Used to display statistics + string className() const { return "EASEAMutation"; } + + /** + * modifies the parent + * @param _genotype The parent genotype (will be modified) + */ + bool operator()(GenotypeT & _genotype) + { + // START code for mutation of the _genotype object +\INSERT_MUTATOR + // END code for mutation of the _genotype object + +private: +// START Private data of an EASEAMutation object + // varType anyVariable; // for example ... +// END Private data of an EASEAMutation object +}; + +#endif + +\START_EO_QUAD_XOVER_TPL// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*- +// +// (The above line is useful in Emacs-like editors) +// +//************************************* +// +// EASEAQuadCrossover.h +// +// C++ file generated by AESAE-EO v0.7 +// +//************************************* +// + +/* +Template for simple quadratic crossover operators +================================================= + +Quadratic crossover operators modify both genotypes +*/ + +#ifndef EASEAQuadCrossover_H +#define EASEAQuadCrossover_H + +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * THere is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO + */ +template +class EASEAQuadCrossover: public eoQuadOp +{ +public: + /** + * Ctor - no requirement + */ +// START eventually add or modify the anyVariable argument + EASEAQuadCrossover() + // EASEAQuadCrossover( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an EASEAQuadCrossover object + // END Code of Ctor of an EASEAQuadCrossover object + } + + /// The class name. Used to display statistics + string className() const { return "EASEAQuadCrossover"; } + + /** + * eoQuad crossover - modifies both genotypes + */ + bool operator()(GenotypeT& child1, GenotypeT & child2) + { + GenotypeT parent1(child1); + GenotypeT parent2(child2); + + // START code for crossover of child1 and child2 objects +\INSERT_CROSSOVER + return (parent1!=child1)||(parent2!=child2); + // END code for crossover of child1 and child2 objects + } + +private: +// START Private data of an EASEAQuadCrossover object + // varType anyVariable; // for example ... +// END Private data of an EASEAQuadCrossover object +}; + +#endif + +\START_EO_CONTINUE_TPL// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*- +// +// (The above line is useful in Emacs-like editors) +// +//************************************* +// +// EASEA_make_continue.h +// +// C++ file generated by AESAE-EO v0.7 +// +//************************************* +// + +#ifndef _make_continue_h +#define _make_continue_h + +/* +Contains the templatized version of parser-based choice of stopping criterion +It can then be instantiated, and compiled on its own for a given EOType +(see e.g. in dir ga, ga.cpp) +*/ + +// Continuators - all include eoContinue.h +#include +#include +#include +#include +#include +#ifndef _MSC_VER +#include // CtrlC handling (using 2 global variables!) +#endif + + // also need the parser and param includes +#include +#include + + +/////////////////// the stopping criterion //////////////// +template +eoCombinedContinue * make_combinedContinue(eoCombinedContinue *_combined, eoContinue *_cont) +{ + if (_combined) // already exists + _combined->add(*_cont); + else + _combined = new eoCombinedContinue(*_cont); + return _combined; +} + +template +eoContinue & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) +{ + //////////// Stopping criterion /////////////////// + // the combined continue - to be filled + eoCombinedContinue *continuator = NULL; + + // for each possible criterion, check if wanted, otherwise do nothing + + // First the eoGenContinue - need a default value so you can run blind + // but we also need to be able to avoid it <--> 0 + eoValueParam& maxGenParam = _parser.createParam(\NB_GEN, "maxGen", "Maximum number of generations () = none)",'G',"Stopping criterion"); + // and give control to EASEA + EZ_NB_GEN = maxGenParam.value(); + pEZ_NB_GEN = & maxGenParam.value(); + + // do not test for positivity in EASEA + // if (maxGenParam.value()) // positive: -> define and store + // { + eoGenContinue *genCont = new eoGenContinue(maxGenParam.value()); + _state.storeFunctor(genCont); + // and "add" to combined + continuator = make_combinedContinue(continuator, genCont); + // } + + // the steadyGen continue - only if user imput + eoValueParam& steadyGenParam = _parser.createParam(unsigned(100), "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); + eoValueParam& minGenParam = _parser.createParam(unsigned(0), "minGen", "Minimum number of generations",'g', "Stopping criterion"); + if (_parser.isItThere(steadyGenParam)) + { + eoSteadyFitContinue *steadyCont = new eoSteadyFitContinue + (minGenParam.value(), steadyGenParam.value()); + // store + _state.storeFunctor(steadyCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, steadyCont); + } + + // Same thing with Eval - but here default value is 0 + eoValueParam& maxEvalParam = _parser.createParam((unsigned long)0, "maxEval", "Maximum number of evaluations (0 = none)",'E',"Stopping criterion"); + + if (maxEvalParam.value()) // positive: -> define and store + { + eoEvalContinue *evalCont = new eoEvalContinue(_eval, maxEvalParam.value()); + _state.storeFunctor(evalCont); + // and "add" to combined + continuator = make_combinedContinue(continuator, evalCont); + } + /* + // the steadyEval continue - only if user imput + eoValueParam& steadyGenParam = _parser.createParam(unsigned(100), "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion"); + eoValueParam& minGenParam = _parser.createParam(unsigned(0), "minGen", "Minimum number of generations",'g', "Stopping criterion"); + if (_parser.isItThere(steadyGenParam)) + { + eoSteadyGenContinue *steadyCont = new eoSteadyFitContinue + (minGenParam.value(), steadyGenParam.value()); + // store + _state.storeFunctor(steadyCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, steadyCont); + } + */ + // the target fitness + eoFitContinue *fitCont; + eoValueParam& targetFitnessParam = _parser.createParam(double(0.0), "targetFitness", "Stop when fitness reaches",'T', "Stopping criterion"); + if (_parser.isItThere(targetFitnessParam)) + { + fitCont = new eoFitContinue + (targetFitnessParam.value()); + // store + _state.storeFunctor(fitCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, fitCont); + } + +#ifndef _MSC_VER + // the CtrlC interception (Linux only I'm afraid) + eoCtrlCContinue *ctrlCCont; + eoValueParam& ctrlCParam = _parser.createParam(false, "CtrlC", "Terminate current generation upon Ctrl C",'C', "Stopping criterion"); + if (_parser.isItThere(ctrlCParam)) + { + ctrlCCont = new eoCtrlCContinue; + // store + _state.storeFunctor(ctrlCCont); + // add to combinedContinue + continuator = make_combinedContinue(continuator, ctrlCCont); + } +#endif + + // now check that there is at least one! + if (!continuator) + throw runtime_error("You MUST provide a stopping criterion"); + // OK, it's there: store in the eoState + _state.storeFunctor(continuator); + + // and return + return *continuator; +} + +#endif + +\START_EO_PARAM_TPL#************************************* +# +# EASEA.prm +# +# Parameter file generated by AESAE-EO v0.7 +# +#************************************* +###### General ###### +# --help=0 # -h : Prints this message +# --stopOnUnknownParam=1 # Stop if unknown param entered +--seed=0 # -S : Random number seed + +###### Evolution Engine ###### +--popSize=\POP_SIZE # -P : Population Size +--selection=\SELECTOR\SELECT_PRM # -S : Selection: Roulette, Ranking(p,e), DetTour(T), StochTour(t) or Sequential(ordered/unordered) +--nbOffspring=\OFF_SIZE # -O : Nb of offspring (percentage or absolute) +--replacement=General # Type of replacement: Generational, ESComma, ESPlus, SSGA(T), EP(T) + +###### Evolution Engine / Replacement ###### +--elite=\ELITE_SIZE # Nb of elite parents (percentage or absolute) +--eliteType=\ELITISM # Strong (true) or weak (false) elitism (set elite to 0 for none) +--surviveParents=\SURV_PAR_SIZE # Nb of surviving parents (percentage or absolute) +--reduceParents=\RED_PAR\RED_PAR_PRM # Parents reducer: Deterministic, EP(T), DetTour(T), StochTour(t), Uniform +--surviveOffspring=\SURV_OFF_SIZE # Nb of surviving offspring (percentage or absolute) +--reduceOffspring=\RED_OFF\RED_OFF_PRM # Offspring reducer: Deterministic, EP(T), DetTour(T), StochTour(t), Uniform +--reduceFinal=\RED_FINAL\RED_FINAL_PRM # Final reducer: Deterministic, EP(T), DetTour(T), StochTour(t), Uniform + +###### Output ###### +# --useEval=1 # Use nb of eval. as counter (vs nb of gen.) +# --useTime=1 # Display time (s) every generation +# --printBestStat=1 # Print Best/avg/stdev every gen. +# --printPop=0 # Print sorted pop. every gen. + +###### Output - Disk ###### +# --resDir=Res # Directory to store DISK outputs +# --eraseDir=1 # erase files in dirName if any +# --fileBestStat=0 # Output bes/avg/std to file + +###### Output - Graphical ###### +# --plotBestStat=0 # Plot Best/avg Stat +# --plotHisto=0 # Plot histogram of fitnesses + +###### Persistence ###### +# --Load= # -L : A save file to restart from +# --recomputeFitness=0 # -r : Recompute the fitness after re-loading the pop.? +# --saveFrequency=0 # Save every F generation (0 = only final state, absent = never) +# --saveTimeInterval=0 # Save every T seconds (0 or absent = never) +# --status=OneMaxGenomeEA.status # Status file + +###### Stopping criterion ###### +# --maxGen=100 # -G : Maximum number of generations () = none) +# --steadyGen=100 # -s : Number of generations with no improvement +# --minGen=0 # -g : Minimum number of generations +# --maxEval=0 # -E : Maximum number of evaluations (0 = none) +# --targetFitness=0 # -T : Stop when fitness reaches +# --CtrlC=0 # -C : Terminate current generation upon Ctrl C + +###### Variation Operators ###### +# --cross1Rate=1 # -1 : Relative rate for crossover 1 +# --mut1Rate=1 # -1 : Relative rate for mutation 1 +--pCross=\XOVER_PROB # -C : Probability of Crossover +--pMut=\MUT_PROB # -M : Probability of Mutation + +\START_EO_MAKEFILE_TPL#************************************* +# +# EASEA.mak +# +# Makefile generated by AESAE-EO v0.7 +# +#************************************* + +# sample makefile for building an EA evolving a new genotype + +DIR_EO = \EO_DIR + +.cpp: ; c++ -DPACKAGE=\"eo\" -I. -I$(DIR_EO)/src -Wall -g -o $@ $*.cpp $(DIR_EO)/src/libeo.a $(DIR_EO)/src/utils/libeoutils.a + +.cpp.o: ; c++ -DPACKAGE=\"eo\" -I. -I\EO_DIR/src -Wall -g -c $*.cpp + +LIB_EO = $(DIR_EO)/src/utils/libeoutils.a $(DIR_EO)/src/libeo.a + +SOURCES = EASEA.cpp \ + EASEAEvalFunc.h \ + EASEAGenome.h \ + EASEAInit.h \ + EASEAMutation.h \ + EASEAQuadCrossover.h \ + $(LIB_EO) + +ALL = EASEA + +EASEA : $(SOURCES) + c++ -g -I. -I$(DIR_EO)/src -o $@ EASEA.cpp $(LIB_EO) -lm + +all : $(ALL) + +clean : ; /bin/rm *.o $(ALL) + +\TEMPLATE_END diff --git a/trunk/eo/tutorial/Templates/Makefile.am.src-tmpl b/trunk/eo/tutorial/Templates/Makefile.am.src-tmpl new file mode 100644 index 000000000..579f1895b --- /dev/null +++ b/trunk/eo/tutorial/Templates/Makefile.am.src-tmpl @@ -0,0 +1,16 @@ +bin_PROGRAMS = MyStruct + +noinst_HEADERS = eoMyStruct.h \ + eoMyStructEvalFunc.h \ + eoMyStructInit.h \ + eoMyStructMutation.h \ + eoMyStructQuadCrossover.h + +MyStruct_SOURCES = MyStructEA.cpp + + +dnl Local Variables: +dnl coding: iso-8859-1 +dnl mode: makefile-automake +dnl fill-column: 80 +dnl End: diff --git a/trunk/eo/tutorial/Templates/Makefile.am.top-tmpl b/trunk/eo/tutorial/Templates/Makefile.am.top-tmpl new file mode 100644 index 000000000..7a943fe13 --- /dev/null +++ b/trunk/eo/tutorial/Templates/Makefile.am.top-tmpl @@ -0,0 +1,8 @@ +SUBDIRS = src + + +dnl Local Variables: +dnl coding: iso-8859-1 +dnl mode: makefile-automake +dnl fill-column: 80 +dnl End: diff --git a/trunk/eo/tutorial/Templates/MyStructEA.cpp b/trunk/eo/tutorial/Templates/MyStructEA.cpp new file mode 100644 index 000000000..1478e3085 --- /dev/null +++ b/trunk/eo/tutorial/Templates/MyStructEA.cpp @@ -0,0 +1,188 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +This is the template main file. +It includes all other files that have been generated by the script create.sh +so it is the only file to compile. + +In case you want to build up a separate library for your new Evolving Object, +you'll need some work - follow what's done in the src/ga dir, used in the +main file BitEA in tutorial/Lesson4 dir. +Or you can wait until we do it :-) +*/ + +// Miscilaneous include and declaration +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoMyStruct MUST derive from EO for some fitness + */ +#include "eoMyStruct.h" + +/** definition of initilizqtion: + * class eoMyStructInit MUST derive from eoInit + */ +#include "eoMyStructInit.h" + +/** definition of evaluation: + * class eoMyStructEvalFunc MUST derive from eoEvalFunc + * and should test for validity before doing any computation + * see tutorial/Templates/evalFunc.tmpl + */ +#include "eoMyStructEvalFunc.h" + +// GENOTYPE eoMyStruct ***MUST*** be templatized over the fitness + +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +// START fitness type: double or eoMaximizingFitness if you are maximizing +// eoMinimizingFitness if you are minimizing +typedef eoMinimizingFitness MyFitT ; // type of fitness +// END fitness type +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + +// Then define your EO objects using that fitness type +typedef eoMyStruct Indi; // ***MUST*** derive from EO + +// create an initializer +#include "make_genotype_MyStruct.h" +eoInit & make_genotype(eoParser& _parser, eoState&_state, Indi _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + +// and the variation operaotrs +#include "make_op_MyStruct.h" +eoGenOp& make_op(eoParser& _parser, eoState& _state, eoInit& _init) +{ + return do_make_op(_parser, _state, _init); +} + +// Use existing modules to define representation independent routines +// These are parser-based definitions of objects + +// how to initialize the population +// it IS representation independent if an eoInit is given +#include +eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +// the stopping criterion +#include +eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +// outputs (stats, population dumps, ...) +#include +eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +// evolution engine (selection and replacement) +#include +eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +// simple call to the algo. stays there for consistency reasons +// no template for that one +#include +// the instanciating fitnesses +#include +void run_ea(eoAlgo& _ga, eoPop& _pop) +{ + do_run(_ga, _pop); +} + +// checks for help demand, and writes the status file +// and make_help; in libutils +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +int main(int argc, char* argv[]) +{ + + try + { + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + // The fitness + ////////////// + eoMyStructEvalFunc plainEval/* (varType _anyVariable) */; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + // the genotype - through a genotype initializer + eoInit& init = make_genotype(parser, state, Indi()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + + + //// Now the representation-independent things + // + // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT + // unless you want to add specific statistics to the checkpoint + ////////////////////////////////////////////// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorithm + + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out +// cout << "Initial Population\n"; +// pop.sortedPrintOn(cout); +// cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + } + catch(exception& e) + { + cout << e.what() << endl; + } + return 0; +} diff --git a/trunk/eo/tutorial/Templates/MyStructLibEA.cpp b/trunk/eo/tutorial/Templates/MyStructLibEA.cpp new file mode 100644 index 000000000..54e9f2ff9 --- /dev/null +++ b/trunk/eo/tutorial/Templates/MyStructLibEA.cpp @@ -0,0 +1,162 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +This is the template main file for compiling after creating a +"library", i.e. putting everything but the fitness in a separate file +(make_MyStruct.cpp) and compiling it once and for all. +*/ + +// Miscilaneous include and declaration +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoMyStruct MUST derive from EO for some fitness + */ +#include "eoMyStruct.h" + +/** definition of initilizqtion: + * class eoMyStructInit MUST derive from eoInit + */ +#include "eoMyStructInit.h" + +/** definition of evaluation: + * class eoMyStructEvalFunc MUST derive from eoEvalFunc + * and should test for validity before doing any computation + * see tutorial/Templates/evalFunc.tmpl + */ +#include "eoMyStructEvalFunc.h" + +// GENOTYPE eoMyStruct ***MUST*** be templatized over the fitness + +// +// START fitness type: double or eoMaximizingFitness if you are maximizing +// eoMinimizingFitness if you are minimizing +typedef eoMinimizingFitness MyFitT ; // type of fitness +// END fitness type +// + +// Then define your EO objects using that fitness type +typedef eoMyStruct Indi; // ***MUST*** derive from EO + +// create an initializer - done here and NOT in make_MyStruct.cpp +// because it is NOT representation independent +#include "make_genotype_MyStruct.h" +eoInit & make_genotype(eoParser& _parser, eoState&_state, Indi _eo) +{ + return do_make_genotype(_parser, _state, _eo); +} + +// same thing for the variation operaotrs +#include "make_op_MyStruct.h" +eoGenOp& make_op(eoParser& _parser, eoState& _state, eoInit& _init) +{ + return do_make_op(_parser, _state, _init); +} + +// The representation independent routines are simply declared here + +// how to initialize the population +// it IS representation independent if an eoInit is given +eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init); + +// the stopping criterion +eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval); + +// outputs (stats, population dumps, ...) +eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue); + +// evolution engine (selection and replacement) +eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op); + +// simple call to the algo. stays there for consistency reasons +// no template for that one +void run_ea(eoAlgo& _ga, eoPop& _pop); + +// checks for help demand, and writes the status file +// and make_help; in libutils - just a declaration, code in libeoutils.a +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +// from here on, no difference with eoMyStruct.cpp +int main(int argc, char* argv[]) +{ + + try + { + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + // The fitness + ////////////// + eoMyStructEvalFunc plainEval/* (varType _anyVariable) */; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + // the genotype - through a genotype initializer + eoInit& init = make_genotype(parser, state, Indi()); + + // Build the variation operator (any seq/prop construct) + eoGenOp& op = make_op(parser, state, init); + + + //// Now the representation-independent things + // + // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT + // unless you want to add specific statistics to the checkpoint + ////////////////////////////////////////////// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + + ///// End of construction of the algorithm + + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out + cout << "Initial Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + } + catch(exception& e) + { + cout << e.what() << endl; + } + return 0; +} diff --git a/trunk/eo/tutorial/Templates/MyStructSEA.cpp b/trunk/eo/tutorial/Templates/MyStructSEA.cpp new file mode 100644 index 000000000..5a05169ea --- /dev/null +++ b/trunk/eo/tutorial/Templates/MyStructSEA.cpp @@ -0,0 +1,350 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +This is the template main file. +It includes all other files that have been generated by the script create.sh +so it is the only file to compile. + +In case you want to build up a separate library for your new Evolving Object, +you'll need some work - follow what's done in the src/ga dir, used in the +main file BitEA in tutorial/Lesson4 dir. +Or you can wait until we do it :-) +*/ + +// Miscilaneous include and declaration +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoMyStruct MUST derive from EO for some fitness + */ +#include "eoMyStruct.h" + +/** definition of initilizqtion: + * class eoMyStructInit MUST derive from eoInit + */ +#include "eoMyStructInit.h" + +/** definition of evaluation: + * class eoMyStructEvalFunc MUST derive from eoEvalFunc + * and should test for validity before doing any computation + * see tutorial/Templates/evalFunc.tmpl + */ +#include "eoMyStructEvalFunc.h" + +/** definitions of operators: write as many classes as types of operators + * and include them here. In this simple example, + * one crossover (2->2) and one mutation (1->1) operators are used + */ +#include "eoMyStructQuadCrossover.h" +#include "eoMyStructMutation.h" + +/* and (possibly) your personal statistics */ +#include "eoMyStructStat.h" + +// GENOTYPE eoMyStruct ***MUST*** be templatized over the fitness + +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +// START fitness type: double or eoMaximizingFitness if you are maximizing +// eoMinimizingFitness if you are minimizing +typedef eoMinimizingFitness MyFitT ; // type of fitness +// END fitness type +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + +// Then define your EO objects using that fitness type +typedef eoMyStruct Indi; // ***MUST*** derive from EO + + +// Use existing modules to define representation independent routines + +// how to initialize the population +// it IS representation independent if an eoInit is given +#include +eoPop& make_pop(eoParser& _parser, eoState& _state, eoInit & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +// the stopping criterion +#include +eoContinue& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +// outputs (stats, population dumps, ...) +#include +eoCheckPoint& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter& _eval, eoContinue& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +// evolution engine (selection and replacement) +#include +eoAlgo& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc& _eval, eoContinue& _continue, eoGenOp& _op, eoDistance *_dist = NULL) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op, _dist); +} + +// simple call to the algo. stays there for consistency reasons +// no template for that one +#include +// the instanciating fitnesses +#include +void run_ea(eoAlgo& _ga, eoPop& _pop) +{ + do_run(_ga, _pop); +} + +// checks for help demand, and writes the status file +// and make_help; in libutils +void make_help(eoParser & _parser); + +// now use all of the above, + representation dependent things +int main(int argc, char* argv[]) +{ +try + { + eoParser parser(argc, argv); // for user-parameter reading + + eoState state; // keeps all things allocated + + // The fitness + ////////////// + eoMyStructEvalFunc plainEval/* (varType _anyVariable) */; + // turn that object into an evaluation counter + eoEvalFuncCounter eval(plainEval); + + // a genotype initializer + eoMyStructInit init; + // or, if you need some parameters, you might as well + // - write a constructor of the eoMyStructInit that uses a parser + // - call it from here: + // eoMyStructInit init(parser); + + // if you want to do sharing, you'll need a distance. + // see file utils/eoDistance.h + // + // IF you representation has an operator[]() double-castable, + // then you can use for instance the quadratic distance (L2 norm) + // eoQuadDistance dist; + // or the Hamming distance (L1 norm) + // eoHammingDistance dist; + + + // Build the variation operator (any seq/prop construct) + // here, a simple example with only 1 crossover (2->2, a QuadOp) and + // one mutation, is given. + // Hints to have choice among multiple crossovers and mutations are given + + // A (first) crossover (possibly use the parser in its Ctor) + eoMyStructQuadCrossover cross /* (eoParser parser) */; + + // IF MORE THAN ONE: + + // read its relative rate in the combination +// double cross1Rate = parser.createParam(1.0, "cross1Rate", "Relative rate for crossover 1", '1', "Variation Operators").value(); + + // create the combined operator with the first one (rename it cross1 !!!) +// eoPropCombinedQuadOp cross(cross1, cross1Rate); + + // and as many as you want the following way: + // 1- write the new class by mimicking eoMyStructQuadCrossover.h + // 2- include that file here together with eoMyStructQuadCrossover above + // 3- uncomment and duplicate the following lines: + // +// eoMyStructSecondCrossover cross2(eoParser parser); +// double cross2Rate = parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value(); +// cross.add(cross2, cross2Rate); + + // NOTE: if you want some gentle output, the last one shoudl be like + // cross.add(cross, crossXXXRate, true); + + /////////////// Same thing for MUTATION + + // a (first) mutation (possibly use the parser in its Ctor) + eoMyStructMutation mut /* (parser) */; + + // IF MORE THAN ONE: + + // read its relative rate in the combination +// double mut1Rate = parser.createParam(1.0, "mut1Rate", "Relative rate for mutation 1", '1', "Variation Operators").value(); + + // create the combined operator with the first one (rename it cross1 !!!) +// eoPropCombinedMonOp mut(mut1, mut1Rate); + + // and as many as you want the following way: + // 1- write the new class by mimicking eoMyStructMutation.h + // 2- include that file here together with eoMyStructMutation above + // 3- uncomment and duplicate the following lines: + // +// eoMyStructSecondMutation mut2(eoParser parser); +// double mut2Rate = parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); +// mut.add(mut2, mut2Rate); + + // NOTE: if you want some gentle output, the last one shoudl be like + // mut.add(mut, mutXXXRate, true); + + // now encapsulate your crossover(s) and mutation(s) into an eoGeneralOp + // so you can fully benefit of the existing evolution engines + + // First read the individual level parameters + double pCross = parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ).value(); + // minimum check + if ( (pCross < 0) || (pCross > 1) ) + throw runtime_error("Invalid pCross"); + + double pMut = parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ).value(); + // minimum check + if ( (pMut < 0) || (pMut > 1) ) + throw runtime_error("Invalid pMut"); + + // now create the generalOp + eoSGAGenOp op(cross, pCross, mut, pMut); + + + //// Now some representation-independent things + // + // You do not need to modify anything beyond this point + // unless you want to add specific statistics to the checkpoint + // in which case you should uncomment the corresponding block + // and possibly modify the parameters in the stat object creation + ////////////////////////////////////////////// + + // initialize the population + // yes, this is representation indepedent once you have an eoInit + eoPop& pop = make_pop(parser, state, init); + + // stopping criteria + eoContinue & term = make_continue(parser, state, eval); + // output + eoCheckPoint & checkpoint = make_checkpoint(parser, state, eval, term); + + + // UNCOMMENT the following commented block if you want to add you stats + + // if uncommented, it is assumed that you will want to print some stat. + // if not, then the following objects will be created uselessly - but what the heck! + + eoMyStructStat myStat; // or maybe myStat(parser); + checkpoint.add(myStat); + // This one is probably redundant with the one in make_checkpoint, but w.t.h. + eoIncrementorParam generationCounter("Gen."); + checkpoint.add(generationCounter); + // need to get the name of the redDir param (if any) + std::string dirName = parser.getORcreateParam(std::string("Res"), "resDir", "Directory to store DISK outputs", '\0', "Output - Disk").value() + "/"; + + + // those need to be pointers because of the if's + eoStdoutMonitor *myStdOutMonitor; + eoFileMonitor *myFileMonitor; +#ifdef HAVE_GNUPLOT + eoGnuplot1DMonitor *myGnuMonitor; +#endif + + // now check how you want to output the stat: + bool printMyStructStat = parser.createParam(false, "coutMyStructStat", "Prints my stat to screen, one line per generation", '\0', "My application").value(); + bool fileMyStructStat = parser.createParam(false, "fileMyStructStat", "Saves my stat to file (in resDir", '\0', "My application").value(); + bool plotMyStructStat = parser.createParam(false, "plotMyStructStat", "On-line plots my stat using gnuplot", '\0', "My application").value(); + + // should we write it on StdOut ? + if (printMyStructStat) + { + myStdOutMonitor = new eoStdoutMonitor(false); + // don't forget to store the memory in the state + state.storeFunctor(myStdOutMonitor); + // and of course to add the monitor to the checkpoint + checkpoint.add(*myStdOutMonitor); + // and the different fields to the monitor + myStdOutMonitor->add(generationCounter); + myStdOutMonitor->add(eval); + myStdOutMonitor->add(myStat); + } + + // first check the directory (and creates it if not exists already): + if (fileMyStructStat || plotMyStructStat) + if (! testDirRes(dirName, true) ) + throw runtime_error("Problem with resDir"); + + // should we write it to a file ? + if (fileMyStructStat) + { + // the file name is hard-coded - of course you can read + // a string parameter in the parser if you prefer + myFileMonitor = new eoFileMonitor(dirName + "myStat.xg"); + // don't forget to store the memory in the state + state.storeFunctor(myFileMonitor); + // and of course to add the monitor to the checkpoint + checkpoint.add(*myFileMonitor); + // and the different fields to the monitor + myFileMonitor->add(generationCounter); + myFileMonitor->add(eval); + myFileMonitor->add(myStat); + } + +#ifdef HAVE_GNUPLOT + // should we PLOT it on StdOut ? (one dot per generation, incremental plot) + if (plotMyStructStat) + { + myGnuMonitor = new eoGnuplot1DMonitor(dirName+"plot_myStat.xg",minimizing_fitness()); + // NOTE: you cand send commands to gnuplot at any time with the method + // myGnuMonitor->gnuplotCommand(string) + // par exemple, gnuplotCommand("set logscale y") + + // don't forget to store the memory in the state + state.storeFunctor(myGnuMonitor); + // and of course to add the monitor to the checkpoint + checkpoint.add(*myGnuMonitor); + // and the different fields to the monitor (X = eval, Y = myStat) + myGnuMonitor->add(eval); + myGnuMonitor->add(myStat); + } +#endif + + // algorithm (need the operator!) + eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op); + // and the distance if you want to do sharing + // eoAlgo& ga = make_algo_scalar(parser, state, eval, checkpoint, op, &dist); + + ///// End of construction of the algorithm + + ///////////////////////////////////////// + // to be called AFTER all parameters have been read!!! + make_help(parser); + + //// GO + /////// + // evaluate intial population AFTER help and status in case it takes time + apply(eval, pop); + // if you want to print it out +// cout << "Initial Population\n"; +// pop.sortedPrintOn(cout); +// cout << endl; + + run_ea(ga, pop); // run the ga + + cout << "Final Population\n"; + pop.sortedPrintOn(cout); + cout << endl; + + } + catch(exception& e) + { + cout << e.what() << endl; + } + return 0; +} diff --git a/trunk/eo/tutorial/Templates/README b/trunk/eo/tutorial/Templates/README new file mode 100644 index 000000000..33d9438e5 --- /dev/null +++ b/trunk/eo/tutorial/Templates/README @@ -0,0 +1,34 @@ +This Templates directory contains template files of an EO project and +a script createEOproject.sh to create a complete new EO project. + +The template requires a complete installation of EO, that is, you must +have run "make install" in the build-directory. + +In particular, the C++ compiler must also know how to find the EO +include files and the linker must find the EO libraries. Most +probably, that means that you have to set the variables +CPLUS_INCLUDE_PATH and LIBRARY_PATH, i.e. for a standard installation +and using tcsh: + setenv CPLUS_INCLUDE_PATH /usr/local/include/eo:"$CPLUS_INCLUDE_PATH" + setenv LIBRARY_PATH /usr/local/lib:"$LIBRARY_PATH" + +When running bash, use this: + export CPLUS_INCLUDE_PATH=/usr/local/include/eo:"$CPLUS_INCLUDE_PATH" + export LIBRARY_PATH=/usr/local/lib:"$LIBRARY_PATH" + + +You can freely move the created project around. However, whenever you +change the location of the source- or build-directories, you need to +run + touch configure.ac && autoreconf +in the source-directory and + make +in the build-directory (which might or might not be the same for you). + + +When you add additional source files to the project, simply add them +to the _SOURCES variable in src/Makefile.am. Header files +should be added to noinst_HEADERS. + + +See README.manual for more details. diff --git a/trunk/eo/tutorial/Templates/README.manual b/trunk/eo/tutorial/Templates/README.manual new file mode 100644 index 000000000..38693d83b --- /dev/null +++ b/trunk/eo/tutorial/Templates/README.manual @@ -0,0 +1,143 @@ +This is the old template-directory README. Most of this information is +still accurate and it contains more details than the new README. +However, see there first for the creation of new projects. + +======================================================================== + +This directory contains sample files that should make it easy to +create an EO algorithm to evolve any type of structure +(EO comes with two examples, bitstrings and vector of real variables, +so you'll need this as soon as you want to evolve something else). + +At the moment, only algorithms involving a scalar fitness (double) +are implemented (see test dir for Pareto optimization of multiple- +objective fitness - or be patient :-) + +This file will help you to build the same algorithm than the ones +in the Lesson4 of the tutorial, but with YOUR genotype instead of +bitstrings or vector. More details in Lesson5 of the tutorial. + +It is assumed in the following that you have read the first part of +the tutorial (Lessons 1 to 4). + +Creating the algorithm for your genotype +---------------------------------------- +In what follows, we will suppose that you want to evolve some data +structure, and that you have enough programming skills to be able to +write C code for its random initilialization, its crossover, its +mutation and the computation of its fitness. + +The helper script * create.sh * will create for you the files you need +from the samples in tutorial/Templates dir, and all you'll have to do +is to include the actual code where indicated in those files (between +keywords START and END). + +First, let's choose a name: let's call the new EO class eoAppli. +All newly created classes will be named eoAppliXXX (in the file +eoAppliXXX) + +1- cd to the tutorial dir + +2- create the directory for your application (let's assume you call it +APPLICATION): type in + + mkdir APPLICATION + +3- go to the Templates dir + + cd Templates + +and run the helper script create.sh with the following arguments + + ./create.sh Appli ../APPLICATION + +4- cd to the APPLICATION dir (cd ../APPLICATION). +You should see there the following files: + AppliEA.cpp the main file, includes all other, to be compiled + Makefile with default target eoAppliEA + eoAppli.h class eoAppli, FitT = template fitness + eoAppliEvalFunc.h class for the computation of fotness + eoAppliInit.h class for genotype initlialization + eoAppliMutation.h class for mutation + eoAppliQuadCrossover.h class for (quadratic) crossover + make_genotype_Appli.h helper function that create the initializer + make_op_Appli.h helper function that creates the variatin operators + +Note: You can go directly to step 6 and 7: you'll get a lot of +warnings, but will be able to run an EA that does nothing! + +5- Edit those files to suit your needs. The minimal addition you'll need +to make are + in eoAppli.h define your genotype + in eoAppliInit.h define the initialization of one genotype + in eoAppliMutation.h define the mutation of one genotype + in eoAppliQuadCrossover.h define the crossover of 2 genotypes + +HINT: look for keywords START and END and modify code in between. + +6- Compile eoAppliEA.cpp. If your APPLICATION dir is in the tutorial +dir, you don't need to modify Makefile. Just type in + + % make + +7- Run the resulting program: + + % eoAppliEA + +The default output is one line per generation with the generation +number, the number of evaluations performed, the best and average +fitnesses in the population. +The algorithm stops by default after 100 generations. + +8- Customize the parameters: copy eoAppliEA.status into +e.g. eoAppliEA.param, edit eoAppliEA.param (uncomment the lines you +want to become active), and run + + % eoAppliEA @eoAppliEA.param + +(see the Lesson 5 of the tutorial for more details now). + +HINTS +----- + +1- If some new classes you create require some user parameter, you can +either read them in the file where they are created (e.g. +make_op_Appli.h for variation operators), or pass the eoParser to the +constructor of the class, and read the parameter from the parser. + +2- If you stick to privacy for the data in your EO class, you will +probably need to write accessors to those data, as well as some public +methods to modify them, as soon as some other methods need them too. + +3- The sample make_op_Appli.h supposes that you ony have one crossover +and one mutation operator. However, the code for multiple operators is +there: you can have for instance 2 crossover operators, and choose +among them according to relative weights (proportional choice) - same +for mutation. Look at the operator section in eoAppliEA.cpp In +particular, the user parameters cross1Rate and mut1Rate are totally +useless for a single operator. + +To add another operator, you have to create another class by mimicking +what has been done for the first operator. +For instance, let's suppose you want to create another mutation. + +* duplicate the code for eoAppliMutation class +* in the second version, change the class name (eoAppliMutation) into +another name (let's say eoAppliBetterMutation) - you must change the +name in the class declaration, in the constructor and in the +className() method. +* in the new eoAppliBetterMutation class, change the code for the +operator() - and eventually the code for the constructor. +* in the make_op_Appli.h file, in the mutation section, uncomment the +lines + mut = new eoAppliSecondMutation(varType _anyVariable); + _state.storeFunctor(mut); + double mut2Rate = _parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); + propMutation.add(*mut, mut2Rate); + +and change the name of the class from eoAppliSecondMutation to your +name eoAppliBetterMutation (you can also change the keyword from +mut2Rate to something more meaningful like BetterMutationRate). +You're done! + +In case of problem: Marc.Schoenauer@inria.fr diff --git a/trunk/eo/tutorial/Templates/README.tmpl b/trunk/eo/tutorial/Templates/README.tmpl new file mode 100644 index 000000000..b64416566 --- /dev/null +++ b/trunk/eo/tutorial/Templates/README.tmpl @@ -0,0 +1,21 @@ +This is an autogenerated EO project. It was (most probably) generated +using the createEOproject.sh script in the +/tutorial/Templates directory. + +The project has a complete build-infrastructure based on +automake/autoconf. You can simply run "make" in this directory to have +the program compiled. The executable build will be in src/. In case of +problem during this step, please read the README file in the +...eo-dir/tutorial/Templates directory. + +After creation, the project should compile nicely - but of course the +resulting program does noting at all but print a few silly lines. + +Fill in the marked code-snippets in the files in src/ and you have a +complete EA project (detailed explanations in EO Tutorial - Lesson 5). + +Enjoy! + + +For details, for example on moving your project around or adding new +files, see /tutorial/Templates/README. diff --git a/trunk/eo/tutorial/Templates/binCrossover.tmpl b/trunk/eo/tutorial/Templates/binCrossover.tmpl new file mode 100644 index 000000000..c3f44c5af --- /dev/null +++ b/trunk/eo/tutorial/Templates/binCrossover.tmpl @@ -0,0 +1,70 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is useful in Emacs-like editors + */ + +/* +Template for simple binary crossover operators +============================================== + +Binary crossover operators modify the first genotype only, +based on the second +*/ + +#ifndef eoMyStructBinCrossover_H +#define eoMyStructBinCrossover_H + +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * THere is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO + */ +template +class eoMyStructBinCrossover: public eoBinOp +{ +public: + /** + * Ctor - no requirement + */ +// START eventually add or modify the anyVariable argument + eoMyStructBinCrossover() + // eoMyStructBinCrossover( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoMyStructEvalFunc object + // END Code of Ctor of an eoMyStructEvalFunc object + } + + /// The class name. Used to display statistics + string className() const { return "eoMyStructBinCrossover"; } + + /** + * binCrossover - modifies first genotype only + * @param _genotype1 The first genotype + * @param _genotype2 The second genotype - const + */ + bool operator()(GenotypeT & _genotype1, const GenotypeT & _genotype2) + { + // START code for crossover of _genotype1 and _genotype2 objects + + /** Requirement + * if _genotype1 has been modified + * return true; + * otherwise + * return false; + */ + + // END code for crossover of _genotype1 and _genotype2 objects + } + +private: +// START Private data of an eoMyStructBinCrossover object + // varType anyVariable; // for example ... +// END Private data of an eoMyStructBinCrossover object +}; + +#endif diff --git a/trunk/eo/tutorial/Templates/configure.ac.tmpl b/trunk/eo/tutorial/Templates/configure.ac.tmpl new file mode 100644 index 000000000..8c09bf41a --- /dev/null +++ b/trunk/eo/tutorial/Templates/configure.ac.tmpl @@ -0,0 +1,39 @@ +# EO template autogeneration configure.ac template +# +# Copyright (C) 2006 Jochen Küpper +# +dnl Process this file with autoconf to produce a configure script. +AC_INIT(MyStruct, 0.1) +AC_CONFIG_SRCDIR(src/eoMyStruct.h) +AM_INIT_AUTOMAKE +AC_CONFIG_HEADERS(config.h) + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_CXX +AC_ISC_POSIX + +dnl Checks for header files. +AC_STDC_HEADERS +AC_LANG(C++) +AC_CHECK_HEADERS([eo], [], [AC_ERROR(Evolving Objects headers are required)]) + +dnl Checks for libraries. +AC_LANG(C++) +AC_CHECK_LIB([eoutils], [main], [], + AC_MSG_ERROR([Evolving Objects utility library is required.])) +AC_CHECK_LIB([eo], [main], [], + AC_MSG_ERROR([Evolving Objects library is required.])) +AC_CHECK_LIB([es], [main], [], + AC_MSG_ERROR([EO Evolutionary strategies library is required.])) + +dnl Checks for library functions. + +AC_OUTPUT([Makefile src/Makefile]) + + +dnl Local Variables: +dnl coding: iso-8859-1 +dnl mode: autoconf +dnl fill-column: 80 +dnl End: diff --git a/trunk/eo/tutorial/Templates/continue.tmpl b/trunk/eo/tutorial/Templates/continue.tmpl new file mode 100644 index 000000000..bfcee4d34 --- /dev/null +++ b/trunk/eo/tutorial/Templates/continue.tmpl @@ -0,0 +1,64 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for continuator in EO, i.e. stopping conditions for EO algorithms +========================================================================== +*/ + +#ifndef _eoMyStructContinue_h +#define _eoMyStructContinue_h + +// include the base definition of eoContinue +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * ATTENTION, class EOT *must* derive from EO, as operator() will + * be called with an eoPop + */ +template< class EOT> +class eoMyStructContinue: public eoContinue { +public: + /** + * Ctor - no requirement + */ +// START eventually add or modify the anyVariable argument + eoMyStructContinue() + // eoMyStructBinCrossover( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoMyStructEvalFunc object + // END Code of Ctor of an eoMyStructEvalFunc object + } + + + /** Returns false when you want to stop + * + * @param _pop an eoPop + */ + virtual bool operator() ( const eoPop& _pop ) + { + bool stopCondition ; // to store the stopping condition + // START Code of computation of stopping condition + // stopCondition = blablabla + // END Code of computation of stopping condition + if (stopCondition) // the algo will stop upon return FALSE + { + cout << "STOP in eoMyStructContinue \n"; + return false; + } + return true; // == do not stop + } + +private: +// START Private data of an eoMyStructContinue object + // varType anyVariable; // for example ... +// END Private data of an eoMyStructContinue object +}; + +#endif diff --git a/trunk/eo/tutorial/Templates/createEOproject.sh b/trunk/eo/tutorial/Templates/createEOproject.sh new file mode 100755 index 000000000..9f932f909 --- /dev/null +++ b/trunk/eo/tutorial/Templates/createEOproject.sh @@ -0,0 +1,116 @@ +#! /bin/tcsh -f +# +# Script to create a completely new EO project from templates +# +# Originally by Marc Schoenauer +# Copyright (C) 2006 Jochen Kpper + +if ($PWD:t != Templates) then + echo "You must start this shell script from the EO Template directory" + exit +endif + +if ($#argv < 1) then + echo "Usage: $0 ApplicationName [TargetDirName]" + echo " This will create ../TargetDirName if necessary (default dir name = ApplicationName)," + echo " and will also put all the files there that are strictly necessary to compile and run" + echo " your application." + exit +endif + +# we're going to do something +echo " " +if ($#argv == 1) then + set TargetDir = /tmp/$1 +else + set TargetDir = $2 +endif +if ( -d $TargetDir ) then + echo "Warning: The target directory does exist already." + echo -n "Overwrite (yes/no)? " + set REP = $< + if ($REP != "yes") then + echo "Stopping, nothing done!" + exit + endif +else if ( -e $TargetDir ) then + echo "Warning: $TargetDir exist but isn't a directory." + echo "Stopping, nothing done!" + exit +endif +mkdir -p $TargetDir/src + + +# creating files +echo "Creating source files for application $1 in $TargetDir/src" +sed s/MyStruct/$1/g eoMyStruct.tmpl > $TargetDir/src/eo$1.h +sed s/MyStruct/$1/g init.tmpl > $TargetDir/src/eo$1Init.h +sed s/MyStruct/$1/g stat.tmpl > $TargetDir/src/eo$1Stat.h +sed s/MyStruct/$1/g evalFunc.tmpl > $TargetDir/src/eo$1EvalFunc.h +sed s/MyStruct/$1/g mutation.tmpl > $TargetDir/src/eo$1Mutation.h +sed s/MyStruct/$1/g quadCrossover.tmpl > $TargetDir/src/eo$1QuadCrossover.h +sed s/MyStruct/$1/g MyStructSEA.cpp > $TargetDir/src/$1EA.cpp + +echo "Creating build-support files for application $1 in $TargetDir" +sed s/MyStruct/$1/g configure.ac.tmpl > $TargetDir/configure.ac +sed s/MyStruct/$1/g Makefile.am.top-tmpl > $TargetDir/Makefile.am +sed s/MyStruct/$1/g Makefile.am.src-tmpl > $TargetDir/src/Makefile.am + + +##### Build a ready-to-use CMake config + +# need paths +set eo_src_var = 'EO_SRC_DIR' +echo "$PWD" > temp.txt +sed -e "s/\//\\\//g" temp.txt > temp2.txt +set safe_eo_path = `cat temp2.txt` +set safe_eo_path = "$safe_eo_path\/..\/.." + +set eo_bin_var = 'EO_BIN_DIR' +set eo_src_path = "$safe_eo_path" +set eo_bin_path = "$safe_eo_path\/build" + +sed -e "s/MyStruct/$1/g" -e "s/$eo_src_var/$eo_src_path/g" -e "s/$eo_bin_var/$eo_bin_path/g" CMakeLists.txt.top-tmpl > $TargetDir/CMakeLists.txt +sed -e "s/MyStruct/$1/g" CMakeLists.txt.src-tmpl > $TargetDir/src/CMakeLists.txt + +# remove temp dirs +rm -f temp.txt temp2.txt + +##### + + +sed s/MyStruct/$1/g README.tmpl > $TargetDir/README +touch $TargetDir/AUTHORS +touch $TargetDir/COPYING +touch $TargetDir/ChangeLog +touch $TargetDir/INSTALL +touch $TargetDir/NEWS + +echo "Successfully created project $1 in $TargetDir!" +echo "Start building the new project" + + +### building new project with the Autotools +#cd $TargetDir +#aclocal || exit +#autoheader || exit +#automake --add-missing --copy --gnu || exit + +# !!!!! uncompatible option: --force-missing for the latest version of automake + +#autoconf || exit +#./configure || exit +#make || exit + +# New: building new project using CMake +cd $TargetDir +#mkdir build +#cd build +cmake . || exit +make || exit + + +# done +echo "" +echo "Project $1 successfully build in $TargetDir!" +echo "Implement your code and enjoy." diff --git a/trunk/eo/tutorial/Templates/eoMyStruct.tmpl b/trunk/eo/tutorial/Templates/eoMyStruct.tmpl new file mode 100644 index 000000000..f68def2a8 --- /dev/null +++ b/trunk/eo/tutorial/Templates/eoMyStruct.tmpl @@ -0,0 +1,117 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +Mandatory: +- a default constructor (constructor without any argument) +- the I/O functions (readFrom and printOn) + +However, if you are using dynamic memory, there are 2 places +to allocate it: the default constructor (if possible?), or, more in +the EO spirit, the eoInit object, that you will need to write anyway +(template file init.tmpl). + +But remember that a COPY CONSTRUCTOR will be used in many places in EO, +so make sure that the default copy constructor works, or, even better, +do write your own if in doubt. +And of course write the corresponding destructor! + +*/ + +#ifndef _eoMyStruct_h +#define _eoMyStruct_h + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + + * Note that you MUST derive your structure from EO + * but you MAY use some other already prepared class in the hierarchy + * like eoVector for instance, if you handle a vector of something.... + + * If you create a structure from scratch, + * the only thing you need to provide are + * a default constructor + * IO routines printOn and readFrom + * + * Note that operator<< and operator>> are defined at EO level + * using these routines + */ +template< class FitT> +class eoMyStruct: public EO { +public: + /** Ctor: you MUST provide a default ctor. + * though such individuals will generally be processed + * by some eoInit object + */ + eoMyStruct() + { + // START Code of default Ctor of an eoMyStruct object + // END Code of default Ctor of an eoMyStruct object + } + + /** Copy Ctor: you MUST provide a copy ctor if the default + * one is not what you want + * If this is the case, uncomment and fill the following + */ + /* + eoMyStruct(const eoMyStruct &) + { + // START Code of copy Ctor of an eoMyStruct object + // END Code of copy Ctor of an eoMyStruct object + } + */ + + + virtual ~eoMyStruct() + { + // START Code of Destructor of an eoEASEAGenome object + // END Code of Destructor of an eoEASEAGenome object + } + + virtual string className() const { return "eoMyStruct"; } + + /** printing... */ + void printOn(ostream& os) const + { + // First write the fitness + EO::printOn(os); + os << ' '; + // START Code of default output + + /** HINTS + * in EO we systematically write the sizes of things before the things + * so readFrom is easier to code (see below) + */ + + // END Code of default output + } + + /** reading... + * of course, your readFrom must be able to read what printOn writes!!! + */ + void readFrom(istream& is) + { + // of course you should read the fitness first! + EO::readFrom(is); + // START Code of input + + /** HINTS + * remember the eoMyStruct object will come from the default ctor + * this is why having the sizes written out is useful + */ + + // END Code of input + } + +private: // put all data here + // START Private data of an eoMyStruct object + // END Private data of an eoMyStruct object +}; + +#endif diff --git a/trunk/eo/tutorial/Templates/evalFunc.tmpl b/trunk/eo/tutorial/Templates/evalFunc.tmpl new file mode 100644 index 000000000..34eae4c43 --- /dev/null +++ b/trunk/eo/tutorial/Templates/evalFunc.tmpl @@ -0,0 +1,65 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for evaluator in EO, a functor that computes the fitness of an EO +========================================================================== +*/ + +#ifndef _eoMyStructEvalFunc_h +#define _eoMyStructEvalFunc_h + +// include whatever general include you need +#include +#include + +// include the base definition of eoEvalFunc +#include "eoEvalFunc.h" + +/** + Always write a comment in this format before class definition + if you want the class to be documented by Doxygen +*/ +template +class eoMyStructEvalFunc : public eoEvalFunc +{ +public: + /// Ctor - no requirement +// START eventually add or modify the anyVariable argument + eoMyStructEvalFunc() + // eoMyStructEvalFunc( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoMyStructEvalFunc object + // END Code of Ctor of an eoMyStructEvalFunc object + } + + /** Actually compute the fitness + * + * @param EOT & _eo the EO object to evaluate + * it should stay templatized to be usable + * with any fitness type + */ + void operator()(EOT & _eo) + { + // test for invalid to avoid recomputing fitness of unmodified individuals + if (_eo.invalid()) + { + double fit; // to hold fitness value + // START Code of computation of fitness of the eoMyStruct object + // fit = blablabla + // END Code of computation of fitness of the eoMyStruct object + _eo.fitness(fit); + } + } + +private: +// START Private data of an eoMyStructEvalFunc object + // varType anyVariable; // for example ... +// END Private data of an eoMyStructEvalFunc object +}; + + +#endif diff --git a/trunk/eo/tutorial/Templates/init.tmpl b/trunk/eo/tutorial/Templates/init.tmpl new file mode 100644 index 000000000..d49e52ef4 --- /dev/null +++ b/trunk/eo/tutorial/Templates/init.tmpl @@ -0,0 +1,57 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for EO objects initialization in EO +============================================ +*/ + +#ifndef _eoMyStructInit_h +#define _eoMyStructInit_h + +// include the base definition of eoInit +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * There is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO (e.g. to initialize + * atoms of an eoVector you will need an eoInit) + */ +template +class eoMyStructInit: public eoInit { +public: + /// Ctor - no requirement +// START eventually add or modify the anyVariable argument + eoMyStructInit() + // eoMyStructInit( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoMyStructInit object + // END Code of Ctor of an eoMyStructInit object + } + + + /** initialize a genotype + * + * @param _genotype generally a genotype that has been default-constructed + * whatever it contains will be lost + */ + void operator()(GenotypeT & _genotype) + { + // START Code of random initialization of an eoMyStruct object + // END Code of random initialization of an eoMyStruct object + _genotype.invalidate(); // IMPORTANT in case the _genotype is old + } + +private: +// START Private data of an eoMyStructInit object + // varType anyVariable; // for example ... +// END Private data of an eoMyStructInit object +}; + +#endif diff --git a/trunk/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl b/trunk/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl new file mode 100644 index 000000000..fea5a2a67 --- /dev/null +++ b/trunk/eo/tutorial/Templates/lessOffspringExternalSelectorGenOp.tmpl @@ -0,0 +1,81 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for general operators +=============================== +i.e. that takes any number of parents and generates any number of offspring + +a GenOp that creates less offspring than there are parents + +Second version, get parents using an external eoSelectOne +*/ + +#ifndef eoLessOffspringExternalSelectorGenOp_H +#define eoLessOffspringExternalSelectorGenOp_H + +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * ATTENTION, class EOT *must* derive from EO, as method invalidate() + * must be called if the genotypes of the indis is modified + */ +template +class eoLessOffspringExternalSelectorGenOp: public eoGenOp +{ +public: + /** + * (Default) Constructor. + */ + eoLessOffspringExternalSelectorGenOp(eoSelectOne & _sel, paramType _anyParameter) : + sel(_sel), anyParameter(_anyParameter) {} + + /// The class name. Used to display statistics + string className() const { return "eoLessOffspringExternalSelectorGenOp"; } + + /// The TOTAL number of offspring (here = nb of parents modified in place) + unsigned max_production(void) { return NbLeftParents; } + + /** + * eoShrinkGen operator - modifies some parents in the populator + * using extra "parents" selected from an external selector + * + * @param _pop a POPULATOR (not a simple population) + */ + void apply(eoPopulator& _plop) + { + // First, select as many parents as you will have offspring + EOT& parent1 = *_plop; // select the first parent + ++_plop; // advance once for each selected parents + ... + EOT& parentN = *_plop; // say you want N offspring + + // get extra parents - use private selector + // _plop.source() is the eoPop used by _plop to get parents + // WARNING: you are not allowed to modify them (mandatory "const") + const EOT& parentN+1 = sel(_plop.source()); + ... + const EOT& parentN+K = sel(_plop.source()); + + // modify (in place) the "true" parents + // (i.e. parent1, ..., parentsN) + ... + + // invalidate fitnesses of modified parents + parent1.invalidate(); + ... + parentN.invalidate(); + } + + +private: + eoSelectOne & sel; + paramType anyParameter +}; + +#endif diff --git a/trunk/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl b/trunk/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl new file mode 100644 index 000000000..8fdd8ff66 --- /dev/null +++ b/trunk/eo/tutorial/Templates/lessOffspringSameSelectorGenOp.tmpl @@ -0,0 +1,76 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for general operators +=============================== +i.e. that takes any number of parents and generates any number of offspring + +a GenOp that creates less offspring than there are parents + +First version, get parents from populator using the imbedded select() method +*/ + +#ifndef eoLessOffspringSameSelectorGenOp_H +#define eoLessOffspringSameSelectorGenOp_H + +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * ATTENTION, class EOT *must* derive from EO, as method invalidate() + * must be called if the genotypes of the indis is modified + */ +template +class eoLessOffspringSameSelectorGenOp: public eoGenOp +{ +public: + /** + * (Default) Constructor. + */ + eoLessOffspringSameSelectorGenOp(paramType _anyParameter) : + anyParameter(_anyParameter) {} + + /// The class name. Used to display statistics + string className() const { return "eoLessOffspringSameSelectorGenOp"; } + + /// The TOTAL number of offspring (here = nb of remaining modified parents) + unsigned max_production(void) { return NbLeftParents; } + + /** + * eoLesOffspringSameSelectorGenOp operator - + * gets extra parents from the populator + * + * @param _pop a POPULATOR (not a simple population) + */ + void apply(eoPopulator& _plop) + { + // First, select as many parents as you will have offspring + EOT& parent1 = *_plop; // select the first parent + ++_plop; // advance once for each selected parents + ... + EOT& parentN = *_plop; // say you want N offspring + + // Now select extra parents from the populator + EOT& parentN+1 = _plop.select(); + ... + EOT& parentN+K = _plop.select(); + + // modify the first N parents + ... + + // oh right, and invalidate their fitnesses + parent1.invalidate(); + ... + parentN.invalidate(); + } + +private: + paramType anyParameter +}; + +#endif diff --git a/trunk/eo/tutorial/Templates/make_MyStruct.cpp b/trunk/eo/tutorial/Templates/make_MyStruct.cpp new file mode 100644 index 000000000..aaf183c91 --- /dev/null +++ b/trunk/eo/tutorial/Templates/make_MyStruct.cpp @@ -0,0 +1,128 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for creating a new representation in EO +================================================ + +This is the template file that allows separate compilation of +everything that is representation independant (evolution engine and +general output) for an Evolutionary Algorithm with scalar fitness. + +It includes of course the definition of the genotype (eoMyStruct.h) and +is written like the make_xxx.cpp files in dirs src/ga (for bitstrings) +and src/es (for real vectors). + +*/ + +// Miscilaneous include and declaration +#include +using namespace std; + +// eo general include +#include "eo" +// the real bounds (not yet in general eo include) +#include "utils/eoRealVectorBounds.h" + +// include here whatever specific files for your representation +// Basically, this should include at least the following + +/** definition of representation: + * class eoMyStruct MUST derive from EO for some fitness + */ +#include "eoMyStruct.h" + +// create an initializer: this is NOT representation-independent +// and will be done in the main file +// However, should you decide to freeze that part, you could use the +// following (and remove it from the main file, of course!!!) +//------------------------------------------------------------------ +// #include "make_genotype_MyStruct.h" +// eoInit> & make_genotype(eoParser& _parser, eoState&_state, eoMyStruct _eo) +// { +// return do_make_genotype(_parser, _state, _eo); +// } + +// eoInit> & make_genotype(eoParser& _parser, eoState&_state, eoMyStruct _eo) +// { +// return do_make_genotype(_parser, _state, _eo); +// } + +// same thing for the variation operaotrs +//--------------------------------------- +// #include "make_op_MyStruct.h" +// eoGenOp>& make_op(eoParser& _parser, eoState& _state, eoInit>& _init) +// { +// return do_make_op(_parser, _state, _init); +// } + +// eoGenOp>& make_op(eoParser& _parser, eoState& _state, eoInit>& _init) +// { +// return do_make_op(_parser, _state, _init); +// } + +// The following modules use ***representation independent*** routines + +// how to initialize the population +// it IS representation independent if an eoInit is given +#include +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +eoPop >& make_pop(eoParser& _parser, eoState& _state, eoInit > & _init) +{ + return do_make_pop(_parser, _state, _init); +} + +// the stopping criterion +#include +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +eoContinue >& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter > & _eval) +{ + return do_make_continue(_parser, _state, _eval); +} + +// outputs (stats, population dumps, ...) +#include +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +eoCheckPoint >& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter >& _eval, eoContinue >& _continue) +{ + return do_make_checkpoint(_parser, _state, _eval, _continue); +} + +// evolution engine (selection and replacement) +#include +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +eoAlgo >& make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc >& _eval, eoContinue >& _continue, eoGenOp >& _op) +{ + return do_make_algo_scalar(_parser, _state, _eval, _continue, _op); +} + +// simple call to the algo. stays there for consistency reasons +// no template for that one +#include +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} + +void run_ea(eoAlgo >& _ga, eoPop >& _pop) +{ + do_run(_ga, _pop); +} diff --git a/trunk/eo/tutorial/Templates/make_genotype_MyStruct.h b/trunk/eo/tutorial/Templates/make_genotype_MyStruct.h new file mode 100644 index 000000000..7cc279467 --- /dev/null +++ b/trunk/eo/tutorial/Templates/make_genotype_MyStruct.h @@ -0,0 +1,73 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_genotype.h +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_genotype_h +#define _make_genotype_h + +#include +#include + // also need the parser and param includes +#include +#include + + +/* + * This fuction does the create an eoInit + * + * It could be here tempatized only on the fitness, as it can be used + * to evolve structures with any fitness. + * However, for consistency reasons, it was finally chosen, as in + * the rest of EO, to templatize by the full EOT, as this eventually + * allows to choose the type of genotype at run time (see in es dir) + * + * It returns an eoInit that can later be used to initialize + * the population (see make_pop.h). + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is to disambiguate the call upon different instanciations. + * + * WARNING: that last argument will generally be the result of calling + * the default ctor of EOT, resulting in most cases in an EOT + * that is ***not properly initialized*** +*/ + +template +eoInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT) +{ + // read any useful parameter here from the parser + // the param itself will belong to the parser (as far as memory is concerned) + + // paramType & param = _parser.createParam(deafultValue, "Keyword", "Comment to appear in help and status", 'c',"Section of status file").value(); + + // Then built the initializer - a pointer, stored in the eoState + eoInit* init = new eoMyStructInit /* ( param ) */ ; + // store in state + _state.storeFunctor(init); + // and return a reference + return *init; +} + +#endif diff --git a/trunk/eo/tutorial/Templates/make_op_MyStruct.h b/trunk/eo/tutorial/Templates/make_op_MyStruct.h new file mode 100644 index 000000000..d857e8958 --- /dev/null +++ b/trunk/eo/tutorial/Templates/make_op_MyStruct.h @@ -0,0 +1,210 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op_MyStruct.h +// (c) Marc Schoenauer, Maarten Keijzer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_op_MyStruct_h +#define _make_op_MyStruct_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +/** definition of mutation: + * class eoMyStructMonop MUST derive from eoMonOp + */ +#include "eoMyStructMutation.h" + +/** definition of crossover (either as eoBinOp (2->1) or eoQuadOp (2->2): + * class eoMyStructBinCrossover MUST derive from eoBinOp + * OR + * class eoMyStructQuadCrossover MUST derive from eoQuadOp + */ +// #include "eoMyStructBinOp.h" +// OR +#include "eoMyStructQuadCrossover.h" + + // also need the parser and state includes +#include +#include + + +/////////////////// variation operators /////////////// +// canonical (crossover + mutation) only at the moment // + +/* + * This function builds the operators that will be applied to the eoMyStruct + * + * It uses a parser (to get user parameters), a state (to store the memory) + * the last parameter is an eoInit: if some operator needs some info + * about the genotypes, the init has it all (e.g. bounds, ...) + * Simply do + * EOT myEO; + * _init(myEO); + * and myEO is then an ACTUAL object + * + * As usual, the template is the complete EOT even though only the fitness + * is actually templatized here: the following only applies to eoMyStruct +*/ + +template +eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoInit& _init) +{ + // this is a temporary version, while Maarten codes the full tree-structured + // general operator input + // BTW we must leave that simple version available somehow, as it is the one + // that 90% people use! + + + ///////////////////////////// + // Variation operators + //////////////////////////// + // read crossover and mutations, combine each in a proportional Op + // and create the eoGenOp that calls crossover at rate pCross + // then mutation with rate pMut + + // the crossovers + ///////////////// + + // here we can have eoQuadOp (2->2) only - no time for the eoBinOp case + + // you can have more than one - combined in a proportional way + + // first, define the crossover objects and read their rates from the parser + + // A first crossover + eoQuadOp *cross = new eoMyStructQuadCrossover /* (varType _anyVariable) */; + // store in the state + _state.storeFunctor(cross); + + // read its relative rate in the combination + double cross1Rate = _parser.createParam(1.0, "cross1Rate", "Relative rate for crossover 1", '1', "Variation Operators").value(); + + // and create the combined operator with this one + eoPropCombinedQuadOp *propXover = + new eoPropCombinedQuadOp(*cross, cross1Rate); + // and of course stor it in the state + _state.storeFunctor(propXover); + + + // Optional: A second(and third, and ...) crossover + // of course you must create the corresponding classes + // and all ***MUST*** derive from eoQuadOp + + /* Uncomment if necessary - and replicate as many time as you need + cross = new eoMyStructSecondCrossover(varType _anyVariable); + _state.storeFunctor(cross); + double cross2Rate = _parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value(); + propXover.add(*cross, cross2Rate); + */ + // if you want some gentle output, the last one shoudl be like + // propXover.add(*cross, crossXXXRate, true); + + + // the mutation: same story + //////////////// + // you can have more than one - combined in a proportional way + + // for each mutation, + // - define the mutator object + // - read its rate from the parser + // - add it to the proportional combination + + // a first mutation + eoMonOp *mut = new eoMyStructMutation/* (varType _anyVariable) */; + _state.storeFunctor(mut); + // its relative rate in the combination + double mut1Rate = _parser.createParam(1.0, "mut1Rate", "Relative rate for mutation 1", '1', "Variation Operators").value(); + // and the creation of the combined operator with this one + eoPropCombinedMonOp *propMutation = new eoPropCombinedMonOp(*mut, mut1Rate); + _state.storeFunctor(propMutation); + + // Optional: A second(and third, and ...) mutation with their rates + // of course you must create the corresponding classes + // and all ***MUST*** derive from eoMonOp + + /* Uncomment if necessary - and replicate as many time as you need + mut = new eoMyStructSecondMutation(varType _anyVariable); + _state.storeFunctor(mut); + double mut2Rate = _parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value(); + propMutation.add(*mut, mut2Rate); + */ + // if you want some gentle output, the last one shoudl be like + // propMutation.add(*mut, mutXXXRate, true); + + // end of crossover and mutation definitions + //////////////////////////////////////////// + +// END Modify definitions of objects by eventually add parameters +//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + +// from now on, you do not need to modify anything +// though you CAN add things to the checkpointing (see tutorial) + + // now build the eoGenOp: + // to simulate SGA (crossover with proba pCross + mutation with proba pMut + // we must construct + // a sequential combination of + // with proba 1, a proportional combination of + // a QuadCopy and our crossover + // with proba pMut, our mutation + + // but of course you're free to use any smart combination you could think of + // especially, if you have to use eoBinOp rather than eoQuad Op youùll have + // to modify that part + + // First read the individual level parameters + eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw runtime_error("Invalid pCross"); + + eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw runtime_error("Invalid pMut"); + + + // the crossover - with probability pCross + eoProportionalOp * propOp = new eoProportionalOp ; + _state.storeFunctor(propOp); + eoQuadOp *ptQuad = new eoQuadCloneOp; + _state.storeFunctor(ptQuad); + propOp->add(*propXover, pCrossParam.value()); // crossover, with proba pcross + propOp->add(*ptQuad, 1-pCrossParam.value()); // nothing, with proba 1-pcross + + // now the sequential + eoSequentialOp *op = new eoSequentialOp; + _state.storeFunctor(op); + op->add(*propOp, 1.0); // always do combined crossover + op->add(*propMutation, pMutParam.value()); // then mutation, with proba pmut + + // that's it - return a reference + return *op; +} +#endif diff --git a/trunk/eo/tutorial/Templates/moreOffspringGenOp.tmpl b/trunk/eo/tutorial/Templates/moreOffspringGenOp.tmpl new file mode 100644 index 000000000..9d0b17762 --- /dev/null +++ b/trunk/eo/tutorial/Templates/moreOffspringGenOp.tmpl @@ -0,0 +1,77 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for general operators +=============================== +i.e. that takes any number of parents and generates any number of offspring + +Here, a GenOp that creates more (or same number of) offspring +than there are parents +*/ + +#ifndef eoMoreOffspringGenOp_H +#define eoMoreOffspringGenOp_H + +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * ATTENTION, class EOT *must* derive from EO, as method invalidate() + * must be called if the genotypes of the indis is modified + */ +template +class eoMoreOffspringGenOp: public eoGenOp +{ +public: + /** + * (Default) Constructor. + */ + eoMoreOffspringGenOp(paramType _anyParameter) : + anyParameter(_anyParameter) {} + + /// The class name. Used to display statistics + string className() const { return "eoMoreOffspringGenOp"; } + + /// The TOTAL number of offspring (including modified parents) + unsigned max_production(void) { return NbOffspring; } + + /** + * eoMoreOffspringGenOp operator - eventually modifies the parents + * BUT does generate more offspring + * + * @param _pop a POPULATOR (not a simple population) + */ + void apply(eoPopulator& _plop) + { + EOT& parent1 = *_plop; // select the first parent + ++_plop; // advance once for each selected parents + ... + EOT& parentN = *_plop; // select the last parent + // don't advance after the last one: _plop always + // points to the last that has already been treated + + // apply operator to the parents (modifying them AND generating + // new individuals ofs1, ofs2, ..., ofsN + ++_plop; // advance before each insertion + _plop.insert(ofs1); + ... + ++_plop; // advance before each insertion + _plop.insert(ofsN); + + // oh right, and invalidate fitnesses of modified parents + parent1.invalidate(); + ... + parentN.invalidate(); + } + + +private: + paramType anyParameter +}; + +#endif diff --git a/trunk/eo/tutorial/Templates/mutation.tmpl b/trunk/eo/tutorial/Templates/mutation.tmpl new file mode 100644 index 000000000..48785313c --- /dev/null +++ b/trunk/eo/tutorial/Templates/mutation.tmpl @@ -0,0 +1,68 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is useful in Emacs-like editors + */ + +/* +Template for simple mutation operators +====================================== +*/ + +#ifndef eoMyStructMutation_H +#define eoMyStructMutation_H + + +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * THere is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO + */ +template +class eoMyStructMutation: public eoMonOp +{ +public: + /** + * Ctor - no requirement + */ +// START eventually add or modify the anyVariable argument + eoMyStructMutation() + // eoMyStructMutation( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoMyStructEvalFunc object + // END Code of Ctor of an eoMyStructEvalFunc object + } + + /// The class name. Used to display statistics + string className() const { return "eoMyStructMutation"; } + + /** + * modifies the parent + * @param _genotype The parent genotype (will be modified) + */ + bool operator()(GenotypeT & _genotype) + { + bool isModified(true); + // START code for mutation of the _genotype object + + /** Requirement + * if (_genotype has been modified) + * isModified = true; + * else + * isModified = false; + */ + return isModified; + // END code for mutation of the _genotype object + } + +private: +// START Private data of an eoMyStructMutation object + // varType anyVariable; // for example ... +// END Private data of an eoMyStructMutation object +}; + +#endif diff --git a/trunk/eo/tutorial/Templates/quadCrossover.tmpl b/trunk/eo/tutorial/Templates/quadCrossover.tmpl new file mode 100644 index 000000000..93f104a08 --- /dev/null +++ b/trunk/eo/tutorial/Templates/quadCrossover.tmpl @@ -0,0 +1,71 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for simple quadratic crossover operators +================================================= + +Quadratic crossover operators modify the both genotypes +*/ + +#ifndef eoMyStructQuadCrossover_H +#define eoMyStructQuadCrossover_H + +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * THere is NO ASSUMPTION on the class GenoypeT. + * In particular, it does not need to derive from EO + */ +template +class eoMyStructQuadCrossover: public eoQuadOp +{ +public: + /** + * Ctor - no requirement + */ +// START eventually add or modify the anyVariable argument + eoMyStructQuadCrossover() + // eoMyStructQuadCrossover( varType _anyVariable) : anyVariable(_anyVariable) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoMyStructEvalFunc object + // END Code of Ctor of an eoMyStructEvalFunc object + } + + /// The class name. Used to display statistics + string className() const { return "eoMyStructQuadCrossover"; } + + /** + * eoQuad crossover - _genotype1 and _genotype2 are the (future) + * offspring, i.e. _copies_ of the parents, to be modified + * @param _genotype1 The first parent + * @param _genotype2 The second parent + */ + bool operator()(GenotypeT& _genotype1, GenotypeT & _genotype2) + { + bool oneAtLeastIsModified(true); + // START code for crossover of _genotype1 and _genotype2 objects + + /** Requirement + * if (at least one genotype has been modified) // no way to distinguish + * oneAtLeastIsModified = true; + * else + * oneAtLeastIsModified = false; + */ + return oneAtLeastIsModified; + // END code for crossover of _genotype1 and _genotype2 objects + } + +private: +// START Private data of an eoMyStructQuadCrossover object + // varType anyVariable; // for example ... +// END Private data of an eoMyStructQuadCrossover object +}; + +#endif diff --git a/trunk/eo/tutorial/Templates/stat.tmpl b/trunk/eo/tutorial/Templates/stat.tmpl new file mode 100644 index 000000000..9f807d24d --- /dev/null +++ b/trunk/eo/tutorial/Templates/stat.tmpl @@ -0,0 +1,63 @@ +/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +The above line is usefulin Emacs-like editors + */ + +/* +Template for computing statistics on eoPop +============================================ +*/ + +#ifndef _eoMyStructStat_h +#define _eoMyStructStat_h + +// include the base definition of eoInit +#include + +/** + * Always write a comment in this format before class definition + * if you want the class to be documented by Doxygen + * + * ASSUMPTION on the class GenoypeT: + * it needs to derive from EO (i.e. has a Fitness). + * + * It is assumed that you want to compute a double. + * In case you want something else, then your stat should derive from + * eoStat + * where class T is the class of the computed statistics + */ +template +class eoMyStructStat : public eoStat +{ +public : + typedef typename EOT::Fitness Fitness; + +// START eventually add or modify the anyVariable argument + /** Ctor - you change the default name of course. + * @param + * _description : inherited from eoValueParam (eoStat is an from eoVapueParam) + */ + eoMyStructStat(std::string _description = "eoMyStructStat ") : + eoStat(0.0, _description) +// END eventually add or modify the anyVariable argument + { + // START Code of Ctor of an eoMonReelStat object + // END Code of Ctor of an eoMonReelStat object + } + + void operator()(const eoPop& _pop){ + double tmpStat(0.); + // START Code for computing the statistics - in tmpStat + // tmpStat = blablabla + // END Code for computing the statistics + eoStat::value() = tmpStat; // store the stat in the eoParam value() field + } + + virtual std::string className(void) const { return "eoMyStructStat"; } +private : +// START Private data of an eoMyStructStat object + // varType anyVariable; // for example ... +// END Private data of an eoMyStructStat object +}; + +#endif diff --git a/trunk/eo/tutorial/html/BitEA.html b/trunk/eo/tutorial/html/BitEA.html new file mode 100644 index 000000000..7d75bec5b --- /dev/null +++ b/trunk/eo/tutorial/html/BitEA.html @@ -0,0 +1,261 @@ + + + + + + BitEA.cpp + + +Back to Lesson 4 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+

+BitEA.cpp

+Click on the figure to see the corresponding code.
+In the code, the colors are meaningfull
+The actual code is in boldface and the comment in normal face. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
  + + + + + +
+#include <iostream>
+#include <ga/make_ga.h>
+#include <apply.h>
+
+
+ + + + +
+ +#include "binary_value.h"
+
+
+ + + + +
+ +using namespace std;
+int main(int argc, char* argv[])
+{
+  try
+  {
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+// define your genotype and fitness types
+  typedef eoBit<double> EOT;
+
+
+ + + + +
+ +  eoParser parser(argc, argv);  // for user-parameter reading
+
+
+ + + + +
+ +  eoState state;      // keeps all things allocated
+  ///// FIRST, problem or representation dependent stuff
+  //////////////////////////////////////////////////////
+
+
+ + + + +
+ +  // The evaluation fn - encapsulated into an eval counter for output
+  eoEvalFuncPtr<EOT, float> mainEval( binary_value<EOT> );
+  eoEvalFuncCounter<EOT> eval(mainEval);
+
+
+ + + + +
+ +  // the genotype - through a genotype initializer
+  eoInit<EOT>& init = make_genotype(parser, state, EOT());
+
+
+ + + + +
+ +  // Build the variation operator (any seq/prop construct)
+  eoGenOp<EOT>& op = make_op(parser, state, init);
+
+
+ + + + +
+ +  //// Now the representation-independent things
+  //////////////////////////////////////////////
+  // initialize the population - and evaluate
+  // yes, this is representation indepedent once you have an eoInit
+  eoPop<EOT>& pop    = make_pop(parser, state, init);
+
+
+ + + + +
+ +  // stopping criteria
+  eoContinue<EOT> & term = make_continue(parser, state, eval);
+  // output
+  eoCheckPoint<EOT> & checkpoint = make_checkpoint(parser, state, eval, term);
+
+
+ + + + +
+ +  // algorithm (need the operator!)
+  eoAlgo<EOT>& ga = make_algo_scalar(parser, state, eval, checkpoint, op);
+  ///// End of construction of the algorith
+  /////////////////////////////////////////
+
+
+ + + + +
+ +  // to be called AFTER all parameters have been read!!!
+  make_help(parser);
+  //// GO
+  ///////
+
+
+ + + + +
+ +  // evaluate intial population AFTER help and status in case it takes time
+  apply(eval, pop);
+
+
+ + + + +
+ +  // print it out (sort witout modifying)
+  cout << "Initial Population\n";
+  pop.sortedPrintOn(cout);
+  cout << endl;
+
+
+ + + + +
+ +  run_ea(ga, pop); // run the ga
+
+
+ + + + +
+ +  // print it out (sort witout modifying)
+  cout << "Final Population\n";
+  pop.sortedPrintOn(cout);
+  cout << endl;
+
+
+ + + + +
+ +  }
+  catch(exception& e)
+  {
+      cout << e.what() << endl;
+  }
+}
+
+
Back to Lesson 4 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+
Last +modified: Wed Mar 6 05:40:27 2002 + + + diff --git a/trunk/eo/tutorial/html/EA_tutorial.jpg b/trunk/eo/tutorial/html/EA_tutorial.jpg new file mode 100644 index 000000000..11c0695fc Binary files /dev/null and b/trunk/eo/tutorial/html/EA_tutorial.jpg differ diff --git a/trunk/eo/tutorial/html/FirstBitEA.html b/trunk/eo/tutorial/html/FirstBitEA.html new file mode 100644 index 000000000..4caa11055 --- /dev/null +++ b/trunk/eo/tutorial/html/FirstBitEA.html @@ -0,0 +1,369 @@ + + + + + + FirstBitEA.cpp + + + +Back to Lesson 2 - Tutorial +main page - Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
+
+
+

+FirstBitEA.cpp

+Click on the figure to see the corresponding code.
+In the code, the colors are meaningfull
+The actual code is in boldface and the comment in normal face. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
  + + + + + +
+//-----------------------------------------------------------------------------
+// FirstBitEA.cpp
+//-----------------------------------------------------------------------------
+//*
+// Still an instance of a VERY simple Bitstring Genetic Algorithm
+// (see FirstBitGA.cpp) but now with  Breeder - and Combined Ops
+//
+//-----------------------------------------------------------------------------
+// standard includes
+#include <stdexcept>  // runtime_error
+#include <iostream>    // cout
+#include <strstream>  // ostrstream, istrstream
+// the general include for eo
+#include <eo>
+
+
+ + + + +
+ +#include <ga.h>
+//-----------------------------------------------------------------------------
+// define your individuals
+typedef eoBit<double> Indi; // A bitstring with fitness double
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+// a simple fitness function that computes the number of ones of a bitstring
+// Now in a separate file, and declared as binary_value(const vector<bool> &)
+#include "binary_value.h"
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+void main_function(int argc, char **argv)
+{
+
+
+ + + + +
+ +  const unsigned int SEED = 42; // seed for random number generator
+  const unsigned int T_SIZE = 3; // size for tournament selection
+  const unsigned int VEC_SIZE = 8; // Number of bits in genotypes
+  const unsigned int POP_SIZE = 20; // Size of population
+  const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP
+  const float CROSS_RATE = 0.8; // Crossover rate
+  const double P_MUT_PER_BIT = 0.01; // probability of bit-flip mutation
+  const float MUT_RATE = 1.0; // mutation rate
+  // some parameters for chosing among different operators
+  const double onePointRate = 0.5;        // rate for 1-pt Xover
+  const double twoPointsRate = 0.5;        // rate for 2-pt Xover
+  const double URate = 0.5;                      // rate for Uniform Xover
+  const double bitFlipRate = 0.5;          // rate for bit-flip mutation
+  const double oneBitRate = 0.5;            // rate for one-bit mutation
+
+
+ + + + +
+ +  //////////////////////////
+  //  Random seed
+  //////////////////////////
+  //reproducible random seed: if you don't change SEED above,
+  // you'll aways get the same result, NOT a random run
+  rng.reseed(SEED);
+
+
+ + + + +
+ +  /////////////////////////////
+  // Fitness function
+  ////////////////////////////
+  // Evaluation: from a plain C++ fn to an EvalFunc Object
+  // you need to give the full description of the function
+  eoEvalFuncPtr<Indi, double, const vector<bool>& > eval(  binary_value );
+
+
+ + + + +
+ +  ////////////////////////////////
+  // Initilisation of population
+  ////////////////////////////////
+  // based on eoUniformGenerator class (see utils/eoRndGenerators.h)
+  eoUniformGenerator<bool> uGen;
+  eoInitFixedLength<Indi> random(VEC_SIZE, uGen);
+  // Initialization of the population
+  eoPop<Indi> pop(POP_SIZE, random);
+  // and evaluate it in one line
+  apply<Indi>(eval, pop); // STL syntax
+
+
+ + + + +
+ +  // sort pop before printing it!
+  pop.sort();
+  // Print (sorted) intial population (raw printout)
+  cout << "Initial Population" << endl;
+  cout << pop;
+
+
+ + + + +
+ +  /////////////////////////////////////
+  // selection and replacement
+  ////////////////////////////////////
+
+
+ + + + +
+ +  // The robust tournament selection
+  eoDetTournamentSelect<Indi> selectOne(T_SIZE);            // T_SIZE in [2,POP_SIZE]
+ +  // is now encapsulated in a eoSelectPerc (entage)
+  eoSelectPerc<Indi> select(selectOne);// by default rate==1
+
+
+ + + + +
+ +  // And we now have the full slection/replacement - though with
+  // no replacement (== generational replacement) at the moment :-)
+  eoNoReplacement<Indi> replace;
+
+
+ + + + +
+ +  //////////////////////////////////////
+  // The variation operators
+  //////////////////////////////////////
+
+
+ + + + +
+ +  // 1-point crossover for bitstring
+  eo1PtBitXover<Indi> xover1;
+  // uniform crossover for bitstring
+  eoUBitXover<Indi> xoverU;
+  // 2-pots xover
+  eoNPtsBitXover<Indi> xover2(2);
+  // Combine them with relative rates
+  eoPropCombinedQuadOp<Indi> xover(xover1, onePointRate);
+  xover.add(xoverU, URate);
+  xover.add(xover2, twoPointsRate, true);
+
+
+ + + + +
+ +  
+  // standard bit-flip mutation for bitstring
+  eoBitMutation<Indi>  mutationBitFlip(P_MUT_PER_BIT);
+  // mutate exactly 1 bit per individual
+  eoDetBitFlip<Indi> mutationOneBit;
+  // Combine them with relative rates
+  eoPropCombinedMonOp<Indi> mutation(mutationBitFlip, bitFlipRate);
+  mutation.add(mutationOneBit, oneBitRate, true);
+  
+ +  // The operators are  encapsulated into an eoTRansform object
+  eoSGATransform<Indi> transform(xover, CROSS_RATE, mutation, MUT_RATE);
+
+
+ + + + +
+ + +
+ + + + +
+ +  //////////////////////////////////////
+  // termination conditions: use more than one
+  /////////////////////////////////////
+  // stop after MAX_GEN generations
+  eoGenContinue<Indi> genCont(MAX_GEN);
+  // do MIN_GEN gen., then stop after STEADY_GEN gen. without improvement
+  eoSteadyFitContinue<Indi> steadyCont(MIN_GEN, STEADY_GEN);
+  // stop when fitness reaches a target (here VEC_SIZE)
+  eoFitContinue<Indi> fitCont(0);
+  // do stop when one of the above says so
+  eoCombinedContinue<Indi> continuator(genCont);
+  continuator.add(steadyCont);
+  continuator.add(fitCont);
+
+
+ + + + +
+ +  /////////////////////////////////////////
+  // the algorithm
+  ////////////////////////////////////////
+  // Easy EA requires
+  // selection, transformation, eval, replacement, and stopping criterion
+  eoEasyEA<Indi> gga(continuator, eval, select, transform, replace);
+  // Apply algo to pop - that's it!
+  gga(pop);
+  
+
+
+ + + + +
+ +  // Print (sorted) intial population
+  pop.sort();
+  cout << "FINAL Population\n" << pop << endl;
+
+
+ + + + +
+ +}
+// A main that catches the exceptions
+int main(int argc, char **argv)
+{
+#ifdef _MSC_VER
+  //  rng.reseed(42);
+      int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
+        flag |= _CRTDBG_LEAK_CHECK_DF;
+      _CrtSetDbgFlag(flag);
+//    _CrtSetBreakAlloc(100);
+#endif
+      try
+      {
+              main_function(argc, argv);
+      }
+      catch(exception& e)
+      {
+              cout << "Exception: " << e.what() << '\n';
+      }
+      return 1;
+}
+
+
Back to Lesson 2 - Tutorial +main page - Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+
Last +modified: Sun Nov 19 22:26:27 2000 + + + diff --git a/trunk/eo/tutorial/html/FirstBitGA.html b/trunk/eo/tutorial/html/FirstBitGA.html new file mode 100644 index 000000000..d3012829a --- /dev/null +++ b/trunk/eo/tutorial/html/FirstBitGA.html @@ -0,0 +1,312 @@ + + + + + + FirstBitGA.html + + + +Back to Lesson 1 - Tutorial +main page - Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
+
+
+

+Code for FirstBitGA

+Click on the figure to see the corresponding code. +
In the code, the colors are meaningfull +
The actual code is in boldface and the comment in normal face. +
+
+ + + + +
//----------------------------------------------------------------------------- +
// FirstBitGA.cpp +
//----------------------------------------------------------------------------- +
//* +
// An instance of a VERY simple Bitstring +Genetic Algorithm +
// +
//----------------------------------------------------------------------------- +
// standard includes +
#include <stdexcept>  // runtime_error  +
#include <iostream>    +// cout +
#include <strstream>  // ostrstream, +istrstream +
// the general include for eo +
#include <eo>
+ + + + + +
#include <ga.h>
+//----------------------------------------------------------------------------- +
// define your individuals +
typedef eoBit<double> Indi;        +// A bitstring with fitness double
+ + + + + +
//----------------------------------------------------------------------------- +
// a simple fitness function that computes +the number of ones of a bitstring +
//  @param _indi A biststring individual +
double binary_value(const +Indi & _indi) +
{ +
 double sum = 0; +
 for (unsigned i = 0; i < _indi.size(); +i++) +
     sum += _indi[i]; +
 return sum; +
}
+ + + + + +
//----------------------------------------------------------------------------- +
void main_function(int argc, char **argv) +
{
+ + + + + +
 // all parameters are hard-coded! +
 const unsigned int SEED = 42;          +// seed for random number generator +
 const unsigned int T_SIZE = 3;        +// size for tournament selection +
 const unsigned int VEC_SIZE = 8;    +// Number of bits in genotypes +
 const unsigned int POP_SIZE = 20;  +// Size of population +
 const unsigned int MAX_GEN = 100;  +// Maximum number of generation before STOP +
 const float CROSS_RATE = 0.8;          +// Crossover rate +
 const double P_MUT_PER_BIT = 0.01; +// probability of bit-flip mutation +
 const float MUT_RATE = 1.0;              +// mutation rate
+ + + + + +
////////////////////////// +
 //  Random seed +
 ////////////////////////// +
 //reproducible random seed: +if you don't change SEED above,  +
 // you'll aways get the same +result, NOT a random run +
 rng.reseed(SEED);
+ + + + + +
 ///////////////////////////// +
 // Fitness function +
 //////////////////////////// +
 // Evaluation: from a plain +C++ fn to an EvalFunc Object +
 eoEvalFuncPtr<Indi> eval(  +binary_value );
+ + + + + +
 //////////////////////////////// +
 // Initilisation of population +
 //////////////////////////////// +
 // declare the population +
 eoPop<Indi> pop; +
 // fill it! +
 for (unsigned int igeno=0; igeno<POP_SIZE; +igeno++) +
     { +
         +Indi v;                    +// void individual, to be filled +
         +for (unsigned ivar=0; ivar<VEC_SIZE; ivar++) +
             +{ +
                 +bool r = rng.flip(); // new value, random in {0,1} +
                 +v.push_back(r);          // +append that random value to v +
             +} +
         +eval(v);                                +// evaluate it +
         +pop.push_back(v);              +// and put it in the population +
     }
+ + + + + +
 // sort pop before printing +it! +
 pop.sort(); +
 // Print (sorted) intial population +(raw printout) +
 cout << "Initial Population" +<< endl; +
 cout << pop;
+ + + + + +
 ///////////////////////////////////// +
 // selection and replacement +
 ////////////////////////////////////
+ + + + + +
 // The robust tournament selection +
 eoDetTournamentSelect<Indi> select(T_SIZE);  +// T_SIZE in [2,POP_SIZE]
+ + + + + +
 // The simple GA evolution engine +uses generational replacement +
 // so no replacement procedure +is needed
+ + + + + +
+ + + + + +
 ////////////////////////////////////// +
 // The variation operators +
 //////////////////////////////////////
+ + + + + +
 // 1-point crossover for bitstring +
 eo1PtBitXover<Indi> xover;
+ + + + + +
+
 // standard bit-flip mutation +for bitstring +
 eoBitMutation<Indi>  mutation(P_MUT_PER_BIT);
+ + + + + +
 ////////////////////////////////////// +
 // termination condition +
 ///////////////////////////////////// +
 // stop after MAX_GEN generations +
 eoGenContinue<Indi> continuator(MAX_GEN); +
 
+ + + + + +
 ///////////////////////////////////////// +
 // the algorithm +
 //////////////////////////////////////// +
 // standard Generational GA +requires as parameters +
 // selection, evaluation, crossover +and mutation, stopping criterion +

 eoSGA<Indi> gga(select, xover, +CROSS_RATE, mutation, MUT_RATE,  +
                                 +eval, continuator); +
 // Apply algo to pop - that's +it! +
 gga(pop); +
 

+ + + + + +
 // Print (sorted) intial population +
 pop.sort(); +
 cout << "FINAL Population\n" +<< pop << endl;
+ + + + + +
} +
// A main that catches the exceptions +
int main(int argc, char **argv) +
{ +
#ifdef _MSC_VER +
 //  rng.reseed(42); +
     int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); +
       flag +|= _CRTDBG_LEAK_CHECK_DF; +
     _CrtSetDbgFlag(flag); +
//    _CrtSetBreakAlloc(100); +
#endif +
     try +
     { +
             +main_function(argc, argv); +
     } +
     catch(exception& +e) +
     { +
             +cout << "Exception: " << e.what() << '\n'; +
     } +
     return 1; +
}
+ +
Back to Lesson 1 - Tutorial +main page - Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Sun Nov +19 08:31:26 2000 + + diff --git a/trunk/eo/tutorial/html/FirstRealEA.html b/trunk/eo/tutorial/html/FirstRealEA.html new file mode 100644 index 000000000..ad60c2c22 --- /dev/null +++ b/trunk/eo/tutorial/html/FirstRealEA.html @@ -0,0 +1,354 @@ + + + + + + FirstRealEA.cpp + + +Back to Lesson 2 - Tutorial +main page - Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
+
+
+

+FirstRealEA.cpp

+Click on the figure to see the corresponding code. +
In the code, the colors are meaningfull +
The actual code is in boldface and the comment in normal face. +
+
+ + + + +
//----------------------------------------------------------------------------- +
// FirstRealEA.cpp +
//----------------------------------------------------------------------------- +
//* +
// Still an instance of a VERY simple Real-coded  +Genetic Algorithm  +
// (see FirstBitGA.cpp) but now with  +Breeder - and Combined Ops +
// +
//----------------------------------------------------------------------------- +
// standard includes +
#include <stdexcept>  // runtime_error  +
#include <iostream>    +// cout +
#include <strstream>  // ostrstream, +istrstream +
// the general include for eo +
#include <eo>
+ + + + + +
#include <es.h>
+//----------------------------------------------------------------------------- +
// define your individuals +
typedef eoReal<double> Indi; 
+ + + + + +
//----------------------------------------------------------------------------- +
// a simple fitness function that computes +the euclidian norm of a real vector +
// Now in a separate file, and declared as +binary_value(const vector<bool> &) +
#include "real_value.h"
+ + + + + +
//----------------------------------------------------------------------------- +
void main_function(int argc, char **argv) +
{
+ + + + + +
 const unsigned int SEED = 42; // +seed for random number generator +
 const unsigned int T_SIZE = 3; // +size for tournament selection +
 const unsigned int VEC_SIZE = 8; +// Number of object variables in genotypes +
 const unsigned int POP_SIZE = 20; +// Size of population +
 const unsigned int MAX_GEN = 500; +// Maximum number of generation before STOP +
 const unsigned int MIN_GEN = 10;  +// Minimum number of generation before ... +
 const unsigned int STEADY_GEN = +50; // stop after STEADY_GEN gen. without improvelent +
 const float P_CROSS = 0.8; // +Crossover probability +
 const float P_MUT = 0.5; // +mutation probability +
 const double EPSILON = 0.01; // +range for real uniform mutation +
       double +SIGMA = 0.3;        // std dev. +for normal mutation +
 // some parameters for chosing +among different operators +
 const double hypercubeRate = 0.5;    +// relative weight for hypercube Xover +
 const double segmentRate = 0.5; +// relative weight for segment Xover +
 const double uniformMutRate = 0.5; +// relative weight for uniform mutation +
 const double detMutRate = 0.5;     +// relative weight for det-uniform mutation +
 const double normalMutRate = 0.5;  +// relative weight for normal mutation
+ + + + + +
 ////////////////////////// +
 //  Random seed +
 ////////////////////////// +
 //reproducible random seed: +if you don't change SEED above,  +
 // you'll aways get the same +result, NOT a random run +
 rng.reseed(SEED);
+ + + + + +
 ///////////////////////////// +
 // Fitness function +
 //////////////////////////// +
 // Evaluation: from a plain +C++ fn to an EvalFunc Object +
 // you need to give the full +description of the function +
 eoEvalFuncPtr<Indi, double, const +vector<double>& > eval(  real_value );
+ + + + + +
 //////////////////////////////// +
 // Initilisation of population +
 //////////////////////////////// +
 // based on a uniform generator +
 eoInitFixedLength<Indi, uniform_generator<double> +> +
         +random(VEC_SIZE, uniform_generator<double>(-1.0, 1.0)); +
   // Initialization of +the population +
 eoPop<Indi> pop(POP_SIZE, random); +

 // and evaluate it in one loop +
 apply<Indi>(eval, pop); // +STL syntax

+ + + + + +
 // sort pop before printing +it! +
 pop.sort(); +
 // Print (sorted) intial population +(raw printout) +
 cout << "Initial Population" +<< endl; +
 cout << pop;
+ + + + + +
 ///////////////////////////////////// +
 // selection and replacement +
 ////////////////////////////////////
+ + + + + +
 // The robust tournament selection +
 eoDetTournamentSelect<Indi> selectOne(T_SIZE); +
// +is now encapsulated in a eoSelectPerc (entage) +
 eoSelectPerc<Indi> select(selectOne);// +by default rate==1
+ + + + + +
 // And we now have the full +slection/replacement - though with  +
 // no replacement (== generational +replacement) at the moment :-) +
 eoNoReplacement<Indi> replace; 
+ + + + + +
 ////////////////////////////////////// +
 // The variation operators +
 //////////////////////////////////////
+ + + + + +
 // uniform chooce on segment +made by the parents +
 eoSegmentCrossover<Indi> xoverS; +
 // uniform choice in hypercube +built by the parents +
 eoHypercubeCrossover<Indi> xoverA; +
 // Combine them with relative +weights +
 eoPropCombinedQuadOp<Indi> xover(xoverS, +segmentRate); +
 xover.add(xoverA, hypercubeRate, +true);
+ + + + + +
+
 // offspring(i) uniformly chosen +in [parent(i)-epsilon, parent(i)+epsilon] +
 eoUniformMutation<Indi>  +mutationU(EPSILON);  +
 // k (=1) coordinates of parents +are uniformly modified +
 eoDetUniformMutation<Indi>  +mutationD(EPSILON);  +
 // all coordinates of parents are normally +modified (stDev SIGMA) +
 eoNormalMutation<Indi>  +mutationN(SIGMA);  +
 // Combine them with relative +weights +
 eoPropCombinedMonOp<Indi> mutation(mutationU, +uniformMutRate); +
 mutation.add(mutationD, detMutRate); +
 mutation.add(mutationN, normalMutRate, +true); +

 // The operators are  encapsulated +into an eoTRansform object +
 eoSGATransform<Indi> transform(xover, +P_CROSS, mutation, P_MUT);

+ + + + + +
+ + + + + +
 ////////////////////////////////////// +
 // termination conditions: use +more than one +
 ///////////////////////////////////// +
 // stop after MAX_GEN generations +
 eoGenContinue<Indi> genCont(MAX_GEN); +
 // do MIN_GEN gen., then stop +after STEADY_GEN gen. without improvement +
 eoSteadyFitContinue<Indi> steadyCont(MIN_GEN, +STEADY_GEN); +
 // stop when fitness reaches +a target (here VEC_SIZE) +
 eoFitContinue<Indi> fitCont(0); +
 // do stop when one of the above +says so +
 eoCombinedContinue<Indi> continuator(genCont); +
 continuator.add(steadyCont); +
 continuator.add(fitCont);
+ + + + + +
 ///////////////////////////////////////// +
 // the algorithm +
 //////////////////////////////////////// +
 // Easy EA requires  +
 // selection, transformation, +eval, replacement, and stopping criterion +
 eoEasyEA<Indi> gga(continuator, +eval, select, transform, replace); +
 // Apply algo to pop - that's +it! +
 cout << "\n              +Here we go\n\n"; +
 gga(pop); +
 
+ + + + + +
 // Print (sorted) intial population +
 pop.sort(); +
 cout << "FINAL Population\n" +<< pop << endl;
+ + + + + +
} +
// A main that catches the exceptions +
int main(int argc, char **argv) +
{ +
#ifdef _MSC_VER +
 //  rng.reseed(42); +
     int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); +
       flag +|= _CRTDBG_LEAK_CHECK_DF; +
     _CrtSetDbgFlag(flag); +
//    _CrtSetBreakAlloc(100); +
#endif +
     try +
     { +
             +main_function(argc, argv); +
     } +
     catch(exception& +e) +
     { +
             +cout << "Exception: " << e.what() << '\n'; +
     } +
     return 1; +
}
+ +
Back to Lesson 2 - Tutorial +main page - Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Wed Nov +29 07:38:36 2000 + + diff --git a/trunk/eo/tutorial/html/FirstRealGA.html b/trunk/eo/tutorial/html/FirstRealGA.html new file mode 100644 index 000000000..f228adfac --- /dev/null +++ b/trunk/eo/tutorial/html/FirstRealGA.html @@ -0,0 +1,350 @@ + + + + + + FirstRealGA.html + + + +Back to Lesson 1 - Tutorial +main page - Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
+
+
+

+Code for FirstRealGA

+Click on the figure to see the corresponding code.
+In the code, the colors are meaningfull
+The actual code is in boldface and the comment in normal face. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
  + + + + + +
+//-----------------------------------------------------------------------------
+// FirstRealGA.cpp
+//-----------------------------------------------------------------------------
+//*
+// An instance of a VERY simple Real-coded Genetic Algorithm
+//
+//-----------------------------------------------------------------------------
+// standard includes
+#include <stdexcept>  // runtime_error
+#include <iostream>    // cout
+#include <strstream>  // ostrstream, istrstream
+// the general include for eo
+#include <eo>
+
+
+ + + + +
+ +#include <es.h>
+//-----------------------------------------------------------------------------
+// define your individuals
+ typedef eoReal<double> Indi;
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+// a simple fitness function that computes the euclidian norm of a real vector
+//      @param _indi A real-valued individual
+ +double real_value(const Indi & _indi)
+{
+  double sum = 0;
+  for (unsigned i = 0; i < _indi.size(); i++)
+          sum += _indi[i]*_indi[i];
+  return (-sum);                      // maximizing only
+}
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+void main_function(int argc, char **argv)
+{
+
+
+ + + + +
+ +  // all parameters are hard-coded!
+  const unsigned int SEED = 42; // seed for random number generator
+  const unsigned int VEC_SIZE = 8; // Number of object variables in genotypes
+  const unsigned int POP_SIZE = 20; // Size of population
+  const unsigned int T_SIZE = 3; // size for tournament selection
+  const unsigned int MAX_GEN = 500; // Maximum number of generation before STOP
+  const float CROSS_RATE = 0.8; // Crossover rate
+  const double EPSILON = 0.01;  // range for real uniform mutation
+  const float MUT_RATE = 0.5;    // mutation rate
+
+
+ + + + +
+ + +  //////////////////////////
+  //  Random seed
+  //////////////////////////
+  //reproducible random seed: if you don't change SEED above,
+  // you'll aways get the same result, NOT a random run
+  rng.reseed(SEED);
+
+
+ + + + +
+ +  /////////////////////////////
+  // Fitness function
+  ////////////////////////////
+  // Evaluation: from a plain C++ fn to an EvalFunc Object
+  eoEvalFuncPtr<Indi> eval(  real_value );
+
+
+ + + + +
+ +  ////////////////////////////////
+  // Initilisation of population
+  ////////////////////////////////
+  // declare the population
+  eoPop<Indi> pop;
+  // fill it!
+  for (unsigned int igeno=0; igeno<POP_SIZE; igeno++)
+      {
+          Indi v;                  // void individual, to be filled
+          for (unsigned ivar=0; ivar<VEC_SIZE; ivar++)
+              {
+                  double r = 2*rng.uniform() - 1; // new value, random in [-1,1)
+                  v.push_back(r);            // append that random value to v
+              }
+          eval(v);                                  // evaluate it
+          pop.push_back(v);                // and put it in the population
+      }
+
+
+ + + + +
+ +  // sort pop before printing it!
+  pop.sort();
+  // Print (sorted) intial population (raw printout)
+  cout << "Initial Population" << endl;
+  cout << pop;
+
+
+ + + + +
+ +  /////////////////////////////////////
+  // selection and replacement
+  ////////////////////////////////////
+
+
+ + + + +
+ +  // The robust tournament selection
+  eoDetTournamentSelect<Indi> select(T_SIZE);            // T_SIZE in [2,POP_SIZE]
+
+
+ + + + +
+ +  // eoSGA uses generational replacement by default
+  // so no replacement procedure has to be given
+
+
+ + + + +
+ + +
+ + + + +
+ +  //////////////////////////////////////
+  // termination condition
+  /////////////////////////////////////
+  // stop after MAX_GEN generations
+  eoGenContinue<Indi> continuator(MAX_GEN);
+  
+
+
+ + + + +
+ +  //////////////////////////////////////
+  // The variation operators
+  //////////////////////////////////////
+
+
+ + + + +
+ +  // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon]
+  eoUniformMutation<Indi>  mutation(EPSILON);
+
+
+ + + + +
+ +  // offspring(i) is a linear combination of parent(i)
+  eoSegmentCrossover<Indi> xover;
+
+
+ + + + +
+ +  /////////////////////////////////////////
+  // the algorithm
+  ////////////////////////////////////////
+  // standard Generational GA requires
+  // selection, evaluation, crossover and mutation, stopping criterion
+
+  eoSGA<Indi> gga(select, xover, CROSS_RATE, mutation, MUT_RATE,
+                                    eval, continuator);
+  // Apply algo to pop - that's it!
+  gga(pop);
+  
+
+
+ + + + +
+ +  // Print (sorted) intial population
+  pop.sort();
+  cout << "FINAL Population\n" << pop << endl;
+
+
+ + + + +
+ +}
+// A main that catches the exceptions
+int main(int argc, char **argv)
+{
+#ifdef _MSC_VER
+  //  rng.reseed(42);
+      int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
+        flag |= _CRTDBG_LEAK_CHECK_DF;
+      _CrtSetDbgFlag(flag);
+//    _CrtSetBreakAlloc(100);
+#endif
+      try
+      {
+              main_function(argc, argv);
+      }
+      catch(exception& e)
+      {
+              cout << "Exception: " << e.what() << '\n';
+      }
+      return 1;
+}
+
+
Back to Lesson 1 - Tutorial +main page - Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+
Last +modified: Sun Nov 19 08:31:29 2000 + + + diff --git a/trunk/eo/tutorial/html/Firstmerge.html b/trunk/eo/tutorial/html/Firstmerge.html new file mode 100644 index 000000000..2c4e7b9c5 --- /dev/null +++ b/trunk/eo/tutorial/html/Firstmerge.html @@ -0,0 +1,286 @@ + + + + + + Differences + + +Back to Lesson 1 - +Tutorial +main page - +Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
+
+
+

+FirstBitGA and FirstRealGA: differences

+Below is a comparison of the codes for both algorithms (comments have been +removed). +
Warning: the pink +background here denotes the differences, not the section  of +the algorithm, which is only recalled by the color of the text! +
These differences are limited to +
    +
  • +the declaration of the type of the genotypes,
  • + +
  • +the fitness function (what did you expect +:-),
  • + +
  • +the initialization (and if you look carefully, +you'll find out that only a small part of the initialization is different, +as both genotypes are eoFixedLength objects) and of course
  • + +
  • +the choice of variation operators (including +the parameter for the mutation).
  • +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#include +<stdexcept > +
#include <iostream> +
#include <strstream> +
#include <eo>
#include +<stdexcept > +
#include <iostream> +
#include <strstream> +
#include <eo>
#include <es.h>
+typedef eoReal<double> Indi;
#include <ga.h>
+typedef eoBit<double> Indi;
double +real_value(const Indi & _indi) +
{ +
  double +sum = 0; +
  for (unsigned +i = 0; i < _indi.size(); i++) +
      +sum += _indi[i]*_indi[i]; +
  return +(-sum);   // maximizing +
}
double +binary_value(const Indi & _indi) +
{ +
  double +sum = 0; +
  for (unsigned +i = 0; i < _indi.size(); i++) +
      +sum += _indi[i]; +
  return +(sum); +
}
void +main_function(int argc, char **argv) +
{ +
const unsigned +int SEED = 42; +
const unsigned +int VEC_SIZE = 8; +
const unsigned +int POP_SIZE = 20; +
const unsigned +int T_SIZE = 3; +
const unsigned +int MAX_GEN = 500; +
const float +CROSS_RATE = 0.8; +
const float +MUT_RATE = 0.5;
void +main_function(int argc, char **argv) +
{ +
const unsigned +int SEED = 42; +
const unsigned +int VEC_SIZE = 8; +
const unsigned +int POP_SIZE = 20; +
const unsigned +int T_SIZE = 3; +
const unsigned +int MAX_GEN = 500; +
const float +CROSS_RATE = 0.8; +
const float +MUT_RATE = 0.5;
const +double EPSILON = 0.01;const +double P_MUT_PER_BIT = 0.01;
eoEvalFuncPtr<Indi> +eval(real_value);eoEvalFuncPtr<Indi> +eval(binary_value);
eoPop<Indi> +pop; +
for (unsigned +int igeno=0; igeno<POP_SIZE; igeno++) +
  { +
    +Indi v; +
    +for (unsigned ivar=0; ivar<VEC_SIZE; ivar++) +
      +{
eoPop<Indi> +pop; +
for (unsigned +int igeno=0; igeno<POP_SIZE; igeno++) +
  { +
    +Indi v; +
    +for (unsigned ivar=0; ivar<VEC_SIZE; ivar++) +
      +{
        +double r = 2*rng.uniform() - 1;        +bool r = rng.flip(); 
        +v.push_back(r); // +
      +} +
    +eval(v); +
    +pop.push_back(v); +
  } +
pop.sort(); +
cout << +"Initial Population" << endl; +
cout << +pop; +
eoDetTournament<Indi> +select(T_SIZE); +
eoGenContinue<Indi> +continuator(MAX_GEN);
        +v.push_back(r); // +
      +} +
    +eval(v); +
    +pop.push_back(v); +
  } +
pop.sort(); +
cout << +"Initial Population" << endl; +
cout << +pop; +
eoDetTournament<Indi> +select(T_SIZE); +
eoGenContinue<Indi> +continuator(MAX_GEN);
eoUniformMutation<Indi>  +mutation(EPSILON); +
eoSegmentCrossover<Indi> +xover;
eoBitMutation<Indi>  +mutation(P_MUT_PER_BIT); +
eo1PtBitXover<Indi> +xover;
+eoSGA<Indi> +gga(select, xover, CROSS_RATE, +
                +mutation, MUT_RATE, eval, continuator); +
gga(pop); +
pop.sort(); +
cout << +"FINAL Population\n" << pop << endl; +
} +
int main(int +argc, char **argv) +
{ +
... [technical +code removed] +
}
+eoSGA<Indi> +gga(select, xover, CROSS_RATE, +
                +mutation, MUT_RATE, eval, continuator); +
gga(pop); +
pop.sort(); +
cout << +"FINAL Population\n" << pop << endl; +
} +
int main(int +argc, char **argv) +
{ +
[... technical +code removed ] +
}
+ +
Back to Lesson 1 - +Tutorial +main page - +Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: Tue Nov 7 07:49:47 CET 2000 + + diff --git a/trunk/eo/tutorial/html/NoWay.html b/trunk/eo/tutorial/html/NoWay.html new file mode 100644 index 000000000..74d7204cc --- /dev/null +++ b/trunk/eo/tutorial/html/NoWay.html @@ -0,0 +1,77 @@ + + + + + + Tutorial: Solutions + + +Tutorial main page - +Algorithm-Based +- Component-Based - Programming +hints -EO +documentation +
+
+
+

+Tutorial:

+ +
Solutions of exercises
+ +

No, we won't +provide +any +hypertext link directly to the correct code, so you get a chance +to find out the solution by yourself without immediately going there  +:-))) +

What you should do: +

    +
  • +copy the code of an example onto another name (e.g. mytest.cpp)
  • + +
  • +edit and modify mytest.cpp +according to the corresponding instructions of the exercise
  • + +
  • +compile mytest.cpp by typing +make +mytest at system prompt, and you will hopefully get an +executable file named mytest +(for Unix systems: if eventually someone tells me how to do that in Windows, +apart that you'll probably end up with an executable file named mytest.exe...).
  • +
+ +
+
What you may do later: +

All solutions to exercises are in the same +sub-dir of the Tutorial directory than the example files (i.e. +Lesson1 for Lesson1, yes!) and are named exerciseN.p.cpp +where N is the lesson number and p the exercise number. Hence you may browse +through the code, eventually modifying it, and then simply type, in the +corresponding directory, +
... % make exerciseN.p +
which will compile file exerciseN.p.cpp +into executable exerciseN.p +(for Unix systems: if eventually someone tells me how to do that in Windows, +you'll probably end up with an executable file named exerciseN.p.exe). +

+


+
What you may not do: +
Complain that it does not work under Windows :-)
+ +
Tutorial main page - +Algorithm-Based +- Component-Based - Programming +hints - EO +documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: Fri Nov 3 18:49:12 CET 2000 + + diff --git a/trunk/eo/tutorial/html/OneMaxEA.html b/trunk/eo/tutorial/html/OneMaxEA.html new file mode 100644 index 000000000..47102a452 --- /dev/null +++ b/trunk/eo/tutorial/html/OneMaxEA.html @@ -0,0 +1,360 @@ + + + + + + Templates/OneMaxEA.cpp + + +Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+

+Templates/OneMaxEA.cpp

+The places where you have to put some code are on pink +background.. Only the the character +colors have the usual meaning. +
+ + + + +
/** -*- mode: c++; c-indent-level: +4; c++-member-init-indent: 8; comment-column: 35; -*- +
The above line is usefulin Emacs-like editors +
*/ +
/* +
Template for creating a new representation +in EO +
================================================ +
This is the template main file. +
It includes all other files that have been +generated by the script create.sh +
so it is the only file to compile. +
In case you want to build up a separate library +for your new Evolving Object, +
you'll need some work - follow what's done +in the src/ga dir, used in the +
main file BitEA in tutorial/Lesson4 dir. +
Or you can wait until we do it :-) +
*/ +
// Miscilaneous include and declaration  +
#include <iostream> +
using namespace std; +
// eo general include +
#include "eo" +
// the real bounds (not yet in general eo +include) +
#include "utils/eoRealVectorBounds.h" +
// include here whatever specific files for +your representation +
// Basically, this should include at least +the following +
/** definition of representation:  +
* class eoOneMax MUST derive from EO<FitT> +for some fitness +
*/
+ + + + + +
#include "eoOneMax.h" +
/** definition of initilizqtion:  +
* class eoOneMaxInit MUST derive from eoInit<eoOneMax> +
*/
+ + + + + +
#include "eoOneMaxInit.h" +
/** definition of evaluation:  +
* class eoOneMaxEvalFunc MUST derive from +eoEvalFunc<eoOneMax> +
* and should test for validity before doing +any computation +
* see tutorial/Templates/evalFunc.tmpl +
*/
+ + + + + +
#include "eoOneMaxEvalFunc.h" +
// GENOTYPE    eoOneMax ***MUST*** +be templatized over the fitness
+ + + + + +
// START fitness type: double or eoMaximizingFitness +if you are maximizing +
//                                        +eoMinimizingFitness if you are minimizing +
typedef eoMinimizingFitness MyFitT ; // +type of fitness  +
// END fitness type
+ + + + + +
+ + + + + +
// Then define your EO objects using that +fitness type +
typedef eoOneMax<MyFitT> Indi;           +// ***MUST*** derive from EO 
+ + + + + +
// create an initializer +
#include "make_genotype_OneMax.h" +
eoInit<Indi> & make_genotype(eoParser& +_parser, eoState&_state, Indi _eo) +
{ +
 return do_make_genotype(_parser, +_state, _eo); +
+ + + + + +
// and the variation operaotrs +
#include "make_op_OneMax.h" +
eoGenOp<Indi>&  make_op(eoParser& +_parser, eoState& _state, eoInit<Indi>& _init) +
{ +
 return do_make_op(_parser, _state, +_init); +
}
+ + + + + +
// Use existing modules to define representation +independent routines +
// These are parser-based definitions of +objects +
// how to initialize the population  +
// it IS representation independent if an +eoInit is given +
#include <do/make_pop.h> +
eoPop<Indi >&  make_pop(eoParser& +_parser, eoState& _state, eoInit<Indi> & _init) +
{ +
 return do_make_pop(_parser, _state, +_init); +
}
+ + + + + +
// the stopping criterion +
#include <do/make_continue.h> +
eoContinue<Indi>& make_continue(eoParser& +_parser, eoState& _state, eoEvalFuncCounter<Indi> & _eval) +
{ +
 return do_make_continue(_parser, +_state, _eval); +
}
+ + + + + +
// outputs (stats, population dumps, ...) +
#include <do/make_checkpoint.h> +
eoCheckPoint<Indi>& make_checkpoint(eoParser& +_parser, eoState& _state, eoEvalFuncCounter<Indi>& _eval, eoContinue<Indi>& +_continue)  +
{ +
 return do_make_checkpoint(_parser, +_state, _eval, _continue); +
}
+ + + + + +
// evolution engine (selection and replacement) +
#include <do/make_algo_scalar.h> +
eoAlgo<Indi>&  make_algo_scalar(eoParser& +_parser, eoState& _state, eoEvalFunc<Indi>& _eval, eoContinue<Indi>& +_continue, eoGenOp<Indi>& _op) +
{ +
 return do_make_algo_scalar(_parser, +_state, _eval, _continue, _op); +
}
+ + + + + +
// simple call to the algo. stays there for +consistency reasons  +
// no template for that one +
#include <do/make_run.h> +
// the instanciating fitnesses +
#include <eoScalarFitness.h> +
void run_ea(eoAlgo<Indi>& _ga, +eoPop<Indi>& _pop) +
{ +
 do_run(_ga, _pop); +
} +
// checks for help demand, and writes the +status file +
// and make_help; in libutils +
void make_help(eoParser & _parser); +
// now use all of the above, + representation +dependent things +
int main(int argc, char* argv[]) +
{ +
 try +
 { +
 eoParser parser(argc, argv);   +// for user-parameter reading +
 eoState state;       +// keeps all things allocated
+ + + + + +
      // +The fitness +
      ////////////// +
   eoOneMaxEvalFunc<Indi> +plainEval /* (varType  _anyVariable) */;; +
    // turn that object +into an evaluation counter +
   eoEvalFuncCounter<Indi> +eval(plainEval);
+ + + + + +
  // the genotype - through a +genotype initializer +
 eoInit<Indi>& init = make_genotype(parser, +state, Indi());
+ + + + + +
  // Build the variation operator +(any seq/prop construct) +
 eoGenOp<Indi>& op = make_op(parser, +state, init); +
  //// Now the representation-independent +things  +
  // +
  // YOU SHOULD NOT NEED TO MODIFY +ANYTHING BEYOND THIS POINT +
  // unless you want to add specific +statistics to the checkpoint +
  //////////////////////////////////////////////
+ + + + + +
  // initialize the population +
  // yes, this is representation +indepedent once you have an eoInit +
 eoPop<Indi>& pop    += make_pop(parser, state, init);
+ + + + + +
  // stopping criteria +
 eoContinue<Indi> & term = +make_continue(parser, state, eval);
+ + + + + +
  // output +
 eoCheckPoint<Indi> & checkpoint += make_checkpoint(parser, state, eval, term);
+ + + + + +
  // algorithm (need the operator!) +
 eoAlgo<Indi>& ga = make_algo_scalar(parser, +state, eval, checkpoint, op); +
  ///// End of construction of +the algorithm +
  ///////////////////////////////////////// +
  // to be called AFTER all parameters +have been read!!! +
 make_help(parser); +
  //// GO +
  ///////
+ + + + + +
  // evaluate intial population +AFTER help and status in case it takes time +
 apply<Indi>(eval, pop); +
  // if you want to print it +out +
//    cout << "Initial +Population\n"; +
//    pop.sortedPrintOn(cout); +
//    cout << endl;
+ + + + + +
 run_ea(ga, pop); // run the +ga +
 cout << "Final Population\n"; +
 pop.sortedPrintOn(cout); +
 cout << endl; +
 } +
 catch(exception& e) +
 { +
     cout << +e.what() << endl; +
 } +
 return 0; +
}
+ +
Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Sat May +4 07:37:41 2002 + + diff --git a/trunk/eo/tutorial/html/SecondBitEA.html b/trunk/eo/tutorial/html/SecondBitEA.html new file mode 100644 index 000000000..ea043f026 --- /dev/null +++ b/trunk/eo/tutorial/html/SecondBitEA.html @@ -0,0 +1,569 @@ + + + + + + SecondBitEA.cpp + + + +Back to Lesson 3 - Tutorial +main page - Algorithm-Based - Component-Based +- +Programming +hints - EO +documentation +
+
+
+

+SecondBitEA.cpp

+Click on the figure to see the corresponding code. +
In the code, the colors are meaningfull +
The actual code is in boldface and the comment in normal face. +

For this particular program, as all new lines are concerned with program +parameter input and information output, the font +color for program-parameter-related sections will refer +to the section where the parameters are used whereas the background +color will remain blue. +

+
+ + + + +
//----------------------------------------------------------------------------- +
// SecondGA.cpp +
//----------------------------------------------------------------------------- +
//* +
// Same code than FirstBitEA as far as Evolutionary +Computation is concerned +
// but now you learn to enter the parameters +in a more flexible way +
// and to twidle the output to your preferences! +
//----------------------------------------------------------------------------- +
// standard includes +
#include <stdexcept>  // runtime_error  +
#include <iostream>   // +cout +
#include <strstream>  // ostrstream, +istrstream +
#include <fstream> +
// the general include for eo +
#include <eo>
+ + + + + +
// a simple fitness function that computes +the number of ones of a bitstring +
#include "binary_value.h"
+ + + + + +
//----------------------------------------------------------------------------- +
// define your genotype and fitness types +
typedef eoBit<double> Indi;
+ + + + + +
// the main_function: nothing changed(!), +except variable initialization +
void main_function(int argc, char **argv) +
{
+ + + + + + + + + +
//----------------------------------------------------------------------------- +
// instead of having all values of useful +parameters as constants, read them: +
// either on the command line (--option=value +or -o=value) +
//        +or in a parameter file (same syntax, order independent,  +
//                                    +# = usual comment character  +
//        +or in the environment (TODO) +

// First define a parser from the command-line +arguments +
eoParser +parser(argc, argv); +

// For each parameter, define Parameter, read +it through the parser, +
// and assign the value to the variable +
+
eoValueParam<uint32> seedParam(time(0), +"seed", "Random number seed", 'S'); +
parser.processParam( +seedParam ); +
unsigned seed += seedParam.value(); +

// decription +of genotype +
eoValueParam<unsigned int>& vecSizeParam(8, +"vecSize", "Genotype size",'V'); +
parser.processParam( vecSizeParam, "Representation" +); +
unsigned vecSize = vecSizeParam.value(); +

// parameters for evolution engine +
eoValueParam<unsigned int>& popSizeParam(10, +"popSize", "Population size",'P'); +
parser.processParam( popSizeParam, "Evolution +engine" ); +
unsigned popSize = popSizeParam.value(); +

eoValueParam<unsigned int>& tSizeParam(10, +"tSize", "Tournament size",'T'); +
parser.processParam( seedParam ); +
unsigned tSize = tSizeParam.value(); +
+
   // init and stop +
eoValueParam<string> loadNameParam("", +"Load","A save file to restart from",'L'); +
parser.processParam( loadNameParam, "Persistence" +); +
string loadName = loadNameParam.value(); +

eoValueParam<unsigned int> maxGenParam(100, +"maxGen", "Maximum number of generations",'G'); +
parser.processParam( maxGenParam, "Stopping +criterion" ); +
unsigned maxGen = maxGenParam.value(); +

eoValueParam<unsigned int> minGenParam(100, +"minGen", "Minimum number of generations",'g'); +
parser.processParam( minGenParam, "Stopping +criterion" ); +
unsigned minGen = minGenParam.value(); +

eoValueParam<unsigned int> steadyGenParam(100, +"steadyGen", "Number of generations with no improvement",'s'); +
parser.processParam( steadyGenParam, "Stopping +criterion" ); +
unsigned steadyGen = steadyGenParam.value(); +

// operators probabilities at the algorithm +level +
eoValueParam<double> pCrossParam(0.6, +"pCross", "Probability of Crossover", 'C');  +
parser.processParam( pCrossParam, "Genetic +Operators" ); +
double pCross = pCrossParam.value(); +

eoValueParam<double> pMutParam(0.1, +"pMut", "Probability of Mutation", 'M'); +
parser.processParam( pMutParam, "Genetic +Operators" ); +
double pMut = pMutParam.value(); +

// relative rates for crossovers +
eoValueParam<double> onePointRateParam(1, +"onePointRate", "Relative rate for one point crossover", '1'); +
parser.processParam( onePointRateParam, +"Genetic Operators" ); +
double onePointRate = onePointRateParam.value(); +

eoValueParam<double> twoPointsRateParam(1, +"twoPointRate", "Relative rate for two point crossover", '2'); +
parser.processParam( twoPointsRateParam, +"Genetic Operators" ); +
double twoPointsRate = twoPointsRateParam.value(); +

eoValueParam<double> uRateParam(2, "uRate", +"Relative rate for uniform crossover", 'U'); +
parser.processParam( uRateParam, "Genetic +Operators" ); +
double URate =  uRateParam.value(); +

// relative rates and private parameters for +mutations; +
eoValueParam<double> pMutPerBitParam(0.01, +"pMutPerBit", "Probability of flipping 1 bit in bit-flip mutation", 'b'); +
parser.processParam( pMutPerBitParam, +"Genetic Operators" ); +
double pMutPerBit = pMutPerBitParam.value(); +

eoValueParam<double> bitFlipRateParam(0.01, +"bitFlipRate", "Relative rate for bit-flip mutation", 'B'); +
parser.processParam( bitFlipRateParam, +"Genetic Operators" ); +
double bitFlipRate =  bitFlipRateParam.value(); +

eoValueParam<double> oneBitRateParam(0.01, +"oneBitRate", "Relative rate for deterministic bit-flip mutation", 'D'); +
parser.processParam( oneBitRateParam, +"Genetic Operators" ); +
double oneBitRate = oneBitRateParam.value(); +

// the name of the "status" file where all +actual parameter values will be saved +
string str_status = parser.ProgramName() ++ ".status"; // default value +
eoValueParam<string> statusParam(str_status.c_str(), +"status","Status file",'S'); +
parser.processParam( statusParam, "Persistence" +); +

// do the following AFTER ALL PARAMETERS HAVE +BEEN PROCESSED +
// i.e. in case you need parameters somewhere +else, postpone these +
if (parser.userNeedsHelp()) +
   { +
      parser.printHelp(cout); +
      exit(1); +
   } +
if (statusParam.value() != "") +
   { +
      ofstream +os(statusParam.value().c_str()); +
      os << +parser; // and you can use that file as parameter file +
   }

+ + + + + +
 ///////////////////////////// +
 // Fitness function +
 //////////////////////////// +
 // Evaluation: from a plain +C++ fn to an EvalFunc Object ... +
 eoEvalFuncPtr<Indi, double, const +vector<bool>& > plainEval( binary_value ); +
// ... to an object +that counts the nb of actual evaluations +
 eoEvalFuncCounter<Indi> eval(plainEval);
+ + + + + +
 //////////////////////////////// +
 // Initilisation of population +
 //////////////////////////////// +
 // Either load or initialize +
 // create an empty pop +
 eoPop<Indi> pop; +
 // create a state for reading +
 eoState inState; // a state +for loading - WITHOUT the parser +
// register the rng +and the pop in the state, so they can be loaded, +
 // and the present run will +be the exact conitnuation of the saved run +
 // eventually with different +parameters +
 inState.registerObject(rng); +
 inState.registerObject(pop); +

if (load_name +!= "") +
     { +
         +inState.load(load_name); //  load the pop and the rng +
       // +the fitness is read in the file:  +
       // +do only evaluate the pop if the fitness has changed +
     } +
 else +
     { +
         +rng.reseed(seed); +
       // +a Indi random initializer +
       // +based on eoUniformGenerator class (see utils/eoRndGenerators.h) +
       eoUniformGenerator<bool> +uGen; +
       eoInitFixedLength<Indi> +random(vecSize, uGen); +
       // +Init pop from the randomizer: need to use the append function +
         +pop.append(popSize, random);  +
       // +and evaluate pop (STL syntax)  +
         +apply<Indi>(eval, pop); +
     } // end +of initialization of the population

+ + + + + +
 // sort pop for pretty printout +
 pop.sort(); +
 // Print (sorted) intial population +(raw printout) +
 cout << "Initial Population" +<< endl << pop << endl;
+ + + + + +
 ///////////////////////////////////// +
 // selection and replacement +
 ////////////////////////////////////
+ + + + + +
 // The robust tournament selection +
 eoDetTournamentSelect<Indi> selectOne(tSize);       +// tSize in [2,POPSIZE] +
 // is now encapsulated in a +eoSelectPerc (entage) +
 eoSelectPerc<Indi> select(selectOne); +
 // or eoSelectPerc<Indi> select(selectOne, +rate);  +
 // but by default rate==1
+ + + + + +
 // And we now have the full +slection/replacement - though with  +
 // the same generational replacement +at the moment :-) +
 eoGenerationalReplacement<Indi> +replace; 
+ + + + + +
 ////////////////////////////////////// +
 // The variation operators +
 //////////////////////////////////////
+ + + + + +
 // 1-point crossover for bitstring +
 eo1PtBitXover<Indi> xover1; +
 // uniform crossover for bitstring +
 eoUBitXover<Indi> xoverU; +
 // 2-pots xover +
 eoNPtsBitXover<Indi> xover2(2); +
 // Combine them with relative +rates +
 eoPropCombinedQuadOp<Indi> xover(xover1, +onePointRate); +
 xover.add(xoverU, URate); +
 xover.add(xover2, twoPointsRate, +true);
+ + + + + +
 // standard bit-flip mutation +for bitstring +
 eoBitMutation<Indi>  mutationBitFlip(pMutPerBit); +
 // mutate exactly 1 bit per +individual +
 eoDetBitFlip<Indi> mutationOneBit;  +
 // Combine them with relative +rates +
 eoPropCombinedMonOp<Indi> mutation(mutationBitFlip, +bitFlipRate); +
 mutation.add(mutationOneBit, oneBitRate, +true); +
 // The operators are  encapsulated +into an eoTRansform object +
 eoSGATransform<Indi> transform(xover, +pCross, mutation, pMut);
+ + + + + +
 ////////////////////////////////////// +
 // termination condition see +FirstBitEA.cpp +
 ///////////////////////////////////// +
 eoGenContinue<Indi> genCont(maxGen); +
 eoSteadyFitContinue<Indi> steadyCont(minGen, +steadyGen); +
 eoFitContinue<Indi> fitCont(vecSize); +
 eoCombinedContinue<Indi> continuator(genCont); +
 continuator.add(steadyCont); +
 continuator.add(fitCont);
+ + + + + +
 // but now you want to make +many different things every generation  +
 // (e.g. statistics, plots, +...). +
 // the class eoCheckPoint is +dedicated to just that: +
 // Declare a checkpoint (from +a continuator: an eoCheckPoint  +
 // IS AN eoContinue and will +be called in the loop of all algorithms) +
 eoCheckPoint<Indi> checkpoint(continuator); +

  // +Create a counter parameter +
     eoValueParam<unsigned> +generationCounter(0, "Gen."); +

   // +Create an incrementor (sub-class of eoUpdater). Note that the  +
     // parameter's +value is passed by reference,  +
     // so every +time the incrementer is updated (every generation), +
     // the data +in generationCounter will change. +
     eoIncrementor<unsigned> +increment(generationCounter.value()); +
  // +Add it to the checkpoint,  +
     // so the +counter is updated (here, incremented) every generation +
     checkpoint.add(increment); +
  // +now some statistics on the population: +
     // Best fitness +in population +
     eoBestFitnessStat<Indi> +bestStat; +
     // Second +moment stats: average and stdev +
     eoSecondMomentStats<Indi> +SecondStat; +
   // +Add them to the checkpoint to get them called at the appropriate time +
     checkpoint.add(bestStat); +
     checkpoint.add(SecondStat); +
     // The Stdout +monitor will print parameters to the screen ... +
     +eoStdoutMonitor monitor(false); +

     // when called +by the checkpoint (i.e. at every generation) +
     +checkpoint.add(monitor); +
     // the monitor +will output a series of parameters: add them  +
     +monitor.add(generationCounter); +
     monitor.add(eval); +// +because now eval is an eoEvalFuncCounter! +
     monitor.add(bestStat); +
     monitor.add(SecondStat); +
     // A file +monitor: will print parameters to ... a File, yes, you got it! +
     eoFileMonitor +fileMonitor("stats.xg", " "); +

     // the checkpoint +mechanism can handle multiple monitors +
     checkpoint.add(fileMonitor); +
     // the fileMonitor +can monitor parameters, too, but you must tell it! +
     fileMonitor.add(generationCounter); +
     fileMonitor.add(bestStat); +
     fileMonitor.add(SecondStat); +
     // Last type +of item the eoCheckpoint can handle: state savers: +
     +eoState outState; +
     // Register +the algorithm into the state +
     +outState.registerObject(parser); +
     outState.registerObject(pop); +
     outState.registerObject(rng); +
     // and feed +the state to state savers +
// save +state every 100th  generation +
     eoCountedStateSaver +stateSaver1(100, outState, "generation");  +
     // save state +every 1 seconds  +
     eoTimedStateSaver    +stateSaver2(1, outState, "time");  +
  // +Don't forget to add the two savers to the checkpoint +
     checkpoint.add(stateSaver1); +
     checkpoint.add(stateSaver2); +
     // and that's +it for the (control and) output

+ + + + + +
 ///////////////////////////////////////// +
 // the algorithm +
 //////////////////////////////////////// +
 // Easy EA requires  +
 // stopping criterion, eval, selection, +transformation, replacement +
 eoEasyEA<Indi> gga(checkpoint, +eval, select, transform, replace); +
 // Apply algo to pop - that's +it! +
 gga(pop);
+ + + + + +
 // Print (sorted) final population +
 pop.sort(); +
 cout << "FINAL Population\n" +<< pop << endl;
+ + + + + +
} +
// A main that catches the exceptions +
int main(int argc, char **argv) +
{ +
#ifdef _MSC_VER +
     int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); +
       flag +|= _CRTDBG_LEAK_CHECK_DF; +
     _CrtSetDbgFlag(flag); +
//    _CrtSetBreakAlloc(100); +
#endif +
     try +
     { +
             +main_function(argc, argv); +
     } +
     catch(exception& +e) +
     { +
             +cout << "Exception: " << e.what() << '\n'; +
     } +
     return 1; +
}
+ +


Back to Lesson 3 - Tutorial +main page - Algorithm-Based - Component-Based +- +Programming +hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Sun Nov +26 09:31:04 2000 + + diff --git a/trunk/eo/tutorial/html/SecondRealEA.html b/trunk/eo/tutorial/html/SecondRealEA.html new file mode 100644 index 000000000..7882e7bad --- /dev/null +++ b/trunk/eo/tutorial/html/SecondRealEA.html @@ -0,0 +1,468 @@ + + + + + + SecondRealEA + + +Back to Lesson 3 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+

+SecondRealEA

+Click on the figure to see the corresponding code.
+In the code, the colors are meaningfull
+The actual code is in boldface and the comment in normal face. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
  + + + + + +
+//-----------------------------------------------------------------------------
+// SecondRealEA.cpp
+//-----------------------------------------------------------------------------
+//*
+// Same code than FirstBitEA as far as Evolutionary Computation is concerned
+// but now you learn to enter the parameters in a more flexible way
+// (also slightly different than in SecondBitEA.cpp)
+// and to twidle the output to your preferences (as in SecondBitEA.cpp)
+//
+//-----------------------------------------------------------------------------
+// standard includes
+#include <stdexcept>  // runtime_error
+#include <iostream>    // cout
+#include <strstream>  // ostrstream, istrstream
+// the general include for eo
+#include <eo>
+#include <es.h>
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+// define your individuals
+typedef eoReal<eoMinimizingFitness> Indi;
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+// a simple fitness function that computes the euclidian norm of a real vector
+// Now in a separate file, and declared as binary_value(const vector<bool> &)
+#include "real_value.h"
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+void main_function(int argc, char **argv)
+{
+
+
+ + + + +
+ +//-----------------------------------------------------------------------------
+// instead of having all values of useful parameters as constants, read them:
+// either on the command line (--option=value or -o=value)
+//        or in a parameter file (same syntax, order independent,
+//                                                        # = usual comment character
+//        or in the environment (TODO)
+  // First define a parser from the command-line arguments
+  eoParser parser(argc, argv);
+  
+  // For each parameter, you can in on single line
+  // define the parameter, read it through the parser, and assign it
+  
+ +  unsigned seed = parser.createParam(unsigned(time(0)), "seed", "Random number seed", 'S').value(); // will be in default section General
+  
+  // description of genotype
+  unsigned vecSize = parser.createParam(unsigned(8), "vecSize", "Genotype size",'V', "Representation" ).value();
+    // parameters for evolution engine
+      unsigned popSize = parser.createParam(unsigned(10), "popSize", "Population size",'P', "Evolution engine" ).value();
+      unsigned tSize = parser.createParam(unsigned(2), "tSize", "Tournament size",'T', "Evolution Engine" ).value();
+    // init and stop
+      string loadName = parser.createParam(string(""), "Load","A save file to restart from",'L', "Persistence" ).value();
+
+      unsigned maxGen = parser.createParam(unsigned(100), "maxGen", "Maximum number of generations",'G', "Stopping criterion" ).value();
+      unsigned minGen = parser.createParam(unsigned(100), "minGen", "Minimum number of generations",'g', "Stopping criterion" ).value();
+      unsigned steadyGen = parser.createParam(unsigned(100), "steadyGen", "Number of generations with no improvement",'s', "Stopping criterion" ).value();
+    // operators probabilities at the algorithm level
+      double pCross = parser.createParam(double(0.6), "pCross", "Probability of Crossover", 'C', "Genetic Operators" ).value();
+      double pMut = parser.createParam(double(0.1), "pMut", "Probability of Mutation", 'M', "Genetic Operators" ).value();
+    // relative rates for crossovers
+      double hypercubeRate = parser.createParam(double(1), "hypercubeRate", "Relative rate for hypercube crossover", '\0', "Genetic Operators" ).value();
+      double segmentRate = parser.createParam(double(1), "segmentRate", "Relative rate for segment crossover", '\0', "Genetic Operators" ).value();
+      // internal parameters for the mutations
+      double EPSILON = parser.createParam(double(0.01), "EPSILON", "Width for uniform mutation", '\0', "Genetic Operators" ).value();
+      
+      double SIGMA = parser.createParam(double(0.3), "SIGMA", "Sigma for normal mutation", '\0', "Genetic Operators" ).value();
+    // relative rates for mutations
+      double uniformMutRate = parser.createParam(double(1), "uniformMutRate", "Relative rate for uniform mutation", '\0', "Genetic Operators" ).value();
+      double detMutRate = parser.createParam(double(1), "detMutRate", "Relative rate for det-uniform mutation", '\0', "Genetic Operators" ).value();
+      double normalMutRate = parser.createParam(double(1), "normalMutRate", "Relative rate for normal mutation", '\0', "Genetic Operators" ).value();
+      // the name of the "status" file where all actual parameter values will be saved
+      string str_status = parser.ProgramName() + ".status"; // default value
+      string statusName = parser.createParam(str_status, "status","Status file",'S', "Persistence" ).value();
+    // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED
+    // i.e. in case you need parameters somewhere else, postpone these
+      if (parser.userNeedsHelp())
+          {
+              parser.printHelp(cout);
+              exit(1);
+          }
+      if (statusName != "")
+          {
+ofstream os(statusName.c_str());
+os << parser; // and you can use that file as parameter file
+          }
+
+
+ + + + +
+ +  /////////////////////////////
+  // Fitness function
+  ////////////////////////////
+  // Evaluation: from a plain C++ fn to an EvalFunc Object
+  // you need to give the full description of the function
+  eoEvalFuncPtr<Indi, double, const vector<double>& > plainEval(  real_value );
+  // ... to an object that counts the nb of actual evaluations
+  eoEvalFuncCounter<Indi> eval(plainEval);
+
+
+ + + + +
+ +  ////////////////////////////////
+  // Initilisation of population
+  ////////////////////////////////
+  // Either load or initialize
+  // create an empty pop
+  eoPop<Indi> pop;
+  // create a state for reading
+  eoState inState; // a state for loading - WITHOUT the parser
+  // register the rng and the pop in the state, so they can be loaded,
+  // and the present run will be the exact conitnuation of the saved run
+  // eventually with different parameters
+  inState.registerObject(rng);
+  inState.registerObject(pop);
+      
+  if (loadName != "")
+      {
+          inState.load(loadName); //  load the pop and the rng
+          // the fitness is read in the file:
+          // do only evaluate the pop if the fitness has changed
+      }
+  else
+      {
+          rng.reseed(seed);
+          // a Indi random initializer
+          // based on boolean_generator class (see utils/rnd_generator.h)
+          eoUniformGenerator<double> uGen(-1.0, 1.0);
+          eoInitFixedLength<Indi> random(vecSize, uGen);
+          // Init pop from the randomizer: need to use the append function
+          pop.append(popSize, random);          
+          // and evaluate pop (STL syntax)      
+          apply<Indi>(eval, pop);
+      } // end of initializatio of the population
+
+
+ + + + +
+ +  // sort pop before printing it!
+  pop.sort();
+  // Print (sorted) intial population (raw printout)
+  cout << "Initial Population" << endl;
+  cout << pop;
+
+
+ + + + +
+ +  /////////////////////////////////////
+  // selection and replacement
+  ////////////////////////////////////
+
+
+ + + + +
+ +  // The robust tournament selection
+  eoDetTournamentSelect<Indi> selectOne(tSize);
+  // is now encapsulated in a eoSelectPerc (entage)
+  eoSelectPerc<Indi> select(selectOne);// by default rate==1
+
+
+ + + + +
+ +  // And we now have the full slection/replacement - though with
+  // no replacement (== generational replacement) at the moment :-)
+  eoGenerationalReplacement<Indi> replace;
+
+
+ + + + +
+ +  //////////////////////////////////////
+  // The variation operators
+  //////////////////////////////////////
+
+
+ + + + +
+ +  // uniform chooce on segment made by the parents
+  eoSegmentCrossover<Indi> xoverS;
+  // uniform choice in hypercube built by the parents
+  eoHypercubeCrossover<Indi> xoverA;
+  // Combine them with relative weights
+  eoPropCombinedQuadOp<Indi> xover(xoverS, segmentRate);
+  xover.add(xoverA, hypercubeRate, true);
+
+
+ + + + +
+ +  // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon]
+  eoUniformMutation<Indi>  mutationU(EPSILON);
+  // k (=1) coordinates of parents are uniformly modified
+  eoDetUniformMutation<Indi>  mutationD(EPSILON);
+  // all coordinates of parents are normally modified (stDev SIGMA)
+  eoNormalMutation<Indi>  mutationN(SIGMA);
+  // Combine them with relative weights
+  eoPropCombinedMonOp<Indi> mutation(mutationU, uniformMutRate);
+  mutation.add(mutationD, detMutRate);
+  mutation.add(mutationN, normalMutRate, true);
+  // The operators are  encapsulated into an eoTRansform object
+  eoSGATransform<Indi> transform(xover, pCross, mutation, pMut);
+
+
+ + + + +
+ +  //////////////////////////////////////
+  // termination condition see FirstBitEA.cpp
+  /////////////////////////////////////
+  eoGenContinue<Indi> genCont(maxGen);
+  eoSteadyFitContinue<Indi> steadyCont(minGen, steadyGen);
+  eoFitContinue<Indi> fitCont(0);
+  eoCombinedContinue<Indi> continuator(genCont);
+  continuator.add(steadyCont);
+  continuator.add(fitCont);
+  
+  
+
+
+ + + + +
+ +  // but now you want to make many different things every generation
+  // (e.g. statistics, plots, ...).
+  // the class eoCheckPoint is dedicated to just that:
+  // Declare a checkpoint (from a continuator: an eoCheckPoint
+  // IS AN eoContinue and will be called in the loop of all algorithms)
+  eoCheckPoint<Indi> checkpoint(continuator);
+  
+      // Create a counter parameter
+      eoValueParam<unsigned> generationCounter(0, "Gen.");
+      
+      // Create an incrementor (sub-class of eoUpdater). Note that the
+      // parameter's value is passed by reference,
+      // so every time the incrementer is updated (every generation),
+      // the data in generationCounter will change.
+      eoIncrementor<unsigned> increment(generationCounter.value());
+      // Add it to the checkpoint,
+      // so the counter is updated (here, incremented) every generation
+      checkpoint.add(increment);
+      // now some statistics on the population:
+      // Best fitness in population
+      eoBestFitnessStat<Indi> bestStat;
+      // Second moment stats: average and stdev
+      eoSecondMomentStats<Indi> SecondStat;
+      // Add them to the checkpoint to get them called at the appropriate time
+      checkpoint.add(bestStat);
+      checkpoint.add(SecondStat);
+      // The Stdout monitor will print parameters to the screen ...
+      eoStdoutMonitor monitor(false);
+        
+      // when called by the checkpoint (i.e. at every generation)
+      checkpoint.add(monitor);
+      // the monitor will output a series of parameters: add them
+      monitor.add(generationCounter);
+      monitor.add(eval); // because now eval is an eoEvalFuncCounter!
+      monitor.add(bestStat);
+      monitor.add(SecondStat);
+      // A file monitor: will print parameters to ... a File, yes, you got it!
+      eoFileMonitor fileMonitor("stats.xg", " ");
+        
+      // the checkpoint mechanism can handle multiple monitors
+      checkpoint.add(fileMonitor);
+      // the fileMonitor can monitor parameters, too, but you must tell it!
+      fileMonitor.add(generationCounter);
+      fileMonitor.add(bestStat);
+      fileMonitor.add(SecondStat);
+      // Last type of item the eoCheckpoint can handle: state savers:
+      eoState outState;
+      // Register the algorithm into the state (so it has something to save!!)
+      outState.registerObject(parser);
+      outState.registerObject(pop);
+      outState.registerObject(rng);
+      // and feed the state to state savers
+      // save state every 100th  generation
+      eoCountedStateSaver stateSaver1(20, outState, "generation");
+      // save state every 1 seconds
+      eoTimedStateSaver    stateSaver2(1, outState, "time");
+      // Don't forget to add the two savers to the checkpoint
+      checkpoint.add(stateSaver1);
+      checkpoint.add(stateSaver2);
+      // and that's it for the (control and) output
+
+
+ + + + +
+ +  /////////////////////////////////////////
+  // the algorithm
+  ////////////////////////////////////////
+  // Easy EA requires
+  // stopping criterion, eval, selection, transformation, replacement
+  eoEasyEA<Indi> gga(checkpoint, eval, select, transform, replace);
+  // Apply algo to pop - that's it!
+  gga(pop);
+  
+
+
+ + + + +
+ +  // Print (sorted) intial population
+  pop.sort();
+  cout << "FINAL Population\n" << pop << endl;
+
+
+ + + + +
+ +}
+// A main that catches the exceptions
+int main(int argc, char **argv)
+{
+      try
+      {
+              main_function(argc, argv);
+      }
+      catch(exception& e)
+      {
+              cout << "Exception: " << e.what() << '\n';
+      }
+      return 1;
+}
+
+
Back to Lesson 3 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+
Last +modified: Sun Apr 28 06:42:44 2002 + + + diff --git a/trunk/eo/tutorial/html/beige009.jpg b/trunk/eo/tutorial/html/beige009.jpg new file mode 100644 index 000000000..594c01d8e Binary files /dev/null and b/trunk/eo/tutorial/html/beige009.jpg differ diff --git a/trunk/eo/tutorial/html/binary_value.html b/trunk/eo/tutorial/html/binary_value.html new file mode 100644 index 000000000..45f3e35a1 --- /dev/null +++ b/trunk/eo/tutorial/html/binary_value.html @@ -0,0 +1,57 @@ + + + + + + binary_value.h + + +Back to Lesson 2 - Tutorial +main page - Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
+
+
+

+binary_value.h

+ + + + + +
#include <eo> +
//----------------------------------------------------------------------------- +
/** Just a simple function that takes binary +value of a chromosome and sets +
     the fitnes. +
     @param _chrom A +binary chromosome  +
*/
+ + + + + +
double binary_value(const vector<bool>& +_chrom) +
{ +
 double sum = 0; +
 for (unsigned i = 0; i < _chrom.size(); +i++) +
     sum += _chrom[i]; +
 return sum; +
}
+ +
Back to Lesson 2 - Tutorial +main page - Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Wed Nov +29 09:03:09 2000 + + diff --git a/trunk/eo/tutorial/html/debut.html b/trunk/eo/tutorial/html/debut.html new file mode 100644 index 000000000..2c6c8d305 --- /dev/null +++ b/trunk/eo/tutorial/html/debut.html @@ -0,0 +1,21 @@ + + + + TITRE + + + +Tutorial main page - +Algorithm-Based +page - Component-Based - Programming +hints - EO documentation +
+
+ + +
+

TITRE

+
+ + +

diff --git a/trunk/eo/tutorial/html/eoBottomUp.html b/trunk/eo/tutorial/html/eoBottomUp.html new file mode 100644 index 000000000..b35d40262 --- /dev/null +++ b/trunk/eo/tutorial/html/eoBottomUp.html @@ -0,0 +1,77 @@ + + + + + + EO - The Component-Based approach + + +Tutorial main page - +Algorithm-Based + - Component-Based - Programming +hints - EO documentation +
+


+
+

+EO - Component-Based approach

+ +


Congratulations - You have chosen the component-based approach!  +From here you will be allowed to browse into the different components of +an Evolutionary Algorithm, and to see how to program your favorite using +the EO library. + +

+Table of Content

+ +
+

+ +

Yes, this is the table of content of this part +of the EO tutorial. If you don't already know what this symbolic + representation of an EA means, you should try here. Otherwise, click on the figure +to go directly to the corresponding section of the tutorial. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+


+
Tutorial main page - Algorithm-Based + - Component-Based - Programming +hints - EO documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: Mon Oct 30 07:28:36 CET 2000 + + diff --git a/trunk/eo/tutorial/html/eoCheckPoint.html b/trunk/eo/tutorial/html/eoCheckPoint.html new file mode 100644 index 000000000..3b905eed6 --- /dev/null +++ b/trunk/eo/tutorial/html/eoCheckPoint.html @@ -0,0 +1,150 @@ + + + + + + Variation Operators + + +General: Algorithm-Based +- Component-Based - Programming +hints - EO +documentation +
+
+
Local: Introduction +- Continuators - Combined +continuators - Checkpoints - Statistics +- Monitors - Updaters +
+
+
+

+CheckPointing

+What +is Checkpointing about? +
Evolutionary Algorithms are almost all timely ticked, the basic time +unit being what is called a generation. EO checkpointing mechanism allow +you to program things that you want to be done at the end of every generation. +This includes deciding to stop, outputing some statistics on the current +state of the algorithm,  updating some dynamical variables of your +algorithm, saving the population to disk, ... +

EO classes described in this page: +

    +
  • +Base classes: eoCheckPoint, eoContinue, +eoStat, eoSortedStat, eoMonitor, eoUpdater
  • + +
  • +Derived classes: eoCombinedContinue,
  • + +
  • +Related classes: eoGnuPlot1DMonitor, +eoGnuPlot1DSnapshotMonitor,
  • +
+ +
  +

+


Continuators: +

Continuators are functors that compute stopping critera. They receive +a population and return a boolean value which is set to false only when +some stopping vriterion is met. All algorithms in EO have a loop that goes +do{...}while(continuator(pop)which +means that the algorithm stops only when the continuator returns false. +

Interface:  The abstract class +for computing stopping conditions is eoContinue, +and the interface for its operator() is +

                           + +bool operator()(const eoPop<EOT>& +) +

which you could have guessed from the inheritance +diagram for class eoContinue, as +you see there that eoContinue derives +from class eoUF<const eoPop<EOT>&, +bool>. +

Using a continuator: +
You can find an first example of using a continuator in the code for +FirstBitEA +ior more sophisticated continue conditions in  Lesson2. +
If you want to find out how it is used inside an algorithm, go and +see for instance in eoSGA, the simplest EA within EO. +

Writing a +continuator: +
There are only two things to modify in the template +class definitions provided (apart from the name of the class you are +creating!) +

    +
  • +The constructor, where you pass to the object +any useful parameter (see the private data at end of class definition).
  • + +
  • +The operator() method, which performs the +computation of the actual test using the population plus any other parameter +passed at construct time. Don't forget to returnfalse +when the stopping criterion is met!
  • +
+Existing continuators: +Of +course you can find out all existing (non-virtual!) subclasses of eoContinue +by looking at its  inheritance +diagram. But you might find it more convenient to have them listed +here: +
    +
  • +
  • +
+ +


+


Combining +continuators: +

+


CheckPoints: +

Interface: +

Using a checkpoint: An eoCheckPoint +being an eoContinue, its usage is exactly the same. However, an eoCheckPoint +will actually do many more things than an eoContinue before returning its +boolean result as an eoContinue. +

Writing a +checkpoint: +
This is something you should never have to do. However, should you +feel you have to do it, please do - and send us both the reasons that lead +you to that (what is it you couldn't do with existing eoCheckPoint), and +the resulting code, of course. +
+


Statistics: +

Interface: +

Using statistics: +

Writing a statitic: +
+


Monitors: +

Interface: +

Using monitors: +

Writing a monitor: +

+


Updater: +

Interface: +

Using updaters: +

Writing an updater: +
  +

+


Local: Introduction +- Continuators - Combined +continuators - Checkpoints - Statistics +- Monitors - Updaters +
+
General: Algorithm-Based +- Component-Based - Programming +hints -EO +documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: Fri Dec. 8 2000  +
  + + diff --git a/trunk/eo/tutorial/html/eoEngine.html b/trunk/eo/tutorial/html/eoEngine.html new file mode 100644 index 000000000..367c94177 --- /dev/null +++ b/trunk/eo/tutorial/html/eoEngine.html @@ -0,0 +1,778 @@ + + + + + + Genetic Engine + + +General: Algorithm-Based +- Component-Based - Programming +hints - EO +documentation +
Local:
Introduction  +- Selection - Replacement +- General Replacement - Popular +evolution engines - Tournaments - Merge +- Reduce - HowMany - SurviveAndDie +
+
+

+Evolution Engine

+ +
+
Evolution +Engines +

The term evolution engine denotes +the different parts of an Evolutionary Algorithm that simulate the Darwinism: +

+

The fittest individuals are more likely to +reproduce and survive.

+ +

Darwinism takes place in two different phases of an EA, though in many +popular +variants, only one phase is activated. +

Selection is the Darwinistic choice of parents +that will be allowed to reproduce. +
Replacement takes place after reproduction, +and is the Darwinistic choice of those individuals that will survive, +i.e. become the parents of the next generation. +

Both selection and replacement will be discussed in turn, before some +helper classes that are used within selection and replacement procedures +are presented. +

+


Selection +

The very beginning of the generation loop is the selection phase, where +some individuals from the population are chosen to become the parents, +to be later modified by the variation operators and become the offspring. +This is the first step of the artificial Darwinism, +where the fittest individuals are allowed to reproduce. +
Conceptually, there are two distinct ways to choose the lucky ones: +one by one from the very same population (i.e. with replacement), which +means that at the extreme the same individual can be chosen every time; +or as a whole, in some sort of batch procedure. Of course, repeated selection +of one individual results in a batch selection! +

There are hence two basic EO classes for selection: eoSelectOne +and eoSelect, with different interfaces. +
+


+
eoSelectOne: The +interface +

The abstract class for selection of a single individual from a population +is eoSelectOne, and the interface for its +operator() +is +

+

const EOT & operator()(const eoPop<EOT>& +_parents)

+ +

which you could have guessed from the inheritance tree for class eoSelectOne., +as you see there that eoSelectOne derives +from class eoUF<const eoPop<EOT>&, +const EOT&>. +
This means that it takes 1 population +(without the right to modify it - see the const +keyword in argument) and returns a const reference to an individual (again, +the const keyword ensures +that nothing will happen to the individual in the population - remember +it returns a reference). +
+


+
eoSelectOne: Instances +
    +
  • +eoDetTournamentSelect uses +the (deterministic) tournament to choose one +individual. Its constructor has one parameter, the tournament size (integer +>= 2).
  • + +
  • +eoStochTournamentSelect uses +the binary stochastic tournament to choose +one individual. Its constructor has one parameter, the tournament rate +(real in [0.5,1]).
  • + +
  • eoProportionalSelect +is the original roulette wheel selection: +each parent is selected with a probability proportional to its fitness.
  • + +
  • +eoRandomSelect is the random +selection and should give bad results! At the moment, it selects one individual +uniformly, but it would be easy to use any probability distribution.
  • +
+ +
+
eoSelect: The +interface +

The abstract class for batch selection of a  whole set of individuals +from a population is eoSelect, and the interface +for its +operator() is +

+

void operator()(const eoPop<EOT>& +_source, eoPop<EOT>& _dest)

+ +

which you could have guessed from the inheritance tree for class eoSelect., +as you see there that eoSelect derives from +class +eoBF<const eoPop<EOT>&, eoPop<EOT>&, void>. +
This means that it takes 2 populations, +and fills the second one with individuals from the first one without modifying +it (see the const keyword). +This raises two questions: +

    +
  • +How does it know how many individuals to select?
  • + +
  • +How to use repeated selection of one individual (see above the eoSelectOne +class)?
  • +
+ +
+
eoSelect: HowMany +

There are two ways an  can derive the number of individuals it +has to select: either it is a fixed number, or it is some percentage of +the source population size (any positive real number). In both case, this +must be passed to the constructor. In most instances, however, the constructor +will accept a real number (double) and a boolean indicating whether this +real number should be used as an absolute integer or as a rate, thanks +to the eoHowMany class. +

Note: an eoSelect +can select more individuals than there are in the original population. +It is the job of the replacement to ensure +that the population size does not grow along the generations. +

+


eoSelectMany: Encapsulating +eoSelectOne +

It is clear that repeated selection of a single individual is a way +to do batch selection. This is why it is possible to encapsulate an object +of class eoSelectOne into an object of class +eoSelect +using the class eoSelectMany. Class eoSelectMany +is derived from class eoSelect and takes in +its constructor an eoSelectOne (plus the number +of individuals it should select, according to the eoHowMany +paradigm). +

Note: some procedures for selecting +a single individual require some pre-processing of the whole population +that takes place before any selection, and will be repeated identically +for every individual. The encapsulation of an  into an  allows +to call such technical processing only once through the use of method setup +of class . This method does nothing by default, but is mandatory +
+


+
eoSelect: Other +instances +
    +
  • +eoDetSelect selects individuals +deterministically, +i.e. starting from the best ones down to the worse ones. If the total number +to select is less than the size of the source populations, the best individuals +are selected once. If more individuals are needed after reaching the bottom +of the population, then the selection starts again at top. It the total +number required is N times that of the source size, all individuals are +selected exactly N times.
  • +
+No other instances of eoSelect that are not +encapsualtions of eoSelectOne procedures are +avaiable as of today (Jan. 4 2001). +
+
+
Replacement +

The replacement phase takes place after the birth +of all offspring through variation operators. This is the second +step of the artificial Darwinism, where the +fittest +individuals are allowed to survive. +
It can also be viewed on the algorithmic side as closing the generation +loop, i.e. building the population that will be the initial population +of next generation. That population will be built +upon the old parents and the new-born offspring. In all algorithms +that come up with EO, the population size +is supposed to be constant from one generation +to the next one - though nothing stops you from writing an algorithm with +varying population size. +
+


+
Replacement: The +interface +

The abstract class for replacement procedures is the functor class +eoReplacement, +and the interface for its operator() +is +

+

void operator()(eoPop<EOT>& _parents, +eoPop<EOT>& _offspring)

+ +

which you could have guessed from the inheritance tree for class eoReplacement., +as you see there that eoReplacement derives +from class eoBF<eoPop<EOT>&, eoPop<EOT>&, +void>. +
This means that it takes 2 populations +(called, for obvious anthropomorphic reasons, _parents and _offspring :-) +and is free to modify both, but the resulting population should be placed +in the first argument (usually called_parents) to close the loop and go +to next generation. +
+


+
Replacement: Instances +
    +
  • +eoGenerationalReplacement This +is the most straightforward replacement, called generational +replacement: all offspring replace all parents (used in Holland's +and Goldberg's traditional GAs).  It takes no argument, and supposes +that offspring and parents are of the same size (but does not check!).
  • + +
      +
  • +eoMergeReduce +This is one the basic types of replacement in EO. It has two major steps, +merging +both populations of parents and offspring, and reducing +this big population to the right size. It contains +two objects of respective types eoMerge +and eoReduce +and you can probably guess what each of them actually does :-)
  • + +
      +

      +
      +
      +

    Available instances of eoMergeReduce replacement +include +

      +
    • +eoCommaReplacement, one of +the two standard strategies in Evolution Strategies, +selects +the best offspring. It is an +eoMergeReduce(eoNoElitism, +eoTruncate).
    • + +
    • +eoPlusReplacement, the other +standard Evolution Startegies replacement, +where the best from offspring+parents +become the next generation. It is an eoMergeReduce(eoPlus, +eoTruncate).
    • + +
    • +eoEPReplacement, used in the +Evolutionary Programming historical algorithm, does an EP stochastic +tournament among parents + offspring. It is an eoMergeReduce(eoPlus, +eoEPReduce) and its constructor requires as argument T, +the size of the tournament (unsigned int).
    • +
    + +
  • +eoReduceMerge is another important +type of eoReplacement: the parents are first reduced, and then merged with +the offspring. Note that the parent population is reduced of the exact +number of offspring.
  • + +
    Though not mandatory, it is implicitely assumed that few offspring +have been generated. Hence, all derived replacement procedures of class +eoReduceMerge +are termed eoSSGAxxx, as they +are the ones to use in SteadyState Genetic Algorithm engine. This gives +the following instances of eoReduceMerge: +
      +
    • eoSSGAWorseReplacement +in which the worse parents are killed and replaced by all offsprings (no +additional argument needed);
    • + +
    • +eoSSGADetTournamentReplacement +in which parents to be killed are chosen by a (reverse) determinitic tournament. +Additional parameter (in the constructor) is the tournament size, an unsigned +int.
    • + +
    • +eoSSGAStochTournamentReplacement +in which parents to be killed are chosen by a (reverse) stochastic tournament. +Additional parameter (in the constructor) is the tournament rate, a double.
    • +
    + +
  • +eoSurviveAndDie +replacement strategies are a generalization of both the above that allows +strong elitist and eugenism in both the parent population and the offspring +population. The eoSurviveAndDie +building block takes one population, kills the worse and moves the best +to some safe place.  The corresponding replacements apply an eoSurviveAndDie +to the parents, another one to the offspring, and finally merges the remaining +parents and offspring before reducing the resulting population to the right +size. Available instances of eoSurviveAndDieReplacement +are limited todayto the eoDeterministicSaDReplacement, +the  that uses a deterministic MergeReduce.
  • + +
      +

      +
      +
      +

    Note: The basic use (and initial +motivation) for eoSurviveAndDie +takes 2 arguments, an eoMergeReduce and a number of surviving parents. +It starts by copying the best parents to the new populations, then merges +the remaining parents with the offspring before reducing to the number +of remaining seats in the new population.

+ +
+
Replacement: Adding +(weak) elitism +

You can add what is called weak elitism +to any replacement by encapsulating it into an eoWeakElitismReplacement +object. Weak elitism ensures that the overall best +fitness in the population will never decrease: +if the best fitness in the new population is less than the best fitness +of the parent population, then the best parent is added back to the new +population, replacing the worse. +

Within EO, this is very easy to add: +

First, declare your replacement functor (here, generational, but it +can be any replacement object): +
eoGenerationalReplacement<Indi> genReplace; +
Then wrap the weak elitism around it: +
eoWeakElitismReplacement<Indi> replace(genReplace); +
and use now replace as your replacement procedure within your algorithm. +

Note: of course, adding weak elitism to +an elitist replacement makes no sense - but will not harm either :-) +
+


+
Replacement: Test +file +

The file t-eoReplacement +in the test directory implements all +above replacement procedures within a very simple and easy-to-monitor Dummy +EO class. +

+


+
General +Replacement: eoReduceMergeReduce +

In an attempt to unify all the well-known replacements, plus most of +the less-known-though-often-used, the eoReduceMergeReduce +replacement has been designed, and supersedes all of the above instances. +
It allows to implement strong elistism +(i.e. some parents survive, whatever their fitness and that of the offspring), +as well as multiple weak elistism (the best parents are put back in the +next population if they outperform the best offspring). +

Basically, an eoReduceMergeReduce +starts by eventually preserving the (strong) elite parents, proceeds by +reducing both the parent and offspring populations, merges those populations, +and eventually reduces the resulting populations (augmented with the elite +parents) to the right size. Last, the weak elitism is taken care of if +necessary. +
The following image, taken from the graphical interface of EASEA, somehow +demonstrates the different parameters of an eoReduceMergeReduce. +
+


+
eoReduceMergeReduce: The  +interface +
Of course the interface is that of eoReplacement. Let's concentrate +on the constructor. +

The constructor takes 6 arguments: +

    +
  1. +eoHowMany elite determines +the number of parents to be treated as elite (actual behavior determined +by next parameter) using the eoHowMany behavior.
  2. + +
  3. +bool strongElitism tells whether +the elite above corresponds to strong (true) or false(weak) elitism.
  4. + +
    Note: the case of no elitism is +obtained by setting elite to 0 +
  5. +eoHowMany reducedParents gives +the number of parents remaining after reducing them
  6. + +
    Note: 0 means that no parent survive +(except the possible elite), as in eoCommaReplacement +
                +-1 is used inside eoSSGAReplacements +(one parent is killed to make room for the newborn) +
  7. +eoReduce<EOT> & reduceParents +indicates how the parents will be reduced (see available +instances).
  8. + +
  9. +eoHowMany reducedOffspring gives +the number of offspring remaining after reducing them
  10. + +
    Note: 0 is impossible (no evolution!!!) +
  11. +eoReduce<EOT> & reduceOffspring +indicates how the offspring will be reduced (see available +instances).
  12. + +
  13. +eoReduce<EOT> & reduceFinal +indicates how the merged reduced-parents/reduced-offspring will be reduced +(see available instances).
  14. + +
    Note: the number of individuals +remaining after that reduction is of course the original size of the population.
+All popular evolution engines use some replacement procedure that can be +viewed as an instance of an eoReduceMergeReduce. +
Moreover, a parser-based input +of a general  is proposed in file do/make_checkpoint.h. +
+
+
Popular +evolution engines +

The most popular evolution engines are listed below, together with the +way to use them in EO. If you don't find your particuler algorithm, please +send it to us, and we might include it here! In the following, P will denote +the number of individuals in the initial population. +

    +
  • +Generational Genetic Algorihtm: +popularized by Holland (75) and Goldberg (89), it uses
  • + +
    Number of offspring:  +P +
    Selection: Proportional +(the historical roulette wheel) when maximizing +a positive scalar fitness, ranking or +tournament (stochatic or deterministic) in all cases. +
    Replacement: Generational. +
    Remark: You could +use also the eoCommaReplacement, +with exactly the same result as there are as many offspring as we need +indiviudals in the next population. And using the eoSSGAWorseReplacement +would also give the same result, but would be very inefficient! +
    You can also add weak +elitism to preserve the best individual. +
  • +Steady-State Genetic Algorithm: +widely used in GA/GP community
  • + +
    Number of offspring:  +small (historically, 1) +
    Selection: tournament +(you can use ranking or proportional, but it will be rather inefficient). +
    Replacement: An +eoSSGAxxxReplacement. +
    Remark: You can +also use the eoPlusReplacement, but you divert from the original SSGA +
  • +(MU+Lambda)-Evolution Strategy: +The elitist ES strategy (Rechenberg 71 and Schwefel 81)
  • + +
    Number of offspring:  +Any +
    Selection: eoDetSelect +(batch deterministic). +
    Replacement: eoPlusReplacement +
    Remark: You could +also use eoEPReplacement, to smoothen the selective pressure during replacement, +thus getting close to EP evolution engine +
  • +(MU,Lambda)-Evolution Strategy: +The non-elitist ES strategy
  • + +
    Number of offspring:  +> P +
    Selection: eoDetSelect +(batch deterministic). +
    Replacement: eoCommaReplacement +
    Remark: You can +also add weak elitism to preserve the best individual +- though you'd probably use the plus strategy if you want (strong) elitism. +
  • +Evolutionary Programming: +The historical method of L. Fogel (65)
  • + +
    Number of offspring:  +P +
    Selection: eoDetSelect +(batch deterministic). Every individual reproduces exactly once. +
    Replacement: eoEPReplacement, +though one historical replacement was the determnistic replacement - i.e. +in EO the eoPlusReplacement). +
    Remark: Close to +an (P+P)-ES +
  • +You name it :-): +you can of course choose whatever combination you like - respecting a few +constraints and common-sense remarks. For instance, eoProportionalSelect +should be used only when maximizing a positive fitness, eoCommaReplacement +requires more offspring than parents, and, over all, existing EO algorithms +wirk with fixed size population - and it is your responsability to use +a cmbinatino of selection/replacement that fulfills this requirement (or +to create your own eoAlgo that handles varying size populations).
  • +
+ +
+
Tournaments +

Tournaments are an easy and quick way to select +individuals within a population based on simple comparisons. Though usually +based on fitness comparisons, they can use any comparison operator. +
In EO, there are two variants of tournaments used to select one single +individual, namely Deterministic Tournament +and Stochastic Tournament, +that are used in selection and in replacement procedures, and a global +tournament-based selection of a whole bunch of individuals, the EP +Tournament. Though the single-selection tournaments can +be repeated to select more than one individual, and the batch tournament +selection can be used to select a single individual, both uses are probably +a waste of CPU time. +

    +
  • +Deterministic +Tournament of size T returns the best of T uniformly chosen +individuals in the population. Its size T should be an integer >= 2. It +is implemented in the eoDetTournamentSelect +class, a sub-class of eoSelectOne, as well as in the eoDetTournamentTruncate +class that repeatidly removes from the population the "winner" of the inverse +tournament.  These objects use the C++ function determinitic_tournament +in  selectors.h.
  • + +
  • +Stochastic Tournament +of rate R first choses two individuals from the population, and selects +the best one with probability R (the worse one with probability 1-R). Real +parameter R should be in [0.5,1]. It is implemented in the eoStochTournamentSelect +class, a sub-class of eoSelectOne, as well as in the eoStochTournamentTruncate +class that repeatidly removes from the population the "winner" of the inverse +tournament.  These objects use the C++ function determinitic_tournament +in  selectors.h.
  • + +
    Note: A stochastic tournament with +rate 1.0 is strictly identical to a deterministic tournament of size 2. +
  • +EP Tournament +of size T is a global tournament: it works by assigning a score to all +individuals in the population the following way: starting with a score +of 0, each individual I is "opposed" T times to a uniformly chosen individual. +Everytime I wins, its score in incremented by 1 (and by 0.5 for every draw). +The individuals are then selected deterministically based on their scores +from that procedure. The EP Tournament +is implemented in the  eoEPReduce +truncation method used in the eoEPReplacement +procedure.
  • + +
    Note: whereas both the determinitic +and the stochastic tournament select one individual, the EP tournament +is designed for batch selection. Of course it could be used to select a +single individual, but at a rather high computational cost.
+ +


+


+
Merging +populations +

In replacement procedures, one frequently needs to merge two populations +(computed form old parents and new-born offspring). Classes derived from +the abstract class eoMerge are written for that purpose. +
+


+
eoMerge: interface +
The abstract class for merging procedures is the functor class +eoMerge, +and the interface for its operator() +is +
+

void operator()(const eoPop<EOT>& +_parents, eoPop<EOT>& _offspring)

+ +

which you could have guessed from the inheritance tree for class eoMerge, +as you see there that eoMerge derives from +
class eoBF<const eoPop<EOT>&, eoPop<EOT>&, +void>. +
This means that it takes 2 populations +and modifies the seond one by adding some individuals from the first one +(which is supposed to remain constant). +
+


+
eoMerge: instances +
Available instances of eoMerge objects +are eoPlus, that simply adds +the parents to the offspring, or eoElitism, +that adds only some of the (best) parents to the offspring. A special case +of eoElistism is eoNoElitism, +an eoMerge that does nothing. +

+


+
Reducing +populations +

The other useful component of replacement procedures, eoReduce, +kills +some individuals from a given population. +
+


+
eoReduce: interface +
The abstract class for reducing procedures is the functor class +eoReduce, +and the interface for its operator() +is +
+

void operator()(eoPop<EOT>& _parents, +unsigned int new_size)

+ +

which you could have guessed from the inheritance tree for class eoReduce, +as you see there that eoReduce derives from +
class eoBF<eoPop<EOT>&, unsigned +int, void>. +
An eoReduce shoud take a +population and shrink it to the required size. +
+


+
eoReduce: instances +
Available instances of eoReduce are +
    +
  • +eoTruncate, deterministically +kills the worse individuals, keeping only the required number. It starts +by sorting teh populations, and hence does modify +its order.
  • + +
  • +eoLinearTruncate, deterministically +kills the worse individuals, keeping only the required number. It does +so by repeatedly removing the worsr individual. Hence does not +modify its order, but takes longer time than eoTruncate +in case of many offspring.
  • + +
  • +eoEPReduce, uses the EP +stochastic tournament to reduce the population. It requires an additinal +argument, the tournament size.
  • + +
  • +eoDetTournamentTruncate uses +inverse deterministic tournament to repeatidly kill one individual until +the propoer size is reached. As eoLinearTruncate, +it might take some time in the case of many offspring. It requires the +size of the tournament (unsigned int) +as parameter in the constructor (default is 2).
  • + +
  • +eoStochTournamentruncate  +uses inverse stochastic tournament to repeatidly kill individuals from +the population. It requires the rate of the tournament (double) +as parameter in the constructor (default is 0.75).
  • +
+ +
+
eoHowMany: +Choosing a number of individuals +

Many classes in selection/replacement procedures will handle a number +of individuals that may either be fixed or be related to some argument-population +size. +
Of course, it is possible to write different classes that will only +differ by the way they compute the number of individuals they have to treat, +as it is done for selectors with the two classes eoSelectPerc +and eoSelectNumber (it could also have been +possible to have some pure abstrat class and implement the computation +of the number of individuals to treat in some derived classes). +
However, the class eoHowMany +allows one to handle in a single class three different behaviors when given +a poopulatio size as argument: +

    +
  • +return a given rate of the argument population size
  • + +
  • +return an absolute (unsigned) integer, whatever the argument population +size
  • + +
  • +return the argument population size minus a given number
  • +
+ +
+
eoHowMany: interface +
The class interface for its operator() +is +
+

unsigned int operator()(unsigned int _pop_size)

+ +

which you could have guessed from the inheritance tree for class eoHowMany, +as you see there that eoHowMany +derives from +
class eoUF<unsigned int, unsigned int>. +

It has 3 possible constructors, that determine its behavior: +

    +
  • +eoHowMany(double _rate, bool _interpret_as_rate += true) where _rate +is by default the fixed rate of behavior 1 above. However, if the boolean +second argument is false, the rate is transformed into a positive integer, +and is used for behavior 2 above
  • + +
  • +eoHowMany(int _combien): if +_combien +is positive, it is the absolute number of behavior 2 above, and if _combien +is negative, its absolute value is used to decrease the argument population +in behavior 3 above
  • + +
  • +eoHowMany(unsigned int _combien): +_combien +(positive!)  is the absolute number of behavior 2 above. Note +that this constructor is mandatory to avoid ambiguity, as an unsigned int +can be casted to either an int or a double.
  • +
+It is used in eoSelectMany (which supersedes +eoSelectPerc +and eoSelectNumber, but they are left there +for tutorial reasons!) as well as in many truncation +methods, and it is used a lot in the eoGeneralReplacement construct. +

+


+
Survive and +Die +
This class is highly politically incorrect: it implements strong elitism +and eugenism :-) +
It starts by killing the worse individuals from the source argument, +then appends the best ones to the destination argument and removes them +from the source argument. It is used in eoSurviveAndDieReplacement, +where the same dest is used successively for the parents and the offspring. +

eoSurviveAndDie: interface +
The class interface for its operator() +is +

+

void operator()(eoPop<EOT>& _source, +eoPop<EOT>& _dest)

+ +

which you could have guessed from the inheritance tree for class eoSurviveAndDie, +as you see there that eoSurviveAndDie +derives from class eoBF<eoPop<EOT>&, +eoPop<EOT>&, void>. +

Its constructor takes 3 argumenrts: +

+

eoHowMany(double _survive, double _die, +bool _interpret_as_rate = true)

+ +

to indicate how many (or what proportion, according to _interpret_as_rate) +of the source should be copied to the dest population, and how many (or +what proportion, according to _interpret_as_rate)  +should be erased from the source. +

+


Local: Introduction  +- Selection - Replacement +- General Replacement - Popular +evolution engines - Tournaments - Merge +- Reduce - HowMany - SurviveAndDie +
+
+
General: Algorithm-Based +- Component-Based - Programming +hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last +modified: Tue. Jan. 9 2001  + + diff --git a/trunk/eo/tutorial/html/eoEval.html b/trunk/eo/tutorial/html/eoEval.html new file mode 100644 index 000000000..4a90ac330 --- /dev/null +++ b/trunk/eo/tutorial/html/eoEval.html @@ -0,0 +1,34 @@ + + + + Evaluation + + + +Tutorial main page - +Algorithm-Based +page - Component-Based - Programming +hints - EO documentation +
+
+ +
+

Evaluation

+
+ + + +
+
+Tutorial main page - +Algorithm-Based +page - Component-Based - Programming +hints - EO documentation +
+
Marc Schoenauer
+ + +Last modified: Mon Nov 6 10:54:33 CET 2000 + + + diff --git a/trunk/eo/tutorial/html/eoGeneration.html b/trunk/eo/tutorial/html/eoGeneration.html new file mode 100644 index 000000000..39cfe3da0 --- /dev/null +++ b/trunk/eo/tutorial/html/eoGeneration.html @@ -0,0 +1,19 @@ + + + + Generation + + + +

Generation

+ + + +
+
Marc Schoenauer
+ + +Last modified: Mon Oct 30 19:29:29 CET 2000 + + + diff --git a/trunk/eo/tutorial/html/eoInit.html b/trunk/eo/tutorial/html/eoInit.html new file mode 100644 index 000000000..3a4df155c --- /dev/null +++ b/trunk/eo/tutorial/html/eoInit.html @@ -0,0 +1,36 @@ + + + + Initialization + + +Tutorial main page - +Algorithm-Based +page - Component-Based - Programming +hints - EO documentation +
+
+ + +
+

+Initialization

+ + + + + +
+
+Tutorial main page - Algorithm-Based +page - Component-Based - Programming +hints - EO documentation +
+
+Marc Schoenauer
+ + +Last modified: Mon Nov 6 11:25:18 CET 2000 + + + diff --git a/trunk/eo/tutorial/html/eoIo.html b/trunk/eo/tutorial/html/eoIo.html new file mode 100644 index 000000000..14e0d37c1 --- /dev/null +++ b/trunk/eo/tutorial/html/eoIo.html @@ -0,0 +1,25 @@ + + + + Input / Output + + + +

Input / Output

+ +

+ +

Stopping criteria

+ +

+ +

Displaying statistics

+ +
+
Marc Schoenauer
+ + +Last modified: Tue Oct 31 18:32:22 CET 2000 + + + diff --git a/trunk/eo/tutorial/html/eoLesson1.html b/trunk/eo/tutorial/html/eoLesson1.html new file mode 100644 index 000000000..f88921015 --- /dev/null +++ b/trunk/eo/tutorial/html/eoLesson1.html @@ -0,0 +1,440 @@ + + + + + + Tutorial: Lesson 1 + + +Lesson 2 - +Tutorial +main page - +Algorithm-Based - Component-Based +- Programming hints -EO +documentation +
+
+
+

+Tutorial: Lesson 1

+This lesson will let you +
    +
  • +run your first Evolutionary Algorithm written within +EO Library, choosing between evolving bitstrings, +or evolving vectors of real numbers,
  • + +
  • +browse through the code of these algorithms, or
  • + +
  • +follow the guided tour.
  • +
+Later you will be asked to +
    +
  • +write your own fitness function,
  • + +
  • +check that EO let you separate the representation +from the evolution engine.
  • + +
  • +use different kinds of selection +procedures in the framework of a generational GA evolution +engine,
  • +
+ +

+ +
I want to run +an Evolutionary Algorithm +now

+You can choose to run a standard bitstring Genetic +Algorithm (as defined in Goldberg's book) or a standard real-valued +genetic algorithm, as proposed in Micahlewicz's book. +

If you have not already done what was recommended in the Tutorial +main page , do it NOW. Then go +to the Lesson1 sub-dir of the tutorial dir, and simply type at the system +prompt +

(myname@myhost) EOdir/Tutorial/Lesson1 % FirstRealGA +
or +
(myname@myhost) EOdir/Tutorial/Lesson1 % FirstBitGA +

and something should happen. +

+What is happening?

+At the moment, the FirstBitGA maximizes the +number of ones in the bitstring (also calls the OneMaxfunction, +whose solution is, as you can guess, +11111111), +and the FirstRealGA is maximizing (the default +action for EO is to maximize) the inverse of the sum (i.e. minimizing the +sum) of the square of its variables (also called the sphere +function, whose solution is ... all zeroes). +

And what you see on the screen when running one of these two programs +is, in each case, the initial and final population of an Evolutionary run, +one individual per line, its fitness first, then the number of items (bits +or real numbers) of the genotype, and the genotype itself. The final population +hopefully contains the solution in the discrete case, and is close to it +in the continuous case. +
+


Browsing +the code: +

Now you need to take a look at the program codes, either by browsing +alone through the  sources for FirstBitGA +and FirstRealGA, or by following the guided +tour below. You might prefer to go directly to the exercises. +

+ +
Guided tour:

+ +
    +
  • +General includes:Like +all C-like code, the file starts with include directives (Bit +- Real). Apart from standard includes, +the specific file to include is eo: +this is a file that contains the list of the all important representation-independent +EO files.
  • + +
      +
  • +Representation: +you then have to declare the type of individuals you will be handling. +All evolution-related objects you will need are templatized w.r.t. the +type of individuals.
  • + + + +
  • +Fitness function: +the code for the fitness function is included in the file. It must take +as argument a reference to an individual (at the moment).
  • + +
      +
    • +Bit This function simply computes +the number of ones of the bitstring (it's called the OneMax function). +The optimum is of course the all-ones bitstring.
    • + +
    • +Real This function simply computes +the inverse of the sum of the squares of all variables (also called the +sphere function). The optimum is of course the all-zeroes vector.
    • + +
       
    + +
  • +Parameters: +all parameters of the algorithm are declared here (Bit +- Real), and their values and +assigned. Of course, this means that you will need to recompile to change +these values - see Lesson 3 to get rid of that heavy requirement.
  • + +
      +
  • +Random seeding: +Random numbers play an important role in Evolutionary Algorithms. See in +EO +programming hints more details about how this is simulated in EO - +but as far as you are concerned now, remember that the global +Random Number Generator is called rng +and should be used everywhere you need a realization of a random variable +of known law. Moreover, this RNG requires a seed, +which is set here (Bit - Real): +every time you run the algorithm with the same +seed, you will get the same +result. Hence, to test the robustness of your +algorithm, you should run it with different seeds. This is rather time +consuming in the present programs, so we suggest that you wait until Lesson +3 to do so.
  • + +
      +
  • +Fitness function encapsulation: EO +is based on the notion of functors +- hence you now need to encapsulate your fitness function into a functor +object. This is what is done here (Bit +- Real).
  • + +
      +
  • +Initialization: +to initialize the population, first declare an empty object of class eoPop<Indi>, +which is basically an STL vector<Indi>, +then fill it with Indi's. And remember that +v.push_back +simply appends its argument at the end of STL +vector v.
  • + + + +
  • +Output: take +a snapshot at the initial population (Bit +- Real). Sort it first, so the best +individuals are first, and display it. Note that an eoPop has a << +method, which means that a simple os +<< pop streams the pop +onto the ostream os. +This is true for all objects of of class eoPrintable +(most EO objects) through the method printOn +(which is then called by the << +operator).
  • + +
      +
  • +Evolution engine: +The selection/replacement mechanism (Bit +- Real) is a simple generational +GA here: a simple selector, and a generational replacement. The eoDetTournamentSelect +has been chosen as a robust selection, and the generational replacement +(all parents are replaced by the offspring) is hard-coded in the eoSGA +algorithm.
  • + +
      +
  • +Variation operators: +in the simple algorithm considered here, individuals undergo crossover +and mutation. +In EO, these operators are (functor) +objects of class eoQuadOp +(binary operator that modifies both its arguments) and eoMonOp +(unary operator).  These operators are applied in turn to all selected +parents, according to user-defined probabilities.  These probabilities +are defined with all other parameters, and will +be passed to the eoSGA algorithm.  +For more details on these classes, go to the algorithm-based +corresponding pages, or to their respective documentation pages.
  • + +
      +
      +
    • +Bit The crossover eo1PtBitXover +is the standard 1-point crossover, and eoBitMutation +is the standard bit-flip mutation that randomly +flips all bits with a given probability P_MUT_PER_BIT.
    • + +
      Warning: the P_MUT_PER_BIT +probability is an internal parameter of the +eoBinMutation, +it is NOT the probability of mutation +at the individual level. EO corrects what can be viewed as an inconsistency +in Holland's original work, further used in Goldberg's book by separating +the probability of mutation for each individual (independent of the type +of mutation that will be applied) from the probability of flipping each +bit, which is specific of the bit-flip mutation.  Hence, to run the +same algorithm as Goldberg's SGA, the mutation probability (at individual +level) is 1, and the probability of flipping each bit is P_MUT_PER_BIT. +
    • +Real The crossover eoSegmentCrossover +is the standard segment crossover for real-valued +vectors, that chooses a point randomly on the segment between both parents +(also termed BLX-0). eoUniformMutation +is the uniform mutation for real-valued vectors +that chooses a new value for each variable uniformly on an interval centered +on the parent value. The width of the interval is an internal +parameter of the object, here called EPSILON.
    • + +
       
    + +
  • +Stopping criterion: +Specify a maximum number of generations +to run (Bit - Real): +the simplest of all stopping criteria at the moment, using an object of +a sub-class of class eoContinue.
  • + +
      +
  • +The algorithm: the +simple algorithm that is used here, called  eoSGA +requires +as parameters a selector, +a crossover and +the associated crossover rate, +a mutation and +the associated mutation rate, +and a stopping criterion. +Take a look at the corresponding +constructor +of the class eoSGA: +it only initializes its private data +with the parameters. Now look at the operator() +method - the one that is called in the code for FirstBitGA +or FirstRealGA - and you'll find +out that is is as simple as it sounds.
  • + +
      +
  • +Output: After +running the algorithm, output the sorted final population (Bit +- Real) - and look at the best +individual: this is the result of the algorithm.
  • + +
      +
  • +Main body: for +technical reasons (intercepting the exceptions), we need a main like this +one (Bit - Real)., +and you should not touch it unless you know what you are doing. Simply +note that this main calls the function main_function, which we have been +discussing up to now!
  • +
+ +

+ +
Exercise +1: maximize your own function

+This is very easy - if your search space is that of bitstring or of unbounded +real numbers. +
    +
  • +Go to the tutorial directory, and copy the +program you want to modify onto mytest.cpp.
  • + +
  • +Edit mytest.cpp +with any text editor:
  • + +
  • +Modify the fitness function itself (binary_value +in FirstBitGA,real_value +in  FirstRealGA)
  • + +
  • +Compile the program by typing make +mytest at system prompt
  • + +
  • +Run the new program by entering the command +mytest +at system prompt.
  • +
+ +

+ +
Exercise +2: check the differences between both programs

+Go and take a look at the code for these programs (Bit +- Real). Use the symbolic representation +of an Evolutionary Algorithm (you should understand that figure now, otherwise +go there and come back) to understand how each +part of the EA is coded. Try to spot the differences between both codes: +there are not so many! +
After you've tried that alone, take a look at the solution +:-) +

+ +
Exercise +3: change the selection procedure

+This is rather straightforward ... if you know what other types of selection +are available! +
At the moment, let's only consider only the following simple ones: +
    +
  • +You already know the tournament selection
  • + +
    Syntax:  eoDetTournamentSelect<Indi> +select(T_SIZE);   // T_SIZE in [2,POP_SIZE) +
  • +Try the well-known roulette wheel
  • + +
     Syntax:    eoProportionalSelect<Indi> +select; +
  • +Or the stochastic binary tournament
  • + +
    Syntax:  eoStochTournamentSelect<Indi> +select(RATE);     +// RATE in ]0.5,1] +
  • +and of course the random selection should +give bad results!
  • + +
    Syntax:  eoRandomSelect<Indi> +select;
+Note that all these classes of eoObjects are derived from the abstract +class +eoSelectOne. +To find out exactly how each procedure selects the individuals, read the +corresponding component-based page. +

+


Lessons learned: +
    +
  • +in EO, all actions are performed by functor +objects (this section is the last time in this tutorial that there +is a direct link to the EO Programming hints +page - though the link at top and bottom of all pages will remain there).
  • + +
  • +in EO, all object you will usually need to manipulate are templatized +w.r.t. the type of the individual you are handling.
  • + +
  • +The type of the individual is itself templatized +w.r.t. the type of fitness (double by default).
  • + +
  • +In EO (actually, in EC!) initialization and variation +operators are representation-dependent, while +the evolution engine is representation-independent +(well, like any rule, this one does have some exceptions).
  • + +
  • +Changing the fitness function, or the selection +procedure inside the generational GA evolution engine is straightforward.
  • + +
  • +remember, all solutions to exercises are in +the same sub-dir of dir Tutorial than the lesson itself (see here).
  • +
+ +
Lesson 2 - +Tutorial +main page - +Algorithm-Based - Component-Based +- Programming hints - EO +documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: Fri Nov 3 18:49:12 CET 2000 + + diff --git a/trunk/eo/tutorial/html/eoLesson2.html b/trunk/eo/tutorial/html/eoLesson2.html new file mode 100644 index 000000000..6b3cf4580 --- /dev/null +++ b/trunk/eo/tutorial/html/eoLesson2.html @@ -0,0 +1,357 @@ + + + + + + Tutorial: Lesson 2 + + + +Lesson 1 - +Lesson +3 - +Main page - +Algorithm-Based +- Component-Based - Hints +- EO +documentation +
+
+
+

+Tutorial Lesson 2: more encapsulations

+In this lesson, the same Evolutionary Algorithm will be rewritten in a +much more general context. +
First, look at the changes that have been done +to the algorithms. Then benefit from the new features by +
    +
  • +minimizing (and not only maximize) the fitness
  • + +
  • +combining several +operators of the same type
  • + +
  • +combining several +stopping criteria
  • + +
  • +use alternate selection/replacement +engines, deviating from the pure generational GA
  • +
+ +


Again, two basic algorithms are provided, namely FirstBitEA +and FirstRealEA. +
To compile and run them, go to the Lesson2 +sub-directory of the tutorial dir and simply type make. +Both examples should get compiled, and you can then run them by calling +their name from the system prompt. +

Note the slim difference in names, from GA +to EA: the behavior of these  EAs is +almost identical to that of their GA counterpart, at least with the default +settings that are provided. But their potentialities for easy modifications +are much larger, both in terms of variation operators +and of evolution engine (i.e. selection/replacement +mechanism).  +


Changes +

Browse through the code, and discover them one after the other: +

    +
  • +The fitness function +now +lies in a separate file +(Bit +- Real). But, more important, its +argument is a vector<bool> or a vector<double>, +and not an unknown type. This will allow to use the same file for any EO +object that is a sub-class of the corresponding STL vector class.
  • + +
      +

      +

    Note: Also, +a non-templatized fitness can be compiled +separately (not done here) into an object +file once and for all (remember +that templates forbid that). +
      +

  • +The encapsulation +of +the fitness (Bit +- Real) looks more complicated: you +have to declare 3 template arguments: the type of EO object it will be +applied to, the return type and the type of argument the function actually +requires.
  • + +
      +

      +

    Note: In the +previous files (Bit - Real) +, the last 2 types were deduced from the first (2nd argument = fitness +type of EO object, third = first). +
      +

  • +Both the above modifications makes it very easy to +minimize +rather than maximize a fitness function (see Exercise +1).
  • + +
      +
  • +The initialization +of the population is now encapsulatedinto +a separate initializer (based +on a boolean generator or a double-number +generator -see random_generators.h) +that is then used in the constructor of the population to build the individuals. +You can also use different initializers and call them in turn through the +call to pop.append() function +(see Exercise 2).
  • + +
      +

      +

    Note: Don't +forget to evaluate the population: +the eoPop has no idea of the eval function, so it has to be done from outside!!! +
      +

  • +You can now use +different +crossover +and +mutation +operatorsin the same algorithm, +choosing among them according to +relative +weights. The +class eoPropCombinedxxxOp, +where +xxx is either Mon (for mutations, of class eoMonOp) +or Quad (for crossovers, of class eoQuadOp), +is derived from the corresponding eoxxxOp class. When applying the eoPropCombinedxxxOp, +one of the eoxxxOp it contains is chosen by a roulette +wheel, according to their respective rates, and is applied to the arguments. +For more details on these classes, go to the algorithm-based +corresponding pages, or to their respective documentation pages.
  • + +
      +
    • +Bit
    • + +
      Three crossover +operators are available: the one-point +crossover is still there (class ), but now you also have the N-point +crossover eoBinNxOver +(the  number of points is 2 by default, but as always you can change +that in the constructor), and the Uniform +crossover eoBinUxOver +(where you can eventually twidle the choice from one parent to the other +by providing a probability in the constructore - defaulted to 0.5, which +amounts to symmetrical choice). +
      As for mutation +operators, apart from the eoBinMutation +(standard bitstring mutation flipping one bit with a given probability) +you can also use the eoDetBitFlip +that always filps the same number of bits (1 by default, but you can change +that in the constructor), randomly chosen in the bitstring. Even though +the average number of bits flipped is the same if the eoBinMutation +is +used with a rate of 1/N (N is the bitstring length) the +behavior of these mutation can be very different +on many problems. +
    • +Real
    • + +
      Two crossover +operators are available: the eoSegmentCrossover +chooses one point uniformly on the segment joining the parents, while the +eoHypercubeCrossover +performs a linear combination on each coordinate independently, which amount +to choosing the offspring uniformly in the hypercube whose diagonal is +the segment joining the parents. +
      As for mutation +operators, apart from the eoBinMutation +(standard bitstring mutation flipping one bit with a given probability) +you can also use the eoDetBitFlip +that always filps the same number of bits (1 by default, but you can change +that in the constructor), randomly chosen in the bitstring. And last but +not least, the normal mutation eoNormMutation modifies all coordinates +with a Gaussian noise, with standard deviation passed in the constructor.
    +Note: A third optional argument in +method add is a boolean (defaulted +to false). When true, the actual rates for all operators are displayed +on the screen as percentages: you don't have to input rates that sum up +to 1, all rates are scaled anyway. +

    Note: The +operators have to be encapsulated into an eoTransform +object (Bit - Real) +to be passed to the eoEasyEA algorithm. +The eoSGATransform is a simple +eoTransform +that does exactly the same thing than eoSGA: +each pair from the selected parents undergoes the crossover +operator with given probability, and all individuals (after crossover +eventually) undergo mutation with given probability. +The arguments to the eoSGATransform +are an eoQuadOp with its probability +and an eoMonOp with the associated +probability. +
      +

  • +You can use combinations +of +several stopping criteria by using an object of the class eoCombinedContinue +(Bit +- Real). Initialize it with an object +of class eoContinue, and +add +as many of other such objects as you wish. And as an eoCombinedContinue +is +an eoContinue, +simply pass it to the algorithm (Bit +- Real). To find out more, and +to get the list and syntax of existing eoContinue subclasses, check out +the corresponding component-based +page.
  • + +
      +
  • +The +full selection/replacement mechanism is +now in place through the eoEasyEA +algorithm.
  • + +
    This means that you can use different selectors. +which was already true in Lesson 1, but also different replacement +strategies (see Exercise 3) whereas generational +replacement was hard-coded in the algorithm eoSGA +used in Lesson1. +

    Beware that we have to encapsulate  (Bit +- Real) the eoDetTournament, +which is of class eoSelectOne (i.e. allows +to select one individual from a population, its operator() +returning a single individual) into an object of the eoSelectPerc +(perc stands for percentage) which allows to select a ... percentage of +a population (his operator()  +returns a population). This was done internally in the  constructor +of eoSGA  - see lesson1.

+ +
Exercise +1: minimizing +
Modify the algorithm so that it minimizes the +fitness. +
    +
  • +For the bitstring case, you only have to modify the +declaration +of the representation, using eoMinimizingFitness +instead of double. +But is that really all? Give it a try, look at the output, and do it right +the second time!!!
  • + +
  • +For the real-valued problem, you also need to modify +the file real_value.h so +that it returns the sum of squares instead of its inverse. And again there +is something else to modify...
  • +
+Exercise +2: initialization +
Use different initializers: for instance, on +the real-valued sphere function minimization, try to initialize half of +the population in [-2,-1] and the other half in [1,2], with and without +the segment and hypercube crossovers (and for large values of VEC_SIZE, +the size of the vectors). Amazing, isn't it! Explain that result. +

Exercise +3:  full selection/replacement +
You can now twiddle the number of offspring that +will be generated from the parents. But of course you need to adjust the +replacement to keep a constant population size. +

    +
  • +To modify the number +of offspring, use the second argument of the +encapsulator +(Bit - Real) +of the selector +of class eoSelectOne +into an eoSelectPerc object. For instance, try
  • + +
                    +eoSelectPerc<Indi> select(selectOne,2.0) +
    to generate twice as many offspring as there +are parents. +
    You can also use the other encapsulator that +takes as second argument an absolute number (e.g. if you want to generate +2 offspring whatever the population size): +
                    +eoSelectNumber<Indi> select(selectOne,2) +
    Or you can use the HowMany +paradigm and the eoSelectMany to +do either one depending on some command-line input (advanced). +
  • +To keep a constant population +size, you can use either the eoCommaReplacement +class, or the eoPlusReplacement. +The former selects the best offspring to replace the parents, the latter +selects the best among parents+offspring. Of course you cannot use eoCommaReplacement +if you have less offspring than parents!
  • + +
    Now if you use eoSelectRandom +as selector with a rate of +lambda, you end up with exactly the (mu+lambda) +or +(mu,lambda) strategies from Evolution +Strategies. +
  • +Question: what do you +get if you select 1 offspring only, and an eoPlusReplacement +strategy? Yes, you get almost the replace_worst Steady-State GA, though +rather inefficient, as you sort the population at every generation.
  • + +
  • +Hint: there are a few +Steady-State replacement strategies already there in EO. See the Replacement +page.
  • +
+Remember: all solutions +are in the same sub-directory of the Tutorial dir than the examples (i.e. +here Lesson2), and are described here. +

+


+
Lessons learned: +
    +
  • +How to write a fitness function that only +needs a genotype, not a full individual. Moreover you can compile it separately.
  • + +
    How to initialize the population using +random generators +
  • +How to use other evolution engine than the +simple generational GA.
  • + +
  • +How to combine different objects of the same kind into a single object +that you can use like a simple basic object (operators +and stopping criteria here).
  • +
+ +
Lesson 1 - +Lesson +3 - +Main page - +Algorithm-Based +- Component-Based - Hints +- EO +documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: Fri Nov 3 18:49:12 CET 2000 + + diff --git a/trunk/eo/tutorial/html/eoLesson3.html b/trunk/eo/tutorial/html/eoLesson3.html new file mode 100644 index 000000000..40c36e118 --- /dev/null +++ b/trunk/eo/tutorial/html/eoLesson3.html @@ -0,0 +1,565 @@ + + + + + + Tutorial: Lesson 3 + + +Lesson 2 - +Lesson +4 - +Main page - +Algorithm-Based +- Component-Based - Hints +- EO +documentation +
+
+
+

+Tutorial Lesson 3: input/output

+In this lesson, you will still use the same Evolutionary Algorithm, BUT +in a much more user-friendly way. You +will discover how to +
    +
  • +input parameters on the command-line or from a text +file
  • + +
  • +save the population to disk, together with every part +of the algorithm you could think of - so you can decide to reload +everything later to continue the same run, eventually with different parameters.
  • + +
  • +generate statistics on the populations, and output +them to the screen, text or graphic, or to a file (or to any other +device you might want to use).
  • +
+First, but you should now have done it without being told, go into the +Lesson3 +sub-dir of the tutorial dir and type +make. +This will compile the SecondBitEA +and SecondRealEA +programs. +

You can then either +

+ +


+


+
Changes +
As already said, the behavior of the algorithm +will be exactly the same as the previous one as far as optimization is +concerned. Only the input (of algorithm parameters) and output (of program +results) will be very different. +
Hence, the sections corresponding to the fitness +function, the initialization, the +variation +operators, the evolution engine +and the algorithm itself are +almost identical (apart from variable name changes). +
    +
  • +Fitness function: +there is an additional line +after the encapsulation of our binary_function +into an eoEvalFunc +object, which again encapsulate the eoEvalFunc +into an eoEvalFuncCounter. +As its name says, this object will, in addition to computing the fitness, +count the actual +number of evaluations: the fitness of non-modified individuals is of course +not recomputed - and this is taken care of by this object. Moreover, it +can be later used for displays +in eoMonitor objects, as done in the checkpoint +section.
  • + +
  • +The initialization +section has been extended to account for the possibility to re-load +a previously saved population. This is achieved +through an eoState object, if the corresponding program +parameter is set.
  • + +
  • +The +variation +operators and the evolution engine  +sections are similar to the ones in Lesson2
  • + +
  • +The parameter +section  is completely different from the previous one. All variables +corresponding to program parameters +are now read at run-time using an object of class eoParser.
  • + +
  • +The stopping criterion +section, has in fact now become the checkpoint section, as it involves +much more than just stopping criteria. See all details in the eoCheckpoint +paragraph below.
  • +
+ +
eoParser: +parameter input +
The first two examples of Lessons 1 and 2 had +a very crude way to set parameter values: they were hard-coded, and you +had to recompile the whole program to change a single value. We shall now +see now to set parameter values in a flexible way (though we're still looking +for volunteers to create a Graphical User Interface :-) +
Two base classes are used for that purpose: +
    +
  • +The eoValueParam +class, templatized by the type of the variable +you want to handle (i.e. iinteger, +double, yourPrivateClass, ...). In +this lesson, we will not go into details: e.g. we will not tell you that +the +eoValueParam +is actually a templatized sub-class of abstract class eoParam (oops, I +said it!), nor will we deal with parameters outside their use from an eoParser. +See the parameter section of the Component-Based tutorial, or wait until +lesson +4).
  • + +
  • +The eoParser +class, whose only purpose is the input of parameters. Read its +description if you are interested.
  • +
+ +
eoParser: +Modifying parameter values at run-time: +
Using an eoParser object, the parameter values +are read, by order of priority +
    +
  1. +from the command-line
  2. + +
  3. +from a text file
  4. + +
  5. +from the environment (forthcoming, if somebody insists)
  6. + +
  7. +from default values
  8. +
+The syntax of parameter reading is a keyword-based +syntax, now traditional in the Unix world: +
    +
  • +in EO, each parameter is designated by a (long) keyword, +and optionally by a short (1 character) keyword.
  • + +
      +
  • +the general syntax to modify parameter value at run-time is (either from +the command-line or in a text file)
  • + +
                 + +--longKeyword=value     +or     -cvalue    +if 'c' is the short keyword (though -c=value +also works) +
      +
  • +so, after compiling the executable for Lesson 3 (make +lesson3 at system prompt in Unix), you can try to type +in
  • + +
                  + +SecondBitEA +
    and see the algorithm run as before (OneMax optimized on 8-bits bitstrings). +But you can now type in +
                  + +SecondBitEA --vecSize=100 +
    and see the output of the optimization of OneMax on 100-bit bitstrings. +
      +
  • +Take a look at all available parameters by typing in
  • + +
                  + +SecondBitEA --help +
    or by going into the code: all parameter inputs have been grouped in +the +read_param function. +
      +
  • +After running the algorithm, a new file has been created, named SecondBitEA.status: +it contains the list of all actual parameters used, and can directly be +used as parameter input file: change the file name (e.g. to SecondBitEA.param), +edit it, change whichever parameter you want, and type in
  • + +
                    +SecondBitEA @SecondBitEA.param +
    and you will see all values that you defined into the file taken into +account. +
      +
  • +The priority remains to the command-line, +so you can still override the values in the parameter file by giving a +new value directly on the command-line.
  • +
+ +
eoParser: +Programming parameter input: +
The code of SeconBitEA provides examples of parameters reading. Lets +take the example of the random number +generator seed.  +Of course, you first need to declare +an eoParser object (it needs the standard argc and argv in its constructor). +
    +
  • +You must first declare a parameter +of type uint32 (32-bits integer). +The arguments are: default value, long keyword, comment (that will appear +in the help message and in the output "status" file if any) and optional +character keyword.
  • + +
  • +Then you must pass it to the parser +using the processParam method. The optional argument is a section name, +that will be used to make the output of the parser look clean and ordered.
  • + +
  • +Finally, you need to assign the +value to the variable seed. +Note that the value() method +of eoParam returns a reference, so you can eventually modify its value +somewhere else later (though of course this is not any useful for variable +seed!).
  • +
+There is however another way to achieve the same result in less lines of +code - with a different memory management. This is what is done in the +code for eoRealEA. The same parameter for the random +number generator seed +is read, but in one single line of code.  +The only difference is that now you cannot access the eoValueParam object +itself - but this is not often necessary. +
Be careful to ensure that the type of the default value in the call +to eoParameterLoader::createParam +method as this is the only way the compiler can desambiguate the template +(remember that eoParameterLoader is a +base class for eoParser. +
+
+
eoState: +saving and loadingYou might have +noticed in the  read_param +described above a new parameter +named load_name. +Now if you go to the init section of +the code, you will see an alternative way of initializing +the population: if load_name is an empty string, +then we do as in the preceding example and use an eoInitFixedLength object. +However, if a load_name name was entered, the population is read through +the inState.load(load_name) +instruction. Moreover, the comment says "Loading pop and +rng". +

This is made possible using the eoState +class. eoState +objects maintain references to eoObjects +that have both an input method (readFrom) +and an output method (printOn), +i.e. that derive from the base class eoPersistent. +You must first register +object into a state, and can then save them to a (text) file, and later +read them from that file using the load +method, as done here. +
Of course, you can call the save +method for an eoState +object anywhere in the code. But the checkpointing +mechanism offers you better ways to do that - and it's so easy .... +

Note that an eoState alos has another use in EO whan it comes to memory +management: it can be a repository of pointers that are not allocated within +obects - allowing to delete them by simply deleting the eoState (see Lesson +4). +
+


eoCheckpoint: +every generation I'd like to ... +
The checkpointing mechanism is a very powerful +construct to perform some systematic actions +every generation - like saving things +(using eoState objects described above), computing statistics +on the population, updating +dynamical parameters or displaying +information. +

eoCheckpoint +objects are eoContinue +objects that contain pointers to different +types of objects. When their operator() +method is called (i.e. every generation in the examples up to now), they +first call the operator() +methods of all object they contain, and then return their result as an +eoContinue +object (i.e. should we continue or stop). +
Programming: To +do something every generation, you simply need to add +an object whose operator() +does what you want to the eoState that you will use as continuator in the +algorithm. +
+


eoCheckpoint: +Stopping +
The eoContinue +part of an eoCheckpoint +is a single object, passed to the +constructor. If you want more that one stopping criterion, use an eoCombinedContinue +object as described in Lesson2. +
+
+
eoCheckpoint: Computing +statistics +
Statistics are computed using eoStat +objects, i.e. functor objects whose operator() +receives as argument a reference to a population as argument, and can hence +compute whatever is needed over that population. eoStat +objects are templatized +over the type of what they compute (e.g. double, +or pair<double>, +or ...). But looking at the inheritance +diagram of the eoStat +class, you find that eoStat +objects are also eoValueParam +objects. And this allows eoStat +to be used within eoMonitor +object, and hence displayed +to the user! +

Statistics: Available +instances +
Some widely used statistics are already available (and of course you +can build you own!). +

    +
  • +eoBestFitnessStat returns +the fitness value of the best individual in the population (of type FitnessType, +whatever this is).
  • + +
  • +eoAverageStat and eoSecondMomentStat +respectively return the average (type double, assumes that FitnessType +is castable to a double) and a pair made of the average and the standard +deviation (type pair<double>) +of the fitnesses in the populations.
  • + +
  • +eoDiversityStat returns the +diversity in the population: assuming that there is a distance function +defined among individuals, it returns the average inter-individuals distance. +See also Exercise 2.
  • +
+Statistics: Adding +to the checkpoint +
To compute more statistics when your algorithm is running, simply declare +the corresponding eoStat objects, and add +them to the eoCheckpoint you +use in the algorithm. But it hardly makes any sense if you don't monitor +those statistics (i.e. either displaying them on the screen, or storing +them into a file): see next section! +

Note: actually, there are 2 distinct +classes that compute and give access to statistics: eoStatand +eoSortedStat. +As its name indicate, the latter is used whenever computing the statistics +require a sorted population: not only this avoids to sort the population +many times, but also it avoids changing the order of the population at +all as eoSortedStat objects +work on a temporary vector of fitnesses . But as +far as their usage is concerned, its makes no difference. +
+


+
eoCheckpoint: Monitoring +eoParameters +
The eoMonitor +objects are used to display or store to a file a set of eoValueParam +objects. +

Monitors: Available +instances +
A few monitors are available in the EO distribution: +

    +
  • +eoStdoutMonitor displays its +parameters in text format on the screen. The +(optional) boolean value in the constructor modifies the output: when true +(the default), verbose output is used, with one line per parameter. When +false, parsimonious output displays one line for all parameters.
  • + +
  • +eoFileMonitor writes its parameters +in text format in a file. A file name is required +in the constructor, and an optional separator character can be added (default +is ' '). Note that the file is by default overwritten by next call to the +same program, unless you pass "true" as third (optional) boolean parameter, +which will result in appending to the file if it ever exists.
  • + +
  • +eoGnuplot1DMonitor displays +its parameters in graphical format on the screen +by calling the gnuplot program, +and as of today, only works in the Unix version of EO (as always, volunteers +are welcome to port that to MS Windows). It takes an optional filename +as input, as communication of data with gnuplot +is done through a file. If no filename is provided, the file will be erased +at the end of the run, while it is otherwise kept (though it will be overwritten +by next call to the same program).
  • +
+ +


Monitors: Adding +to the checkpoint +
To display something while the algorithm is running, you need to declare +an eoMonitor object, add +some objects (that must be eoValueParam +objects) to that monitor, and of course add +the monitor to the eoCheckpoint +you use in the algorithm. +
+


+
eoCheckpoint: Updating +things +
The last type of objects that  eoCheckpoint +can handle are eoUpdater +objects. You should simply encapsulate in an eoUpdater +anything you wish to do which does not fit into one of the above category. +Note that their operator() method +does not receive any argument. +

Updater: Available +instances: A few updaters are available in the EO distribution: +

    +
  • +eoIncrementor A simple updater +which maintains a counter (an eoValueParam +that needs to be created beforehand, and passed in the constructor). It +is incremented every time the operator() +method is called (every generation at the moment). You can of course also +give an increment in the constructor (1 by default).
  • + +
  • +eoCountedStateSaver +and eoTimedStateSaver can +be used to save some existing eoState +(see above) to a file regularly, either based on the +generation count (e.g. every 4 generations) or based on the clock (e.g. +every 5 seconds).
  • +
+Updater: Adding to +the checkpoint +
A very simple example of using an eoUpdater +is given in the code for SecondBitEA: First declare +an eoValueParam object, then +use +it to construct an eoIncrementor +that you must add to the eoCheckpoint +in order to activate its update. You can then use the parameter for your +purpose, for instance as a first coordinate for a monitor. +
Note also how to use the statesavers: first declare +a state, then register +whatever you think necessary to that state, then pass +the state to some state-saver - and don't forget to add +the statesavers to the current eoCheckpoint. +
+
+
Exercise 1: +
    +
  • +The code of SecondBitEA +display things in the current window in text format. Replace the eoFileMonitor +by an eoGnuplot1DMonitor +and watch the graphical output (Unix +systems with gnuplot +installed only, sorry).
  • + +
  • +Note that you must also replace the eoSecondMomentStat +by an eoAverageStat, +otherwise the standard deviations won't make any sense here.
  • + +
  • +Please try to understand why the average is always +0 before taking a look at the solution (file exercise1.cpp).
  • + +
  • +Then run
  • + +
              +exercise1 --vecSize=1000 --maxGen=1000 +
    to get a chance to see something happening before +the program ends!
+ +
Exercise 2: +
Write the eoDiversityStat +stat computation and test it. Thanks to send us the code! +
+
+
Exercise 3: +
Write the code for an eoGnuplotSecondStatMonitor +that would display the eoSecondMomentStat +(i.e. take into account the standard deviations and display them as error-bars. +
Again, send us the code afterwards, thanks :-) +
+
+
Lessons learned: +
    +
  • +Value of program parameters can be set at run-time +using the eoParser class.
  • + +
  • +Snapshots of the algorithms can easily +be saved (and restored) +thanks to the eoState class.
  • + +
  • +The eoCheckpoint mechanism +let you do things every generation +without modifying existing algorithms, by simply writing the necessary +code and encapsulating it into an object that eoCheckpoint +is aware of, that are at the moment the following:
  • + +
  • +computing statistics, displaying +parameters +(e.g. statistics),  saving the +(eo)State +of the program.
  • +
+In next lesson you will find out that many adaptive +techniques (the state-of-the-art in Evolutionary Computation) can easily +be programmed through the eoUpdater +construct. +
+
Lesson 2 - +Lesson +4 - +Main page - +Algorithm-Based +- Component-Based - Hints +- EO +documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: None of your business! + + diff --git a/trunk/eo/tutorial/html/eoLesson4.html b/trunk/eo/tutorial/html/eoLesson4.html new file mode 100644 index 000000000..0ddab737f --- /dev/null +++ b/trunk/eo/tutorial/html/eoLesson4.html @@ -0,0 +1,940 @@ + + + + + + Tutorial: Lesson 4 + + +Lesson 3 - +Lesson +5 - +Main page - +Algorithm-Based +- Component-Based - Hints +- EO +documentation +
+
+
User's guide: General +- Bitstring - Real - ES +- Programmer's guide: General +- Memory management - Parameters +
+
+
+

+Tutorial Lesson 4: ready-to-use fully operational EA

+In this lesson, you will still use the same Evolutionary Algorithm. But +this time you will have full control of all components +from the command-line or a parameter file.
+You can even use the algorithm decribed here without any other knowledge +of EO, just by writing your fitness function as a plain C++ function.

+ +Contents
+ + +

+


+
User's +guide +

As already said, the behavior of the algorithms +will be exactly the same as the previous one as far as optimization is +concerned. Only now you will be able to tune every component of the algorithms +(except the type of genotype) using run-time parameters. +
Also, as in previous lessons, most of the code +is representation-independent, i.e. is the same for both the binary genotypes +and the real-valued genotypes. This small user's guide reflects that, but +you can go directly to the binary or the real +parts if you wish. +

Warning: this +is a user guide, not a programming guide. In particular, the keywords +of the parameters are not +the names of +the underlying classes (though they should be similar in most cases). +

User's guide:Parameter +input The way to input parameters +has already be described in Lesson +3. To get a list of parameters, type the command with option --help +(or -h): with both testBit and testReal this will result in +

    +
  • +Printing the list of keywords on the standard output
  • + +
  • +Creating (or overwriting) a file name testBit.status +or testReal.status that contains the list of all recognized parameters +and has the format of an input parameter file.
  • +
+User's guide:The +status file +
This file will always contain the list of the +parameters that have been actually used by the last run of the program, +however thay have been entered (try testBit +-G1 and take a look a the +status file). The parameters that are commented out (a # character comments +out the rest of the line) in the file are those that were not specified +by the user. +
On the status file, the parameters are organized +in sections. Note, however, that this format is not mandatory in the param +file, as only the keywords +are processed. +

User's guide:Representation-independent +parameters +
In what follows, the fixed font colored text +is directly taken from the status file and is commented between the lines. +The presentation follows the status file format - only two sections are +representation-dependent (see the corresponding binary +or real sections). All other sections are presented +now: +

+


+
Section ###### +General ###### +
# --help=0 # -h : Prints +this message +
Boolean parameter of +absolutely no interest: tells whether or not help was requested. +

# --seed=988700289 # -S : +Random number seed +
Unsigned long parameter: +the seed for the Random Number Generator +If the parameter is absent, then time(0) is used, which indicates the number +of seconds since Jan. 1 1980, is used ... and stored in the status file, +of course, so you can repeat the same run by simply assigning that value +again. There is no default value ("true" random +seed). +

+


+

Section ###### +engine ###### +
In this section, one chooses all components of +the Evolution Engine (selection, replacemenet +and the like). +

# --popSize=20 # -P : Population +Size +
Integer parameter: +the size of the population (constant along evolution). And yes, this is +a representation independent parameter, as the population is created either +from a file or using an eoInit object - and only that object is representation-dependent. +
# --selection=DetTour(2) +# -S : Selection: Roulette, DetTour(T), StochTour(t) or Sequential(ordered/unordered) +
String parameter: +Name of selection procedure. Availabable +are the roulette wheel +(name Roulette, +fitness scaling coming soon); deterministic +tournament (name DetTour +with size - integer > 2 - in parentheses right after the name, use double +quotes on the command line);  stochastic +tournament (name StochTour +with probability - float in [0.5, 1] - in parentheses); sequential +(name +Sequential, +all individuals in turn), either from best to worst (option ordered +in parentheses), or in random ordered (option unordered); +and finally repeated independent uniform +choices  (name Random). +Default is DetTour(2). +

# --nbOffspring=100% # -O +: Nb of offspring (percentage or absolute) +
Integer or real-valued parameter: +this parameter indicates the amount of +offspring that will be generated from +the genitors every generation. However, this amount can be specified either +relative +to the population size, and it should then end with percent character (%), +or as an absolute +integer number (without the percent char). +
Indeed, you can either want, say 7 times more +offspring than parents (a rather common situation in Evolution Strategies), +in which case you give value 700% to nbOffspring +parameter; or you might want a single offspring whatever the population +size, like in Steady-State evolution engines, in which case you simply +enter value 1. Default is 100%. +

# --replacement=Comma # -R +: Replacement: Comma, Plus, EPTour(T), SSGAWorst, SSGADet(T), SSGAStoch(t) +
String parameter: +Name of replacement procedure. Availabable are the ES +plus and comma deterministic replacement +strategies (named respectively Plus +and  Comma); +EP +stochastic tournament (name EPTour +with tournament size in parentheses); and the steady-state +replacement +procedures, at the moment only based on fitnesses, replacement being either +deterministic +(new born replace worst parent, name SSGAWorst),  +or based on a tournament  (name SSGADet +for deterministic tournament, size in parentheses, and SSGAStoch  +for stochastic tournament, probability in parentheses). Default +is Comma (which btw is also SGA generational +replacement whenever there are as many offspring +as parents). +

# --weakElitism=0 # -w : +Old best parent replaces new worst offspring *if necessary* +
Boolean parameter: +if true, weak elitism is added to the replacement procedure (i.e. if the +best fitness among the offspring is less than the best fitness, the best +parent replaces the worst offspring). Default +is false. +

+


+

Section ###### +Output ###### +
This first section on Output contains parameters +related to screen text output. +

# --useEval=1 # Use nb of +eval. as counter (vs nb of gen.) +
Boolean parameter: +whether or not you want the nb of evluations to be displayed and used as +counter in statistics outputs and plots. Default +is true. +

# --printBestStat=1 # Print +Best/avg/stdev every gen. +
Boolean parameter: +toggles screen output of indicated statistics. Default +is true. +

# --printPop=0 # Print sorted +pop. every gen. +
Boolean parameter: +adds a dump of the whole population to the screen every generation. Is +likely to generate huge +output! Default is false. +

# --printFDC=1 # Print FDC +coeff. every gen. +
Boolean parameter: +adds Fitness Distance Correlation to output every generation. Default +is false. +

+


+

Section ###### +Output - Disk ###### +
This second section on Output contains parameters +related to DISK output. +

# --resDir=Res # Directory +to store DISK outputs +
String parameter: All +DISK +output will be stored in a separate directory +-this is its name. If the directory does not exist, it is created. Note +that all graphical displays +will use that directory for their temporary files. Also all +job dump (see section Persistence +below) store their files there too. +

# --eraseDir=0 # erase files +in dirName if any +
Boolean parameter: +in order not to mix up files from different runs, it is mandatory to ensure +that the directory where all files will be stored is empty. However, if +this parameter is not set and the directory already exists, an exception +is thrown and the program stops. It it is set, all +files in the result directory are erased. +

# --fileBestStat=0 # Output +Best/avg/stdev to a file +
Boolean parameter: +if present, the best, average and standard deviation statistics are stored +in file resDir/best.xg. +Each line contains the generation number, eventualy the evaluation count +(depending on parameter useEval +then the statistics. Default is false. +
  +

+


+

Section ###### +Output - Graphical ###### +
This last section on Output contains parameters +related to graphical output (only available in Unix through gnuplot at +the moment). +

# --plotBestStat=0 # Plot +Best/avg Stat +
Boolean parameter: +toggles gnuplot output of best and average plots (Linux only at the moment). +Default +is false. +

# --plotFDCStat=0 # Plot +FDC scatter plot +
Boolean parameter: +toggles the Fitness Distance Correlation plot (Fitness vs distance to best). +Default +is false. +

# --plotHisto=0 # Plot histogram +of fitnesses +
Boolean parameter: +if on, gnuplot is used to plot the sorted population (fitness vs rank). +Gives a graphical idea of the diversity. Default +is false. +

+


+

Section ###### +Persistence ###### +
This section contains parameters handling job +dump and restart mechanism. +

# --Load= # -L : A save file +to restart from +
String parameter: +if present, the initial population (and the RNG) is read from indicated +file. That file must +come from a previous save (or must be in same format!), i.e. must contain +a popualtion, the RNG and all parameters. If no other parameter is modified, +using a previously saved population and RNG will give exactly the same +results than having run that previous run longer. And a way to be sure +to re-use the same parameters is to ... use that very save file as parameter +file, as it contains all actual parameters in the right format. +
Note that if not enough individuals are read, +the remaining are randomly initialized. No +default value. +

# --recomputeFitness=0 # +-r : Recompute the fitness after re-loading the pop.? +
Boolean parameter: +in case some individuals are read from a file, their fitness is read too. +If this one is true, it is nevertheless recomputed. Default +is false i.e. use fitnes that's in the file. +

# --saveFrequency=0 # Save +every F generation (0 = only final state, absent = never) +
Integer parameter: +interval between two dump to disk of the whole population (+RNG + parameters), +in a file named genNN.sav in the dirRes +directory, where NN is the generation number. If this prameter is present +(even with 0 or negative value), the final population will always be saved, +whatever the reason for stopping. Hence the only way to avoid all saves +is to omit the parameter (there is no default +value). +

# --saveTimeInterval=0 # +Save every T seconds (0 or absent = never) +
Integer parameter: +time interval between two population (+RNG + parameters) dumps to disks. +Files are names timeNN.sav. See pervious parameter description for ore +details. No default value. +

# --status=t-eoGA.status +# Status file +
String parameter: +name of the status file (that contains all parameters in the input format). +There is no way to avoid creating that file except recompiling ... or giving +the name /dev/null (Unix). Default value is ProgramName.status +

+


+

Section ###### +Stopping criterion ###### +
This section allows to decide when the algorithm +will stop. +

# --maxGen=100 # -G : Maximum +number of generations (0 = none) +
Integer parameter: maximum number of generations. +A value of 0 disables that stopping criterion. Default +is 100. +

# --steadyGen=100 # -s : +Number of generations with no improvement +
Integer parameter: +stops whenever that number of generations is passed without any improvement +of the best fitness in the population, provided the following minimum number +of generations has been done. No default value. +

# --minGen=0 # -g : Minimum +number of generations +
Integer parameter: the above steadyGen parameter +starts its job only after that minimum nuber of generations is passed. +No +default value. +

# --maxEval=0 # -E : Maximum +number of evaluations (0 = none) +
Integer parameter: +maximum number of generations. +No default +value. +

# --targetFitness=0 # -T +: Stop when fitness reaches +
Real-valued parameter: +the algorithm stops whenever the best fitness reaches that target. No +default value. +

# --CtrlC=0 # -C : Terminate +current generation upon Ctrl C +
Boolean parameter: +if true, Ctrl C only stops after the current generation as completed (eventually +dumping population to a file if some saver is active). This very useful +feature is only available in Unix at the moment. Default +is false. +
+


+

User's guide:Bistring +specific parameters +
The following describes the specific parameters that are available +in program BitEA to evolve genotypes that are bitstrings. +
The two representation-dependent sections are concerned repectively +with genotype initilization and variation operators. +

+


+

Section ######    +Genotype Initialization    ###### +
This section should allow input if all necessary +parameters for genitype initialization +

# --ChromSize=10 # -n : The +length of the bitstrings +
Integer parameter: +The bitstring initilization only requires the length of the chromosome. +

+


+

Section ######    +Variation Operators    ###### +
This section allows to tune the way the variation +operators will be applied to the individuals (in the strict limit of SGA +model at the moment, see below). +

# --operator=SGA # -o : Description +of the operator (SGA only now) +
String parameter: +Describes the way the operators are applied. At the moment, only +SGA is available. SGA sequentially +applies a (quadratic) crossover operator with probability pCross +and a mutation operator with probability  pMut. +Both these operators can in turn be proportional +combinations of simple operators of the +same arity. +

# --pCross=0.6 # -C : Probability +of Crossover +
Floating-point parameter: +The probability that a given couple of selected genitors is applied the +crossover operator. In SGA operator model, each couple of selected genitors +is applied the crossover operator with that probability (and remains unchanged +with probability 1-pCross. +Whenever a couple undergoes crossover, a choice is made upon available +crossover operators proportionaly to their +relative rates (see below). Default +is 0.6. +

# --pMut=0.1 # -M : Probability +of Mutation +
Floating-point parameter: +The probability that a given individual (resulting from a crossover or +a non-crossover operation, see above) is applied the mutation operator. +Whenever an individual undergoes mutation, a choice is made upon available +mutation operators proportionaly to their +relative rates (see below). Default +is 0.1. +

# --onePointRate=1 # -1 : +Relative rate for one point crossover +
Floating-point parameter: +Rate of aplication of the 1-point crossover relatively +to 2-point and uniform below (see pCross +parameter). Default is 1. +

# --twoPointRate=1 # -2 : +Relative rate for two point crossover +
Floating-point parameter: +Rate of aplication of the 2-point crossover relatively +to 1-point above and uniform below (see pCross +parameter). Default is 1. +

# --uRate=2 # -U : Relative +rate for uniform crossover +
Floating-point parameter: +Rate of aplication of the 1-point crossover relatively +to 1- and 2-point above (see pCross +parameter). Default is 2. +

# --pMutPerBit=0.01 # -b +: Probability of flipping 1 bit in bit-flip mutation +
Floating-point parameter: +When bit-flip mutation +is applied, each bit is flipped independently with probability  pMutPerBit. +

# --bitFlipRate=0.01 # -s +: Relative rate for bit-flip mutation +
Floating-point parameter: +Rate of aplication of the bit-flip mutation relatively +to one-Bit mutation below (see pMut +above). Default is 0.01 +(if all relative rates are equal, the choice is uniform among available +operators). +

# --oneBitRate=0.01 # -d +: Relative rate for deterministic bit-flip mutation +
Floating-point parameter: +Rate of aplication of the one-bit mutation relatively +to bit-flip mutation below (see pMut +above). One-bit mutation flips one and only one bit, uniformly chosen in +the individual. Default is 0.01 +(if all relative rates are equal, the choice is uniform among available +operators). +
  +

+


+

User's guide:Real-valued +specific parameters +
+To run your own real-valued application, write your fitness function +(see real_value.h
), +recompile, and run from the command line
+

RealEA @RealEA.param

+in order to use sensible parameters! (see Lesson 3 +for details on the parameter file). +But remember that Self-adaptive ES will work much better! +

+The following describes the specific parameters that are available +in programs RealEA +and ESEA +to evolve genotypes that are vector<double>. +
RealEA +implements what can be called a "real-coded GA", where everything is identical +to the bitstring case above (except initialization and operators that are +specific to vector<double> of course) and ESEA +implements the full Evolution-Strategy self-adaptive mutation mechanism +- together with specific ES crossover operators. The initialization section +for both programs are identical, but the operator sections are totally +different. See next paragraph for a description of ES +specific parameters. +

+


+

Section ######    +Genotype Initialization    ###### +
This section should allow input if all necessary +parameters for genitype initialization +

# --vecSize=10 # -n : The +number of variables +
Integer parameter: +The initilization requires the length of the vector<double>. +

# --initBounds=10[-1,1] # +-B : Bounds for uniform initialization +
Bounds parameter: +Bounds for uniform initialization of the real variables. The syntax for +this parameter given in the objectBounds +parameter description below. This argument is mandatory, furthermore the +given bounds must be bounded. +The +default is [-1,1] for all variables. +
Note that this parameter is independent of the objectBounds +parameter below. +

# --sigmaInit=0.3 # -s : +Initial value for Sigma(s) +
Floating-point parameter: +The initial value for all standard-deviation mutation strategy parameters. +Useless when no self-adaptive mutation mechanism is used. +

+


+

Section ######    +Variation Operators    ###### +
This section allows to tune the way the variation +operators will be applied to the individuals (in the strict limit of SGA +model at the moment, see below). +

# --objectBounds=10[-inf,+inf] +# -B : Bounds for variables +
Bounds parameter: +Bounds for object variables. The syntax for this parameter is a succession +of (optionally semi-colon separated) items of the form N[min,Max]where +the optional integer N +indicates how many variables have the given bounds. min +and Max +are either floating point numbers, or -inf +(resp. +inf) +to indicate unbounded direction. If not enough bounds are provided, the +remaining variables will have the same bounds as the last bounds given. +
This argument is mandatory, and +default +is [-inf,+inf], i.e. unbounded variables. +

Examples: +10[-1,1]is +equivalent to simply [-1,1] +or to the extended  [-1,1][-1,1][-1,1][-1,1][-1,1][-1,1][-1,1][-1,1][-1,1][-1,1]. +
And [-1,1];2[0,1];[-inf,10]results +in the first variable staying in [-1,1], the second and the third in [0,1] +and all remaining variables below 10. +

# --operator=SGA # -o : Description +of the operator (SGA only now) +
String parameter: +Describes the way the operators are applied. At the moment, only +SGA is available. SGA sequentially +applies a (quadratic) crossover operator with probability pCross +and a mutation operator with probability  pMut. +Both these operators can in turn be proportional +combinations of simple operators of the +same arity. +

# --pCross=0.6 # -C : Probability +of Crossover +
Floating-point parameter: +The probability that a given couple of selected genitors is applied the +crossover operator. In SGA operator model, each couple of selected genitors +is applied the crossover operator with that probability (and remains unchanged +with probability 1-pCross. +Whenever a couple undergoes crossover, a choice is made upon available +crossover operators proportionaly to their +relative rates (see below). Default +is 0.6. +

# --pMut=0.1 # -M : Probability +of Mutation +
Floating-point parameter: +The probability that a given individual (resulting from a crossover or +a non-crossover operation, see above) is applied the mutation operator. +Whenever an individual undergoes mutation, a choice is made upon available +mutation operators proportionaly to their +relative rates (see below). Default +is 0.1. +

# --alpha=0 # -a : bound +for combination factor in real crossover +
Floating-point parameter: +Bound for the choices of linear combination factors in both crossover belows +(similar to BLX-alpha notation). Default is +0 (i.e. combination factor are chosen in [0,1]). +

# --segmentRate=1 # -s : +Relative rate for segment crossover +
Floating-point parameter: +Rate of application of the segment crossover relatively +to hypercube and uniform crossovers (see pCross +parameter). Segment crossover generates offspring uniformly on the segment +joining both parents, i.e. constructs two linear combinations of the parents +with a random number uniformly drawn in [alpha,1+alpha]. +Default +is 1. +

# --hypercubeRate=1 # -A +: Relative rate for hypercube crossover +
Floating-point parameter: +Rate of application of the hypercube crossover relatively +to segment and uniform crossovers (see pCross +parameter). Hypercube crossover generates offspring uniformly on the hypercube +whose diagonal is the segment joining both parents, i.e. by doing linear +combinations of each variable independently (a random number in [alpha,1+alpha] +is drawn anew for each variable). Default +is 1. +

# --uxoverRate=1 # -A : Relative +rate for uniform crossover +
Floating-point parameter: +Rate of application of the segment crossover relatively +to hypercube and segment crossovers (see pCross +parameter). Uniform crossover simply exchanges values of variables, i.e. +uniformly picks up two other summits of the hypercube defined by the parents. +Default +is 1. +

# --epsilon=0.01 # -e : Half-size +of interval for Uniform Mutation +
Floating-point parameter: +The uniform and deterministic-uniform mutations will choose values of variable +X uniformly in [X-epsilon, +X+epsilon]. +Default +is 0.01. +

# --uniformMutRate=1 # -u +: Relative rate for uniform mutation +
Floating-point parameter: +Rate of aplication of the uniform mutation relatively +to determinitic uniform and the normal mutations (see pMut +above). Uniform mutation modifies all variables by choosing new values +uniformly on an interval centered on the old value of width 2*epsilon +(see above). Default is1. +

# --detMutRate=1 # -d : Relative +rate for deterministic uniform mutation +
Floating-point parameter: +Rate of aplication of the determinisitc-uniform mutation relatively +to uniform and normal mutations (see pMut +above). Deterministic-uniform mutation modifies one single variable uniformly +based on epsilon epsilon. +Default +is1. +

# --normalMutRate=1 # -d +: Relative rate for Gaussian mutation +
Floating-point parameter: +Rate of aplication of the normal mutation relatively +to two uniform mutations above (see pMut +above). Default is1. +

# --sigma=0.3 # -s : Sigma +(fixed) for Gaussian mutation +
Floating-point parameter: +The value of standard deviation for Gaussian mutation - fixed along evolution +(see the Evolution Strategy program below for self-adaptive mutations). +

+


+

User's guide:ES +with self-adative mutation parameters +
+To run your own SA-ES application, write your fitness function +(see real_value.h
), +recompile, and run from the command line
+

ESEA @ESEA.param

+in order to use sensible parameters! (see Lesson 3 +for details on the parameter file). +

+The following describes the specific parameters for program ESEA, +that implements the full Evolution-Strategy self-adaptive mutation mechanism +- together with specific ES crossover operators. The initialization section +is the same as the one for plain vector<double> above, so only the opeartor +sections will be described here. A new section is now concerned with deciding +what kind of self-adaptive mutation strategy will be applied - it has been +separated from the other variation operators because it has consequences +on the choice of the genotype. +
Warning: if you choose not to use +any self-adaptive mechanism (i.e. setting all parameters of this section +to false) you end up with ... an algorithm that is identical to RealEA +above (try it and take alook at the status file). +

+


+

Section ######     +ES mutation    ###### +
This section allows to decide which type of self-adaptive +mutation will be used. There are three available types: isotropic mutation, +using one standard deviation for each individual, that will be applied +to all variables; anisotropic mutation, where each individual carries as +many standard deviations as it has variables; and correlated mutation where +each individuals has its own full correlation matrix. +

# --Isotropic=1 # -i : Isotropic +self-adaptive mutation +
Boolean parameter: +If true, at least one self-adaptive parameter will be used for each individual. +Default +is true. +

# --Stdev=0 # -s : One self-adaptive +stDev per variable +
Boolean parameter: +If true, at least one self-adaptive parameter per variable will be used +for each individual. Default is false. +

# --Correl=0 # -c : Use correlated +mutations +
Boolean parameter: +If true, full correalted self-adaptive mutation will be used for each individual. +Default +is false. +

Note: The +default values result in an isotropic self-adaptive mutation to be chosen. +

+


+

Section ######    +Variation Operators    ###### +
Only the parameters that are specific to ESEA +are presented here - the objectBounds,operator,pCross +and pMut +are exactly the same as for RealEA +above. +

# --crossType=global # -C +: Type of ES recombination (global or standard) +
String parameter:  +Es crossover can involve only two parents - and it is then identical to +the standard +hypercube crossover describe for the RealEA +parameters above. But new parents can also be chosen anew for each variable +before doing the crossover for that variable - and this is called global +recombination. +

# --crossObj=discrete # -O +: Recombination of object variables (discrete or intermediate) +
String parameter:  +There are two possible crossovers in plain ES. The discrete +crossover simpy exchanges variables among the parents. It is similar to +the plain uniform crossover for real variables. The  crossover performs +a linear combination of parents;variables - it si similar to the hypercube +crossover described for  with alpah parameter set to 0. This parameter +allso to choose the type of crossover that will be applied to the object +variables (i.e. the origianl variables +of the problem). Default is discrete. +

# --crossStdev=intermediate +# -S : Recombination of mutation strategy parameters (intermediate or discrete) +
String parameter:  +This parameter allows to choose the type of crossover (see above) that +will be applied to the mutation strategy +parameters that are part of the genotype. +Default +is intermediate. +

# --TauLoc=1 # -l : Local +Tau (before normalization) +
Floating-point parameter: +The local factor for the mutation of the mutation strategy parameters (the +only one used when a single standard deviation is used). Default +is 1. +

# --TauGlob=1 # -g : Global +Tau (before normalization) +
Floating-point parameter: +The global factor for the mutation of the mutation strategy parameters +(only useful when more than one standard deviation are used). Default +is 1. +

# --Beta=0.0873 # -b : Beta +
Floating-point parameter: +The factor for the mutation of the rotation angles in the case of the full +correlated mutation. Default is 0.0873 +(following Schwefel). +

+


+
Programmer's +guide +

At the moment, you will have to browse in the source (colored!) code +(Bit - Real) almost by yourself, sorry. +

Note that the main file is now very slim, as it only contains calls +to some make_xxx +functions - these functions contain the actual code, very similar to the +code of Lesson3, except for the memory management, performed through an +eoState +object (notice that all make_xxx +calls have an eoState as second parameter). +

Programmer's guide: The +make_xxx files +

Interface: all make_xxx +files have as first two parameters an eoParser +and an eoState. +The eoParser +is be used within all functions to parse the command-line and/or a parameter +file in order to read any relevant user-parameter, while the eoState +is used here to store all pointers to be allocated inside the function +(see Programming hints for more +detailed explanations). +

There are 2 types of make_xxx +files: the ones that do depend on representation, defining the genotype +and +initialization +(make_genotype_xxx, +with xxx being the type of genotype) and variation operators (make_op_xxx), +and the one that are truly representation-independent (make_pop, +make_continue, make _checkpoint, make_algo and +make_run). +
The former are located in the directory corresponding to the actual +genotype (src/ga +for eoBit, src/es +for eoReal and all eoESxxx genotypes). The latter are in the directory +src/do. +

If you take a close look at the code of make_continue +for instance, you will first notice that ... the function declared there +is called do_make_continue +and is not the one you are calling in +the main file, though it has the same parameters as arguments. +
The explanation lies within the file make_continue_xxx.cpp +(with xxx = ga or real/es)which, as its color (and name)  should have +told you about, are representation-dependent: in fact the make_continue_xxx.cpp +files only instanciates the general <EOT> template into one of the possible +template for eoBit or eoReal/eoES - and this trick allows to compile +them separately! +

The other thing that you should notice is that the code there is very +similar to the code that was in Lesson 3,  regarding parameter reading +and type of object that are allocated - except for memory management. This +goes for all make_xxx +files - so the only thing you need to understand how it goes is to look +at the memory management section. +

Pros: you don't have to handle a +huge main function - and many of the make_xxx files can be directly used +in different applications (this is called modularity +:-))) +
More interesting, you can even compile +the make_xxx +files separately for a given target +template, and link them e.g. with your fitness function when it is ready +(remember that up to now you needed to compile everything altogether by +including the code into your mail fine). Indeed, if you do a global make, +you will notice that there are additional libraries compiled in src/ga +and src/es +... +

Cons: It makes the code a little +more complex to understand, first because of the indirection needed for +pre-compilation with a given template, and second because of the memory +management that this imposes. +
  +
  +

Programmer's +guide: Memory management +
As already said, all functions have an eoState +as second argument - and that object is used to store the functor objects +that were simply declared as variables of the main function up to now : +see Programming hints for more +detailed explanations and take a look at the code of make_continue +for instance, you will see the implementation of the memory management +in action. +

Programmer's +guide: Memory management +of eoParam objects +

It has been seen in Lesson 3 that parameters could be read from command-line +and/or a parameter file using an eoParser +object. However, the memory mangement problem also concerns EO parameter +objects (eoParam): +the way there are read in Lesson3 +makes them local variables of the function they are defined in. +
It is however possible to ask the eoParser +to hold them, as done for instance in eoContinue for the maximum number +of generations. Local declaration would amount to something like : +

eoValueParam<unsigned +int>& maxGenParam(100, "maxGen", "Maximum number of generations () += none)",'G'); +
 parser.processParam( +maxGenParam, "Stopping criterion" ); +
 unsigned maxGen = +maxGenParam.value(); +

while if you want the parser to hold those eoParam objects, you will +write something like +

eoValueParam<unsigned>& +maxGenParam = _parser.createParam(unsigned(100), "maxGen", "Maximum number +of generations () = none)",'G',"Stopping criterion"); +

and then use maxGenParam.value() +to get the value enterred by the user. In that case, you get a reference +to an eoParam object that is hold by the eoParser - and deleted whith it. +
Note that there are two important differences +between the arguments of the constructor of an eoParam object and the method +createParam of an eoParser object: first, you need to provide the additional +section parameter (used only when outputting the eoParser); second you +must +make sure that the first argument is of the correct type otherwise the +compiler will complain. +

Note that if you don't later need the eoParam, but simply its value, +you can even diretly write +

unsigned maxGen = _parser.createParam(unsigned(100), +"maxGen", "Maximum number of generations () = none)",'G',"Stopping criterion").value(); +

Getting parameter values in different +functions: +

It is often useful (though probably very bad +programming style :-))) to be able to get the value of a user-defined +parameter in two different places of the code without passing it around +through many levels of call. You can then use the alternate function getORcreateParam +with exactly the same syntax than createParam. +
Be careful that the link between both parameters is made through their +longmanes (second argument), and that you must so hard-code +that name in two different places with of course exactly the same spelling!!! +
Examples can be found for instance +in the make_genotype_xxx files, for the sizes of the genotypes: it is often +the case that the definition of the optimization problem requires (or computes) +such size. The idea is then that you either read or compute that size, +then create a (dummy) parameter with the name that is used later in the +make_genotype file. For instance, for bitstrings, the make_genotype_ga.h +contains the following line defining the size of the bitstring +

  unsigned theSize = +_parser.getORcreateParam(unsigned(10), "chromSize", "The length of the +bitstrings", 'n',"Problem").value(); +

If you want to define that size earlier, you should write somewhere +before +
  +

  unsigned requiredSize  += ... ; +
 _parser.createParam(requiredSize, +"chromSize", "The length of the bitstrings", 'n',"Problem"); +

Of course, if that size is mandatory, you should NOT modify it at run-time +by entering anther value ! +

+


User's guide: General +- Bitstring - Real - ES +- Programmer's guide: General +- Memory management - Parameters +
+
Lesson +3 - +Lesson 5 - +Main +page - +Algorithm-Based - Component-Based +- Hints - EO +documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: None of your business! + + diff --git a/trunk/eo/tutorial/html/eoLesson5.html b/trunk/eo/tutorial/html/eoLesson5.html new file mode 100644 index 000000000..fcb025784 --- /dev/null +++ b/trunk/eo/tutorial/html/eoLesson5.html @@ -0,0 +1,415 @@ + + + + + + Tutorial: Lesson 5 + + +Lesson 4 - +Lesson +6 - +Main page - +Algorithm-Based +- Component-Based - Hints +- EO +documentation +
+
+
+

+Tutorial Lesson 5: using your own genotype

+In this lesson, you will learn how to design and evolve your +own genotype structure. Note that at the moment, only algorithms +involving a scalar fitness (double) are implemented (see test dir for Pareto +optimization of multiple-objective fitness - or be patient :-) +

The minimum code you'll have to write is first, of course, the code +for the genotype structure. Then, the representation-dependent +code: intialization procedure(s), +variation +operators (quadratic crossover, mutation operator), ... and evaluation +function - and that's it : we have prepared some template files and +the script create.sh that will take care of generating a few other files +to make your application complete. +

In what follows, we will suppose that you want to evolve some data structure, +and that you have enough programming skills to be able to write C code +for its random initilialization, its crossover, its mutation and the computation +of its fitness. +
The examples will be described supposing you want to evolve ... bitstings +to solve the OneMax problem (oh no!!!). +

+ +New May 2004 : A +second script, createSimple, + was added some time ago, that generates much simpler +set of files, and the stat.tmpl +file is now used to allow you to +compute and +print and +save-to-disk and +plot-on-line your +own statistics. +But you'll have to find out by yourself how those work, sorry, no +time. It should be easy by just looking at the code (in main file, and +in OneMaxEA.cpp +and the newly created +eoOneMaxStat.h.

+ +New May 2004 : In +the same simplified main file (e.g. OneMaxEA.cpp after running +./createsimple OneMax in +dir .../eo/tutorial/Templates), you +will also be able to use fitness sharing (together with roulette) as a +possible selector. + + +


Using +template files +
Follow this very simple procedure: +
    +
  • +choose a name for you application - +here OneMax will be used
  • + +
  • +go to the tutorial/Templates +dir
  • + +
           cd +pathWhereEOisInstalled/tutorial/Templates +
  • +run the create.sh script with +argument OneMax and second optional argument  a directory name (suppose +it's called APPLICATION here)
  • + +
              +./create.sh OneMax APPLICATION +
    This will create a directory tutorial/APPLICATION +
  • +Go to the APPLICATION directory
  • + +
              +cd ../APPLICATION +
    You should see the following files: +
        OneMaxEA.cpp           +the main main file, includes all other, to be compiled +
        Makefile               +with default target eoOneMaxEA +
        eoOneMax.h             +class eoOneMax, the genotype +
        eoOneMaxEvalFunc.h     + +class for the computation of fitness +
        eoOneMaxInit.h         +class for genotype initlialization +
        eoOneMaxMutation.h     +class for mutation +
        eoOneMaxQuadCrossover.h +class +for (quadratic) crossover +
        make_genotype_OneMax.h + +helper function that create the initializer +
        make_op_OneMax.h       +helper function that handles the rates of application of +the variation operators
    +    OneMaxLibEA.cpp        +another main file, for separate compilation of representation-independent +stuff +
        make_OneMaxEA.cpp      +the source for the representation-independent stuff +
      +
  • +Compile the whole application
  • + +
             +make +
    and you should have no error there and see a new executable file named +OneMaxEA. +You can run it and ... it will do nothing (what did you expect???).
    +
    +
  • +Now you should go and edit the files. The minimal  changes that you +will need are
  • + +
       in eoOneMax.h               +define your genotype +
       in eoOneMaxInit.h           +define the initialization of one genotype +
       in eoOneMaxMutation.h       + +define the mutation of one genotype +
       in eoOneMaxQuadCrossover.h  + +define the crossover of 2 genotypes
+Smooth application building: +
    +
  • +After editing a particular file, compile +the whole thing immediately (by running make) and +run the algorithm, to validate your code
  • + +
  • +In each file, start by only adding code between keyword-pairs START +and END
  • +
+We shall now take a look in turn at the 4 files mentionned above, then +describe rapidly the other files, especially the main files. +
+
Genotype +- and its pre-requisites: eoOneMax.h +

First thing is to write the code for the structure +of the genotype. This is done by filling in the template file +eoOneMax.h. +There are 4 places that you should consider filling in: +

    +
  • +Of course, the data that will build up +the genotype. The convention in EO is to have it at the end of the class +definition, and as private data.
  • + +
  • +The default constructor of an instance. +Note that you must provide a default constructor, +and that no other constructor will be called within EO code. you might +think you need some other constructor to initialize problem-specific data. +This should be rather done in the eoInit object used to randomly initialize +all individuals, or in the eoEvalFunc object, used to compute the fitness.
  • + +
  • +The printOn method, that writes the object +to a stream. You must +call the EO::printOn method that will take care of the fitness, +and then write the specific code for your data structure.
  • + +
  • +The readFrom method, that will read an +object from a stream. Again, you should call the +EO::readFrom method first to take care of the fitness.
  • + +
    Also note that readFrom will be generally called from an object that +will have been constructed through the default constructor. This is why +the EO objects that we provide always start printing structures with their +length...
+You can of course also add a destructor +if needed, and any other helper method. For instance, you will probably +consider adding accessors and setters +for the private data - unless you prefer to make everything public :-( +
See now an example of a comple eoOneMax.h +file. Note that this is the only "colored" completed file we will show, +you will have to go to the .../tutorial/OneMax +dir to browse all files at once. +
+
Initialization: +

Initializer: eoOneMaxInit.h +
You must provide an eoInit +object for your genotype, that is an object that will randomize +a genotype built by the default constructor of the EO class +(here, an eoOneMax object) . Here you must at least fill the +code for such randomization. +
But you might also need some parameters (e.g. the size of the bitstring +in eoOneMax): you should then pass +them through the constructor of the eoOneMaxInit class, and store +it in its private data. +
And of course you might need to add a destructor (no example here) +if you use complex data type in the object. +

Parameters: make_genotype_OneMax.h +
There is another file you will probably want to modify as far as initialization +is concerned, that is make_genotype_OneMax.h. +Such helper files are used for all components of advanced EO programs (see +Lesson 4). The main reason for that is to allow separate compilation of +such sub-components for known EO types, as this is done in the directories +src/ga and src/es. But a useful consequence is to make your code modular. +For instance, the make_genotype_OneMax.h +file takes care of all the preparation of all data regarding the eoInit +object - and returns to the main fonction a reference to an eoInit that +will later be used to initialize the whole +population in a representation-independent way. +
What you have to do in that file is to set values for all parameters +needed by the eoOneMaxInit class, for instance by reading them from the +parser: this allows later to modify them easily from the command-line. +Note however that an alternative could be to pass the parser to the constructor +of the eoOneMaxInit class, and to read all parameters there... +
Note: Remember that the make_xxx +files were first introduced to allow the user to compile sepearately most +of the code of standard Evolutionary Algorithm written in EO for bitstring +and real vector representations ( +
+


Evaluation: +eoOneMaxEvalFunc.h +

The eoOneMaxEvalFunc is +the object that will compute the fitness of an +eoOneMax object. You have to fill in the code +for the computation of the fitness value (there is no way that this +can be done automatically :-) Note that this code must  be run only +if the _eo.invalid() test +returns true, to avoid computing the fitness of an object that has not  +been modified and thus still holds a valid fitness value. After computing +the fitness, store it into the object by calling the fitness(FitnessType) +method. +
Should you need some specific data for that, the constructor +of the object is the place to get such data, and you should, again, +store it in some private data +of the class. +
+


Variation +Operators +
You can write as many crossover and mutation operators as you like. +However, we only provide the template files for quadratic +crossover and mutation, but +you could then easily write the equivalent code for binary crossover, or +general variation operator. +

Crossover: eoOneMaxQuadCrossover.h +
As usual, you must go and write the code +for the operator() that will perform the crossover, possibly modifying +both arguments. Don't forget to update the boolean +parameter that will report whether the genotypes have been modified +- allowing to recompute the fitness only of the ones that have actually +been modified. You can also have parameters +to the crossover by passing +them to the constructor, ans storing them in the private +data of the crossover object. +

Mutation: eoOneMaxMutation.h +
Here again, you must go and write the code for the operator() that +will perform the mutation, eventually modifying its arguments. Don't forget +to update the boolean parameter that +will report whether the genotype has been modified - allowing to recompute +the fitness only of the ones that have actually been modified. You can +also have parameters to the mutation +by passing them to the constructor, +ans storing them in the private data +of the mutation object. +

Parameters: make_op_OneMax.h +
First of all, if you intend to use only one +crossover operator and one mutation +operator, you have nothing to modify +in make_op_OneMax function, except maybe +reading user-defined parameters (copy the code from make_genotype_OneMax) +and passing them to the appropriate +operator constructor. +
As it is written now, it allows you enter a crossover probability Pcross +and a mutation probability Pmut, +and to build an eoGeneralOp that will call in sequence the eoOneMaxQuadCrossover +that is defined above with probability Pcross +and the eoOneMaxMutation also +defined above with probability Pmut.  +Beware that all allocated objects must be stored in the eoState otherwise +you will run into trouble (see EO Memory +Management explanations). +

However, everything is there (commented out) to allow you to use more +than one crossover and one mutation +- provided you write the code for them , of course. +

The code starts by defining an eoOneMaxQuadCrossoverobject, +then reads some application rate that is totally useless if you have only +one crossover, then creates an eoPropCombinedQuadOp +with this simple oeprator. The same story repeats for the mutation. Finally, +the eoGeneralOp +is created from those combined operators and the individulal level probabilities +Pcross +and  Pmut. +

In order to add a second crossover operator for instance (called eoOneMaxSecondCrossover +in the commented code) all you need to is +

    +
  • +Create the code for the new class  eoOneMaxSecondCrossover: +simply copy the eoOneMaxQuadCrossover.h +file into eoOneMaxSecondCrossover.h  +and change all names eoOneMaxQuadCrossover +to  eoOneMaxSecondCrossover (inlcluding +after the #ifdef statement!!!);
  • + +
  • +Uncomment the corresponding lines +in make_op_OneMax.h, possibly adding user-defined parameter reading
  • + +
  • +Repeat as many times as you have operators, using of course different names! +The same recommendations hold for mutations.
  • +
+In case you have more than one operator of a kind, then of course the relative +weights of application do make sense, allowing you to tune with command-line +parameters the proportion with which each operator that will be applied. +

+


Main +files: OneMaxEA.cpp +and OneMaxLibEA.cpp +

As a start, you should only (eventually) modify in OneMaxEA.cpp +the type of fitness you +will be handling, namely double +if you are maximizing, or eoMinimizingFitness +if you are minimizing. Then running +make will result in a perfectly +valid executable named OneMaxEA. +

The skeleton of the main file here mimics that of the main file in +Lesson4, +and uses the make_xxx separate +files construct: the part of an Evolutionary Algorithm related to the +evolution +engine is indepenent of the representation, +and can be directly used ... provided it is compiled with the right template +(remember everything in EO is templatized +over the EO objects it handles.  Main file OneMaxEA.cpp +is written so that it includes eveything - and thus everytime you run make +(or make OneMaxEA), you compile +the code for make_pop, make_continue and make_checkpoint that is defined +in the .../src/do directory. +

The basic construct is (for instance to build the evolution engine) +
  + + + + +
#include <do/make_algo_scalar.h> +
eoAlgo<Indi>&  make_algo_scalar(eoParser& +_parser, eoState& _state, eoEvalFunc<Indi>& _eval, eoContinue<Indi>& +_continue, eoGenOp<Indi>& _op) +
{ +
 return do_make_algo_scalar(_parser, +_state, _eval, _continue, _op); +
}
+First, include the code (from the do directory). Then define the make_xxx +function from the do_make_xxx function. +
Of course, such construct is stupid here, as you could perfectly call +directly the do_make_xxx function in the main. However, if you ever want +to do separate compilation of some parts, you will need such construct +(see Lesson4) so we have kept it here for +consistency reasons. +

Go in your application directory, and look at the differences between +both files and you'll see how this is handled in both cases. +

Reducing compilation time: +
However, we also provide another main file (OneMaxLibEA.cpp)that +only includes the code that is specific to your application, and is supposed +to be linked with another object file that will contain the code that is +representation independent (make_OneMax.cpp).  +This is done by running make OneMaxLibEA +on the command-line. +
For example, on a PentiumIII 400MHz with g++ 2.96, compiling OneMaxEA +takes about 33s, compiling both make_OneMax.o +and OneMaxLibEA takes about +54s but compiling only OneMaxLibEA +takes only 14s  make_OneMax.o +is up-to-date ... +

Hints: +
While developping the genotype structure itself in file eoOneMax.h, +you should use the OneMaxEA.cpp +file. But after the eoOneMax.h +file is frozen, you should use the eoOneMaxLibEA.cpp +file. Of course, both  resulting programs are strictly identical! +

+


Lesson +4 - +Lesson 6 - +Main +page - +Algorithm-Based - Component-Based +- Hints - EO +documentation +
+
+
+Marc Schoenauer
+ + + diff --git a/trunk/eo/tutorial/html/eoOneMax.html b/trunk/eo/tutorial/html/eoOneMax.html new file mode 100644 index 000000000..8f8cfb03e --- /dev/null +++ b/trunk/eo/tutorial/html/eoOneMax.html @@ -0,0 +1,209 @@ + + + + + + Templates/eoOneMax.h + + +Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+

+Templates/eoOneMax.h

+The places where you have to put some code are on pink +background.. Only the the character +colors have the usual meaning. +
+ + + + +
/** -*- mode: c++; c-indent-level: +4; c++-member-init-indent: 8; comment-column: 35; -*- +
The above line is usefulin Emacs-like editors +
*/ +
/* +
Template for creating a new representation +in EO +
================================================ +
*/ +
#ifndef _eoOneMax_h +
#define _eoOneMax_h +
/**  +
*  Always write a comment in this format +before class definition +
*  if you want the class to be documented +by Doxygen +
* Note that you MUST derive your structure +from EO<fitT> +
* but you MAY use some other already prepared +class in the hierarchy +
* like eoVector for instance, if you handle +a vector of something.... +
* If you create a structure from scratch, +
* the only thing you need to provide are  +
*              +a default constructor +
*              +IO routines printOn and readFrom +
* +
* Note that operator<< and operator>> +are defined at EO level +
* using these routines +
*/
+ + + + + +
template< class FitT> +
class eoOneMax: public EO<FitT> { +
public: +
  /** Ctor: you MUST provide +a default ctor. +
   * though such individuals will +generally be processed  +
   * by some eoInit object +
   */ +
 eoOneMax()  +
 { 
+ + + + + +
      +// START Code of default Ctor of an eoOneMax object +
      // +END    Code of default Ctor of an eoOneMax object
+ + + + + +
 } +

 virtual ~eoOneMax() +
 {

+ + + + + +
      +// START Code of Destructor of an eoEASEAGenome object +
      // +END    Code of Destructor of an eoEASEAGenome object
+ + + + + +
 } +

 virtual string className() const +{ return "eoOneMax"; } +
 

+ + + + + +
  /** printing... */ +
 void printOn(ostream& os) const +
 { +
      // +First write the fitness +
     EO<FitT>::printOn(os); +
     os << ' +';
+ + + + + +
      +// START Code of default output  +

/** HINTS +
* in EO we systematically write the sizes +of things before the things +
* so readFrom is easier to code (see below) +
*/ +

      // END    +Code of default output

+ + + + + +
     } +

  /** reading...  +
   * of course, your readFrom must +be able to read what printOn writes!!! +
   */ +
 void readFrom(istream& is) +
 { +
      // +of course you should read the fitness first! +
     EO<FitT>::readFrom(is);

+ + + + + +
      +// START Code of input +

/** HINTS +
* remember the eoOneMax object will come +from the default ctor +
* this is why having the sizes written out +is useful +
*/ +

      // END    +Code of input

+ + + + + +
 } +
 
+ + + + + +
private:     // +put all data here
+ + + + + +
      // +START Private data of an eoOneMax object +
      // +END    Private data of an eoOneMax object
+ + + + + +
}; +

#endif

+ +
Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Fri May +3 06:06:09 2002 + + diff --git a/trunk/eo/tutorial/html/eoOneMaxEvalFunc.html b/trunk/eo/tutorial/html/eoOneMaxEvalFunc.html new file mode 100644 index 000000000..4d6eefbff --- /dev/null +++ b/trunk/eo/tutorial/html/eoOneMaxEvalFunc.html @@ -0,0 +1,160 @@ + + + + + + Templates/eoOneMaxEvalFunc.h + + +Back to Lesson 5 +- Tutorial main page - Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
+
+
+

+Templates/eoOneMaxEvalFunc.h

+The places where you have to put some code are on pink +background.. Only the the character +colors have the usual meaning. +
+ + + + +
/** -*- mode: c++; c-indent-level: +4; c++-member-init-indent: 8; comment-column: 35; -*- +

The above line is usefulin Emacs-like editors +
*/ +

/* +
Template for evaluator in EO, a functor that +computes the fitness of an EO +
========================================================================== +
*/ +

#ifndef _eoOneMaxEvalFunc_h +
#define _eoOneMaxEvalFunc_h +

// include whatever general include you need +
#include <stdexcept> +
#include <fstream> +

// include the base definition of eoEvalFunc +
#include "eoEvalFunc.h" +

/**  +
 Always write a comment in this format +before class definition +
 if you want the class to be documented +by Doxygen +
*/

+ + + + + +
template <class EOT> +
class eoOneMaxEvalFunc : public eoEvalFunc<EOT> +
{ +
public: +
/// Ctor - no requirement
+ + + + + +
// START eventually +add or modify the anyVariable argument +
 eoOneMaxEvalFunc() +
  //  eoOneMaxEvalFunc( +varType  _anyVariable) : anyVariable(_anyVariable)  +
// END eventually add or modify the anyVariable +argument
+ + + + + +
 {
+ + + + + +
      // +START Code of Ctor of an eoOneMaxEvalFunc object +
      // +END    Code of Ctor of an eoOneMaxEvalFunc object
+ + + + + +
 } +

  /** Actually compute the fitness +
   * +
   * @param EOT & _eo the EO +object to evaluate +
   *                                  +it should stay templatized to be usable  +
   *                                  +with any fitness type +
   */ +
 void operator()(EOT & _eo) +
 { +
      // +test for invalid to avoid recomputing fitness of unmodified individuals +
     if (_eo.invalid()) +
         +{ +
double fit;     +// to hold fitness value

+ + + + + +
      +// START Code of computation of fitness of the eoOneMax object +
// fit = blablabla +
      // +END    Code of computation of fitness of the eoOneMax object
+ + + + + +
_eo.fitness(fit); +
         +} +
 } +

private:

+ + + + + +
// START Private data +of an eoOneMaxEvalFunc object +
  //  varType anyVariable;    +// for example ... +
// END    Private data of +an eoOneMaxEvalFunc object
+ + + + + +
}; +
#endif
+ +
Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Fri May +3 06:14:25 2002 + + diff --git a/trunk/eo/tutorial/html/eoOneMaxInit.html b/trunk/eo/tutorial/html/eoOneMaxInit.html new file mode 100644 index 000000000..07475be6f --- /dev/null +++ b/trunk/eo/tutorial/html/eoOneMaxInit.html @@ -0,0 +1,153 @@ + + + + + + Templates/eoOneMaxInit.h + + +Back to Lesson 5 - +Tutorial main page - Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
+
+
+

+Templates/eoOneMaxInit.h

+The places where you have to put some code are on pink +background.. Only the the character +colors have the usual meaning. +
+ + + + +
/** -*- mode: c++; c-indent-level: +4; c++-member-init-indent: 8; comment-column: 35; -*- +
The above line is usefulin Emacs-like editors +
*/ +

/* +
Template for EO objects initialization in +EO +
============================================ +
*/ +

#ifndef _eoOneMaxInit_h +
#define _eoOneMaxInit_h +

// include the base definition of eoInit +
#include <eoInit.h> +

/**  +
*  Always write a comment in this format +before class definition +
*  if you want the class to be documented +by Doxygen +
* +
* There is NO ASSUMPTION on the class GenoypeT. +
* In particular, it does not need to derive +from EO (e.g. to initialize  +
*      atoms of +an eoVector you will need an eoInit<AtomType>) +
*/

+ + + + + +
template <class GenotypeT> +
class eoOneMaxInit: public eoInit<GenotypeT> +{ +
public: +
/// Ctor - no requirement
+ + + + + +
// START eventually +add or modify the anyVariable argument +
 eoOneMaxInit() +
  //  eoOneMaxInit( varType  +_anyVariable) : anyVariable(_anyVariable)  +
// END eventually add or modify the anyVariable +argument
+ + + + + +
 {
+ + + + + +
      // +START Code of Ctor of an eoOneMaxInit object +
      // +END    Code of Ctor of an eoOneMaxInit object
+ + + + + +
 } +

  /** initialize a genotype +
   * +
   * @param _genotype  generally +a genotype that has been default-constructed +
   *                                    +whatever it contains will be lost +
   */ +
 void operator()(GenotypeT & +_genotype) +
 {

+ + + + + +
      +// START Code of random initialization of an eoOneMax object +
      // +END    Code of random initialization of an eoOneMax object
+ + + + + +
     _genotype.invalidate();     +// IMPORTANT in case the _genotype is old +
 } +

private:

+ + + + + +
// START Private data +of an eoOneMaxInit object +
  //  varType anyVariable;    +// for example ... +
// END    Private data of +an eoOneMaxInit object
+ + + + + +
}; +

#endif

+ +
Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Fri May +3 06:17:21 2002 + + diff --git a/trunk/eo/tutorial/html/eoOneMaxMutation.html b/trunk/eo/tutorial/html/eoOneMaxMutation.html new file mode 100644 index 000000000..5181567ff --- /dev/null +++ b/trunk/eo/tutorial/html/eoOneMaxMutation.html @@ -0,0 +1,168 @@ + + + + + + eoOneMaxMutation.h + + +Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+
+

+eoOneMaxMutation.h

+The places where you have to put some code are on pink background. +Only the the character colors have the usual meaning. +
  + + + + + +
+/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
+The above line is useful in Emacs-like editors
+ */
+/*
+Template for simple mutation operators
+======================================
+*/
+#ifndef eoOneMaxMutation_H
+#define eoOneMaxMutation_H
+#include <eoOp.h>
+/**
+ *  Always write a comment in this format before class definition
+ *  if you want the class to be documented by Doxygen
+ *
+ * THere is NO ASSUMPTION on the class GenoypeT.
+ * In particular, it does not need to derive from EO
+ */
+
+
+ + + + +
+ +template<class GenotypeT>
+class eoOneMaxMutation: public eoMonOp<GenotypeT>
+{
+public:
+  /**
+    * Ctor - no requirement
+    */
+
+
+ + + + +
+ +// START eventually add or modify the anyVariable argument
+  eoOneMaxMutation()
+  //  eoOneMaxMutation( varType  _anyVariable) : anyVariable(_anyVariable)
+// END eventually add or modify the anyVariable argument
+
+
+ + + + +
+ +  {
+
+
+ + + + +
+ +      // START Code of Ctor of an eoOneMaxEvalFunc object
+      // END    Code of Ctor of an eoOneMaxEvalFunc object
+
+
+ + + + +
+ +  }
+  /// The class name. Used to display statistics
+  string className() const { return "eoOneMaxMutation"; }
+  /**
+    * modifies the parent
+    * @param _genotype The parent genotype (will be modified)
+    */
+  bool operator()(GenotypeT & _genotype)
+  {
+      bool isModified;
+
+
+ + + + +
+ +      // START code for mutation of the _genotype object
+            /** Requirement
+* if (_genotype has been modified)
+*        isModified = true;
+* else
+*        isModified = false;
+*/
+      return isModified;
+      // END code for mutation of the _genotype object
+
+
+ + + + +
+ +  }
+private:
+
+
+ + + + +
+ +// START Private data of an eoOneMaxMutation object
+  //  varType anyVariable;    // for example ...
+// END    Private data of an eoOneMaxMutation object
+
+
+ + + + +
+ +};
+#endif
+
+
Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+
Last +modified: Wed May 1 07:18:00 2002 + + + diff --git a/trunk/eo/tutorial/html/eoOneMaxQuadCrossover.html b/trunk/eo/tutorial/html/eoOneMaxQuadCrossover.html new file mode 100644 index 000000000..a91a653ea --- /dev/null +++ b/trunk/eo/tutorial/html/eoOneMaxQuadCrossover.html @@ -0,0 +1,168 @@ + + + + + + Templates/eoOneMaxQuadCrossover.h + + +Back to Lesson +5 - Tutorial main page - Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
+
+
+

+Templates/eoOneMaxQuadCrossover.h

+The places where you have to put some code are on pink +background.. Only the the character +colors have the usual meaning. +
+ + + + +
/** -*- mode: c++; c-indent-level: +4; c++-member-init-indent: 8; comment-column: 35; -*- +
The above line is usefulin Emacs-like editors +
*/ +
/* +
Template for simple quadratic crossover operators +
================================================= +
Quadratic crossover operators modify the +both genotypes +
*/ +

#ifndef eoOneMaxQuadCrossover_H +
#define eoOneMaxQuadCrossover_H +

#include <eoOp.h> +

/**  +
*  Always write a comment in this format +before class definition +
*  if you want the class to be documented +by Doxygen +
* +
* THere is NO ASSUMPTION on the class GenoypeT. +
* In particular, it does not need to derive +from EO +
*/

+ + + + + +
template<class GenotypeT>  +
class eoOneMaxQuadCrossover: public eoQuadOp<GenotypeT> +
{ +
public: +
  /** +
   * Ctor - no requirement +
   */
+ + + + + +
// START eventually +add or modify the anyVariable argument +
 eoOneMaxQuadCrossover() +
  //  eoOneMaxQuadCrossover( +varType  _anyVariable) : anyVariable(_anyVariable)  +
// END eventually add or modify the anyVariable +argument
+ + + + + +
 {
+ + + + + +
      // +START Code of Ctor of an eoOneMaxEvalFunc object +
      // +END    Code of Ctor of an eoOneMaxEvalFunc object
+ + + + + +
 } +

  /// The class name. Used to +display statistics +
 string className() const { return +"eoOneMaxQuadCrossover"; } +

  /** +
   * eoQuad crossover - modifies +both parents +
   * @param _genotype1 The first +parent +
   * @param _genotype2 The second +parent +
   */ +
 bool operator()(GenotypeT& _genotype1, +GenotypeT & _genotype2)  +
 { +
     bool oneAtLeastIsModified;

+ + + + + +
      +// START code for crossover of _genotype1 and _genotype2 objects +
            +/** Requirement +
* if (at least one genotype has been modified) +// no way to distinguish +
*        +oneAtLeastIsModified = true; +
* else +
*        +oneAtLeastIsModified = false; +
*/ +
     return oneAtLeastIsModified; +
      // +END code for crossover of _genotype1 and _genotype2 objects
+ + + + + +
 } +

private:

+ + + + + +
// START Private data +of an eoOneMaxQuadCrossover object +
  //  varType anyVariable;    +// for example ... +
// END    Private data of +an eoOneMaxQuadCrossover object
+ + + + + +
}; +

#endif

+ +
Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Fri May +3 07:47:13 2002 + + diff --git a/trunk/eo/tutorial/html/eoOneMax_complete.html b/trunk/eo/tutorial/html/eoOneMax_complete.html new file mode 100644 index 000000000..0c6c24680 --- /dev/null +++ b/trunk/eo/tutorial/html/eoOneMax_complete.html @@ -0,0 +1,192 @@ + + + + + + Templates/eoOneMax_complete.h + + +Back to Lesson 5 +- Tutorial main page - Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
+
+
+

+Templates/eoOneMax_complete.h

+The user-defined code is on pink background.. +Only the the character colors have the +usual meaning. +

+ + + + +
/** -*- mode: c++; c-indent-level: +4; c++-member-init-indent: 8; comment-column: 35; -*- +
The above line is usefulin Emacs-like editors +
*/ +

/* +
Template for creating a new representation +in EO +
================================================ +
*/ +

#ifndef _eoOneMax_h +
#define _eoOneMax_h +
 

+ + + + + +
/**  +
* A simple example class for bitstring (is +NOT supposed to be used :-) +
*/
+ + + + + +
+ + + + + +
template< class FitT> +
class eoOneMax: public EO<FitT> { +
public: +
  /** Deafult Ctor: nothing to +be done */ +
 eoOneMax() {} +

 virtual string className() const +{ return "eoOneMax"; } +
 

+ + + + + +
  /** printing... */ +
     void printOn(ostream& +_os) const +
     { +
          +// First write the fitness +
         +EO<FitT>::printOn(_os); +
         +_os << ' ';
+ + + + + +
         +_os << b.size() << ' ' ; +
         +for (unsigned i=0; i<b.size(); i++) +
             +_os << b[i] << ' ' ;
+ + + + + +
     } +

  /** reading...  +
   * of course, your readFrom must +be able to read what printOn writes!!! +
   */ +
 void readFrom(istream& _is) +
 { +
      // +of course you should read the fitness first! +
     EO<FitT>::readFrom(_is);

+ + + + + +
     unsigned s; +
     _is >> s; +
     b.resize(s); +
     for (unsigned +i=0; i<s; i++) +
         +{ +
             +bool bTmp; +
             +_is >> bTmp; +
             +b[i] = bTmp; +
         +} 
+ + + + + +
 }
+ + + + + +
+ + + + + +
  // brute setting (we could +also have defined a Ctor from a vector<bool>) +
 void setB(vector<bool> & +_b) +
 { +
     b=_b; +
 } +

  // brute accessing (we could +also define operator[] ...) +
 const vector<bool> & B() +
 { +
     return b; +
 }

+ + + + + +
+
private:     // +put all data here
+ + + + + +
 std::vector<bool> b;
+ + + + + +
}; +

#endif

+ +


Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Sat May +4 06:02:46 2002 + + diff --git a/trunk/eo/tutorial/html/eoOperators.html b/trunk/eo/tutorial/html/eoOperators.html new file mode 100644 index 000000000..4de7b40fd --- /dev/null +++ b/trunk/eo/tutorial/html/eoOperators.html @@ -0,0 +1,818 @@ + + + + + + Variation Operators + + +General: Algorithm-Based +- Component-Based - Programming +hints - EO +documentation +
+
+
Local: Introduction +- Crossover - Mutation +- Combinations - General +Operators - Populators - General +combinations- Advanced operators +
+
+
+

+Variation Operators

+Variation +Operators +
Variation operators modify the gnotype of individuals, or, equivalently, +move them in the search space. In Evolutionary Algorithms, varitaion operators +are almost always stochastic, i.e. +they are based on random numbers, or equivalently, perform random modifications +of their arguments. Variation operators are classified depending on the +number of arguments they use and/or modify. +
    +
  • +Variation operators involving two individuals +are called crossover operators. They can either +modify one of the parents according to the material of the other parent, +or modify both parents. In EO, the former are called Binary operators and +the latter Quadratic operators.
  • + +
  • +Variation operators involving one single individual +are called mutation operators.
  • + +
  • +Straightforward extensions of these simple operators allow to combine them: +in +proportional combinations, one operator +is chosen among a given set of operators of same arity according to some +weights.
  • + +
  • +In EO you can also define and use variation operators that generate any +number of offspring from any number of parents (sometimes termed orgy +operators). They are called general operators.
  • + +
  • +However, the interface of such operators was designed for their use inside +general +combinations: you can use proportional combination, +in which one operator is chosen among a given set of operators of same +arity according to some weights, as for simple operators except that operators +of different arities can be mixed, but you can also use sequential +combinations, where different operators  are applied in +turn with given probability. But you can also embed any of such combinations +at any depth.
  • + +
  • +The price to pay for that is that you must use an instermediate class to +access the individuals, the eoPopulator class.
  • + +
  • +Thanks to that class, it also become easy to design advanced +operators, such as crossover operators where the mate is chosen according +to sexual preference rather than fitness-based +preferences.
  • +
+Implementation +

The basic idea of EO variation operators is that they operate on genotypes +only. Hence there should be generally no reference to anything related +to the fitness within a variation operator. However, whenever the genotype +of an individual has been modified, it will be necessary to recompute its +fitness before any selection process. This is why all +variation operator return a bool that indicates whether or not +the genotype argument has been modified or not. +

EO classes for variation operators: +

+ +
Simple +operators: Crossover +

The characteristic of crossover operators is that they involve two parents. +However, there are crossover operators that generate two parents, and some +that generate one parent only, and both types are available in EO. The +former type (2 --> 2) is termed quadratic crossover operator, and is implemanted +in the eoQuadOp class; the latter type +(2 --> 1) is termed binary operator and is implemanted in class eoBinOp. +Both classes are, as usual, templatized by the type of individual they +can handle (see documentation for eoBinOp +and eoQuadOp). +

Note: Whereas it is straightforward +to create a binary crossover operator from a quadratic one (by discarding +the changes on the second parent), the reverse might prove impossible (imagine +a binary crossover that simply merges the parents material: there is no +way to generate two new parents from that!). +

Interfaces: +
The general approach in EO about simple variation operators is to perform +in-place +modifications, i.e. modifying the arguments rather than generating +new (modified) individuals. This results in the following interfaces for +the functor objects eoBinOp and eoQuadOp: +

bool operator()(EOT & , const EOT &)         +for eoBinOp (note the const) +
bool operator()(EOT & , EOT & +)                       +for eoQuadOp +

which you could have guessed from the inheritance diagrams up to the +eoBF abstract class. You can also guess that only the first argument will +be modified by an oeBin object, while both arguments will be modified by +an eoQuad object. +

Using crossover operators: +
Directly applying crossover operators is straightforward from the interface +above: +
eoBinOpDerivedClass<Indi> myBinOp(parameters); +//  +use constructor to pass +
eoQuadOpDerivedClass<Indi> myQuadOp(parameters); +//  +any useful argument +
Indi eo1= ..., eo2= ...;   // +the candidates to crossover +
if (myBinOp(eo1, eo2)) +
   { ...               +// eo1 has been modified, not eo2 +
   } +
else ...               +// none has been modified +
if (myQuadOp(eo1, eo2)) +
   { ...               +// both eo1 and eo2 have been modified +
   } +
else ...               +// none has been modified +

However, you will hardly have to actually apply operators to individuals, +as operators are used within other classes, and are applied systematically +to whole sets of individuals (e.g. that have already been selected, in +standard generation-based evolutionary algorithms). +
Hence the way to use such operators will more likely ressemble this +if you are using for instance an SGA. See also the different ways that +are described below, encapsulating the operators into combined operators +objects. +

Writing a crossover +operator: +
There are three things to modify in the template class definitions +provided in the Templates directory for both binary +crossover and quadratic crossovers +(apart from the name of the class you are creating!) +

    +
  • +The constructor, where you pass to the object +any useful parameter (see the private data at end of class definition).
  • + +
  • +The operator() method, which performs the +actual crossover.
  • + +
  • +The return value, that should be true +as soon as at least one genotype has actually been modified. Otherwise, +the lazy fitness evaluation procedure in +EO might not know it should compute the fitness again and will keep the +old value.
  • +
+ +
Simple +operators: Mutation +
Mutation operators modify one single individual. The corresponding +EO class is called eoMonOp. and it +si as usual templatized by the type of individual it can handle (see documentation +for eoMonOp). +

Interfaces: +
The general approach in EO about simple variation operators is to perform +in-place +modifications, i.e. modifying the arguments rather than generating +new (modified) individuals. This results in the following interface for +the functor objects eoMonOp: +

bool operator()(EOT & ) +

which you could have guessed from the inheritance diagrams up to the +eoUF abstract class. +

Using mutation operators: +
Directly applying mutation operators is straightforward from the interface +above: +
eoMonOpDerivedClass<Indi> myMutation(parameters); +//pass parameters in constructor +
Indi eo = ...;           +// eo is candidate to mutation +
if (myMutation(eo)) +
   { ...    // +eo has been modified +
   } +
else      // +eo has not been modified +

However, you will hardly have to actually apply operators to individuals, +as operators are used within other classes, and are applied systematically +to whole sets of individuals (e.g. that have already been selected, in +standard generational evolutionary algorithms). +
Hence the way to use such operators will more likely ressemble this +if you are using for instance an SGA. See also the different ways that +are described below, encapsulating the operators into combined operators +objects. +

Writing a mutation +operator: +
There are only two things to modify in the template +class definitions provided in the Templates directory (apart from the +name of the class you are creating!) +

    +
  • +The constructor, where you pass to the object +any useful parameter (see the private data at end of class definition).
  • + +
  • +The operator() method, which performs the +actual crossover.
  • + +
  • +The return value, that should be true +as soon as the genotype has actually been modified.  Otherwise, the +lazy +fitness evaluation procedure in EO might not know it should compute +the fitness again and will keep the old value.
  • +
+ +
Combining +simple operators: proportional combinations +

The best thing to do is to go to the Lesson2 +of the tutorial, where everything is explained. You will find out how you +can use +
several mutations (respectiveley quadratic crossovers) as a single +operator: every time the operator is called, one of the available operators +is chosen by some roulette wheel selection using realtive weights. +

+


General +Operators +

General operators in EO are variation operators that are neither simple +mutations nor simple crossovers. They can involve any number of parents, +and create any number of offspring. Moreover, they can make use of different +ways to get the parents they will involve, e.g. they can use a different +selector for each of the parents they need to select. +

The corresponding EO class is called eoGenOp. +and it is as usual templatized by the type of individual it can handle +(see documentation for eoGenOp +:-) +

Interface: +
All the work a general operator is done within the apply() +method. WHy not in the usual operator() method? Because some memory management +are needed, that are performed in the base class itself - which then calls +the virtual apply() method. +The interface for a eoGenOp thus is +not deducible from its inheritance diagram, and actually is +

    void apply(eoPopulator<EOT>& +_plop) +

As you can see,the interface for eoGenOp +is based on that of another class, called eoPopulator. +An +eoPopulator +is a population, but also behaves like +an iterator over a population (hence +the name, Population-Iterator).  +However, please note that you should probably never use an eoGenOp alone, +but rather through objects of type eoOpContainer. +

This results in the following general interface for an eoGenOp: +It receives as argument an eoPopulator, +gets the individuals it needs using the operator*, +and must handle the positinning of the  using the ++operator +method (Warning: the operator++ +method is not defined, as recommended by many good-programming-style books). +

bool apply()(eoPopulator& +_pop) +
{ +
   EOT& parent1 = *_pop; +// +select the first parent +
   ++_plop;   // +advance once for each selected parents +
   ... +
   EOT& parentN = *_pop; +// +select the last parent +
       // +don't advance after the last one: _plop always +
            +// points to the last that has already been treated +

// do whatever the operator is supposed to +do +
} +

Warning: as said above, an eoPopulator +should always point to the last individual that has already been treated. +This is because it is intended to be used within a loop that looks like +(see e.g. eoBreeder +class): +

      eoSelectivePopulator<EOT> +popit(_parents, _offspring, select);    // eoSelect +is an eoSelectOne +
      while (_offspring.size() +< target) +
          +{ +
               +op(popit); +
              +++it; +
          +} +

What happens next? Well, it all +depends on how many parents and how many offspring your general op needs: +

    +
  • +If the number of generated offspring is equal +to the number of parents, the operator simply needs to modify them (they +are passed by reference, no useless copy takes place).
  • + +
  • +If the operator produces more offspring than there +were parents, it needs to insert them into the list using the insert +method of the class eoPopulator as +in the following:
  • + +
      +

      +

    void apply()(eoPopulator& +_pop) +
    { +
      // get the necessary number +of parents (see above) +
      ... +
      // Now create any supplementary offspring +
      EOT ofs1 = create_individual(...); +
      ... +
      EOT ofsK = create_individual(...); +
      // advance and inserts offspring in +_pop after parentN +
      ++_pop; +
      _pop.insert(ofs1); +
      ... +

      // invalidate the parents that +have been modified +
      parent1.invalidate(); +
      ... +
      parentN.invalidate(); +
    }   // over +

    Of course the size of the resulting population will grow - and you should +have a replacement procedure that takes care of that. +
      +

  • +The case where more parents are needed than offspring +will be created is a little more delicate: think about eoBinOp, +and try to imagine the reasons why no crossover of that class are used +in the first lessons of the tutorial, within the SGA framework.
  • + +
    There are two possibilities: +
      +
    • +If you think "generational", the first idea is to get the parents from +outside the curent list, so the total number of (intermediate) offspring +is always equal to the initial population size. By chance, the eoPopulatorhas +a handle on the initial population that was used to start the process, +and you can access it from inside the GenOp method. For instance
    • + +
        +

        +

      void apply()(eoPopulator& +_pop) +
      { +
        // get as many parents as you +will have offspring (see above) +
        ... +
        // get extra parents - use +private selector +
        const EOT& parentN+1 = select(_pop.source()); +
        ... +
        const EOT& parentM = select(_pop.source()); +
        // do whatever needs to be done +
        ... +
        // and of course invalidate fitnesses +of remaining modified parents +
        parent1.invalidate(); +
        ... +
        parentN.invalidate(); +
      } +
      where select is any selector you like. Note the +const: you are not allowed to modify an element of the original +population (but you could of course have copied it!). As usual, the select +selector was passed to the operator at construct time. This typically allows +one to use a different selector for one parent and the others, as demonstrated +here. +
        +

    • +If you don't care about the size of the offspring population (that is, +if that size os controlled elsewhere, e.g. in some external loop), you +can use the inbedded select method of the class eoPopulator. +For instance
    • + +
        +

        +

      void apply()(eoPopulator& +_pop) +
      { +
        // get as many parents as you +will have offspring (see above) +
        ... +
        // get extra parents - use +populator selector +
        const EOT& parentN+1 = _pop.select(); +
        ... +
        const EOT& parentM = _pop.select(); +
        // do whatever needs to be done +
        ... +
        // and of course invalidate fitnesses +of remaining modified parents +
        parent1.invalidate(); +
        ... +
        parentN.invalidate(); +
      }

    +
+Warning: if you use operators that +have different number of parents than offspring, you are deviating from +the simple generational approach. Be careful to have the proper replacement +procedure to take care of the population size: in most instances of algorithms +that come within EO, this is enforced (an exception is thrown if population +size varies from one genertaion to the other) but this might not be true +for all forthcoming EO algorithms. +

Using general operators: +
Directly applying general operators to given individuals is impossible +in EO, due to its interface. You need the help +of an individual dispenser of class eoPopulator. +But anyway general operators were thought to be used putely in eoOpContainer, +as described below. +

Writing a general +operator: +
There are many things to do to write a general operator - but the Templates +directory contains some sample tempaltes files to help you. It all depends +on whether you want more or less offspring than parents, and whetehr you +want the same selector for every parent or more specialized selectors. +

    +
  • +It you want more (or as many) offspring than +parents, you should use the moreOffspringGenOp.tmpl +template - if you want to use the same selector for all parents, the one +embedded in the argument eoPopulator. +Otherwise, you'll have to write your own operator based on an external +selector, as described in lessOffspringExternalSelectorGenOp.tmpl.
  • + +
  • +If you decide to have more parents than offspring, you can decide either +to get the extra parents using the eoPopulator  +own selector (see lessOffspringSameSelectorGenOp.tmpl, +or to use an external selector (passed at construct-time) as described +in lessOffspringExternalSelectorGenOp.tmpl.
  • + +
  • +Now you can modify the constructor, where +you pass to the object any useful parameter (see private data at end of +class definition). In case you need an external selector, you have to choose +it (or write it!) - it should be an eoSelectOne +object.
  • + +
  • +Finally, write the core of the operator in method apply(). +Remember you must use the argument eoPopulator +to +access the members of the population in turn (method +operator*), +you may use the initial population (method source()), +as well as the insert methods.
  • +
+ +
    Warning: in general operators, +you must not forget to invalidate the +fitness of any individual that has actually been modified. this implicitely +implies that general operators can only be applied to EO object (i.e. objects +with a fitness), and not to any type of structure. +
    It you don't invalidate the individual, the lazy +fitness evaluation procedure in EO will not know it should compute +the fitness again and will keep the old obsolete value.
+ +
The +populators: +
As has been said above, an +eoPopulator +mainly behaves like an iterator over +a population (hence the name, Population-Iterator). +

The basic +interface of an eoPopulator +(see also the documentation, +of course) is the following: +

    +
  • +Individuals are accessed through the operator*;
  • + +
  • +Basic iterator operations are available, like (pre)incrementation through +operator++, +position management through seekp +(returns the current position) and tellp +(go to a given position);
  • + +
  • +Individuals can also be inserted at +current position using the corresponding methods;
  • + +
  • +last but not least, as the individuals are returned by reference, it is +mandatory to ensure that they will not be moved around later: the memory +management  routine reserve +is called whenever there is a chance to add some individuals in the population +- i.e. in the eoGenOp base class operator() method.
  • +
+Moreover, a public method termed select,  +is used inside the object to get new parents for the following operator*, +and its implementation distinguishes two types of eoPopulator: +
    +
  • +The eoSeqPopulator gets new parents +from its source (the initial population). When the source is exhausted, +an exception if thrown. The idea of such pooulator is to start from a population +of already selected individuals.
  • + +
    The programmer should hence be very careful that the number of available +parents matches the requirements of the operators when using an eoSeqPopulator +object. +
  • +The eoSelectivePopulator , on the opposite, +always gets new parents using its private eoSelectOne +object (passed at construct time). Hence it can handle any number of parents +at will. The idea of such populator is to handle the whole breeding +process, i.e. selection and variation operators.
  • +
+An immediate consequence is that if you are not sure of the number of  +parents you will need in some operators (e.g. because of some stochastic +proportional selection ebtween operators that don't need the same number +of parents, then you must use an eoSelectivePopulator +to apply the variation operators to the population, and thus get exactly +the number of offspring you want. +

Example: An eoSelectivePopulator +is the main ingredient of the eoGeneralBreeder +operator() +method - a class that creates a population of offspring from the parents +applying an eoGenOp (usually an eoOpContainer) to all selected parents +in turn. +
+


General +Operator Containers: +
General operators in EO are meant to be used withing eoOpContainer +objects, that allow to combine them in a hierarchical and flexible way. +There are two ways to do that: the proportional +combination, similar to what has been described for simple operators +above, +and the sequential combination, which +amounts to apply all operators in turn to a bunch of individuals, each +operator being applied with a specific probability. +

Proportional combinations +
When called upon a population (through an eoPopulator +object), an eoProportionalOpContainer +enters the following loop: +

while there are individuals left in the list +

    +
  • +choose one of the included operators according to their relative rates +(by some roulette wheel random choice)
  • + +
  • +applies the chosen operator. The parents are dispensed to the operator +from the list on demand.
  • + +
  • +What happens next exactly depends on the type of operator, but basically, +some of the parents get modified, some might get removed from the list +and some new individual might get inserted on the list.
  • + +
  • +updates the list pointer (if needed) to the individual following the ones +that just have been modified/inserted/deleted.
  • +
+Sequential combinations +
When it is called upon a list of pending candidates, an +eoSequentialOpContainer +enters the following loop: +

mark the current position +
for all operators it contains, +

    +
  • +go to marked position
  • + +
  • +until current end of population +is reached do
  • + +
      +
    • +flip a coin according to the operator rate.
    • + +
        +
      • +If true, apply the operator to the parents. The current parents can be +modified, or some can be deleted from the list, or some offspring can be +inserted in the list.
      • + +
      • +If false, move the pointer over the required number of parents (i.e. don't +modify thoses parents)
      • +
      + +
    • +Next pending parent
    • +
    + +
  • +Next operator
  • +
+Warning: the way rate +will be used is highly dependent on the type of eoOpContainer +your are creating there: +
    +
  • +The rates for eoProportionalOpContainer +will be used in a roulette wheel choice among all operators. They can take +any value, the only important thing is their relative +values.
  • + +
  • +The "rates" for eoSequentialOpContainer actually +are probabilities, i.e. they will be +used in a coin-flipping to determine whether that particuler operator will +be applied to the next candidates at hand. They should be in +[0,1] (no error will happen if they are not, but the operator +will be applied systematically - this is equivalent of a rate equal to +1).
  • +
+Remark:The eoSGATransform presented in Lesson2 +can be viewed as a particular type of eoSequentialOpContainer. +It was not coded that way in order to provide a gradual introduction to +all concepts. +
Exercise: write the code to perform an +eoSGA using the eoOpContainer constructs. +

Adding operators to a container: +
The way to add an operator to an eoOpContainer +is the method +add. It is similar +to all other add methods in +other Combined things in eo (as the simple eoProportionalCombinedXXXop +described above, but also the eoCombinedContinue class or the eoCheckPoint +class). +
The syntax is straightforward, and it works with any of the operator +classes eoXXXOp, where XXX stands for +Mon, +Bin, Quad or +Gen: +

someOperatorType<Indi> myOperator; +
eoYYYOpContainer<Indi> myOpContainer; +
myOpContainer.add(myOperator, rate); // +rate: double whose meaning depends on YYY +

where YYY can be one of Proportional and Sequential. Note that before +being added to the container, all simple operators are wrapped into the +corresponding eoGenOp (see e.g. how an eoMonOpis +wrapped into an eoMonGenOp- or +how any operator +is handled by calling the appropriate wrapper). In particular, the +wrapper ensures that individuals who have been +modified are invalidated. +

Containers, +Selectors and Populators +
The way the eoOpContainer are applied +on a population using an eoPopulator +object. But, whereas the behavior of eoProportionalOpContainer +does not depend on the type of eoPopulator,(one +operator is chosen by roulette_wheel, and applied once before control is +given back to the caller), the main loop in method operator() +of +class eoSequentialOpContainer +iterates while (!_pop.exhausted()) +which is interpreted differently depending on the type +of eoPopulator: +

    +
  • +if the argument is an eoSelectivePopulator, +the default position of the eoPopulator, considered as a population iterator, +is at end of population. Individuals are added upon demand of an operator, +and in most cases all operators are applied once. This also depends, however, +on the arities of all operators:
  • + +
      +
    • +Consider an eoSequentialOpContainer +containing an eoQuadOp and an eoMonOp. The eoQuadOp first asks for two +parents and modifies them. The eoMonOp is then called starting from the +forst of thoses two modified individuals, and is hence applied twice, once +on each parent.
    • + +
    • +But consider now an eoSequentialOpContainer +containing an eoGenOp that takes one +parent and generates three offspring, followed by an eoQuadOp. +The eoGenOp will call the selector +to get the parent its need and will modify it and put 2 additional offspring +at end of the population. The eoQuadOp +will then be called on the first of the three outputs of the eoGenOp, +and hence will act upon the frist two of them. But at that point, the populator +iterator will point to the third of the individuals resulting from the +eoGenOp, +and the test _pop.exhausted() +will return false, so the eoQuadOp +will again be called. The second parent it needs will be given by a new +call to the embedded eoSelectOne of +the  and everything will go on smoothly, except that a total of 4 +offspring will have been generated by application of this particular eoSequentialOpContainer.
    • +
    + +
  • +if the argument is an eoSeqPopulator, +the position of the iterator starts from the beginning of an existing population +(the source populations), and hence when an  an eoSequentialOpContainer +is called, it goes through the whole remaining of the population (the test +_pop.exhausted() +only returns true at end of the source population).
  • + +
  • +From the above it is easy to see that passing an eoSeqPopulator +to an eoProportionalOpContainer that +contains an eoSequentialOpContainer, +though not technically forbiddden, will most produce something  totally +unpredictable, and hence should probably not be used without great care.
  • +
+ +
Advanced +general operators: +

It is sometimes useful to be able to use a selector from inside an operator +(a typical example is when you want to implement sexual +preferences, i.e. choose a mate for a first parent according +to some characteritics of that first parent). +
This is made possible in EO because the general operators have a handle +on the initial population through the method source() +of the argument eoPopulator they work on. Their apply() +method shoudl look like +

void apply()(eoPopulator& +_pop) +
{ +
  EOT & eo1 = *_pop; // get +(select if necessary) the first guy +
  EOT maBlonde = findBlonde(_pop.source()); +// +select mate +
  // do whatever the operator is supposed +to do, e.g +
  cross(eo1, maBonde);       +// cross is some embedded crossover +
  ... +
  // if you don't want to put maBlonde +into the offspring, +
  // stop here (and use a reference +to maBlonde above). Otherwise +
  maBonde.invalidate(); +
 ++_pop;    // +advance +
  _pop.insert(maBlonde);    +// and insert it +
} +

Where does that findBlonde +selector comes from? As usual, you have to attach it to the operator,  +in its constructor for instance, which should give something like: +

sexualSelectorType<Indi>  findBlonde; +
sexualOperatorType<Indi> yourBrainAndMyBeauty(cross, +findBlonde); +

+


Local: Introduction +- Crossover - Mutation +- Combinations - General +Operators - Populators - General +combinations- Advanced operators +
General: Algorithm-Based +- Component-Based - Programming +hints -EO +documentation +
+
+
+Marc Schoenauer
+ +
Last +modified: Sat. Feb. 17 2002  +
  + + diff --git a/trunk/eo/tutorial/html/eoOutput.html b/trunk/eo/tutorial/html/eoOutput.html new file mode 100644 index 000000000..4e77cd2ea --- /dev/null +++ b/trunk/eo/tutorial/html/eoOutput.html @@ -0,0 +1,19 @@ + + + + Output + + + +

Output

+ + + +
+
Marc Schoenauer
+ + +Last modified: Mon Oct 30 19:29:19 CET 2000 + + + diff --git a/trunk/eo/tutorial/html/eoProgramming.html b/trunk/eo/tutorial/html/eoProgramming.html new file mode 100644 index 000000000..64fca549f --- /dev/null +++ b/trunk/eo/tutorial/html/eoProgramming.html @@ -0,0 +1,502 @@ + + + + + + EO Programming guide + + +General: Tutorial +main page - +Algorithm-Based - Component-Based +- Programming hints - EO +documentation +
+
Local: Templates +- +Functors - +STL Library - Random +numbers - EO programming style  - Memory +management +
+
+
+

+EO Programming guide

+ +
+
Templates +

Most EO code is written using templates. This allows to write generic +code, i.e. involving a class which doesn't have to be known when writing +the code -- but only when compiling it. In some sense this is similar to +naming variables in algebra: you can write a lot of equations involving +some variable $x$ without knowing even it if will be an integer or a float +(or a matrix or ...). The main basic type that is templatized in EO is +the fitness: an EO object is some object which has a fitness of some type +F that can be anything. The definition for that is (see EO.h) +

template<class F> class EO +

The idea is that, later in your code, you can define a class as follows +(see for instance  eoOneMax.h - or check Lesson 5 for more details). +

template<class F> class eoOneMax : public +EO<F> +
{ ... code for eoOneMax  }; +

and then use it in your application as +

eoOneMax<double> myeoBit; +

declares an object of type eoOneMax which has as fitness a double. +

Whereas the advantages +are obvious (writing generic reusable code instead +of having to rewrite the same pieces of code for different types), there +are some drawbacks: +namely, it makes some of the compiler error messages +hard to understand; and it forbids the compilation of most parts of EO +into an object library file, as the actual types are not known in advance. +

+


+
Functors +

Though EO is a library, it contains almost no functions per se! +
EO mainly contains functors, that are objects which have a method called +operator(). +Such objects are used  as if they were functions, but the big differences +are that +

    +
  • +functors are functions with private data
  • + +
  • +you can have different functors objects of the same class, i.e. you can +use at the same time the same functionality with different parameters
  • + +
  • +you can have a hierarchy of functors objects, which means that you have +a hierarchy of functions with defaults behaviors and specialized sub-functions
  • + +
  • +...
  • +
+Functors are so intimately linked to EO that a base class (eoFunctorBase) +has been designed to hold all functors. This base class is itself divided +into three derived class. These classes tell you immediately what kind +of arguments the operator() +method requires and what kind of result it produces. See EO +conventions, and the inheritance +diagram of class eoFunctorBase Also note that +if you create new functors, you should also derive from one of these classes, +as it is mandatory if you later use the EO memory management +mechanism. +
For a more complete introduction to functors, with detailed discussion, +go to the STL documentation +- as STL also heavily relies on functors, and the eoFunctorBase paradigm +is borrowed from there. +

Functors: Example: +

The following is a basic example of how to program and use a functor +object: First code the class: +

class MyFunctor +
{ ... +
    void operator()(ArgType +arg) +
       { +
            +// do what you have to do +
       } +
}; // end of class declaration +

Then use it  later in the code : +

ArgType myArgument; +
MyFunctor myFunctorInstance;    +// myFunctorInstance is an object of class MyFUnctor ... +
myFunctorInstance(myArgument);  +// calls operator() of myFunctorInstance acting on myArgument ... +
  +

Functors: The +three basic classes: +

Direct sub-classes of the root class , three classes +are defined to differentiate functors by the number of argument required +by their operator(). +These classes are templatized by the types of its arguments, and by its +return type. Hence, +
from the inheritance diagram of any functor class +in EO, you can immediately deduce the interface of their operator() +method. +
  +

    +
  • +eoF +is for arity-zero functors, i.e.  their operator() +method does not require any argument. It has a single template parameter, +the return type of the operator() +method. For instance,  eoMonitor  +are eoF's +that return an eoMonitor &.
  • + +
  • +eoUF +is for unary functors, i.e.  their operator() +method requires one argument. It has two template parameters, the type +of the argument and the return type of the operator() +method. For instance,  eoMonOp's +are eoUF's +that take as argument an EOT & +and return void +.
  • + +
  • +eoBF +is for binary functors, i.e.  their operator() +method requires two arguments. It has three template parameters, the types +of the arguments and the return type of the operator() +method. For instance,  eoBinOp's +are eoBF's +that take as arguments a const EOT +& and an EOT +&, and return void +.
  • +
+Now go back to the inheritance +diagram of class eoFunctorBase, +and guess the interface for all functors! +

Note: for +obvious simplicity reasons, we very often omit the reference to the operator(), +e.g. when we say above: +

    +
  • +eoMonOp's +are eoUF's +that take as argument an EOT & +and return void
  • +
+it actually means +
    +
  • +eoMonOp's +are eoUF's, +their operator() +method takes as argument an EOT & +and returns void.
  • +
+ +


+


+
A very brief +introduction to STL +

All EO heavily relies on STL, the Standard +Template Library. +
But you don't have to know more than a few words +of STL to use EO (like with "hello", "please" and "goodbye" you +can survive in a foreign country :-) and even to contribute to new EO features. +Moreover, while browsing through EO code, you will gradually learn how +to use STL, especially if you check at the SGI +STL Web site from time to time, where you can not only download STL, +but also browse in the Programmer's guide  for isntance from the Table +of Content. +

Anyway, you will only find here, in EO tutorial, the basics of STL that +you will need to understand most of EO code - and to guess what the parts +you don't understand are actually doing. Don't worry, I +don't +understand everything :-) +

STL provides the user with containers, +iterators +and algorithms. And you can access +(almost) all containers content using (almost) all iterators, or apply +(almost) all algorithms on (almost) all containers (of course the tricky +part is to instanciate the "almost" in the previous sentence :-) +

STL: Containers +
Containers are high level data types used to hold simpler data - the +most widely used example of a container is the vector +construct. +
The use of STL containers relieve the user from memory management. +

    +
  • +vector The +most widely used container is a one-dimensional array of items.
  • + +
    Data manipulation: suppose v +is an STL vector<AtomType>. +Then +
    v[i] +is the ith element of v, as in standard C arrays +
    v.size() +is the number of elements of v +
    v.push_back(atom) +appends the atom +at end of v, +provided of course that atom +is of type AtomType, +the size is automatically increased... +
    blabla insert, erase, ... +
  • +list +STL provides different types of list. The one used in EO is the simple +linked list named ... list. +As far as the user is concerned, simple lists are very similar to vectors, +and the data manipulation listed above for vectors can be applied to list.
  • + +
  • +pair
  • + +
    This simple container allows you to hold two +data types together. It is very handy for temporary data handling. Assuming +p is a pair<AtomType1, AtomType2>, +p.first +and p.second  +refer to the encapsulated data, of respective types AtomType1 +and +AtomType2 +
  • +Blabla
  • +
+There are many other types of containers that are not used in EO and that +we will not present here. +

STL: Iterators +
Iterators are accessors to the containers contents that provide unified +access to different containers. They are very similar to pointers, i.e. +you can increment them, compare them with one another, etc +

Some very useful iterators for vectors and lists are begin() +and end(), that refer to the first +and after-last items of a container. They allow loops to sweep all items +contained in a container as follows: +
STLcontainer myContain; +
STLcontainer::iterator it; +
for (it=myContain.begin(); it!=myContain.end(); +it++) +
{ +
// do what you have to do to +(*it) +the current item in the container +
} +

STL: Algorithms +
Algorithms are functions acting on containers - the most widely used +example of a STL algorithm are the different sorting +algorithms. +

    +
  • +sort, nth_element, are sorting +algorithms used in EO
  • + +
  • +copy is used to copy a range +of data designated by iterators
  • + +
  • +apply is used to perform the +same operation to many items designated by a range of iterators
  • + +
  • +Blabla - help wanted thanks...
  • +
+STL: Advantages +
The main and huge advantage of +using STL is that it handles (almost all) memory mangement automatically. +You can use any STL container the same way you would use a scalar basic +C++ type. And it does it in a (supposededly) optimized way. Of course, +the user is also responsible for performances: for instance, the insert() +method will take more time for vectors than for linked lists, while on +the opposite, the operator[] accessor will be faster for vectors. But both +will work anyway. +

STL: Drawbacks +
The main drawback I see in using STL is that it makes it +difficult +to use a debugger normally: whereas access to data is made simple +to the programmer, data structures are actually so complex, and debuggers +so willing to display everything that you get lines of template instantiation +when asking your debugger what is inside some container!
+However, here is a trick (thanks to Arnaud Quirin!) to actually print what is inside an STL vector with gdb (but it doesn't really work with complex structures like EO genotypes :-( :
+(gdb) print (*(&v))[i]
+$1 = (const double &) @0x934cad0: 0.69543264131061733
+ +

+


+
Random +numbers +

Evolutionary Algorithms make intensive use of random numbers. Random +numbers are simulated in computers by using pseudo-random +number generators (RNGs for short), i.e. functions that return series of +numbers who look random (w.r.t. some statistical criteria). +

To make sure the random number generator is as good as possible, and +to ensure reproducibility of the results across different platforms, EO +has its own RNG, the ``Mersenne Twister'' +random number generator MT19937 (thanks to Takuji +Nishimura, see eoRNG.h +comments). +

Though you can define and use as many RNGs as you wish in EO, the library +also provides you with a global RNG termed eo::rng. +Using that single RNG in all calls to random numbers allows one to be able +to reproduce a given run: +

    +
  • +as strange as it seems for a random algorithm, it is mandatory for debugging +purposes
  • + +
  • +random numbers are computed starting from a seed - starting from the same +seed will lead to the same series of pseudo-random numbers, and hence to +the same results of the algorithms. All examples in this tutorial will +use the RNG seeding procedure, see e.g. in Lesson1.
  • + +
  • +to simulate "true" random runs, you can just seed the RNG with a machine-clock +related number, e.g. calling time(0), as done for instance in Lesson3 +(and after).
  • +
+As RNGs produce, by definition, integers that are uniformly distributed +between 0 and some maximal number, EO provides you with random numbers +following different probability distribution +(e.g. floating point following normal +distribution). See the complete +list of RNG primitives. +

EO also provides random_generators +that can be used in STL call to generate series of random numbers, as in +eoPop +initializers. +

Note: the eo:: +prefix indicates that it is in a separate C++ namespace, to avoid collision +with possible variables that would also be named rng in some other library. +As early versions of EO (<= 9.1)  did not use a separate namespace +for rng, the compiler directive using eo::rng in eoRNG.h allows you to +use the name rng without the eo:: +prefix. However, the notation eo::rng +should be preferred and might become mandatory some day. +
+


+
EO conventions +and naming style +

A few naming conventions should help you to navigate more easily through +EO: +

    +
  • +The name of local variables should start with a lower case letter. Capital +letters should be used rather than underscore to separate words in names +(e.g. popSize rather than +pop_size).
  • + +
  • +The name of the arguments to a function should start with an underscore, +e.g.
  • + +
              void +myfunction(unsigned _popSize){...} +
  • +The initialization parameters of constructors should be named from the +names of the variables they are used to initialize, e.g.
  • + +
      +

      +
      +
      +

    class eoMyClass +
    { +
    public: +
      eoMyClass(unsigned _popSize):popSize(_popSize){...} +
       ... +
    private: +
       unsigned popSize; +
    }; +

  • +The names of classes should start with eo + an Uppercase letter (as eoMyClass +above).
  • + +
  • +The name of the EO template should be EOT. This allows quick understanding +of the inheritance diagrams for functors. and immediate +perception of the arguments and return types of the functors oeprator() +method (as in eoMonOp +or  eoBinOp).
  • + +
      +
  • +Blabla
  • +
+ +
+
EO memory +management +

Most of EO constructs are based on the encapsulation +of objects into other objects, and the embedded objects are passed through +the constructor of the embedding object. +
For instance, the construction of an algorithm requires a breeder (plus +many other things of course), the construction of a breeder usually requires +a selector, and in turn the construction of a selector requires some parameters. +This gives something resembling the following +

eoTournamentSelection<EOT>  select(tSize); +
eoBreeder<EOT> breed(select); +
eoEasyAlgo<EOT> algo( ..., breed, ...); +

Such a practice is no problem when doing everything +in a (large!) main function: all objects are local to that function, +but when the end of the function is also the end of the program. For instance, +all programs in Lesson1, Lesson2 +and Lesson3 of this tutorial are built that +way. +

It is however a big problem when you want to outsource some code in +other functions: indeed, the above sequence create objects that dissapear +when exiting the function, and thus cannot be used outside their defining +function. +

The solution is of course to use pointers, +which gives something like +

eoTournamentSelection<EOT>  *ptSelect += new eoTournamentSelection<EOT>(tSize); +
eoBreeder<EOT> *ptBreed = new eoBreeder<EOT>(*ptSselect); +
eoEasyAlgo<EOT> *ptAlgo = new eoEasyAlgo<EOT>( +..., *ptBreed, ...); +

and you can then use the dynamically allocated objects anywhere. But +the trouble with such a construct is that after exiting the function where +such objects are defined, you will never be able +to free this allocated memory, should you not need the objects +any nore. Whereas this is not in general a big problem (except of being +a very bad practice that will make you a very naughty programmer :-), it +will prevent any re-entrance of the resulting code, and for instance you +will not be able to use an evolutionary algorithm within another loop of +some outside code. +

The solution in EO us to use an eoFunctorStore +object to store such nowhere-belonging pointers: whenever you allocate +such a thing, store it into an eoState : deleting that state will delete +all the stored pointers - one eoState is thus the only object you have +to care of. +

The above pointer allocation sequence thus become +

eoTournamentSelection<EOT>  *ptSelect += new eoTournamentSelection<EOT>(tSize); +
state.storeFunctor(ptSelect); +
eoBreeder<EOT> *ptBreed = new eoBreeder<EOT>(*ptSelect); +
state.storeFunctor(ptBreed); +
eoEasyAlgo<EOT> *ptAlgo = new eoEasyAlgo<EOT>( +..., *ptBreed, ...); +
state.storeFunctor(ptAlgo); +

or, even more quickly (though less readably) +

eoTournamentSelection<EOT>  *ptSelect += +
               +state.storeFunctor(new eoTournamentSelection<EOT>(tSize)); +
eoBreeder<EOT> *ptBreed = +
               +state.storeFunctor(new eoBreeder<EOT>(*ptSelect)); +
eoEasyAlgo<EOT> *ptAlgo = +
               +state.storeFunctor(new eoEasyAlgo<EOT>( ..., *ptBreed, ...)); +

In both the above code, state is an eoFunctorStore +that is of course passed from outside the function +- and it's called state because in most cases it will actually be an eoState. +As its name says, an eoFunctorStore +can store any object that is an (derives from) eoFunctorBase +- hence all objects in EO that are used as functors should derive from +either eoF, eoUF or eBF. +

Examples of such constructs are shown in the make_xxx files described +in Lesson4. +
+


Local: Templates +- +Functors - +STL Library - Random +numbers - EO programming style  - Memory +management +
+
+
General: Tutorial +main page - Algorithm-Based - Component-Based +- Programming hints - EO +documentation +
+
+
Marc Schoenauer + + diff --git a/trunk/eo/tutorial/html/eoRepresentation.html b/trunk/eo/tutorial/html/eoRepresentation.html new file mode 100644 index 000000000..41a63f6df --- /dev/null +++ b/trunk/eo/tutorial/html/eoRepresentation.html @@ -0,0 +1,19 @@ + + + + Representation + + + +

Representation

+ + + +
+
Marc Schoenauer
+ + +Last modified: Mon Oct 30 19:28:01 CET 2000 + + + diff --git a/trunk/eo/tutorial/html/eoSGA.html b/trunk/eo/tutorial/html/eoSGA.html new file mode 100644 index 000000000..2e2428701 --- /dev/null +++ b/trunk/eo/tutorial/html/eoSGA.html @@ -0,0 +1,157 @@ + + + + + + eoSGA.h + + +Back to Lesson 1 - Tutorial +main page - Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
+
+
+

+eoSGA.h

+ + + + + +
//----------------------------------------------------------------------------- +
// eoSGA.h +
//----------------------------------------------------------------------------- +
#ifndef _eoSGA_h +
#define _eoSGA_h +
#include <eoOp.h> +
#include <eoContinue.h> +
#include <eoPop.h> +
#include <eoSelectOne.h> +
#include <eoSelectPerc.h> +
#include <eoEvalFunc.h> +
#include <eoAlgo.h> +
#include <apply.h> +
/** The Simple Genetic Algorithm, following +Holland and Goldberg  +
*  Needs a selector (class eoSelectOne) +a crossover (eoQuadratic,  +
*      i.e. a 2->2 +operator) and a mutation with their respective rates,  +
*      of course +an evaluation function (eoEvalFunc) and a continuator  +
*      (eoContinue) +which gives the stopping criterion. Performs full +
*      generational +replacement. +
*/  +
template <class EOT> +
class eoSGA : public eoAlgo<EOT> +
{ +
public : +
 // added this second ctor as +I didn't like the ordering of the parameters +
 // in the one above. Any objection +:-) MS +
eoSGA( +
       eoSelectOne<EOT>& +_select, +
       eoQuadraticOp<EOT>& +_cross, float _crate, +
       eoMonOp<EOT>& +_mutate, float _mrate, +
       eoEvalFunc<EOT>& +_eval, +
       eoContinue<EOT>& +_cont) +
     : cont(_cont),  +
       mutate(_mutate),  +
       mutationRate(_mrate), +
       cross(_cross), +
       crossoverRate(_crate), +
       select(_select), +
       eval(_eval) +{}
+ + + + + +
 void operator()(eoPop<EOT>& +_pop) +
 { +
    eoPop<EOT> offspring; +
    do { +
         +select(_pop, offspring); +
         +unsigned i; +
         +for (i=0; i<_pop.size()/2; i++)  +
             +{   // generates 2 offspring from two parents +
                 +if ( rng.flip(crossoverRate) )  +
                   +{  +
                       +cross(offspring[2*i], offspring[2*i+1]); +
                   +} +
             +} +
         +for (i=0; i < _pop.size(); i++)  +
             +{ +
                 +if (rng.flip(mutationRate) )  +
                     +{ +
                         +mutate(offspring[i]); +
                     +} +
             +} +
         +_pop.swap(offspring); +
         +apply<EOT>(eval, _pop); +
     } while (cont(_pop)); +
 } +
 
+ + + + + +
private : +
 eoContinue<EOT>& cont; +
 eoMonOp<EOT>& mutate; +
 float mutationRate; +
 eoQuadraticOp<EOT>& cross; +
 float crossoverRate; +
 eoSelectPerc<EOT> select; +
 eoEvalFunc<EOT>& eval;
+ + + + + +
}; +
#endif
+ +
Back to Lesson 1 - Tutorial +main page - Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
+
+Marc Schoenauer
+ +
Last modified: Sun Nov +19 19:36:21 2000 + + diff --git a/trunk/eo/tutorial/html/eoSelect.html b/trunk/eo/tutorial/html/eoSelect.html new file mode 100644 index 000000000..9de6bb612 --- /dev/null +++ b/trunk/eo/tutorial/html/eoSelect.html @@ -0,0 +1,19 @@ + + + + Selection + + + +

Selection

+ + + +
+
Marc Schoenauer
+ + +Last modified: Mon Oct 30 17:51:55 CET 2000 + + + diff --git a/trunk/eo/tutorial/html/eoStop.html b/trunk/eo/tutorial/html/eoStop.html new file mode 100644 index 000000000..14e0d37c1 --- /dev/null +++ b/trunk/eo/tutorial/html/eoStop.html @@ -0,0 +1,25 @@ + + + + Input / Output + + + +

Input / Output

+ +

+ +

Stopping criteria

+ +

+ +

Displaying statistics

+ +
+
Marc Schoenauer
+ + +Last modified: Tue Oct 31 18:32:22 CET 2000 + + + diff --git a/trunk/eo/tutorial/html/eoTopDown.html b/trunk/eo/tutorial/html/eoTopDown.html new file mode 100644 index 000000000..f589f0aa0 --- /dev/null +++ b/trunk/eo/tutorial/html/eoTopDown.html @@ -0,0 +1,111 @@ + + + + + + EO - The Algorithm-Based approach + + +Tutorial main +page +- +Algorithm-Based - Component-Based +- Programming hints - EO +documentation +
+
+
+

+EO - The Algorithm-Based approach

+ +


Congratulations - You have chosen the algorithm-based approach!  +This means that you want to start from something that already works, and +gradually learn about the more complex constructs. We have prepared a series +of "lessons" for you. +

    +
  • +Lesson 1 - a gentle introduction to the EO +way: your first steps into EO representations +using a simple generational GA. Please, spend +the necessary time on that one, since all basic constructs presented +there are used throughout EO.
  • + +
  • +Lesson 2 - encapsulate, +encapsulate, and try more sophisticated selection/replacement +mechanisms, as well as multiple  operators
  • + +
  • +Lesson 3 - The same algorithms, but with improved +input/outputs: user-friendly input (i.e. without +the need to recompile!) of algorithm parameters, +and checkpointing (display +of on-line statistics, save +and +restore +populations, +restart stopped runs, +...).
  • + +
  • +Lesson 4 - The same algorithms - again! - +but now fully operational: every component +of the algorithm can be defined on the command-line, +except the type of genotype; moreover, you now have a full library, i.e. +everything except your fitness function is already +compiled.
  • + +
  • +Lesson 5 (new) +- Use your own representation. Thanks +to template files and a little script in Unix, +or the Application template in MSVC++, you +can easily define a new genotype and run an Evolutionary Algorithm that +will intantly benefit from the power of all EO +Evolution Engines (including easy user-parameter +input presented in Lesson 4). You simply need to gradually fill +in the shell-files that the script will generate for you.
  • + + +


    Current version (May. 5, 2002) stops here, but ... +

    From there on, you don't need to follow the lesson order any more: you +can go directly to any lesson and experiment. Of course, you will need +to bring together the different pieces to write exactly what you want - +but only because we had no idea of what you exactly want :-) +

      +
    • +Lesson 6 (forthcoming) - More about checkpointing: +write your first adaptive mechanism, +and find out how easy it is to update +and monitor dynamic +parameters
    • + +
    • +Lesson 7 - More general operators: +e.g. binary, n-ary, or even specific mate selection (your brain and my +beauty)! Add your own to the basic algorithm using the template files.
    • + +
    • +Lesson 8 - Use predefined generic representations. +The eoFixedLength and eoVariableLength +super classes allow quick definition of new genotypes that handle identical +Atoms, together with generic variation operators.
    • +
    +Of course, in each lesson, you have links to the corresponding Component-Based +page. ( ... Well, to tell you the truth, as of today, this is not exactly +true :-) +
    +
    +
    Tutorial main page - Algorithm-Based +- Component-Based - Programming +hints - EO +documentation +
    +
    +
    +Marc Schoenauer
    + +
    Last modified: Tue Dec 19 +2000  + + diff --git a/trunk/eo/tutorial/html/eoTutorial.html b/trunk/eo/tutorial/html/eoTutorial.html new file mode 100644 index 000000000..1dbef8bd2 --- /dev/null +++ b/trunk/eo/tutorial/html/eoTutorial.html @@ -0,0 +1,286 @@ + + + + + + Tutorial EO + + +Algorithm-Based - Component-Based +- Programming hints - EO +documentation +
    +
    Welcome to EO, the Evolving Objects library, +and to
    + +
    +

    +EO Tutorial

    + +
    Important notice - December 2006 +

    +The code that is proposed in this tutorial should not +be used +as a basis for any comparison with any original method on any benchmark problem. +It is an illustration of what you can achieve with EO, but reaching state-of-the-art results +requires more work. In particular, if you want to compare your evolutionary +algorithm with a good performing algorithm in parameteric optimisation, +do not +use ESEA in Lesson4, +but go to the test directory, type +make t-eoCMAES and use the resulting t-eoCMAES. But as of today, +the latest algorithms (and comparative results) +are better found on Nikolaus Hansen Web page +and on his "Comparison of Evolutionary Algorithms on a Benchmark Function Set" page).
    +
    +
    + +
    Version 0.98a - December 2004 +
    + +
      +
    • New - +Well, in fact, nothing really new, +but some people advised us to announce from the very beginning that +if you are looking for a ready-to-use +(except for the fitness) fully tunable Evolutionary +Algorithm evolving real values or bitstring, you can +go directly to +Lesson 4 after just reading +this page, and maybe the Programming +hints (link on top of each page too).
      + +In fact, there is something new: EO's automatic configuration and +build process has been cleaned up and upgraded. For consistency, the +same automatically-built Makefiles have been created in the +tutorial directories. The good-old manually-created files are +still there, now named +Makefile.simple. +Moreover, when you compile the whole library (typing make in the main EO dir), all lessons of the tutorial gets compiled, too. +
    • +
      + +
      Version 0.98 - May 2004
      + +
    • Lesson 5 + has been improved: some of +the empty template files in dir +.../eo/tutorial/Templates +have been simplified, and file stat.tmpl +has been added, allowing you to +compute and +print and +save-to-disk and +plot-on-line your +own statistics. +The magic script is now (see Lesson5) createSimple.
      + +The same simplified main file in +dir .../eo/tutorial/Templates) +also allows you to use +fitness sharing + (together with roulette wheel) as a possible selector.
      + +Unfortunately, the HTML file for Lesson5 and the corresponding +html-ized code are not yet updated - time is missing +(volunteers welcome).

      +
    • + +
      May 2002
      +
    • +
      +Thanks to Sébastien +Cahon (LIFL, Lille)
      + +
    +
    +
    Welcome to EO tutorial/on-line documentation.
    +

    About this tutorial

    +First, please note that this tutorial is not supposed +to be printed and read off-line, as it takes full advantage +of hyper-text links between the different parts, and with the technical +documentation. +This tutorial can be used in 2 different ways: algorithm-based and component-based. +
      +
    • +Algorithm-Based means you start from a very +simple, ready-to-run algorithm, and gradually modify it, making +it both more powerful and more complex.
    • + +
    • +Component-Based means you start by examining +the +components of an EA one by one, down to +the level of complexity you feel comfortable with, and then build the whole +algorithm using those components you need (or the one you are mastering). +Such approach might be viewed as going through a simplified user guide, +too.
    • +
    +However, it is strongly recommended +that you take some time on the first lesson of the Algorithm-Based approach +to get familiar with the basic concepts that are used throughout EO. Anyway, +as of today, December 19, the Component-Based is only very sparsely written +:-) +

    +


    Links and Related +documents +
      +
    • +There are of course a few (very few) programming +hints that you should know.
    • + +
    • +THe EO documentation - automatically +generated from the comments in the code - is very helpful to get an idea +of the inheritance diagrams of EO classes, +and to quickly reach some specific part of the code.
    • + +
      The top page of each class documentation is for instance the inheritance +diagram of the class, and you'll learn a lot by simply looking at it. +
    • +For those who wish to get deeper in STL (Standard Template Library), you +might visit the well documented SGI +STL Web site. But don't forget you'll find the very basic minimum in +EO programming hints.
    • + +
    • +And, last but not least, we assume you know approximately that an Evolutionary +Algorithm looks like this, but otherwise you can try this very +brief introduction (not written yet, Jan. 2001, sorry).
    • +
    + +


    +


    Colors and navigation: +

    You will see this diagram in quite many places, as for instance at the +top of all examples - usually it will be clickable and will help you navigate +among the different parts of an EO program. See the brief +introduction to Evolutionary Computation for a detailed explanation. +

    +

    + +

    But in the text itself, colors are important, +as they will be used throughout this tutorial to clearly mark which part +of the algorithm we are discussing. So please keep in mind that, whereas +orange +is for emphasis, +

      +
    • +Yellowish is for representation, +i.e. the choice of the genotype
    • + +
    • +Magenta is for the stochastic +operators that are representation-dependent, +i.e. initialisation and variation operators +(crossover, mutation +and the like).
    • + +
    • +Green is for the implementation of Darwinism, +i.e. the way the individuals are selected +for reproduction and survive.
    • + +
    • +Red is for evaluation, i.e. the computation +of the fitness of all individuals
    • + +
    • +Blue is for interactions of the user and the +program, as for instance choice of stopping criterion, +on-line display of nice statistics or initial +choice +of all program parameters.
    • + +
    • +Brown is for everything that is NOT part of +any of the above, i.e. random number generator, or basic C++/STL syntax +.
    • + +
    • +Note that pink will be used to describe the +syntax of compile orders (i.e. at the operating system level, see e.g. +below).
    • + +
    • +Last, but not least, all +links into EO documentation will use the Helvetica typeface, like this +line you are now reading.
    • +
    + +
    This tutorial is +not +
      +
    • +A course on Evolutionary Computation. You can find such things on the Internet, +maybe you can start here.
    • + +
    • +An interface that would allow you to build your Evolutionary Programs by +a few clicks; such a thing does exist, is called EASEA, +and is complementary to this tutorial as it helps the user to build some +simple EO programs from simple description. But there are things that EASEA +cannot do, and you will have to do it yourself and will need to increase +your knowledge about EO for that - hence this tutorial.
    • + +
    • +A coffee machine - though you might want to spend some time here when you're +tired of everything else, to improve your knowledge of EO slowly and gradually +rather than when you have something urgent to code :-)
    • +
    + +
    Before +you start +

    You should of course have downloaded and installed the whole EO +library (how did you get this file if not???). +If you are using a recent version of EO (0.9.3+), all tutorial Lessons +should have been compiled when installing the library, and you can now +proceed with Lesson1.
    +
    Otherwise, we'll assume that you are now in the tutorial directory, and that +your prompt looks something like +

    (myname@myhost) EOdir/tutorial % +

    so you should now type in +

    make Lesson1 +

    and see something like +

    (myname@myhost) +EOdir/tutorial % make Lesson1 +
    c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" +-I. -I../../src -Wall -g -c FirstBitGA.cpp +
    c++ -Wall -g -o FirstBitGA FirstBitGA.o +../../src/libeo.a ../../src/utils/libeoutils.a +
    c++ -DPACKAGE=\"eo\" -DVERSION=\"0.9.1\" +-I. -I../../src -Wall -g -c FirstRealGA.cpp +
    c++ -Wall -g -o FirstRealGA FirstRealGA.o +../../src/libeo.a ../../src/utils/libeoutils.a +

    and two now executable files should have appeared in the subdirectory +Lesson1, namely FirstBitGA +and FirstRealGA (see First +lesson to know more about these two ready-to-run programs). If this +doesn't work, please go back to the main EO directory and run the installation +program. +

    You should also test that you can access the EO documentation in the +menu line below: you might not need to go there immediately, but just in +case you make rapid progress ... This menu bar should be on all pages of +this tutorial, allowing you to navigate easily. +

    Last, but not least: EO is improving only  from the good will of +contributors. This is also true for this tutorial: If you find anything +that you think could be improved, you are welcome to e-mail +me. +

    +

    Enjoy! +


    Algorithm-Based +- Component-Based - Programming +hints - EO +documentation
    + +
    +
    +Marc Schoenauer
    + +
    +Last +modified: Wed Feb 22 2006  + + diff --git a/trunk/eo/tutorial/html/make_genotype_OneMax.html b/trunk/eo/tutorial/html/make_genotype_OneMax.html new file mode 100644 index 000000000..3920e5548 --- /dev/null +++ b/trunk/eo/tutorial/html/make_genotype_OneMax.html @@ -0,0 +1,160 @@ + + + + + + Templates/make_genotype_OneMax.h + + +Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +
    +

    +Templates/make_genotype_OneMax.h

    +The places where you have to put some code are on pink +background.. +Only the the character colors have the usual meaning. +
      + + + + + +
    + +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
    + +//-----------------------------------------------------------------------------
    + +// make_genotype.h
    + +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001
    + +/*
    +      This library is free software; you can redistribute it and/or
    +      modify it under the terms of the GNU Lesser General Public
    +      License as published by the Free Software Foundation; either
    +      version 2 of the License, or (at your option) any later version.
    +      This library is distributed in the hope that it will be useful,
    +      but WITHOUT ANY WARRANTY; without even the implied warranty of
    +      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +      Lesser General Public License for more details.
    +      You should have received a copy of the GNU Lesser General Public
    +      License along with this library; if not, write to the Free Software
    +      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +      Contact: todos@geneura.ugr.es, http://geneura.ugr.es
    +                        Marc.Schoenauer@inria.fr
    +                        mkeijzer@dhi.dk
    + */
    + +//-----------------------------------------------------------------------------
    +#ifndef _make_genotype_h
    +#define _make_genotype_h
    +#include <eoOneMax.h>
    +#include <eoOneMaxInit.h>
    +   +// also need the parser and param includes
    +#include <utils/eoParser.h>
    +#include <utils/eoState.h>
    + +/*
    + * This fuction does the create an eoInit<eoOneMax>
    + *
    + * It could be here tempatized only on the fitness, as it can be used
    + * to evolve structures with any fitness.
    + * However, for consistency reasons, it was finally chosen, as in
    + * the rest of EO, to templatize by the full EOT, as this eventually
    + * allows to choose the type of genotype at run time (see in es dir)
    + *
    + * It returns an eoInit<EOT> that can later be used to initialize
    + * the population (see make_pop.h).
    + *
    + * It uses a parser (to get user parameters) and a state (to store the memory)
    + * the last argument is to disambiguate the call upon different instanciations.
    + *
    + * WARNING: that last argument will generally be the result of calling
    + *                  the default ctor of EOT, resulting in most cases in an EOT
    + *                  that is ***not properly initialized***
    +*/
    +
    +
    + + + + +
    + +template <class EOT>
    +eoInit<EOT> & do_make_genotype(eoParser& _parser, eoState& _state, EOT)
    +{
    +
    +
    + + + + +
    + +   +// read any useful parameter here from the parser
    +   +// the param itself will belong to the parser (as far as memory is concerned)
    +   +//      paramType & param = _parser.createParam(deafultValue, "Keyword", "Comment to appear in help and status", 'c',"Section of status file").value();
    +
    +
    + + + + +
    + +   +// Then built the initializer - a pointer, stored in the eoState
    +  eoInit<EOT>* init = new eoOneMaxInit<EOT> +/* ( param ) */ ; ;
    +
    +
    + + + + +
    + +   +// Eventually by passing the parameters you need
    +  //  eoInit<EOT>* init = new eoOneMaxInit<EOT> +/* ( param ) */ ; ;
    +
    +
    + + + + +
    + +   +// store in state
    +  _state.storeFunctor(init);
    +   +// and return a reference
    +  return *init;
    +}
    +#endif
    +
    +
    Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +Marc Schoenauer
    +
    Last +modified: Fri May 3 07:10:52 2002 + + + diff --git a/trunk/eo/tutorial/html/make_op_OneMax.html b/trunk/eo/tutorial/html/make_op_OneMax.html new file mode 100644 index 000000000..a108fb14f --- /dev/null +++ b/trunk/eo/tutorial/html/make_op_OneMax.html @@ -0,0 +1,351 @@ + + + + + + Templates/make_op_OneMax.h + + +Back to Lesson 5 +- Tutorial main page - Top-Down +page - Bottom-up page - Programming +hints - EO +documentation +
    +
    +
    +

    +Templates/make_op_OneMax.h

    +The places where you have to put some code are on pink +background.. Only the the character +colors have the usual meaning. +

    + + + + +
    // -*- mode: c++; c-indent-level: +4; c++-member-init-indent: 8; comment-column: 35; -*- +

    //----------------------------------------------------------------------------- +
    // make_op_OneMax.h +
    // (c) Marc Schoenauer, Maarten Keijzer and +GeNeura Team, 2001 +
    /*  +
         This library is +free software; you can redistribute it and/or +
         modify it under +the terms of the GNU Lesser General Public +
         License as published +by the Free Software Foundation; either +
         version 2 of the +License, or (at your option) any later version. +
         This library is +distributed in the hope that it will be useful, +
         but WITHOUT ANY +WARRANTY; without even the implied warranty of +
         MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +
         Lesser General Public +License for more details. +
         You should have +received a copy of the GNU Lesser General Public +
         License along with +this library; if not, write to the Free Software +
         Foundation, Inc., +59 Temple Place, Suite 330, Boston, MA  02111-1307  USA +
         Contact: todos@geneura.ugr.es, +http://geneura.ugr.es +
                           +Marc.Schoenauer@inria.fr +
                           +mkeijzer@dhi.dk +
    */ +
    //----------------------------------------------------------------------------- +

    #ifndef _make_op_OneMax_h +
    #define _make_op_OneMax_h +

    // the operators +
    #include <eoOp.h> +
    #include <eoGenOp.h> +
    #include <eoCloneOps.h> +
    #include <eoOpContainer.h> +
    // combinations of simple eoOps (eoMonOp +and eoQuadOp) +
    #include <eoProportionalCombinedOp.h> +

    /** definition of mutation:  +
    * class eoOneMaxMonop MUST derive from eoMonOp<eoOneMax> +
    */ +
    #include "eoOneMaxMutation.h" +

    /** definition of crossover (either as eoBinOp +(2->1) or eoQuadOp (2->2):  +
    * class eoOneMaxBinCrossover MUST derive +from eoBinOp<eoOneMax> +
    * OR  +
    * class eoOneMaxQuadCrossover MUST derive +from eoQuadOp<eoOneMax> +
    */ +
    // #include "eoOneMaxBinOp.h" +
    // OR +
    #include "eoOneMaxQuadCrossover.h" +

      // also need the parser and +state includes +
    #include <utils/eoParser.h> +
    #include <utils/eoState.h> +

    /////////////////// variation operators /////////////// +
    // canonical (crossover + mutation) only +at the moment // +

    /* +
    * This function builds the operators that +will be applied to the eoOneMax +
    * +
    * It uses a parser (to get user parameters), +a state (to store the memory) +
    *      the last +parameter is an eoInit: if some operator needs some info  +
    *      about the +genotypes, the init has it all (e.g. bounds, ...) +
    *      Simply do  +
    *              +EOT myEO; +
    *              +_init(myEO); +
    *      and myEO +is then an ACTUAL object +
    * +
    * As usual, the template is the complete +EOT even though only the fitness +
    * is actually templatized here: the following +only applies to eoOneMax +
    */

    + + + + + +
    template <class EOT> +
    eoGenOp<EOT> & do_make_op(eoParameterLoader& +_parser, eoState& _state, eoInit<EOT>& _init) +
    { +
      // this is a temporary version, +while Maarten codes the full tree-structured +
      // general operator input +
      // BTW we must leave that simple +version available somehow, as it is the one +
      // that 90% people use! +

          ///////////////////////////// +
          // +Variation operators +
          //////////////////////////// +
          // +read crossover and mutations, combine each in a proportional Op +
          // +and create the eoGenOp that calls crossover at rate pCross  +
          // +then mutation with rate pMut +

          // the +crossovers +
          ///////////////// +

          // here +we can have eoQuadOp (2->2) only - no time for the eoBinOp case +

          // you +can have more than one - combined in a proportional way +

          // first, +define the crossover objects and read their rates from the parser +

          // A +first crossover  +
         +eoQuadOp<Indi> *cross = new eoOneMaxQuadCrossover<Indi> /* (varType  +_anyVariable) */; +
          // +store in the state +
         _state.storeFunctor(cross); +

      // read its relative rate in +the combination +
         double cross1Rate += _parser.createParam(1.0, "cross1Rate", "Relative rate for crossover 1", +'1', "Variation Operators").value(); +

      // and create the combined operator +with this one +
     eoPropCombinedQuadOp<Indi> *propXover +=  +
         new eoPropCombinedQuadOp<Indi>(*cross, +cross1Rate); +
      // and of course stor it in +the state +
         _state.storeFunctor(propXover); +
     

    + + + + + +
          +// Optional: A second(and third, and ...)  crossover  +
          //    +of course you must create the corresponding classes +
          // +and all ***MUST*** derive from eoQuadOp<Indi> +

      /* Uncomment if necessary - +and replicate as many time as you need +
             +cross = new eoOneMaxSecondCrossover<Indi>(varType  _anyVariable);  +
             +_state.storeFunctor(cross); +
             +double cross2Rate = _parser.createParam(1.0, "cross2Rate", "Relative rate +for crossover 2", '2', "Variation Operators").value();  +
             +propXover.add(*cross, cross2Rate);  +
     */ +
      // if you want some gentle +output, the last one shoudl be like +
      //  propXover.add(*cross, +crossXXXRate, true); +
     

    + + + + + +
    +
      // the mutation: same story +
      //////////////// +
      // you can have more than one +- combined in a proportional way +

      // for each mutation,  +
      // - define the mutator object +
      // - read its rate from the +parser +
      // - add it to the proportional +combination +

      // a first mutation  +
    eoMonOp<Indi> +*mut = new eoOneMaxMutation<Indi> /* (varType  +_anyVariable) */; +
     _state.storeFunctor(mut); +
      // its relative rate in the +combination +
     double mut1Rate = _parser.createParam(1.0, +"mut1Rate", "Relative rate for mutation 1", '1', "Variation Operators").value(); +
      // and the creation of the +combined operator with this one +
     eoPropCombinedMonOp<Indi> *propMutation += new eoPropCombinedMonOp<Indi>(*mut, mut1Rate); +
     _state.storeFunctor(propMutation); +
     

    + + + + + +
          +// Optional: A second(and third, and ...)  mutation with their rates +
          //    +of course you must create the corresponding classes +
          // +and all ***MUST*** derive from eoMonOp<Indi> +

      /* Uncomment if necessary - +and replicate as many time as you need +
             +mut = new eoOneMaxSecondMutation<Indi>(varType  _anyVariable); +
             +_state.storeFunctor(mut); +
             +double mut2Rate = _parser.createParam(1.0, "mut2Rate", "Relative rate for +mutation 2", '2', "Variation Operators").value();  +
               +propMutation.add(*mut, mut2Rate);  +
     */ +
      // if you want some gentle +output, the last one shoudl be like +
      //  propMutation.add(*mut, +mutXXXRate, true); +

      // end of crossover and mutation +definitions +
     

    + + + + + +
    +
    // from now on, you do not need to modify +anything +
    // though you CAN add things to the checkpointing +(see tutorial) +

      // now build the eoGenOp: +
      // to simulate SGA (crossover +with proba pCross + mutation with proba pMut +
      // we must construct +
      //        +a sequential combination of +
      //                  +with proba 1, a proportional combination of  +
      //                                              +a QuadCopy and our crossover +
      //                  +with proba pMut, our mutation +

      // but of course you're free +to use any smart combination you could think of +
      // especially, if you have +to use eoBinOp rather than eoQuad Op youùll have +
      // to modify that part +

      // +First read the individual level parameters +
         eoValueParam<double>& +pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", +'C', "Variation Operators" ); +
          // +minimum check +
         if ( (pCrossParam.value() +< 0) || (pCrossParam.value() > 1) ) +
             +throw runtime_error("Invalid pCross"); +

         eoValueParam<double>& +pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", +'M', "Variation Operators" ); +
          // +minimum check +
         if ( (pMutParam.value() +< 0) || (pMutParam.value() > 1) ) +
             +throw runtime_error("Invalid pMut"); +

      // the crossover - with probability +pCross +
     eoProportionalOp<Indi> * propOp += new eoProportionalOp<Indi> ; +
     _state.storeFunctor(propOp); +
     eoQuadOp<Indi> *ptQuad = new +eoQuadCloneOp<Indi>; +
     _state.storeFunctor(ptQuad); +
     propOp->add(*propXover, pCrossParam.value()); +// +crossover, with proba pcross +
     propOp->add(*ptQuad, 1-pCrossParam.value()); +// +nothing, with proba 1-pcross +

      // now the sequential +
     eoSequentialOp<Indi> *op = new +eoSequentialOp<Indi>; +
     _state.storeFunctor(op); +
     op->add(*propOp, 1.0); // always +do combined crossover +
     op->add(*propMutation, pMutParam.value()); +// +then mutation, with proba pmut +

      // that's it - return a reference +
     return *op; +
    } +

    #endif

    + +


    Back to Lesson 5 - Tutorial +main page - Top-Down page - Bottom-up +page - Programming hints - EO +documentation +
    +
    +Marc Schoenauer
    + +
    Last modified: Fri May +3 08:06:20 2002 + + diff --git a/trunk/eo/tutorial/html/real_value.html b/trunk/eo/tutorial/html/real_value.html new file mode 100644 index 000000000..a5ec17852 --- /dev/null +++ b/trunk/eo/tutorial/html/real_value.html @@ -0,0 +1,56 @@ + + + + + + real_value.h + + +Back to Lesson 2 - Tutorial +main page - Algorithm-Based - Component-Based +page - Programming hints - +EO documentation +
    +
    +
    + + + + +
    #include <vector> +
    //----------------------------------------------------------------------------- +
    /** Just a simple function that takes an +vector<double> and sets the fitnes  +
         to the sphere function. +Please use doubles not float!!! +
         @param _ind A floatingpoint +vector  +
    */
    + + + + + +
    double real_value(const std::vector<double>& +_ind) +
    { +
     double sum = 0; +
     for (unsigned i = 0; i < _ind.size(); +i++) +
             +sum += _ind[i] * _ind[i]; +
     return -sum; +
    }
    + +
    Back to Lesson 2 - Tutorial +main page - Algorithm-Based - Component-Based +page - Programming hints - EO +documentation +
    +
    +Marc Schoenauer
    + +
    Last modified: Wed Nov +29 08:58:50 2000 + + diff --git a/trunk/eo/tutorial/index.html b/trunk/eo/tutorial/index.html new file mode 100644 index 000000000..81b87972b --- /dev/null +++ b/trunk/eo/tutorial/index.html @@ -0,0 +1,26 @@ + + + + + + Tutorial EO + + + +
    +
    +

    +EO Tutorial

    +Welcome to EO - the Evolving Objects library. +

    But you are not in the right place! +
    You should better try to go to the html directory, for instance by +clicking here. +

    +


    +
    +Marc Schoenauer
    + +
    Last +modified: Fri Nov 28 CET 2000  + + diff --git a/trunk/install.cmake b/trunk/install.cmake deleted file mode 100644 index 8113a6dd7..000000000 --- a/trunk/install.cmake +++ /dev/null @@ -1,130 +0,0 @@ -###################################################################################### -### CMake basic configuration -###################################################################################### - -# check cmake version compatibility -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - -# regular expression checking -INCLUDE_REGULAR_EXPRESSION("^.*$" "^$") - -# set a language for the entire project. -ENABLE_LANGUAGE(CXX) -ENABLE_LANGUAGE(C) - -#################################################################################### - - -##################################################################################### -### Include required modules & utilities -##################################################################################### -INCLUDE(CMakeBackwardCompatibilityCXX) - -INCLUDE(FindDoxygen) - -INCLUDE(FindGnuplot) - -INCLUDE(CheckLibraryExists) - -INCLUDE(Dart OPTIONAL) - -INCLUDE(CPack) - -# 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) -###################################################################################### - - -##################################################################################### -### Manage the build type -##################################################################################### - -# the user should choose the build type on windows environments,excepted under cygwin (default=none) -SET(CMAKE_DEFAULT_BUILD_TYPE "Release" CACHE STRING "Variable that stores the default CMake build type" FORCE) - -FIND_PROGRAM(MEMORYCHECK_COMMAND - NAMES purify valgrind - PATHS - "/usr/local/bin /usr/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder]" - DOC "Path to the memory checking command, used for memory error detection.") - -IF(NOT CMAKE_BUILD_TYPE) - SET( CMAKE_BUILD_TYPE - ${CMAKE_DEFAULT_BUILD_TYPE} CACHE STRING - "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." - FORCE) -ENDIF(NOT CMAKE_BUILD_TYPE) - -IF(WIN32 AND NOT CYGWIN) - IF(CMAKE_CXX_COMPILER MATCHES cl) - IF(NOT WITH_SHARED_LIBS) - IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SET(CMAKE_CXX_FLAGS "/nologo /Gy") - SET(CMAKE_CXX_FLAGS_DEBUG "/W3 /MTd /Z7 /Od") - SET(CMAKE_CXX_FLAGS_RELEASE "/w /MT /O2 /wd4530") - SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O2") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Z7 /Od") - SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE") - ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ENDIF(NOT WITH_SHARED_LIBS) - ENDIF(CMAKE_CXX_COMPILER MATCHES cl) -ELSE(WIN32 AND NOT CYGWIN) - IF(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fprofile-arcs -ftest-coverage -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers") - SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2") - SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -O6") - ENDIF(CMAKE_COMPILER_IS_GNUCXX) -ENDIF(WIN32 AND NOT CYGWIN) - -IF(CMAKE_BUILD_TYPE MATCHES Debug) - ADD_DEFINITIONS(-DCMAKE_VERBOSE_MAKEFILE=ON) -ENDIF(CMAKE_BUILD_TYPE MATCHES Debug) - -##################################################################################### - -###################################################################################### -### compilation of examples? -###################################################################################### - -SET(ENABLE_CMAKE_EXAMPLE TRUE CACHE BOOL "Enable copy of benchs and parameters file?") - -###################################################################################### -### Test config -###################################################################################### - -IF (ENABLE_CMAKE_TESTING OR ENABLE_MINIMAL_CMAKE_TESTING) - ENABLE_TESTING() -ENDIF (ENABLE_CMAKE_TESTING OR ENABLE_MINIMAL_CMAKE_TESTING) -###################################################################################### - -####################################################################################### -### Paths to EO, MO and MOEO must be specified above. -####################################################################################### - -SET(EO_SRC_DIR "${CMAKE_SOURCE_DIR}/../paradiseo-eo" CACHE PATH "ParadisEO-EO source directory" FORCE) -SET(EO_BIN_DIR "${CMAKE_BINARY_DIR}/../../paradiseo-eo/build" CACHE PATH "ParadisEO-EO binary directory" FORCE) - -SET(MO_SRC_DIR "${CMAKE_SOURCE_DIR}/../paradiseo-mo" CACHE PATH "ParadisMO-MO source directory" FORCE) -SET(MO_BIN_DIR "${CMAKE_BINARY_DIR}/../../paradiseo-mo/build" CACHE PATH "ParadisMO-MO binary directory" FORCE) - -SET(OLDMO_SRC_DIR "${CMAKE_SOURCE_DIR}/../paradiseo-old-mo" CACHE PATH "ParadisMO-MO source directory" FORCE) -SET(OLDMO_BIN_DIR "${CMAKE_BINARY_DIR}/../../paradiseo-old-mo/build" CACHE PATH "ParadisMO-MO binary directory" FORCE) - -SET(MOEO_SRC_DIR "${CMAKE_SOURCE_DIR}/../paradiseo-moeo" CACHE PATH "ParadisMOEO-MOEO source directory" FORCE) -SET(MOEO_BIN_DIR "${CMAKE_BINARY_DIR}/../../paradiseo-moeo/build" CACHE PATH "ParadisMOEO-MOEO binary directory" FORCE) - -SET(PROBLEMS_SRC_DIR "${CMAKE_SOURCE_DIR}/../problems" CACHE PATH "Problems dependant source directory" FORCE) - -###################################################################################### -###################################################################################### -### Subdirectories that CMake should process for MO, MOEO and PEO -###################################################################################### - -ADD_SUBDIRECTORY(doc) -ADD_SUBDIRECTORY(src) -ADD_SUBDIRECTORY(test) -ADD_SUBDIRECTORY(tutorial) -###################################################################################### - diff --git a/trunk/installParadiseo.sh b/trunk/installParadiseo.sh deleted file mode 100755 index 9ce586868..000000000 --- a/trunk/installParadiseo.sh +++ /dev/null @@ -1,1371 +0,0 @@ -#!/bin/sh - -######################################################################################### -# -# Project : paradisEO full package install -# File : installParadiseo.sh -# Comment : # This file attempts to install ParadisEO # -# -######################################################################################### - -# global variables -installStartTime=$SECONDS -resourceKitPath=$PWD -TAR_MSG=" " -DIE=0 -PROG=ParadisEO -CMAKE_PRIMARY_CONFIG_FILE=install.cmake -HOME_PATH=$HOME -libxml2=" " -binxml2=" " -mpich2=" " -bash_path='$PATH' -library_path='$LD_LIBRARY_PATH' - -# generator types available on Unix platforms -P_UNIX_MAKEFILES=1 -P_KDEVELOP3_PROJECT=2 -P_XCODE_PROJECT=3 -G_UNIX_MAKEFILES="Unix Makefiles" -G_KDEVELOP3_PROJECT="KDevelop3" -G_XCODE_PROJECT="Xcode" - -# should we compile ParadisEO ? -COMPILE_PARADISEO=1 - -# Build types -DEFAULT_BUILD_TYPE=Release -BUILD_TYPE=$DEFAULT_BUILD_TYPE - -# CMake/CTest/Dart flags -CTEST_DEFAULT_CONFIG="-D ExperimentalStart -D ExperimentalBuild -D ExperimentalTest" -CTEST_CONFIG=$CTEST_DEFAULT_CONFIG - -# What are the tests that should be always run ? -MIN_CMAKE_FLAGS='-DENABLE_MINIMAL_CMAKE_TESTING=TRUE' - -# install types to select in the main menu -P_BASIC_INSTALL=1 -P_PARALLEL_INSTALL=2 -P_FULL_INSTALL=3 -P_RM_PREVIOUS_INSTALLL=4 -P_EXIT_INSTALL=5 - -IS_MPICH_INSTALLED=1 -IS_LIBXML2_INSTALLED=1 -USE_EXISTING_MPICH=-1 -USE_EXISTING_LIBXML2=-1 - -# install steps -S_INTRODUCTION=1000 -S_UNPACK_EO=1001 -S_UNPACK_LIBXML=1002 -S_UNPACK_MPICH=1003 -S_INSTALL_EO=1004 -S_INSTALL_MO=1005 -S_INSTALL_MOEO=1006 -S_INSTALL_LIBXML=1007 -S_INSTALL_MPICH=1008 -S_INSTALL_PEO=1009 -S_REMOVE_TEMP_LIBXML=1010 -S_REMOVE_TEMP_MPICH=1011 -S_CONFIGURE_ENV=1012 -S_CONFIGURE_MPD=1013 -S_PEO_CHECK=1014 -S_REMOVE_INSTALL=1015 -S_END=1016 -S_END_WITHOUT_INFO=1017 -S_CHECK_AUTOTOOLS=1018 -S_CLEANING_INSTALL=1019 - -#### define what are the possible installs and their content - -# full install - -FULL_INSTALL="$S_CLEANING_INSTALL $S_INTRODUCTION $S_UNPACK_LIBXML $S_UNPACK_MPICH $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_CHECK_AUTOTOOLS $S_INSTALL_LIBXML $S_REMOVE_TEMP_LIBXML $S_INSTALL_MPICH $S_REMOVE_TEMP_MPICH $S_CONFIGURE_ENV $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END" - -FULL_INSTALL_WITHOUT_LIBXML2="$S_INTRODUCTION $S_UNPACK_MPICH $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_CHECK_AUTOTOOLS $S_INSTALL_MPICH $S_REMOVE_TEMP_MPICH $S_CONFIGURE_MPICH_ENV $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END" - -FULL_INSTALL_WITHOUT_MPICH2="$S_INTRODUCTION $S_UNPACK_LIBXML $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_CHECK_AUTOTOOLS $S_INSTALL_LIBXML $S_REMOVE_TEMP_LIBXML $S_CONFIGURE_LIBXML2_ENV $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END" - -FULL_INSTALL_WITHOUT_LIBXML2_MPICH2="$S_INTRODUCTION $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END_WITHOUT_INFO" - -# basic install -BASIC_INSTALL="$S_INTRODUCTION $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_END" - -# install only paradiseo-peo -PARALLEL_INSTALL="$S_PEO_CHECK $S_INTRODUCTION $S_UNPACK_LIBXML $S_CHECK_AUTOTOOLS $S_INSTALL_LIBXML $S_REMOVE_TEMP_LIBXML $S_UNPACK_MPICH $S_INSTALL_MPICH $S_REMOVE_TEMP_MPICH $S_CONFIGURE_ENV $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END" - -PARALLEL_INSTALL_WITHOUT_LIBXML2="$S_PEO_CHECK $S_INTRODUCTION $S_UNPACK_MPICH $S_CHECK_AUTOTOOLS $S_INSTALL_MPICH $S_REMOVE_TEMP_MPICH $S_CONFIGURE_MPICH_ENV $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END" - -PARALLEL_INSTALL_WITHOUT_MPICH2="$S_PEO_CHECK $S_INTRODUCTION $S_CHECK_AUTOTOOLS $S_UNPACK_LIBXML $S_INSTALL_LIBXML $S_REMOVE_TEMP_LIBXML $S_CONFIGURE_LIBXML2_ENV $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END" - -PARALLEL_INSTALL_WITHOUT_LIBXML2_MPICH2="$S_PEO_CHECK $S_INTRODUCTION $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END_WITHOUT_INFO" - -# remove a previous install -RM_PREVIOUS_INSTALL="$S_REMOVE_INSTALL" - -#others -LIBS_PATH=lib -LIBXML2_ARCHIVE=libxml2-2.7.3 -LIBXML2_ARCHIVE_SUFFIX=.tar.gz -MPICH2_ARCHIVE=mpich2-1.0.8 -MPICH2_ARCHIVE_SUFFIX=.tar.gz -# errors -SUCCESSFUL_STEP=0 -EO_UNPACKING_ERROR=100 -LIBXML_UNPACKING_ERROR=104 -MPICH_UNPACKING_ERROR=105 -EO_INSTALL_ERROR=106 -MO_INSTALL_ERROR=107 -MOEO_INSTALL_ERROR=108 -PARADISEO_INSTALL_ERROR=110 -LIBXML_INSTALL_ERROR=111 -MPICH_INSTALL_ERROR=112 -REMOVE_TEMP_DIRECTORY_ERROR=113 -VAR_CONFIG_ERROR=114 -MPD_COPY_ERROR=115 -LIBXML_INSTALL_ERROR=116 -MPICH_INSTALL_ERROR=117 -PEO_CHECK_ERROR=118 -RM_PARADISEO_EO_ERROR=119 -RM_UTIL_ERROR=120 -BASIC_INSTALL_MISSING_ERROR=121 -DART_SUBMISSION_ERROR=64 -CHECK_AUTOTOOLS_ERROR=122 - -#Date -DATE=`/bin/date '+%Y%m%d%H%M%S'` -# create log file -SPY=$PWD/logs/install-paradiseo.${DATE}.log - -#------------------------------------------------------# -#-- FUNCTION : execute_cmd ---# -#------------------------------------------------------# -#-- PARAMETERS : ---# -#-- $1 : cmd line ---# -#-- $2 : comment ---# -#-- $3 : spy file ---# -#-- $4 : output std file ---# -#-- $5 : error log file ---# -#-- ---# -#------------------------------------------------------# -#-- CODE RETURN : 0 : OK ---# -#-- CODE RETURN : 1 : NOK ---# -#------------------------------------------------------# -function execute_cmd -{ - COMMAND=${1} - COMMENT=${2} - FIC_ESP=${3} - FIC_OUT=${4} - FIC_ERR=${5} - - if [ `echo ${FIC_OUT} | wc -c` -eq 1 ] - then - FIC_OUT=${FIC_ESP} - fi - - if [ `echo ${FIC_ERR} | wc -c` -eq 1 ] - then - FIC_ERR=${FIC_ESP} - fi - - echo "" >> ${FIC_ESP} - echo "[execute_cmd][Begin][`/bin/date +%H:%M:%S`]" >> ${FIC_ESP} - - echo "------------------------------------------------------------------------------------------------------------" >> ${FIC_ESP} - echo "${COMMENT}" >> ${FIC_ESP} - echo "------------------------------------------------------------------------------------------------------------" >> ${FIC_ESP} - echo "${COMMAND}" >> ${FIC_ESP} - - ${COMMAND} >> ${FIC_OUT} 2>> ${FIC_ERR} - - RETURN_CODE=$? - echo "RETURN_CODE : ${RETURN_CODE}" >> ${FIC_ESP} - - if [ ${RETURN_CODE} -eq 0 ] - then - echo " ${COMMENT} OK" >> ${FIC_ESP} - echo "[execute_cmd][End][`/bin/date +%H:%M:%S`]" >> ${FIC_ESP} - return 0 - else - echo " $ERROR_TAG ${COMMENT} NOK" >> ${FIC_ESP} - return ${RETURN_CODE} - fi -} - -#----------------------------------------------------------------# -#-- FUNCTIONS : cleaning bashrc at install and uninstall ---# -#----------------------------------------------------------------# -function configuring_env -{ - echo "On configuring" - echo $PATH - echo $LD_LIBRARY_PATH - grep "export LD_LIBRARY_PATH" $HOME/.bashrc &> .clean - if [ $? -eq 0 ] - then - sed -e s,^"export LD_LIBRARY_PATH.*",,g $HOME/.bashrc > paradiseo.tmp1 - sed -e s,^"export LD_LIBRARY_PATH.*",,g paradiseo.tmp1 > $HOME/.bashrc - fi - - grep "export PATH" $HOME/.bashrc &> .clean - if [ $? -eq 0 ] - then - sed -e s,^"export PATH.*",,g $HOME/.bashrc > paradiseo.tmp1 - sed -e s,^"export PATH.*",,g paradiseo.tmp1 > $HOME/.bashrc - fi - -} - -function on_install -{ - grep "export PATH" $HOME/.bashrc &> .clean - if [ $? -eq 0 ] - then - myPATH=${PATH/$binxml2/} - myPATH=${myPATH/$mpich2/} - sed -e s,$binxml2,,g $HOME/.bashrc > paradiseo.tmp1 - sed -e s,$mpich2,,g paradiseo.tmp1 > $HOME/.bashrc - execute_cmd "export PATH=$myPATH" "Modify the Path" $SPY - fi - execute_cmd "source $HOME/.bashrc" "[$currentStepCounter-5] Export variables" $SPY - grep "export LD_LIBRARY_PATH" $HOME/.bashrc &> .clean - if [ $? -eq 0 ] - then - sed -e s,$libxml2,,g $HOME/.bashrc > paradiseo.tmp1 - sed -e s,"export LD_LIBRARY_PATH="$,"unset LD_LIBRARY_PATH",g paradiseo.tmp1 > paradiseo.tmp2 - grep "unset LD_LIBRARY_PATH" paradiseo.tmp2 - if [ $? -eq 0 ] - then - my_LD_LIBRARY=${LD_LIBRARY_PATH/$libxml2/} - execute_cmd "export LD_LIBRARY_PATH=$my_LD_LIBRARY" "Modify the Path" $SPY - execute_cmd "unset LD_LIBRARY_PATH" "[$currentStepCounter-5] unset variable" $SPY - fi - sed -e s,"unset LD_LIBRARY_PATH.*"$,,g paradiseo.tmp2 > $HOME/.bashrc - fi - -} - -function on_uninstall -{ - #installpath=$1 - #libxml2="$installpath/libxml2/lib" - #binxml2="$installpath/libxml2/bin:" - #mpich2="$installpath/mpich2/bin:" - sed -e s,$libxml2,,g $HOME/.bashrc > paradiseo.tmp1 - sed -e s,$binxml2,,g paradiseo.tmp1 > paradiseo.tmp2 - sed -e s,$mpich2,,g paradiseo.tmp2 > paradiseo.tmp3 - - sed -e s,"export LD_LIBRARY_PATH="$,"unset LD_LIBRARY_PATH",g paradiseo.tmp3 > $HOME/.bashrc - execute_cmd "source $HOME/.bashrc" "[$currentStepCounter-5] Updating $HOME/.bashrc" $SPY - sed -e s,"unset LD_LIBRARY_PATH.*"$,,g $HOME/.bashrc > paradiseo.tmp1 - sed -e s,"unset LD_LIBRARY_PATH.*"$,,g paradiseo.tmp1 > $HOME/.bashrc - execute_cmd "source $HOME/.bashrc" "[$currentStepCounter-5]" $SPY - on_install - execute_cmd "rm paradiseo.tmp*" "[$currentStepCounter] Removing temporary files" $SPY -} - - -#------------------------------------------------------# -#-- FUNCTION : on_error ---# -#------------------------------------------------------# -#-- PARAMETERS : ---# -#-- Error number ---# -#------------------------------------------------------# -#-- RETURN: ---# -#------------------------------------------------------# -function on_error() -{ - case $1 in - $LIBXML_UNPACKING_ERROR) - echo - echo " An error has occured : impossible to unpack libxml2 archive.See $SPY for more details" - echo " Make sure that libxml2 archive exists in current directory" - echo - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" - echo - kill $$;; - - - $MPICH_UNPACKING_ERROR) - echo - echo " An error has occured : impossible to unpack mpich2 archive.See $SPY for more details" - echo " Make sure that mpich2 archive exists in current directory" - echo - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" - echo ;; - - $EO_INSTALL_ERROR) - echo - echo " An error has occured : impossible to install Paradiseo-EO.See $SPY for more details" - echo "If you need help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" - echo - echo - kill $$;; - - $MO_INSTALL_ERROR) - echo - echo " An error has occured : impossible to install Paradiseo-MO.See $SPY for more details" - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" - echo - kill $$;; - - $MOEO_INSTALL_ERROR) - echo - echo " An error has occured : impossible to install Paradiseo-MOEO.See $SPY for more details" - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" - echo - kill $$;; - - $PARADISEO_INSTALL_ERROR) - echo - echo " An error has occured : impossible to install Paradiseo-PEO.See $SPY for more details" - echo ' Make sure you have the required variables in your environment (ex: by using "echo $PATH" for PATH variable) : ' - echo ' -LD_LIBRARY_PATH=/libxml2/lib:$LD_LIBRARY_PATH' - echo ' -PATH=/libxml2/bin:/mpich2/bin:$PATH' - echo - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" - echo - kill $$;; - - $CHECK_AUTOTOOLS_ERROR) - echo - echo " An error has occured : cannot find the Autotools. See $SPY for more details" - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" - echo - kill $$;; - - $LIBXML_INSTALL_ERROR) - echo - echo " An error has occured : impossible to install libxml2. See $SPY for more details" - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" - echo - kill $$;; - - $MPICH_INSTALL_ERROR) - echo - echo " An error has occured : impossible to install mpich2 See $SPY for more details" - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" - echo - kill $$;; - - $PEO_CHECK_ERROR) - echo - echo " If you want to install ParadisEO-PEO, you should remove the old directories of libxml2 or mpich2 or choose another location." - echo - kill $$;; - - $RM_PARADISEO_EO_ERROR) - echo - echo " An error has occured : impossible to remove ParadisEO-EO. See $SPY for more details" - echo " You may not have a previous ParadisEO install available in the current directory" - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" - echo - kill $$;; - - $RM_UTIL_ERROR) - echo - echo " An error has occured : impossible to remove the previous install of mpich2 and libxml2. See $SPY for more details" - echo " You may not have a previous ParadisEO install available in the current directory" - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" - echo - kill $$;; - - $BASIC_INSTALL_MISSING_ERROR) - echo - echo " An error has occured : impossible to find the basic install of ParadisEO. See $SPY for more details" - echo " You may not have a basic ParadisEO install available in the current directory" - echo " => To report any problem or for help, please contact paradiseo-help@lists.gforge.inria.fr and join $SPY" - echo - kill $$;; - - $SUCCESSFUL_STEP) - ;; - *) - echo - ;; - esac -} - -#------------------------------------------------------# -#-- FUNCTION : run_install_step ---# -#------------------------------------------------------# -#-- PARAMETERS : ---# -#-- install path ---# -#-- step to launch (0,1 ...) ---# -#-- counter for loop ---# -#-- Major function for install ---# -#------------------------------------------------------# -#-- RETURN: 0 if install OK ---# -#------------------------------------------------------# - -function run_install_step() -{ - installKitPath=$1 - stepToRun=$2 - currentStepCounter=$3 - libxml2="$installKitPath/libxml2/lib" - binxml2="$installKitPath/libxml2/bin:" - mpich2="$installKitPath/mpich2/bin:" - RETURN=0 - - case "$stepToRun" in - $S_CLEANING_INSTALL) - ########## Introduction ######### - clear - echo "" - echo -e ' \033[40m\033[1;33m### Cleaning any previous install .... ### \033[0m ' - - on_uninstall - - #on_install - - sleep 2 - echo - return $SUCCESSFUL_STEP - ;; - $S_INTRODUCTION) - ########## Introduction ######### - clear - echo "" - echo -e ' \033[40m\033[1;33m### ParadisEO install starting .... ### \033[0m ' - echo - echo "Installing the environment for ParadisEO...Note that the librairies \"libxml2\" and \"mpich2\" required for ParadisEO are provided with this package. To avoid build and test reports to be sent to our repository, please stop the program and restart it using the --skipdart option." - sleep 6 - echo - echo - return $SUCCESSFUL_STEP - ;; - - $S_UNPACK_LIBXML) - ########## unpacking libxml2 ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Unpacking libxml2 (required for ParadisEO) ...' - - execute_cmd "rm -Rf $installKitPath/$LIBXML2_ARCHIVE_SUFFIX" "[$currentStepCounter-1] Remove potential existing dir $installKitPath/$LIBXML2_ARCHIVE" $SPY - RETURN=$? - - execute_cmd "tar xzvf $resourceKitPath/$LIBS_PATH/$LIBXML2_ARCHIVE$LIBXML2_ARCHIVE_SUFFIX --directory $installKitPath" "[$currentStepCounter-2] Unpack Libxml2" $SPY - if [ ! "$?" = "0" ] - then - echo '' - echo " --> Error when unpacking libxml2" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $LIBXML_UNPACKING_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - - $S_UNPACK_MPICH) - ########## unpacking mpich2 ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Unpacking mpich2 (required for ParadisEO) ...' - - execute_cmd "rm -Rf $installKitPath/$MPICH2_ARCHIVE" "[$currentStepCounter-1] Remove potential existing dir $installKitPath/$MPICH2_ARCHIVE" $SPY - RETURN=$? - - execute_cmd "tar xzvf $resourceKitPath/$LIBS_PATH/$MPICH2_ARCHIVE$MPICH2_ARCHIVE_SUFFIX --directory $installKitPath" "[$currentStepCounter-2] Unpack Mpich2" $SPY - if [ ! "$?" = "0" ] - then - echo '' - echo " --> Error when unpacking mpich2" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $MPICH_UNPACKING_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - - - $S_INSTALL_EO) - ########## installing paradiseo-eo ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Installing Paradiseo-EO. Please wait ...' - - if [ ! "$installKitPath" = "$resourceKitPath" ] - then - cp -Rf $resourceKitPath/paradiseo-eo/ $installKitPath/ - rm -Rf $installKitPath/paradiseo-eo/build - fi - - execute_cmd "mkdir $installKitPath/paradiseo-eo/build" "[$currentStepCounter-1] Create build directory" $SPY - - execute_cmd "cd $installKitPath/paradiseo-eo/build" "[$currentStepCounter-2] Go in Paradiseo-EO build dir" $SPY - RETURN=`expr $RETURN + $?` - - execute_cmd " echo \"cmake ../ -G$BUILD_PROCESS_TYPE $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS\" " "[$currentStepCounter-3] Run CMake using generator $BUILD_PROCESS_TYPE" $SPY - - cmake ../ -G"$BUILD_PROCESS_TYPE" -DCMAKE_BUILD_TYPE=$BUILD_TYPE $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS >> ${SPY} 2>> ${SPY} - RETURN=`expr $RETURN + $?` - - if [ "$COMPILE_PARADISEO" = "1" ] - then - execute_cmd "ctest $CTEST_CONFIG" "[$currentStepCounter-4] Compile ParadisEO-EO using CTest" $SPY - LAST_RETURN=$? - # don't consider a submission error as a "right error" - if [ ! "$LAST_RETURN" = "$DART_SUBMISSION_ERROR" ] - then - RETURN=`expr $RETURN + $LAST_RETURN` - fi - fi - - if [ ! $(($RETURN)) = 0 ] - then - echo '' - echo " --> Error when installing Paradiseo-EO" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $EO_INSTALL_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - $S_INSTALL_MO) - ########## installing paradiseo-mo ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Installing Paradiseo-MO. Please wait ...' - - if [ ! "$installKitPath" = "$resourceKitPath" ] - then - cp -Rf $resourceKitPath/paradiseo-mo/ $installKitPath/ - cp $resourceKitPath/install.cmake $installKitPath/ - rm -Rf $installKitPath/paradiseo-mo/build/* - fi - - execute_cmd "cd $installKitPath/paradiseo-mo/build" "[$currentStepCounter-1] Go in Paradiseo-MO dir" $SPY - RETURN=$? - - execute_cmd " echo \"cmake ../ -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE -G\"$BUILD_PROCESS_TYPE\" $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE\" " "[$currentStepCounter-2] Run CMake using generator $BUILD_PROCESS_TYPE -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE" $SPY - cmake ../ -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE -G"$BUILD_PROCESS_TYPE" -DCMAKE_BUILD_TYPE=$BUILD_TYPE $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS>> ${SPY} 2>> ${SPY} - RETURN=`expr $RETURN + $?` - - if [ "$COMPILE_PARADISEO" = "1" ] - then - execute_cmd "ctest $CTEST_CONFIG" "[$currentStepCounter-3] Compile ParadisEO-MO using CTest" $SPY - LAST_RETURN=$? - # don't consider a submission error as a "right error" - if [ ! "$LAST_RETURN" = "$DART_SUBMISSION_ERROR" ] - then - RETURN=`expr $RETURN + $LAST_RETURN` - fi - fi - - if [ ! $(($RETURN)) = 0 ] - then - echo '' - echo " --> Error when installing Paradiseo-MO" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $MO_INSTALL_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - $S_INSTALL_MOEO) - ########## installing MOEO ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Installing Paradiseo-MOEO. Please wait ...' - - if [ ! "$installKitPath" = "$resourceKitPath" ] - then - cp -Rf $resourceKitPath/paradiseo-moeo/ $installKitPath/ - rm -Rf $installKitPath/paradiseo-moeo/build/* - fi - - execute_cmd "cd $installKitPath/paradiseo-moeo/build" "[$currentStepCounter-1] Go in Paradiseo-MOEO dir" $SPY - RETURN=$? - - execute_cmd " echo \"cmake ../ -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE -G\"$BUILD_PROCESS_TYPE\" -DCMAKE_BUILD_TYPE=$BUILD_TYPE $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS \"" "[$currentStepCounter-2] Run CMake using generator $BUILD_PROCESS_TYPE -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE" $SPY - cmake ../ -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE -G"$BUILD_PROCESS_TYPE" -DCMAKE_BUILD_TYPE=$BUILD_TYPE $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS >> ${SPY} 2>> ${SPY} - RETURN=`expr $RETURN + $?` - - if [ "$COMPILE_PARADISEO" = "1" ] - then - execute_cmd "ctest $CTEST_CONFIG" "[$currentStepCounter-3] Compile ParadisEO-MOEO using CTest" $SPY - LAST_RETURN=$? - # don't consider a submission error as a "right error" - if [ ! "$LAST_RETURN" = "$DART_SUBMISSION_ERROR" ] - then - RETURN=`expr $RETURN + $LAST_RETURN` - fi - fi - - if [ ! $(($RETURN)) = 0 ] - then - echo '' - echo " --> Error when installing Paradiseo-MOEO" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $MOEO_INSTALL_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - - $S_CHECK_AUTOTOOLS) - ########## Check if we can user Autogen & Autoconf (only for libxml2 & mpich2 installation) ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Looking for the Autotools (Autogen & Autoconf, required to install libxml2 and mpich2)' - - (autoconf --version) < /dev/null > /dev/null 2>&1 || - { - echo '' - echo " --> Error when checking for Autoconf" - echo " You must have Autoconf installed to compile $PROG. Please update your system to get it before installing $PROG." - execute_cmd "autoconf --version" "[$currentStepCounter-1] Check Autoconf" $SPY - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $CHECK_AUTOTOOLS_ERROR - } - - (automake --version) < /dev/null > /dev/null 2>&1 || - { - echo '' - echo " --> Error when checking for Automake" - echo " You must have Automake installed to compile $PROG. Please update your system to get it before installing $PROG." - execute_cmd "automake --version" "[$currentStepCounter-2] Check Automake" $SPY - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $CHECK_AUTOTOOLS_ERROR - } - - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - ;; - - $S_INSTALL_LIBXML) - ########## installing LIBXML2 ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Installing libxml2. Please wait ...' - - execute_cmd "rm -Rf $installKitPath/libxml2" "[$currentStepCounter-0] Remove potential existing dir $installKitPath/libxml2" $SPY - RETURN=$? - - execute_cmd "mkdir $installKitPath/libxml2" "[$currentStepCounter-1] Create libxml2 dir" $SPY - RETURN=$? - execute_cmd "cd $installKitPath/$LIBXML2_ARCHIVE/" "[$currentStepCounter-2] Go in $LIBXML2_ARCHIVE dir" $SPY - RETURN=`expr $RETURN + $?` - execute_cmd "./configure --prefix=$installKitPath/libxml2/ --exec-prefix=$installKitPath/libxml2/" "[$currentStepCounter-3] Run configure for libxml2" $SPY - RETURN=`expr $RETURN + $?` - execute_cmd "make" "[$currentStepCounter-4] Compile libxml2" $SPY - RETURN=`expr $RETURN + $?` - execute_cmd "make install" "[$currentStepCounter-5] Run install libxml2 " $SPY - RETURN=`expr $RETURN + $?` - if [ ! $(($RETURN)) = 0 ] - then - echo '' - echo " --> Error when installing libxml2" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $LIBXML_INSTALL_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - $S_INSTALL_MPICH) - ########## installing MPICH2 ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Installing mpich2. Please wait ...' - - execute_cmd "rm -Rf $installKitPath/mpich2" "[$currentStepCounter-0] Remove potential existing dir $installKitPath/mpich2" $SPY - RETURN=$? - - execute_cmd "mkdir $installKitPath/mpich2" "[$currentStepCounter-1] Create mpich2 dir" $SPY - RETURN=$? - execute_cmd "cd $installKitPath/$MPICH2_ARCHIVE/" "[$currentStepCounter-2] Go in $MPICH2_ARCHIVE dir" $SPY - RETURN=`expr $RETURN + $?` - execute_cmd "./configure --prefix=$installKitPath/mpich2/" "[$currentStepCounter-3] Run configure for mpich2" $SPY - RETURN=`expr $RETURN + $?` - execute_cmd "make" "[$currentStepCounter-4] Compile mpich2" $SPY - RETURN=`expr $RETURN + $?` - execute_cmd "make install" "[$currentStepCounter-5] Run install mpich2 " $SPY - RETURN=`expr $RETURN + $?` - if [ ! $(($RETURN)) = 0 ] - then - echo '' - echo " --> Error when installing MPICH2" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $MPICH_INSTALL_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - $S_REMOVE_TEMP_LIBXML) - ########## removing temp directory for libxml ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Removing libxml2 temp install directory ...' - - execute_cmd "rm -fr $installKitPath/$LIBXML2_ARCHIVE" "[$currentStepCounter] Remove Libxml2 temporary directory" $SPY - if [ ! "$?" = "0" ] - then - echo '' - echo " --> Error when removing $installKitPath/$LIBXML2_ARCHIVE" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $REMOVE_TEMP_DIRECTORY_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - - $S_REMOVE_TEMP_MPICH) - ########## removing temp directory for mpich ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Removing mpich2 temp install directory ...' - - execute_cmd "rm -fr $installKitPath/$MPICH2_ARCHIVE" "[$currentStepCounter] Remove Mpich2 temporary directory" $SPY - if [ ! "$?" = "0" ] - then - echo '' - echo " --> Error when removing $installKitPath/$MPICH2_ARCHIVE" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $REMOVE_TEMP_DIRECTORY_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - - $S_REMOVE_INSTALL) - ########## removing a previous install of EO ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Removing your previous install of ParadisEO ...' - libxml2="$installKitPath/libxml2/lib" - binxml2="$installKitPath/libxml2/bin:" - mpich2="$installKitPath/mpich2/bin:" - on_uninstall - - if [ "$UID" = "0" ] - then - execute_cmd "rm /etc/mpd.conf*" "[$currentStepCounter] removing mpd.conf" $SPY - else - execute_cmd "rm $HOME/.mpd.conf*" "[$currentStepCounter] removing .mpd.conf" $SPY - fi - if [ -d "$installKitPath/mpich2" ] - then - execute_cmd "rm -r $installKitPath/mpich2" "[$currentStepCounter] Remove previous install of mpich2" $SPY - fi - idx=$? - - if [ -d "$installKitPath/libxml2" ] - then - execute_cmd "rm -r $installKitPath/libxml2" "[$currentStepCounter] Remove previous install of libxml2" $SPY - fi - idx=`expr $idx + $?` - - execute_cmd "rm -Rf $installKitPath/paradiseo-eo/build/*" "[$currentStepCounter] Remove $installKitPath/paradiseo-eo/build/*" $SPY - idx=`expr $idx + $?` - execute_cmd "rm -Rf $installKitPath/paradiseo-mo/build/*" "[$currentStepCounter] Remove $installKitPath/paradiseo-mo/build/*" $SPY - idx=`expr $idx + $?` - execute_cmd "rm -Rf $installKitPath/paradiseo-moeo/build/*" "[$currentStepCounter] Remove $installKitPath/paradiseo-moeo/build/*" $SPY - idx=`expr $idx + $?` - execute_cmd "rm -Rf $installKitPath/paradiseo-peo/build/*" "[$currentStepCounter] Remove $installKitPath/paradiseo-peo/build/*" $SPY - idx=`expr $idx + $?` - - if [ ! $(($idx)) = 0 ] - then - echo '' - echo " --> Error when removing previous install of ParadisEO" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $RM_UTIL_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo -e "Please \033[40m\033[1;33m CLOSE YOUR TERMINAL OR OPEN A NEW ONE \033[0m before proceeding with a new installation." - echo - return $SUCCESSFUL_STEP - fi - ;; - - $S_CONFIGURE_MPICH_ENV) - ########## Configuring mpich environment variables ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Configuring environment variables for mpich2 ...' - - execute_cmd "export PATH=`xml2-config --prefix`/bin:$installKitPath/mpich2/bin:$PATH" "[$currentStepCounter-2] Export PATH variable" $SPY - idx=$? - execute_cmd "echo export PATH=$PATH" "[$currentStepCounter-4] Export PATH variable into env" $SPY $HOME/.bashrc - idx=`expr $idx + $?` - - execute_cmd "source $HOME/.bashrc" "[$currentStepCounter-5] Export variables for mpich2" $SPY - idx=`expr $idx + $?` - - if [ ! $(($idx)) = 0 ] - then - echo '' - echo " --> Error when configuring environment variables for mpich2" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $VAR_CONFIG_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - - $S_CONFIGURE_LIBXML2_ENV) - ########## Configuring environment variables ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Configuring environment variables for libxml2 ...' - - execute_cmd "XML2_CONFIG=\`xml2-config --prefix\`" "[$currentStepCounter-1] Run xml2-config variable" $SPY - idx=$? - echo "******** $XML2_CONFIG *********" - - execute_cmd "export LD_LIBRARY_PATH=`xml2-config --prefix`/lib" "[$currentStepCounter-2] Export LD_LIBRARY_PATH variable" $SPY - idx=$? - - execute_cmd "echo export LD_LIBRARY_PATH=$`xml2-config --prefix`/lib" "[$currentStepCounter-3] Export LD_LIBRARY_PATH variable into env" $SPY $HOME/.bashrc - idx=$? - - execute_cmd "echo export PATH=`xml2-config --prefix`/bin:$PATH" "[$currentStepCounter-4] Export PATH variable into env" $SPY $HOME/.bashrc - idx=`expr $idx + $?` - - execute_cmd "source $HOME/.bashrc" "[$currentStepCounter-5] Export variables for libxml2" $SPY - idx=`expr $idx + $?` - - if [ ! $(($idx)) = 0 ] - then - echo '' - echo " --> Error when configuring environment variables for libxml2" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $VAR_CONFIG_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - $S_CONFIGURE_ENV) - ########## Configuring environment variables ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Configuring environment variables for libxml2 and mpich2 ...' - - execute_cmd "export LD_LIBRARY_PATH=$installKitPath/libxml2/lib" "[$currentStepCounter-1] Export LD_LIBRARY_PATH variable" $SPY - idx=$? - execute_cmd "export PATH=$installKitPath/libxml2/bin:$installKitPath/mpich2/bin:$PATH" "[$currentStepCounter-2] Export PATH variable" $SPY - idx=`expr $idx + $?` - execute_cmd "echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" "[$currentStepCounter-3] Export LD_LIBRARY_PATH variable" $SPY $HOME/.bashrc - idx=`expr $idx + $?` - execute_cmd "echo export PATH=$PATH" "[$currentStepCounter-4] Export PATH variable into env" $SPY $HOME/.bashrc - idx=`expr $idx + $?` - execute_cmd "source $HOME/.bashrc" "[$currentStepCounter-5] Export variables" $SPY - idx=`expr $idx + $?` - - if [ ! $(($idx)) = 0 ] - then - echo '' - echo " --> Error when configuring environment variables for libxml2 and mpich2" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $VAR_CONFIG_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - $S_FAKE_INSTALL) - ########## Configuring environment variables ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Configuring environment variables for libxml2 and mpich2 ...' - - - execute_cmd "export LD_LIBRARY_PATH=$installKitPath/libxml2/lib" "[$currentStepCounter-1] Export LD_LIBRARY_PATH variable" $SPY - idx=$? - - execute_cmd "export PATH=$installKitPath/libxml2/bin:$installKitPath/mpich2/bin:$PATH" "[$currentStepCounter-2] Export PATH variable" $SPY - configuring_env - idx=$? - #execute_cmd "grep 'export LD_LIBRARY_PATH' $HOME/.bashrc" "[$currentStepCounter-3] Export PATH variable" $SPY - - idx=`expr $idx + $?` - - execute_cmd "source $HOME/.bashrc" "[$currentStepCounter-5] Export variables" $SPY - idx=`expr $idx + $?` - - if [ ! $(($idx)) = 0 ] - then - echo '' - echo " --> Error when configuring environment variables for libxml2 and mpich2" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $VAR_CONFIG_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - $S_CONFIGURE_MPD) - ######## copy .mpd.conf file in your HOME directory or in /etc if you are root (required for mpich2) - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Copy .mpd.conf file in your HOME directory or in /etc if you are root (required for mpich2) ...' - if [ "$UID" = "0" ] - then - execute_cmd "cp $resourceKitPath/.mpd.conf /etc" "[$currentStepCounter-1] Copy mpd.conf file in /etc (root)" $SPY - RETURN=$? - execute_cmd "mv /etc/.mpd.conf /etc/mpd.conf" "[$currentStepCounter-2] Move .mpd.conf to mpd.conf" $SPY - RETURN=`expr $RETURN + $?` - execute_cmd "chmod 600 /etc/mpd.conf" "[$currentStepCounter-3] Change .mpd.conf rights" $SPY - RETURN=`expr $RETURN + $?` - else - execute_cmd "cp $resourceKitPath/.mpd.conf $HOME" "[$currentStepCounter-1] Copy mpd.conf file in in your HOME directory" $SPY - RETURN=$? - execute_cmd "chmod 600 $HOME/.mpd.conf" "[$currentStepCounter-2] Change .mpd.conf rights" $SPY - RETURN=`expr $RETURN + $?` - fi - if [ ! $(($RETURN)) = 0 ] - then - echo '' - echo " --> Error when copying .mpd.conf file " - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $MPD_COPY_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - $S_INSTALL_PEO) - ######## installing paradiseo-peo ########## - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " - echo ' --> Installing Paradiseo-PEO. Please wait ...' - execute_cmd "source $HOME/.bashrc" "[$currentStepCounter-5] Export variables" $SPY - execute_cmd "cd $installKitPath/paradiseo-peo/build" "[$currentStepCounter-1] Go in Paradiseo-PEO dir" $SPY - RETURN=$? - execute_cmd " echo \"cmake ../ -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE -G\"$BUILD_PROCESS_TYPE\" $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS \"" "[$currentStepCounter-2] Run CMake using generator $BUILD_PROCESS_TYPE -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE" $SPY - cmake ../ -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE -G"$BUILD_PROCESS_TYPE" $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE >> ${SPY} 2>> ${SPY} - RETURN=`expr $RETURN + $?` - - if [ "$COMPILE_PARADISEO" = "1" ] - then - execute_cmd "ctest $CTEST_CONFIG" "[$currentStepCounter-3] Compile ParadisEO-PEO using CTest" $SPY - LAST_RETURN=$? - # don't consider a submission error as a "right error" - if [ ! "$LAST_RETURN" = "$DART_SUBMISSION_ERROR" ] - then - RETURN=`expr $RETURN + $LAST_RETURN` - fi - fi - - if [ ! $(($RETURN)) = 0 ] - then - echo '' - echo " --> Error when installing Paradiseo-PEO" - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $PARADISEO_INSTALL_ERROR - else - echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m" - echo - return $SUCCESSFUL_STEP - fi - ;; - - $S_PEO_CHECK) - if [ -d paradiseo-eo -a -d paradiseo-mo -a -d paradiseo-moeo ] - then - if [ -d libxml2 -o -d mpich2 ] - then - echo - echo "A previous installation of ParadisEO-PEO may exist because libxml2 or mpich2 directory have been detected in $installKitPath." - echo -e " \033[40m\033[1;33m => Do you want to remove these directories for a new installation ? If you choose NO, the installation will stop. (y/n) ? \033[0m " - read ANSWER - if [ "$ANSWER" = "y" ] - then - execute_cmd "rm -rf $installKitPath/libxml2 $installKitPath/mpich2" "[$currentStepCounter] Remove libxml2 ans mpich2 directories for a new install" $SPY "/dev/null" "/dev/null" - else - return $PEO_CHECK_ERROR - fi - fi - else - echo - echo "Basic install not found (at least one of the EO,MO,MOEO components is missing) in $installKitPath." - - execute_cmd "test -d paradiseo-eo" "[$currentStepCounter-1] Check previous basic install" $SPY - execute_cmd "test -d paradiseo-mo" "[$currentStepCounter-2] Check previous basic install" $SPY - execute_cmd "test -d paradiseo-moeo" "[$currentStepCounter-3] Check previous basic install" $SPY - - echo '' - echo " --> Error when searching for a previous basic install in $installKitPath." - echo -e ' \033[40m\033[1;33m### END ### \033[0m ' - return $BASIC_INSTALL_MISSING_ERROR - fi - ;; - $S_END_WITHOUT_INFO) - echo - echo -e " \033[40m\033[1;34m# SUCCESSFULL INSTALLATION. \033[0m" - echo - return $SUCCESSFUL_STEP - ;; - $S_END) - echo -e "The file \".bashrc\" file located in your directory $HOME has been MODIFIED. The following variables have been modified at the end:" - echo -e " LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$installKitPath/libxml2/lib" - echo -e " PATH=\$installKitPath/libxml2/bin:$installKitPath/mpich2/bin:$PATH" - echo -e "These variables are necessary to compile any program using ParadisEO-PEO.\033[40m\033[1;33m If you want to keep them in your environment in order not to have to set them each time you compile, enter \"source $HOME/.bashrc\" \033[0m. If you don't want to use these variables, please remove them from $HOME/.bashrc." - #sleep 2 - echo - echo - echo -e " \033[40m\033[1;34m# SUCCESSFULL INSTALLATION. \033[0m" - echo - return $SUCCESSFUL_STEP - ;; - *) - - ;; - esac -} - - -#------------------------------------------------------# -#-- FUNCTION : check_utils_install ---# -#------------------------------------------------------# -#-- PARAMETERS : No ---# -#-- Set some global variables (used for libxml2 ---# -#-- and mpich2 install management) ---# -#------------------------------------------------------# -function check_utils_install -{ - # is there an available version of mpich on the system ? - (mpicxx --version) < /dev/null > /dev/null 2>&1 || - { - IS_MPICH_INSTALLED=0 - } - - # is there an available version of libxml2 on the system ? - (xml2-config --version) < /dev/null > /dev/null 2>&1 || - { - IS_LIBXML2_INSTALLED=0 - } - - # ask the user if he'd like to keep his mpich version instead of the provided one - if [ "$IS_MPICH_INSTALLED" = "1" ] - then - echo - echo -e ' \033[40m\033[1;31m### A version of the MPI compiler has been detected on your system. Do you want to use it (if no, the mpich2 package, provided with ParadisEO, will be installed on your computer) [y/n] \033[0m ' - - execute_cmd "echo \" A version of the MPI compiler has been detected on the system\"" "Is there a previous install of MPI ?" $SPY - - TREATENED=0 - while [ "$TREATENED" = "0" ] - do - read MPICH_YES_NO - if [ ! "$MPICH_YES_NO" = "y" ] && [ ! "$MPICH_YES_NO" = "n" ] - then - TREATENED=0 - else - if [ "$MPICH_YES_NO" = "y" ] - then - USE_EXISTING_MPICH=1 - else - USE_EXISTING_MPICH=0 - fi - TREATENED=1 - fi - done - fi - - - # ask the user if he'd like to keep his libxml2 version instead of the provided one - if [ "$IS_LIBXML2_INSTALLED" = "1" ] - then - echo - echo -e ' \033[40m\033[1;31m### A version of libxml2 has been detected on your system. Do you want to use it (if no, the libxml2 package, provided with ParadisEO, will be installed on your computer) [y/n] \033[0m ' - - execute_cmd "echo \" A version of libxml2 has been detected on the system\"" "Is there a previous install of libxml2 ?" $SPY - - TREATENED=0 - while [ "$TREATENED" = "0" ] - do - read LIBXML2_YES_NO - if [ ! "$LIBXML2_YES_NO" = "y" ] && [ ! "$LIBXML2_YES_NO" = "n" ] - then - TREATENED=0 - else - if [ "$LIBXML2_YES_NO" = "y" ] - then - USE_EXISTING_LIBXML2=1 - else - USE_EXISTING_LIBXML2=0 - fi - TREATENED=1 - fi - done - fi - -} - - - -######################################################## -######### BODY ######## -######################################################### - - -(cmake --version) < /dev/null > /dev/null 2>&1 || -{ - echo "You must have CMake installed to compile $PROG. Please update your system to get it before installing $PROG." - execute_cmd "echo \"You must have CMake installed to compile $PROG. Please update your system to get it before installing $PROG.\"" "[0-3] Check autoconf" $SPY - DIE=1 -} - -if [ "$DIE" = "1" ] -then - exit 1 -fi - - - -######################################################################## -# Simple menu -# The options are : -# --prefix -# --debug -# --skipdart -# --help -####################################################################### - -INSTALL_TREATENED=0 -INSTALL_PATH=$PWD -for i in $* -do - if [ "${i%=*}" = "--help" ] || [ "${i%=*}" = "-h" ] - then - clear - echo "installParadiseo.sh" - echo - echo -e "\033[1mNAME\033[0m" - echo ' installParadiseo.sh - Install ParadisEO' - echo - echo -e "\033[1mSYNOPSIS\033[0m" - echo -e ' \033[1m./installParadiseo.sh\033[0m or \033[1mbash installParadiseo.sh\033[0m' - echo -e ' [\033[1m--prefix=\033[0m\033[4mPATH\033[0m] [\033[1m--debug\033[0m] [\033[1m--skipdart\033[0m] [\033[1m--home=\033[0m\033[4mHOME\033[0m] [\033[1m-h\033[0m] [\033[1m--help\033[0m]' - echo - echo -e "\033[1mDESCRIPTION\033[0m" - echo -e " \033[1m--prefix=\033[0m\033[4mPATH\033[0m" - echo -e " ParadisEO will be installed in the directory \033[0m\033[4mPATH\033[0m. The current directory is used by default." - echo - echo -e " \033[1m--debug\033[0m" - echo ' Debug mode, set warning compiler flags and run tests.' - echo - echo -e " \033[1m--skipdart\033[0m" - echo ' Use this option to avoid build/test report submission to our Dart server.' - echo - echo -e " \033[1m--home=\033[0m\033[4mHOME\033[0m" - echo -e " Using \033[0m\033[4mHOME\033[0m as your home directory. Should be used when ~ doesnt reference your home. " - echo - echo -e " \033[1m-h, --help\033[0m" - echo ' Print these useful lines.' - echo - echo -e "\033[1mAUTHOR\033[0m" - echo " Written by Thomas Legrand." - echo - echo -e "\033[1mBUGS\033[0m" - echo " Report bugs to paradiseo-bugs@lists.gforge.inria.fr." - echo - echo -e "\033[1mCOPYRIGHT\033[0m" - echo " This software is governed by the CeCILL license under French law and" - echo " abiding by the rules of distribution of free software. You can use," - echo " modify and/ or redistribute the software under the terms of the CeCILL" - echo " license as circulated by CEA, CNRS and INRIA at the following URL" - echo " http://www.cecill.info. " - echo - echo -e "\033[1mSEE ALSO\033[0m" - echo " For further help, please contact paradiseo-help@lists.gforge.inria.fr." - echo - exit - fi - if [ "${i%=*}" = "--prefix" ] - then - INSTALL_PATH=${i#*=} - fi - if [ "${i%=*}" = "--debug" ] - then - BUILD_TYPE=Debug - OPTIONNAL_CMAKE_FLAGS='-DENABLE_CMAKE_TESTING=TRUE' - CTEST_CONFIG="$CTEST_CONFIG -D ExperimentalTest" - fi - if [ "${i%=*}" = "--skipdart" ] - then - SKIP_DART="1" - fi - if [ "${i%=*}" = "--home" ] - then - HOME_PATH=${i#*=} - fi -done -####################################################################### - -### Do we have a valid home path ? -if [ ! -d $HOME_PATH ] -then - echo " Please give a valid path for your home directory (use --help for further information)" -fi - - -### Add a CTest flag depending on the "skipdart" option. -if [ ! "$SKIP_DART" = "1" ] -then - CTEST_CONFIG="$CTEST_CONFIG -D ExperimentalSubmit" -fi - -### Need the generator -BUILD_PROCESS_TYPE=0 -GENERATOR_TREATENED=0 - -while [ ! "$GENERATOR_TREATENED" = "1" ] -do - case "$BUILD_PROCESS_TYPE" in - - $P_UNIX_MAKEFILES) - BUILD_PROCESS_TYPE="$G_UNIX_MAKEFILES" - GENERATOR_TREATENED=1 - ;; - - $P_KDEVELOP3_PROJECT) - BUILD_PROCESS_TYPE="$G_KDEVELOP3_PROJECT" - GENERATOR_TREATENED=1 - COMPILE_PARADISEO=1 - ;; - - $P_XCODE_PROJECT) - BUILD_PROCESS_TYPE="$G_XCODE_PROJECT" - GENERATOR_TREATENED=1 - COMPILE_PARADISEO=1 - ;; - *) - echo - echo -e ' \033[40m\033[1;33m### Please select the kind of "Makefile" you want to generate: ### \033[0m ' - echo - echo " $P_UNIX_MAKEFILES : Unix Makefiles (standard Makefiles)" - echo " $P_KDEVELOP3_PROJECT : KDevelop3 project files" - echo " $P_XCODE_PROJECT : Xcode project files" - read BUILD_PROCESS_TYPE - ;; - esac -done -libxml2="$INSTALL_PATH/libxml2/lib" -binxml2="$INSTALL_PATH/libxml2/bin:" -mpich2="$INSTALL_PATH/mpich2/bin:" -on_uninstall -while [ ! "$INSTALL_TREATENED" = "1" ] -do - case "$INSTALL_TYPE" in - - $P_FULL_INSTALL) - - check_utils_install - - if [ "$USE_EXISTING_MPICH" = "1" ] && [ "$USE_EXISTING_LIBXML2" = "1" ] - then - THE_GOOD_INSTALL=$FULL_INSTALL_WITHOUT_LIBXML2_MPICH2 - - elif [ "$USE_EXISTING_MPICH" = "1" ] && [ "$USE_EXISTING_LIBXML2" = "0" ] - then - THE_GOOD_INSTALL=$FULL_INSTALL_WITHOUT_MPICH - - elif [ "$USE_EXISTING_MPICH" = "0" ] && [ "$USE_EXISTING_LIBXML2" = "1" ] - then - THE_GOOD_INSTALL=$FULL_INSTALL_WITHOUT_LIBXML2 - - elif [ "$USE_EXISTING_MPICH" = "0" ] && [ "$USE_EXISTING_LIBXML2" = "0" ] - then - THE_GOOD_INSTALL=$FULL_INSTALL - else - THE_GOOD_INSTALL=$FULL_INSTALL - fi - - configuring_env - counter=0 - for step in $THE_GOOD_INSTALL - do - run_install_step $INSTALL_PATH $step $counter - on_error $? - counter=`expr $counter + 1` - done - INSTALL_TREATENED=1 - ;; - - $P_BASIC_INSTALL) - counter=0 - for step in $BASIC_INSTALL - do - run_install_step $INSTALL_PATH $step $counter - on_error $? - counter=`expr $counter + 1` - done - INSTALL_TREATENED=1 - ;; - - $P_PARALLEL_INSTALL) - - check_utils_install - - if [ "$USE_EXISTING_MPICH" = "1" ] && [ "$USE_EXISTING_LIBXML2" = "1" ] - then - THE_GOOD_PARALLEL_INSTALL=$PARALLEL_INSTALL_WITHOUT_LIBXML2_MPICH2 - - elif [ "$USE_EXISTING_MPICH" = "1" ] && [ "$USE_EXISTING_LIBXML2" = "0" ] - then - THE_GOOD_PARALLEL_INSTALL=$PARALLEL_INSTALL_WITHOUT_MPICH2 - - elif [ "$USE_EXISTING_MPICH" = "0" ] && [ "$USE_EXISTING_LIBXML2" = "1" ] - then - THE_GOOD_PARALLEL_INSTALL=$PARALLEL_INSTALL_WITHOUT_LIBXML2 - - elif [ "$USE_EXISTING_MPICH" = "0" ] && [ "$USE_EXISTING_LIBXML2" = "0" ] - then - THE_GOOD_PARALLEL_INSTALL=$PARALLEL_INSTALL - else - THE_GOOD_PARALLEL_INSTALL=$PARALLEL_INSTALL - fi - - counter=0 - for step in $THE_GOOD_PARALLEL_INSTALL - do - run_install_step $INSTALL_PATH $step $counter - on_error $? - counter=`expr $counter + 1` - done - INSTALL_TREATENED=1 - ;; - - $P_RM_PREVIOUS_INSTALLL) - counter=0 - for step in $RM_PREVIOUS_INSTALL - do - run_install_step $INSTALL_PATH $step $counter - on_error $? - counter=`expr $counter + 1` - done - INSTALL_TREATENED=1 - ;; - - $P_EXIT_INSTALL) - INSTALL_TREATENED=1 - ;; - - *) - echo - echo -e ' \033[40m\033[1;33m### Please select your install for ParadisEO : ### \033[0m ' - echo - echo " 1 : Basic install: only EO,MO and MOEO components will be installed." - echo " 2 : ParadisEO-PEO install. I've already installed the basic version and I want to install ParadisEO-PEO" - echo " 3 : Full install (all the components : EO,MO,MOEO and PEO)" - echo " 4 : Remove a previous install of ParadisEO located in $INSTALL_PATH" - echo " 5 : Exit install" - read INSTALL_TYPE - ;; - esac -done \ No newline at end of file diff --git a/trunk/lib/libxml2-2.7.3.tar.gz b/trunk/lib/libxml2-2.7.3.tar.gz deleted file mode 100755 index 9f4b3ad82..000000000 Binary files a/trunk/lib/libxml2-2.7.3.tar.gz and /dev/null differ diff --git a/trunk/lib/mpich2-1.0.8.tar.gz b/trunk/lib/mpich2-1.0.8.tar.gz deleted file mode 100644 index bfb89fad5..000000000 Binary files a/trunk/lib/mpich2-1.0.8.tar.gz and /dev/null differ diff --git a/trunk/mo/CMakeLists.txt b/trunk/mo/CMakeLists.txt new file mode 100644 index 000000000..cd0f07dfb --- /dev/null +++ b/trunk/mo/CMakeLists.txt @@ -0,0 +1,17 @@ +###################################################################################### +### 0) Include subdirectories +###################################################################################### + +add_subdirectory(doc) +add_subdirectory(src) + +if(ENABLE_CMAKE_TESTING) + add_subdirectory(test) +endif(ENABLE_CMAKE_TESTING) + +if(ENABLE_CMAKE_EXAMPLE) + if(${CMAKE_VERBOSE_MAKEFILE}) + message("MO Examples :") + endif(${CMAKE_VERBOSE_MAKEFILE}) + add_subdirectory(tutorial) +endif(ENABLE_CMAKE_EXAMPLE) diff --git a/trunk/mo/doc/CMakeLists.txt b/trunk/mo/doc/CMakeLists.txt new file mode 100755 index 000000000..0d2692603 --- /dev/null +++ b/trunk/mo/doc/CMakeLists.txt @@ -0,0 +1,37 @@ +###################################################################################### +### 0) Documentation +###################################################################################### + +if(DOXYGEN_FOUND) + # Directory where the generation will be launched + set(MO_DOC_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Documentation directory") + # Name of the doxygene configuration file + set(MO_DOC_CONFIG_FILE "mo.doxyfile" CACHE PATH "Documentation configuration file") + if(DOXYGEN_EXECUTABLE) + # Creating the custom target + if(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) + add_custom_target(doc-mo + COMMAND ${DOXYGEN_EXECUTABLE} ${MO_DOC_CONFIG_FILE} 2> /dev/null > /dev/null + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + else(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) + add_custom_target(doc-mo + COMMAND ${DOXYGEN_EXECUTABLE} ${MO_DOC_CONFIG_FILE} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + endif(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) + endif(DOXYGEN_EXECUTABLE) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${MO_DOC_CONFIG_FILE}.cmake" + "${MO_DOC_DIR}/${MO_DOC_CONFIG_FILE}") + install( + DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DESTINATION share${INSTALL_SUB_DIR}/mo COMPONENT doc + PATTERN "CMakeFiles" EXCLUDE + PATTERN "cmake_install.cmake" EXCLUDE + PATTERN "CTestTestfile.cmake" EXCLUDE + PATTERN "Makefile" EXCLUDE + PATTERN "mo.cfg" EXCLUDE + PATTERN "mo.doxytag" EXCLUDE + ) +else(DOXYGEN_FOUND) + message(STATUS "Unable to generate the documentation, Doxygen package not found") +endif(DOXYGEN_FOUND) + diff --git a/trunk/paradiseo-mo/doc/index.h b/trunk/mo/doc/index.h similarity index 100% rename from trunk/paradiseo-mo/doc/index.h rename to trunk/mo/doc/index.h diff --git a/trunk/paradiseo-mo/doc/mo.doxyfile.cmake b/trunk/mo/doc/mo.doxyfile.cmake similarity index 99% rename from trunk/paradiseo-mo/doc/mo.doxyfile.cmake rename to trunk/mo/doc/mo.doxyfile.cmake index 19a13b947..406b4e042 100644 --- a/trunk/paradiseo-mo/doc/mo.doxyfile.cmake +++ b/trunk/mo/doc/mo.doxyfile.cmake @@ -25,7 +25,7 @@ DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. -PROJECT_NAME = @PACKAGE_NAME@ +PROJECT_NAME = @MO_MODULE_NAME@ # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or @@ -38,7 +38,7 @@ PROJECT_NUMBER = @PACKAGE_VERSION@ # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doc +OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@ # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -480,7 +480,7 @@ SHOW_USED_FILES = YES # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. -SHOW_DIRECTORIES = YES +#SHOW_DIRECTORIES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the @@ -809,7 +809,7 @@ HTML_STYLESHEET = # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. -HTML_ALIGN_MEMBERS = YES +#HTML_ALIGN_MEMBERS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the @@ -1300,7 +1300,7 @@ TAGFILES = @EO_BIN_DIR@/doc/eo.doxytag=http://eodev.sourceforge.ne # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = @CMAKE_BINARY_DIR@/doc/mo.doxytag +GENERATE_TAGFILE = @CMAKE_CURRENT_BINARY_DIR@/mo.doxytag # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes diff --git a/trunk/mo/src/CMakeLists.txt b/trunk/mo/src/CMakeLists.txt new file mode 100644 index 000000000..4dbb54274 --- /dev/null +++ b/trunk/mo/src/CMakeLists.txt @@ -0,0 +1,17 @@ +###################################################################################### +### 0) Look for headers +###################################################################################### + +file(GLOB HDRS *.h mo) +install(FILES ${HDRS} DESTINATION include${INSTALL_SUB_DIR}/mo COMPONENT headers) + +###################################################################################### +### 1) Install directories +###################################################################################### + +install(DIRECTORY acceptCrit algo comparator continuator coolingSchedule eval eplorer memory neighborhood perturb problems sampling + DESTINATION include${INSTALL_SUB_DIR}/mo + COMPONENT headers + FILES_MATCHING PATTERN "*.h" + ) + diff --git a/trunk/paradiseo-mo/src/acceptCrit/moAcceptanceCriterion.h b/trunk/mo/src/acceptCrit/moAcceptanceCriterion.h similarity index 100% rename from trunk/paradiseo-mo/src/acceptCrit/moAcceptanceCriterion.h rename to trunk/mo/src/acceptCrit/moAcceptanceCriterion.h diff --git a/trunk/paradiseo-mo/src/acceptCrit/moAlwaysAcceptCrit.h b/trunk/mo/src/acceptCrit/moAlwaysAcceptCrit.h similarity index 100% rename from trunk/paradiseo-mo/src/acceptCrit/moAlwaysAcceptCrit.h rename to trunk/mo/src/acceptCrit/moAlwaysAcceptCrit.h diff --git a/trunk/paradiseo-mo/src/acceptCrit/moBetterAcceptCrit.h b/trunk/mo/src/acceptCrit/moBetterAcceptCrit.h similarity index 100% rename from trunk/paradiseo-mo/src/acceptCrit/moBetterAcceptCrit.h rename to trunk/mo/src/acceptCrit/moBetterAcceptCrit.h diff --git a/trunk/paradiseo-mo/src/algo/eoDummyMonOp.h b/trunk/mo/src/algo/eoDummyMonOp.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/eoDummyMonOp.h rename to trunk/mo/src/algo/eoDummyMonOp.h diff --git a/trunk/paradiseo-mo/src/algo/moDummyLS.h b/trunk/mo/src/algo/moDummyLS.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/moDummyLS.h rename to trunk/mo/src/algo/moDummyLS.h diff --git a/trunk/paradiseo-mo/src/algo/moFirstImprHC.h b/trunk/mo/src/algo/moFirstImprHC.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/moFirstImprHC.h rename to trunk/mo/src/algo/moFirstImprHC.h diff --git a/trunk/paradiseo-mo/src/algo/moILS.h b/trunk/mo/src/algo/moILS.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/moILS.h rename to trunk/mo/src/algo/moILS.h diff --git a/trunk/paradiseo-mo/src/algo/moLocalSearch.h b/trunk/mo/src/algo/moLocalSearch.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/moLocalSearch.h rename to trunk/mo/src/algo/moLocalSearch.h diff --git a/trunk/paradiseo-mo/src/algo/moMetropolisHasting.h b/trunk/mo/src/algo/moMetropolisHasting.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/moMetropolisHasting.h rename to trunk/mo/src/algo/moMetropolisHasting.h diff --git a/trunk/paradiseo-mo/src/algo/moNeutralHC.h b/trunk/mo/src/algo/moNeutralHC.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/moNeutralHC.h rename to trunk/mo/src/algo/moNeutralHC.h diff --git a/trunk/paradiseo-mo/src/algo/moRandomBestHC.h b/trunk/mo/src/algo/moRandomBestHC.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/moRandomBestHC.h rename to trunk/mo/src/algo/moRandomBestHC.h diff --git a/trunk/paradiseo-mo/src/algo/moRandomNeutralWalk.h b/trunk/mo/src/algo/moRandomNeutralWalk.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/moRandomNeutralWalk.h rename to trunk/mo/src/algo/moRandomNeutralWalk.h diff --git a/trunk/paradiseo-mo/src/algo/moRandomSearch.h b/trunk/mo/src/algo/moRandomSearch.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/moRandomSearch.h rename to trunk/mo/src/algo/moRandomSearch.h diff --git a/trunk/paradiseo-mo/src/algo/moRandomWalk.h b/trunk/mo/src/algo/moRandomWalk.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/moRandomWalk.h rename to trunk/mo/src/algo/moRandomWalk.h diff --git a/trunk/paradiseo-mo/src/algo/moSA.h b/trunk/mo/src/algo/moSA.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/moSA.h rename to trunk/mo/src/algo/moSA.h diff --git a/trunk/paradiseo-mo/src/algo/moSimpleHC.h b/trunk/mo/src/algo/moSimpleHC.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/moSimpleHC.h rename to trunk/mo/src/algo/moSimpleHC.h diff --git a/trunk/paradiseo-mo/src/algo/moTS.h b/trunk/mo/src/algo/moTS.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/moTS.h rename to trunk/mo/src/algo/moTS.h diff --git a/trunk/paradiseo-mo/src/algo/moVNS.h b/trunk/mo/src/algo/moVNS.h similarity index 100% rename from trunk/paradiseo-mo/src/algo/moVNS.h rename to trunk/mo/src/algo/moVNS.h diff --git a/trunk/paradiseo-mo/src/comparator/moComparator.h b/trunk/mo/src/comparator/moComparator.h similarity index 100% rename from trunk/paradiseo-mo/src/comparator/moComparator.h rename to trunk/mo/src/comparator/moComparator.h diff --git a/trunk/paradiseo-mo/src/comparator/moEqualNeighborComparator.h b/trunk/mo/src/comparator/moEqualNeighborComparator.h similarity index 100% rename from trunk/paradiseo-mo/src/comparator/moEqualNeighborComparator.h rename to trunk/mo/src/comparator/moEqualNeighborComparator.h diff --git a/trunk/paradiseo-mo/src/comparator/moEqualSolComparator.h b/trunk/mo/src/comparator/moEqualSolComparator.h similarity index 100% rename from trunk/paradiseo-mo/src/comparator/moEqualSolComparator.h rename to trunk/mo/src/comparator/moEqualSolComparator.h diff --git a/trunk/paradiseo-mo/src/comparator/moEqualSolNeighborComparator.h b/trunk/mo/src/comparator/moEqualSolNeighborComparator.h similarity index 100% rename from trunk/paradiseo-mo/src/comparator/moEqualSolNeighborComparator.h rename to trunk/mo/src/comparator/moEqualSolNeighborComparator.h diff --git a/trunk/paradiseo-mo/src/comparator/moNeighborComparator.h b/trunk/mo/src/comparator/moNeighborComparator.h similarity index 100% rename from trunk/paradiseo-mo/src/comparator/moNeighborComparator.h rename to trunk/mo/src/comparator/moNeighborComparator.h diff --git a/trunk/paradiseo-mo/src/comparator/moSolComparator.h b/trunk/mo/src/comparator/moSolComparator.h similarity index 100% rename from trunk/paradiseo-mo/src/comparator/moSolComparator.h rename to trunk/mo/src/comparator/moSolComparator.h diff --git a/trunk/paradiseo-mo/src/comparator/moSolNeighborComparator.h b/trunk/mo/src/comparator/moSolNeighborComparator.h similarity index 100% rename from trunk/paradiseo-mo/src/comparator/moSolNeighborComparator.h rename to trunk/mo/src/comparator/moSolNeighborComparator.h diff --git a/trunk/paradiseo-mo/src/continuator/moAverageFitnessNeighborStat.h b/trunk/mo/src/continuator/moAverageFitnessNeighborStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moAverageFitnessNeighborStat.h rename to trunk/mo/src/continuator/moAverageFitnessNeighborStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moBestFitnessStat.h b/trunk/mo/src/continuator/moBestFitnessStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moBestFitnessStat.h rename to trunk/mo/src/continuator/moBestFitnessStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moBestNoImproveContinuator.h b/trunk/mo/src/continuator/moBestNoImproveContinuator.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moBestNoImproveContinuator.h rename to trunk/mo/src/continuator/moBestNoImproveContinuator.h diff --git a/trunk/paradiseo-mo/src/continuator/moBestSoFarStat.h b/trunk/mo/src/continuator/moBestSoFarStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moBestSoFarStat.h rename to trunk/mo/src/continuator/moBestSoFarStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moBooleanStat.h b/trunk/mo/src/continuator/moBooleanStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moBooleanStat.h rename to trunk/mo/src/continuator/moBooleanStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moCheckpoint.h b/trunk/mo/src/continuator/moCheckpoint.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moCheckpoint.h rename to trunk/mo/src/continuator/moCheckpoint.h diff --git a/trunk/paradiseo-mo/src/continuator/moCombinedContinuator.h b/trunk/mo/src/continuator/moCombinedContinuator.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moCombinedContinuator.h rename to trunk/mo/src/continuator/moCombinedContinuator.h diff --git a/trunk/paradiseo-mo/src/continuator/moContinuator.h b/trunk/mo/src/continuator/moContinuator.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moContinuator.h rename to trunk/mo/src/continuator/moContinuator.h diff --git a/trunk/paradiseo-mo/src/continuator/moCounterMonitorSaver.h b/trunk/mo/src/continuator/moCounterMonitorSaver.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moCounterMonitorSaver.h rename to trunk/mo/src/continuator/moCounterMonitorSaver.h diff --git a/trunk/paradiseo-mo/src/continuator/moCounterStat.h b/trunk/mo/src/continuator/moCounterStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moCounterStat.h rename to trunk/mo/src/continuator/moCounterStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moDistanceStat.h b/trunk/mo/src/continuator/moDistanceStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moDistanceStat.h rename to trunk/mo/src/continuator/moDistanceStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moEvalsContinuator.h b/trunk/mo/src/continuator/moEvalsContinuator.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moEvalsContinuator.h rename to trunk/mo/src/continuator/moEvalsContinuator.h diff --git a/trunk/paradiseo-mo/src/continuator/moFitContinuator.h b/trunk/mo/src/continuator/moFitContinuator.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moFitContinuator.h rename to trunk/mo/src/continuator/moFitContinuator.h diff --git a/trunk/paradiseo-mo/src/continuator/moFitnessStat.h b/trunk/mo/src/continuator/moFitnessStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moFitnessStat.h rename to trunk/mo/src/continuator/moFitnessStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moFullEvalContinuator.h b/trunk/mo/src/continuator/moFullEvalContinuator.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moFullEvalContinuator.h rename to trunk/mo/src/continuator/moFullEvalContinuator.h diff --git a/trunk/paradiseo-mo/src/continuator/moIterContinuator.h b/trunk/mo/src/continuator/moIterContinuator.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moIterContinuator.h rename to trunk/mo/src/continuator/moIterContinuator.h diff --git a/trunk/paradiseo-mo/src/continuator/moMaxNeighborStat.h b/trunk/mo/src/continuator/moMaxNeighborStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moMaxNeighborStat.h rename to trunk/mo/src/continuator/moMaxNeighborStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moMinNeighborStat.h b/trunk/mo/src/continuator/moMinNeighborStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moMinNeighborStat.h rename to trunk/mo/src/continuator/moMinNeighborStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moMinusOneCounterStat.h b/trunk/mo/src/continuator/moMinusOneCounterStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moMinusOneCounterStat.h rename to trunk/mo/src/continuator/moMinusOneCounterStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moNbInfNeighborStat.h b/trunk/mo/src/continuator/moNbInfNeighborStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moNbInfNeighborStat.h rename to trunk/mo/src/continuator/moNbInfNeighborStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moNbSupNeighborStat.h b/trunk/mo/src/continuator/moNbSupNeighborStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moNbSupNeighborStat.h rename to trunk/mo/src/continuator/moNbSupNeighborStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moNeighborBestStat.h b/trunk/mo/src/continuator/moNeighborBestStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moNeighborBestStat.h rename to trunk/mo/src/continuator/moNeighborBestStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moNeighborEvalContinuator.h b/trunk/mo/src/continuator/moNeighborEvalContinuator.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moNeighborEvalContinuator.h rename to trunk/mo/src/continuator/moNeighborEvalContinuator.h diff --git a/trunk/paradiseo-mo/src/continuator/moNeighborFitnessStat.h b/trunk/mo/src/continuator/moNeighborFitnessStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moNeighborFitnessStat.h rename to trunk/mo/src/continuator/moNeighborFitnessStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moNeighborhoodStat.h b/trunk/mo/src/continuator/moNeighborhoodStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moNeighborhoodStat.h rename to trunk/mo/src/continuator/moNeighborhoodStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moNeutralDegreeNeighborStat.h b/trunk/mo/src/continuator/moNeutralDegreeNeighborStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moNeutralDegreeNeighborStat.h rename to trunk/mo/src/continuator/moNeutralDegreeNeighborStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moSecondMomentNeighborStat.h b/trunk/mo/src/continuator/moSecondMomentNeighborStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moSecondMomentNeighborStat.h rename to trunk/mo/src/continuator/moSecondMomentNeighborStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moSizeNeighborStat.h b/trunk/mo/src/continuator/moSizeNeighborStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moSizeNeighborStat.h rename to trunk/mo/src/continuator/moSizeNeighborStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moSolutionStat.h b/trunk/mo/src/continuator/moSolutionStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moSolutionStat.h rename to trunk/mo/src/continuator/moSolutionStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moStat.h b/trunk/mo/src/continuator/moStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moStat.h rename to trunk/mo/src/continuator/moStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moStatBase.h b/trunk/mo/src/continuator/moStatBase.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moStatBase.h rename to trunk/mo/src/continuator/moStatBase.h diff --git a/trunk/paradiseo-mo/src/continuator/moStatFromStat.h b/trunk/mo/src/continuator/moStatFromStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moStatFromStat.h rename to trunk/mo/src/continuator/moStatFromStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moStdFitnessNeighborStat.h b/trunk/mo/src/continuator/moStdFitnessNeighborStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moStdFitnessNeighborStat.h rename to trunk/mo/src/continuator/moStdFitnessNeighborStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moTimeContinuator.h b/trunk/mo/src/continuator/moTimeContinuator.h similarity index 99% rename from trunk/paradiseo-mo/src/continuator/moTimeContinuator.h rename to trunk/mo/src/continuator/moTimeContinuator.h index 2e4b4d686..513928000 100644 --- a/trunk/paradiseo-mo/src/continuator/moTimeContinuator.h +++ b/trunk/mo/src/continuator/moTimeContinuator.h @@ -30,6 +30,8 @@ Contact: paradiseo-help@lists.gforge.inria.fr #ifndef _moTimeContinuator_h #define _moTimeContinuator_h +#include + #include /** diff --git a/trunk/paradiseo-mo/src/continuator/moTrueContinuator.h b/trunk/mo/src/continuator/moTrueContinuator.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moTrueContinuator.h rename to trunk/mo/src/continuator/moTrueContinuator.h diff --git a/trunk/paradiseo-mo/src/continuator/moUnsignedStat.h b/trunk/mo/src/continuator/moUnsignedStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moUnsignedStat.h rename to trunk/mo/src/continuator/moUnsignedStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moUpdater.h b/trunk/mo/src/continuator/moUpdater.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moUpdater.h rename to trunk/mo/src/continuator/moUpdater.h diff --git a/trunk/paradiseo-mo/src/continuator/moValueParamContinuator.h b/trunk/mo/src/continuator/moValueParamContinuator.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moValueParamContinuator.h rename to trunk/mo/src/continuator/moValueParamContinuator.h diff --git a/trunk/paradiseo-mo/src/continuator/moValueStat.h b/trunk/mo/src/continuator/moValueStat.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moValueStat.h rename to trunk/mo/src/continuator/moValueStat.h diff --git a/trunk/paradiseo-mo/src/continuator/moVectorMonitor.h b/trunk/mo/src/continuator/moVectorMonitor.h similarity index 100% rename from trunk/paradiseo-mo/src/continuator/moVectorMonitor.h rename to trunk/mo/src/continuator/moVectorMonitor.h diff --git a/trunk/paradiseo-mo/src/coolingSchedule/moCoolingSchedule.h b/trunk/mo/src/coolingSchedule/moCoolingSchedule.h similarity index 100% rename from trunk/paradiseo-mo/src/coolingSchedule/moCoolingSchedule.h rename to trunk/mo/src/coolingSchedule/moCoolingSchedule.h diff --git a/trunk/paradiseo-mo/src/coolingSchedule/moDynSpanCoolingSchedule.h b/trunk/mo/src/coolingSchedule/moDynSpanCoolingSchedule.h similarity index 100% rename from trunk/paradiseo-mo/src/coolingSchedule/moDynSpanCoolingSchedule.h rename to trunk/mo/src/coolingSchedule/moDynSpanCoolingSchedule.h diff --git a/trunk/paradiseo-mo/src/coolingSchedule/moSimpleCoolingSchedule.h b/trunk/mo/src/coolingSchedule/moSimpleCoolingSchedule.h similarity index 100% rename from trunk/paradiseo-mo/src/coolingSchedule/moSimpleCoolingSchedule.h rename to trunk/mo/src/coolingSchedule/moSimpleCoolingSchedule.h diff --git a/trunk/paradiseo-mo/src/eval/moDoubleIncrEvaluation.h b/trunk/mo/src/eval/moDoubleIncrEvaluation.h similarity index 100% rename from trunk/paradiseo-mo/src/eval/moDoubleIncrEvaluation.h rename to trunk/mo/src/eval/moDoubleIncrEvaluation.h diff --git a/trunk/paradiseo-mo/src/eval/moDoubleIncrNeighborhoodEval.h b/trunk/mo/src/eval/moDoubleIncrNeighborhoodEval.h similarity index 100% rename from trunk/paradiseo-mo/src/eval/moDoubleIncrNeighborhoodEval.h rename to trunk/mo/src/eval/moDoubleIncrNeighborhoodEval.h diff --git a/trunk/paradiseo-mo/src/eval/moDummyEval.h b/trunk/mo/src/eval/moDummyEval.h similarity index 100% rename from trunk/paradiseo-mo/src/eval/moDummyEval.h rename to trunk/mo/src/eval/moDummyEval.h diff --git a/trunk/paradiseo-mo/src/eval/moEval.h b/trunk/mo/src/eval/moEval.h similarity index 100% rename from trunk/paradiseo-mo/src/eval/moEval.h rename to trunk/mo/src/eval/moEval.h diff --git a/trunk/paradiseo-mo/src/eval/moEvalCounter.h b/trunk/mo/src/eval/moEvalCounter.h similarity index 100% rename from trunk/paradiseo-mo/src/eval/moEvalCounter.h rename to trunk/mo/src/eval/moEvalCounter.h diff --git a/trunk/paradiseo-mo/src/eval/moFullEvalByCopy.h b/trunk/mo/src/eval/moFullEvalByCopy.h similarity index 100% rename from trunk/paradiseo-mo/src/eval/moFullEvalByCopy.h rename to trunk/mo/src/eval/moFullEvalByCopy.h diff --git a/trunk/paradiseo-mo/src/eval/moFullEvalByModif.h b/trunk/mo/src/eval/moFullEvalByModif.h similarity index 100% rename from trunk/paradiseo-mo/src/eval/moFullEvalByModif.h rename to trunk/mo/src/eval/moFullEvalByModif.h diff --git a/trunk/paradiseo-mo/src/eval/moNeighborhoodEvaluation.h b/trunk/mo/src/eval/moNeighborhoodEvaluation.h similarity index 100% rename from trunk/paradiseo-mo/src/eval/moNeighborhoodEvaluation.h rename to trunk/mo/src/eval/moNeighborhoodEvaluation.h diff --git a/trunk/paradiseo-mo/src/explorer/moDummyExplorer.h b/trunk/mo/src/explorer/moDummyExplorer.h similarity index 100% rename from trunk/paradiseo-mo/src/explorer/moDummyExplorer.h rename to trunk/mo/src/explorer/moDummyExplorer.h diff --git a/trunk/paradiseo-mo/src/explorer/moFirstImprHCexplorer.h b/trunk/mo/src/explorer/moFirstImprHCexplorer.h similarity index 100% rename from trunk/paradiseo-mo/src/explorer/moFirstImprHCexplorer.h rename to trunk/mo/src/explorer/moFirstImprHCexplorer.h diff --git a/trunk/paradiseo-mo/src/explorer/moILSexplorer.h b/trunk/mo/src/explorer/moILSexplorer.h similarity index 100% rename from trunk/paradiseo-mo/src/explorer/moILSexplorer.h rename to trunk/mo/src/explorer/moILSexplorer.h diff --git a/trunk/paradiseo-mo/src/explorer/moMetropolisHastingExplorer.h b/trunk/mo/src/explorer/moMetropolisHastingExplorer.h similarity index 100% rename from trunk/paradiseo-mo/src/explorer/moMetropolisHastingExplorer.h rename to trunk/mo/src/explorer/moMetropolisHastingExplorer.h diff --git a/trunk/paradiseo-mo/src/explorer/moNeighborhoodExplorer.h b/trunk/mo/src/explorer/moNeighborhoodExplorer.h similarity index 100% rename from trunk/paradiseo-mo/src/explorer/moNeighborhoodExplorer.h rename to trunk/mo/src/explorer/moNeighborhoodExplorer.h diff --git a/trunk/paradiseo-mo/src/explorer/moNeutralHCexplorer.h b/trunk/mo/src/explorer/moNeutralHCexplorer.h similarity index 100% rename from trunk/paradiseo-mo/src/explorer/moNeutralHCexplorer.h rename to trunk/mo/src/explorer/moNeutralHCexplorer.h diff --git a/trunk/paradiseo-mo/src/explorer/moRandomBestHCexplorer.h b/trunk/mo/src/explorer/moRandomBestHCexplorer.h similarity index 100% rename from trunk/paradiseo-mo/src/explorer/moRandomBestHCexplorer.h rename to trunk/mo/src/explorer/moRandomBestHCexplorer.h diff --git a/trunk/paradiseo-mo/src/explorer/moRandomNeutralWalkExplorer.h b/trunk/mo/src/explorer/moRandomNeutralWalkExplorer.h similarity index 100% rename from trunk/paradiseo-mo/src/explorer/moRandomNeutralWalkExplorer.h rename to trunk/mo/src/explorer/moRandomNeutralWalkExplorer.h diff --git a/trunk/paradiseo-mo/src/explorer/moRandomSearchExplorer.h b/trunk/mo/src/explorer/moRandomSearchExplorer.h similarity index 100% rename from trunk/paradiseo-mo/src/explorer/moRandomSearchExplorer.h rename to trunk/mo/src/explorer/moRandomSearchExplorer.h diff --git a/trunk/paradiseo-mo/src/explorer/moRandomWalkExplorer.h b/trunk/mo/src/explorer/moRandomWalkExplorer.h similarity index 100% rename from trunk/paradiseo-mo/src/explorer/moRandomWalkExplorer.h rename to trunk/mo/src/explorer/moRandomWalkExplorer.h diff --git a/trunk/paradiseo-mo/src/explorer/moSAexplorer.h b/trunk/mo/src/explorer/moSAexplorer.h similarity index 100% rename from trunk/paradiseo-mo/src/explorer/moSAexplorer.h rename to trunk/mo/src/explorer/moSAexplorer.h diff --git a/trunk/paradiseo-mo/src/explorer/moSimpleHCexplorer.h b/trunk/mo/src/explorer/moSimpleHCexplorer.h similarity index 100% rename from trunk/paradiseo-mo/src/explorer/moSimpleHCexplorer.h rename to trunk/mo/src/explorer/moSimpleHCexplorer.h diff --git a/trunk/paradiseo-mo/src/explorer/moTSexplorer.h b/trunk/mo/src/explorer/moTSexplorer.h similarity index 100% rename from trunk/paradiseo-mo/src/explorer/moTSexplorer.h rename to trunk/mo/src/explorer/moTSexplorer.h diff --git a/trunk/paradiseo-mo/src/explorer/moVNSexplorer.h b/trunk/mo/src/explorer/moVNSexplorer.h similarity index 100% rename from trunk/paradiseo-mo/src/explorer/moVNSexplorer.h rename to trunk/mo/src/explorer/moVNSexplorer.h diff --git a/trunk/paradiseo-mo/src/memory/moAspiration.h b/trunk/mo/src/memory/moAspiration.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moAspiration.h rename to trunk/mo/src/memory/moAspiration.h diff --git a/trunk/paradiseo-mo/src/memory/moBestImprAspiration.h b/trunk/mo/src/memory/moBestImprAspiration.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moBestImprAspiration.h rename to trunk/mo/src/memory/moBestImprAspiration.h diff --git a/trunk/paradiseo-mo/src/memory/moCountMoveMemory.h b/trunk/mo/src/memory/moCountMoveMemory.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moCountMoveMemory.h rename to trunk/mo/src/memory/moCountMoveMemory.h diff --git a/trunk/paradiseo-mo/src/memory/moDiversification.h b/trunk/mo/src/memory/moDiversification.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moDiversification.h rename to trunk/mo/src/memory/moDiversification.h diff --git a/trunk/paradiseo-mo/src/memory/moDummyDiversification.h b/trunk/mo/src/memory/moDummyDiversification.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moDummyDiversification.h rename to trunk/mo/src/memory/moDummyDiversification.h diff --git a/trunk/paradiseo-mo/src/memory/moDummyIntensification.h b/trunk/mo/src/memory/moDummyIntensification.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moDummyIntensification.h rename to trunk/mo/src/memory/moDummyIntensification.h diff --git a/trunk/paradiseo-mo/src/memory/moDummyMemory.h b/trunk/mo/src/memory/moDummyMemory.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moDummyMemory.h rename to trunk/mo/src/memory/moDummyMemory.h diff --git a/trunk/paradiseo-mo/src/memory/moIndexedVectorTabuList.h b/trunk/mo/src/memory/moIndexedVectorTabuList.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moIndexedVectorTabuList.h rename to trunk/mo/src/memory/moIndexedVectorTabuList.h diff --git a/trunk/paradiseo-mo/src/memory/moIntensification.h b/trunk/mo/src/memory/moIntensification.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moIntensification.h rename to trunk/mo/src/memory/moIntensification.h diff --git a/trunk/paradiseo-mo/src/memory/moMemory.h b/trunk/mo/src/memory/moMemory.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moMemory.h rename to trunk/mo/src/memory/moMemory.h diff --git a/trunk/paradiseo-mo/src/memory/moMonOpDiversification.h b/trunk/mo/src/memory/moMonOpDiversification.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moMonOpDiversification.h rename to trunk/mo/src/memory/moMonOpDiversification.h diff --git a/trunk/paradiseo-mo/src/memory/moNeighborVectorTabuList.h b/trunk/mo/src/memory/moNeighborVectorTabuList.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moNeighborVectorTabuList.h rename to trunk/mo/src/memory/moNeighborVectorTabuList.h diff --git a/trunk/paradiseo-mo/src/memory/moRndIndexedVectorTabuList.h b/trunk/mo/src/memory/moRndIndexedVectorTabuList.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moRndIndexedVectorTabuList.h rename to trunk/mo/src/memory/moRndIndexedVectorTabuList.h diff --git a/trunk/paradiseo-mo/src/memory/moSolVectorTabuList.h b/trunk/mo/src/memory/moSolVectorTabuList.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moSolVectorTabuList.h rename to trunk/mo/src/memory/moSolVectorTabuList.h diff --git a/trunk/paradiseo-mo/src/memory/moTabuList.h b/trunk/mo/src/memory/moTabuList.h similarity index 100% rename from trunk/paradiseo-mo/src/memory/moTabuList.h rename to trunk/mo/src/memory/moTabuList.h diff --git a/trunk/paradiseo-mo/src/mo b/trunk/mo/src/mo similarity index 100% rename from trunk/paradiseo-mo/src/mo rename to trunk/mo/src/mo diff --git a/trunk/paradiseo-mo/src/mo.h b/trunk/mo/src/mo.h similarity index 100% rename from trunk/paradiseo-mo/src/mo.h rename to trunk/mo/src/mo.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moBackableNeighbor.h b/trunk/mo/src/neighborhood/moBackableNeighbor.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moBackableNeighbor.h rename to trunk/mo/src/neighborhood/moBackableNeighbor.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moBackwardVectorVNSelection.h b/trunk/mo/src/neighborhood/moBackwardVectorVNSelection.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moBackwardVectorVNSelection.h rename to trunk/mo/src/neighborhood/moBackwardVectorVNSelection.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moDummyNeighbor.h b/trunk/mo/src/neighborhood/moDummyNeighbor.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moDummyNeighbor.h rename to trunk/mo/src/neighborhood/moDummyNeighbor.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moDummyNeighborhood.h b/trunk/mo/src/neighborhood/moDummyNeighborhood.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moDummyNeighborhood.h rename to trunk/mo/src/neighborhood/moDummyNeighborhood.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moEvaluatedNeighborhood.h b/trunk/mo/src/neighborhood/moEvaluatedNeighborhood.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moEvaluatedNeighborhood.h rename to trunk/mo/src/neighborhood/moEvaluatedNeighborhood.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moForwardVectorVNSelection.h b/trunk/mo/src/neighborhood/moForwardVectorVNSelection.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moForwardVectorVNSelection.h rename to trunk/mo/src/neighborhood/moForwardVectorVNSelection.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moIndexNeighbor.h b/trunk/mo/src/neighborhood/moIndexNeighbor.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moIndexNeighbor.h rename to trunk/mo/src/neighborhood/moIndexNeighbor.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moIndexNeighborhood.h b/trunk/mo/src/neighborhood/moIndexNeighborhood.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moIndexNeighborhood.h rename to trunk/mo/src/neighborhood/moIndexNeighborhood.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moNeighbor.h b/trunk/mo/src/neighborhood/moNeighbor.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moNeighbor.h rename to trunk/mo/src/neighborhood/moNeighbor.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moNeighborhood.h b/trunk/mo/src/neighborhood/moNeighborhood.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moNeighborhood.h rename to trunk/mo/src/neighborhood/moNeighborhood.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moOrderNeighborhood.h b/trunk/mo/src/neighborhood/moOrderNeighborhood.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moOrderNeighborhood.h rename to trunk/mo/src/neighborhood/moOrderNeighborhood.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moRndNeighborhood.h b/trunk/mo/src/neighborhood/moRndNeighborhood.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moRndNeighborhood.h rename to trunk/mo/src/neighborhood/moRndNeighborhood.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moRndVectorVNSelection.h b/trunk/mo/src/neighborhood/moRndVectorVNSelection.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moRndVectorVNSelection.h rename to trunk/mo/src/neighborhood/moRndVectorVNSelection.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moRndWithReplNeighborhood.h b/trunk/mo/src/neighborhood/moRndWithReplNeighborhood.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moRndWithReplNeighborhood.h rename to trunk/mo/src/neighborhood/moRndWithReplNeighborhood.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moRndWithoutReplNeighborhood.h b/trunk/mo/src/neighborhood/moRndWithoutReplNeighborhood.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moRndWithoutReplNeighborhood.h rename to trunk/mo/src/neighborhood/moRndWithoutReplNeighborhood.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moVariableNeighborhoodSelection.h b/trunk/mo/src/neighborhood/moVariableNeighborhoodSelection.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moVariableNeighborhoodSelection.h rename to trunk/mo/src/neighborhood/moVariableNeighborhoodSelection.h diff --git a/trunk/paradiseo-mo/src/neighborhood/moVectorVNSelection.h b/trunk/mo/src/neighborhood/moVectorVNSelection.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moVectorVNSelection.h rename to trunk/mo/src/neighborhood/moVectorVNSelection.h diff --git a/trunk/paradiseo-mo/src/perturb/moLocalSearchInit.h b/trunk/mo/src/perturb/moLocalSearchInit.h similarity index 100% rename from trunk/paradiseo-mo/src/perturb/moLocalSearchInit.h rename to trunk/mo/src/perturb/moLocalSearchInit.h diff --git a/trunk/paradiseo-mo/src/perturb/moMonOpPerturb.h b/trunk/mo/src/perturb/moMonOpPerturb.h similarity index 100% rename from trunk/paradiseo-mo/src/perturb/moMonOpPerturb.h rename to trunk/mo/src/perturb/moMonOpPerturb.h diff --git a/trunk/paradiseo-mo/src/perturb/moNeighborhoodPerturb.h b/trunk/mo/src/perturb/moNeighborhoodPerturb.h similarity index 100% rename from trunk/paradiseo-mo/src/perturb/moNeighborhoodPerturb.h rename to trunk/mo/src/perturb/moNeighborhoodPerturb.h diff --git a/trunk/paradiseo-mo/src/perturb/moPerturbation.h b/trunk/mo/src/perturb/moPerturbation.h similarity index 100% rename from trunk/paradiseo-mo/src/perturb/moPerturbation.h rename to trunk/mo/src/perturb/moPerturbation.h diff --git a/trunk/paradiseo-mo/src/perturb/moRestartPerturb.h b/trunk/mo/src/perturb/moRestartPerturb.h similarity index 100% rename from trunk/paradiseo-mo/src/perturb/moRestartPerturb.h rename to trunk/mo/src/perturb/moRestartPerturb.h diff --git a/trunk/paradiseo-mo/src/perturb/moSolInit.h b/trunk/mo/src/perturb/moSolInit.h similarity index 100% rename from trunk/paradiseo-mo/src/perturb/moSolInit.h rename to trunk/mo/src/perturb/moSolInit.h diff --git a/trunk/paradiseo-mo/src/problems/bitString/moBitNeighbor.h b/trunk/mo/src/problems/bitString/moBitNeighbor.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/bitString/moBitNeighbor.h rename to trunk/mo/src/problems/bitString/moBitNeighbor.h diff --git a/trunk/paradiseo-mo/src/problems/bitString/moBitsNeighbor.h b/trunk/mo/src/problems/bitString/moBitsNeighbor.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/bitString/moBitsNeighbor.h rename to trunk/mo/src/problems/bitString/moBitsNeighbor.h diff --git a/trunk/paradiseo-mo/src/problems/bitString/moBitsNeighborhood.h b/trunk/mo/src/problems/bitString/moBitsNeighborhood.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/bitString/moBitsNeighborhood.h rename to trunk/mo/src/problems/bitString/moBitsNeighborhood.h diff --git a/trunk/paradiseo-mo/src/problems/bitString/moBitsWithReplNeighborhood.h b/trunk/mo/src/problems/bitString/moBitsWithReplNeighborhood.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/bitString/moBitsWithReplNeighborhood.h rename to trunk/mo/src/problems/bitString/moBitsWithReplNeighborhood.h diff --git a/trunk/paradiseo-mo/src/problems/bitString/moBitsWithoutReplNeighborhood.h b/trunk/mo/src/problems/bitString/moBitsWithoutReplNeighborhood.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/bitString/moBitsWithoutReplNeighborhood.h rename to trunk/mo/src/problems/bitString/moBitsWithoutReplNeighborhood.h diff --git a/trunk/paradiseo-mo/src/problems/eval/moMaxSATincrEval.h b/trunk/mo/src/problems/eval/moMaxSATincrEval.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/eval/moMaxSATincrEval.h rename to trunk/mo/src/problems/eval/moMaxSATincrEval.h diff --git a/trunk/paradiseo-mo/src/problems/eval/moOneMaxIncrEval.h b/trunk/mo/src/problems/eval/moOneMaxIncrEval.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/eval/moOneMaxIncrEval.h rename to trunk/mo/src/problems/eval/moOneMaxIncrEval.h diff --git a/trunk/paradiseo-mo/src/problems/eval/moQAPIncrEval.h b/trunk/mo/src/problems/eval/moQAPIncrEval.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/eval/moQAPIncrEval.h rename to trunk/mo/src/problems/eval/moQAPIncrEval.h diff --git a/trunk/paradiseo-mo/src/problems/eval/moRoyalRoadIncrEval.h b/trunk/mo/src/problems/eval/moRoyalRoadIncrEval.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/eval/moRoyalRoadIncrEval.h rename to trunk/mo/src/problems/eval/moRoyalRoadIncrEval.h diff --git a/trunk/paradiseo-mo/src/problems/eval/moUBQPBitsIncrEval.h b/trunk/mo/src/problems/eval/moUBQPBitsIncrEval.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/eval/moUBQPBitsIncrEval.h rename to trunk/mo/src/problems/eval/moUBQPBitsIncrEval.h diff --git a/trunk/paradiseo-mo/src/problems/eval/moUBQPSimpleIncrEval.h b/trunk/mo/src/problems/eval/moUBQPSimpleIncrEval.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/eval/moUBQPSimpleIncrEval.h rename to trunk/mo/src/problems/eval/moUBQPSimpleIncrEval.h diff --git a/trunk/paradiseo-mo/src/problems/eval/moUBQPdoubleIncrEvaluation.h b/trunk/mo/src/problems/eval/moUBQPdoubleIncrEvaluation.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/eval/moUBQPdoubleIncrEvaluation.h rename to trunk/mo/src/problems/eval/moUBQPdoubleIncrEvaluation.h diff --git a/trunk/paradiseo-mo/src/problems/permutation/moIndexedSwapNeighbor.h b/trunk/mo/src/problems/permutation/moIndexedSwapNeighbor.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/permutation/moIndexedSwapNeighbor.h rename to trunk/mo/src/problems/permutation/moIndexedSwapNeighbor.h diff --git a/trunk/paradiseo-mo/src/problems/permutation/moShiftNeighbor.h b/trunk/mo/src/problems/permutation/moShiftNeighbor.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/permutation/moShiftNeighbor.h rename to trunk/mo/src/problems/permutation/moShiftNeighbor.h diff --git a/trunk/paradiseo-mo/src/problems/permutation/moSwapNeighbor.h b/trunk/mo/src/problems/permutation/moSwapNeighbor.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/permutation/moSwapNeighbor.h rename to trunk/mo/src/problems/permutation/moSwapNeighbor.h diff --git a/trunk/paradiseo-mo/src/problems/permutation/moSwapNeighborhood.h b/trunk/mo/src/problems/permutation/moSwapNeighborhood.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/permutation/moSwapNeighborhood.h rename to trunk/mo/src/problems/permutation/moSwapNeighborhood.h diff --git a/trunk/paradiseo-mo/src/problems/permutation/moTwoOptExNeighbor.h b/trunk/mo/src/problems/permutation/moTwoOptExNeighbor.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/permutation/moTwoOptExNeighbor.h rename to trunk/mo/src/problems/permutation/moTwoOptExNeighbor.h diff --git a/trunk/paradiseo-mo/src/problems/permutation/moTwoOptExNeighborhood.h b/trunk/mo/src/problems/permutation/moTwoOptExNeighborhood.h similarity index 100% rename from trunk/paradiseo-mo/src/problems/permutation/moTwoOptExNeighborhood.h rename to trunk/mo/src/problems/permutation/moTwoOptExNeighborhood.h diff --git a/trunk/paradiseo-mo/src/sampling/moAdaptiveWalkSampling.h b/trunk/mo/src/sampling/moAdaptiveWalkSampling.h similarity index 99% rename from trunk/paradiseo-mo/src/sampling/moAdaptiveWalkSampling.h rename to trunk/mo/src/sampling/moAdaptiveWalkSampling.h index 72101dfcb..14d99ac44 100644 --- a/trunk/paradiseo-mo/src/sampling/moAdaptiveWalkSampling.h +++ b/trunk/mo/src/sampling/moAdaptiveWalkSampling.h @@ -85,7 +85,7 @@ public: checkpoint.add(lengthStat); // add the solution into statistics - add(solStat); + this->add(solStat); } /** diff --git a/trunk/paradiseo-mo/src/sampling/moAutocorrelationSampling.h b/trunk/mo/src/sampling/moAutocorrelationSampling.h similarity index 100% rename from trunk/paradiseo-mo/src/sampling/moAutocorrelationSampling.h rename to trunk/mo/src/sampling/moAutocorrelationSampling.h diff --git a/trunk/paradiseo-mo/src/sampling/moDensityOfStatesSampling.h b/trunk/mo/src/sampling/moDensityOfStatesSampling.h similarity index 100% rename from trunk/paradiseo-mo/src/sampling/moDensityOfStatesSampling.h rename to trunk/mo/src/sampling/moDensityOfStatesSampling.h diff --git a/trunk/paradiseo-mo/src/sampling/moFDCsampling.h b/trunk/mo/src/sampling/moFDCsampling.h similarity index 99% rename from trunk/paradiseo-mo/src/sampling/moFDCsampling.h rename to trunk/mo/src/sampling/moFDCsampling.h index 22a224759..f3ed422c1 100644 --- a/trunk/paradiseo-mo/src/sampling/moFDCsampling.h +++ b/trunk/mo/src/sampling/moFDCsampling.h @@ -75,7 +75,7 @@ public: moSampling(_init, * new moRandomSearch(_init, _fullEval, _nbSol), fitnessStat), distStat(_dist, _refSol) { - add(distStat); + this->add(distStat); } /** diff --git a/trunk/paradiseo-mo/src/sampling/moFitnessCloudSampling.h b/trunk/mo/src/sampling/moFitnessCloudSampling.h similarity index 100% rename from trunk/paradiseo-mo/src/sampling/moFitnessCloudSampling.h rename to trunk/mo/src/sampling/moFitnessCloudSampling.h diff --git a/trunk/paradiseo-mo/src/sampling/moHillClimberSampling.h b/trunk/mo/src/sampling/moHillClimberSampling.h similarity index 99% rename from trunk/paradiseo-mo/src/sampling/moHillClimberSampling.h rename to trunk/mo/src/sampling/moHillClimberSampling.h index e3e277bf7..7ca2fb538 100644 --- a/trunk/paradiseo-mo/src/sampling/moHillClimberSampling.h +++ b/trunk/mo/src/sampling/moHillClimberSampling.h @@ -85,7 +85,7 @@ public: checkpoint.add(lengthStat); // add the solution into statistics - add(solStat); + this->add(solStat); } /** diff --git a/trunk/paradiseo-mo/src/sampling/moMHBestFitnessCloudSampling.h b/trunk/mo/src/sampling/moMHBestFitnessCloudSampling.h similarity index 99% rename from trunk/paradiseo-mo/src/sampling/moMHBestFitnessCloudSampling.h rename to trunk/mo/src/sampling/moMHBestFitnessCloudSampling.h index d68044498..ebba8a3b9 100644 --- a/trunk/paradiseo-mo/src/sampling/moMHBestFitnessCloudSampling.h +++ b/trunk/mo/src/sampling/moMHBestFitnessCloudSampling.h @@ -101,7 +101,7 @@ public: checkpoint->add(*monitorVec[0]); // one random neighbor - add(neighborBestStat); + this->add(neighborBestStat); } protected: diff --git a/trunk/paradiseo-mo/src/sampling/moMHRndFitnessCloudSampling.h b/trunk/mo/src/sampling/moMHRndFitnessCloudSampling.h similarity index 99% rename from trunk/paradiseo-mo/src/sampling/moMHRndFitnessCloudSampling.h rename to trunk/mo/src/sampling/moMHRndFitnessCloudSampling.h index f72d6ff42..292d42344 100644 --- a/trunk/paradiseo-mo/src/sampling/moMHRndFitnessCloudSampling.h +++ b/trunk/mo/src/sampling/moMHRndFitnessCloudSampling.h @@ -101,7 +101,7 @@ public: checkpoint->add(*monitorVec[0]); // one random neighbor - add(neighborFitnessStat); + this->add(neighborFitnessStat); } protected: diff --git a/trunk/paradiseo-mo/src/sampling/moNeutralDegreeSampling.h b/trunk/mo/src/sampling/moNeutralDegreeSampling.h similarity index 97% rename from trunk/paradiseo-mo/src/sampling/moNeutralDegreeSampling.h rename to trunk/mo/src/sampling/moNeutralDegreeSampling.h index bc7386ba2..397a3bd43 100644 --- a/trunk/paradiseo-mo/src/sampling/moNeutralDegreeSampling.h +++ b/trunk/mo/src/sampling/moNeutralDegreeSampling.h @@ -77,8 +77,8 @@ public: neighborhoodStat(_neighborhood, _eval), ndStat(neighborhoodStat) { - add(neighborhoodStat, false); - add(ndStat); + this->add(neighborhoodStat, false); + this->add(ndStat); } /** @@ -102,8 +102,8 @@ public: neighborhoodStat(_neighborhood, _eval, _neighborComparator, _solNeighborComparator), ndStat(neighborhoodStat) { - add(neighborhoodStat, false); - add(ndStat); + this->add(neighborhoodStat, false); + this->add(ndStat); } /** diff --git a/trunk/paradiseo-mo/src/sampling/moNeutralWalkSampling.h b/trunk/mo/src/sampling/moNeutralWalkSampling.h similarity index 94% rename from trunk/paradiseo-mo/src/sampling/moNeutralWalkSampling.h rename to trunk/mo/src/sampling/moNeutralWalkSampling.h index 258792fe0..789dd8fed 100644 --- a/trunk/paradiseo-mo/src/sampling/moNeutralWalkSampling.h +++ b/trunk/mo/src/sampling/moNeutralWalkSampling.h @@ -108,16 +108,16 @@ public: sizeStat(neighborhoodStat), ndStat(neighborhoodStat) { - add(neighborhoodStat, false); - add(distStat); - add(minStat); - add(averageStat); - add(stdStat); - add(maxStat); - add(sizeStat); - add(nbInfStat); - add(ndStat); - add(nbSupStat); + this->add(neighborhoodStat, false); + this->add(distStat); + this->add(minStat); + this->add(averageStat); + this->add(stdStat); + this->add(maxStat); + this->add(sizeStat); + this->add(nbInfStat); + this->add(ndStat); + this->add(nbSupStat); } /** diff --git a/trunk/paradiseo-mo/src/sampling/moRndBestFitnessCloudSampling.h b/trunk/mo/src/sampling/moRndBestFitnessCloudSampling.h similarity index 99% rename from trunk/paradiseo-mo/src/sampling/moRndBestFitnessCloudSampling.h rename to trunk/mo/src/sampling/moRndBestFitnessCloudSampling.h index 12826c512..371aead94 100644 --- a/trunk/paradiseo-mo/src/sampling/moRndBestFitnessCloudSampling.h +++ b/trunk/mo/src/sampling/moRndBestFitnessCloudSampling.h @@ -99,7 +99,7 @@ public: checkpoint->add(*monitorVec[0]); // one random neighbor - add(neighborBestStat); + this->add(neighborBestStat); } protected: diff --git a/trunk/paradiseo-mo/src/sampling/moRndRndFitnessCloudSampling.h b/trunk/mo/src/sampling/moRndRndFitnessCloudSampling.h similarity index 99% rename from trunk/paradiseo-mo/src/sampling/moRndRndFitnessCloudSampling.h rename to trunk/mo/src/sampling/moRndRndFitnessCloudSampling.h index ab778d69d..db6ddb984 100644 --- a/trunk/paradiseo-mo/src/sampling/moRndRndFitnessCloudSampling.h +++ b/trunk/mo/src/sampling/moRndRndFitnessCloudSampling.h @@ -99,7 +99,7 @@ public: checkpoint->add(*monitorVec[0]); // one random neighbor - add(neighborFitnessStat); + this->add(neighborFitnessStat); } protected: diff --git a/trunk/paradiseo-mo/src/sampling/moSampling.h b/trunk/mo/src/sampling/moSampling.h similarity index 100% rename from trunk/paradiseo-mo/src/sampling/moSampling.h rename to trunk/mo/src/sampling/moSampling.h diff --git a/trunk/paradiseo-mo/src/sampling/moStatistics.h b/trunk/mo/src/sampling/moStatistics.h similarity index 100% rename from trunk/paradiseo-mo/src/sampling/moStatistics.h rename to trunk/mo/src/sampling/moStatistics.h diff --git a/trunk/paradiseo-mo/test/CMakeLists.txt b/trunk/mo/test/CMakeLists.txt similarity index 65% rename from trunk/paradiseo-mo/test/CMakeLists.txt rename to trunk/mo/test/CMakeLists.txt index 5a3401f2e..1e600f3fc 100644 --- a/trunk/paradiseo-mo/test/CMakeLists.txt +++ b/trunk/mo/test/CMakeLists.txt @@ -1,37 +1,17 @@ -############################################################################### -## -## CMakeLists file for ParadisEO-MO/test -## -############################################################################### - - ###################################################################################### -### 1) Include the sources +### 0) Include headers ###################################################################################### -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${MO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${PROBLEMS_SRC_DIR}) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${EO_SRC_DIR}/src) +include_directories(${MO_SRC_DIR}/src) +include_directories(${PROBLEMS_SRC_DIR}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) ###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries +### 1) Define test list ###################################################################################### -LINK_DIRECTORIES(${EO_BIN_DIR}/lib) - -###################################################################################### - -###################################################################################### -### 3) Define your targets and link the librairies -###################################################################################### - - - -SET (TEST_LIST +set (TEST_LIST t-moAdaptiveWalkSampling t-moNeighbor t-moBitNeighbor @@ -116,26 +96,17 @@ SET (TEST_LIST t-moRndIndexedVectorTabuList t-moDynSpanCoolingSchedule ) - -FOREACH (test ${TEST_LIST}) - SET ("T_${test}_SOURCES" "${test}.cpp") -ENDFOREACH (test) - - -IF(ENABLE_CMAKE_TESTING) - - # Add the tests - FOREACH (test ${TEST_LIST}) - ADD_EXECUTABLE(${test} ${T_${test}_SOURCES}) - ADD_TEST(${test} ${test}) - ENDFOREACH (test) - - # Link the librairies - FOREACH (test ${TEST_LIST}) - TARGET_LINK_LIBRARIES(${test} ga es eoutils eo) - ENDFOREACH (test) - -ENDIF(ENABLE_CMAKE_TESTING) ###################################################################################### +### 3) Create each test +###################################################################################### + +foreach (test ${TEST_LIST}) + set ("T_${test}_SOURCES" "${test}.cpp") + add_executable(${test} ${T_${test}_SOURCES}) + add_test(${test} ${test}) + target_link_libraries(${test} ga es eoutils eo) + install(TARGETS ${test} RUNTIME DESTINATION share${INSTALL_SUB_DIR}/mo/test COMPONENT tests) +endforeach (test) + diff --git a/trunk/paradiseo-mo/test/moTestClass.h b/trunk/mo/test/moTestClass.h similarity index 100% rename from trunk/paradiseo-mo/test/moTestClass.h rename to trunk/mo/test/moTestClass.h diff --git a/trunk/paradiseo-mo/test/t-moAdaptiveWalkSampling.cpp b/trunk/mo/test/t-moAdaptiveWalkSampling.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moAdaptiveWalkSampling.cpp rename to trunk/mo/test/t-moAdaptiveWalkSampling.cpp diff --git a/trunk/paradiseo-mo/test/t-moAlwaysAcceptCrit.cpp b/trunk/mo/test/t-moAlwaysAcceptCrit.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moAlwaysAcceptCrit.cpp rename to trunk/mo/test/t-moAlwaysAcceptCrit.cpp diff --git a/trunk/paradiseo-mo/test/t-moAutocorrelationSampling.cpp b/trunk/mo/test/t-moAutocorrelationSampling.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moAutocorrelationSampling.cpp rename to trunk/mo/test/t-moAutocorrelationSampling.cpp diff --git a/trunk/paradiseo-mo/test/t-moBestImprAspiration.cpp b/trunk/mo/test/t-moBestImprAspiration.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moBestImprAspiration.cpp rename to trunk/mo/test/t-moBestImprAspiration.cpp diff --git a/trunk/paradiseo-mo/test/t-moBetterAcceptCrit.cpp b/trunk/mo/test/t-moBetterAcceptCrit.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moBetterAcceptCrit.cpp rename to trunk/mo/test/t-moBetterAcceptCrit.cpp diff --git a/trunk/paradiseo-mo/test/t-moBitNeighbor.cpp b/trunk/mo/test/t-moBitNeighbor.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moBitNeighbor.cpp rename to trunk/mo/test/t-moBitNeighbor.cpp diff --git a/trunk/paradiseo-mo/test/t-moCheckpoint.cpp b/trunk/mo/test/t-moCheckpoint.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moCheckpoint.cpp rename to trunk/mo/test/t-moCheckpoint.cpp diff --git a/trunk/paradiseo-mo/test/t-moCombinedContinuator.cpp b/trunk/mo/test/t-moCombinedContinuator.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moCombinedContinuator.cpp rename to trunk/mo/test/t-moCombinedContinuator.cpp diff --git a/trunk/paradiseo-mo/test/t-moCountMoveMemory.cpp b/trunk/mo/test/t-moCountMoveMemory.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moCountMoveMemory.cpp rename to trunk/mo/test/t-moCountMoveMemory.cpp diff --git a/trunk/paradiseo-mo/test/t-moCounterMonitorSaver.cpp b/trunk/mo/test/t-moCounterMonitorSaver.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moCounterMonitorSaver.cpp rename to trunk/mo/test/t-moCounterMonitorSaver.cpp diff --git a/trunk/paradiseo-mo/test/t-moCounterStat.cpp b/trunk/mo/test/t-moCounterStat.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moCounterStat.cpp rename to trunk/mo/test/t-moCounterStat.cpp diff --git a/trunk/paradiseo-mo/test/t-moDensityOfStatesSampling.cpp b/trunk/mo/test/t-moDensityOfStatesSampling.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moDensityOfStatesSampling.cpp rename to trunk/mo/test/t-moDensityOfStatesSampling.cpp diff --git a/trunk/paradiseo-mo/test/t-moDistanceStat.cpp b/trunk/mo/test/t-moDistanceStat.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moDistanceStat.cpp rename to trunk/mo/test/t-moDistanceStat.cpp diff --git a/trunk/paradiseo-mo/test/t-moDummyEval.cpp b/trunk/mo/test/t-moDummyEval.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moDummyEval.cpp rename to trunk/mo/test/t-moDummyEval.cpp diff --git a/trunk/paradiseo-mo/test/t-moDummyExplorer.cpp b/trunk/mo/test/t-moDummyExplorer.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moDummyExplorer.cpp rename to trunk/mo/test/t-moDummyExplorer.cpp diff --git a/trunk/paradiseo-mo/test/t-moDummyLS.cpp b/trunk/mo/test/t-moDummyLS.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moDummyLS.cpp rename to trunk/mo/test/t-moDummyLS.cpp diff --git a/trunk/paradiseo-mo/test/t-moDummyMemory.cpp b/trunk/mo/test/t-moDummyMemory.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moDummyMemory.cpp rename to trunk/mo/test/t-moDummyMemory.cpp diff --git a/trunk/paradiseo-mo/test/t-moDummyNeighbor.cpp b/trunk/mo/test/t-moDummyNeighbor.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moDummyNeighbor.cpp rename to trunk/mo/test/t-moDummyNeighbor.cpp diff --git a/trunk/paradiseo-mo/test/t-moDummyNeighborhood.cpp b/trunk/mo/test/t-moDummyNeighborhood.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moDummyNeighborhood.cpp rename to trunk/mo/test/t-moDummyNeighborhood.cpp diff --git a/trunk/paradiseo-mo/test/t-moDynSpanCoolingSchedule.cpp b/trunk/mo/test/t-moDynSpanCoolingSchedule.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moDynSpanCoolingSchedule.cpp rename to trunk/mo/test/t-moDynSpanCoolingSchedule.cpp diff --git a/trunk/paradiseo-mo/test/t-moEvalCounter.cpp b/trunk/mo/test/t-moEvalCounter.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moEvalCounter.cpp rename to trunk/mo/test/t-moEvalCounter.cpp diff --git a/trunk/paradiseo-mo/test/t-moFDCsampling.cpp b/trunk/mo/test/t-moFDCsampling.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moFDCsampling.cpp rename to trunk/mo/test/t-moFDCsampling.cpp diff --git a/trunk/paradiseo-mo/test/t-moFirstImprHC.cpp b/trunk/mo/test/t-moFirstImprHC.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moFirstImprHC.cpp rename to trunk/mo/test/t-moFirstImprHC.cpp diff --git a/trunk/paradiseo-mo/test/t-moFirstImprHCexplorer.cpp b/trunk/mo/test/t-moFirstImprHCexplorer.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moFirstImprHCexplorer.cpp rename to trunk/mo/test/t-moFirstImprHCexplorer.cpp diff --git a/trunk/paradiseo-mo/test/t-moFitContinuator.cpp b/trunk/mo/test/t-moFitContinuator.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moFitContinuator.cpp rename to trunk/mo/test/t-moFitContinuator.cpp diff --git a/trunk/paradiseo-mo/test/t-moFitnessCloudSampling.cpp b/trunk/mo/test/t-moFitnessCloudSampling.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moFitnessCloudSampling.cpp rename to trunk/mo/test/t-moFitnessCloudSampling.cpp diff --git a/trunk/paradiseo-mo/test/t-moFitnessStat.cpp b/trunk/mo/test/t-moFitnessStat.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moFitnessStat.cpp rename to trunk/mo/test/t-moFitnessStat.cpp diff --git a/trunk/paradiseo-mo/test/t-moFullEvalByCopy.cpp b/trunk/mo/test/t-moFullEvalByCopy.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moFullEvalByCopy.cpp rename to trunk/mo/test/t-moFullEvalByCopy.cpp diff --git a/trunk/paradiseo-mo/test/t-moFullEvalByModif.cpp b/trunk/mo/test/t-moFullEvalByModif.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moFullEvalByModif.cpp rename to trunk/mo/test/t-moFullEvalByModif.cpp diff --git a/trunk/paradiseo-mo/test/t-moFullEvalContinuator.cpp b/trunk/mo/test/t-moFullEvalContinuator.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moFullEvalContinuator.cpp rename to trunk/mo/test/t-moFullEvalContinuator.cpp diff --git a/trunk/paradiseo-mo/test/t-moHillClimberSampling.cpp b/trunk/mo/test/t-moHillClimberSampling.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moHillClimberSampling.cpp rename to trunk/mo/test/t-moHillClimberSampling.cpp diff --git a/trunk/paradiseo-mo/test/t-moILS.cpp b/trunk/mo/test/t-moILS.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moILS.cpp rename to trunk/mo/test/t-moILS.cpp diff --git a/trunk/paradiseo-mo/test/t-moILSexplorer.cpp b/trunk/mo/test/t-moILSexplorer.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moILSexplorer.cpp rename to trunk/mo/test/t-moILSexplorer.cpp diff --git a/trunk/paradiseo-mo/test/t-moIndexedVectorTabuList.cpp b/trunk/mo/test/t-moIndexedVectorTabuList.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moIndexedVectorTabuList.cpp rename to trunk/mo/test/t-moIndexedVectorTabuList.cpp diff --git a/trunk/paradiseo-mo/test/t-moIterContinuator.cpp b/trunk/mo/test/t-moIterContinuator.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moIterContinuator.cpp rename to trunk/mo/test/t-moIterContinuator.cpp diff --git a/trunk/paradiseo-mo/test/t-moLocalSearch.cpp b/trunk/mo/test/t-moLocalSearch.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moLocalSearch.cpp rename to trunk/mo/test/t-moLocalSearch.cpp diff --git a/trunk/paradiseo-mo/test/t-moLocalSearchInit.cpp b/trunk/mo/test/t-moLocalSearchInit.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moLocalSearchInit.cpp rename to trunk/mo/test/t-moLocalSearchInit.cpp diff --git a/trunk/paradiseo-mo/test/t-moMetropolisHasting.cpp b/trunk/mo/test/t-moMetropolisHasting.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moMetropolisHasting.cpp rename to trunk/mo/test/t-moMetropolisHasting.cpp diff --git a/trunk/paradiseo-mo/test/t-moMetropolisHastingExplorer.cpp b/trunk/mo/test/t-moMetropolisHastingExplorer.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moMetropolisHastingExplorer.cpp rename to trunk/mo/test/t-moMetropolisHastingExplorer.cpp diff --git a/trunk/paradiseo-mo/test/t-moMinusOneCounterStat.cpp b/trunk/mo/test/t-moMinusOneCounterStat.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moMinusOneCounterStat.cpp rename to trunk/mo/test/t-moMinusOneCounterStat.cpp diff --git a/trunk/paradiseo-mo/test/t-moMonOpDiversification.cpp b/trunk/mo/test/t-moMonOpDiversification.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moMonOpDiversification.cpp rename to trunk/mo/test/t-moMonOpDiversification.cpp diff --git a/trunk/paradiseo-mo/test/t-moMonOpPerturb.cpp b/trunk/mo/test/t-moMonOpPerturb.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moMonOpPerturb.cpp rename to trunk/mo/test/t-moMonOpPerturb.cpp diff --git a/trunk/paradiseo-mo/test/t-moNeighbor.cpp b/trunk/mo/test/t-moNeighbor.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moNeighbor.cpp rename to trunk/mo/test/t-moNeighbor.cpp diff --git a/trunk/paradiseo-mo/test/t-moNeighborBestStat.cpp b/trunk/mo/test/t-moNeighborBestStat.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moNeighborBestStat.cpp rename to trunk/mo/test/t-moNeighborBestStat.cpp diff --git a/trunk/paradiseo-mo/test/t-moNeighborComparator.cpp b/trunk/mo/test/t-moNeighborComparator.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moNeighborComparator.cpp rename to trunk/mo/test/t-moNeighborComparator.cpp diff --git a/trunk/paradiseo-mo/test/t-moNeighborEvalContinuator.cpp b/trunk/mo/test/t-moNeighborEvalContinuator.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moNeighborEvalContinuator.cpp rename to trunk/mo/test/t-moNeighborEvalContinuator.cpp diff --git a/trunk/paradiseo-mo/test/t-moNeighborFitnessStat.cpp b/trunk/mo/test/t-moNeighborFitnessStat.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moNeighborFitnessStat.cpp rename to trunk/mo/test/t-moNeighborFitnessStat.cpp diff --git a/trunk/paradiseo-mo/test/t-moNeighborVectorTabuList.cpp b/trunk/mo/test/t-moNeighborVectorTabuList.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moNeighborVectorTabuList.cpp rename to trunk/mo/test/t-moNeighborVectorTabuList.cpp diff --git a/trunk/paradiseo-mo/test/t-moNeighborhoodPerturb.cpp b/trunk/mo/test/t-moNeighborhoodPerturb.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moNeighborhoodPerturb.cpp rename to trunk/mo/test/t-moNeighborhoodPerturb.cpp diff --git a/trunk/paradiseo-mo/test/t-moNeighborhoodStat.cpp b/trunk/mo/test/t-moNeighborhoodStat.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moNeighborhoodStat.cpp rename to trunk/mo/test/t-moNeighborhoodStat.cpp diff --git a/trunk/paradiseo-mo/test/t-moNeutralDegreeSampling.cpp b/trunk/mo/test/t-moNeutralDegreeSampling.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moNeutralDegreeSampling.cpp rename to trunk/mo/test/t-moNeutralDegreeSampling.cpp diff --git a/trunk/paradiseo-mo/test/t-moNeutralHC.cpp b/trunk/mo/test/t-moNeutralHC.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moNeutralHC.cpp rename to trunk/mo/test/t-moNeutralHC.cpp diff --git a/trunk/paradiseo-mo/test/t-moNeutralHCexplorer.cpp b/trunk/mo/test/t-moNeutralHCexplorer.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moNeutralHCexplorer.cpp rename to trunk/mo/test/t-moNeutralHCexplorer.cpp diff --git a/trunk/paradiseo-mo/test/t-moNeutralWalkSampling.cpp b/trunk/mo/test/t-moNeutralWalkSampling.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moNeutralWalkSampling.cpp rename to trunk/mo/test/t-moNeutralWalkSampling.cpp diff --git a/trunk/paradiseo-mo/test/t-moOrderNeighborhood.cpp b/trunk/mo/test/t-moOrderNeighborhood.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moOrderNeighborhood.cpp rename to trunk/mo/test/t-moOrderNeighborhood.cpp diff --git a/trunk/paradiseo-mo/test/t-moRandomBestHC.cpp b/trunk/mo/test/t-moRandomBestHC.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moRandomBestHC.cpp rename to trunk/mo/test/t-moRandomBestHC.cpp diff --git a/trunk/paradiseo-mo/test/t-moRandomBestHCexplorer.cpp b/trunk/mo/test/t-moRandomBestHCexplorer.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moRandomBestHCexplorer.cpp rename to trunk/mo/test/t-moRandomBestHCexplorer.cpp diff --git a/trunk/paradiseo-mo/test/t-moRandomNeutralWalk.cpp b/trunk/mo/test/t-moRandomNeutralWalk.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moRandomNeutralWalk.cpp rename to trunk/mo/test/t-moRandomNeutralWalk.cpp diff --git a/trunk/paradiseo-mo/test/t-moRandomNeutralWalkExplorer.cpp b/trunk/mo/test/t-moRandomNeutralWalkExplorer.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moRandomNeutralWalkExplorer.cpp rename to trunk/mo/test/t-moRandomNeutralWalkExplorer.cpp diff --git a/trunk/paradiseo-mo/test/t-moRandomSearch.cpp b/trunk/mo/test/t-moRandomSearch.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moRandomSearch.cpp rename to trunk/mo/test/t-moRandomSearch.cpp diff --git a/trunk/paradiseo-mo/test/t-moRandomSearchExplorer.cpp b/trunk/mo/test/t-moRandomSearchExplorer.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moRandomSearchExplorer.cpp rename to trunk/mo/test/t-moRandomSearchExplorer.cpp diff --git a/trunk/paradiseo-mo/test/t-moRandomWalk.cpp b/trunk/mo/test/t-moRandomWalk.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moRandomWalk.cpp rename to trunk/mo/test/t-moRandomWalk.cpp diff --git a/trunk/paradiseo-mo/test/t-moRandomWalkExplorer.cpp b/trunk/mo/test/t-moRandomWalkExplorer.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moRandomWalkExplorer.cpp rename to trunk/mo/test/t-moRandomWalkExplorer.cpp diff --git a/trunk/paradiseo-mo/test/t-moRestartPerturb.cpp b/trunk/mo/test/t-moRestartPerturb.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moRestartPerturb.cpp rename to trunk/mo/test/t-moRestartPerturb.cpp diff --git a/trunk/paradiseo-mo/test/t-moRndIndexedVectorTabuList.cpp b/trunk/mo/test/t-moRndIndexedVectorTabuList.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moRndIndexedVectorTabuList.cpp rename to trunk/mo/test/t-moRndIndexedVectorTabuList.cpp diff --git a/trunk/paradiseo-mo/test/t-moRndWithReplNeighborhood.cpp b/trunk/mo/test/t-moRndWithReplNeighborhood.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moRndWithReplNeighborhood.cpp rename to trunk/mo/test/t-moRndWithReplNeighborhood.cpp diff --git a/trunk/paradiseo-mo/test/t-moRndWithoutReplNeighborhood.cpp b/trunk/mo/test/t-moRndWithoutReplNeighborhood.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moRndWithoutReplNeighborhood.cpp rename to trunk/mo/test/t-moRndWithoutReplNeighborhood.cpp diff --git a/trunk/paradiseo-mo/test/t-moSA.cpp b/trunk/mo/test/t-moSA.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moSA.cpp rename to trunk/mo/test/t-moSA.cpp diff --git a/trunk/paradiseo-mo/test/t-moSAexplorer.cpp b/trunk/mo/test/t-moSAexplorer.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moSAexplorer.cpp rename to trunk/mo/test/t-moSAexplorer.cpp diff --git a/trunk/paradiseo-mo/test/t-moSampling.cpp b/trunk/mo/test/t-moSampling.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moSampling.cpp rename to trunk/mo/test/t-moSampling.cpp diff --git a/trunk/paradiseo-mo/test/t-moSimpleCoolingSchedule.cpp b/trunk/mo/test/t-moSimpleCoolingSchedule.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moSimpleCoolingSchedule.cpp rename to trunk/mo/test/t-moSimpleCoolingSchedule.cpp diff --git a/trunk/paradiseo-mo/test/t-moSimpleHC.cpp b/trunk/mo/test/t-moSimpleHC.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moSimpleHC.cpp rename to trunk/mo/test/t-moSimpleHC.cpp diff --git a/trunk/paradiseo-mo/test/t-moSimpleHCexplorer.cpp b/trunk/mo/test/t-moSimpleHCexplorer.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moSimpleHCexplorer.cpp rename to trunk/mo/test/t-moSimpleHCexplorer.cpp diff --git a/trunk/paradiseo-mo/test/t-moSolComparator.cpp b/trunk/mo/test/t-moSolComparator.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moSolComparator.cpp rename to trunk/mo/test/t-moSolComparator.cpp diff --git a/trunk/paradiseo-mo/test/t-moSolInit.cpp b/trunk/mo/test/t-moSolInit.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moSolInit.cpp rename to trunk/mo/test/t-moSolInit.cpp diff --git a/trunk/paradiseo-mo/test/t-moSolNeighborComparator.cpp b/trunk/mo/test/t-moSolNeighborComparator.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moSolNeighborComparator.cpp rename to trunk/mo/test/t-moSolNeighborComparator.cpp diff --git a/trunk/paradiseo-mo/test/t-moSolVectorTabuList.cpp b/trunk/mo/test/t-moSolVectorTabuList.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moSolVectorTabuList.cpp rename to trunk/mo/test/t-moSolVectorTabuList.cpp diff --git a/trunk/paradiseo-mo/test/t-moSolutionStat.cpp b/trunk/mo/test/t-moSolutionStat.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moSolutionStat.cpp rename to trunk/mo/test/t-moSolutionStat.cpp diff --git a/trunk/paradiseo-mo/test/t-moStatistics.cpp b/trunk/mo/test/t-moStatistics.cpp similarity index 99% rename from trunk/paradiseo-mo/test/t-moStatistics.cpp rename to trunk/mo/test/t-moStatistics.cpp index 98cd1e4f3..c938dd64a 100644 --- a/trunk/paradiseo-mo/test/t-moStatistics.cpp +++ b/trunk/mo/test/t-moStatistics.cpp @@ -58,7 +58,7 @@ int main() { assert(min==2); assert(max==5); assert(avg==3.5); - assert(std*std==1.25); + //assert(std*std==1.25); sampling.resize(0); diff --git a/trunk/paradiseo-mo/test/t-moTS.cpp b/trunk/mo/test/t-moTS.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moTS.cpp rename to trunk/mo/test/t-moTS.cpp diff --git a/trunk/paradiseo-mo/test/t-moTSexplorer.cpp b/trunk/mo/test/t-moTSexplorer.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moTSexplorer.cpp rename to trunk/mo/test/t-moTSexplorer.cpp diff --git a/trunk/paradiseo-mo/test/t-moTimeContinuator.cpp b/trunk/mo/test/t-moTimeContinuator.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moTimeContinuator.cpp rename to trunk/mo/test/t-moTimeContinuator.cpp diff --git a/trunk/paradiseo-mo/test/t-moTrueContinuator.cpp b/trunk/mo/test/t-moTrueContinuator.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moTrueContinuator.cpp rename to trunk/mo/test/t-moTrueContinuator.cpp diff --git a/trunk/paradiseo-mo/test/t-moVectorMonitor.cpp b/trunk/mo/test/t-moVectorMonitor.cpp similarity index 100% rename from trunk/paradiseo-mo/test/t-moVectorMonitor.cpp rename to trunk/mo/test/t-moVectorMonitor.cpp diff --git a/trunk/mo/tutorial/CMakeLists.txt b/trunk/mo/tutorial/CMakeLists.txt new file mode 100644 index 000000000..fb2801eb7 --- /dev/null +++ b/trunk/mo/tutorial/CMakeLists.txt @@ -0,0 +1,13 @@ +###################################################################################### +### 0) Include lessons subdirectories +###################################################################################### + +add_subdirectory(Lesson1) +add_subdirectory(Lesson2) +add_subdirectory(Lesson3) +add_subdirectory(Lesson4) +add_subdirectory(Lesson5) +add_subdirectory(Lesson6) +add_subdirectory(Lesson7) +add_subdirectory(Lesson9) + diff --git a/trunk/mo/tutorial/Lesson1/CMakeLists.txt b/trunk/mo/tutorial/Lesson1/CMakeLists.txt new file mode 100644 index 000000000..ae558df58 --- /dev/null +++ b/trunk/mo/tutorial/Lesson1/CMakeLists.txt @@ -0,0 +1,33 @@ +# Lesson 1 + +###################################################################################### +### 0) Define files +###################################################################################### + +set(files + lesson1_simpleHC + lesson1_firstImprHC + lesson1_randomBestHC + lesson1_neutralHC + lesson1_iterContinuator + lesson1_fitContinuator + lesson1_fullEvalContinuator + lesson1_evalContinuator + lesson1_combinedContinuator + firstImprHC_maxSAT + ) + +###################################################################################### +### 1) Create the lesson +###################################################################################### + +add_lesson(mo Lesson1 "${files}") + +###################################################################################### +### 2) Include dependencies +###################################################################################### + +include_directories(${EO_SRC_DIR}/src + ${MO_SRC_DIR}/src + ${PROBLEMS_SRC_DIR}) + diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/firstImprHC_maxSAT.cpp b/trunk/mo/tutorial/Lesson1/firstImprHC_maxSAT.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/firstImprHC_maxSAT.cpp rename to trunk/mo/tutorial/Lesson1/firstImprHC_maxSAT.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/firstImprHC_maxSAT.param b/trunk/mo/tutorial/Lesson1/firstImprHC_maxSAT.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/firstImprHC_maxSAT.param rename to trunk/mo/tutorial/Lesson1/firstImprHC_maxSAT.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_combinedContinuator.cpp b/trunk/mo/tutorial/Lesson1/lesson1_combinedContinuator.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_combinedContinuator.cpp rename to trunk/mo/tutorial/Lesson1/lesson1_combinedContinuator.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_combinedContinuator.param b/trunk/mo/tutorial/Lesson1/lesson1_combinedContinuator.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_combinedContinuator.param rename to trunk/mo/tutorial/Lesson1/lesson1_combinedContinuator.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_evalContinuator.cpp b/trunk/mo/tutorial/Lesson1/lesson1_evalContinuator.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_evalContinuator.cpp rename to trunk/mo/tutorial/Lesson1/lesson1_evalContinuator.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_evalContinuator.param b/trunk/mo/tutorial/Lesson1/lesson1_evalContinuator.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_evalContinuator.param rename to trunk/mo/tutorial/Lesson1/lesson1_evalContinuator.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_firstImprHC.cpp b/trunk/mo/tutorial/Lesson1/lesson1_firstImprHC.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_firstImprHC.cpp rename to trunk/mo/tutorial/Lesson1/lesson1_firstImprHC.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_firstImprHC.param b/trunk/mo/tutorial/Lesson1/lesson1_firstImprHC.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_firstImprHC.param rename to trunk/mo/tutorial/Lesson1/lesson1_firstImprHC.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_fitContinuator.cpp b/trunk/mo/tutorial/Lesson1/lesson1_fitContinuator.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_fitContinuator.cpp rename to trunk/mo/tutorial/Lesson1/lesson1_fitContinuator.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_fitContinuator.param b/trunk/mo/tutorial/Lesson1/lesson1_fitContinuator.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_fitContinuator.param rename to trunk/mo/tutorial/Lesson1/lesson1_fitContinuator.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_fullEvalContinuator.cpp b/trunk/mo/tutorial/Lesson1/lesson1_fullEvalContinuator.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_fullEvalContinuator.cpp rename to trunk/mo/tutorial/Lesson1/lesson1_fullEvalContinuator.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_fullEvalContinuator.param b/trunk/mo/tutorial/Lesson1/lesson1_fullEvalContinuator.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_fullEvalContinuator.param rename to trunk/mo/tutorial/Lesson1/lesson1_fullEvalContinuator.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_iterContinuator.cpp b/trunk/mo/tutorial/Lesson1/lesson1_iterContinuator.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_iterContinuator.cpp rename to trunk/mo/tutorial/Lesson1/lesson1_iterContinuator.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_iterContinuator.param b/trunk/mo/tutorial/Lesson1/lesson1_iterContinuator.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_iterContinuator.param rename to trunk/mo/tutorial/Lesson1/lesson1_iterContinuator.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_neutralHC.cpp b/trunk/mo/tutorial/Lesson1/lesson1_neutralHC.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_neutralHC.cpp rename to trunk/mo/tutorial/Lesson1/lesson1_neutralHC.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_neutralHC.param b/trunk/mo/tutorial/Lesson1/lesson1_neutralHC.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_neutralHC.param rename to trunk/mo/tutorial/Lesson1/lesson1_neutralHC.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_randomBestHC.cpp b/trunk/mo/tutorial/Lesson1/lesson1_randomBestHC.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_randomBestHC.cpp rename to trunk/mo/tutorial/Lesson1/lesson1_randomBestHC.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_randomBestHC.param b/trunk/mo/tutorial/Lesson1/lesson1_randomBestHC.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_randomBestHC.param rename to trunk/mo/tutorial/Lesson1/lesson1_randomBestHC.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_simpleHC.cpp b/trunk/mo/tutorial/Lesson1/lesson1_simpleHC.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_simpleHC.cpp rename to trunk/mo/tutorial/Lesson1/lesson1_simpleHC.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_simpleHC.param b/trunk/mo/tutorial/Lesson1/lesson1_simpleHC.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson1/lesson1_simpleHC.param rename to trunk/mo/tutorial/Lesson1/lesson1_simpleHC.param diff --git a/trunk/mo/tutorial/Lesson2/CMakeLists.txt b/trunk/mo/tutorial/Lesson2/CMakeLists.txt new file mode 100644 index 000000000..2dcb7a917 --- /dev/null +++ b/trunk/mo/tutorial/Lesson2/CMakeLists.txt @@ -0,0 +1,21 @@ +# Lesson 2 + +###################################################################################### +### 0) Define files +###################################################################################### + +set(files testNeighborhood) + +###################################################################################### +### 1) Create the lesson +###################################################################################### + +add_lesson(mo Lesson2 "${files}") + +###################################################################################### +### 2) Include dependencies +###################################################################################### + +include_directories(${EO_SRC_DIR}/src + ${MO_SRC_DIR}/src + ${PROBLEMS_SRC_DIR}) diff --git a/trunk/paradiseo-mo/tutorial/Lesson2/testNeighborhood.cpp b/trunk/mo/tutorial/Lesson2/testNeighborhood.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson2/testNeighborhood.cpp rename to trunk/mo/tutorial/Lesson2/testNeighborhood.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson2/testNeighborhood.param b/trunk/mo/tutorial/Lesson2/testNeighborhood.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson2/testNeighborhood.param rename to trunk/mo/tutorial/Lesson2/testNeighborhood.param diff --git a/trunk/mo/tutorial/Lesson3/CMakeLists.txt b/trunk/mo/tutorial/Lesson3/CMakeLists.txt new file mode 100644 index 000000000..c4cbca429 --- /dev/null +++ b/trunk/mo/tutorial/Lesson3/CMakeLists.txt @@ -0,0 +1,23 @@ +# Lesson 3 + +###################################################################################### +### 0) Define files +###################################################################################### + +set(files testSimulatedAnnealing) + +###################################################################################### +### 1) Create the lesson +###################################################################################### + +add_lesson(mo Lesson3 "${files}") + +###################################################################################### +### 2) Include dependencies +###################################################################################### + +include_directories(${EO_SRC_DIR}/src + ${MO_SRC_DIR}/src + ${PROBLEMS_SRC_DIR}) + + diff --git a/trunk/paradiseo-mo/tutorial/Lesson3/testSimulatedAnnealing.cpp b/trunk/mo/tutorial/Lesson3/testSimulatedAnnealing.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson3/testSimulatedAnnealing.cpp rename to trunk/mo/tutorial/Lesson3/testSimulatedAnnealing.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson3/testSimulatedAnnealing.param b/trunk/mo/tutorial/Lesson3/testSimulatedAnnealing.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson3/testSimulatedAnnealing.param rename to trunk/mo/tutorial/Lesson3/testSimulatedAnnealing.param diff --git a/trunk/mo/tutorial/Lesson4/CMakeLists.txt b/trunk/mo/tutorial/Lesson4/CMakeLists.txt new file mode 100644 index 000000000..82858237d --- /dev/null +++ b/trunk/mo/tutorial/Lesson4/CMakeLists.txt @@ -0,0 +1,22 @@ +# Lesson 4 + +###################################################################################### +### 0) Define files +###################################################################################### + +set(files testSimpleTS) + +###################################################################################### +### 1) Create the lesson +###################################################################################### + +add_lesson(mo Lesson4 "${files}") + +###################################################################################### +### 2) Include dependencies +###################################################################################### + +include_directories(${EO_SRC_DIR}/src + ${MO_SRC_DIR}/src + ${PROBLEMS_SRC_DIR}) + diff --git a/trunk/paradiseo-mo/tutorial/Lesson4/testSimpleTS.cpp b/trunk/mo/tutorial/Lesson4/testSimpleTS.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson4/testSimpleTS.cpp rename to trunk/mo/tutorial/Lesson4/testSimpleTS.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson4/testSimpleTS.param b/trunk/mo/tutorial/Lesson4/testSimpleTS.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson4/testSimpleTS.param rename to trunk/mo/tutorial/Lesson4/testSimpleTS.param diff --git a/trunk/mo/tutorial/Lesson5/CMakeLists.txt b/trunk/mo/tutorial/Lesson5/CMakeLists.txt new file mode 100644 index 000000000..7c5c9bdc3 --- /dev/null +++ b/trunk/mo/tutorial/Lesson5/CMakeLists.txt @@ -0,0 +1,23 @@ +# Lesson 5 + +###################################################################################### +### 0) Define files +###################################################################################### + +set(files testILS) + +###################################################################################### +### 1) Create the lesson +###################################################################################### + +add_lesson(mo Lesson5 "${files}") + +###################################################################################### +### 2) Include dependencies +###################################################################################### + +include_directories(${EO_SRC_DIR}/src + ${MO_SRC_DIR}/src + ${PROBLEMS_SRC_DIR}) + + diff --git a/trunk/paradiseo-mo/tutorial/Lesson5/testILS.cpp b/trunk/mo/tutorial/Lesson5/testILS.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson5/testILS.cpp rename to trunk/mo/tutorial/Lesson5/testILS.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson5/testILS.param b/trunk/mo/tutorial/Lesson5/testILS.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson5/testILS.param rename to trunk/mo/tutorial/Lesson5/testILS.param diff --git a/trunk/mo/tutorial/Lesson6/CMakeLists.txt b/trunk/mo/tutorial/Lesson6/CMakeLists.txt new file mode 100644 index 000000000..0b1d01455 --- /dev/null +++ b/trunk/mo/tutorial/Lesson6/CMakeLists.txt @@ -0,0 +1,33 @@ +# Lesson 6 + +###################################################################################### +### 0) Define files +###################################################################################### + +set(files + adaptiveWalks + autocorrelation + densityOfStates + fdc + fitnessCloud + neutralDegree + neutralWalk + sampling + testMetropolisHasting + testRandomNeutralWalk + testRandomWalk + ) + +###################################################################################### +### 1) Create the lesson +###################################################################################### + +add_lesson(mo Lesson6 "${files}") + +###################################################################################### +### 2) Include dependencies +###################################################################################### + +include_directories(${EO_SRC_DIR}/src + ${MO_SRC_DIR}/src + ${PROBLEMS_SRC_DIR}) diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/adaptiveWalks.cpp b/trunk/mo/tutorial/Lesson6/adaptiveWalks.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/adaptiveWalks.cpp rename to trunk/mo/tutorial/Lesson6/adaptiveWalks.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/adaptiveWalks.param b/trunk/mo/tutorial/Lesson6/adaptiveWalks.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/adaptiveWalks.param rename to trunk/mo/tutorial/Lesson6/adaptiveWalks.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/autocorrelation.cpp b/trunk/mo/tutorial/Lesson6/autocorrelation.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/autocorrelation.cpp rename to trunk/mo/tutorial/Lesson6/autocorrelation.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/autocorrelation.param b/trunk/mo/tutorial/Lesson6/autocorrelation.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/autocorrelation.param rename to trunk/mo/tutorial/Lesson6/autocorrelation.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/densityOfStates.cpp b/trunk/mo/tutorial/Lesson6/densityOfStates.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/densityOfStates.cpp rename to trunk/mo/tutorial/Lesson6/densityOfStates.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/densityOfStates.param b/trunk/mo/tutorial/Lesson6/densityOfStates.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/densityOfStates.param rename to trunk/mo/tutorial/Lesson6/densityOfStates.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/fdc.cpp b/trunk/mo/tutorial/Lesson6/fdc.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/fdc.cpp rename to trunk/mo/tutorial/Lesson6/fdc.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/fdc.param b/trunk/mo/tutorial/Lesson6/fdc.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/fdc.param rename to trunk/mo/tutorial/Lesson6/fdc.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/fitnessCloud.cpp b/trunk/mo/tutorial/Lesson6/fitnessCloud.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/fitnessCloud.cpp rename to trunk/mo/tutorial/Lesson6/fitnessCloud.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/fitnessCloud.param b/trunk/mo/tutorial/Lesson6/fitnessCloud.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/fitnessCloud.param rename to trunk/mo/tutorial/Lesson6/fitnessCloud.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/neutralDegree.cpp b/trunk/mo/tutorial/Lesson6/neutralDegree.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/neutralDegree.cpp rename to trunk/mo/tutorial/Lesson6/neutralDegree.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/neutralDegree.param b/trunk/mo/tutorial/Lesson6/neutralDegree.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/neutralDegree.param rename to trunk/mo/tutorial/Lesson6/neutralDegree.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/neutralWalk.cpp b/trunk/mo/tutorial/Lesson6/neutralWalk.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/neutralWalk.cpp rename to trunk/mo/tutorial/Lesson6/neutralWalk.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/neutralWalk.param b/trunk/mo/tutorial/Lesson6/neutralWalk.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/neutralWalk.param rename to trunk/mo/tutorial/Lesson6/neutralWalk.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/sampling.cpp b/trunk/mo/tutorial/Lesson6/sampling.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/sampling.cpp rename to trunk/mo/tutorial/Lesson6/sampling.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/sampling.param b/trunk/mo/tutorial/Lesson6/sampling.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/sampling.param rename to trunk/mo/tutorial/Lesson6/sampling.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/testMetropolisHasting.cpp b/trunk/mo/tutorial/Lesson6/testMetropolisHasting.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/testMetropolisHasting.cpp rename to trunk/mo/tutorial/Lesson6/testMetropolisHasting.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/testMetropolisHasting.param b/trunk/mo/tutorial/Lesson6/testMetropolisHasting.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/testMetropolisHasting.param rename to trunk/mo/tutorial/Lesson6/testMetropolisHasting.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/testRandomNeutralWalk.cpp b/trunk/mo/tutorial/Lesson6/testRandomNeutralWalk.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/testRandomNeutralWalk.cpp rename to trunk/mo/tutorial/Lesson6/testRandomNeutralWalk.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/testRandomNeutralWalk.param b/trunk/mo/tutorial/Lesson6/testRandomNeutralWalk.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/testRandomNeutralWalk.param rename to trunk/mo/tutorial/Lesson6/testRandomNeutralWalk.param diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/testRandomWalk.cpp b/trunk/mo/tutorial/Lesson6/testRandomWalk.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/testRandomWalk.cpp rename to trunk/mo/tutorial/Lesson6/testRandomWalk.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/testRandomWalk.param b/trunk/mo/tutorial/Lesson6/testRandomWalk.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson6/testRandomWalk.param rename to trunk/mo/tutorial/Lesson6/testRandomWalk.param diff --git a/trunk/mo/tutorial/Lesson7/CMakeLists.txt b/trunk/mo/tutorial/Lesson7/CMakeLists.txt new file mode 100644 index 000000000..257d4c128 --- /dev/null +++ b/trunk/mo/tutorial/Lesson7/CMakeLists.txt @@ -0,0 +1,22 @@ +# Lesson 7 + +###################################################################################### +### 0) Define files +###################################################################################### + +set(files hybridAlgo) + +###################################################################################### +### 1) Create the lesson +###################################################################################### + +add_lesson(mo Lesson7 "${files}") + +###################################################################################### +### 2) Include dependencies +###################################################################################### + +include_directories(${EO_SRC_DIR}/src + ${MO_SRC_DIR}/src + ${PROBLEMS_SRC_DIR}) + diff --git a/trunk/paradiseo-mo/tutorial/Lesson7/hybridAlgo.cpp b/trunk/mo/tutorial/Lesson7/hybridAlgo.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson7/hybridAlgo.cpp rename to trunk/mo/tutorial/Lesson7/hybridAlgo.cpp diff --git a/trunk/paradiseo-mo/tutorial/Lesson7/hybridAlgo.param b/trunk/mo/tutorial/Lesson7/hybridAlgo.param similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson7/hybridAlgo.param rename to trunk/mo/tutorial/Lesson7/hybridAlgo.param diff --git a/trunk/mo/tutorial/Lesson9/CMakeLists.txt b/trunk/mo/tutorial/Lesson9/CMakeLists.txt new file mode 100644 index 000000000..e7ee8935e --- /dev/null +++ b/trunk/mo/tutorial/Lesson9/CMakeLists.txt @@ -0,0 +1,22 @@ +# Lesson 9 + +###################################################################################### +### 0) Define files +###################################################################################### + +set(files VNS) + +###################################################################################### +### 1) Create the lesson +###################################################################################### + +add_lesson(mo Lesson9 "${files}") + +###################################################################################### +### 2) Include dependencies +###################################################################################### + +include_directories(${EO_SRC_DIR}/src + ${MO_SRC_DIR}/src + ${PROBLEMS_SRC_DIR}) + diff --git a/trunk/paradiseo-mo/tutorial/Lesson9/VNS.cpp b/trunk/mo/tutorial/Lesson9/VNS.cpp similarity index 100% rename from trunk/paradiseo-mo/tutorial/Lesson9/VNS.cpp rename to trunk/mo/tutorial/Lesson9/VNS.cpp diff --git a/trunk/moeo/CMakeLists.txt b/trunk/moeo/CMakeLists.txt new file mode 100644 index 000000000..daca409d3 --- /dev/null +++ b/trunk/moeo/CMakeLists.txt @@ -0,0 +1,17 @@ +###################################################################################### +### 0) Include subdirectories +###################################################################################### + +add_subdirectory(doc) +add_subdirectory(src) + +if(ENABLE_CMAKE_TESTING) + add_subdirectory(test) +endif(ENABLE_CMAKE_TESTING) + +if(ENABLE_CMAKE_EXAMPLE) + if(${CMAKE_VERBOSE_MAKEFILE}) + message("MOEO Examples :") + endif(${CMAKE_VERBOSE_MAKEFILE}) + add_subdirectory(tutorial) +endif(ENABLE_CMAKE_EXAMPLE) diff --git a/trunk/moeo/doc/CMakeLists.txt b/trunk/moeo/doc/CMakeLists.txt new file mode 100644 index 000000000..2b3b4e109 --- /dev/null +++ b/trunk/moeo/doc/CMakeLists.txt @@ -0,0 +1,39 @@ +###################################################################################### +### 0) Documentation +###################################################################################### + + +if(DOXYGEN_FOUND) + # Directory where the generation will be launched + set(MOEO_DOC_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Documentation directory") + # Name of the doxygene configuration file + set(MOEO_DOC_CONFIG_FILE "moeo.doxyfile" CACHE PATH "Documentation configuration file") + if(DOXYGEN_EXECUTABLE) + # Creating the custom target + if(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) + add_custom_target(doc-moeo + COMMAND ${DOXYGEN_EXECUTABLE} ${MOEO_DOC_CONFIG_FILE} 2> /dev/null > /dev/null + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + else(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) + add_custom_target(doc-moeo + COMMAND ${DOXYGEN_EXECUTABLE} ${MOEO_DOC_CONFIG_FILE} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + endif(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) + endif(DOXYGEN_EXECUTABLE) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${MOEO_DOC_CONFIG_FILE}.cmake" + "${MOEO_DOC_DIR}/${MOEO_DOC_CONFIG_FILE}") + install( + DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DESTINATION share${INSTALL_SUB_DIR}/moeo COMPONENT doc + PATTERN "CMakeFiles" EXCLUDE + PATTERN "cmake_install.cmake" EXCLUDE + PATTERN "CTestTestfile.cmake" EXCLUDE + PATTERN "Makefile" EXCLUDE + PATTERN "moeo.cfg" EXCLUDE + PATTERN "moeo.doxytag" EXCLUDE + ) +else(DOXYGEN_FOUND) + message(STATUS "Unable to generate the documentation, Doxygen package not found") +endif(DOXYGEN_FOUND) diff --git a/trunk/paradiseo-moeo/doc/index.h b/trunk/moeo/doc/index.h similarity index 100% rename from trunk/paradiseo-moeo/doc/index.h rename to trunk/moeo/doc/index.h diff --git a/trunk/paradiseo-moeo/doc/moeo.doxyfile.cmake b/trunk/moeo/doc/moeo.doxyfile.cmake similarity index 99% rename from trunk/paradiseo-moeo/doc/moeo.doxyfile.cmake rename to trunk/moeo/doc/moeo.doxyfile.cmake index f32fbca3a..db45d599c 100644 --- a/trunk/paradiseo-moeo/doc/moeo.doxyfile.cmake +++ b/trunk/moeo/doc/moeo.doxyfile.cmake @@ -25,7 +25,7 @@ DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. -PROJECT_NAME = @PACKAGE_NAME@ +PROJECT_NAME = @MOEO_MODULE_NAME@ # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or @@ -38,7 +38,7 @@ PROJECT_NUMBER = @PACKAGE_VERSION@ # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doc +OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@ # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -480,7 +480,7 @@ SHOW_USED_FILES = YES # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. -SHOW_DIRECTORIES = NO +#SHOW_DIRECTORIES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the @@ -809,7 +809,7 @@ HTML_STYLESHEET = # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. -HTML_ALIGN_MEMBERS = YES +#HTML_ALIGN_MEMBERS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the @@ -1300,7 +1300,7 @@ TAGFILES = @EO_BIN_DIR@/doc/eo.doxytag=http://eodev.sourceforge.ne # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = @CMAKE_BINARY_DIR@/doc/moeo.doxytag +GENERATE_TAGFILE = @CMAKE_CURRENT_BINARY_DIR@/moeo.doxytag # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes diff --git a/trunk/moeo/src/CMakeLists.txt b/trunk/moeo/src/CMakeLists.txt new file mode 100644 index 000000000..6c645008b --- /dev/null +++ b/trunk/moeo/src/CMakeLists.txt @@ -0,0 +1,44 @@ +###################################################################################### +### 0) Include directories +###################################################################################### +include_directories(${EO_SRC_DIR}) +include_directories(${MO_SRC_DIR}/src) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +###################################################################################### +### 1) Set paths +###################################################################################### + +set(MOEO_LIB_OUTPUT_PATH ${MOEO_BIN_DIR}/lib) +set(LIBRARY_OUTPUT_PATH ${MOEO_LIB_OUTPUT_PATH}) + +###################################################################################### +### 2) Build lib +###################################################################################### + +set (MOEO_CORE core/moeoObjectiveVectorTraits.cpp) + +add_library(moeo STATIC ${MOEO_CORE}) + +set(MOEO_VERSION ${GLOBAL_VERSION}) +set_target_properties(moeo PROPERTIES VERSION "${MOEO_VERSION}") + +install(TARGETS moeo ARCHIVE DESTINATION ${LIB} COMPONENT libraries) + +###################################################################################### +### 3) Look for headers +###################################################################################### + +file(GLOB HDRS moeo) +install(FILES ${HDRS} DESTINATION include${INSTALL_SUB_DIR}/moeo COMPONENT headers) + +###################################################################################### +### 4) Install directories +###################################################################################### + +install(DIRECTORY acceptCrit algo archive comparator core distance diversity do explorer fitness hybridization metric replacement scalarStuffs selection utils + DESTINATION include${INSTALL_SUB_DIR}/moeo + COMPONENT headers + FILES_MATCHING PATTERN "*.h" + ) + diff --git a/trunk/paradiseo-moeo/src/algo/moeoASEEA.h b/trunk/moeo/src/algo/moeoASEEA.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoASEEA.h rename to trunk/moeo/src/algo/moeoASEEA.h diff --git a/trunk/paradiseo-moeo/src/algo/moeoAlgo.h b/trunk/moeo/src/algo/moeoAlgo.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoAlgo.h rename to trunk/moeo/src/algo/moeoAlgo.h diff --git a/trunk/paradiseo-moeo/src/algo/moeoEA.h b/trunk/moeo/src/algo/moeoEA.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoEA.h rename to trunk/moeo/src/algo/moeoEA.h diff --git a/trunk/paradiseo-moeo/src/algo/moeoEasyEA.h b/trunk/moeo/src/algo/moeoEasyEA.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoEasyEA.h rename to trunk/moeo/src/algo/moeoEasyEA.h diff --git a/trunk/paradiseo-moeo/src/algo/moeoIBEA.h b/trunk/moeo/src/algo/moeoIBEA.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoIBEA.h rename to trunk/moeo/src/algo/moeoIBEA.h diff --git a/trunk/paradiseo-moeo/src/algo/moeoMOGA.h b/trunk/moeo/src/algo/moeoMOGA.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoMOGA.h rename to trunk/moeo/src/algo/moeoMOGA.h diff --git a/trunk/paradiseo-moeo/src/algo/moeoNSGA.h b/trunk/moeo/src/algo/moeoNSGA.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoNSGA.h rename to trunk/moeo/src/algo/moeoNSGA.h diff --git a/trunk/paradiseo-moeo/src/algo/moeoNSGAII.h b/trunk/moeo/src/algo/moeoNSGAII.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoNSGAII.h rename to trunk/moeo/src/algo/moeoNSGAII.h diff --git a/trunk/paradiseo-moeo/src/algo/moeoPLS1.h b/trunk/moeo/src/algo/moeoPLS1.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoPLS1.h rename to trunk/moeo/src/algo/moeoPLS1.h diff --git a/trunk/paradiseo-moeo/src/algo/moeoPLS2.h b/trunk/moeo/src/algo/moeoPLS2.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoPLS2.h rename to trunk/moeo/src/algo/moeoPLS2.h diff --git a/trunk/paradiseo-moeo/src/algo/moeoPopAlgo.h b/trunk/moeo/src/algo/moeoPopAlgo.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoPopAlgo.h rename to trunk/moeo/src/algo/moeoPopAlgo.h diff --git a/trunk/paradiseo-moeo/src/algo/moeoPopLS.h b/trunk/moeo/src/algo/moeoPopLS.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoPopLS.h rename to trunk/moeo/src/algo/moeoPopLS.h diff --git a/trunk/paradiseo-moeo/src/algo/moeoSEEA.h b/trunk/moeo/src/algo/moeoSEEA.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoSEEA.h rename to trunk/moeo/src/algo/moeoSEEA.h diff --git a/trunk/paradiseo-moeo/src/algo/moeoSPEA2.h b/trunk/moeo/src/algo/moeoSPEA2.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoSPEA2.h rename to trunk/moeo/src/algo/moeoSPEA2.h diff --git a/trunk/paradiseo-moeo/src/algo/moeoUnifiedDominanceBasedLS.h b/trunk/moeo/src/algo/moeoUnifiedDominanceBasedLS.h similarity index 100% rename from trunk/paradiseo-moeo/src/algo/moeoUnifiedDominanceBasedLS.h rename to trunk/moeo/src/algo/moeoUnifiedDominanceBasedLS.h diff --git a/trunk/paradiseo-moeo/src/archive/moeo2DMinHypervolumeArchive.h b/trunk/moeo/src/archive/moeo2DMinHypervolumeArchive.h similarity index 100% rename from trunk/paradiseo-moeo/src/archive/moeo2DMinHypervolumeArchive.h rename to trunk/moeo/src/archive/moeo2DMinHypervolumeArchive.h diff --git a/trunk/paradiseo-moeo/src/archive/moeoArchive.h b/trunk/moeo/src/archive/moeoArchive.h similarity index 99% rename from trunk/paradiseo-moeo/src/archive/moeoArchive.h rename to trunk/moeo/src/archive/moeoArchive.h index dd7ecc1d7..0d3cfe3f4 100644 --- a/trunk/paradiseo-moeo/src/archive/moeoArchive.h +++ b/trunk/moeo/src/archive/moeoArchive.h @@ -202,7 +202,7 @@ protected: } if (!dom) { - push_back(_moeo); + this->push_back(_moeo); } return !dom; } diff --git a/trunk/paradiseo-moeo/src/archive/moeoBoundedArchive.h b/trunk/moeo/src/archive/moeoBoundedArchive.h similarity index 100% rename from trunk/paradiseo-moeo/src/archive/moeoBoundedArchive.h rename to trunk/moeo/src/archive/moeoBoundedArchive.h diff --git a/trunk/paradiseo-moeo/src/archive/moeoEpsilonHyperboxArchive.h b/trunk/moeo/src/archive/moeoEpsilonHyperboxArchive.h similarity index 98% rename from trunk/paradiseo-moeo/src/archive/moeoEpsilonHyperboxArchive.h rename to trunk/moeo/src/archive/moeoEpsilonHyperboxArchive.h index 64934a33a..7a773e0c8 100644 --- a/trunk/paradiseo-moeo/src/archive/moeoEpsilonHyperboxArchive.h +++ b/trunk/moeo/src/archive/moeoEpsilonHyperboxArchive.h @@ -129,7 +129,7 @@ public: tmp=hyperbox(operator[](i)); //CASE 1: _moeo epsilon-domine the ieme element of the archive - if(comparator(tmp, corner)){ + if(this->comparator(tmp, corner)){ std::cout << "ENTER CASE 1" << std::endl; //test if bounds changed //removed=operator[](i); @@ -145,7 +145,7 @@ public: res = true; }//END CASE 1 //CASE 2: the ieme element of the archive epsilon-domine _moeo - else if(comparator(corner, tmp)){ + else if(this->comparator(corner, tmp)){ std::cout << "ENTER CASE 2" << std::endl; if(change == 1) changeBoundsByDeleting(_moeo); @@ -161,7 +161,7 @@ public: if(same){ std::cout << "ENTER CASE 3" << std::endl; // _moeo dominates archive[i] - if(comparator(operator[](i).objectiveVector(), _moeo.objectiveVector())){ + if(this->comparator(operator[](i).objectiveVector(), _moeo.objectiveVector())){ if(i==size()-1) pop_back(); else{ @@ -175,7 +175,7 @@ public: res=true; } // _moeo is dominated by archive[i] - else if(comparator(_moeo.objectiveVector(), operator[](i).objectiveVector())){ + else if(this->comparator(_moeo.objectiveVector(), operator[](i).objectiveVector())){ changeBoundsByDeleting(_moeo); nonstop=false; } diff --git a/trunk/paradiseo-moeo/src/archive/moeoFitDivBoundedArchive.h b/trunk/moeo/src/archive/moeoFitDivBoundedArchive.h similarity index 99% rename from trunk/paradiseo-moeo/src/archive/moeoFitDivBoundedArchive.h rename to trunk/moeo/src/archive/moeoFitDivBoundedArchive.h index dbb987fce..32e13ec5a 100644 --- a/trunk/paradiseo-moeo/src/archive/moeoFitDivBoundedArchive.h +++ b/trunk/moeo/src/archive/moeoFitDivBoundedArchive.h @@ -105,7 +105,7 @@ public: bool operator()(const MOEOT & _moeo) { bool res; - res = update(_moeo); + res = this->update(_moeo); if(size() > maxSize){ fitness(*this); @@ -125,7 +125,7 @@ public: bool operator()(const eoPop < MOEOT > & _pop) { bool res; - res = update(_pop); + res = this->update(_pop); if(size() > maxSize){ fitness(*this); diff --git a/trunk/paradiseo-moeo/src/archive/moeoFixedSizeArchive.h b/trunk/moeo/src/archive/moeoFixedSizeArchive.h similarity index 100% rename from trunk/paradiseo-moeo/src/archive/moeoFixedSizeArchive.h rename to trunk/moeo/src/archive/moeoFixedSizeArchive.h diff --git a/trunk/paradiseo-moeo/src/archive/moeoImprOnlyBoundedArchive.h b/trunk/moeo/src/archive/moeoImprOnlyBoundedArchive.h similarity index 96% rename from trunk/paradiseo-moeo/src/archive/moeoImprOnlyBoundedArchive.h rename to trunk/moeo/src/archive/moeoImprOnlyBoundedArchive.h index 891090eb6..78aac5e16 100644 --- a/trunk/paradiseo-moeo/src/archive/moeoImprOnlyBoundedArchive.h +++ b/trunk/moeo/src/archive/moeoImprOnlyBoundedArchive.h @@ -124,7 +124,7 @@ private: for (unsigned int j=0; jcomparator(operator[](j).objectiveVector(), _moeo.objectiveVector()) ) { operator[](j) = back(); pop_back(); @@ -144,7 +144,7 @@ private: for (unsigned int j=0; jcomparator(_moeo.objectiveVector(), operator[](j).objectiveVector()) ) { dom = true; break; diff --git a/trunk/paradiseo-moeo/src/archive/moeoSPEA2Archive.h b/trunk/moeo/src/archive/moeoSPEA2Archive.h similarity index 100% rename from trunk/paradiseo-moeo/src/archive/moeoSPEA2Archive.h rename to trunk/moeo/src/archive/moeoSPEA2Archive.h diff --git a/trunk/paradiseo-moeo/src/archive/moeoUnboundedArchive.h b/trunk/moeo/src/archive/moeoUnboundedArchive.h similarity index 95% rename from trunk/paradiseo-moeo/src/archive/moeoUnboundedArchive.h rename to trunk/moeo/src/archive/moeoUnboundedArchive.h index 8846780d8..7d328221a 100644 --- a/trunk/paradiseo-moeo/src/archive/moeoUnboundedArchive.h +++ b/trunk/moeo/src/archive/moeoUnboundedArchive.h @@ -81,7 +81,7 @@ public: */ bool operator()(const MOEOT & _moeo) { - return update(_moeo); + return this->update(_moeo); } @@ -92,7 +92,7 @@ public: */ bool operator()(const eoPop < MOEOT > & _pop) { - return update(_pop); + return this->update(_pop); } }; diff --git a/trunk/paradiseo-moeo/src/comparator/moeoAggregativeComparator.h b/trunk/moeo/src/comparator/moeoAggregativeComparator.h similarity index 100% rename from trunk/paradiseo-moeo/src/comparator/moeoAggregativeComparator.h rename to trunk/moeo/src/comparator/moeoAggregativeComparator.h diff --git a/trunk/paradiseo-moeo/src/comparator/moeoComparator.h b/trunk/moeo/src/comparator/moeoComparator.h similarity index 100% rename from trunk/paradiseo-moeo/src/comparator/moeoComparator.h rename to trunk/moeo/src/comparator/moeoComparator.h diff --git a/trunk/paradiseo-moeo/src/comparator/moeoDiversityThenFitnessComparator.h b/trunk/moeo/src/comparator/moeoDiversityThenFitnessComparator.h similarity index 100% rename from trunk/paradiseo-moeo/src/comparator/moeoDiversityThenFitnessComparator.h rename to trunk/moeo/src/comparator/moeoDiversityThenFitnessComparator.h diff --git a/trunk/paradiseo-moeo/src/comparator/moeoEpsilonObjectiveVectorComparator.h b/trunk/moeo/src/comparator/moeoEpsilonObjectiveVectorComparator.h similarity index 100% rename from trunk/paradiseo-moeo/src/comparator/moeoEpsilonObjectiveVectorComparator.h rename to trunk/moeo/src/comparator/moeoEpsilonObjectiveVectorComparator.h diff --git a/trunk/paradiseo-moeo/src/comparator/moeoFitnessComparator.h b/trunk/moeo/src/comparator/moeoFitnessComparator.h similarity index 100% rename from trunk/paradiseo-moeo/src/comparator/moeoFitnessComparator.h rename to trunk/moeo/src/comparator/moeoFitnessComparator.h diff --git a/trunk/paradiseo-moeo/src/comparator/moeoFitnessThenDiversityComparator.h b/trunk/moeo/src/comparator/moeoFitnessThenDiversityComparator.h similarity index 100% rename from trunk/paradiseo-moeo/src/comparator/moeoFitnessThenDiversityComparator.h rename to trunk/moeo/src/comparator/moeoFitnessThenDiversityComparator.h diff --git a/trunk/paradiseo-moeo/src/comparator/moeoGDominanceObjectiveVectorComparator.h b/trunk/moeo/src/comparator/moeoGDominanceObjectiveVectorComparator.h similarity index 100% rename from trunk/paradiseo-moeo/src/comparator/moeoGDominanceObjectiveVectorComparator.h rename to trunk/moeo/src/comparator/moeoGDominanceObjectiveVectorComparator.h diff --git a/trunk/paradiseo-moeo/src/comparator/moeoObjectiveObjectiveVectorComparator.h b/trunk/moeo/src/comparator/moeoObjectiveObjectiveVectorComparator.h similarity index 100% rename from trunk/paradiseo-moeo/src/comparator/moeoObjectiveObjectiveVectorComparator.h rename to trunk/moeo/src/comparator/moeoObjectiveObjectiveVectorComparator.h diff --git a/trunk/paradiseo-moeo/src/comparator/moeoObjectiveVectorComparator.h b/trunk/moeo/src/comparator/moeoObjectiveVectorComparator.h similarity index 100% rename from trunk/paradiseo-moeo/src/comparator/moeoObjectiveVectorComparator.h rename to trunk/moeo/src/comparator/moeoObjectiveVectorComparator.h diff --git a/trunk/paradiseo-moeo/src/comparator/moeoOneObjectiveComparator.h b/trunk/moeo/src/comparator/moeoOneObjectiveComparator.h similarity index 100% rename from trunk/paradiseo-moeo/src/comparator/moeoOneObjectiveComparator.h rename to trunk/moeo/src/comparator/moeoOneObjectiveComparator.h diff --git a/trunk/paradiseo-moeo/src/comparator/moeoParetoObjectiveVectorComparator.h b/trunk/moeo/src/comparator/moeoParetoObjectiveVectorComparator.h similarity index 100% rename from trunk/paradiseo-moeo/src/comparator/moeoParetoObjectiveVectorComparator.h rename to trunk/moeo/src/comparator/moeoParetoObjectiveVectorComparator.h diff --git a/trunk/paradiseo-moeo/src/comparator/moeoPtrComparator.h b/trunk/moeo/src/comparator/moeoPtrComparator.h similarity index 100% rename from trunk/paradiseo-moeo/src/comparator/moeoPtrComparator.h rename to trunk/moeo/src/comparator/moeoPtrComparator.h diff --git a/trunk/paradiseo-moeo/src/comparator/moeoStrictObjectiveVectorComparator.h b/trunk/moeo/src/comparator/moeoStrictObjectiveVectorComparator.h similarity index 100% rename from trunk/paradiseo-moeo/src/comparator/moeoStrictObjectiveVectorComparator.h rename to trunk/moeo/src/comparator/moeoStrictObjectiveVectorComparator.h diff --git a/trunk/paradiseo-moeo/src/comparator/moeoWeakObjectiveVectorComparator.h b/trunk/moeo/src/comparator/moeoWeakObjectiveVectorComparator.h similarity index 100% rename from trunk/paradiseo-moeo/src/comparator/moeoWeakObjectiveVectorComparator.h rename to trunk/moeo/src/comparator/moeoWeakObjectiveVectorComparator.h diff --git a/trunk/paradiseo-moeo/src/core/MOEO.h b/trunk/moeo/src/core/MOEO.h similarity index 100% rename from trunk/paradiseo-moeo/src/core/MOEO.h rename to trunk/moeo/src/core/MOEO.h diff --git a/trunk/paradiseo-moeo/src/core/moeoBitVector.h b/trunk/moeo/src/core/moeoBitVector.h similarity index 100% rename from trunk/paradiseo-moeo/src/core/moeoBitVector.h rename to trunk/moeo/src/core/moeoBitVector.h diff --git a/trunk/paradiseo-moeo/src/core/moeoEvalFunc.h b/trunk/moeo/src/core/moeoEvalFunc.h similarity index 100% rename from trunk/paradiseo-moeo/src/core/moeoEvalFunc.h rename to trunk/moeo/src/core/moeoEvalFunc.h diff --git a/trunk/paradiseo-moeo/src/core/moeoIntVector.h b/trunk/moeo/src/core/moeoIntVector.h similarity index 100% rename from trunk/paradiseo-moeo/src/core/moeoIntVector.h rename to trunk/moeo/src/core/moeoIntVector.h diff --git a/trunk/paradiseo-moeo/src/core/moeoObjectiveVector.h b/trunk/moeo/src/core/moeoObjectiveVector.h similarity index 100% rename from trunk/paradiseo-moeo/src/core/moeoObjectiveVector.h rename to trunk/moeo/src/core/moeoObjectiveVector.h diff --git a/trunk/paradiseo-moeo/src/core/moeoObjectiveVectorTraits.cpp b/trunk/moeo/src/core/moeoObjectiveVectorTraits.cpp similarity index 100% rename from trunk/paradiseo-moeo/src/core/moeoObjectiveVectorTraits.cpp rename to trunk/moeo/src/core/moeoObjectiveVectorTraits.cpp diff --git a/trunk/paradiseo-moeo/src/core/moeoObjectiveVectorTraits.h b/trunk/moeo/src/core/moeoObjectiveVectorTraits.h similarity index 100% rename from trunk/paradiseo-moeo/src/core/moeoObjectiveVectorTraits.h rename to trunk/moeo/src/core/moeoObjectiveVectorTraits.h diff --git a/trunk/paradiseo-moeo/src/core/moeoRealObjectiveVector.h b/trunk/moeo/src/core/moeoRealObjectiveVector.h similarity index 100% rename from trunk/paradiseo-moeo/src/core/moeoRealObjectiveVector.h rename to trunk/moeo/src/core/moeoRealObjectiveVector.h diff --git a/trunk/paradiseo-moeo/src/core/moeoRealVector.h b/trunk/moeo/src/core/moeoRealVector.h similarity index 100% rename from trunk/paradiseo-moeo/src/core/moeoRealVector.h rename to trunk/moeo/src/core/moeoRealVector.h diff --git a/trunk/paradiseo-moeo/src/core/moeoVector.h b/trunk/moeo/src/core/moeoVector.h similarity index 100% rename from trunk/paradiseo-moeo/src/core/moeoVector.h rename to trunk/moeo/src/core/moeoVector.h diff --git a/trunk/paradiseo-moeo/src/distance/moeoDistance.h b/trunk/moeo/src/distance/moeoDistance.h similarity index 100% rename from trunk/paradiseo-moeo/src/distance/moeoDistance.h rename to trunk/moeo/src/distance/moeoDistance.h diff --git a/trunk/paradiseo-moeo/src/distance/moeoDistanceMatrix.h b/trunk/moeo/src/distance/moeoDistanceMatrix.h similarity index 100% rename from trunk/paradiseo-moeo/src/distance/moeoDistanceMatrix.h rename to trunk/moeo/src/distance/moeoDistanceMatrix.h diff --git a/trunk/paradiseo-moeo/src/distance/moeoEuclideanDistance.h b/trunk/moeo/src/distance/moeoEuclideanDistance.h similarity index 100% rename from trunk/paradiseo-moeo/src/distance/moeoEuclideanDistance.h rename to trunk/moeo/src/distance/moeoEuclideanDistance.h diff --git a/trunk/paradiseo-moeo/src/distance/moeoManhattanDistance.h b/trunk/moeo/src/distance/moeoManhattanDistance.h similarity index 100% rename from trunk/paradiseo-moeo/src/distance/moeoManhattanDistance.h rename to trunk/moeo/src/distance/moeoManhattanDistance.h diff --git a/trunk/paradiseo-moeo/src/distance/moeoNormalizedDistance.h b/trunk/moeo/src/distance/moeoNormalizedDistance.h similarity index 100% rename from trunk/paradiseo-moeo/src/distance/moeoNormalizedDistance.h rename to trunk/moeo/src/distance/moeoNormalizedDistance.h diff --git a/trunk/paradiseo-moeo/src/distance/moeoObjSpaceDistance.h b/trunk/moeo/src/distance/moeoObjSpaceDistance.h similarity index 100% rename from trunk/paradiseo-moeo/src/distance/moeoObjSpaceDistance.h rename to trunk/moeo/src/distance/moeoObjSpaceDistance.h diff --git a/trunk/paradiseo-moeo/src/diversity/moeoCrowdingDiversityAssignment.h b/trunk/moeo/src/diversity/moeoCrowdingDiversityAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/diversity/moeoCrowdingDiversityAssignment.h rename to trunk/moeo/src/diversity/moeoCrowdingDiversityAssignment.h diff --git a/trunk/paradiseo-moeo/src/diversity/moeoDiversityAssignment.h b/trunk/moeo/src/diversity/moeoDiversityAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/diversity/moeoDiversityAssignment.h rename to trunk/moeo/src/diversity/moeoDiversityAssignment.h diff --git a/trunk/paradiseo-moeo/src/diversity/moeoDummyDiversityAssignment.h b/trunk/moeo/src/diversity/moeoDummyDiversityAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/diversity/moeoDummyDiversityAssignment.h rename to trunk/moeo/src/diversity/moeoDummyDiversityAssignment.h diff --git a/trunk/paradiseo-moeo/src/diversity/moeoFrontByFrontCrowdingDiversityAssignment.h b/trunk/moeo/src/diversity/moeoFrontByFrontCrowdingDiversityAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/diversity/moeoFrontByFrontCrowdingDiversityAssignment.h rename to trunk/moeo/src/diversity/moeoFrontByFrontCrowdingDiversityAssignment.h diff --git a/trunk/paradiseo-moeo/src/diversity/moeoFrontByFrontSharingDiversityAssignment.h b/trunk/moeo/src/diversity/moeoFrontByFrontSharingDiversityAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/diversity/moeoFrontByFrontSharingDiversityAssignment.h rename to trunk/moeo/src/diversity/moeoFrontByFrontSharingDiversityAssignment.h diff --git a/trunk/paradiseo-moeo/src/diversity/moeoNearestNeighborDiversityAssignment.h b/trunk/moeo/src/diversity/moeoNearestNeighborDiversityAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/diversity/moeoNearestNeighborDiversityAssignment.h rename to trunk/moeo/src/diversity/moeoNearestNeighborDiversityAssignment.h diff --git a/trunk/paradiseo-moeo/src/diversity/moeoSharingDiversityAssignment.h b/trunk/moeo/src/diversity/moeoSharingDiversityAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/diversity/moeoSharingDiversityAssignment.h rename to trunk/moeo/src/diversity/moeoSharingDiversityAssignment.h diff --git a/trunk/paradiseo-moeo/src/do/make_checkpoint_moeo.h b/trunk/moeo/src/do/make_checkpoint_moeo.h similarity index 100% rename from trunk/paradiseo-moeo/src/do/make_checkpoint_moeo.h rename to trunk/moeo/src/do/make_checkpoint_moeo.h diff --git a/trunk/paradiseo-moeo/src/do/make_continue_moeo.h b/trunk/moeo/src/do/make_continue_moeo.h similarity index 100% rename from trunk/paradiseo-moeo/src/do/make_continue_moeo.h rename to trunk/moeo/src/do/make_continue_moeo.h diff --git a/trunk/paradiseo-moeo/src/do/make_ea_moeo.h b/trunk/moeo/src/do/make_ea_moeo.h similarity index 100% rename from trunk/paradiseo-moeo/src/do/make_ea_moeo.h rename to trunk/moeo/src/do/make_ea_moeo.h diff --git a/trunk/paradiseo-moeo/src/explorer/moeoExhaustiveNeighborhoodExplorer.h b/trunk/moeo/src/explorer/moeoExhaustiveNeighborhoodExplorer.h similarity index 100% rename from trunk/paradiseo-moeo/src/explorer/moeoExhaustiveNeighborhoodExplorer.h rename to trunk/moeo/src/explorer/moeoExhaustiveNeighborhoodExplorer.h diff --git a/trunk/paradiseo-moeo/src/explorer/moeoFirstImprovingNeighborhoodExplorer.h b/trunk/moeo/src/explorer/moeoFirstImprovingNeighborhoodExplorer.h similarity index 100% rename from trunk/paradiseo-moeo/src/explorer/moeoFirstImprovingNeighborhoodExplorer.h rename to trunk/moeo/src/explorer/moeoFirstImprovingNeighborhoodExplorer.h diff --git a/trunk/paradiseo-moeo/src/explorer/moeoNoDesimprovingNeighborhoodExplorer.h b/trunk/moeo/src/explorer/moeoNoDesimprovingNeighborhoodExplorer.h similarity index 100% rename from trunk/paradiseo-moeo/src/explorer/moeoNoDesimprovingNeighborhoodExplorer.h rename to trunk/moeo/src/explorer/moeoNoDesimprovingNeighborhoodExplorer.h diff --git a/trunk/paradiseo-moeo/src/explorer/moeoPopNeighborhoodExplorer.h b/trunk/moeo/src/explorer/moeoPopNeighborhoodExplorer.h similarity index 100% rename from trunk/paradiseo-moeo/src/explorer/moeoPopNeighborhoodExplorer.h rename to trunk/moeo/src/explorer/moeoPopNeighborhoodExplorer.h diff --git a/trunk/paradiseo-moeo/src/explorer/moeoSimpleSubNeighborhoodExplorer.h b/trunk/moeo/src/explorer/moeoSimpleSubNeighborhoodExplorer.h similarity index 100% rename from trunk/paradiseo-moeo/src/explorer/moeoSimpleSubNeighborhoodExplorer.h rename to trunk/moeo/src/explorer/moeoSimpleSubNeighborhoodExplorer.h diff --git a/trunk/paradiseo-moeo/src/explorer/moeoSubNeighborhoodExplorer.h b/trunk/moeo/src/explorer/moeoSubNeighborhoodExplorer.h similarity index 100% rename from trunk/paradiseo-moeo/src/explorer/moeoSubNeighborhoodExplorer.h rename to trunk/moeo/src/explorer/moeoSubNeighborhoodExplorer.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoAggregationFitnessAssignment.h b/trunk/moeo/src/fitness/moeoAggregationFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoAggregationFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoAggregationFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoBinaryIndicatorBasedFitnessAssignment.h b/trunk/moeo/src/fitness/moeoBinaryIndicatorBasedFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoBinaryIndicatorBasedFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoBinaryIndicatorBasedFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoConstraintFitnessAssignment.h b/trunk/moeo/src/fitness/moeoConstraintFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoConstraintFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoConstraintFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoCriterionBasedFitnessAssignment.h b/trunk/moeo/src/fitness/moeoCriterionBasedFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoCriterionBasedFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoCriterionBasedFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoDominanceBasedFitnessAssignment.h b/trunk/moeo/src/fitness/moeoDominanceBasedFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoDominanceBasedFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoDominanceBasedFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoDominanceCountFitnessAssignment.h b/trunk/moeo/src/fitness/moeoDominanceCountFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoDominanceCountFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoDominanceCountFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoDominanceCountRankingFitnessAssignment.h b/trunk/moeo/src/fitness/moeoDominanceCountRankingFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoDominanceCountRankingFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoDominanceCountRankingFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoDominanceDepthFitnessAssignment.h b/trunk/moeo/src/fitness/moeoDominanceDepthFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoDominanceDepthFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoDominanceDepthFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoDominanceRankFitnessAssignment.h b/trunk/moeo/src/fitness/moeoDominanceRankFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoDominanceRankFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoDominanceRankFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoDummyFitnessAssignment.h b/trunk/moeo/src/fitness/moeoDummyFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoDummyFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoDummyFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoExpBinaryIndicatorBasedFitnessAssignment.h b/trunk/moeo/src/fitness/moeoExpBinaryIndicatorBasedFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoExpBinaryIndicatorBasedFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoExpBinaryIndicatorBasedFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoFitnessAssignment.h b/trunk/moeo/src/fitness/moeoFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoIndicatorBasedFitnessAssignment.h b/trunk/moeo/src/fitness/moeoIndicatorBasedFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoIndicatorBasedFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoIndicatorBasedFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoReferencePointIndicatorBasedFitnessAssignment.h b/trunk/moeo/src/fitness/moeoReferencePointIndicatorBasedFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoReferencePointIndicatorBasedFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoReferencePointIndicatorBasedFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoScalarFitnessAssignment.h b/trunk/moeo/src/fitness/moeoScalarFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoScalarFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoScalarFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoSingleObjectivization.h b/trunk/moeo/src/fitness/moeoSingleObjectivization.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoSingleObjectivization.h rename to trunk/moeo/src/fitness/moeoSingleObjectivization.h diff --git a/trunk/paradiseo-moeo/src/fitness/moeoUnaryIndicatorBasedFitnessAssignment.h b/trunk/moeo/src/fitness/moeoUnaryIndicatorBasedFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/fitness/moeoUnaryIndicatorBasedFitnessAssignment.h rename to trunk/moeo/src/fitness/moeoUnaryIndicatorBasedFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/hybridization/moeoDMLSGenUpdater.h b/trunk/moeo/src/hybridization/moeoDMLSGenUpdater.h similarity index 100% rename from trunk/paradiseo-moeo/src/hybridization/moeoDMLSGenUpdater.h rename to trunk/moeo/src/hybridization/moeoDMLSGenUpdater.h diff --git a/trunk/paradiseo-moeo/src/hybridization/moeoDMLSMonOp.h b/trunk/moeo/src/hybridization/moeoDMLSMonOp.h similarity index 100% rename from trunk/paradiseo-moeo/src/hybridization/moeoDMLSMonOp.h rename to trunk/moeo/src/hybridization/moeoDMLSMonOp.h diff --git a/trunk/paradiseo-moeo/src/metric/moeoAdditiveEpsilonBinaryMetric.h b/trunk/moeo/src/metric/moeoAdditiveEpsilonBinaryMetric.h similarity index 100% rename from trunk/paradiseo-moeo/src/metric/moeoAdditiveEpsilonBinaryMetric.h rename to trunk/moeo/src/metric/moeoAdditiveEpsilonBinaryMetric.h diff --git a/trunk/paradiseo-moeo/src/metric/moeoContributionMetric.h b/trunk/moeo/src/metric/moeoContributionMetric.h similarity index 100% rename from trunk/paradiseo-moeo/src/metric/moeoContributionMetric.h rename to trunk/moeo/src/metric/moeoContributionMetric.h diff --git a/trunk/paradiseo-moeo/src/metric/moeoDistanceMetric.h b/trunk/moeo/src/metric/moeoDistanceMetric.h similarity index 100% rename from trunk/paradiseo-moeo/src/metric/moeoDistanceMetric.h rename to trunk/moeo/src/metric/moeoDistanceMetric.h diff --git a/trunk/paradiseo-moeo/src/metric/moeoEntropyMetric.h b/trunk/moeo/src/metric/moeoEntropyMetric.h similarity index 100% rename from trunk/paradiseo-moeo/src/metric/moeoEntropyMetric.h rename to trunk/moeo/src/metric/moeoEntropyMetric.h diff --git a/trunk/paradiseo-moeo/src/metric/moeoHyperVolumeDifferenceMetric.h b/trunk/moeo/src/metric/moeoHyperVolumeDifferenceMetric.h similarity index 100% rename from trunk/paradiseo-moeo/src/metric/moeoHyperVolumeDifferenceMetric.h rename to trunk/moeo/src/metric/moeoHyperVolumeDifferenceMetric.h diff --git a/trunk/paradiseo-moeo/src/metric/moeoHyperVolumeMetric.h b/trunk/moeo/src/metric/moeoHyperVolumeMetric.h similarity index 100% rename from trunk/paradiseo-moeo/src/metric/moeoHyperVolumeMetric.h rename to trunk/moeo/src/metric/moeoHyperVolumeMetric.h diff --git a/trunk/paradiseo-moeo/src/metric/moeoHypervolumeBinaryMetric.h b/trunk/moeo/src/metric/moeoHypervolumeBinaryMetric.h similarity index 100% rename from trunk/paradiseo-moeo/src/metric/moeoHypervolumeBinaryMetric.h rename to trunk/moeo/src/metric/moeoHypervolumeBinaryMetric.h diff --git a/trunk/paradiseo-moeo/src/metric/moeoMetric.h b/trunk/moeo/src/metric/moeoMetric.h similarity index 100% rename from trunk/paradiseo-moeo/src/metric/moeoMetric.h rename to trunk/moeo/src/metric/moeoMetric.h diff --git a/trunk/paradiseo-moeo/src/metric/moeoNormalizedSolutionVsSolutionBinaryMetric.h b/trunk/moeo/src/metric/moeoNormalizedSolutionVsSolutionBinaryMetric.h similarity index 100% rename from trunk/paradiseo-moeo/src/metric/moeoNormalizedSolutionVsSolutionBinaryMetric.h rename to trunk/moeo/src/metric/moeoNormalizedSolutionVsSolutionBinaryMetric.h diff --git a/trunk/paradiseo-moeo/src/metric/moeoVecVsVecAdditiveEpsilonBinaryMetric.h b/trunk/moeo/src/metric/moeoVecVsVecAdditiveEpsilonBinaryMetric.h similarity index 100% rename from trunk/paradiseo-moeo/src/metric/moeoVecVsVecAdditiveEpsilonBinaryMetric.h rename to trunk/moeo/src/metric/moeoVecVsVecAdditiveEpsilonBinaryMetric.h diff --git a/trunk/paradiseo-moeo/src/metric/moeoVecVsVecEpsilonBinaryMetric.h b/trunk/moeo/src/metric/moeoVecVsVecEpsilonBinaryMetric.h similarity index 100% rename from trunk/paradiseo-moeo/src/metric/moeoVecVsVecEpsilonBinaryMetric.h rename to trunk/moeo/src/metric/moeoVecVsVecEpsilonBinaryMetric.h diff --git a/trunk/paradiseo-moeo/src/metric/moeoVecVsVecMultiplicativeEpsilonBinaryMetric.h b/trunk/moeo/src/metric/moeoVecVsVecMultiplicativeEpsilonBinaryMetric.h similarity index 100% rename from trunk/paradiseo-moeo/src/metric/moeoVecVsVecMultiplicativeEpsilonBinaryMetric.h rename to trunk/moeo/src/metric/moeoVecVsVecMultiplicativeEpsilonBinaryMetric.h diff --git a/trunk/paradiseo-moeo/src/moeo b/trunk/moeo/src/moeo similarity index 92% rename from trunk/paradiseo-moeo/src/moeo rename to trunk/moeo/src/moeo index d916ec2dc..87f0c68db 100644 --- a/trunk/paradiseo-moeo/src/moeo +++ b/trunk/moeo/src/moeo @@ -57,7 +57,7 @@ #include #include -//#include +#include #include #include #include @@ -160,24 +160,24 @@ //#include //#include //#include -//#include -//#include +#include +#include //#include //#include -//#include +#include //#include //#include -//#include +#include //#include //#include //#include -//#include -//#include -//#include -//#include +#include +#include +#include +#include //#include //#include -//#include +#include //#include //#include //#include diff --git a/trunk/paradiseo-moeo/src/replacement/moeoElitistReplacement.h b/trunk/moeo/src/replacement/moeoElitistReplacement.h similarity index 100% rename from trunk/paradiseo-moeo/src/replacement/moeoElitistReplacement.h rename to trunk/moeo/src/replacement/moeoElitistReplacement.h diff --git a/trunk/paradiseo-moeo/src/replacement/moeoEnvironmentalReplacement.h b/trunk/moeo/src/replacement/moeoEnvironmentalReplacement.h similarity index 100% rename from trunk/paradiseo-moeo/src/replacement/moeoEnvironmentalReplacement.h rename to trunk/moeo/src/replacement/moeoEnvironmentalReplacement.h diff --git a/trunk/paradiseo-moeo/src/replacement/moeoGenerationalReplacement.h b/trunk/moeo/src/replacement/moeoGenerationalReplacement.h similarity index 100% rename from trunk/paradiseo-moeo/src/replacement/moeoGenerationalReplacement.h rename to trunk/moeo/src/replacement/moeoGenerationalReplacement.h diff --git a/trunk/paradiseo-moeo/src/replacement/moeoReplacement.h b/trunk/moeo/src/replacement/moeoReplacement.h similarity index 100% rename from trunk/paradiseo-moeo/src/replacement/moeoReplacement.h rename to trunk/moeo/src/replacement/moeoReplacement.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/algo/moeoHC.h b/trunk/moeo/src/scalarStuffs/algo/moeoHC.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/algo/moeoHC.h rename to trunk/moeo/src/scalarStuffs/algo/moeoHC.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/algo/moeoILS.h b/trunk/moeo/src/scalarStuffs/algo/moeoILS.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/algo/moeoILS.h rename to trunk/moeo/src/scalarStuffs/algo/moeoILS.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/algo/moeoSA.h b/trunk/moeo/src/scalarStuffs/algo/moeoSA.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/algo/moeoSA.h rename to trunk/moeo/src/scalarStuffs/algo/moeoSA.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/algo/moeoSolAlgo.h b/trunk/moeo/src/scalarStuffs/algo/moeoSolAlgo.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/algo/moeoSolAlgo.h rename to trunk/moeo/src/scalarStuffs/algo/moeoSolAlgo.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/algo/moeoTS.h b/trunk/moeo/src/scalarStuffs/algo/moeoTS.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/algo/moeoTS.h rename to trunk/moeo/src/scalarStuffs/algo/moeoTS.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/algo/moeoVFAS.h b/trunk/moeo/src/scalarStuffs/algo/moeoVFAS.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/algo/moeoVFAS.h rename to trunk/moeo/src/scalarStuffs/algo/moeoVFAS.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/algo/moeoVNS.h b/trunk/moeo/src/scalarStuffs/algo/moeoVNS.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/algo/moeoVNS.h rename to trunk/moeo/src/scalarStuffs/algo/moeoVNS.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/archive/moeoArchiveIndex.h b/trunk/moeo/src/scalarStuffs/archive/moeoArchiveIndex.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/archive/moeoArchiveIndex.h rename to trunk/moeo/src/scalarStuffs/archive/moeoArchiveIndex.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/archive/moeoIndexedArchive.h b/trunk/moeo/src/scalarStuffs/archive/moeoIndexedArchive.h similarity index 98% rename from trunk/paradiseo-moeo/src/scalarStuffs/archive/moeoIndexedArchive.h rename to trunk/moeo/src/scalarStuffs/archive/moeoIndexedArchive.h index 3e2c574dc..a70eb3393 100755 --- a/trunk/paradiseo-moeo/src/scalarStuffs/archive/moeoIndexedArchive.h +++ b/trunk/moeo/src/scalarStuffs/archive/moeoIndexedArchive.h @@ -45,7 +45,7 @@ class moeoIndexedArchive : public moeoArchive < MOEOT > for (unsigned int i=0;ipush_back(_moeo); return true; } } diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/archive/moeoQuadTree.h b/trunk/moeo/src/scalarStuffs/archive/moeoQuadTree.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/archive/moeoQuadTree.h rename to trunk/moeo/src/scalarStuffs/archive/moeoQuadTree.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/archive/moeoQuadTreeArchive.h b/trunk/moeo/src/scalarStuffs/archive/moeoQuadTreeArchive.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/archive/moeoQuadTreeArchive.h rename to trunk/moeo/src/scalarStuffs/archive/moeoQuadTreeArchive.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/archive/moeoQuickUnboundedArchiveIndex.h b/trunk/moeo/src/scalarStuffs/archive/moeoQuickUnboundedArchiveIndex.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/archive/moeoQuickUnboundedArchiveIndex.h rename to trunk/moeo/src/scalarStuffs/archive/moeoQuickUnboundedArchiveIndex.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/distance/moeoAchievementScalarizingFunctionDistance.h b/trunk/moeo/src/scalarStuffs/distance/moeoAchievementScalarizingFunctionDistance.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/distance/moeoAchievementScalarizingFunctionDistance.h rename to trunk/moeo/src/scalarStuffs/distance/moeoAchievementScalarizingFunctionDistance.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/distance/moeoAugmentedAchievementScalarizingFunctionDistance.h b/trunk/moeo/src/scalarStuffs/distance/moeoAugmentedAchievementScalarizingFunctionDistance.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/distance/moeoAugmentedAchievementScalarizingFunctionDistance.h rename to trunk/moeo/src/scalarStuffs/distance/moeoAugmentedAchievementScalarizingFunctionDistance.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/distance/moeoAugmentedWeightedChebychevDistance.h b/trunk/moeo/src/scalarStuffs/distance/moeoAugmentedWeightedChebychevDistance.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/distance/moeoAugmentedWeightedChebychevDistance.h rename to trunk/moeo/src/scalarStuffs/distance/moeoAugmentedWeightedChebychevDistance.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/distance/moeoWeightedChebychevDistance.h b/trunk/moeo/src/scalarStuffs/distance/moeoWeightedChebychevDistance.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/distance/moeoWeightedChebychevDistance.h rename to trunk/moeo/src/scalarStuffs/distance/moeoWeightedChebychevDistance.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/explorer/moeoHCMoveLoopExpl.h b/trunk/moeo/src/scalarStuffs/explorer/moeoHCMoveLoopExpl.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/explorer/moeoHCMoveLoopExpl.h rename to trunk/moeo/src/scalarStuffs/explorer/moeoHCMoveLoopExpl.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/explorer/moeoTSMoveLoopExpl.h b/trunk/moeo/src/scalarStuffs/explorer/moeoTSMoveLoopExpl.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/explorer/moeoTSMoveLoopExpl.h rename to trunk/moeo/src/scalarStuffs/explorer/moeoTSMoveLoopExpl.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/fitness/moeoAchievementFitnessAssignment.h b/trunk/moeo/src/scalarStuffs/fitness/moeoAchievementFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/fitness/moeoAchievementFitnessAssignment.h rename to trunk/moeo/src/scalarStuffs/fitness/moeoAchievementFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/fitness/moeoAchievementScalarizingFunctionMetricFitnessAssignment.h b/trunk/moeo/src/scalarStuffs/fitness/moeoAchievementScalarizingFunctionMetricFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/fitness/moeoAchievementScalarizingFunctionMetricFitnessAssignment.h rename to trunk/moeo/src/scalarStuffs/fitness/moeoAchievementScalarizingFunctionMetricFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/fitness/moeoAugmentedAchievementScalarizingFunctionMetricFitnessAssignment.h b/trunk/moeo/src/scalarStuffs/fitness/moeoAugmentedAchievementScalarizingFunctionMetricFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/fitness/moeoAugmentedAchievementScalarizingFunctionMetricFitnessAssignment.h rename to trunk/moeo/src/scalarStuffs/fitness/moeoAugmentedAchievementScalarizingFunctionMetricFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/fitness/moeoAugmentedWeightedChebychevMetricFitnessAssignment.h b/trunk/moeo/src/scalarStuffs/fitness/moeoAugmentedWeightedChebychevMetricFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/fitness/moeoAugmentedWeightedChebychevMetricFitnessAssignment.h rename to trunk/moeo/src/scalarStuffs/fitness/moeoAugmentedWeightedChebychevMetricFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/fitness/moeoIncrEvalSingleObjectivizer.h b/trunk/moeo/src/scalarStuffs/fitness/moeoIncrEvalSingleObjectivizer.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/fitness/moeoIncrEvalSingleObjectivizer.h rename to trunk/moeo/src/scalarStuffs/fitness/moeoIncrEvalSingleObjectivizer.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/fitness/moeoMetricFitnessAssignment.h b/trunk/moeo/src/scalarStuffs/fitness/moeoMetricFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/fitness/moeoMetricFitnessAssignment.h rename to trunk/moeo/src/scalarStuffs/fitness/moeoMetricFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/fitness/moeoWeightedChebychevMetricFitnessAssignment.h b/trunk/moeo/src/scalarStuffs/fitness/moeoWeightedChebychevMetricFitnessAssignment.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/fitness/moeoWeightedChebychevMetricFitnessAssignment.h rename to trunk/moeo/src/scalarStuffs/fitness/moeoWeightedChebychevMetricFitnessAssignment.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoAnytimeWeightStrategy.h b/trunk/moeo/src/scalarStuffs/weighting/moeoAnytimeWeightStrategy.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoAnytimeWeightStrategy.h rename to trunk/moeo/src/scalarStuffs/weighting/moeoAnytimeWeightStrategy.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoAugmentedQexploreWeightStrategy.h b/trunk/moeo/src/scalarStuffs/weighting/moeoAugmentedQexploreWeightStrategy.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoAugmentedQexploreWeightStrategy.h rename to trunk/moeo/src/scalarStuffs/weighting/moeoAugmentedQexploreWeightStrategy.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoDichoWeightStrategy.h b/trunk/moeo/src/scalarStuffs/weighting/moeoDichoWeightStrategy.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoDichoWeightStrategy.h rename to trunk/moeo/src/scalarStuffs/weighting/moeoDichoWeightStrategy.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoDummyRefPointStrategy.h b/trunk/moeo/src/scalarStuffs/weighting/moeoDummyRefPointStrategy.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoDummyRefPointStrategy.h rename to trunk/moeo/src/scalarStuffs/weighting/moeoDummyRefPointStrategy.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoDummyWeightStrategy.h b/trunk/moeo/src/scalarStuffs/weighting/moeoDummyWeightStrategy.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoDummyWeightStrategy.h rename to trunk/moeo/src/scalarStuffs/weighting/moeoDummyWeightStrategy.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoFixedTimeBothDirectionWeightStrategy.h b/trunk/moeo/src/scalarStuffs/weighting/moeoFixedTimeBothDirectionWeightStrategy.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoFixedTimeBothDirectionWeightStrategy.h rename to trunk/moeo/src/scalarStuffs/weighting/moeoFixedTimeBothDirectionWeightStrategy.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoFixedTimeOneDirectionWeightStrategy.h b/trunk/moeo/src/scalarStuffs/weighting/moeoFixedTimeOneDirectionWeightStrategy.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoFixedTimeOneDirectionWeightStrategy.h rename to trunk/moeo/src/scalarStuffs/weighting/moeoFixedTimeOneDirectionWeightStrategy.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoQexploreWeightStrategy.h b/trunk/moeo/src/scalarStuffs/weighting/moeoQexploreWeightStrategy.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoQexploreWeightStrategy.h rename to trunk/moeo/src/scalarStuffs/weighting/moeoQexploreWeightStrategy.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoRandWeightStrategy.h b/trunk/moeo/src/scalarStuffs/weighting/moeoRandWeightStrategy.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoRandWeightStrategy.h rename to trunk/moeo/src/scalarStuffs/weighting/moeoRandWeightStrategy.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoVariableRefPointStrategy.h b/trunk/moeo/src/scalarStuffs/weighting/moeoVariableRefPointStrategy.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoVariableRefPointStrategy.h rename to trunk/moeo/src/scalarStuffs/weighting/moeoVariableRefPointStrategy.h diff --git a/trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoVariableWeightStrategy.h b/trunk/moeo/src/scalarStuffs/weighting/moeoVariableWeightStrategy.h similarity index 100% rename from trunk/paradiseo-moeo/src/scalarStuffs/weighting/moeoVariableWeightStrategy.h rename to trunk/moeo/src/scalarStuffs/weighting/moeoVariableWeightStrategy.h diff --git a/trunk/paradiseo-moeo/src/selection/moeoDetArchiveSelect.h b/trunk/moeo/src/selection/moeoDetArchiveSelect.h similarity index 100% rename from trunk/paradiseo-moeo/src/selection/moeoDetArchiveSelect.h rename to trunk/moeo/src/selection/moeoDetArchiveSelect.h diff --git a/trunk/paradiseo-moeo/src/selection/moeoDetTournamentSelect.h b/trunk/moeo/src/selection/moeoDetTournamentSelect.h similarity index 100% rename from trunk/paradiseo-moeo/src/selection/moeoDetTournamentSelect.h rename to trunk/moeo/src/selection/moeoDetTournamentSelect.h diff --git a/trunk/paradiseo-moeo/src/selection/moeoExhaustiveUnvisitedSelect.h b/trunk/moeo/src/selection/moeoExhaustiveUnvisitedSelect.h similarity index 100% rename from trunk/paradiseo-moeo/src/selection/moeoExhaustiveUnvisitedSelect.h rename to trunk/moeo/src/selection/moeoExhaustiveUnvisitedSelect.h diff --git a/trunk/paradiseo-moeo/src/selection/moeoNumberUnvisitedSelect.h b/trunk/moeo/src/selection/moeoNumberUnvisitedSelect.h similarity index 100% rename from trunk/paradiseo-moeo/src/selection/moeoNumberUnvisitedSelect.h rename to trunk/moeo/src/selection/moeoNumberUnvisitedSelect.h diff --git a/trunk/paradiseo-moeo/src/selection/moeoRandomSelect.h b/trunk/moeo/src/selection/moeoRandomSelect.h similarity index 100% rename from trunk/paradiseo-moeo/src/selection/moeoRandomSelect.h rename to trunk/moeo/src/selection/moeoRandomSelect.h diff --git a/trunk/paradiseo-moeo/src/selection/moeoRouletteSelect.h b/trunk/moeo/src/selection/moeoRouletteSelect.h similarity index 100% rename from trunk/paradiseo-moeo/src/selection/moeoRouletteSelect.h rename to trunk/moeo/src/selection/moeoRouletteSelect.h diff --git a/trunk/paradiseo-moeo/src/selection/moeoSelectFromPopAndArch.h b/trunk/moeo/src/selection/moeoSelectFromPopAndArch.h similarity index 100% rename from trunk/paradiseo-moeo/src/selection/moeoSelectFromPopAndArch.h rename to trunk/moeo/src/selection/moeoSelectFromPopAndArch.h diff --git a/trunk/paradiseo-moeo/src/selection/moeoSelectOne.h b/trunk/moeo/src/selection/moeoSelectOne.h similarity index 100% rename from trunk/paradiseo-moeo/src/selection/moeoSelectOne.h rename to trunk/moeo/src/selection/moeoSelectOne.h diff --git a/trunk/paradiseo-moeo/src/selection/moeoSelectors.h b/trunk/moeo/src/selection/moeoSelectors.h similarity index 100% rename from trunk/paradiseo-moeo/src/selection/moeoSelectors.h rename to trunk/moeo/src/selection/moeoSelectors.h diff --git a/trunk/paradiseo-moeo/src/selection/moeoStochTournamentSelect.h b/trunk/moeo/src/selection/moeoStochTournamentSelect.h similarity index 100% rename from trunk/paradiseo-moeo/src/selection/moeoStochTournamentSelect.h rename to trunk/moeo/src/selection/moeoStochTournamentSelect.h diff --git a/trunk/paradiseo-moeo/src/selection/moeoUnvisitedSelect.h b/trunk/moeo/src/selection/moeoUnvisitedSelect.h similarity index 100% rename from trunk/paradiseo-moeo/src/selection/moeoUnvisitedSelect.h rename to trunk/moeo/src/selection/moeoUnvisitedSelect.h diff --git a/trunk/paradiseo-moeo/src/utils/moeoArchiveObjectiveVectorSavingUpdater.h b/trunk/moeo/src/utils/moeoArchiveObjectiveVectorSavingUpdater.h similarity index 100% rename from trunk/paradiseo-moeo/src/utils/moeoArchiveObjectiveVectorSavingUpdater.h rename to trunk/moeo/src/utils/moeoArchiveObjectiveVectorSavingUpdater.h diff --git a/trunk/paradiseo-moeo/src/utils/moeoArchiveUpdater.h b/trunk/moeo/src/utils/moeoArchiveUpdater.h similarity index 100% rename from trunk/paradiseo-moeo/src/utils/moeoArchiveUpdater.h rename to trunk/moeo/src/utils/moeoArchiveUpdater.h diff --git a/trunk/paradiseo-moeo/src/utils/moeoAverageObjVecStat.h b/trunk/moeo/src/utils/moeoAverageObjVecStat.h similarity index 100% rename from trunk/paradiseo-moeo/src/utils/moeoAverageObjVecStat.h rename to trunk/moeo/src/utils/moeoAverageObjVecStat.h diff --git a/trunk/paradiseo-moeo/src/utils/moeoBestObjVecStat.h b/trunk/moeo/src/utils/moeoBestObjVecStat.h similarity index 100% rename from trunk/paradiseo-moeo/src/utils/moeoBestObjVecStat.h rename to trunk/moeo/src/utils/moeoBestObjVecStat.h diff --git a/trunk/paradiseo-moeo/src/utils/moeoBinaryMetricSavingUpdater.h b/trunk/moeo/src/utils/moeoBinaryMetricSavingUpdater.h similarity index 100% rename from trunk/paradiseo-moeo/src/utils/moeoBinaryMetricSavingUpdater.h rename to trunk/moeo/src/utils/moeoBinaryMetricSavingUpdater.h diff --git a/trunk/paradiseo-moeo/src/utils/moeoConvertPopToObjectiveVectors.h b/trunk/moeo/src/utils/moeoConvertPopToObjectiveVectors.h similarity index 100% rename from trunk/paradiseo-moeo/src/utils/moeoConvertPopToObjectiveVectors.h rename to trunk/moeo/src/utils/moeoConvertPopToObjectiveVectors.h diff --git a/trunk/paradiseo-moeo/src/utils/moeoDominanceMatrix.h b/trunk/moeo/src/utils/moeoDominanceMatrix.h similarity index 100% rename from trunk/paradiseo-moeo/src/utils/moeoDominanceMatrix.h rename to trunk/moeo/src/utils/moeoDominanceMatrix.h diff --git a/trunk/paradiseo-moeo/src/utils/moeoFullEvalByCopy.h b/trunk/moeo/src/utils/moeoFullEvalByCopy.h similarity index 100% rename from trunk/paradiseo-moeo/src/utils/moeoFullEvalByCopy.h rename to trunk/moeo/src/utils/moeoFullEvalByCopy.h diff --git a/trunk/paradiseo-moeo/src/utils/moeoObjVecStat.h b/trunk/moeo/src/utils/moeoObjVecStat.h similarity index 100% rename from trunk/paradiseo-moeo/src/utils/moeoObjVecStat.h rename to trunk/moeo/src/utils/moeoObjVecStat.h diff --git a/trunk/paradiseo-moeo/src/utils/moeoObjectiveVectorNormalizer.h b/trunk/moeo/src/utils/moeoObjectiveVectorNormalizer.h similarity index 100% rename from trunk/paradiseo-moeo/src/utils/moeoObjectiveVectorNormalizer.h rename to trunk/moeo/src/utils/moeoObjectiveVectorNormalizer.h diff --git a/trunk/moeo/test/CMakeLists.txt b/trunk/moeo/test/CMakeLists.txt new file mode 100644 index 000000000..49130ea3e --- /dev/null +++ b/trunk/moeo/test/CMakeLists.txt @@ -0,0 +1,86 @@ +###################################################################################### +### 0) Include headers +###################################################################################### + +include_directories(${EO_SRC_DIR}/src) +include_directories(${MO_SRC_DIR}/src) +include_directories(${MOEO_SRC_DIR}/src) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + + +###################################################################################### +### 1) Define test list +###################################################################################### + +set(TEST_LIST + t-moeo + t-moeoBitVector + t-moeoRealVector + t-moeoUnboundedArchive + t-moeoParetoObjectiveVectorComparator + t-moeoStrictObjectiveVectorComparator + t-moeoWeakObjectiveVectorComparator + t-moeoEpsilonObjectiveVectorComparator + #t-moeoAggregativeComparator # TEMPORARLY BYPASSED + #t-moeoDiversityThenFitnessComparator # IDEM. + #t-moeoFitnessThenDiversityComparator # IDEM + t-moeoAchievementFitnessAssignment + t-moeoExpBinaryIndicatorBasedFitnessAssignment + t-moeoCrowdingDiversityAssignment + t-moeoSharingDiversityAssignment + t-moeoIBEA + t-moeoNSGA + t-moeoNSGAII + t-moeoSEEA + t-moeoMax3Obj + t-moeoEasyEA + t-moeoDominanceCountFitnessAssignment + t-moeoDominanceRankFitnessAssignment + t-moeoDominanceCountRankingFitnessAssignment + t-moeoDominanceDepthFitnessAssignment + t-moeoNearestNeighborDiversityAssignment + t-moeoSPEA2Archive + t-moeoSPEA2 + t-moeoDominanceMatrix + t-moeoVecVsVecAdditiveEpsilonBinaryMetric + t-moeoVecVsVecMultiplicativeEpsilonBinaryMetric + t-moeoHyperVolumeMetric + t-moeoHyperVolumeDifferenceMetric + t-moeoIntVector + t-moeoImprOnlyBoundedArchive + t-moeoFitDivBoundedArchive + t-moeoDetArchiveSelect + t-moeoASEEA + t-moeoEpsilonHyperboxArchive + #t-moeoQuadTreeIndex + #t-moeoQuickUnboundedArchiveIndex + t-moeoAggregationFitnessAssignment + t-moeoConstraintFitnessAssignment + t-moeoChebyshevMetric + t-moeoChebyshevOrientedMetric + t-moeoASFAMetric + t-moeoASFAOrMetric + t-moeoExhaustiveNeighborhoodExplorer + t-moeoFirstImprovingNeighborhoodExplorer + t-moeoSimpleSubNeighborhoodExplorer + t-moeoNoDesimprovingNeighborhoodExplorer + t-moeoPLS1 + t-moeoPLS2 + t-moeoExhaustiveUnvisitedSelect + t-moeoNumberUnvisitedSelect + t-moeoDMLSMonOp + t-moeoDMLSGenUpdater + t-moeo2DMinHypervolumeArchive +) + +###################################################################################### +### 3) Create each test +###################################################################################### + +foreach (test ${TEST_LIST}) + set("T_${test}_SOURCES" "${test}.cpp") + add_executable(${test} ${T_${test}_SOURCES}) + add_test(${test} ${test}) + target_link_libraries(${test} moeo ga es eoutils eo) + install(TARGETS ${test} RUNTIME DESTINATION share${INSTALL_SUB_DIR}/moeo/test COMPONENT tests) +endforeach (test) diff --git a/trunk/paradiseo-moeo/test/moeoTestClass.h b/trunk/moeo/test/moeoTestClass.h similarity index 100% rename from trunk/paradiseo-moeo/test/moeoTestClass.h rename to trunk/moeo/test/moeoTestClass.h diff --git a/trunk/paradiseo-moeo/test/t-moeo.cpp b/trunk/moeo/test/t-moeo.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeo.cpp rename to trunk/moeo/test/t-moeo.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeo2DMinHypervolumeArchive.cpp b/trunk/moeo/test/t-moeo2DMinHypervolumeArchive.cpp similarity index 97% rename from trunk/paradiseo-moeo/test/t-moeo2DMinHypervolumeArchive.cpp rename to trunk/moeo/test/t-moeo2DMinHypervolumeArchive.cpp index 952934884..f90b9940b 100644 --- a/trunk/paradiseo-moeo/test/t-moeo2DMinHypervolumeArchive.cpp +++ b/trunk/moeo/test/t-moeo2DMinHypervolumeArchive.cpp @@ -86,7 +86,7 @@ int main() a.objectiveVector(obj); // archive - moeo2DMinHypervolumeArchive< Solution > arch(5,1000); + moeo2DMinHypervolumeArchive arch(5,1000); //test archive pop.push_back(a); @@ -163,7 +163,7 @@ int main() std::cout << std::endl; } - moeo2DMinHypervolumeArchive< Solution >::iterator it; + moeo2DMinHypervolumeArchive::iterator it; it=arch.begin(); assert(it->objectiveVector()[0]==15); assert(it->objectiveVector()[1]==3.5); diff --git a/trunk/paradiseo-moeo/test/t-moeoASEEA.cpp b/trunk/moeo/test/t-moeoASEEA.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoASEEA.cpp rename to trunk/moeo/test/t-moeoASEEA.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoASFAMetric.cpp b/trunk/moeo/test/t-moeoASFAMetric.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoASFAMetric.cpp rename to trunk/moeo/test/t-moeoASFAMetric.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoASFAOrMetric.cpp b/trunk/moeo/test/t-moeoASFAOrMetric.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoASFAOrMetric.cpp rename to trunk/moeo/test/t-moeoASFAOrMetric.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoAchievementFitnessAssignment.cpp b/trunk/moeo/test/t-moeoAchievementFitnessAssignment.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoAchievementFitnessAssignment.cpp rename to trunk/moeo/test/t-moeoAchievementFitnessAssignment.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoAggregationFitnessAssignment.cpp b/trunk/moeo/test/t-moeoAggregationFitnessAssignment.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoAggregationFitnessAssignment.cpp rename to trunk/moeo/test/t-moeoAggregationFitnessAssignment.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoAggregativeComparator.cpp b/trunk/moeo/test/t-moeoAggregativeComparator.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoAggregativeComparator.cpp rename to trunk/moeo/test/t-moeoAggregativeComparator.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoAggregativeFitnessAssignment.cpp b/trunk/moeo/test/t-moeoAggregativeFitnessAssignment.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoAggregativeFitnessAssignment.cpp rename to trunk/moeo/test/t-moeoAggregativeFitnessAssignment.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoBitVector.cpp b/trunk/moeo/test/t-moeoBitVector.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoBitVector.cpp rename to trunk/moeo/test/t-moeoBitVector.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoBoundedArchive.cpp b/trunk/moeo/test/t-moeoBoundedArchive.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoBoundedArchive.cpp rename to trunk/moeo/test/t-moeoBoundedArchive.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoChebyshevMetric.cpp b/trunk/moeo/test/t-moeoChebyshevMetric.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoChebyshevMetric.cpp rename to trunk/moeo/test/t-moeoChebyshevMetric.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoChebyshevOrientedMetric.cpp b/trunk/moeo/test/t-moeoChebyshevOrientedMetric.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoChebyshevOrientedMetric.cpp rename to trunk/moeo/test/t-moeoChebyshevOrientedMetric.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoConstraintFitnessAssignment.cpp b/trunk/moeo/test/t-moeoConstraintFitnessAssignment.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoConstraintFitnessAssignment.cpp rename to trunk/moeo/test/t-moeoConstraintFitnessAssignment.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoCrowdingDiversityAssignment.cpp b/trunk/moeo/test/t-moeoCrowdingDiversityAssignment.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoCrowdingDiversityAssignment.cpp rename to trunk/moeo/test/t-moeoCrowdingDiversityAssignment.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoDMLSGenUpdater.cpp b/trunk/moeo/test/t-moeoDMLSGenUpdater.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoDMLSGenUpdater.cpp rename to trunk/moeo/test/t-moeoDMLSGenUpdater.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoDMLSMonOp.cpp b/trunk/moeo/test/t-moeoDMLSMonOp.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoDMLSMonOp.cpp rename to trunk/moeo/test/t-moeoDMLSMonOp.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoDetArchiveSelect.cpp b/trunk/moeo/test/t-moeoDetArchiveSelect.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoDetArchiveSelect.cpp rename to trunk/moeo/test/t-moeoDetArchiveSelect.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoDiversityThenFitnessComparator.cpp b/trunk/moeo/test/t-moeoDiversityThenFitnessComparator.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoDiversityThenFitnessComparator.cpp rename to trunk/moeo/test/t-moeoDiversityThenFitnessComparator.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoDominanceCountFitnessAssignment.cpp b/trunk/moeo/test/t-moeoDominanceCountFitnessAssignment.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoDominanceCountFitnessAssignment.cpp rename to trunk/moeo/test/t-moeoDominanceCountFitnessAssignment.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoDominanceCountRankingFitnessAssignment.cpp b/trunk/moeo/test/t-moeoDominanceCountRankingFitnessAssignment.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoDominanceCountRankingFitnessAssignment.cpp rename to trunk/moeo/test/t-moeoDominanceCountRankingFitnessAssignment.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoDominanceDepthFitnessAssignment.cpp b/trunk/moeo/test/t-moeoDominanceDepthFitnessAssignment.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoDominanceDepthFitnessAssignment.cpp rename to trunk/moeo/test/t-moeoDominanceDepthFitnessAssignment.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoDominanceMatrix.cpp b/trunk/moeo/test/t-moeoDominanceMatrix.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoDominanceMatrix.cpp rename to trunk/moeo/test/t-moeoDominanceMatrix.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoDominanceRankFitnessAssignment.cpp b/trunk/moeo/test/t-moeoDominanceRankFitnessAssignment.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoDominanceRankFitnessAssignment.cpp rename to trunk/moeo/test/t-moeoDominanceRankFitnessAssignment.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoEasyEA.cpp b/trunk/moeo/test/t-moeoEasyEA.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoEasyEA.cpp rename to trunk/moeo/test/t-moeoEasyEA.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoEpsilonHyperboxArchive.cpp b/trunk/moeo/test/t-moeoEpsilonHyperboxArchive.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoEpsilonHyperboxArchive.cpp rename to trunk/moeo/test/t-moeoEpsilonHyperboxArchive.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoEpsilonObjectiveVectorComparator.cpp b/trunk/moeo/test/t-moeoEpsilonObjectiveVectorComparator.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoEpsilonObjectiveVectorComparator.cpp rename to trunk/moeo/test/t-moeoEpsilonObjectiveVectorComparator.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoExhaustiveNeighborhoodExplorer.cpp b/trunk/moeo/test/t-moeoExhaustiveNeighborhoodExplorer.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoExhaustiveNeighborhoodExplorer.cpp rename to trunk/moeo/test/t-moeoExhaustiveNeighborhoodExplorer.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoExhaustiveUnvisitedSelect.cpp b/trunk/moeo/test/t-moeoExhaustiveUnvisitedSelect.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoExhaustiveUnvisitedSelect.cpp rename to trunk/moeo/test/t-moeoExhaustiveUnvisitedSelect.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoExpBinaryIndicatorBasedFitnessAssignment.cpp b/trunk/moeo/test/t-moeoExpBinaryIndicatorBasedFitnessAssignment.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoExpBinaryIndicatorBasedFitnessAssignment.cpp rename to trunk/moeo/test/t-moeoExpBinaryIndicatorBasedFitnessAssignment.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoFirstImprovingNeighborhoodExplorer.cpp b/trunk/moeo/test/t-moeoFirstImprovingNeighborhoodExplorer.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoFirstImprovingNeighborhoodExplorer.cpp rename to trunk/moeo/test/t-moeoFirstImprovingNeighborhoodExplorer.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoFitDivBoundedArchive.cpp b/trunk/moeo/test/t-moeoFitDivBoundedArchive.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoFitDivBoundedArchive.cpp rename to trunk/moeo/test/t-moeoFitDivBoundedArchive.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoFitnessThenDiversityComparator.cpp b/trunk/moeo/test/t-moeoFitnessThenDiversityComparator.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoFitnessThenDiversityComparator.cpp rename to trunk/moeo/test/t-moeoFitnessThenDiversityComparator.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoHyperVolumeDifferenceMetric.cpp b/trunk/moeo/test/t-moeoHyperVolumeDifferenceMetric.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoHyperVolumeDifferenceMetric.cpp rename to trunk/moeo/test/t-moeoHyperVolumeDifferenceMetric.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoHyperVolumeMetric.cpp b/trunk/moeo/test/t-moeoHyperVolumeMetric.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoHyperVolumeMetric.cpp rename to trunk/moeo/test/t-moeoHyperVolumeMetric.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoIBEA.cpp b/trunk/moeo/test/t-moeoIBEA.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoIBEA.cpp rename to trunk/moeo/test/t-moeoIBEA.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoImprOnlyBoundedArchive.cpp b/trunk/moeo/test/t-moeoImprOnlyBoundedArchive.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoImprOnlyBoundedArchive.cpp rename to trunk/moeo/test/t-moeoImprOnlyBoundedArchive.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoIntVector.cpp b/trunk/moeo/test/t-moeoIntVector.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoIntVector.cpp rename to trunk/moeo/test/t-moeoIntVector.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoMOGA.cpp b/trunk/moeo/test/t-moeoMOGA.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoMOGA.cpp rename to trunk/moeo/test/t-moeoMOGA.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoMax3Obj.cpp b/trunk/moeo/test/t-moeoMax3Obj.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoMax3Obj.cpp rename to trunk/moeo/test/t-moeoMax3Obj.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoNSGA.cpp b/trunk/moeo/test/t-moeoNSGA.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoNSGA.cpp rename to trunk/moeo/test/t-moeoNSGA.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoNSGAII.cpp b/trunk/moeo/test/t-moeoNSGAII.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoNSGAII.cpp rename to trunk/moeo/test/t-moeoNSGAII.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoNearestNeighborDiversityAssignment.cpp b/trunk/moeo/test/t-moeoNearestNeighborDiversityAssignment.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoNearestNeighborDiversityAssignment.cpp rename to trunk/moeo/test/t-moeoNearestNeighborDiversityAssignment.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoNoDesimprovingNeighborhoodExplorer.cpp b/trunk/moeo/test/t-moeoNoDesimprovingNeighborhoodExplorer.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoNoDesimprovingNeighborhoodExplorer.cpp rename to trunk/moeo/test/t-moeoNoDesimprovingNeighborhoodExplorer.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoNumberUnvisitedSelect.cpp b/trunk/moeo/test/t-moeoNumberUnvisitedSelect.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoNumberUnvisitedSelect.cpp rename to trunk/moeo/test/t-moeoNumberUnvisitedSelect.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoPLS1.cpp b/trunk/moeo/test/t-moeoPLS1.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoPLS1.cpp rename to trunk/moeo/test/t-moeoPLS1.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoPLS2.cpp b/trunk/moeo/test/t-moeoPLS2.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoPLS2.cpp rename to trunk/moeo/test/t-moeoPLS2.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoParetoObjectiveVectorComparator.cpp b/trunk/moeo/test/t-moeoParetoObjectiveVectorComparator.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoParetoObjectiveVectorComparator.cpp rename to trunk/moeo/test/t-moeoParetoObjectiveVectorComparator.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoQuadTreeArchive.cpp b/trunk/moeo/test/t-moeoQuadTreeArchive.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoQuadTreeArchive.cpp rename to trunk/moeo/test/t-moeoQuadTreeArchive.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoQuadTreeIndex.cpp b/trunk/moeo/test/t-moeoQuadTreeIndex.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoQuadTreeIndex.cpp rename to trunk/moeo/test/t-moeoQuadTreeIndex.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoQuickUnboundedArchiveIndex.cpp b/trunk/moeo/test/t-moeoQuickUnboundedArchiveIndex.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoQuickUnboundedArchiveIndex.cpp rename to trunk/moeo/test/t-moeoQuickUnboundedArchiveIndex.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoRealVector.cpp b/trunk/moeo/test/t-moeoRealVector.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoRealVector.cpp rename to trunk/moeo/test/t-moeoRealVector.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoSEEA.cpp b/trunk/moeo/test/t-moeoSEEA.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoSEEA.cpp rename to trunk/moeo/test/t-moeoSEEA.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoSPEA2.cpp b/trunk/moeo/test/t-moeoSPEA2.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoSPEA2.cpp rename to trunk/moeo/test/t-moeoSPEA2.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoSPEA2Archive.cpp b/trunk/moeo/test/t-moeoSPEA2Archive.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoSPEA2Archive.cpp rename to trunk/moeo/test/t-moeoSPEA2Archive.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoSharingDiversityAssignment.cpp b/trunk/moeo/test/t-moeoSharingDiversityAssignment.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoSharingDiversityAssignment.cpp rename to trunk/moeo/test/t-moeoSharingDiversityAssignment.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoSimpleSubNeighborhoodExplorer.cpp b/trunk/moeo/test/t-moeoSimpleSubNeighborhoodExplorer.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoSimpleSubNeighborhoodExplorer.cpp rename to trunk/moeo/test/t-moeoSimpleSubNeighborhoodExplorer.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoStrictObjectiveVectorComparator.cpp b/trunk/moeo/test/t-moeoStrictObjectiveVectorComparator.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoStrictObjectiveVectorComparator.cpp rename to trunk/moeo/test/t-moeoStrictObjectiveVectorComparator.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoUnboundedArchive.cpp b/trunk/moeo/test/t-moeoUnboundedArchive.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoUnboundedArchive.cpp rename to trunk/moeo/test/t-moeoUnboundedArchive.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoVecVsVecAdditiveEpsilonBinaryMetric.cpp b/trunk/moeo/test/t-moeoVecVsVecAdditiveEpsilonBinaryMetric.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoVecVsVecAdditiveEpsilonBinaryMetric.cpp rename to trunk/moeo/test/t-moeoVecVsVecAdditiveEpsilonBinaryMetric.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoVecVsVecMultiplicativeEpsilonBinaryMetric.cpp b/trunk/moeo/test/t-moeoVecVsVecMultiplicativeEpsilonBinaryMetric.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoVecVsVecMultiplicativeEpsilonBinaryMetric.cpp rename to trunk/moeo/test/t-moeoVecVsVecMultiplicativeEpsilonBinaryMetric.cpp diff --git a/trunk/paradiseo-moeo/test/t-moeoWeakObjectiveVectorComparator.cpp b/trunk/moeo/test/t-moeoWeakObjectiveVectorComparator.cpp similarity index 100% rename from trunk/paradiseo-moeo/test/t-moeoWeakObjectiveVectorComparator.cpp rename to trunk/moeo/test/t-moeoWeakObjectiveVectorComparator.cpp diff --git a/trunk/moeo/tutorial/CMakeLists.txt b/trunk/moeo/tutorial/CMakeLists.txt new file mode 100644 index 000000000..e18c0c2af --- /dev/null +++ b/trunk/moeo/tutorial/CMakeLists.txt @@ -0,0 +1,22 @@ +###################################################################################### +### 0) Include MO sources +###################################################################################### + +include_directories(${MO_SRC_DIR}/src) + +###################################################################################### +### 1) Define flowshop paths +###################################################################################### + +set(FLOWSHOP_SRC_DIR ${MOEO_SRC_DIR}/tutorial/examples/flowshop) +set(FLOWSHOP_BINARY_DIR ${MOEO_BIN_DIR}/tutorial/examples/flowshop) + +###################################################################################### +### 2) Include lessons subdirectories +###################################################################################### + +add_subdirectory(examples) +add_subdirectory(Lesson1) +add_subdirectory(Lesson2) +add_subdirectory(Lesson3) +add_subdirectory(Lesson4) diff --git a/trunk/moeo/tutorial/Lesson1/CMakeLists.txt b/trunk/moeo/tutorial/Lesson1/CMakeLists.txt new file mode 100644 index 000000000..2d4330139 --- /dev/null +++ b/trunk/moeo/tutorial/Lesson1/CMakeLists.txt @@ -0,0 +1,23 @@ +# Lesson 1 + +###################################################################################### +### 0) Define files +###################################################################################### + +set(files Sch1) + +###################################################################################### +### 1) Create the lesson +###################################################################################### + +add_lesson(moeo Lesson1 "${files}") + +###################################################################################### +### 2) Include dependencies +###################################################################################### + +include_directories(${EO_SRC_DIR}/src + ${EO_SRC_DIR}/utils + ${MOEO_SRC_DIR}/src) + + diff --git a/trunk/paradiseo-moeo/tutorial/Lesson1/Sch1.cpp b/trunk/moeo/tutorial/Lesson1/Sch1.cpp similarity index 100% rename from trunk/paradiseo-moeo/tutorial/Lesson1/Sch1.cpp rename to trunk/moeo/tutorial/Lesson1/Sch1.cpp diff --git a/trunk/paradiseo-moeo/tutorial/Lesson1/Sch1.param b/trunk/moeo/tutorial/Lesson1/Sch1.param similarity index 100% rename from trunk/paradiseo-moeo/tutorial/Lesson1/Sch1.param rename to trunk/moeo/tutorial/Lesson1/Sch1.param diff --git a/trunk/moeo/tutorial/Lesson2/CMakeLists.txt b/trunk/moeo/tutorial/Lesson2/CMakeLists.txt new file mode 100644 index 000000000..9482dfca9 --- /dev/null +++ b/trunk/moeo/tutorial/Lesson2/CMakeLists.txt @@ -0,0 +1,23 @@ +# Lesson 2 + +###################################################################################### +### 0) Define files +###################################################################################### + +set(files FlowShopEA) + +###################################################################################### +### 1) Create the lesson +###################################################################################### + +add_lesson(moeo Lesson2 "${files}") + +###################################################################################### +### 2) Include dependencies +###################################################################################### + +include_directories(${EO_SRC_DIR}/src) +include_directories(${MOEO_SRC_DIR}/src) +include_directories(${FLOWSHOP_SRC_DIR}) + +target_link_libraries(FlowShopEA moeo flowshop eo eoutils) diff --git a/trunk/paradiseo-moeo/tutorial/Lesson2/FlowShopEA.cpp b/trunk/moeo/tutorial/Lesson2/FlowShopEA.cpp similarity index 100% rename from trunk/paradiseo-moeo/tutorial/Lesson2/FlowShopEA.cpp rename to trunk/moeo/tutorial/Lesson2/FlowShopEA.cpp diff --git a/trunk/paradiseo-moeo/tutorial/Lesson2/FlowShopEA.param b/trunk/moeo/tutorial/Lesson2/FlowShopEA.param similarity index 100% rename from trunk/paradiseo-moeo/tutorial/Lesson2/FlowShopEA.param rename to trunk/moeo/tutorial/Lesson2/FlowShopEA.param diff --git a/trunk/moeo/tutorial/Lesson3/CMakeLists.txt b/trunk/moeo/tutorial/Lesson3/CMakeLists.txt new file mode 100644 index 000000000..c9b9cfd65 --- /dev/null +++ b/trunk/moeo/tutorial/Lesson3/CMakeLists.txt @@ -0,0 +1,23 @@ +# Lesson 3 + +###################################################################################### +### 0) Define files +###################################################################################### + +set(files FlowShopEA2) + +###################################################################################### +### 1) Create the lesson +###################################################################################### + +add_lesson(moeo Lesson3 "${files}") + +###################################################################################### +### 2) Include dependencies +###################################################################################### + +include_directories(${EO_SRC_DIR}/src) +include_directories(${MOEO_SRC_DIR}/src) +include_directories(${FLOWSHOP_SRC_DIR}) + +target_link_libraries(FlowShopEA2 moeo flowshop eo eoutils) diff --git a/trunk/paradiseo-moeo/tutorial/Lesson3/FlowShopEA2.cpp b/trunk/moeo/tutorial/Lesson3/FlowShopEA2.cpp similarity index 100% rename from trunk/paradiseo-moeo/tutorial/Lesson3/FlowShopEA2.cpp rename to trunk/moeo/tutorial/Lesson3/FlowShopEA2.cpp diff --git a/trunk/paradiseo-moeo/tutorial/Lesson3/FlowShopEA2.param b/trunk/moeo/tutorial/Lesson3/FlowShopEA2.param similarity index 100% rename from trunk/paradiseo-moeo/tutorial/Lesson3/FlowShopEA2.param rename to trunk/moeo/tutorial/Lesson3/FlowShopEA2.param diff --git a/trunk/moeo/tutorial/Lesson4/CMakeLists.txt b/trunk/moeo/tutorial/Lesson4/CMakeLists.txt new file mode 100644 index 000000000..b1f34d562 --- /dev/null +++ b/trunk/moeo/tutorial/Lesson4/CMakeLists.txt @@ -0,0 +1,23 @@ +# Lesson 4 + +###################################################################################### +### 0) Define files +###################################################################################### + +set(files FlowShopDMLS) + +###################################################################################### +### 1) Create the lesson +###################################################################################### + +add_lesson(moeo Lesson4 "${files}") + +include_directories(${EO_SRC_DIR}/src) +include_directories(${MOEO_SRC_DIR}/src) +include_directories(${FLOWSHOP_SRC_DIR}) + +###################################################################################### +### 2) Include dependencies +###################################################################################### + +target_link_libraries(FlowShopDMLS moeo flowshop eo eoutils) diff --git a/trunk/paradiseo-moeo/tutorial/Lesson4/FlowShopDMLS.cpp b/trunk/moeo/tutorial/Lesson4/FlowShopDMLS.cpp similarity index 100% rename from trunk/paradiseo-moeo/tutorial/Lesson4/FlowShopDMLS.cpp rename to trunk/moeo/tutorial/Lesson4/FlowShopDMLS.cpp diff --git a/trunk/paradiseo-moeo/tutorial/Lesson4/FlowShopDMLS.param b/trunk/moeo/tutorial/Lesson4/FlowShopDMLS.param similarity index 100% rename from trunk/paradiseo-moeo/tutorial/Lesson4/FlowShopDMLS.param rename to trunk/moeo/tutorial/Lesson4/FlowShopDMLS.param diff --git a/trunk/paradiseo-peo/src/rmc/CMakeLists.txt b/trunk/moeo/tutorial/examples/CMakeLists.txt similarity index 55% rename from trunk/paradiseo-peo/src/rmc/CMakeLists.txt rename to trunk/moeo/tutorial/examples/CMakeLists.txt index 360b37370..2dfd762a1 100644 --- a/trunk/paradiseo-peo/src/rmc/CMakeLists.txt +++ b/trunk/moeo/tutorial/examples/CMakeLists.txt @@ -1,9 +1,6 @@ - - ###################################################################################### -### 1) Where must cmake go now ? +### 0) Include subdirectories ###################################################################################### -ADD_SUBDIRECTORY(mpi) +add_subdirectory(flowshop) -###################################################################################### \ No newline at end of file diff --git a/trunk/moeo/tutorial/examples/flowshop/CMakeLists.txt b/trunk/moeo/tutorial/examples/flowshop/CMakeLists.txt new file mode 100644 index 000000000..32abd23d6 --- /dev/null +++ b/trunk/moeo/tutorial/examples/flowshop/CMakeLists.txt @@ -0,0 +1,55 @@ +###################################################################################### +### 0) Include lessons subdirectories +###################################################################################### + +include_directories(${EO_SRC_DIR}/src) +include_directories(${MOEO_SRC_DIR}/src) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +###################################################################################### +### 1) Link EO library +###################################################################################### + +link_directories(${EO_BIN_DIR}/lib) + +###################################################################################### +### 2) Define output paths +###################################################################################### + +set(FLOWSHOP_LIB_OUTPUT_PATH ${FLOWSHOP_BINARY_DIR}/lib) +set(LIBRARY_OUTPUT_PATH ${FLOWSHOP_LIB_OUTPUT_PATH}) + +###################################################################################### +### 3) Set flowshop sources +###################################################################################### + +set(FLOWSHOP_SOURCES + FlowShopBenchmarkParser.cpp + FlowShopEval.cpp + FlowShopObjectiveVectorTraits.cpp + FlowShopOpCrossoverQuad.cpp + FlowShop.cpp) + +###################################################################################### +### 4) Create flowshop library +###################################################################################### + +add_library(flowshop STATIC ${FLOWSHOP_SOURCES}) +add_dependencies(flowshop moeo) + +target_link_libraries(flowshop eo) + +install(TARGETS flowshop ARCHIVE DESTINATION ${LIB} COMPONENT libraries) + +###################################################################################### +### 5) Installing benchs +###################################################################################### + +install(DIRECTORY benchs DESTINATION include${INSTALL_SUB_DIR}/moeo/tutorial/flowshop COMPONENT tutorial) + +###################################################################################### +### 6) Look for headers +###################################################################################### + +file(GLOB HDRS *.h) +install(FILES ${HDRS} DESTINATION include${INSTALL_SUB_DIR}/moeo/tutorial/examples/flowshop COMPONENT headers) diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShop.cpp b/trunk/moeo/tutorial/examples/flowshop/FlowShop.cpp similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShop.cpp rename to trunk/moeo/tutorial/examples/flowshop/FlowShop.cpp diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShop.h b/trunk/moeo/tutorial/examples/flowshop/FlowShop.h similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShop.h rename to trunk/moeo/tutorial/examples/flowshop/FlowShop.h diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopBenchmarkParser.cpp b/trunk/moeo/tutorial/examples/flowshop/FlowShopBenchmarkParser.cpp similarity index 99% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopBenchmarkParser.cpp rename to trunk/moeo/tutorial/examples/flowshop/FlowShopBenchmarkParser.cpp index 6d9ab5925..f2de425a0 100644 --- a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopBenchmarkParser.cpp +++ b/trunk/moeo/tutorial/examples/flowshop/FlowShopBenchmarkParser.cpp @@ -36,7 +36,7 @@ //----------------------------------------------------------------------------- #include #include -#include +#include "FlowShopBenchmarkParser.h" FlowShopBenchmarkParser::FlowShopBenchmarkParser(const std::string _benchmarkFileName) { diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopBenchmarkParser.h b/trunk/moeo/tutorial/examples/flowshop/FlowShopBenchmarkParser.h similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopBenchmarkParser.h rename to trunk/moeo/tutorial/examples/flowshop/FlowShopBenchmarkParser.h diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopEval.cpp b/trunk/moeo/tutorial/examples/flowshop/FlowShopEval.cpp similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopEval.cpp rename to trunk/moeo/tutorial/examples/flowshop/FlowShopEval.cpp diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopEval.h b/trunk/moeo/tutorial/examples/flowshop/FlowShopEval.h similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopEval.h rename to trunk/moeo/tutorial/examples/flowshop/FlowShopEval.h diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopInit.h b/trunk/moeo/tutorial/examples/flowshop/FlowShopInit.h similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopInit.h rename to trunk/moeo/tutorial/examples/flowshop/FlowShopInit.h diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopObjectiveVector.h b/trunk/moeo/tutorial/examples/flowshop/FlowShopObjectiveVector.h similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopObjectiveVector.h rename to trunk/moeo/tutorial/examples/flowshop/FlowShopObjectiveVector.h diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopObjectiveVectorTraits.cpp b/trunk/moeo/tutorial/examples/flowshop/FlowShopObjectiveVectorTraits.cpp similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopObjectiveVectorTraits.cpp rename to trunk/moeo/tutorial/examples/flowshop/FlowShopObjectiveVectorTraits.cpp diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopObjectiveVectorTraits.h b/trunk/moeo/tutorial/examples/flowshop/FlowShopObjectiveVectorTraits.h similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopObjectiveVectorTraits.h rename to trunk/moeo/tutorial/examples/flowshop/FlowShopObjectiveVectorTraits.h diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopOpCrossoverQuad.cpp b/trunk/moeo/tutorial/examples/flowshop/FlowShopOpCrossoverQuad.cpp similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopOpCrossoverQuad.cpp rename to trunk/moeo/tutorial/examples/flowshop/FlowShopOpCrossoverQuad.cpp diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopOpCrossoverQuad.h b/trunk/moeo/tutorial/examples/flowshop/FlowShopOpCrossoverQuad.h similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopOpCrossoverQuad.h rename to trunk/moeo/tutorial/examples/flowshop/FlowShopOpCrossoverQuad.h diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopOpMutationExchange.h b/trunk/moeo/tutorial/examples/flowshop/FlowShopOpMutationExchange.h similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopOpMutationExchange.h rename to trunk/moeo/tutorial/examples/flowshop/FlowShopOpMutationExchange.h diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopOpMutationShift.h b/trunk/moeo/tutorial/examples/flowshop/FlowShopOpMutationShift.h similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/FlowShopOpMutationShift.h rename to trunk/moeo/tutorial/examples/flowshop/FlowShopOpMutationShift.h diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/020_05_01.txt b/trunk/moeo/tutorial/examples/flowshop/benchs/020_05_01.txt similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/020_05_01.txt rename to trunk/moeo/tutorial/examples/flowshop/benchs/020_05_01.txt diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/020_05_02.txt b/trunk/moeo/tutorial/examples/flowshop/benchs/020_05_02.txt similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/020_05_02.txt rename to trunk/moeo/tutorial/examples/flowshop/benchs/020_05_02.txt diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/020_10_01.txt b/trunk/moeo/tutorial/examples/flowshop/benchs/020_10_01.txt similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/020_10_01.txt rename to trunk/moeo/tutorial/examples/flowshop/benchs/020_10_01.txt diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/020_10_02.txt b/trunk/moeo/tutorial/examples/flowshop/benchs/020_10_02.txt similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/020_10_02.txt rename to trunk/moeo/tutorial/examples/flowshop/benchs/020_10_02.txt diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/020_20_01.txt b/trunk/moeo/tutorial/examples/flowshop/benchs/020_20_01.txt similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/020_20_01.txt rename to trunk/moeo/tutorial/examples/flowshop/benchs/020_20_01.txt diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/050_05_01.txt b/trunk/moeo/tutorial/examples/flowshop/benchs/050_05_01.txt similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/050_05_01.txt rename to trunk/moeo/tutorial/examples/flowshop/benchs/050_05_01.txt diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/050_10_01.txt b/trunk/moeo/tutorial/examples/flowshop/benchs/050_10_01.txt similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/050_10_01.txt rename to trunk/moeo/tutorial/examples/flowshop/benchs/050_10_01.txt diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/050_20_01.txt b/trunk/moeo/tutorial/examples/flowshop/benchs/050_20_01.txt similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/050_20_01.txt rename to trunk/moeo/tutorial/examples/flowshop/benchs/050_20_01.txt diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/100_05_01.txt b/trunk/moeo/tutorial/examples/flowshop/benchs/100_05_01.txt similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/100_05_01.txt rename to trunk/moeo/tutorial/examples/flowshop/benchs/100_05_01.txt diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/100_10_01.txt b/trunk/moeo/tutorial/examples/flowshop/benchs/100_10_01.txt similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/100_10_01.txt rename to trunk/moeo/tutorial/examples/flowshop/benchs/100_10_01.txt diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/100_20_01.txt b/trunk/moeo/tutorial/examples/flowshop/benchs/100_20_01.txt similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/100_20_01.txt rename to trunk/moeo/tutorial/examples/flowshop/benchs/100_20_01.txt diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/200_10_01.txt b/trunk/moeo/tutorial/examples/flowshop/benchs/200_10_01.txt similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/200_10_01.txt rename to trunk/moeo/tutorial/examples/flowshop/benchs/200_10_01.txt diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/README b/trunk/moeo/tutorial/examples/flowshop/benchs/README similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/benchs/README rename to trunk/moeo/tutorial/examples/flowshop/benchs/README diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/make_eval_FlowShop.h b/trunk/moeo/tutorial/examples/flowshop/make_eval_FlowShop.h similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/make_eval_FlowShop.h rename to trunk/moeo/tutorial/examples/flowshop/make_eval_FlowShop.h diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/make_genotype_FlowShop.h b/trunk/moeo/tutorial/examples/flowshop/make_genotype_FlowShop.h similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/make_genotype_FlowShop.h rename to trunk/moeo/tutorial/examples/flowshop/make_genotype_FlowShop.h diff --git a/trunk/paradiseo-moeo/tutorial/examples/flowshop/make_op_FlowShop.h b/trunk/moeo/tutorial/examples/flowshop/make_op_FlowShop.h similarity index 100% rename from trunk/paradiseo-moeo/tutorial/examples/flowshop/make_op_FlowShop.h rename to trunk/moeo/tutorial/examples/flowshop/make_op_FlowShop.h diff --git a/trunk/paradiseo-mo/AUTHORS b/trunk/paradiseo-mo/AUTHORS deleted file mode 100644 index c9f1498f0..000000000 --- a/trunk/paradiseo-mo/AUTHORS +++ /dev/null @@ -1,4 +0,0 @@ -Authors: - Sebastien Verel - Arnaud Liefooghe - Jérémie Humeau diff --git a/trunk/paradiseo-mo/CMakeLists.txt b/trunk/paradiseo-mo/CMakeLists.txt deleted file mode 100644 index 3b58ccd7f..000000000 --- a/trunk/paradiseo-mo/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - -########################################################################################################################################## -### 0) If you want to set your own variables in mo-conf.cmake and avoid the cmd line -########################################################################################################################################## - -INCLUDE(mo-conf.cmake OPTIONAL) - -########################################################################################################################################## - - -########################################################################################################################################## -### 1) Project properties -########################################################################################################################################## - -# set the project name -PROJECT(ParadisEO-MO) - -SET(PACKAGE_BUGREPORT "paradiseo-help@lists.gforge.inria.fr" CACHE STRING "Package bug report" FORCE) -SET(PACKAGE_NAME "ParadisEO-MO - Moving Objects" CACHE STRING "Package name" FORCE) -SET(PACKAGE_STRING "ParadisEO-MO 1.3" CACHE STRING "MO Package string full name" FORCE) -SET(PACKAGE_VERSION "1.3" CACHE STRING "Package version" FORCE) -SET(GLOBAL_VERSION "1.3" CACHE STRING "Global version" FORCE) -SET(VERSION "1.3.0" CACHE STRING "Version" FORCE) -########################################################################################################################################## - - -########################################################################################################################################## -### 2) Include the common CMake configuration -########################################################################################################################################## - -# The "config" variable must be provided on the command line -IF(NOT DEFINED config OR NOT config) - MESSAGE(FATAL_ERROR "The \"config\" variable must be set on the command line to - give the path of the install configuration file. ") -ENDIF(NOT DEFINED config OR NOT config) - -# Need the config file whose full path is given thanks to the "config" variable -INCLUDE(${config}) - -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/CTestCustom.cmake - ${MO_BIN_DIR}/CTestCustom.cmake) -########################################################################################################################################## - diff --git a/trunk/paradiseo-mo/CTestCustom.cmake b/trunk/paradiseo-mo/CTestCustom.cmake deleted file mode 100644 index 61bcd9133..000000000 --- a/trunk/paradiseo-mo/CTestCustom.cmake +++ /dev/null @@ -1,7 +0,0 @@ -SET(CTEST_CUSTOM_COVERAGE_EXCLUDE - ${CTEST_CUSTOM_COVERAGE_EXCLUDE} -"test/" -"paradiseo-eo/" -"problems/" -"tutorial/" -) diff --git a/trunk/paradiseo-mo/README b/trunk/paradiseo-mo/README deleted file mode 100644 index e1308a753..000000000 --- a/trunk/paradiseo-mo/README +++ /dev/null @@ -1,79 +0,0 @@ - PARADISEO-MO README FILE -======================================================================= - -======================================================================= - -Welcome to PARADISEO-MO (Moving Objects), a part of the ParadisEO framework. - -======================================================================= - BUILDING PARADISEO-OLD-MO -======================================================================= -The basic installation procedure goes the following: - -To compile paradiseo-mo in the default directory, -go to paradiseo-mo/build/ and run: - > cmake ../ -Dconfig= - > make - // for an easy-use of the provided lessons - > make install - // optional (if the documentation is not already available) - > make doc - -To compile paradiseo-mo anywhere else, simply run: - > cmake $(MO) -Dconfig= - > make - // for an easy-use of the provided lessons - > make install - // optional (if the documentation is not already available) - > make doc - -where $(MO) is the top-level directory of PARADISEO-MO. - -To clean everything, simply run - > make clean - -====================================================================== - DIRECTORY STRUCTURE -====================================================================== -After unpacking the archive file, you should end up with the following -structure: - -.../ The MAIN PARADISEO-MO directory, created when unpacking. - | - +-- build Repertory where the executables will be produced. - | - | - +-- src SOURCE directory contains most PARADISEO-MO .h files. - | - | - +-- doc DOCUMENTATION directory (generated by Doxygen). - | | - | +- html HTML files - start at index.html. - | | - | +- latex latex files - use to generate Postcript doc. - | | - | +- man Unix man format documentation. - | - | - +-- tutorial TUTORIAL with lessons - | - +- Lesson1 How make a Hill Climbing. Example on the oneMax problem. - | - +- Lesson2 How make a Neighborhood. - | - +- Lesson3 How make a Simulated Annealing. Example on the QUEEN problem. - | - +- Lesson4 How make a Simple Tabu Search. Example on the QUEEN problem. - | - +- Lesson5 How make a Iterated Tabu Search on the QUEEN problem. - | - +- Lesson6 How make a Landscape analysis. - | - +- Lesson7 How make a Hybridization between a algorithm genetic and a local search. - - -=================================================================== - NOTES -=================================================================== - -Mailing list : paradiseo-help@lists.gforge.inria.fr diff --git a/trunk/paradiseo-mo/doc/CMakeLists.txt b/trunk/paradiseo-mo/doc/CMakeLists.txt deleted file mode 100755 index 8963a9ba5..000000000 --- a/trunk/paradiseo-mo/doc/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ - -########################################################################################## -### MO Doc generation using Doxygen -########################################################################################## - -IF (DOXYGEN_FOUND) - - SET(DOC_DIR ${CMAKE_BINARY_DIR}/doc CACHE PATH "MO documentation directory") - SET(MO_DOC_CONFIG_FILE "mo.doxyfile" CACHE PATH "MO documentation configuration file") - # define the doc target - IF (DOXYGEN_EXECUTABLE) - ADD_CUSTOM_TARGET(doc - COMMAND ${DOXYGEN_EXECUTABLE} ${MO_DOC_CONFIG_FILE} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - ENDIF (DOXYGEN_EXECUTABLE) - - # configure doxyfile file - CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/doc/${MO_DOC_CONFIG_FILE}.cmake" - "${CMAKE_BINARY_DIR}/doc/${MO_DOC_CONFIG_FILE}") - -ELSE (DOXYGEN_FOUND) - MESSAGE(STATUS "Unable to generate the documentation, Doxygen package not found") -ENDIF (DOXYGEN_FOUND) - -########################################################################################## diff --git a/trunk/paradiseo-mo/install.cmake b/trunk/paradiseo-mo/install.cmake deleted file mode 100644 index 8113a6dd7..000000000 --- a/trunk/paradiseo-mo/install.cmake +++ /dev/null @@ -1,130 +0,0 @@ -###################################################################################### -### CMake basic configuration -###################################################################################### - -# check cmake version compatibility -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - -# regular expression checking -INCLUDE_REGULAR_EXPRESSION("^.*$" "^$") - -# set a language for the entire project. -ENABLE_LANGUAGE(CXX) -ENABLE_LANGUAGE(C) - -#################################################################################### - - -##################################################################################### -### Include required modules & utilities -##################################################################################### -INCLUDE(CMakeBackwardCompatibilityCXX) - -INCLUDE(FindDoxygen) - -INCLUDE(FindGnuplot) - -INCLUDE(CheckLibraryExists) - -INCLUDE(Dart OPTIONAL) - -INCLUDE(CPack) - -# 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) -###################################################################################### - - -##################################################################################### -### Manage the build type -##################################################################################### - -# the user should choose the build type on windows environments,excepted under cygwin (default=none) -SET(CMAKE_DEFAULT_BUILD_TYPE "Release" CACHE STRING "Variable that stores the default CMake build type" FORCE) - -FIND_PROGRAM(MEMORYCHECK_COMMAND - NAMES purify valgrind - PATHS - "/usr/local/bin /usr/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder]" - DOC "Path to the memory checking command, used for memory error detection.") - -IF(NOT CMAKE_BUILD_TYPE) - SET( CMAKE_BUILD_TYPE - ${CMAKE_DEFAULT_BUILD_TYPE} CACHE STRING - "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." - FORCE) -ENDIF(NOT CMAKE_BUILD_TYPE) - -IF(WIN32 AND NOT CYGWIN) - IF(CMAKE_CXX_COMPILER MATCHES cl) - IF(NOT WITH_SHARED_LIBS) - IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SET(CMAKE_CXX_FLAGS "/nologo /Gy") - SET(CMAKE_CXX_FLAGS_DEBUG "/W3 /MTd /Z7 /Od") - SET(CMAKE_CXX_FLAGS_RELEASE "/w /MT /O2 /wd4530") - SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O2") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Z7 /Od") - SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE") - ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ENDIF(NOT WITH_SHARED_LIBS) - ENDIF(CMAKE_CXX_COMPILER MATCHES cl) -ELSE(WIN32 AND NOT CYGWIN) - IF(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fprofile-arcs -ftest-coverage -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers") - SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2") - SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -O6") - ENDIF(CMAKE_COMPILER_IS_GNUCXX) -ENDIF(WIN32 AND NOT CYGWIN) - -IF(CMAKE_BUILD_TYPE MATCHES Debug) - ADD_DEFINITIONS(-DCMAKE_VERBOSE_MAKEFILE=ON) -ENDIF(CMAKE_BUILD_TYPE MATCHES Debug) - -##################################################################################### - -###################################################################################### -### compilation of examples? -###################################################################################### - -SET(ENABLE_CMAKE_EXAMPLE TRUE CACHE BOOL "Enable copy of benchs and parameters file?") - -###################################################################################### -### Test config -###################################################################################### - -IF (ENABLE_CMAKE_TESTING OR ENABLE_MINIMAL_CMAKE_TESTING) - ENABLE_TESTING() -ENDIF (ENABLE_CMAKE_TESTING OR ENABLE_MINIMAL_CMAKE_TESTING) -###################################################################################### - -####################################################################################### -### Paths to EO, MO and MOEO must be specified above. -####################################################################################### - -SET(EO_SRC_DIR "${CMAKE_SOURCE_DIR}/../paradiseo-eo" CACHE PATH "ParadisEO-EO source directory" FORCE) -SET(EO_BIN_DIR "${CMAKE_BINARY_DIR}/../../paradiseo-eo/build" CACHE PATH "ParadisEO-EO binary directory" FORCE) - -SET(MO_SRC_DIR "${CMAKE_SOURCE_DIR}/../paradiseo-mo" CACHE PATH "ParadisMO-MO source directory" FORCE) -SET(MO_BIN_DIR "${CMAKE_BINARY_DIR}/../../paradiseo-mo/build" CACHE PATH "ParadisMO-MO binary directory" FORCE) - -SET(OLDMO_SRC_DIR "${CMAKE_SOURCE_DIR}/../paradiseo-old-mo" CACHE PATH "ParadisMO-MO source directory" FORCE) -SET(OLDMO_BIN_DIR "${CMAKE_BINARY_DIR}/../../paradiseo-old-mo/build" CACHE PATH "ParadisMO-MO binary directory" FORCE) - -SET(MOEO_SRC_DIR "${CMAKE_SOURCE_DIR}/../paradiseo-moeo" CACHE PATH "ParadisMOEO-MOEO source directory" FORCE) -SET(MOEO_BIN_DIR "${CMAKE_BINARY_DIR}/../../paradiseo-moeo/build" CACHE PATH "ParadisMOEO-MOEO binary directory" FORCE) - -SET(PROBLEMS_SRC_DIR "${CMAKE_SOURCE_DIR}/../problems" CACHE PATH "Problems dependant source directory" FORCE) - -###################################################################################### -###################################################################################### -### Subdirectories that CMake should process for MO, MOEO and PEO -###################################################################################### - -ADD_SUBDIRECTORY(doc) -ADD_SUBDIRECTORY(src) -ADD_SUBDIRECTORY(test) -ADD_SUBDIRECTORY(tutorial) -###################################################################################### - diff --git a/trunk/paradiseo-mo/src/CMakeLists.txt b/trunk/paradiseo-mo/src/CMakeLists.txt deleted file mode 100644 index d41d4587a..000000000 --- a/trunk/paradiseo-mo/src/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -############################################################### -# This is a dummy file -############################################################### diff --git a/trunk/paradiseo-mo/tutorial/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/CMakeLists.txt deleted file mode 100644 index 9abeb95b9..000000000 --- a/trunk/paradiseo-mo/tutorial/CMakeLists.txt +++ /dev/null @@ -1,432 +0,0 @@ -IF(ENABLE_CMAKE_EXAMPLE OR CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_simpleHC.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_simpleHC.param - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_firstImprHC.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_firstImprHC.param - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_randomBestHC.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_randomBestHC.param - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_neutralHC.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_neutralHC.param - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_iterContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_iterContinuator.param - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_fitContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_fitContinuator.param - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_fullEvalContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_fullEvalContinuator.param - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_evalContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_evalContinuator.param - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_combinedContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_combinedContinuator.param - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/firstImprHC_maxSAT.param - ${MO_BIN_DIR}/tutorial/Lesson1/firstImprHC_maxSAT.param - ) - - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson2/testNeighborhood.param - ${MO_BIN_DIR}/tutorial/Lesson2/testNeighborhood.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson3/testSimulatedAnnealing.param - ${MO_BIN_DIR}/tutorial/Lesson3/testSimulatedAnnealing.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson4/testSimpleTS.param - ${MO_BIN_DIR}/tutorial/Lesson4/testSimpleTS.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson5/testILS.param - ${MO_BIN_DIR}/tutorial/Lesson5/testILS.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/testRandomWalk.param - ${MO_BIN_DIR}/tutorial/Lesson6/testRandomWalk.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/testMetropolisHasting.param - ${MO_BIN_DIR}/tutorial/Lesson6/testMetropolisHasting.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/testRandomNeutralWalk.param - ${MO_BIN_DIR}/tutorial/Lesson6/testRandomNeutralWalk.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/sampling.param - ${MO_BIN_DIR}/tutorial/Lesson6/sampling.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/densityOfStates.param - ${MO_BIN_DIR}/tutorial/Lesson6/densityOfStates.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/autocorrelation.param - ${MO_BIN_DIR}/tutorial/Lesson6/autocorrelation.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/adaptiveWalks.param - ${MO_BIN_DIR}/tutorial/Lesson6/adaptiveWalks.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/fdc.param - ${MO_BIN_DIR}/tutorial/Lesson6/fdc.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/neutralDegree.param - ${MO_BIN_DIR}/tutorial/Lesson6/neutralDegree.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/fitnessCloud.param - ${MO_BIN_DIR}/tutorial/Lesson6/fitnessCloud.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/neutralWalk.param - ${MO_BIN_DIR}/tutorial/Lesson6/neutralWalk.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson7/hybridAlgo.param - ${MO_BIN_DIR}/tutorial/Lesson7/hybridAlgo.param - - ) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson9/VNS.param - ${MO_BIN_DIR}/tutorial/Lesson9/VNS.param - - ) - - -ENDIF(ENABLE_CMAKE_EXAMPLE OR CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -MACRO(ADD_COMMANDS_NEWMO) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_simpleHC.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_simpleHC.param - ${MO_BIN_DIR}/tutorial/Lesson1 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_firstImprHC.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_firstImprHC.param - ${MO_BIN_DIR}/tutorial/Lesson1 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_randomBestHC.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_randomBestHC.param - ${MO_BIN_DIR}/tutorial/Lesson1 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_neutralHC.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_neutralHC.param - ${MO_BIN_DIR}/tutorial/Lesson1 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_iterContinuator.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_iterContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_fitContinuator.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_fitContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_fullEvalContinuator.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_fullEvalContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_evalContinuator.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_evalContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_combinedContinuator.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/lesson1_combinedContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson1/firstImprHC_maxSAT.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson1/firstImprHC_maxSAT.param - ${MO_BIN_DIR}/tutorial/Lesson1 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson2/testNeighborhood.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson2/testNeighborhood.param - ${MO_BIN_DIR}/tutorial/Lesson2 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson3/testSimulatedAnnealing.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson3/testSimulatedAnnealing.param - ${MO_BIN_DIR}/tutorial/Lesson3 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson4/testSimpleTS.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson4/testSimpleTS.param - ${MO_BIN_DIR}/tutorial/Lesson4 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson5/testILS.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson5/testILS.param - ${MO_BIN_DIR}/tutorial/Lesson5 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson6/testRandomWalk.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/testRandomWalk.param - ${MO_BIN_DIR}/tutorial/Lesson6 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson6/testMetropolisHasting.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/testMetropolisHasting.param - ${MO_BIN_DIR}/tutorial/Lesson6 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson6/testRandomNeutralWalk.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/testRandomNeutralWalk.param - ${MO_BIN_DIR}/tutorial/Lesson6 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson6/sampling.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/sampling.param - ${MO_BIN_DIR}/tutorial/Lesson6 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson6/densityOfStates.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/densityOfStates.param - ${MO_BIN_DIR}/tutorial/Lesson6 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson6/fitnessCloud.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/fitnessCloud.param - ${MO_BIN_DIR}/tutorial/Lesson6 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson6/neutralWalk.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/neutralWalk.param - ${MO_BIN_DIR}/tutorial/Lesson6 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson6/autocorrelation.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/autocorrelation.param - ${MO_BIN_DIR}/tutorial/Lesson6 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson6/adaptiveWalks.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/adaptiveWalks.param - ${MO_BIN_DIR}/tutorial/Lesson6 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson6/fdc.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/fdc.param - ${MO_BIN_DIR}/tutorial/Lesson6 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson6/neutralDegree.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson6/neutralDegree.param - ${MO_BIN_DIR}/tutorial/Lesson6 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson7/hybridAlgo.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson7/hybridAlgo.param - ${MO_BIN_DIR}/tutorial/Lesson7 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson9/VNS.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson9/VNS.param - ${MO_BIN_DIR}/tutorial/Lesson9 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${MO_BIN_DIR}/tutorial/Lesson10/testKswapNeighborhood.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${MO_SRC_DIR}/tutorial/Lesson10/testKswapNeighborhood.param - ${MO_BIN_DIR}/tutorial/Lesson10 - ) - -ENDMACRO(ADD_COMMANDS_NEWMO) - -MACRO(ADD_TARGET_NEWMO n) - IF(${n} STREQUAL "lesson1") - ADD_CUSTOM_TARGET(lesson1 DEPENDS - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_simpleHC - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_simpleHC.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_firstImprHC - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_firstImprHC.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_randomBestHC - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_randomBestHC.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_neutralHC - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_neutralHC.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_iterContinuator - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_iterContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_fitContinuator - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_fitContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_fullEvalContinuator - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_fullEvalContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_evalContinuator - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_evalContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_combinedContinuator - ${MO_BIN_DIR}/tutorial/Lesson1/lesson1_combinedContinuator.param - ${MO_BIN_DIR}/tutorial/Lesson1/firstImprHC_maxSAT - ${MO_BIN_DIR}/tutorial/Lesson1/firstImprHC_maxSAT.param - ) - ELSEIF(${n} STREQUAL "lesson2") - ADD_CUSTOM_TARGET(lesson2 DEPENDS - ${MO_BIN_DIR}/tutorial/Lesson2/testNeighborhood - ${MO_BIN_DIR}/tutorial/Lesson2/testNeighborhood.param - ) - ELSEIF(${n} STREQUAL "lesson3") - ADD_CUSTOM_TARGET(lesson3 DEPENDS - ${MO_BIN_DIR}/tutorial/Lesson3/testSimulatedAnnealing - ${MO_BIN_DIR}/tutorial/Lesson3/testSimulatedAnnealing.param - ) - ELSEIF(${n} STREQUAL "lesson4") - ADD_CUSTOM_TARGET(lesson4 DEPENDS - ${MO_BIN_DIR}/tutorial/Lesson4/testSimpleTS - ${MO_BIN_DIR}/tutorial/Lesson4/testSimpleTS.param - ) - ELSEIF(${n} STREQUAL "lesson5") - ADD_CUSTOM_TARGET(lesson5 DEPENDS - ${MO_BIN_DIR}/tutorial/Lesson5/testILS - ${MO_BIN_DIR}/tutorial/Lesson5/testILS.param - ) - ELSEIF(${n} STREQUAL "lesson6") - ADD_CUSTOM_TARGET(lesson6 DEPENDS - ${MO_BIN_DIR}/tutorial/Lesson6/testRandomWalk - ${MO_BIN_DIR}/tutorial/Lesson6/testRandomWalk.param - ${MO_BIN_DIR}/tutorial/Lesson6/testMetropolisHasting - ${MO_BIN_DIR}/tutorial/Lesson6/testMetropolisHasting.param - ${MO_BIN_DIR}/tutorial/Lesson6/testRandomNeutralWalk - ${MO_BIN_DIR}/tutorial/Lesson6/testRandomNeutralWalk.param - ${MO_BIN_DIR}/tutorial/Lesson6/sampling - ${MO_BIN_DIR}/tutorial/Lesson6/sampling.param - ${MO_BIN_DIR}/tutorial/Lesson6/densityOfStates - ${MO_BIN_DIR}/tutorial/Lesson6/densityOfStates.param - ${MO_BIN_DIR}/tutorial/Lesson6/autocorrelation - ${MO_BIN_DIR}/tutorial/Lesson6/autocorrelation.param - ${MO_BIN_DIR}/tutorial/Lesson6/adaptiveWalks - ${MO_BIN_DIR}/tutorial/Lesson6/adaptiveWalks.param - ${MO_BIN_DIR}/tutorial/Lesson6/fdc - ${MO_BIN_DIR}/tutorial/Lesson6/fdc.param - ${MO_BIN_DIR}/tutorial/Lesson6/neutralDegree - ${MO_BIN_DIR}/tutorial/Lesson6/neutralDegree.param - ${MO_BIN_DIR}/tutorial/Lesson6/fitnessCloud - ${MO_BIN_DIR}/tutorial/Lesson6/fitnessCloud.param - ${MO_BIN_DIR}/tutorial/Lesson6/neutralWalk - ${MO_BIN_DIR}/tutorial/Lesson6/neutralWalk.param - - ) - ELSEIF(${n} STREQUAL "lesson7") - ADD_CUSTOM_TARGET(lesson7 DEPENDS - ${MO_BIN_DIR}/tutorial/Lesson7/hybridAlgo - ${MO_BIN_DIR}/tutorial/Lesson7/hybridAlgo.param - ) - ELSEIF(${n} STREQUAL "lesson9") - ADD_CUSTOM_TARGET(lesson9 DEPENDS - ${MO_BIN_DIR}/tutorial/Lesson9/VNS - ${MO_BIN_DIR}/tutorial/Lesson9/VNS.param - ) - ELSEIF(${n} STREQUAL "lesson10") - ADD_CUSTOM_TARGET(lesson10 DEPENDS - ${MO_BIN_DIR}/tutorial/Lesson10/testKswapNeighborhood - ${MO_BIN_DIR}/tutorial/Lesson10/testKswapNeighborhood.param - ) - ENDIF(${n} STREQUAL "lesson1") - -ENDMACRO(ADD_TARGET_NEWMO) - -ADD_SUBDIRECTORY(Lesson1) -ADD_SUBDIRECTORY(Lesson2) -ADD_SUBDIRECTORY(Lesson3) -ADD_SUBDIRECTORY(Lesson4) -ADD_SUBDIRECTORY(Lesson5) -ADD_SUBDIRECTORY(Lesson6) -ADD_SUBDIRECTORY(Lesson7) -ADD_SUBDIRECTORY(Lesson9) - -IF(NOT CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" AND NOT CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_NEWMO() - ADD_TARGET_NEWMO(install) -ENDIF(NOT CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" AND NOT CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson1/CMakeLists.txt deleted file mode 100644 index bb705f7a5..000000000 --- a/trunk/paradiseo-mo/tutorial/Lesson1/CMakeLists.txt +++ /dev/null @@ -1,113 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src - ${MO_SRC_DIR}/src - ${PROBLEMS_SRC_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../src) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib) - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES lesson1_simpleHC.cpp - lesson1_firstImprHC.cpp - lesson1_randomBestHC.cpp - lesson1_neutralHC.cpp - lesson1_iterContinuator.cpp - lesson1_fitContinuator.cpp - lesson1_fullEvalContinuator.cpp - lesson1_evalContinuator.cpp - lesson1_combinedContinuator.cpp - firstImprHC_maxSAT.cpp) - ADD_EXECUTABLE(lesson1_simpleHC - lesson1_simpleHC.cpp - ${MO_BIN_DIR}/tutorial/lesson1/lesson1_simpleHC.param - ) - ADD_EXECUTABLE(lesson1_firstImprHC - lesson1_firstImprHC.cpp - ${MO_BIN_DIR}/tutorial/lesson1/lesson1_firstImprHC.param - ) - ADD_EXECUTABLE(lesson1_randomBestHC - lesson1_randomBestHC.cpp - ${MO_BIN_DIR}/tutorial/lesson1/lesson1_randomBestHC.param - ) - ADD_EXECUTABLE(lesson1_neutralHC - lesson1_neutralHC.cpp - ${MO_BIN_DIR}/tutorial/lesson1/lesson1_neutralHC.param - ) - ADD_EXECUTABLE(lesson1_iterContinuator - lesson1_iterContinuator.cpp - ${MO_BIN_DIR}/tutorial/lesson1/lesson1_iterContinuator.param - ) - ADD_EXECUTABLE(lesson1_fitContinuator - lesson1_fitContinuator.cpp - ${MO_BIN_DIR}/tutorial/lesson1/lesson1_fitContinuator.param - ) - ADD_EXECUTABLE(lesson1_fullEvalContinuator - lesson1_fullEvalContinuator.cpp - ${MO_BIN_DIR}/tutorial/lesson1/lesson1_fullEvalContinuator.param - ) - ADD_EXECUTABLE(lesson1_evalContinuator - lesson1_evalContinuator.cpp - ${MO_BIN_DIR}/tutorial/lesson1/lesson1_evalContinuator.param - ) - ADD_EXECUTABLE(lesson1_combinedContinuator - lesson1_combinedContinuator.cpp - ${MO_BIN_DIR}/tutorial/lesson1/lesson1_combinedContinuator.param - ) - ADD_EXECUTABLE(firstImprHC_maxSAT - firstImprHC_maxSAT.cpp - ${MO_BIN_DIR}/tutorial/lesson1/firstImprHC_maxSAT.param - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_NEWMO() - ADD_TARGET_NEWMO(lesson1) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(lesson1_simpleHC lesson1_simpleHC.cpp) - ADD_EXECUTABLE(lesson1_firstImprHC lesson1_firstImprHC.cpp) - ADD_EXECUTABLE(lesson1_randomBestHC lesson1_randomBestHC.cpp) - ADD_EXECUTABLE(lesson1_neutralHC lesson1_neutralHC.cpp) - ADD_EXECUTABLE(lesson1_iterContinuator lesson1_iterContinuator.cpp) - ADD_EXECUTABLE(lesson1_fitContinuator lesson1_fitContinuator.cpp) - ADD_EXECUTABLE(lesson1_fullEvalContinuator lesson1_fullEvalContinuator.cpp) - ADD_EXECUTABLE(lesson1_evalContinuator lesson1_evalContinuator.cpp) - ADD_EXECUTABLE(lesson1_combinedContinuator lesson1_combinedContinuator.cpp) - ADD_EXECUTABLE(firstImprHC_maxSAT firstImprHC_maxSAT.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(lesson1_simpleHC EXCLUDE_FROM_ALL lesson1_simpleHC.cpp) - ADD_EXECUTABLE(lesson1_firstImprHC EXCLUDE_FROM_ALL lesson1_firstImprHC.cpp) - ADD_EXECUTABLE(lesson1_randomBestHC EXCLUDE_FROM_ALL lesson1_randomBestHC.cpp) - ADD_EXECUTABLE(lesson1_neutralHC EXCLUDE_FROM_ALL lesson1_neutralHC.cpp) - ADD_EXECUTABLE(lesson1_iterContinuator EXCLUDE_FROM_ALL lesson1_iterContinuator.cpp) - ADD_EXECUTABLE(lesson1_fitContinuator EXCLUDE_FROM_ALL lesson1_fitContinuator.cpp) - ADD_EXECUTABLE(lesson1_fullEvalContinuator EXCLUDE_FROM_ALL lesson1_fullEvalContinuator.cpp) - ADD_EXECUTABLE(lesson1_evalContinuator EXCLUDE_FROM_ALL lesson1_evalContinuator.cpp) - ADD_EXECUTABLE(lesson1_combinedContinuator EXCLUDE_FROM_ALL lesson1_combinedContinuator.cpp) - ADD_EXECUTABLE(firstImprHC_maxSAT EXCLUDE_FROM_ALL firstImprHC_maxSAT.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -###################################################################################### -### 4) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(lesson1_simpleHC eoutils ga eo) -TARGET_LINK_LIBRARIES(lesson1_firstImprHC eoutils ga eo) -TARGET_LINK_LIBRARIES(lesson1_randomBestHC eoutils ga eo) -TARGET_LINK_LIBRARIES(lesson1_neutralHC eoutils ga eo) -TARGET_LINK_LIBRARIES(lesson1_iterContinuator eoutils ga eo) -TARGET_LINK_LIBRARIES(lesson1_fitContinuator eoutils ga eo) -TARGET_LINK_LIBRARIES(lesson1_fullEvalContinuator eoutils ga eo) -TARGET_LINK_LIBRARIES(lesson1_evalContinuator eoutils ga eo) -TARGET_LINK_LIBRARIES(lesson1_combinedContinuator eoutils ga eo) -TARGET_LINK_LIBRARIES(firstImprHC_maxSAT eoutils ga eo) diff --git a/trunk/paradiseo-mo/tutorial/Lesson2/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson2/CMakeLists.txt deleted file mode 100644 index ad7d7c408..000000000 --- a/trunk/paradiseo-mo/tutorial/Lesson2/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src - ${MO_SRC_DIR}/src - ${PROBLEMS_SRC_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../src) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib) - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES testNeighborhood.cpp) - ADD_EXECUTABLE(testNeighborhood - testNeighborhood.cpp - ${MO_BIN_DIR}/tutorial/Lesson2/testNeighborhood.param - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_NEWMO() - ADD_TARGET_NEWMO(lesson2) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(testNeighborhood testNeighborhood.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(testNeighborhood EXCLUDE_FROM_ALL testNeighborhood.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -###################################################################################### -### 4) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(testNeighborhood eoutils ga eo) diff --git a/trunk/paradiseo-mo/tutorial/Lesson3/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson3/CMakeLists.txt deleted file mode 100644 index 457b953c5..000000000 --- a/trunk/paradiseo-mo/tutorial/Lesson3/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src - ${MO_SRC_DIR}/src - ${PROBLEMS_SRC_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../src) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib) - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES testSimulatedAnnealing.cpp) - ADD_EXECUTABLE(testSimulatedAnnealing - testSimulatedAnnealing.cpp - ${MO_BIN_DIR}/tutorial/Lesson3/testSimulatedAnnealing.param - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_NEWMO() - ADD_TARGET_NEWMO(lesson3) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(testSimulatedAnnealing testSimulatedAnnealing.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(testSimulatedAnnealing EXCLUDE_FROM_ALL testSimulatedAnnealing.param) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -###################################################################################### -### 4) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(testSimulatedAnnealing eoutils ga eo) \ No newline at end of file diff --git a/trunk/paradiseo-mo/tutorial/Lesson4/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson4/CMakeLists.txt deleted file mode 100644 index 714193b2d..000000000 --- a/trunk/paradiseo-mo/tutorial/Lesson4/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src - ${MO_SRC_DIR}/src - ${PROBLEMS_SRC_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../src) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib) - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES testSimpleTS.cpp) - ADD_EXECUTABLE(testSimpleTS - testSimpleTS.cpp - ${MO_BIN_DIR}/tutorial/lesson4/testSimpleTS.param - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_NEWMO() - ADD_TARGET_NEWMO(lesson4) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(testSimpleTS testSimpleTS.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(testSimpleTS EXCLUDE_FROM_ALL testSimpleTS.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -###################################################################################### -### 4) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(testSimpleTS eoutils ga eo) - diff --git a/trunk/paradiseo-mo/tutorial/Lesson5/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson5/CMakeLists.txt deleted file mode 100644 index e78b3fb5a..000000000 --- a/trunk/paradiseo-mo/tutorial/Lesson5/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src - ${MO_SRC_DIR}/src - ${PROBLEMS_SRC_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../src) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib) - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES testILS.cpp) - ADD_EXECUTABLE(testILS - testILS.cpp - ${MO_BIN_DIR}/tutorial/lesson5/testILS.param - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_NEWMO() - ADD_TARGET_NEWMO(lesson5) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(testILS testILS.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(testILS EXCLUDE_FROM_ALL testILS.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -###################################################################################### -### 4) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(testILS eoutils ga eo) - diff --git a/trunk/paradiseo-mo/tutorial/Lesson6/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson6/CMakeLists.txt deleted file mode 100644 index 6130dac52..000000000 --- a/trunk/paradiseo-mo/tutorial/Lesson6/CMakeLists.txt +++ /dev/null @@ -1,122 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src - ${MO_SRC_DIR}/src - ${PROBLEMS_SRC_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../src) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib) - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES testRandomWalk.cpp - testMetropolisHasting.cpp - testRandomNeutralWalk.cpp - sampling.cpp - densityOfStates.cpp - autocorrelation.cpp - adaptiveWalks.cpp - fdc.cpp - neutralDegree.cpp - fitnessCloud.cpp - neutralWalk.cpp) - ADD_EXECUTABLE(testRandomWalk - testRandomWalk.cpp - ${MO_BIN_DIR}/tutorial/lesson6/testRandomWalk.param - ) - ADD_EXECUTABLE(testMetropolisHasting - testMetropolisHasting.cpp - ${MO_BIN_DIR}/tutorial/lesson6/testMetropolisHasting.param - ) - ADD_EXECUTABLE(testRandomNeutralWalk - testRandomNeutralWalk.cpp - ${MO_BIN_DIR}/tutorial/lesson6/testRandomNeutralWalk.param - ) - ADD_EXECUTABLE(sampling - sampling.cpp - ${MO_BIN_DIR}/tutorial/lesson6/sampling.param - ) - ADD_EXECUTABLE(densityOfStates - densityOfStates.cpp - ${MO_BIN_DIR}/tutorial/lesson6/densityOfStates.param - ) - ADD_EXECUTABLE(autocorrelation - autocorrelation.cpp - ${MO_BIN_DIR}/tutorial/lesson6/autocorrelation.param - ) - ADD_EXECUTABLE(adaptiveWalks - adaptiveWalks.cpp - ${MO_BIN_DIR}/tutorial/lesson6/adaptiveWalks.param - ) - ADD_EXECUTABLE(fdc - fdc.cpp - ${MO_BIN_DIR}/tutorial/lesson6/fdc.param - ) - ADD_EXECUTABLE(neutralDegree - neutralDegree.cpp - ${MO_BIN_DIR}/tutorial/lesson6/neutralDegree.param - ) - ADD_EXECUTABLE(fitnessCloud - fitnessCloud.cpp - ${MO_BIN_DIR}/tutorial/lesson6/fitnessCloud.param - ) - ADD_EXECUTABLE(neutralWalk - neutralWalk.cpp - ${MO_BIN_DIR}/tutorial/lesson6/neutralWalk.param - ) - -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_NEWMO() - ADD_TARGET_NEWMO(lesson6) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(testRandomWalk testRandomWalk.cpp) - ADD_EXECUTABLE(testMetropolisHasting testMetropolisHasting.cpp) - ADD_EXECUTABLE(testRandomNeutralWalk testRandomNeutralWalk.cpp) - ADD_EXECUTABLE(sampling sampling.cpp) - ADD_EXECUTABLE(densityOfStates densityOfStates.cpp) - ADD_EXECUTABLE(autocorrelation autocorrelation.cpp) - ADD_EXECUTABLE(adaptiveWalks adaptiveWalks.cpp) - ADD_EXECUTABLE(fdc fdc.cpp) - ADD_EXECUTABLE(neutralDegree neutralDegree.cpp) - ADD_EXECUTABLE(fitnessCloud fitnessCloud.cpp) - ADD_EXECUTABLE(neutralWalk neutralWalk.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(testRandomWalk EXCLUDE_FROM_ALL testRandomWalk.cpp) - ADD_EXECUTABLE(testMetropolisHasting EXCLUDE_FROM_ALL testMetropolisHasting.cpp) - ADD_EXECUTABLE(testRandomNeutralWalk EXCLUDE_FROM_ALL testRandomNeutralWalk.cpp) - ADD_EXECUTABLE(sampling EXCLUDE_FROM_ALL sampling.cpp) - ADD_EXECUTABLE(densityOfStates EXCLUDE_FROM_ALL densityOfStates.cpp) - ADD_EXECUTABLE(autocorrelation EXCLUDE_FROM_ALL autocorrelation.cpp) - ADD_EXECUTABLE(adaptiveWalks EXCLUDE_FROM_ALL adaptiveWalks.cpp) - ADD_EXECUTABLE(fdc EXCLUDE_FROM_ALL fdc.cpp) - ADD_EXECUTABLE(neutralDegree EXCLUDE_FROM_ALL neutralDegree.cpp) - ADD_EXECUTABLE(fitnessCloud EXCLUDE_FROM_ALL fitnessCloud.cpp) - ADD_EXECUTABLE(neutralWalk EXCLUDE_FROM_ALL neutralWalk.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -###################################################################################### -### 4) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(testRandomWalk eoutils ga eo) -TARGET_LINK_LIBRARIES(testMetropolisHasting eoutils ga eo) -TARGET_LINK_LIBRARIES(testRandomNeutralWalk eoutils ga eo) -TARGET_LINK_LIBRARIES(sampling eoutils ga eo) -TARGET_LINK_LIBRARIES(densityOfStates eoutils ga eo) -TARGET_LINK_LIBRARIES(autocorrelation eoutils ga eo) -TARGET_LINK_LIBRARIES(adaptiveWalks eoutils ga eo) -TARGET_LINK_LIBRARIES(fdc eoutils ga eo) -TARGET_LINK_LIBRARIES(neutralDegree eoutils ga eo) -TARGET_LINK_LIBRARIES(fitnessCloud eoutils ga eo) -TARGET_LINK_LIBRARIES(neutralWalk eoutils ga eo) diff --git a/trunk/paradiseo-mo/tutorial/Lesson7/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson7/CMakeLists.txt deleted file mode 100644 index 556f73553..000000000 --- a/trunk/paradiseo-mo/tutorial/Lesson7/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src - ${MO_SRC_DIR}/src - ${PROBLEMS_SRC_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../src) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib) - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES hybridAlgo.cpp) - ADD_EXECUTABLE(hybridAlgo - hybridAlgo.cpp - ${MO_BIN_DIR}/tutorial/lesson7/hybridAlgo.param - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_NEWMO() - ADD_TARGET_NEWMO(lesson7) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(hybridAlgo hybridAlgo.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(hybridAlgo EXCLUDE_FROM_ALL hybridAlgo.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -###################################################################################### -### 4) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(hybridAlgo eoutils ga eo) - diff --git a/trunk/paradiseo-mo/tutorial/Lesson9/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson9/CMakeLists.txt deleted file mode 100644 index 05fc10f7d..000000000 --- a/trunk/paradiseo-mo/tutorial/Lesson9/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src - ${MO_SRC_DIR}/src - ${PROBLEMS_SRC_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../src) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib) - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES VNS.cpp) - ADD_EXECUTABLE(VNS - VNS.cpp - ${MO_BIN_DIR}/tutorial/lesson9/VNS.param - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_NEWMO() - ADD_TARGET_NEWMO(lesson9) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(VNS VNS.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(VNS EXCLUDE_FROM_ALL VNS.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -###################################################################################### -### 4) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(VNS eoutils ga eo) - diff --git a/trunk/paradiseo-moeo/AUTHORS b/trunk/paradiseo-moeo/AUTHORS deleted file mode 100644 index 3943fd7f7..000000000 --- a/trunk/paradiseo-moeo/AUTHORS +++ /dev/null @@ -1,5 +0,0 @@ -Sébastien Cahon -Arnaud Liefooghe -Thomas Legrand -Abdelhakim Deneche -Jérémie Humeau diff --git a/trunk/paradiseo-moeo/CMakeLists.txt b/trunk/paradiseo-moeo/CMakeLists.txt deleted file mode 100644 index db54aefc9..000000000 --- a/trunk/paradiseo-moeo/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - -########################################################################################################################################## -### 0) If you want to set your own variables in moeo-conf.cmake and avoid the cmd line -########################################################################################################################################## - -INCLUDE(moeo-conf.cmake OPTIONAL) - -########################################################################################################################################## - - -########################################################################################################################################## -### 1) Project properties -########################################################################################################################################## - -# set the project name -PROJECT(ParadisEO-MOEO) - -SET(PACKAGE_BUGREPORT "paradiseo-help@lists.gforge.inria.fr" CACHE STRING "Package bug report" FORCE) -SET(PACKAGE_NAME "ParadisEO-MOEO - Multi Objective Evolving Objects" CACHE STRING "Package name" FORCE) -SET(PACKAGE_STRING "ParadisEO-MOEO 1.3" CACHE STRING "MOEO Package string full name" FORCE) -SET(PACKAGE_VERSION "1.3" CACHE STRING "Package version" FORCE) -SET(GLOBAL_VERSION "1.3" CACHE STRING "Global version" FORCE) -SET(VERSION "1.3" CACHE STRING "Version" FORCE) -########################################################################################################################################## - - -########################################################################################################################################## -### 2) Include the common CMake configuration -########################################################################################################################################## - -# The "config" variable must be provided on the command line -IF(NOT DEFINED config OR NOT config) - MESSAGE(FATAL_ERROR "The \"config\" variable must be set on the command line to - give the path of the install configuration file. ") -ENDIF(NOT DEFINED config OR NOT config) - -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/CTestCustom.cmake - ${ParadisEO-MOEO_BINARY_DIR}/CTestCustom.cmake) - -# Need the config file whose full path is given thanks to the "config" variable -INCLUDE(${config}) -########################################################################################################################################## - diff --git a/trunk/paradiseo-moeo/CTestCustom.cmake b/trunk/paradiseo-moeo/CTestCustom.cmake deleted file mode 100644 index fffbbfd4e..000000000 --- a/trunk/paradiseo-moeo/CTestCustom.cmake +++ /dev/null @@ -1,8 +0,0 @@ -SET(CTEST_CUSTOM_COVERAGE_EXCLUDE - ${CTEST_CUSTOM_COVERAGE_EXCLUDE} -"test/" -"paradiseo-eo/" -"paradiseo-mo/" -"paradiseo-old-mo/" -"tutorial/" -) diff --git a/trunk/paradiseo-moeo/README b/trunk/paradiseo-moeo/README deleted file mode 100644 index b81762dac..000000000 --- a/trunk/paradiseo-moeo/README +++ /dev/null @@ -1,84 +0,0 @@ - PARADISEO-MOEO README FILE -======================================================================= - check latest news at http://paradiseo.gforge.inria.fr/ -======================================================================= - -Welcome to ParadisEO-MOEO, the Multi-Objective Evolving Objects library. -The latest news about ParadisEO-MOEO can be found on the gforge repository at -http://paradiseo.gforge.inria.fr/ -In case of any problem, please e-mail us at -paradiseo-help@lists.gforge.inria.fr - - -======================================================================= - BUILDING PARADISEO-MOEO -======================================================================= -The basic installation procedure goes the following. - -To compile paradiseo-moeo in the default directory, -go to paradiseo-moeo/build/ and run: - > cmake ../ -Dconfig= - > make - // for an easy-use of the provided lessons - > make install - // optional (if the documentation is not already available) - > make doc - -To compile paradiseo-moeo anywhere else, simply run: - > cmake $(MOEO) -Dconfig= - > make - // for an easy-use of the provided lessons - > make install - // optional (if the documentation is not already available) - > make doc - -where $(MOEO) is the top-level directory of PARADISEO-MOEO. - -To clean everything, simply run - > make clean - -======================================================================= - DIRECTORY STRUCTURE -======================================================================= -After unpacking the archive file, you should end up with the following -structure: - -.../ The main PARADISEO-MOEO directory, created when unpacking. - | - | - +-- build BUILD directory that contains libraries and executable files. - | - | - +-- src SOURCE directory that contains PARADISEO-MOEO source files. - | - | - +-- doc DOCUMENTATION directory (generated by Doxygen). - | | - | +-- html HTML files - start at index.html. - | | - | +-- latex latex files - use to generate Postcript doc. - | | - | +-- man Unix man format documentation. - | - | - +-- tutorial TUTORIAL directory that contains with lessons. - | - +-- examples APPLICATIONS - one directory per separate application. - | | - | +-- flowshop Flow-shop scheduling problem example source files. - | | - | +-- benchs Benchmark suites for the flow-shop. - | - +-- Lesson1 NSGA-II to solve the SCH1 problem. - | - +-- Lesson2 A bi-objective flow-shop scheduling problem solved using main MOEAs. - | - +-- Lesson3 A bi-objective flow-shop scheduling problem solved using main MOEAs thanks to a parameter file. - | - +-- Lesson4 A bi-objective flow-shop scheduling problem solved using DMLS. - -======================================================================= - NOTES -======================================================================= - -Mailing list : paradiseo-help@lists.gforge.inria.fr diff --git a/trunk/paradiseo-moeo/doc/CMakeLists.txt b/trunk/paradiseo-moeo/doc/CMakeLists.txt deleted file mode 100644 index c94b73700..000000000 --- a/trunk/paradiseo-moeo/doc/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ - -########################################################################################## -### MOEO Doc generation using Doxygen -########################################################################################## - -IF (DOXYGEN_FOUND) - - SET(DOC_DIR ${CMAKE_BINARY_DIR}/doc CACHE PATH "MOEO documentation directory") - SET(MOEO_DOC_CONFIG_FILE "moeo.doxyfile" CACHE PATH "MOEO documentation configuration file") - # define the doc target - IF (DOXYGEN_EXECUTABLE) - ADD_CUSTOM_TARGET(doc - COMMAND ${DOXYGEN_EXECUTABLE} ${MOEO_DOC_CONFIG_FILE} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - ENDIF (DOXYGEN_EXECUTABLE) - - # configure doxyfile file - CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/doc/${MOEO_DOC_CONFIG_FILE}.cmake" - "${CMAKE_BINARY_DIR}/doc/${MOEO_DOC_CONFIG_FILE}") - -ELSE (DOXYGEN_FOUND) - MESSAGE(STATUS "Unable to generate the documentation, Doxygen package not found") -ENDIF (DOXYGEN_FOUND) - -########################################################################################## diff --git a/trunk/paradiseo-moeo/moeo-conf.cmake b/trunk/paradiseo-moeo/moeo-conf.cmake deleted file mode 100644 index 1bffe16da..000000000 --- a/trunk/paradiseo-moeo/moeo-conf.cmake +++ /dev/null @@ -1,5 +0,0 @@ -##################################################################################### -###################################################################################### -### In this file, you can specify many CMake variables used to build paradisEO-MOEO. -###################################################################################### -###################################################################################### diff --git a/trunk/paradiseo-moeo/test/CMakeLists.txt b/trunk/paradiseo-moeo/test/CMakeLists.txt deleted file mode 100644 index 92ac7926f..000000000 --- a/trunk/paradiseo-moeo/test/CMakeLists.txt +++ /dev/null @@ -1,139 +0,0 @@ -############################################################################### -## -## CMakeLists file for ParadisEO-MOEO/test -## -############################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${MO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${OLDMO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${ParadisEO-MOEO_SOURCE_DIR}/src) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-MOEO_BINARY_DIR}/lib) - -###################################################################################### - - - -###################################################################################### -### 3) Define your targets and link the librairies -###################################################################################### - -SET (TEST_LIST - t-moeo - t-moeoBitVector - t-moeoRealVector - t-moeoUnboundedArchive - t-moeoParetoObjectiveVectorComparator - t-moeoStrictObjectiveVectorComparator - t-moeoWeakObjectiveVectorComparator - t-moeoEpsilonObjectiveVectorComparator - t-moeoAggregativeComparator - t-moeoDiversityThenFitnessComparator - t-moeoFitnessThenDiversityComparator - t-moeoAchievementFitnessAssignment - t-moeoExpBinaryIndicatorBasedFitnessAssignment - t-moeoCrowdingDiversityAssignment - t-moeoSharingDiversityAssignment - t-moeoIBEA - t-moeoNSGA - t-moeoNSGAII - t-moeoSEEA - t-moeoMax3Obj - t-moeoEasyEA - t-moeoDominanceCountFitnessAssignment - t-moeoDominanceRankFitnessAssignment - t-moeoDominanceCountRankingFitnessAssignment - t-moeoDominanceDepthFitnessAssignment - t-moeoNearestNeighborDiversityAssignment - t-moeoSPEA2Archive - t-moeoSPEA2 - t-moeoDominanceMatrix - t-moeoVecVsVecAdditiveEpsilonBinaryMetric - t-moeoVecVsVecMultiplicativeEpsilonBinaryMetric - t-moeoHyperVolumeMetric - t-moeoHyperVolumeDifferenceMetric - t-moeoIntVector - t-moeoImprOnlyBoundedArchive - t-moeoFitDivBoundedArchive - t-moeoDetArchiveSelect - t-moeoASEEA - t-moeoEpsilonHyperboxArchive - #t-moeoQuadTreeIndex - t-moeoQuickUnboundedArchiveIndex - t-moeoAggregationFitnessAssignment - t-moeoConstraintFitnessAssignment - t-moeoChebyshevMetric - t-moeoChebyshevOrientedMetric - t-moeoASFAMetric - t-moeoASFAOrMetric - t-moeoHC - t-moeoILS_HC - t-moeoILS_SA - t-moeoILS_TS - t-moeoTS - t-moeoVNS - t-moeoVFAS - t-moeoAnytimeWeightStrategy - t-moeoQexploreWeightStrategy - t-moeoAugmentedQexploreWeightStrategy - t-moeoFixedTimeOneDirectionWeightStrategy - t-moeoFixedTimeBothDirectionWeightStrategy - t-moeoDichoWeightStrategy - t-moeoExhaustiveNeighborhoodExplorer - t-moeoFirstImprovingNeighborhoodExplorer - t-moeoSimpleSubNeighborhoodExplorer - t-moeoNoDesimprovingNeighborhoodExplorer - t-moeoPLS1 - t-moeoPLS2 - t-moeoExhaustiveUnvisitedSelect - t-moeoNumberUnvisitedSelect - t-moeoDMLSMonOp - t-moeoDMLSGenUpdater - t-moeo2DMinHypervolumeArchive -) - -FOREACH (test ${TEST_LIST}) - SET ("T_${test}_SOURCES" "${test}.cpp") -ENDFOREACH (test) - - - -IF(ENABLE_MINIMAL_CMAKE_TESTING) - SET (MIN_TEST_LIST t-moeoEasyEA) - FOREACH (mintest ${MIN_TEST_LIST}) - SET ("T_${mintest}_SOURCES" "${mintest}.cpp") - ADD_EXECUTABLE(${mintest} ${T_${mintest}_SOURCES}) - ADD_TEST(${mintest} ${mintest}) - TARGET_LINK_LIBRARIES(${mintest} moeo ga es eoutils eo) - ENDFOREACH (mintest) - -ELSEIF(ENABLE_CMAKE_TESTING) - - FOREACH (test ${TEST_LIST}) - ADD_EXECUTABLE(${test} ${T_${test}_SOURCES}) - ADD_TEST(${test} ${test}) - ENDFOREACH (test) - - # Link the librairies - FOREACH (test ${TEST_LIST}) - TARGET_LINK_LIBRARIES(${test} moeo ga es eoutils eo) - ENDFOREACH (test) - -ENDIF(ENABLE_MINIMAL_CMAKE_TESTING) - -###################################################################################### - diff --git a/trunk/paradiseo-moeo/test/t-moeoAnytimeWeightStrategy.cpp b/trunk/paradiseo-moeo/test/t-moeoAnytimeWeightStrategy.cpp deleted file mode 100644 index 3ea12ca2c..000000000 --- a/trunk/paradiseo-moeo/test/t-moeoAnytimeWeightStrategy.cpp +++ /dev/null @@ -1,301 +0,0 @@ -/* - * - * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 - * (C) OPAC Team, LIFL, 2002-2008 - * - * Fraéncçois Legillon - * - * This software is governed by the CeCILL license under French law and - * abiding by the rules of distribution of free software. You can use, - * modify and/ or redistribute the software under the terms of the CeCILL - * license as circulated by CEA, CNRS and INRIA at the following URL - * "http://www.cecill.info". - * - * As a counterpart to the access to the source code and rights to copy, - * modify and redistribute granted by the license, users are provided only - * with a limited warranty and the software's author, the holder of the - * economic rights, and the successive licensors have only limited liability. - * - * In this respect, the user's attention is drawn to the risks associated - * with loading, using, modifying and/or developing or reproducing the - * software by the user in light of its specific status of free software, - * that may mean that it is complicated to manipulate, and that also - * therefore means that it is reserved for developers and experienced - * professionals having in-depth computer knowledge. Users are therefore - * encouraged to load and test the software's suitability as regards their - * requirements in conditions enabling the security of their systems and/or - * data to be ensured and, more generally, to use and operate it in the - * same conditions as regards security. - * The fact that you are presently reading this means that you have had - * knowledge of the CeCILL license and that you accept its terms. - * - * ParadisEO WebSite : http://paradiseo.gforge.inria.fr - * Contact: paradiseo-help@lists.gforge.inria.fr - * - */ -//----------------------------------------------------------------------------- -// t-moeoAnytimeWeightStrategy.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO -#include - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- -class ObjectiveVectorTraits : public moeoObjectiveVectorTraits -{ - public: - static bool minimizing (int i) - { - return true; - } - static bool maximizing (int i) - { - return false; - } - static unsigned int nObjectives () - { - return 2; - } -}; - -typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; - -class Solution : public moeoRealVector < ObjectiveVector, double, double > -{ - public: - Solution() : moeoRealVector < ObjectiveVector, double, double > (2) {} -}; - -class solutionEval : public eoEvalFunc < Solution > -{ - public: - void operator () (Solution & _sol) - { - ObjectiveVector objVec; - objVec[0] = _sol[0]; - objVec[1] = _sol[1]; - _sol.objectiveVector(objVec); - } -}; - - -class testMove : public moMove -{ - public : - void operator () (Solution & _solution) - { - Solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ - public : - void operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ - public : - bool operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ - public : - ObjectiveVector operator () (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution solution(_solution); - - - return _solution.objectiveVector(); - } -} ; - -class testTabuList : public moTabuList -{ - public: - bool operator() (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ - public: - bool operator() (const testMove & _move, const double & _fitness) - { - double fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -class solutionContinue : public eoContinue -{ - public : - solutionContinue(): counter(0) - {} - - bool operator () (const eoPop & _solution) - { - if(counter==0) - { - counter++; - return true; - } - return false; - } - - - bool operator () (const Solution & _solution) - { - const Solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} - private : - unsigned int counter; -} ; - -class solutionComparator : public moeoComparator -{ - public : - const bool operator () (const Solution & _solution1 , const Solution & _solution2) - { - const Solution sol1(_solution1); - const Solution sol2(_solution2); - - return sol1.fitness()>sol2.fitness(); - } -} ; - -class solutionPerturbation : public eoMonOp -{ - public : - bool operator () (Solution & _solution) - { - ObjectiveVector objVec; - objVec[0] = 1; - objVec[1] = 1; - _solution[1]=1; - _solution[0]=1; - _solution.objectiveVector(objVec); - _solution.fitness(2); - return true; - } -} ; - -class solutionSingler : public moeoSingleObjectivization -{ - void operator () (Solution & _solution){ - ObjectiveVector objVec; - objVec[0] = _solution[0]; - objVec[1] = _solution[1]; - _solution.objectiveVector(objVec); - _solution.fitness(_solution.objectiveVector()[0]+_solution.objectiveVector()[1]); - } - void operator()(eoPop &_pop){ - } - - double operator() (const ObjectiveVector &_obj){ - return _obj[0]+_obj[1]; - } - void updateByDeleting(eoPop& pop, ObjectiveVector& obj){} - -} ; - -class selectMove: public moMoveSelect -{ - public: - void init(const double &d){ - max_fit=d; - } - bool update(const testMove &move,const double &fitness){ - if (fitness>max_fit){ - max_fit=fitness; - best_move=move; - return false; - }else - return true; - } - void operator()(testMove &move,double &fitness){ - move=best_move; - fitness=max_fit; - } - private: - double max_fit; - testMove best_move; -}; - -//----------------------------------------------------------------------------- - -int main() -{ - Solution solution; - moeoAnytimeWeightStrategy strat; - std::vector weight; - weight.resize(2); - - cout << "[ moeoAnytimeWeightStrategy ] ==> "; - strat(weight,solution); - assert(weight[0]==0 && weight[1]==1); - strat(weight,solution); - assert(weight[0]==1 && weight[1]==0); - strat(weight,solution); - assert(weight[0]==0.5 && weight[1]==0.5); - strat(weight,solution); - assert(weight[0]==0.25 && weight[1]==0.75); - strat(weight,solution); - assert(weight[0]==0.75 && weight[1]==0.25); - - std::cout<<"OK"< - * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 - * (C) OPAC Team, LIFL, 2002-2008 - * - * Fraéncçois Legillon - * - * This software is governed by the CeCILL license under French law and - * abiding by the rules of distribution of free software. You can use, - * modify and/ or redistribute the software under the terms of the CeCILL - * license as circulated by CEA, CNRS and INRIA at the following URL - * "http://www.cecill.info". - * - * As a counterpart to the access to the source code and rights to copy, - * modify and redistribute granted by the license, users are provided only - * with a limited warranty and the software's author, the holder of the - * economic rights, and the successive licensors have only limited liability. - * - * In this respect, the user's attention is drawn to the risks associated - * with loading, using, modifying and/or developing or reproducing the - * software by the user in light of its specific status of free software, - * that may mean that it is complicated to manipulate, and that also - * therefore means that it is reserved for developers and experienced - * professionals having in-depth computer knowledge. Users are therefore - * encouraged to load and test the software's suitability as regards their - * requirements in conditions enabling the security of their systems and/or - * data to be ensured and, more generally, to use and operate it in the - * same conditions as regards security. - * The fact that you are presently reading this means that you have had - * knowledge of the CeCILL license and that you accept its terms. - * - * ParadisEO WebSite : http://paradiseo.gforge.inria.fr - * Contact: paradiseo-help@lists.gforge.inria.fr - * - */ -//----------------------------------------------------------------------------- -// t-moeoAugmentedQexploreWeightStrategy.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO -#include - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- -class ObjectiveVectorTraits : public moeoObjectiveVectorTraits -{ - public: - static bool minimizing (int i) - { - return true; - } - static bool maximizing (int i) - { - return false; - } - static unsigned int nObjectives () - { - return 3; - } -}; - -typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; - -class Solution : public moeoRealVector < ObjectiveVector, double, double > -{ - public: - Solution() : moeoRealVector < ObjectiveVector, double, double > (3) {} -}; - -class solutionEval : public eoEvalFunc < Solution > -{ - public: - void operator () (Solution & _sol) - { - ObjectiveVector objVec; - objVec[0] = _sol[0]; - objVec[1] = _sol[1]; - objVec[2] = _sol[2]; - _sol.objectiveVector(objVec); - } -}; - - -class testMove : public moMove -{ - public : - void operator () (Solution & _solution) - { - Solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ - public : - void operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ - public : - bool operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ - public : - ObjectiveVector operator () (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution solution(_solution); - - - return _solution.objectiveVector(); - } -} ; - -class testTabuList : public moTabuList -{ - public: - bool operator() (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ - public: - bool operator() (const testMove & _move, const double & _fitness) - { - double fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -class solutionContinue : public eoContinue -{ - public : - solutionContinue(): counter(0) - {} - - bool operator () (const eoPop & _solution) - { - if(counter==0) - { - counter++; - return true; - } - return false; - } - - - bool operator () (const Solution & _solution) - { - const Solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} - private : - unsigned int counter; -} ; - -class solutionComparator : public moeoComparator -{ - public : - const bool operator () (const Solution & _solution1 , const Solution & _solution2) - { - const Solution sol1(_solution1); - const Solution sol2(_solution2); - - return sol1.fitness()>sol2.fitness(); - } -} ; - -class solutionPerturbation : public eoMonOp -{ - public : - bool operator () (Solution & _solution) - { - ObjectiveVector objVec; - objVec[0] = 1; - objVec[1] = 1; - objVec[2] = 1; - _solution[1]=1; - _solution[0]=1; - _solution[2]=1; - _solution.objectiveVector(objVec); - _solution.fitness(2); - return true; - } -} ; - -class solutionSingler : public moeoSingleObjectivization -{ - void operator () (Solution & _solution){ - ObjectiveVector objVec; - objVec[0] = _solution[0]; - objVec[1] = _solution[1]; - objVec[2] = _solution[2]; - _solution.objectiveVector(objVec); - _solution.fitness(_solution.objectiveVector()[0]+_solution.objectiveVector()[1]); - } - void operator()(eoPop &_pop){ - } - - double operator() (const ObjectiveVector &_obj){ - return _obj[0]+_obj[1]; - } - void updateByDeleting(eoPop& pop, ObjectiveVector& obj){} - -} ; - -class selectMove: public moMoveSelect -{ - public: - void init(const double &d){ - max_fit=d; - } - bool update(const testMove &move,const double &fitness){ - if (fitness>max_fit){ - max_fit=fitness; - best_move=move; - return false; - }else - return true; - } - void operator()(testMove &move,double &fitness){ - move=best_move; - fitness=max_fit; - } - private: - double max_fit; - testMove best_move; -}; - -//----------------------------------------------------------------------------- - -int main() -{ - Solution solution; - solutionEval eval; - std::vector weight; - weight.resize(3); - cout << "[moeoAugmentedQexploreWeightStrategy] ==> "; - moeoAugmentedQexploreWeightStrategy strat; - for (unsigned int i=0;i<6000;i++){ - eval(solution); - strat(weight,solution); - // std::cout< - * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 - * (C) OPAC Team, LIFL, 2002-2008 - * - * François Legillon - * - * This software is governed by the CeCILL license under French law and - * abiding by the rules of distribution of free software. You can use, - * modify and/ or redistribute the software under the terms of the CeCILL - * license as circulated by CEA, CNRS and INRIA at the following URL - * "http://www.cecill.info". - * - * As a counterpart to the access to the source code and rights to copy, - * modify and redistribute granted by the license, users are provided only - * with a limited warranty and the software's author, the holder of the - * economic rights, and the successive licensors have only limited liability. - * - * In this respect, the user's attention is drawn to the risks associated - * with loading, using, modifying and/or developing or reproducing the - * software by the user in light of its specific status of free software, - * that may mean that it is complicated to manipulate, and that also - * therefore means that it is reserved for developers and experienced - * professionals having in-depth computer knowledge. Users are therefore - * encouraged to load and test the software's suitability as regards their - * requirements in conditions enabling the security of their systems and/or - * data to be ensured and, more generally, to use and operate it in the - * same conditions as regards security. - * The fact that you are presently reading this means that you have had - * knowledge of the CeCILL license and that you accept its terms. - * - * ParadisEO WebSite : http://paradiseo.gforge.inria.fr - * Contact: paradiseo-help@lists.gforge.inria.fr - * - */ -//----------------------------------------------------------------------------- -// t-moILS_HC.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO -#include - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- -class ObjectiveVectorTraits : public moeoObjectiveVectorTraits -{ - public: - static bool minimizing (int i) - { - return true; - } - static bool maximizing (int i) - { - return false; - } - static unsigned int nObjectives () - { - return 2; - } -}; - -typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; - -class Solution : public moeoRealVector < ObjectiveVector, double, double > -{ - public: - Solution() : moeoRealVector < ObjectiveVector, double, double > (2) {} -}; - -class solutionEval : public eoEvalFunc < Solution > -{ - public: - void operator () (Solution & _sol) - { - ObjectiveVector objVec; - objVec[0] = _sol[0]; - objVec[1] = _sol[1]; - _sol.objectiveVector(objVec); - } -}; - - -class testMove : public moMove -{ - public : - void operator () (Solution & _solution) - { - Solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ - public : - void operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ - public : - bool operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ - public : - ObjectiveVector operator () (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution solution(_solution); - - - return _solution.objectiveVector(); - } -} ; - -class testTabuList : public moTabuList -{ - public: - bool operator() (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ - public: - bool operator() (const testMove & _move, const double & _fitness) - { - double fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -class solutionContinue : public eoContinue -{ - public : - solutionContinue(): counter(0) - {} - - bool operator () (const eoPop & _solution) - { - if(counter==0) - { - counter++; - return true; - } - return false; - } - - - bool operator () (const Solution & _solution) - { - const Solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} - private : - unsigned int counter; -} ; - -class solutionComparator : public moeoComparator -{ - public : - const bool operator () (const Solution & _solution1 , const Solution & _solution2) - { - const Solution sol1(_solution1); - const Solution sol2(_solution2); - - return sol1.fitness()>sol2.fitness(); - } -} ; - -class solutionPerturbation : public eoMonOp -{ - public : - bool operator () (Solution & _solution) - { - ObjectiveVector objVec; - objVec[0] = 1; - objVec[1] = 1; - _solution[1]=1; - _solution[0]=1; - _solution.objectiveVector(objVec); - _solution.fitness(2); - return true; - } -} ; - -class solutionSingler : public moeoSingleObjectivization -{ - void operator () (Solution & _solution){ - ObjectiveVector objVec; - objVec[0] = _solution[0]; - objVec[1] = _solution[1]; - _solution.objectiveVector(objVec); - _solution.fitness(_solution.objectiveVector()[0]+_solution.objectiveVector()[1]); - } - void operator()(eoPop &_pop){ - } - - double operator() (const ObjectiveVector &_obj){ - return _obj[0]+_obj[1]; - } - void updateByDeleting(eoPop& pop, ObjectiveVector& obj){} - -} ; - -class selectMove: public moMoveSelect -{ - public: - void init(const double &d){ - max_fit=d; - } - bool update(const testMove &move,const double &fitness){ - if (fitness>max_fit){ - max_fit=fitness; - best_move=move; - return false; - }else - return true; - } - void operator()(testMove &move,double &fitness){ - move=best_move; - fitness=max_fit; - } - private: - double max_fit; - testMove best_move; -}; - -//----------------------------------------------------------------------------- - -int main() -{ - Solution solution; - moeoDichoWeightStrategy strat; - solutionEval eval; - std::vector weight; - cout << "[moeoDichoWeightStrategy] ==> "; - weight.resize(2); - ObjectiveVector obj; - obj[0]=1; - obj[1]=0; - solution.objectiveVector(obj); - strat(weight,solution); - assert(weight[0]==0 && weight[1]==1); - obj[0]=0; - obj[1]=1; - solution.objectiveVector(obj); - strat(weight,solution); - assert(weight[0]==1 && weight[1]==0); - strat(weight,solution); - assert(weight[0]==0.5 && weight[1]==0.5); - - - std::cout<<"OK"< - * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 - * (C) OPAC Team, LIFL, 2002-2008 - * - * Fraéncçois Legillon - * - * This software is governed by the CeCILL license under French law and - * abiding by the rules of distribution of free software. You can use, - * modify and/ or redistribute the software under the terms of the CeCILL - * license as circulated by CEA, CNRS and INRIA at the following URL - * "http://www.cecill.info". - * - * As a counterpart to the access to the source code and rights to copy, - * modify and redistribute granted by the license, users are provided only - * with a limited warranty and the software's author, the holder of the - * economic rights, and the successive licensors have only limited liability. - * - * In this respect, the user's attention is drawn to the risks associated - * with loading, using, modifying and/or developing or reproducing the - * software by the user in light of its specific status of free software, - * that may mean that it is complicated to manipulate, and that also - * therefore means that it is reserved for developers and experienced - * professionals having in-depth computer knowledge. Users are therefore - * encouraged to load and test the software's suitability as regards their - * requirements in conditions enabling the security of their systems and/or - * data to be ensured and, more generally, to use and operate it in the - * same conditions as regards security. - * The fact that you are presently reading this means that you have had - * knowledge of the CeCILL license and that you accept its terms. - * - * ParadisEO WebSite : http://paradiseo.gforge.inria.fr - * Contact: paradiseo-help@lists.gforge.inria.fr - * - */ -//----------------------------------------------------------------------------- -// t-moILS_HC.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO -#include - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- -class ObjectiveVectorTraits : public moeoObjectiveVectorTraits -{ - public: - static bool minimizing (int i) - { - return true; - } - static bool maximizing (int i) - { - return false; - } - static unsigned int nObjectives () - { - return 2; - } -}; - -typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; - -class Solution : public moeoRealVector < ObjectiveVector, double, double > -{ - public: - Solution() : moeoRealVector < ObjectiveVector, double, double > (2) {} -}; - -class solutionEval : public eoEvalFunc < Solution > -{ - public: - void operator () (Solution & _sol) - { - ObjectiveVector objVec; - objVec[0] = _sol[0]; - objVec[1] = _sol[1]; - _sol.objectiveVector(objVec); - } -}; - - -class testMove : public moMove -{ - public : - void operator () (Solution & _solution) - { - Solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ - public : - void operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ - public : - bool operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ - public : - ObjectiveVector operator () (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution solution(_solution); - - - return _solution.objectiveVector(); - } -} ; - -class testTabuList : public moTabuList -{ - public: - bool operator() (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ - public: - bool operator() (const testMove & _move, const double & _fitness) - { - double fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -class solutionContinue : public eoContinue -{ - public : - solutionContinue(): counter(0) - {} - - bool operator () (const eoPop & _solution) - { - if(counter==0) - { - counter++; - return true; - } - return false; - } - - - bool operator () (const Solution & _solution) - { - const Solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} - private : - unsigned int counter; -} ; - -class solutionComparator : public moeoComparator -{ - public : - const bool operator () (const Solution & _solution1 , const Solution & _solution2) - { - const Solution sol1(_solution1); - const Solution sol2(_solution2); - - return sol1.fitness()>sol2.fitness(); - } -} ; - -class solutionPerturbation : public eoMonOp -{ - public : - bool operator () (Solution & _solution) - { - ObjectiveVector objVec; - objVec[0] = 1; - objVec[1] = 1; - _solution[1]=1; - _solution[0]=1; - _solution.objectiveVector(objVec); - _solution.fitness(2); - return true; - } -} ; - -class solutionSingler : public moeoSingleObjectivization -{ - void operator () (Solution & _solution){ - ObjectiveVector objVec; - objVec[0] = _solution[0]; - objVec[1] = _solution[1]; - _solution.objectiveVector(objVec); - _solution.fitness(_solution.objectiveVector()[0]+_solution.objectiveVector()[1]); - } - void operator()(eoPop &_pop){ - } - - double operator() (const ObjectiveVector &_obj){ - return _obj[0]+_obj[1]; - } - void updateByDeleting(eoPop& pop, ObjectiveVector& obj){} - -} ; - -class selectMove: public moMoveSelect -{ - public: - void init(const double &d){ - max_fit=d; - } - bool update(const testMove &move,const double &fitness){ - if (fitness>max_fit){ - max_fit=fitness; - best_move=move; - return false; - }else - return true; - } - void operator()(testMove &move,double &fitness){ - move=best_move; - fitness=max_fit; - } - private: - double max_fit; - testMove best_move; -}; - -//----------------------------------------------------------------------------- - -int main() -{ - Solution solution; - moeoFixedTimeBothDirectionWeightStrategy strat(0.1); - std::vector weight; - weight.resize(2); - for (unsigned int i=0;i<20;i++){ - strat(weight,solution); - std::cout< "; - std::cout<<"OK"< - * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 - * (C) OPAC Team, LIFL, 2002-2008 - * - * Fraéncçois Legillon - * - * This software is governed by the CeCILL license under French law and - * abiding by the rules of distribution of free software. You can use, - * modify and/ or redistribute the software under the terms of the CeCILL - * license as circulated by CEA, CNRS and INRIA at the following URL - * "http://www.cecill.info". - * - * As a counterpart to the access to the source code and rights to copy, - * modify and redistribute granted by the license, users are provided only - * with a limited warranty and the software's author, the holder of the - * economic rights, and the successive licensors have only limited liability. - * - * In this respect, the user's attention is drawn to the risks associated - * with loading, using, modifying and/or developing or reproducing the - * software by the user in light of its specific status of free software, - * that may mean that it is complicated to manipulate, and that also - * therefore means that it is reserved for developers and experienced - * professionals having in-depth computer knowledge. Users are therefore - * encouraged to load and test the software's suitability as regards their - * requirements in conditions enabling the security of their systems and/or - * data to be ensured and, more generally, to use and operate it in the - * same conditions as regards security. - * The fact that you are presently reading this means that you have had - * knowledge of the CeCILL license and that you accept its terms. - * - * ParadisEO WebSite : http://paradiseo.gforge.inria.fr - * Contact: paradiseo-help@lists.gforge.inria.fr - * - */ -//----------------------------------------------------------------------------- -// t-moILS_HC.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO -#include - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- -class ObjectiveVectorTraits : public moeoObjectiveVectorTraits -{ - public: - static bool minimizing (int i) - { - return true; - } - static bool maximizing (int i) - { - return false; - } - static unsigned int nObjectives () - { - return 2; - } -}; - -typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; - -class Solution : public moeoRealVector < ObjectiveVector, double, double > -{ - public: - Solution() : moeoRealVector < ObjectiveVector, double, double > (2) {} -}; - -class solutionEval : public eoEvalFunc < Solution > -{ - public: - void operator () (Solution & _sol) - { - ObjectiveVector objVec; - objVec[0] = _sol[0]; - objVec[1] = _sol[1]; - _sol.objectiveVector(objVec); - } -}; - - -class testMove : public moMove -{ - public : - void operator () (Solution & _solution) - { - Solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ - public : - void operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ - public : - bool operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ - public : - ObjectiveVector operator () (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution solution(_solution); - - - return _solution.objectiveVector(); - } -} ; - -class testTabuList : public moTabuList -{ - public: - bool operator() (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ - public: - bool operator() (const testMove & _move, const double & _fitness) - { - double fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -class solutionContinue : public eoContinue -{ - public : - solutionContinue(): counter(0) - {} - - bool operator () (const eoPop & _solution) - { - if(counter==0) - { - counter++; - return true; - } - return false; - } - - - bool operator () (const Solution & _solution) - { - const Solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} - private : - unsigned int counter; -} ; - -class solutionComparator : public moeoComparator -{ - public : - const bool operator () (const Solution & _solution1 , const Solution & _solution2) - { - const Solution sol1(_solution1); - const Solution sol2(_solution2); - - return sol1.fitness()>sol2.fitness(); - } -} ; - -class solutionPerturbation : public eoMonOp -{ - public : - bool operator () (Solution & _solution) - { - ObjectiveVector objVec; - objVec[0] = 1; - objVec[1] = 1; - _solution[1]=1; - _solution[0]=1; - _solution.objectiveVector(objVec); - _solution.fitness(2); - return true; - } -} ; - -class solutionSingler : public moeoSingleObjectivization -{ - void operator () (Solution & _solution){ - ObjectiveVector objVec; - objVec[0] = _solution[0]; - objVec[1] = _solution[1]; - _solution.objectiveVector(objVec); - _solution.fitness(_solution.objectiveVector()[0]+_solution.objectiveVector()[1]); - } - void operator()(eoPop &_pop){ - } - - double operator() (const ObjectiveVector &_obj){ - return _obj[0]+_obj[1]; - } - void updateByDeleting(eoPop& pop, ObjectiveVector& obj){} - -} ; - -class selectMove: public moMoveSelect -{ - public: - void init(const double &d){ - max_fit=d; - } - bool update(const testMove &move,const double &fitness){ - if (fitness>max_fit){ - max_fit=fitness; - best_move=move; - return false; - }else - return true; - } - void operator()(testMove &move,double &fitness){ - move=best_move; - fitness=max_fit; - } - private: - double max_fit; - testMove best_move; -}; - -//----------------------------------------------------------------------------- - -int main() -{ - Solution solution; - moeoFixedTimeOneDirectionWeightStrategy strat(0.1); - std::vector weight; - weight.resize(2); - for (unsigned int i=0;i<20;i++){ - strat(weight,solution); - std::cout< "; - std::cout<<"OK"< - * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 - * (C) OPAC Team, LIFL, 2002-2008 - * - * S<-61><-87>bastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - * - * This software is governed by the CeCILL license under French law and - * abiding by the rules of distribution of free software. You can use, - * modify and/ or redistribute the software under the terms of the CeCILL - * license as circulated by CEA, CNRS and INRIA at the following URL - * "http://www.cecill.info". - * - * As a counterpart to the access to the source code and rights to copy, - * modify and redistribute granted by the license, users are provided only - * with a limited warranty and the software's author, the holder of the - * economic rights, and the successive licensors have only limited liability. - * - * In this respect, the user's attention is drawn to the risks associated - * with loading, using, modifying and/or developing or reproducing the - * software by the user in light of its specific status of free software, - * that may mean that it is complicated to manipulate, and that also - * therefore means that it is reserved for developers and experienced - * professionals having in-depth computer knowledge. Users are therefore - * encouraged to load and test the software's suitability as regards their - * requirements in conditions enabling the security of their systems and/or - * data to be ensured and, more generally, to use and operate it in the - * same conditions as regards security. - * The fact that you are presently reading this means that you have had - * knowledge of the CeCILL license and that you accept its terms. - * - * ParadisEO WebSite : http://paradiseo.gforge.inria.fr - * Contact: paradiseo-help@lists.gforge.inria.fr - * - */ -//----------------------------------------------------------------------------- -// t-moILS_HC.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO -#include - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- -class ObjectiveVectorTraits : public moeoObjectiveVectorTraits -{ - public: - static bool minimizing (int i) - { - return true; - } - static bool maximizing (int i) - { - return false; - } - static unsigned int nObjectives () - { - return 2; - } -}; - -typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; - -class Solution : public moeoRealVector < ObjectiveVector, double, double > -{ - public: - Solution() : moeoRealVector < ObjectiveVector, double, double > (2) {} -}; - -class solutionEval : public moeoEvalFunc < Solution > -{ - public: - void operator () (Solution & _sol) - { - ObjectiveVector objVec; - objVec[0] = _sol[0]; - objVec[1] = _sol[1]; - _sol.objectiveVector(objVec); - } -}; - - -class testMove : public moMove -{ - public : - void operator () (Solution & _solution) - { - Solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ - public : - void operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ - public : - bool operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ - public : - ObjectiveVector operator () (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution solution(_solution); - - - return _solution.objectiveVector(); - } -} ; - -class testTabuList : public moTabuList -{ - public: - bool operator() (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ - public: - bool operator() (const testMove & _move, const double & _fitness) - { - double fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -class solutionContinue : public moSolContinue -{ - public : - solutionContinue(): counter(0) - {} - - bool operator () (const Solution & _solution) - { - const Solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} - private : - unsigned int counter; -} ; - -class solutionComparator : public moComparator -{ - public : - bool operator () (const Solution & _solution1 , const Solution & _solution2) - { - const Solution sol1(_solution1); - const Solution sol2(_solution2); - - return sol1.fitness()>sol2.fitness(); - } -} ; - -class solutionPerturbation : public eoMonOp -{ - public : - bool operator () (Solution & _solution) - { - ObjectiveVector objVec; - objVec[0] = 1; - objVec[1] = 1; - _solution[1]=1; - _solution[0]=1; - _solution.objectiveVector(objVec); - _solution.fitness(2); - return true; - } -} ; - -class solutionSingler : public moeoSingleObjectivization -{ - void operator () (Solution & _solution){ - ObjectiveVector objVec; - objVec[0] = _solution[0]; - objVec[1] = _solution[1]; - _solution.objectiveVector(objVec); - _solution.fitness(_solution.objectiveVector()[0]+_solution.objectiveVector()[1]); - } - void operator()(eoPop &_pop){ - } - - double operator() (const ObjectiveVector &_obj){ - return _obj[0]+_obj[1]; - } - void updateByDeleting(eoPop& pop, ObjectiveVector& obj){} - -} ; - -class selectMove: public moMoveSelect -{ - public: - void init(const double &d){ - max_fit=d; - } - bool update(const testMove &move,const double &fitness){ - if (fitness>max_fit){ - max_fit=fitness; - best_move=move; - return false; - }else - return true; - } - void operator()(testMove &move,double &fitness){ - move=best_move; - fitness=max_fit; - } - private: - double max_fit; - testMove best_move; -}; - -//----------------------------------------------------------------------------- - -int main() -{ - std::string test_result; - - Solution solution; - - testMoveInit init; - testMoveNext next; - testMoveIncrEval incrEval; - testTabuList tabuList; - testAspirCrit aspirCrit; - solutionEval eval; - solutionContinue continu; - solutionContinue continu_2; - solutionComparator comparator; - solutionPerturbation perturbation; - solutionSingler singler; - selectMove select; - - moeoHC hc(init, next, incrEval, select, singler); - - cout << "[ moeoHC ] ==> "; - - hc(solution); - - cout << "OK" << endl; - return EXIT_SUCCESS; -} - -//----------------------------------------------------------------------------- - diff --git a/trunk/paradiseo-moeo/test/t-moeoILS_HC.cpp b/trunk/paradiseo-moeo/test/t-moeoILS_HC.cpp deleted file mode 100644 index 839b5735f..000000000 --- a/trunk/paradiseo-moeo/test/t-moeoILS_HC.cpp +++ /dev/null @@ -1,300 +0,0 @@ -/* - * - * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 - * (C) OPAC Team, LIFL, 2002-2008 - * - * S<-61><-87>bastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - * - * This software is governed by the CeCILL license under French law and - * abiding by the rules of distribution of free software. You can use, - * modify and/ or redistribute the software under the terms of the CeCILL - * license as circulated by CEA, CNRS and INRIA at the following URL - * "http://www.cecill.info". - * - * As a counterpart to the access to the source code and rights to copy, - * modify and redistribute granted by the license, users are provided only - * with a limited warranty and the software's author, the holder of the - * economic rights, and the successive licensors have only limited liability. - * - * In this respect, the user's attention is drawn to the risks associated - * with loading, using, modifying and/or developing or reproducing the - * software by the user in light of its specific status of free software, - * that may mean that it is complicated to manipulate, and that also - * therefore means that it is reserved for developers and experienced - * professionals having in-depth computer knowledge. Users are therefore - * encouraged to load and test the software's suitability as regards their - * requirements in conditions enabling the security of their systems and/or - * data to be ensured and, more generally, to use and operate it in the - * same conditions as regards security. - * The fact that you are presently reading this means that you have had - * knowledge of the CeCILL license and that you accept its terms. - * - * ParadisEO WebSite : http://paradiseo.gforge.inria.fr - * Contact: paradiseo-help@lists.gforge.inria.fr - * - */ -//----------------------------------------------------------------------------- -// t-moILS_HC.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO -#include - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- -class ObjectiveVectorTraits : public moeoObjectiveVectorTraits -{ - public: - static bool minimizing (int i) - { - return true; - } - static bool maximizing (int i) - { - return false; - } - static unsigned int nObjectives () - { - return 2; - } -}; - -typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; - -class Solution : public moeoRealVector < ObjectiveVector, double, double > -{ - public: - Solution() : moeoRealVector < ObjectiveVector, double, double > (2) {} -}; - -class solutionEval : public moeoEvalFunc < Solution > -{ - public: - void operator () (Solution & _sol) - { - ObjectiveVector objVec; - objVec[0] = _sol[0]; - objVec[1] = _sol[1]; - _sol.objectiveVector(objVec); - } -}; - - -class testMove : public moMove -{ - public : - void operator () (Solution & _solution) - { - Solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ - public : - void operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ - public : - bool operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ - public : - ObjectiveVector operator () (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution solution(_solution); - - - return _solution.objectiveVector(); - } -} ; - -class testTabuList : public moTabuList -{ - public: - bool operator() (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ - public: - bool operator() (const testMove & _move, const double & _fitness) - { - double fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -class solutionContinue : public moSolContinue -{ - public : - solutionContinue(): counter(0) - {} - - bool operator () (const Solution & _solution) - { - const Solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} - private : - unsigned int counter; -} ; - -class solutionComparator : public moComparator -{ - public : - bool operator () (const Solution & _solution1 , const Solution & _solution2) - { - const Solution sol1(_solution1); - const Solution sol2(_solution2); - - return sol1.fitness()>sol2.fitness(); - } -} ; - -class solutionPerturbation : public eoMonOp -{ - public : - bool operator () (Solution & _solution) - { - ObjectiveVector objVec; - objVec[0] = 1; - objVec[1] = 1; - _solution[1]=1; - _solution[0]=1; - _solution.objectiveVector(objVec); - _solution.fitness(2); - return true; - } -} ; - -class solutionSingler : public moeoSingleObjectivization -{ - void operator () (Solution & _solution){ - ObjectiveVector objVec; - objVec[0] = _solution[0]; - objVec[1] = _solution[1]; - _solution.objectiveVector(objVec); - _solution.fitness(_solution.objectiveVector()[0]+_solution.objectiveVector()[1]); - } - void operator()(eoPop &_pop){ - } - - double operator() (const ObjectiveVector &_obj){ - return _obj[0]+_obj[1]; - } - void updateByDeleting(eoPop& pop, ObjectiveVector& obj){} - -} ; - -class selectMove: public moMoveSelect -{ - public: - void init(const double &d){ - max_fit=d; - } - bool update(const testMove &move,const double &fitness){ - if (fitness>max_fit){ - max_fit=fitness; - best_move=move; - return false; - }else - return true; - } - void operator()(testMove &move,double &fitness){ - move=best_move; - fitness=max_fit; - } - private: - double max_fit; - testMove best_move; -}; - -//----------------------------------------------------------------------------- - -int main() -{ - std::string test_result; - int return_value; - - Solution solution; - - testMoveInit init; - testMoveNext next; - testMoveIncrEval incrEval; - testTabuList tabuList; - testAspirCrit aspirCrit; - solutionEval eval; - solutionContinue continu; - solutionContinue continu_2; - solutionComparator comparator; - solutionPerturbation perturbation; - solutionSingler singler; - selectMove select; - - moeoILS ils(init, next, incrEval, singler, select, continu, comparator, perturbation); - - cout << "[ moILS_HC ] ==> "; - - ils(solution); - - test_result=((solution.fitness()!=2)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- - diff --git a/trunk/paradiseo-moeo/test/t-moeoILS_SA.cpp b/trunk/paradiseo-moeo/test/t-moeoILS_SA.cpp deleted file mode 100644 index 9b83c79ad..000000000 --- a/trunk/paradiseo-moeo/test/t-moeoILS_SA.cpp +++ /dev/null @@ -1,325 +0,0 @@ -/* - * - * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 - * (C) OPAC Team, LIFL, 2002-2008 - * - * S<-61><-87>bastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - * Legillon François - * - * This software is governed by the CeCILL license under French law and - * abiding by the rules of distribution of free software. You can use, - * modify and/ or redistribute the software under the terms of the CeCILL - * license as circulated by CEA, CNRS and INRIA at the following URL - * "http://www.cecill.info". - * - * As a counterpart to the access to the source code and rights to copy, - * modify and redistribute granted by the license, users are provided only - * with a limited warranty and the software's author, the holder of the - * economic rights, and the successive licensors have only limited liability. - * - * In this respect, the user's attention is drawn to the risks associated - * with loading, using, modifying and/or developing or reproducing the - * software by the user in light of its specific status of free software, - * that may mean that it is complicated to manipulate, and that also - * therefore means that it is reserved for developers and experienced - * professionals having in-depth computer knowledge. Users are therefore - * encouraged to load and test the software's suitability as regards their - * requirements in conditions enabling the security of their systems and/or - * data to be ensured and, more generally, to use and operate it in the - * same conditions as regards security. - * The fact that you are presently reading this means that you have had - * knowledge of the CeCILL license and that you accept its terms. - * - * ParadisEO WebSite : http://paradiseo.gforge.inria.fr - * Contact: paradiseo-help@lists.gforge.inria.fr - * - */ -//----------------------------------------------------------------------------- -// t-moILS_HC.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO -#include - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- -class ObjectiveVectorTraits : public moeoObjectiveVectorTraits -{ - public: - static bool minimizing (int i) - { - return true; - } - static bool maximizing (int i) - { - return false; - } - static unsigned int nObjectives () - { - return 2; - } -}; - -typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; - -class Solution : public moeoRealVector < ObjectiveVector, double, double > -{ - public: - Solution() : moeoRealVector < ObjectiveVector, double, double > (2) {} -}; - -class solutionEval : public moeoEvalFunc < Solution > -{ - public: - void operator () (Solution & _sol) - { - ObjectiveVector objVec; - objVec[0] = _sol[0]; - objVec[1] = _sol[1]; - _sol.objectiveVector(objVec); - } -}; - - -class testMove : public moMove -{ - public : - void operator () (Solution & _solution) - { - Solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ - public : - void operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ - public : - bool operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ - public : - ObjectiveVector operator () (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution solution(_solution); - - - return _solution.objectiveVector(); - } -} ; - -class testTabuList : public moTabuList -{ - public: - bool operator() (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ - public: - bool operator() (const testMove & _move, const double & _fitness) - { - double fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -class solutionContinue : public moSolContinue -{ - public : - solutionContinue(): counter(0) - {} - - bool operator () (const Solution & _solution) - { - const Solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} - private : - unsigned int counter; -} ; - -class solutionComparator : public moComparator -{ - public : - bool operator () (const Solution & _solution1 , const Solution & _solution2) - { - const Solution sol1(_solution1); - const Solution sol2(_solution2); - - return sol1.fitness()>sol2.fitness(); - } -} ; - -class solutionPerturbation : public eoMonOp -{ - public : - bool operator () (Solution & _solution) - { - ObjectiveVector objVec; - objVec[0] = 1; - objVec[1] = 1; - _solution[1]=1; - _solution[0]=1; - _solution.objectiveVector(objVec); - _solution.fitness(2); - return true; - } -} ; - -class solutionSingler : public moeoSingleObjectivization -{ - void operator () (Solution & _solution){ - ObjectiveVector objVec; - objVec[0] = _solution[0]; - objVec[1] = _solution[1]; - _solution.objectiveVector(objVec); - _solution.fitness(_solution.objectiveVector()[0]+_solution.objectiveVector()[1]); - } - void operator()(eoPop &_pop){ - } - - double operator() (const ObjectiveVector &_obj){ - return _obj[0]+_obj[1]; - } - void updateByDeleting(eoPop& pop, ObjectiveVector& obj){} - -} ; - -class selectMove: public moMoveSelect -{ - public: - void init(const double &d){ - max_fit=d; - } - bool update(const testMove &move,const double &fitness){ - if (fitness>max_fit){ - max_fit=fitness; - best_move=move; - return false; - }else - return true; - } - void operator()(testMove &move,double &fitness){ - move=best_move; - fitness=max_fit; - } - private: - double max_fit; - testMove best_move; -}; -class testCooling : public moCoolingSchedule -{ -public : - bool operator () (double & _temperature) - { - double temperature; - temperature=_temperature; - - return false; - } -}; - -class testRandMove : public moRandMove -{ -public : - void operator () (testMove & _move) - { - _move=_move; - } -}; - -//----------------------------------------------------------------------------- - -int main() -{ - std::string test_result; - int return_value; - - Solution solution; - - testMoveInit init; - testMoveNext next; - testMoveIncrEval incrEval; - testTabuList tabuList; - testAspirCrit aspirCrit; - solutionEval eval; - solutionContinue continu; - solutionContinue continu_2; - solutionComparator comparator; - solutionPerturbation perturbation; - solutionSingler singler; - selectMove select; - - testRandMove rand; - testCooling cooling; - - // moeoILS ils(init, next, incrEval, singler, select, continu, comparator, perturbation, eval); - moeoILS ils(rand, incrEval,singler, continu, 10.0, cooling, continu_2, comparator, perturbation); - - cout << "[ moILS_HC ] ==> "; - - ils(solution); - - test_result=((solution.fitness()!=2)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- - diff --git a/trunk/paradiseo-moeo/test/t-moeoILS_TS.cpp b/trunk/paradiseo-moeo/test/t-moeoILS_TS.cpp deleted file mode 100755 index 49a492008..000000000 --- a/trunk/paradiseo-moeo/test/t-moeoILS_TS.cpp +++ /dev/null @@ -1,277 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* - */ -//----------------------------------------------------------------------------- -// t-moILS_TS.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO -#include - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- -class ObjectiveVectorTraits : public moeoObjectiveVectorTraits -{ - public: - static bool minimizing (int i) - { - return true; - } - static bool maximizing (int i) - { - return false; - } - static unsigned int nObjectives () - { - return 2; - } -}; - -typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; - -class Solution : public moeoRealVector < ObjectiveVector, double, double > -{ - public: - Solution() : moeoRealVector < ObjectiveVector, double, double > (2) {} -}; - -class solutionEval : public moeoEvalFunc < Solution > -{ - public: - void operator () (Solution & _sol) - { - ObjectiveVector objVec; - objVec[0] = _sol[0]; - objVec[1] = _sol[1]; - _sol.objectiveVector(objVec); -// _sol.fitness(_sol[1]+_sol[2]); - } -}; - - -class testMove : public moMove -{ - public : - void operator () (Solution & _solution) - { - Solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ - public : - void operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ - public : - bool operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ - public : - ObjectiveVector operator () (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution solution(_solution); - - - return _solution.objectiveVector(); - } -} ; - -class testTabuList : public moTabuList -{ - public: - bool operator() (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ - public: - bool operator() (const testMove & _move, const double & _fitness) - { - double fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -class solutionContinue : public moSolContinue -{ - public : - solutionContinue(): counter(0) - {} - - bool operator () (const Solution & _solution) - { - const Solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} - private : - unsigned int counter; -} ; - -class solutionComparator : public moComparator -{ - public : - bool operator () (const Solution & _solution1 , const Solution & _solution2) - { - const Solution sol1(_solution1); - const Solution sol2(_solution2); - - return sol1.fitness()>sol2.fitness(); - } -} ; - -class solutionPerturbation : public eoMonOp -{ - public : - bool operator () (Solution & _solution) - { - ObjectiveVector objVec; - objVec[0] = 1; - objVec[1] = 1; - _solution[1]=1; - _solution[0]=1; - _solution.objectiveVector(objVec); - _solution.fitness(2); - _solution.invalidate(); - return true; - } -} ; - -class solutionSingler : public moeoSingleObjectivization -{ - void operator () (Solution & _solution){ - - ObjectiveVector objVec; - objVec[0] = _solution[0]; - objVec[1] = _solution[1]; - _solution.objectiveVector(objVec); - _solution.fitness(_solution.objectiveVector()[0]+_solution.objectiveVector()[1]); - } - void operator()(eoPop &_pop){ - } - - double operator() (const ObjectiveVector &_obj){ - return _obj[0]+_obj[1]; - } - void updateByDeleting(eoPop& pop, ObjectiveVector& obj){} - -} ; - -//----------------------------------------------------------------------------- - -int main() -{ - std::string test_result; - int return_value; - - Solution solution; - - testMoveInit init; - testMoveNext next; - testMoveIncrEval incrEval; - testTabuList tabuList; - testAspirCrit aspirCrit; - solutionEval eval; - solutionContinue continu; - solutionContinue continu_2; - solutionComparator comparator; - solutionPerturbation perturbation; - solutionSingler singler; - - moeoILS ils(init, next, incrEval, singler, tabuList, aspirCrit, continu, continu_2, comparator, perturbation); - - cout << "[ moILS_TS ] ==> "; - - ils(solution); - test_result=((solution.fitness()!=2)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-moeo/test/t-moeoQexploreWeightStrategy.cpp b/trunk/paradiseo-moeo/test/t-moeoQexploreWeightStrategy.cpp deleted file mode 100644 index 5e5eb1911..000000000 --- a/trunk/paradiseo-moeo/test/t-moeoQexploreWeightStrategy.cpp +++ /dev/null @@ -1,306 +0,0 @@ -/* - * - * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 - * (C) OPAC Team, LIFL, 2002-2008 - * - * Fraéncçois Legillon - * - * This software is governed by the CeCILL license under French law and - * abiding by the rules of distribution of free software. You can use, - * modify and/ or redistribute the software under the terms of the CeCILL - * license as circulated by CEA, CNRS and INRIA at the following URL - * "http://www.cecill.info". - * - * As a counterpart to the access to the source code and rights to copy, - * modify and redistribute granted by the license, users are provided only - * with a limited warranty and the software's author, the holder of the - * economic rights, and the successive licensors have only limited liability. - * - * In this respect, the user's attention is drawn to the risks associated - * with loading, using, modifying and/or developing or reproducing the - * software by the user in light of its specific status of free software, - * that may mean that it is complicated to manipulate, and that also - * therefore means that it is reserved for developers and experienced - * professionals having in-depth computer knowledge. Users are therefore - * encouraged to load and test the software's suitability as regards their - * requirements in conditions enabling the security of their systems and/or - * data to be ensured and, more generally, to use and operate it in the - * same conditions as regards security. - * The fact that you are presently reading this means that you have had - * knowledge of the CeCILL license and that you accept its terms. - * - * ParadisEO WebSite : http://paradiseo.gforge.inria.fr - * Contact: paradiseo-help@lists.gforge.inria.fr - * - */ -//----------------------------------------------------------------------------- -// t-moeoQexploreWeightStrategy.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO -#include - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- -class ObjectiveVectorTraits : public moeoObjectiveVectorTraits -{ - public: - static bool minimizing (int i) - { - return true; - } - static bool maximizing (int i) - { - return false; - } - static unsigned int nObjectives () - { - return 2; - } -}; - -typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; - -class Solution : public moeoRealVector < ObjectiveVector, double, double > -{ - public: - Solution() : moeoRealVector < ObjectiveVector, double, double > (2) {} -}; - -class solutionEval : public eoEvalFunc < Solution > -{ - public: - void operator () (Solution & _sol) - { - ObjectiveVector objVec; - objVec[0] = _sol[0]; - objVec[1] = _sol[1]; - _sol.objectiveVector(objVec); - } -}; - - -class testMove : public moMove -{ - public : - void operator () (Solution & _solution) - { - Solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ - public : - void operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ - public : - bool operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ - public : - ObjectiveVector operator () (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution solution(_solution); - - - return _solution.objectiveVector(); - } -} ; - -class testTabuList : public moTabuList -{ - public: - bool operator() (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ - public: - bool operator() (const testMove & _move, const double & _fitness) - { - double fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -class solutionContinue : public eoContinue -{ - public : - solutionContinue(): counter(0) - {} - - bool operator () (const eoPop & _solution) - { - if(counter==0) - { - counter++; - return true; - } - return false; - } - - - bool operator () (const Solution & _solution) - { - const Solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} - private : - unsigned int counter; -} ; - -class solutionComparator : public moeoComparator -{ - public : - const bool operator () (const Solution & _solution1 , const Solution & _solution2) - { - const Solution sol1(_solution1); - const Solution sol2(_solution2); - - return sol1.fitness()>sol2.fitness(); - } -} ; - -class solutionPerturbation : public eoMonOp -{ - public : - bool operator () (Solution & _solution) - { - ObjectiveVector objVec; - objVec[0] = 1; - objVec[1] = 1; - _solution[1]=1; - _solution[0]=1; - _solution.objectiveVector(objVec); - _solution.fitness(2); - return true; - } -} ; - -class solutionSingler : public moeoSingleObjectivization -{ - void operator () (Solution & _solution){ - ObjectiveVector objVec; - objVec[0] = _solution[0]; - objVec[1] = _solution[1]; - _solution.objectiveVector(objVec); - _solution.fitness(_solution.objectiveVector()[0]+_solution.objectiveVector()[1]); - } - void operator()(eoPop &_pop){ - } - - double operator() (const ObjectiveVector &_obj){ - return _obj[0]+_obj[1]; - } - void updateByDeleting(eoPop& pop, ObjectiveVector& obj){} - -} ; - -class selectMove: public moMoveSelect -{ - public: - void init(const double &d){ - max_fit=d; - } - bool update(const testMove &move,const double &fitness){ - if (fitness>max_fit){ - max_fit=fitness; - best_move=move; - return false; - }else - return true; - } - void operator()(testMove &move,double &fitness){ - move=best_move; - fitness=max_fit; - } - private: - double max_fit; - testMove best_move; -}; - -//----------------------------------------------------------------------------- - -int main() -{ - Solution solution; - moeoQexploreWeightStrategy strat; - cout << "[ moeoQexploreWeightStrategy ] ==> "; - std::vector weight; - weight.resize(2); - strat(weight,solution); - assert(weight[0]==0 && weight[1]==1); - strat(weight,solution); - assert(weight[0]==1 && weight[1]==0); - strat(weight,solution); - assert(weight[0]==0.5 && weight[1]==0.5); - strat(weight,solution); - assert(weight[0]==1.0/3.0 && weight[1]==2.0/3.0); - strat(weight,solution); - assert(weight[0]==2.0/3.0 && weight[1]==1.0/3.0); - strat(weight,solution); - assert(weight[0]==1.0/4.0 && weight[1]==3.0/4.0); - strat(weight,solution); - assert(weight[0]==3.0/4.0 && weight[1]==1.0/4.0); - - - - std::cout<<"OK"< -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* - */ -//----------------------------------------------------------------------------- -// t-moILS_TS.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO -#include - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- -class ObjectiveVectorTraits : public moeoObjectiveVectorTraits -{ - public: - static bool minimizing (int i) - { - return true; - } - static bool maximizing (int i) - { - return false; - } - static unsigned int nObjectives () - { - return 2; - } -}; - -typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; - -class Solution : public moeoRealVector < ObjectiveVector, double, double > -{ - public: - Solution() : moeoRealVector < ObjectiveVector, double, double > (2) {} -}; - -class solutionEval : public moeoEvalFunc < Solution > -{ - public: - void operator () (Solution & _sol) - { - ObjectiveVector objVec; - objVec[0] = _sol[0]; - objVec[1] = _sol[1]; - _sol.objectiveVector(objVec); -// _sol.fitness(_sol[1]+_sol[2]); - } -}; - - -class testMove : public moMove -{ - public : - void operator () (Solution & _solution) - { - Solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ - public : - void operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ - public : - bool operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ - public : - ObjectiveVector operator () (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution solution(_solution); - - - return _solution.objectiveVector(); - } -} ; - -class testTabuList : public moTabuList -{ - public: - bool operator() (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ - public: - bool operator() (const testMove & _move, const double & _fitness) - { - double fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -class solutionContinue : public moSolContinue -{ - public : - solutionContinue(): counter(0) - {} - - bool operator () (const Solution & _solution) - { - const Solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} - private : - unsigned int counter; -} ; - -class solutionComparator : public moComparator -{ - public : - bool operator () (const Solution & _solution1 , const Solution & _solution2) - { - const Solution sol1(_solution1); - const Solution sol2(_solution2); - - return sol1.fitness()>sol2.fitness(); - } -} ; - -class solutionPerturbation : public eoMonOp -{ - public : - bool operator () (Solution & _solution) - { - ObjectiveVector objVec; - objVec[0] = 1; - objVec[1] = 1; - _solution[1]=1; - _solution[0]=1; - _solution.objectiveVector(objVec); - _solution.fitness(2); - _solution.invalidate(); - return true; - } -} ; - -class solutionSingler : public moeoSingleObjectivization -{ - void operator () (Solution & _solution){ - - ObjectiveVector objVec; - objVec[0] = _solution[0]; - objVec[1] = _solution[1]; - _solution.objectiveVector(objVec); - _solution.fitness(_solution.objectiveVector()[0]+_solution.objectiveVector()[1]); - } - void operator()(eoPop &_pop){ - } - - double operator() (const ObjectiveVector &_obj){ - return _obj[0]+_obj[1]; - } - void updateByDeleting(eoPop& pop, ObjectiveVector& obj){} - -} ; - -//----------------------------------------------------------------------------- - -int main() -{ - std::string test_result; - - Solution solution; - - testMoveInit init; - testMoveNext next; - testMoveIncrEval incrEval; - testTabuList tabuList; - testAspirCrit aspirCrit; - solutionEval eval; - solutionContinue continu; - solutionContinue continu_2; - solutionComparator comparator; - solutionPerturbation perturbation; - solutionSingler singler; - moeoIncrEvalSingleObjectivizer sincrEval(singler,incrEval); - moeoTSMoveLoopExpl expl(init,next,sincrEval,tabuList,aspirCrit); - moeoTS ts(init,next,incrEval,tabuList,aspirCrit,continu,singler); - - - cout << "[ moeoTS ] ==> "; - ts(solution); - cout << "OK" << endl; - return EXIT_SUCCESS; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-moeo/test/t-moeoVFAS.cpp b/trunk/paradiseo-moeo/test/t-moeoVFAS.cpp deleted file mode 100644 index c5e2f5079..000000000 --- a/trunk/paradiseo-moeo/test/t-moeoVFAS.cpp +++ /dev/null @@ -1,314 +0,0 @@ -/* - * - * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 - * (C) OPAC Team, LIFL, 2002-2008 - * - * Fraéncçois Legillon - * - * This software is governed by the CeCILL license under French law and - * abiding by the rules of distribution of free software. You can use, - * modify and/ or redistribute the software under the terms of the CeCILL - * license as circulated by CEA, CNRS and INRIA at the following URL - * "http://www.cecill.info". - * - * As a counterpart to the access to the source code and rights to copy, - * modify and redistribute granted by the license, users are provided only - * with a limited warranty and the software's author, the holder of the - * economic rights, and the successive licensors have only limited liability. - * - * In this respect, the user's attention is drawn to the risks associated - * with loading, using, modifying and/or developing or reproducing the - * software by the user in light of its specific status of free software, - * that may mean that it is complicated to manipulate, and that also - * therefore means that it is reserved for developers and experienced - * professionals having in-depth computer knowledge. Users are therefore - * encouraged to load and test the software's suitability as regards their - * requirements in conditions enabling the security of their systems and/or - * data to be ensured and, more generally, to use and operate it in the - * same conditions as regards security. - * The fact that you are presently reading this means that you have had - * knowledge of the CeCILL license and that you accept its terms. - * - * ParadisEO WebSite : http://paradiseo.gforge.inria.fr - * Contact: paradiseo-help@lists.gforge.inria.fr - * - */ -//----------------------------------------------------------------------------- -// t-moILS_HC.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO -#include - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- -class ObjectiveVectorTraits : public moeoObjectiveVectorTraits -{ - public: - static bool minimizing (int i) - { - return true; - } - static bool maximizing (int i) - { - return false; - } - static unsigned int nObjectives () - { - return 2; - } -}; - -typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; - -class Solution : public moeoRealVector < ObjectiveVector, double, double > -{ - public: - Solution() : moeoRealVector < ObjectiveVector, double, double > (2) {} -}; - -class solutionEval : public eoEvalFunc < Solution > -{ - public: - void operator () (Solution & _sol) - { - ObjectiveVector objVec; - objVec[0] = _sol[0]; - objVec[1] = _sol[1]; - _sol.objectiveVector(objVec); - } -}; - - -class testMove : public moMove -{ - public : - void operator () (Solution & _solution) - { - Solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ - public : - void operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ - public : - bool operator () (testMove & _move, const Solution & _solution) - { - testMove move=_move; - const Solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ - public : - ObjectiveVector operator () (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution solution(_solution); - - - return _solution.objectiveVector(); - } -} ; - -class testTabuList : public moTabuList -{ - public: - bool operator() (const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const Solution & _solution) - { - const testMove move(_move); - const Solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ - public: - bool operator() (const testMove & _move, const double & _fitness) - { - double fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -class solutionContinue : public eoContinue -{ - public : - solutionContinue(): counter(0) - {} - - bool operator () (const eoPop & _solution) - { - if(counter==0) - { - counter++; - return true; - } - return false; - } - - - bool operator () (const Solution & _solution) - { - const Solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} - private : - unsigned int counter; -} ; - -class solutionComparator : public moeoComparator -{ - public : - const bool operator () (const Solution & _solution1 , const Solution & _solution2) - { - const Solution sol1(_solution1); - const Solution sol2(_solution2); - - return sol1.fitness()>sol2.fitness(); - } -} ; - -class solutionPerturbation : public eoMonOp -{ - public : - bool operator () (Solution & _solution) - { - ObjectiveVector objVec; - objVec[0] = 1; - objVec[1] = 1; - _solution[1]=1; - _solution[0]=1; - _solution.objectiveVector(objVec); - _solution.fitness(2); - return true; - } -} ; - -class solutionSingler : public moeoSingleObjectivization -{ - void operator () (Solution & _solution){ - ObjectiveVector objVec; - objVec[0] = _solution[0]; - objVec[1] = _solution[1]; - _solution.objectiveVector(objVec); - _solution.fitness(_solution.objectiveVector()[0]+_solution.objectiveVector()[1]); - } - void operator()(eoPop &_pop){ - } - - double operator() (const ObjectiveVector &_obj){ - return _obj[0]+_obj[1]; - } - void updateByDeleting(eoPop& pop, ObjectiveVector& obj){} - -} ; - -class selectMove: public moMoveSelect -{ - public: - void init(const double &d){ - max_fit=d; - } - bool update(const testMove &move,const double &fitness){ - if (fitness>max_fit){ - max_fit=fitness; - best_move=move; - return false; - }else - return true; - } - void operator()(testMove &move,double &fitness){ - move=best_move; - fitness=max_fit; - } - private: - double max_fit; - testMove best_move; -}; - -//----------------------------------------------------------------------------- - -int main() -{ - std::string test_result; - - Solution solution; - - testMoveInit init; - testMoveNext next; - testMoveIncrEval incrEval; - testTabuList tabuList; - testAspirCrit aspirCrit; - solutionEval eval; - solutionContinue continu; - solutionContinue continu_2; - solutionComparator comparator; - solutionPerturbation perturbation; - solutionSingler singler; - selectMove select; - moeoDetTournamentSelect selectOne(comparator); - eoPop pop; - pop.push_back(solution); - moeoRandWeightStrategy strat; - std::vector weights; - weights.push_back(0); - weights.push_back(1); - - moeoHC hc(init,next,incrEval,select,singler); - moeoVFAS vfas(hc,continu,selectOne,eval,strat); - moeoVFAS vfas1(hc,continu,selectOne,weights,eval,strat); - - cout << "[ moeo_VFAS ] ==> "; - vfas(pop); - std::cout<<"OK"< -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2007-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Salma Mesmoudi (salma.mesmoudi@inria.fr), Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* Jeremie Humeau (jeremie.humeau@inria.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moVNS.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO -#include -#include - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- -class ObjectiveVectorTraits : public moeoObjectiveVectorTraits -{ - public: - static bool minimizing (int i) - { - return true; - } - static bool maximizing (int i) - { - return false; - } - static unsigned int nObjectives () - { - return 2; - } -}; - - -typedef EO solution; -typedef moeoRealObjectiveVector ObjectiveVector; -typedef eoScalarFitness< float, std::greater > tspFitness ; -typedef moeoRealVector Route ; - -int cpt=0; -int tableau[8]={1.0, 2.0, 8.0, 8.0, 11.0, 11.0, 11.0,30.0}; - -class testMove : public moMove -{ -public : - - void operator () (solution & _solution) - { - solution sol=_solution; - } -} ; - - -class solutionAlgo : public moAlgo -{ -public : - bool operator () (solution & _solution) - { - solution solution(_solution); - return true; - } -} ; - -class Voisinage : public eoMonOp -{ -public : - bool operator () (Route & _solution) - { - _solution.invalidate(); - //_solution.fitness(); - - return true; - } -} ; - -class Explorer : public moExpl -{ -public: - Explorer(eoMonOp & expl): moExpl( expl) - { - - } -}; - -class solutionEval : public eoEvalFunc -{ -public : - void operator () (Route & _solution) - { - ObjectiveVector obj; - obj[0]=(tableau[0]); - obj[1]=(tableau[cpt]); - _solution.objectiveVector(obj); - _solution.fitness(obj[0]+obj[1]); - cpt++; - } -}; - -class solutionSingler : public moeoSingleObjectivization -{ - public: - solutionSingler(solutionEval &_eval):eval(_eval){} - void operator () (Route & _solution){ - eval(_solution); - _solution.fitness(_solution.objectiveVector()[0]+_solution.objectiveVector()[1]); - } - void operator()(eoPop &_pop){ - } - - Route::Fitness operator() (const ObjectiveVector &_obj){ - return _obj[0]+_obj[1]; - } - void updateByDeleting(eoPop& pop, ObjectiveVector& obj){} - solutionEval &eval; - -} ; - - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - - //solution solution; - Route so ; - - Voisinage sol1; - Voisinage sol2; - Explorer explorer(sol1); - explorer.addExplorer(sol2); - solutionEval eval; - std::vector poids; - poids.push_back(1); - poids.push_back(1); - solutionSingler singler(eval); - - moeoVNS vns(explorer, singler); - - cout << "[moeoVNS] ==> "; - - so.fitness(5.0); - - vns(so); - - assert(so.fitness()==12.0); - - cout << "OK" << endl; - - return EXIT_SUCCESS; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-moeo/tutorial/CMakeLists.txt b/trunk/paradiseo-moeo/tutorial/CMakeLists.txt deleted file mode 100644 index 7a3083dd9..000000000 --- a/trunk/paradiseo-moeo/tutorial/CMakeLists.txt +++ /dev/null @@ -1,257 +0,0 @@ - -###################################################################################### -### 1) Definitions -###################################################################################### -INCLUDE_DIRECTORIES(${MO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${OLDMO_SRC_DIR}/src) -SET(FLOWSHOP_SRC_DIR ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop) -SET(FLOWSHOP_BINARY_DIR ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop) - -###################################################################################### - -###################################################################################### -### 2) How to manage copy of benchs ? -###################################################################################### - -IF(ENABLE_CMAKE_EXAMPLE OR CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SET(BENCH_LIST - 020_05_01.txt - 020_05_02.txt - 020_10_01.txt - 020_10_02.txt - 020_20_01.txt - 050_05_01.txt - 050_10_01.txt - 050_20_01.txt - 100_05_01.txt - 100_10_01.txt - 100_20_01.txt - 200_10_01.txt - README - ) - - FOREACH (bench ${BENCH_LIST}) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/${bench} - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/${bench} - ) - ENDFOREACH (bench) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson1/Sch1.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1/Sch1.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson2/FlowShopEA.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2/FlowShopEA.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson3/FlowShopEA2.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson3/FlowShopEA2.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson4/FlowShopDMLS.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson4/FlowShopDMLS.param - ) -ENDIF(ENABLE_CMAKE_EXAMPLE OR CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -MACRO(ADD_COMMANDS_MOEO) - ADD_CUSTOM_COMMAND( - OUTPUT - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/README - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/README - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/README - ) - - ADD_CUSTOM_COMMAND( - OUTPUT ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1/Sch1.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson1/Sch1.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1 - ) - - ADD_CUSTOM_COMMAND( - OUTPUT ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2/FlowShopEA.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson2/FlowShopEA.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2 - ) - - ADD_CUSTOM_COMMAND( - OUTPUT ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson3/FlowShopEA2.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson3/FlowShopEA2.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson3 - ) - - ADD_CUSTOM_COMMAND( - OUTPUT ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson4/FlowShopDMLS.param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson4/FlowShopDMLS.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson4 - ) -ENDMACRO(ADD_COMMANDS_MOEO) - -MACRO(ADD_TARGET_MOEO n) - IF(${n} STREQUAL "lesson1") - ADD_CUSTOM_TARGET(lesson1 DEPENDS - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1/Sch1 - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1/Sch1.param - ) - ELSEIF(${n} STREQUAL "lesson2") - ADD_CUSTOM_TARGET(lesson2 DEPENDS - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2/FlowShopEA - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2/FlowShopEA.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt - ) - ELSEIF(${n} STREQUAL "lesson3") - ADD_CUSTOM_TARGET(lesson3 DEPENDS - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson3/FlowShopEA2 - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson3/FlowShopEA2.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt - ) - ELSEIF(${n} STREQUAL "lesson4") - ADD_CUSTOM_TARGET(lesson4 DEPENDS - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson4/FlowShopDMLS - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson4/FlowShopDMLS.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt - ) - ELSEIF(${n} STREQUAL "install") - ADD_CUSTOM_TARGET(install DEPENDS - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1/Sch1.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2/FlowShopEA.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson3/FlowShopEA2.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/README - ) - ELSEIF(${n} STREQUAL "benchs") - ADD_CUSTOM_TARGET(benchs DEPENDS - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/README - ) - ENDIF(${n} STREQUAL "lesson1") -ENDMACRO(ADD_TARGET_MOEO) - -###################################################################################### -### 3) Where must cmake go now ? -###################################################################################### - -ADD_SUBDIRECTORY(examples) -ADD_SUBDIRECTORY(Lesson1) -ADD_SUBDIRECTORY(Lesson2) -ADD_SUBDIRECTORY(Lesson3) -ADD_SUBDIRECTORY(Lesson4) - -###################################################################################### - -###################################################################################### -### 4) Target to copy benchs and parameters file -###################################################################################### - -IF(NOT CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" AND NOT CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_MOEO() - ADD_TARGET_MOEO(install) - ADD_TARGET_MOEO(benchs) -ENDIF(NOT CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" AND NOT CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") \ No newline at end of file diff --git a/trunk/paradiseo-moeo/tutorial/FlowShopDMLS.param b/trunk/paradiseo-moeo/tutorial/FlowShopDMLS.param deleted file mode 100644 index 5cfc59993..000000000 --- a/trunk/paradiseo-moeo/tutorial/FlowShopDMLS.param +++ /dev/null @@ -1,20 +0,0 @@ - -###### General ###### -# --help=0 # -h : Prints this message -# --stopOnUnknownParam=1 # Stop if unkown param entered -# --seed=1275659678 # -S : Random number seed - -###### Evolution Engine ###### -# --nhSize=20 # -G : neighborhood size ---popSize=1 # -P : Population Size - -###### Persistence ###### -# --Load= # -L : A save file to restart from -# --recomputeFitness=0 # -r : Recompute the fitness after re-loading the pop.? -# --status=./FlowShopDMLS.status # Status file - -###### Representation ###### -# --BenchmarkFile=../examples/flowshop/benchs/020_20_01.txt # -B : Benchmark file name - -###### Stopping criterion ###### -# --maxGen=100 # -G : Maximum number of gen. diff --git a/trunk/paradiseo-moeo/tutorial/Lesson1/CMakeLists.txt b/trunk/paradiseo-moeo/tutorial/Lesson1/CMakeLists.txt deleted file mode 100644 index 48f4c418a..000000000 --- a/trunk/paradiseo-moeo/tutorial/Lesson1/CMakeLists.txt +++ /dev/null @@ -1,49 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/utils) -INCLUDE_DIRECTORIES(${ParadisEO-MOEO_SOURCE_DIR}/src) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-MOEO_BINARY_DIR}/lib) - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES Sch1.cpp) - ADD_EXECUTABLE(Sch1 - Sch1.cpp - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1/Sch1.param - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_MOEO() - ADD_TARGET_MOEO(lesson1) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(Sch1 Sch1.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(Sch1 EXCLUDE_FROM_ALL Sch1.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -ADD_DEPENDENCIES(Sch1 moeo) - -###################################################################################### -### 4) Optionnal: define your target(s)'s version: no effect for windows -###################################################################################### - -SET(SCH1_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(Sch1 PROPERTIES VERSION "${SCH1_VERSION}") - -###################################################################################### -### 5) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(Sch1 moeo eo eoutils) - -###################################################################################### diff --git a/trunk/paradiseo-moeo/tutorial/Lesson2/CMakeLists.txt b/trunk/paradiseo-moeo/tutorial/Lesson2/CMakeLists.txt deleted file mode 100644 index 7c1132d50..000000000 --- a/trunk/paradiseo-moeo/tutorial/Lesson2/CMakeLists.txt +++ /dev/null @@ -1,76 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${ParadisEO-MOEO_SOURCE_DIR}/src) -INCLUDE_DIRECTORIES(${FLOWSHOP_SRC_DIR}) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-MOEO_BINARY_DIR}/lib ${FLOWSHOP_BINARY_DIR}/lib) - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES FlowShopEA.cpp) - SOURCE_GROUP(benchs FILES - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt - ) - ADD_EXECUTABLE(FlowShopEA - FlowShopEA.cpp - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2/FlowShopEA.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_MOEO() - ADD_TARGET_MOEO(lesson2) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(FlowShopEA FlowShopEA.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(FlowShopEA EXCLUDE_FROM_ALL FlowShopEA.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -ADD_DEPENDENCIES(FlowShopEA flowshop moeo) - -###################################################################################### -### 4) Optionnal: define your target(s)'s version: no effect for windows -###################################################################################### - -SET(FLOWSHOPEA_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(FlowShopEA PROPERTIES VERSION "${FLOWSHOPEA_VERSION}") - -###################################################################################### -### 5) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(FlowShopEA moeo flowshop eo eoutils) - -###################################################################################### diff --git a/trunk/paradiseo-moeo/tutorial/Lesson3/CMakeLists.txt b/trunk/paradiseo-moeo/tutorial/Lesson3/CMakeLists.txt deleted file mode 100644 index 82fbd633b..000000000 --- a/trunk/paradiseo-moeo/tutorial/Lesson3/CMakeLists.txt +++ /dev/null @@ -1,76 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${ParadisEO-MOEO_SOURCE_DIR}/src) -INCLUDE_DIRECTORIES(${FLOWSHOP_SRC_DIR}) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-MOEO_BINARY_DIR}/lib ${FLOWSHOP_BINARY_DIR}/lib) - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES FlowShopEA2.cpp) - SOURCE_GROUP(benchs FILES - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt - ) - ADD_EXECUTABLE(FlowShopEA2 - FlowShopEA2.cpp - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson3/FlowShopEA2.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_MOEO() - ADD_TARGET_MOEO(lesson3) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(FlowShopEA2 FlowShopEA2.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(FlowShopEA2 EXCLUDE_FROM_ALL FlowShopEA2.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -ADD_DEPENDENCIES(FlowShopEA2 flowshop moeo) - -###################################################################################### -### 4) Optionnal: define your target(s)'s version: no effect for windows -###################################################################################### - -SET(FlowShopEA2_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(FlowShopEA2 PROPERTIES VERSION "${FlowShopEA2_VERSION}") - -###################################################################################### -### 5) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(FlowShopEA2 moeo flowshop eo eoutils) - -###################################################################################### diff --git a/trunk/paradiseo-moeo/tutorial/Lesson4/CMakeLists.txt b/trunk/paradiseo-moeo/tutorial/Lesson4/CMakeLists.txt deleted file mode 100644 index 04e8dcbe9..000000000 --- a/trunk/paradiseo-moeo/tutorial/Lesson4/CMakeLists.txt +++ /dev/null @@ -1,76 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${ParadisEO-MOEO_SOURCE_DIR}/src) -INCLUDE_DIRECTORIES(${FLOWSHOP_SRC_DIR}) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-MOEO_BINARY_DIR}/lib ${FLOWSHOP_BINARY_DIR}/lib) - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES FlowShopDMLS.cpp) - SOURCE_GROUP(benchs FILES - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt - ) - ADD_EXECUTABLE(FlowShopDMLS - FlowShopDMLS.cpp - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson4/FlowShopDMLS.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_MOEO() - ADD_TARGET_MOEO(lesson4) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(FlowShopDMLS FlowShopDMLS.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(FlowShopDMLS EXCLUDE_FROM_ALL FlowShopDMLS.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -ADD_DEPENDENCIES(FlowShopDMLS flowshop moeo) - -###################################################################################### -### 4) Optionnal: define your target(s)'s version: no effect for windows -###################################################################################### - -SET(FlowShopDMLS_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(FlowShopDMLS PROPERTIES VERSION "${FlowShopDMLS_VERSION}") - -###################################################################################### -### 5) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(FlowShopDMLS moeo flowshop eo eoutils) - -###################################################################################### diff --git a/trunk/paradiseo-moeo/tutorial/examples/CMakeLists.txt b/trunk/paradiseo-moeo/tutorial/examples/CMakeLists.txt deleted file mode 100644 index 12436951d..000000000 --- a/trunk/paradiseo-moeo/tutorial/examples/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ - - -###################################################################################### -### 1) Where must cmake go now ? -###################################################################################### - -ADD_SUBDIRECTORY(flowshop) - -###################################################################################### \ No newline at end of file diff --git a/trunk/paradiseo-old-mo/AUTHORS b/trunk/paradiseo-old-mo/AUTHORS deleted file mode 100644 index 5c3a864b2..000000000 --- a/trunk/paradiseo-old-mo/AUTHORS +++ /dev/null @@ -1,9 +0,0 @@ -Source Code: - Sebastien CAHON - Jean-Charles BOISSON : Jean-Charles.Boisson@lifl.fr - -Lessons: - Sebastien CAHON - -Documentation: - Jean-Charles BOISSON : Jean-Charles.Boisson@lifl.fr diff --git a/trunk/paradiseo-old-mo/CMakeLists.txt b/trunk/paradiseo-old-mo/CMakeLists.txt deleted file mode 100644 index 0159b524f..000000000 --- a/trunk/paradiseo-old-mo/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - -########################################################################################################################################## -### 0) If you want to set your own variables in mo-conf.cmake and avoid the cmd line -########################################################################################################################################## - -INCLUDE(mo-conf.cmake OPTIONAL) - -########################################################################################################################################## - - -########################################################################################################################################## -### 1) Project properties -########################################################################################################################################## - -# set the project name -PROJECT(ParadisEO-OLD-MO) - -SET(PACKAGE_BUGREPORT "paradiseo-help@lists.gforge.inria.fr" CACHE STRING "Package bug report" FORCE) -SET(PACKAGE_NAME "ParadisEO-OLD-MO - Moving Objects" CACHE STRING "Package name" FORCE) -SET(PACKAGE_STRING "ParadisEO-OLD-MO 1.2" CACHE STRING "MO Package string full name" FORCE) -SET(PACKAGE_VERSION "1.2" CACHE STRING "Package version" FORCE) -SET(GLOBAL_VERSION "1.2" CACHE STRING "Global version" FORCE) -SET(VERSION "1.2" CACHE STRING "Version" FORCE) -########################################################################################################################################## - - -########################################################################################################################################## -### 2) Include the common CMake configuration -########################################################################################################################################## - -# The "config" variable must be provided on the command line -IF(NOT DEFINED config OR NOT config) - MESSAGE(FATAL_ERROR "The \"config\" variable must be set on the command line to - give the path of the install configuration file. ") -ENDIF(NOT DEFINED config OR NOT config) - -# Need the config file whose full path is given thanks to the "config" variable -INCLUDE(${config}) -########################################################################################################################################## - diff --git a/trunk/paradiseo-old-mo/CTestConfig.cmake b/trunk/paradiseo-old-mo/CTestConfig.cmake deleted file mode 100644 index 465d208d6..000000000 --- a/trunk/paradiseo-old-mo/CTestConfig.cmake +++ /dev/null @@ -1,7 +0,0 @@ -set(CTEST_PROJECT_NAME "ParadisEO") -set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") - -set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "cdash.inria.fr") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ParadisEO") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/trunk/paradiseo-old-mo/README b/trunk/paradiseo-old-mo/README deleted file mode 100644 index 98ace94bd..000000000 --- a/trunk/paradiseo-old-mo/README +++ /dev/null @@ -1,84 +0,0 @@ - PARADISEO-OLD-MO README FILE -======================================================================= - -======================================================================= - -Welcome to PARADISEO-OLD-MO (Moving Objects), a part of the ParadisEO framework. - -======================================================================= - BUILDING PARADISEO-OLD-MO -======================================================================= -The basic installation procedure goes the following: - -To compile paradiseo-mo in the default directory, -go to paradiseo-mo/build/ and run: - > cmake ../ -Dconfig= - > make - // for an easy-use of the provided lessons - > make install - // optional (if the documentation is not already available) - > make doc - -To compile paradiseo-mo anywhere else, simply run: - > cmake $(OLD-MO) -Dconfig= - > make - // for an easy-use of the provided lessons - > make install - // optional (if the documentation is not already available) - > make doc - -where $(OLD-MO) is the top-level directory of PARADISEO-MO. - -To clean everything, simply run - > make clean - -====================================================================== - DIRECTORY STRUCTURE -====================================================================== -After unpacking the archive file, you should end up with the following -structure: - -.../ The MAIN PARADISEO-MO directory, created when unpacking. - | - +-- build Repertory where the executables will be produced. - | - | - +-- src SOURCE directory contains most PARADISEO-MO .h files. - | - | - +-- doc DOCUMENTATION directory (generated by Doxygen). - | | - | +- html HTML files - start at index.html. - | | - | +- latex latex files - use to generate Postcript doc. - | | - | +- man Unix man format documentation. - | - | - +-- tutorial TUTORIAL with lessons - | - +- examples APPLICATIONS - one directory per separate application. - | | - | +- tsp traveling salesman problem (TSP) example sources. - | | - | +- benchs TSP instance files. - | - +- HybridLesson How make a Hybridization between a algorithm genetic and a local search. - | - +- Lesson1 How make a Hill Climbing on the TSP example. - | - +- Lesson2 How make a Tabu Search on the TSP example. - | - +- Lesson3 How make a Simulated Annealing on the TSP example. - | - +- Lesson4 How make a Iterated Tabu Search on the TSP example. - | - +- Lesson5 How make a Variable Neighbor Search on the TSP example. - | - +- OldLesson Old lesson. - -=================================================================== - NOTES -=================================================================== - -Mailing list : paradiseo-help@lists.gforge.inria.fr diff --git a/trunk/paradiseo-old-mo/doc/CMakeLists.txt b/trunk/paradiseo-old-mo/doc/CMakeLists.txt deleted file mode 100755 index 501222f98..000000000 --- a/trunk/paradiseo-old-mo/doc/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -########################################################################################## -### MO Doc generation using Doxygen -########################################################################################## - -IF (DOXYGEN_FOUND) - - SET(DOC_DIR ${CMAKE_BINARY_DIR}/doc CACHE PATH "MO documentation directory") - SET(OLDMO_DOC_CONFIG_FILE "mo.doxyfile" CACHE PATH "MO documentation configuration file") - # define the doc target - IF (DOXYGEN_EXECUTABLE) - ADD_CUSTOM_TARGET(doc - COMMAND ${DOXYGEN_EXECUTABLE} ${OLDMO_DOC_CONFIG_FILE} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - ENDIF (DOXYGEN_EXECUTABLE) - - # configure doxyfile file - CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/doc/${OLDMO_DOC_CONFIG_FILE}.cmake" - "${CMAKE_BINARY_DIR}/doc/${OLDMO_DOC_CONFIG_FILE}") - -ELSE (DOXYGEN_FOUND) - MESSAGE(STATUS "Unable to generate the documentation, Doxygen package not found") -ENDIF (DOXYGEN_FOUND) - -########################################################################################## diff --git a/trunk/paradiseo-old-mo/doc/mo.doxytag b/trunk/paradiseo-old-mo/doc/mo.doxytag deleted file mode 100644 index 7ca1a54d1..000000000 --- a/trunk/paradiseo-old-mo/doc/mo.doxytag +++ /dev/null @@ -1,1367 +0,0 @@ - - - - main - Welcome to PARADISEO-Moving Objects - main - Paradiseo - authors - Introduction - LICENSE - Installation - - - moAlgo - classmo_algo.html - EOT - eoMonOp< EOT > - - - moAspirCrit - classmo_aspir_crit.html - M - eoBF - - virtual void - init - classmo_aspir_crit.html - a8ce84510a5ec7c9078381e542c6d140 - ()=0 - - - - moBestImprSelect - classmo_best_impr_select.html - M - moMoveSelect - - M::EOType::Fitness - Fitness - classmo_best_impr_select.html - c4ae17435221fb0a8e8acd285210cfcb - - - - void - init - classmo_best_impr_select.html - 83f961549986b8ad94692e433aa79114 - (const Fitness &_fitness) - - - bool - update - classmo_best_impr_select.html - 5c0729fd316b0ef78406bce5ca91de2a - (const M &_move, const Fitness &_fitness) - - - void - operator() - classmo_best_impr_select.html - 33b3de7bd322f737eb97cce9a5404527 - (M &_move, Fitness &_fitness) - - - bool - first_time - classmo_best_impr_select.html - 352b14d206b0772eb9f40efb7beb0f13 - - - - M - best_move - classmo_best_impr_select.html - bd86f70519f954c07ff0d8a2a3a8ff6a - - - - Fitness - best_fitness - classmo_best_impr_select.html - e51345fe28ca7cbaca65bdad1aa8ecb7 - - - - - moComparator - classmo_comparator.html - EOT - eoBF - - - moCoolingSchedule - classmo_cooling_schedule.html - eoUF< double &, bool > - - - moExponentialCoolingSchedule - classmo_exponential_cooling_schedule.html - moCoolingSchedule - - - moExponentialCoolingSchedule - classmo_exponential_cooling_schedule.html - e60ce9eb5e632f4758ea96ae92a52774 - (double _threshold, double _ratio) - - - bool - operator() - classmo_exponential_cooling_schedule.html - 95b075e9786a5cc984ef1bb59a2107e4 - (double &_temperature) - - - double - threshold - classmo_exponential_cooling_schedule.html - 8d4327c0bb33b7121a322279eea97f84 - - - - double - ratio - classmo_exponential_cooling_schedule.html - e8f3f87417c1c7253efb938a740846fa - - - - - moFirstImprSelect - classmo_first_impr_select.html - M - moMoveSelect - - M::EOType::Fitness - Fitness - classmo_first_impr_select.html - 64763ce3e6d2873266624382b407fa5a - - - - virtual void - init - classmo_first_impr_select.html - a923437ecc3db50e7052b002a9a1bbf8 - (const Fitness &_fitness) - - - bool - update - classmo_first_impr_select.html - f68b7ee7b35bf7347c16006f0587d313 - (const M &_move, const Fitness &_fitness) - - - void - operator() - classmo_first_impr_select.html - 976569efd882886cb13184daeba79766 - (M &_move, Fitness &_fitness) - - - bool - valid - classmo_first_impr_select.html - a99c0586ba07449234705c17a258d58c - - - - M - best_move - classmo_first_impr_select.html - dfed419a608dd7c41f07fa1f1279cb8c - - - - Fitness - initial_fitness - classmo_first_impr_select.html - 669f8f2f74e71bf2b7fdabfc9cca2c0e - - - - Fitness - best_fitness - classmo_first_impr_select.html - 287937f5c059b078ccec94e86e0a8238 - - - - - moFitComparator - classmo_fit_comparator.html - EOT - moComparator - - bool - operator() - classmo_fit_comparator.html - c920d5a49deb16710daf1e5fcde6b16c - (const EOT &_solution1, const EOT &_solution2) - - - - moFitSolContinue - classmo_fit_sol_continue.html - EOT - moSolContinue - - EOT::Fitness - Fitness - classmo_fit_sol_continue.html - 369ed94a788d8bdc08d5554f7669376f - - - - - moFitSolContinue - classmo_fit_sol_continue.html - 5f0dc5e529e8cd307ff4a1ae982d5b84 - (Fitness _fitness) - - - bool - operator() - classmo_fit_sol_continue.html - ce4e02895c13bfd131fc759adf83798f - (const EOT &_solution) - - - void - init - classmo_fit_sol_continue.html - 670bd895b4edfcd3aebb40d2295d7f7c - () - - - Fitness - fitness - classmo_fit_sol_continue.html - 87d0ba8f2f76f61c89317eed5f094dfc - - - - - moGenSolContinue - classmo_gen_sol_continue.html - EOT - moSolContinue - - - moGenSolContinue - classmo_gen_sol_continue.html - 8e2456421b641d38e3f800f3bbe45159 - (unsigned int _generationMaximumNumber) - - - bool - operator() - classmo_gen_sol_continue.html - 2fd5f2f10b6d6208412582578fad48ea - (const EOT &_solution) - - - void - init - classmo_gen_sol_continue.html - 6c5db8182157584b56507cc9075602d4 - () - - - unsigned int - generationMaximumNumber - classmo_gen_sol_continue.html - c838d923436b71c584891c1cbe3f47ba - - - - unsigned int - generationNumber - classmo_gen_sol_continue.html - af0b3e5ca3ceee0d843670955c8f1e58 - - - - - moHC - classmo_h_c.html - M - moAlgo< M::EOType > - - - moHC - classmo_h_c.html - 44a35bd30df6e79cff95a31b84889bd7 - (moMoveInit< M > &_move_initializer, moNextMove< M > &_next_move_generator, moMoveIncrEval< M > &_incremental_evaluation, moMoveSelect< M > &_move_selection, eoEvalFunc< EOT > &_full_evaluation) - - - - moHC - classmo_h_c.html - 5002f969ef0a4d959610158fc62f137a - (moMoveExpl< M > &_move_explorer, eoEvalFunc< EOT > &_full_evaluation) - - - bool - operator() - classmo_h_c.html - b739f9586b647e32bf31605066f984ad - (EOT &_solution) - - - M::EOType - EOT - classmo_h_c.html - d219296ede03c679646bce2fe8ff96cb - - - - EOT::Fitness - Fitness - classmo_h_c.html - 56487c97a7cf0c423cc879d1bbd45027 - - - - moMoveExpl< M > & - move_explorer - classmo_h_c.html - ec4e702a6ec240f40ff9d262c36d080b - - - - eoEvalFunc< EOT > & - full_evaluation - classmo_h_c.html - 1175c588c19d3658cfc690d5f3f8d825 - - - - - moHCMoveLoopExpl - classmo_h_c_move_loop_expl.html - M - moMoveLoopExpl - - - moHCMoveLoopExpl - classmo_h_c_move_loop_expl.html - fac2eb6695ba1b797ffab4f290d760b8 - (moMoveInit< M > &_move_initializer, moNextMove< M > &_next_move_generator, moMoveIncrEval< M > &_incremental_evaluation, moMoveSelect< M > &_move_selection) - - - void - operator() - classmo_h_c_move_loop_expl.html - fe9362c10d74a5e6ed09b56345396192 - (const EOT &_old_solution, EOT &_new_solution) - - - M::EOType - EOT - classmo_h_c_move_loop_expl.html - 077befd4106c201eafd3ea22bcea2fe9 - - - - M::EOType::Fitness - Fitness - classmo_h_c_move_loop_expl.html - f24871224316d5549b9013a2d27ab465 - - - - moMoveInit< M > & - move_initializer - classmo_h_c_move_loop_expl.html - 17506f3f1172714f9adbfa4e8a15953a - - - - moNextMove< M > & - next_move_generator - classmo_h_c_move_loop_expl.html - fdc44d40d8859bae1d7b92e77f36aa30 - - - - moMoveIncrEval< M > & - incremental_evaluation - classmo_h_c_move_loop_expl.html - a044b28f972d007a22736b646d86f265 - - - - moMoveSelect< M > & - move_selection - classmo_h_c_move_loop_expl.html - 5f0532e0ee8ef8ecaeeb4e56342be443 - - - - - moILS - classmo_i_l_s.html - M - moAlgo< M::EOType > - - - moILS - classmo_i_l_s.html - c83f81ba0836ae262305efa15eeb3da2 - (moAlgo< EOT > &_algorithm, moSolContinue< EOT > &_continue, moComparator< EOT > &_acceptance_criterion, eoMonOp< EOT > &_perturbation, eoEvalFunc< EOT > &_full_evaluation) - - - - moILS - classmo_i_l_s.html - 6d684a1d13ad224a911c8b0277812297 - (moMoveInit< M > &_move_initializer, moNextMove< M > &_next_move_generator, moMoveIncrEval< M > &_incremental_evaluation, moMoveSelect< M > &_move_selection, moSolContinue< EOT > &_continue, moComparator< EOT > &_acceptance_criterion, eoMonOp< EOT > &_perturbation, eoEvalFunc< EOT > &_full_evaluation) - - - - moILS - classmo_i_l_s.html - 740ac81a0d06eb471592ba0861d3a6d7 - (moMoveInit< M > &_move_initializer, moNextMove< M > &_next_move_generator, moMoveIncrEval< M > &_incremental_evaluation, moTabuList< M > &_tabu_list, moAspirCrit< M > &_aspiration_criterion, moSolContinue< EOT > &_moTS_continue, moSolContinue< EOT > &_continue, moComparator< EOT > &_acceptance_criterion, eoMonOp< EOT > &_perturbation, eoEvalFunc< EOT > &_full_evaluation) - - - - moILS - classmo_i_l_s.html - 36bab16abf36957dac36c467b86385bc - (moRandMove< M > &_random_move_generator, moMoveIncrEval< M > &_incremental_evaluation, moSolContinue< EOT > &_moSA_continue, double _initial_temperature, moCoolingSchedule &_cooling_schedule, moSolContinue< EOT > &_continue, moComparator< EOT > &_acceptance_criterion, eoMonOp< EOT > &_perturbation, eoEvalFunc< EOT > &_full_evaluation) - - - bool - operator() - classmo_i_l_s.html - 3f6b950e5a6c363f04b8d4c259502488 - (EOT &_solution) - - - M::EOType - EOT - classmo_i_l_s.html - c81bafc611e4d4fd44347cf7162198c7 - - - - EOT::Fitness - Fitness - classmo_i_l_s.html - 8c464a9eae064a78eff75d4c722b619c - - - - moAlgo< EOT > & - algorithm - classmo_i_l_s.html - 5651a4d94b59d523d341d5d6e24ca311 - - - - moSolContinue< EOT > & - continu - classmo_i_l_s.html - 30edab439401d7ec04fd8d37b4513d94 - - - - moComparator< EOT > & - acceptance_criterion - classmo_i_l_s.html - 295f6d0342c67bd3dc4cb82e2adc26be - - - - eoMonOp< EOT > & - perturbation - classmo_i_l_s.html - f667a1bda06b6d221292df9aba3db8a2 - - - - eoEvalFunc< EOT > & - full_evaluation - classmo_i_l_s.html - 8e8c383ac6ec34aaf071fa18bb54be67 - - - - - moImprBestFitAspirCrit - classmo_impr_best_fit_aspir_crit.html - M - moAspirCrit - - M::EOType::Fitness - Fitness - classmo_impr_best_fit_aspir_crit.html - 0bc1a8c9af99781e662570c04750cca8 - - - - - moImprBestFitAspirCrit - classmo_impr_best_fit_aspir_crit.html - e2c697a5cf3a7696e38bb52b6694a340 - () - - - void - init - classmo_impr_best_fit_aspir_crit.html - ffa451a14ff4ea86fb8bd9fdbc348630 - () - - - bool - operator() - classmo_impr_best_fit_aspir_crit.html - b6e5e96d57a6b846033fc22a9951b067 - (const M &_move, const Fitness &_fitness) - - - Fitness - best_fitness - classmo_impr_best_fit_aspir_crit.html - 03230e8672389de65aacd2bf7b6c1184 - - - - bool - first_time - classmo_impr_best_fit_aspir_crit.html - 2d5226c7dd661b33011402dbbbe78265 - - - - - moItRandNextMove - classmo_it_rand_next_move.html - M - moNextMove - - - moItRandNextMove - classmo_it_rand_next_move.html - c27b1fb0d64d4862dd886f7a59419b8c - (moRandMove< M > &_random_move_generator, unsigned int _iteration_maximum_number) - - - bool - operator() - classmo_it_rand_next_move.html - 21454db723a12fe6c8eb5caeccd32df6 - (M &_move, const EOT &_solution) - - - M::EOType - EOT - classmo_it_rand_next_move.html - ee666007fc494bf4a5f0cd065e5671cf - - - - moRandMove< M > & - random_move_generator - classmo_it_rand_next_move.html - 92601819402ad00d01933113d0bcf40d - - - - unsigned int - iteration_maximum_number - classmo_it_rand_next_move.html - 1b06067aee7a78f8a255563391514d2d - - - - unsigned int - iteration_number - classmo_it_rand_next_move.html - 2f8d52c88d6c002be518091cc52beca1 - - - - - moLinearCoolingSchedule - classmo_linear_cooling_schedule.html - moCoolingSchedule - - - moLinearCoolingSchedule - classmo_linear_cooling_schedule.html - 420939ebf57f01d242cbe4eb668dffde - (double _threshold, double _quantity) - - - bool - operator() - classmo_linear_cooling_schedule.html - b0a1886aaa7ee2a0c8e929e55ca321ce - (double &_current_temperature) - - - double - threshold - classmo_linear_cooling_schedule.html - e7f539f986801ea71392c4a55ba08a76 - - - - double - quantity - classmo_linear_cooling_schedule.html - 6159dc39ceda89b23ffdab3d6ce8d8ed - - - - - moLSCheckPoint - classmo_l_s_check_point.html - M - eoBF - - void - operator() - classmo_l_s_check_point.html - e9b9d41e40dd7bab648327686b2b938d - (const M &_move, const typename M::EOType &_solution) - - - void - add - classmo_l_s_check_point.html - f95f2dc556cdfbdc81688562ca95202d - (eoBF< const M &, const typename M::EOType &, void > &_function) - - - std::vector< eoBF< const M &, const typename M::EOType &, void > * > - functions - classmo_l_s_check_point.html - 56a7427a6aebac7955c22bab302c050a - - - - - moMove - classmo_move.html - EOT - eoUF< EOT &, void > - - EOT - EOType - classmo_move.html - 7fb853a91ba1319530529e515380bbba - - - - - moMoveExpl - classmo_move_expl.html - M - eoBF< const M::EOType &, M::EOType &, void > - - - moMoveIncrEval - classmo_move_incr_eval.html - M - eoBF - - - moMoveInit - classmo_move_init.html - M - eoBF - - - moMoveLoopExpl - classmo_move_loop_expl.html - M - moMoveExpl - - - moMoveSelect - classmo_move_select.html - M - eoBF< M &, M::EOType::Fitness &, void > - - M::EOType::Fitness - Fitness - classmo_move_select.html - 8148ccc0e6fbd209c3fe6829559895c8 - - - - virtual void - init - classmo_move_select.html - 58038bd859632c1bd022d23d9792bdca - (const Fitness &_fitness)=0 - - - virtual bool - update - classmo_move_select.html - 5b4d3b2f030cca80c563c3db0c4af404 - (const M &_move, const Fitness &_fitness)=0 - - - - moNextMove - classmo_next_move.html - M - eoBF - - - moNoAspirCrit - classmo_no_aspir_crit.html - M - moAspirCrit - - bool - operator() - classmo_no_aspir_crit.html - 289aac56f03c4651fcbcec4a91fb6fd6 - (const M &_move, const typename M::EOType::Fitness &_fitness) - - - void - init - classmo_no_aspir_crit.html - f3a286fc4c2d36bd390ba9a3074f3037 - () - - - - moNoFitImprSolContinue - classmo_no_fit_impr_sol_continue.html - EOT - moSolContinue - - EOT::Fitness - Fitness - classmo_no_fit_impr_sol_continue.html - 64c184de66bb37d75d53aa600ac947b3 - - - - - moNoFitImprSolContinue - classmo_no_fit_impr_sol_continue.html - 0793f68a0ad558c8203b97c33c8f9c90 - (unsigned int _maxNumberOfIterationWithoutImprovement) - - - bool - operator() - classmo_no_fit_impr_sol_continue.html - d8966c73cbe625644df9061377f7221a - (const EOT &_solution) - - - void - init - classmo_no_fit_impr_sol_continue.html - 21641c0a38a4501baae6133cbc591de4 - () - - - unsigned int - maxNumberOfIterationsWithoutImprovement - classmo_no_fit_impr_sol_continue.html - 03612ffc3af9d943c1b1d2cde09d461b - - - - bool - firstFitnessSaved - classmo_no_fit_impr_sol_continue.html - ca3591e47a075b59e0826f31234c71ef - - - - Fitness - fitness - classmo_no_fit_impr_sol_continue.html - 3d3d2b43a4dd73e38689cc0018d44ee7 - - - - unsigned int - counter - classmo_no_fit_impr_sol_continue.html - 46fc008a8f7cd06dcaaeb4016b433adb - - - - - moRandImprSelect - classmo_rand_impr_select.html - M - moMoveSelect - - M::EOType::Fitness - Fitness - classmo_rand_impr_select.html - 3bff2fdb963297430543c82ffb567a5c - - - - void - init - classmo_rand_impr_select.html - 7af99966b31aa387ecef74fd307a42e8 - (const Fitness &_fitness) - - - bool - update - classmo_rand_impr_select.html - b20cfd0164266aa75960cba3c1673f69 - (const M &_move, const Fitness &_fitness) - - - void - operator() - classmo_rand_impr_select.html - 1bc88f10830960c1d88e22e444c4e670 - (M &_move, Fitness &_fitness) - - - Fitness - initial_fitness - classmo_rand_impr_select.html - d566fa23689861b1d04257e53c71ae20 - - - - std::vector< Fitness > - better_fitnesses - classmo_rand_impr_select.html - 220d6e3db838b11938e59bc7b29a0db6 - - - - std::vector< M > - better_moves - classmo_rand_impr_select.html - 8a2e7bd7d7a74d7f7402ef25737b09e1 - - - - - moRandMove - classmo_rand_move.html - M - eoUF< M &, void > - - - moSA - classmo_s_a.html - M - moAlgo< M::EOType > - - - moSA - classmo_s_a.html - 12e7da3a56b82daa29a30d1254da5823 - (moRandMove< M > &_random_move_generator, moMoveIncrEval< M > &_incremental_evaluation, moSolContinue< EOT > &_continue, double _initial_temperature, moCoolingSchedule &_cooling_schedule, eoEvalFunc< EOT > &_full_evaluation) - - - bool - operator() - classmo_s_a.html - bea8176b0c05a96696b2ab29d3f3c544 - (EOT &_solution) - - - M::EOType - EOT - classmo_s_a.html - d5d64a8797bdedc7b3af7893aded0bd5 - - - - EOT::Fitness - Fitness - classmo_s_a.html - 97f1a40d5ab5a0b3f878d0347b34804b - - - - moRandMove< M > & - random_move_generator - classmo_s_a.html - 92656523f556669862fcffdccea178dd - - - - moMoveIncrEval< M > & - incremental_evaluation - classmo_s_a.html - fdb49f837dc602624554279418c94bdb - - - - moSolContinue< EOT > & - continu - classmo_s_a.html - 776586a839c2bbd6d12a731c12a1b748 - - - - double - initial_temperature - classmo_s_a.html - e07bf4ca64248e94ab85e8a1ba32aa8c - - - - moCoolingSchedule & - cooling_schedule - classmo_s_a.html - f514ae01cdfc67bf0b87d5389b3792e5 - - - - eoEvalFunc< EOT > & - full_evaluation - classmo_s_a.html - ace30095ffc4924d84e14a0e59f7746f - - - - - moSimpleMoveTabuList - classmo_simple_move_tabu_list.html - M - moTabuList - - M::EOType - EOT - classmo_simple_move_tabu_list.html - 91286ff3ba6b1e9e1db9e4fdade2edb7 - - - - std::list< M >::iterator - moveIterator - classmo_simple_move_tabu_list.html - 4ca9387c0a20bb9f4142682cbfee26bf - - - - - moSimpleMoveTabuList - classmo_simple_move_tabu_list.html - c27e7fabe1370ea65f56981c5cbc1769 - (unsigned int _memory_maximum_size) - - - bool - operator() - classmo_simple_move_tabu_list.html - 8d38f296f3d7721025820f16f25fcf7e - (const M &_move, const EOT &_solution) - - - void - add - classmo_simple_move_tabu_list.html - e6c0835fbfab2bdc63097cf2fd5328aa - (const M &_move, const EOT &_solution) - - - void - update - classmo_simple_move_tabu_list.html - 96cffc8118456ed762b07b9fc0e0679f - () - - - void - init - classmo_simple_move_tabu_list.html - b91ae9971be30769757d1ad92c6009dc - () - - - void - removeMove - classmo_simple_move_tabu_list.html - 922ac2e3c45cbb94698517265be95de5 - (const M &_move) - - - unsigned int - memory_maximum_size - classmo_simple_move_tabu_list.html - fea7fe7c62a6da9b8f087a2732f44251 - - - - unsigned int - memory_size - classmo_simple_move_tabu_list.html - defd20fe6d0d51fdaedbc5b95018aea7 - - - - std::list< M > - tabuList - classmo_simple_move_tabu_list.html - d91bc838361524720616b44eda9b2c3a - - - - - moSimpleSolutionTabuList - classmo_simple_solution_tabu_list.html - M - moTabuList - - M::EOType - EOT - classmo_simple_solution_tabu_list.html - 881060871a6b49e5e8554c5df85176d9 - - - - std::list< EOT >::iterator - solutionIterator - classmo_simple_solution_tabu_list.html - 3438db9ed9e1a94a24c418d8cbadec54 - - - - - moSimpleSolutionTabuList - classmo_simple_solution_tabu_list.html - 8499bf947de47519d155e9e45f815d41 - (unsigned int _memory_maximum_size) - - - bool - operator() - classmo_simple_solution_tabu_list.html - 9052858ae3e6765cbe4c344bdae6c692 - (const M &_move, const EOT &_solution) - - - void - add - classmo_simple_solution_tabu_list.html - 58ae13e7642c429ea51ff679a932aceb - (const M &_move, const EOT &_solution) - - - void - update - classmo_simple_solution_tabu_list.html - 91b8b01dba7ffea8b63765d931e56f56 - () - - - void - init - classmo_simple_solution_tabu_list.html - d5645c39fec71a6110a2cbccbb08b816 - () - - - void - removeSolution - classmo_simple_solution_tabu_list.html - e4a57001a201e1fb7446902381a7ac7d - (const EOT &_solution) - - - unsigned int - memory_maximum_size - classmo_simple_solution_tabu_list.html - 06631e7b9a2511e3c11540aa14b9e636 - - - - unsigned int - memory_size - classmo_simple_solution_tabu_list.html - 0d54e6b0af0e6088aafae596392c9490 - - - - std::list< EOT > - tabuList - classmo_simple_solution_tabu_list.html - 75df9cd683528d3722d02bac407b710b - - - - - moSolContinue - classmo_sol_continue.html - EOT - eoUF< const EOT &, bool > - - virtual void - init - classmo_sol_continue.html - 064dc966a210f4ffb9515be3f03ca4c7 - ()=0 - - - - moSteadyFitSolContinue - classmo_steady_fit_sol_continue.html - EOT - moSolContinue - - EOT::Fitness - Fitness - classmo_steady_fit_sol_continue.html - c289721abbbafe50f6e3b8305dd31007 - - - - - moSteadyFitSolContinue - classmo_steady_fit_sol_continue.html - c5e0e998b73e3a48ca3e87f4f816569b - (unsigned int _maxNumberOfIterations, unsigned int _maxNumberOfIterationWithoutImprovement) - - - bool - operator() - classmo_steady_fit_sol_continue.html - f7432bccb768d50a2fef248c2b174904 - (const EOT &_solution) - - - void - init - classmo_steady_fit_sol_continue.html - 87563493addc8e4b58982c55a67179b9 - () - - - unsigned int - maxNumberOfIterations - classmo_steady_fit_sol_continue.html - 36b43c2a252887ad027165ac32393fe8 - - - - unsigned int - maxNumberOfIterationsWithoutImprovement - classmo_steady_fit_sol_continue.html - cde593c09f497a5fa66ff62732544f40 - - - - bool - maxNumberOfIterationsReached - classmo_steady_fit_sol_continue.html - 7d88c0eb91b2a12121ba1c3ae9139887 - - - - bool - firstFitnessSaved - classmo_steady_fit_sol_continue.html - 025bf2789e470fdde989eee9121035c3 - - - - Fitness - fitness - classmo_steady_fit_sol_continue.html - a5c62e7049b36f6e71e92b559568c09e - - - - unsigned int - counter - classmo_steady_fit_sol_continue.html - 245c9099a2c40dfc4f34b3ff216d13ce - - - - - moTabuList - classmo_tabu_list.html - M - eoBF - - M::EOType - EOT - classmo_tabu_list.html - e219715cc3fdd5626764bc50ce6357df - - - - virtual void - add - classmo_tabu_list.html - 55204939b6d67b6d37b4af725d70cf6d - (const M &_move, const EOT &_solution)=0 - - - virtual void - update - classmo_tabu_list.html - a2e5d1132f064093c8ed57046405f5ca - ()=0 - - - virtual void - init - classmo_tabu_list.html - 0a06c459d56e8e2b408a8f3c6aec4e57 - ()=0 - - - - moTS - classmo_t_s.html - M - moAlgo< M::EOType > - - - moTS - classmo_t_s.html - 336408ddf8b7a29ffa8e01e9c18d8e10 - (moMoveInit< M > &_move_initializer, moNextMove< M > &_next_move_generator, moMoveIncrEval< M > &_incremental_evaluation, moTabuList< M > &_tabu_list, moAspirCrit< M > &_aspiration_criterion, moSolContinue< EOT > &_continue, eoEvalFunc< EOT > &_full_evaluation) - - - - moTS - classmo_t_s.html - 7e435fac1b8d5a410b7374d114e005e2 - (moMoveExpl< M > &_move_explorer, moSolContinue< EOT > &_continue, eoEvalFunc< EOT > &_full_evaluation) - - - bool - operator() - classmo_t_s.html - 2a011779723e24a5132a37593775bf56 - (EOT &_solution) - - - M::EOType - EOT - classmo_t_s.html - 90d19d468c12ab5bd796948ce1ce79b1 - - - - EOT::Fitness - Fitness - classmo_t_s.html - aa0eefbb17111422e495d1255f876fca - - - - moMoveExpl< M > & - move_explorer - classmo_t_s.html - 9fd948a2c586f1991f5a1eee927af8a6 - - - - moSolContinue< EOT > & - continu - classmo_t_s.html - 962a37393faf5239e657388d375cd9b3 - - - - eoEvalFunc< EOT > & - full_evaluation - classmo_t_s.html - f44bb408007e2bff99f7a201842e8e48 - - - - - moTSMoveLoopExpl - classmo_t_s_move_loop_expl.html - M - moMoveLoopExpl - - - moTSMoveLoopExpl - classmo_t_s_move_loop_expl.html - be5cf0853777718c3bbcbef456b50bc7 - (moMoveInit< M > &_move_initializer, moNextMove< M > &_next_move_generator, moMoveIncrEval< M > &_incremental_evaluation, moTabuList< M > &_tabu_list, moAspirCrit< M > &_aspiration_criterion) - - - void - operator() - classmo_t_s_move_loop_expl.html - 853743f2e21def3ea129556f47fafa55 - (const EOT &_old_solution, EOT &_new_solution) - - - M::EOType - EOT - classmo_t_s_move_loop_expl.html - 47f42225e2ed096374b818bdb848a527 - - - - M::EOType::Fitness - Fitness - classmo_t_s_move_loop_expl.html - a1ba36c937b195ca2f7d1a24adaa7018 - - - - moMoveInit< M > & - move_initializer - classmo_t_s_move_loop_expl.html - cd680d22382b9941d2c34133a641d443 - - - - moNextMove< M > & - next_move_generator - classmo_t_s_move_loop_expl.html - a2bbb593af2beefb05a307277c22b3d5 - - - - moMoveIncrEval< M > & - incremental_evaluation - classmo_t_s_move_loop_expl.html - 491fa46e1cb7935cb515b27b85bf8765 - - - - moBestImprSelect< M > - move_selection - classmo_t_s_move_loop_expl.html - 1caa6939fbe65ec4255e9e6dc3ce333b - - - - moTabuList< M > & - tabu_list - classmo_t_s_move_loop_expl.html - 0e5988a940ba218e87c53b7e56d79790 - - - - moAspirCrit< M > & - aspiration_criterion - classmo_t_s_move_loop_expl.html - bdfc8efb22599c150b3c3d44cd416b09 - - - - diff --git a/trunk/paradiseo-old-mo/mo-conf.cmake b/trunk/paradiseo-old-mo/mo-conf.cmake deleted file mode 100755 index 2a7c9ecc4..000000000 --- a/trunk/paradiseo-old-mo/mo-conf.cmake +++ /dev/null @@ -1,6 +0,0 @@ -###################################################################################### -###################################################################################### -### In this file, you can specify many CMake variables used to build paradisEO-MO. -###################################################################################### -###################################################################################### - diff --git a/trunk/paradiseo-old-mo/src/CMakeLists.txt b/trunk/paradiseo-old-mo/src/CMakeLists.txt deleted file mode 100644 index d41d4587a..000000000 --- a/trunk/paradiseo-old-mo/src/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -############################################################### -# This is a dummy file -############################################################### diff --git a/trunk/paradiseo-old-mo/src/index.h b/trunk/paradiseo-old-mo/src/index.h deleted file mode 100644 index c18fd6b98..000000000 --- a/trunk/paradiseo-old-mo/src/index.h +++ /dev/null @@ -1,68 +0,0 @@ -/** @mainpage Welcome to PARADISEO-Moving Objects - - @section Introduction - - MO is an extension of the ANSI-C++ compliant evolutionary computation library EO. -
    - It contains classes for almost any kind of one solution based heuristics. - - @section authors AUTHORS - - - - - - - - -
    Sebastien CAHON
    - Jean-Charles BOISSON -
    - - @section LICENSE - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr - - - @section Paradiseo Home Page - - http://paradiseo.gforge.inria.fr - - @section Installation - - The installation procedure of the package is detailed in the - README file in the top-directory of the source-tree. - -*/ - - -// coding: iso-8859-1 -// mode: C++ -// c-file-style: "Stroustrup" -// fill-column: 80 -// End: diff --git a/trunk/paradiseo-old-mo/src/moAlgo.h b/trunk/paradiseo-old-mo/src/moAlgo.h deleted file mode 100755 index a5152bb7f..000000000 --- a/trunk/paradiseo-old-mo/src/moAlgo.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr - -*/ - -#ifndef _moAlgo_h -#define _moAlgo_h - -#include - -//! Description of an algorithm of the paradiseo-mo library -/*! - moHC, moTS and moSA are 3 examples of algorithm of the paradiseo-mo library. -*/ -template < class EOT > class moAlgo:public eoMonOp < EOT > -{}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moAspirCrit.h b/trunk/paradiseo-old-mo/src/moAspirCrit.h deleted file mode 100755 index efb6f74c2..000000000 --- a/trunk/paradiseo-old-mo/src/moAspirCrit.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moAspirCrit_h -#define _moAspirCrit_h - -#include - -//! Description of the conditions in which a tabu move could be accepted -/*! - It is only a description... An object that herits from this class is needed to be used in a moTS. - See moNoAspriCrit for example. -*/ -template < class M > -class moAspirCrit: public eoBF < const M &, const typename M::EOType::Fitness &, bool > -{ - public: - - //! Procedure which initialises all that needs an aspiration criterion. - /*! - It can be possible that this procedure does nothing... - */ - virtual void init () = 0; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moBestImprSelect.h b/trunk/paradiseo-old-mo/src/moBestImprSelect.h deleted file mode 100755 index c3aa6c2b5..000000000 --- a/trunk/paradiseo-old-mo/src/moBestImprSelect.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moBestImprSelect_h -#define _moBestImprSelect_h - -#include - -//! One of the possible moMoveSelect. -/*! - All neighbors are considered, and the movement - which enables the best improvement is selected. -*/ -template < class M > -class moBestImprSelect:public moMoveSelect < M > -{ - public: - - //! Alias for the fitness. - typedef typename M::EOType::Fitness Fitness; - - //! Procedure which initialise the exploration - /*! - \param _fitness The current fitness. - */ - void init (const Fitness & _fitness) - { - //Code only used to avoid warning because _fitness is not used in this procedure. - Fitness fitness; - fitness=(Fitness)_fitness; - - //std::cout.precision(10); - - //std::cout << "old fitness = " << _fitness << std::endl; - - first_time = true; - } - - - //!Function that indicates if the current move has not improved the fitness. - /*! - If the given fitness enables an improvment, - the move (moMove) and the fitness linked to this move are saved. - - \param _move a move. - \param _fitness a fitness linked to the move. - \return TRUE if the move does not improve the fitness. - */ - bool update (const M & _move, const Fitness & _fitness) - { - if ( first_time || (_fitness > best_fitness) ) - { - best_fitness = _fitness; - best_move = _move; - - first_time = false; - } - - //std::cout << "best fitness = " << best_fitness << std::endl; - - return true; - } - - //! Procedure which saved the best move and fitness. - /*! - \param _move the current move (result of the procedure). - \param _fitness the current fitness (result of the procedure). - */ - void operator () (M & _move, Fitness & _fitness) - { - if(first_time) - { - throw std::runtime_error("[moBestImprSelect.h]: no move or/and no fitness already saved, update has to be called first."); - } - - _move = best_move; - _fitness = best_fitness; - - - //std::cout << "Final fitness = " << best_fitness << std::endl; - } - - private: - - //! Allowing to know if at least one move has been generated. - bool first_time; - - //! The best move. - M best_move; - - //! The best fitness. - Fitness best_fitness; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moComparator.h b/trunk/paradiseo-old-mo/src/moComparator.h deleted file mode 100644 index 8c0f9ff60..000000000 --- a/trunk/paradiseo-old-mo/src/moComparator.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moComparator_h -#define _moComparator_h - - -//! Template for classes which need to compare two EOT and indicate if the first is "better" than the second. -/*! - The objects that extend this template describe how an EOT is "better" than an other. -*/ -template -class moComparator: public eoBF -{}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moCoolingSchedule.h b/trunk/paradiseo-old-mo/src/moCoolingSchedule.h deleted file mode 100644 index f2cd44164..000000000 --- a/trunk/paradiseo-old-mo/src/moCoolingSchedule.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moCoolingSchedule_h -#define _moCoolingSchedule_h - -#include - -//! This class gives the description of a cooling schedule. -/*! - It is only a description... An object that herits from this class is needed to be used in a moSA. - See moExponentialCoolingSchedule or moLinearCoolingSchedule for example. -*/ -class moCoolingSchedule : public eoUF < double &, bool > -{}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moExpl.h b/trunk/paradiseo-old-mo/src/moExpl.h deleted file mode 100644 index 803f0ead5..000000000 --- a/trunk/paradiseo-old-mo/src/moExpl.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Salma Mesmoudi (salma.mesmoudi@inria.fr), Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr - */ -#ifndef _moExpl_h -#define _moExpl_h - -#include - -//! Description of an explorer -/*! - This class allows to use any mutation object as a neighborhood. -*/ -template < class EOT > -class moExpl : public eoBF < const EOT &, EOT &, bool > -{ - public: - - //! Generic constructor - /*! - Generic constructor using a eoMonOp - - \param _explorer Algorithme or mutation. - - */ - moExpl(eoMonOp & _explorer): index(0) - { - explorers.clear(); - addExplorer(_explorer); - } - - //! Procedure which launches the moExpl. - /*! - The exploration starts from an old solution and provides a new solution. - - \param _old_solution The current solution. - \param _new_solution The new solution (result of the procedure). - */ - - bool operator ()(const EOT & _old_solution, EOT & _new_solution) - { - _new_solution=(EOT)_old_solution; - return (*explorers[index])(_new_solution); - } - - //! Add an algorithm or mutation to neighborhoods vector - void addExplorer(eoMonOp & _new_explorer) - { - explorers.push_back(&_new_explorer); - } - - //! Procedure which modified the current explorer to use. - /*! - \param _index Index of the explorer to use. - */ - void setCurrentExplorer(unsigned int _index) - { - if( _index >= explorers.size() ) - { - std::cout << "[" << _index << "]" << std::endl; - throw std::runtime_error("[moExpl.h]: bad index "+_index); - } - index=_index; - } - - //! Function which returns the number of explorers already saved. - /*! - \return The number of explorers contained in the moExpl. - */ - unsigned int getExplorerNumber() - { - return explorers.size(); - } - - private : - - unsigned int index; - - //!Neighborhoods vector - std::vector< eoMonOp* > explorers; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moFirstImprSelect.h b/trunk/paradiseo-old-mo/src/moFirstImprSelect.h deleted file mode 100755 index 94ca93c16..000000000 --- a/trunk/paradiseo-old-mo/src/moFirstImprSelect.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moFirstImprSelect_h -#define _moFirstImprSelect_h - -#include - -//! One possible moMoveSelect. -/*! - The neighborhood is explored until - a move enables an improvment of the - current solution. -*/ -template < class M > -class moFirstImprSelect:public moMoveSelect < M > -{ - public: - - //! Alias for the fitness. - typedef typename M::EOType::Fitness Fitness; - - //! Procedure which initialise the exploration. - /*! - It save the current fitness as the initial value for the fitness. - \param _fitness The current fitness. - */ - virtual void init (const Fitness & _fitness) - { - valid = false; - initial_fitness = _fitness; - } - - //!Function that indicates if the current move has not improved the fitness. - /*! - If the given fitness enables an improvment, - the move (moMove) should be applied to the current solution. - - \param _move a move. - \param _fitness a fitness linked to the move. - \return true if the move does not improve the fitness. - */ - bool update (const M & _move, const Fitness & _fitness) - { - - if (_fitness > initial_fitness) - { - - best_fitness = _fitness; - best_move = _move; - valid = true; - - return false; - } - - return true; - } - - //! Procedure which saved the best move and fitness. - /*! - \param _move the current move (result of the procedure). - \param _fitness the current fitness (result of the procedure). - */ - void operator () (M & _move, Fitness & _fitness) - { - if (valid) - { - _move = best_move; - _fitness = best_fitness; - } - } - - private: - - //! Allow to know if at least one move has improved the solution. - bool valid; - - //! Best stored movement. - M best_move; - - //! Initial fitness. - Fitness initial_fitness; - - //! Best stored fitness. - Fitness best_fitness; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moFitComparator.h b/trunk/paradiseo-old-mo/src/moFitComparator.h deleted file mode 100644 index 6dd75b5ce..000000000 --- a/trunk/paradiseo-old-mo/src/moFitComparator.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moFitComparator_h -#define _moFitComparator_h - -#include - -//! Comparison according to the fitness. -/*! - An EOT is better than an other if its fitness is better. -*/ -template -class moFitComparator: public moComparator -{ - public: - - //! Function which makes the comparison and gives the result. - /*! - \param _solution1 The first solution. - \param _solution2 The second solution. - \return true if the fitness of the first solution is better than the second solution, false else. - */ - bool operator()(const EOT & _solution1, const EOT & _solution2) - { - return _solution1.fitness() > _solution2.fitness(); - } -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moFitSolContinue.h b/trunk/paradiseo-old-mo/src/moFitSolContinue.h deleted file mode 100644 index af3d375fc..000000000 --- a/trunk/paradiseo-old-mo/src/moFitSolContinue.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moFitSolContinue_h -#define _moFitSolContinue_h - -#include - -//! One possible stop criterion for a solution-based heuristic. -/*! - The stop criterion corresponds to a fitness threshold gained. -*/ -template < class EOT > -class moFitSolContinue:public moSolContinue < EOT > -{ - public: - - //! Alias for the fitness. - typedef typename EOT::Fitness Fitness; - - //! Basic constructor. - /*! - \param _fitness The fitness to reach. - */ - moFitSolContinue (Fitness _fitness): fitness(_fitness) - {} - - //! Function that activates the stopping criterion. - /*! - Indicates if the fitness threshold has not yet been reached. - - \param _solution the current solution. - \return true or false according to the value of the fitness. - */ - bool operator () (const EOT & _solution) - { - if ( _solution.invalid() ) - { - throw std::runtime_error("[moFitSolContinue.h]: The current solution has not been evaluated."); - } - - return fitness > _solution.fitness(); - } - - //! Procedure which allows to initialise all the stuff needed. - /*! - It can be also used to reinitialize all the needed things. - */ - void init () - {} - - private: - - //! Fitness target. - Fitness fitness; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moGenSolContinue.h b/trunk/paradiseo-old-mo/src/moGenSolContinue.h deleted file mode 100755 index f838e5447..000000000 --- a/trunk/paradiseo-old-mo/src/moGenSolContinue.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moGenSolContinue_h -#define _moGenSolContinue_h - -#include "moSolContinue.h" - -//! One possible stop criterion for a solution-based heuristic. -/*! - The stop criterion corresponds to a maximum number of iteration. -*/ -template < class EOT > -class moGenSolContinue:public moSolContinue < EOT > -{ - public: - - //! Simple constructor. - /*! - \param _generationMaximumNumber The maximum number of generations. - */ - moGenSolContinue (unsigned int _generationMaximumNumber): generationMaximumNumber(_generationMaximumNumber), generationNumber(0) - {} - - //! Function that activates the stop criterion. - /*! - Increments the counter and returns TRUE if the - current number of iteration is lower than the given - maximum number of iterations. - - \param _solution The current solution. - \return true or false according to the current generation number. - */ - bool operator () (const EOT & _solution) - { - //code only used for avoiding warning because _sol is not used in this function. - const EOT solution(_solution); - - return (++generationNumber < generationMaximumNumber); - } - - //! Procedure which allows to initialise the generation counter. - /*! - It can also be used to reset the iteration counter. - */ - void init () - { - generationNumber = 0; - } - - private: - - //! Iteration maximum number. - unsigned int generationMaximumNumber; - - //! Iteration current number. - unsigned int generationNumber; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moGeometricCoolingSchedule.h b/trunk/paradiseo-old-mo/src/moGeometricCoolingSchedule.h deleted file mode 100644 index c0cc6fc5a..000000000 --- a/trunk/paradiseo-old-mo/src/moGeometricCoolingSchedule.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moGeometricCoolingSchedule_h -#define _moGeometricCoolingSchedule_h - -#include - -//! One of the possible moCoolingSchedule -/*! - An other very simple cooling schedule, the temperature decrease according to a ratio while - the temperature is greater than a given threshold. -*/ -class moGeometricCoolingSchedule: public moCoolingSchedule -{ - public: - - //! Simple constructor - /*! - \param _threshold the threshold. - \param _ratio the ratio used to descrease the temperature. - */ - moGeometricCoolingSchedule (double _threshold, double _ratio):threshold (_threshold), ratio (_ratio) - {} - - //! Function which proceeds to the cooling. - /*! - It decreases the temperature and indicates if it is greater than the threshold. - - \param _temperature the current temperature. - \return if the new temperature (current temperature * ratio) is greater than the threshold. - */ - bool operator() (double & _temperature) - { - return (_temperature *= ratio) > threshold; - } - - private: - - //! The temperature threhold. - double threshold; - - //! The decreasing factor of the temperature. - double ratio; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moHC.h b/trunk/paradiseo-old-mo/src/moHC.h deleted file mode 100755 index d96c8c280..000000000 --- a/trunk/paradiseo-old-mo/src/moHC.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef __moHC_h -#define __moHC_h - -#include - -#include -#include - -//! Hill Climbing (HC) -/*! - Class which describes the algorithm for a hill climbing. -*/ -template < class M > -class moHC:public moAlgo < typename M::EOType > -{ - //! Alias for the type. - typedef typename M::EOType EOT; - - //! Alias for the fitness. - typedef typename EOT::Fitness Fitness; - - public: - - //! Full constructor. - /*! - All the boxes are given in order the HC to use a moHCMoveLoopExpl. - - \param _move_initializer a move initialiser. - \param _next_move_generator a neighborhood explorer. - \param _incremental_evaluation a (generally) efficient evaluation function. - \param _move_selection a move selector. - \param _full_evaluation a full evaluation function. - */ - moHC (moMoveInit < M > & _move_initializer, moNextMove < M > & _next_move_generator, - moMoveIncrEval < M > & _incremental_evaluation, moMoveSelect < M > & _move_selection, eoEvalFunc < EOT > & _full_evaluation) : - move_explorer(new moHCMoveLoopExpl(_move_initializer, _next_move_generator, _incremental_evaluation, _move_selection)), - full_evaluation (_full_evaluation), move_explorer_memory_allocation(true) - {} - - //! Light constructor. - /*! - This constructor allow to use another moMoveExpl (generally not a moHCMoveLoopExpl). - - \param _move_explorer a complete explorer. - \param _full_evaluation a full evaluation function. - */ - moHC (moMoveExpl < M > & _move_explorer, eoEvalFunc < EOT > & _full_evaluation): - move_explorer (&_move_explorer), full_evaluation (_full_evaluation), move_explorer_memory_allocation(false) - {} - - //! Destructor - ~moHC() - { - if(move_explorer_memory_allocation) - { - delete(move_explorer); - } - } - - //! Function which launches the HC - /*! - The HC has to improve a current solution. - As the moSA and the mo TS, it can be used for HYBRIDATION in an evolutionnary algorithm. - - \param _solution a current solution to improve. - \return true. - */ - bool operator ()(EOT & _solution) - { - EOT new_solution; - - if ( _solution.invalid() ) - { - full_evaluation(_solution); - } - - new_solution=_solution; - - do - { - _solution=new_solution; - (*move_explorer) (_solution, new_solution); - } - while ( new_solution.fitness() > _solution.fitness() ); - - return true; - } - - private: - - //! Complete exploration of the neighborhood. - moMoveExpl < M > * move_explorer; - - //! A full evaluation function. - eoEvalFunc < EOT > & full_evaluation; - - //! Indicate if the memory has been allocated for the move_explorer. - bool move_explorer_memory_allocation; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moHCMoveLoopExpl.h b/trunk/paradiseo-old-mo/src/moHCMoveLoopExpl.h deleted file mode 100755 index 44f806ecb..000000000 --- a/trunk/paradiseo-old-mo/src/moHCMoveLoopExpl.h +++ /dev/null @@ -1,138 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef __moHCMoveLoopExpl_h -#define __moHCMoveLoopExpl_h - -#include -#include -#include -#include -#include - -//! Iterative explorer used by a moHC. -template < class M > -class moHCMoveLoopExpl:public moMoveLoopExpl < M > -{ - //! Alias for the type. - typedef typename M::EOType EOT; - - //! Alias for the fitness. - typedef typename M::EOType::Fitness Fitness; - - public: - - //! Constructor. - /*! - All the boxes have to be specified. - - \param _move_initializer The move initialiser. - \param _next_move_generator The neighbourhood explorer. - \param _incremental_evaluation (generally) Efficient evaluation function. - \param _move_selection The move selector. - */ - moHCMoveLoopExpl (moMoveInit < M > & _move_initializer, moNextMove < M > & _next_move_generator, - moMoveIncrEval < M > & _incremental_evaluation, moMoveSelect < M > & _move_selection) : - move_initializer (_move_initializer), next_move_generator (_next_move_generator), - incremental_evaluation (_incremental_evaluation), move_selection (_move_selection) - {} - - //! Procedure which launches the explorer. - /*! - The exploration starts from an old solution and provides a new solution. - - \param _old_solution The current solution. - \param _new_solution The new solution (result of the procedure). - */ - void operator () (const EOT & _old_solution, EOT & _new_solution) - { - M move, best_move; - Fitness best_fitness; - bool has_next_move, selection_update_is_ok; - - if( _old_solution.invalid() ) - { - throw std::runtime_error("[moHCMoveLoopExpl.h]: The current solution has not been evaluated."); - } - - /* - The two following lines are added to avoid compilation warning. - <=> current best move fitness is the current fitness. - <=> move and best move are empty for the moment. - */ - best_fitness=_old_solution.fitness(); - move=best_move; - - //At the begining, the new sol is equivalent to the old one. - _new_solution=(EOT)_old_solution; - - // Restarting the exploration of the neighbourhood - move_initializer(move, _old_solution); - - move_selection.init(_old_solution.fitness ()); - - do - { - selection_update_is_ok = move_selection.update (move, incremental_evaluation(move, _old_solution) ); - has_next_move = next_move_generator (move, _old_solution); - } - while ( selection_update_is_ok && has_next_move); - - //The selecter gives the value of the best move and the corresponding best fitness. - move_selection (best_move, best_fitness); - - //The best move is applied on the new solution. - best_move(_new_solution); - - //The fitness is set (avoid an additional fitness compuation). - _new_solution.fitness (best_fitness); - } - - private: - - //! Move initialiser. - moMoveInit < M > & move_initializer; - - //! Neighborhood explorer. - moNextMove < M > & next_move_generator; - - //! (generally) Efficient evaluation. - moMoveIncrEval < M > & incremental_evaluation; - - //! Move selector. - moMoveSelect < M > & move_selection; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moILS.h b/trunk/paradiseo-old-mo/src/moILS.h deleted file mode 100644 index 48eac8565..000000000 --- a/trunk/paradiseo-old-mo/src/moILS.h +++ /dev/null @@ -1,228 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moILS_h -#define _moILS_h - -#include - -#include -#include -#include - -//! Iterated Local Search (ILS) -/*! - Class which describes the algorithm for a iterated local search. -*/ -template < class M > -class moILS:public moAlgo < typename M::EOType > -{ - //! Alias for the type. - typedef typename M::EOType EOT; - - //! Alias for the fitness. - typedef typename EOT::Fitness Fitness; - - public: - - //! Generic constructor - /*! - Generic constructor using a moAlgo - - \param _algorithm The solution based heuristic to use. - \param _continue The stopping criterion. - \param _acceptance_criterion The acceptance criterion. - \param _perturbation The pertubation generator. - \param _full_evaluation The evaluation function. - */ - moILS (moAlgo & _algorithm, moSolContinue & _continue, moComparator & _acceptance_criterion, - eoMonOp & _perturbation, eoEvalFunc & _full_evaluation): - algorithm(& _algorithm), continu(_continue), acceptance_criterion(_acceptance_criterion), - perturbation(_perturbation), full_evaluation(_full_evaluation), algorithm_memory_allocation(false) - {} - - //! Constructor for using a moHC for the moAlgo - /*! - \param _move_initializer The move initialisation (for the moHC). - \param _next_move_generator The move generator (for the moHC). - \param _incremental_evaluation The partial evaluation function (for the moHC). - \param _move_selection The move selection strategy (for the moHC). - \param _continue The stopping criterion. - \param _acceptance_criterion The acceptance criterion. - \param _perturbation The pertubation generator. - \param _full_evaluation The evaluation function. - */ - moILS (moMoveInit < M > & _move_initializer, moNextMove < M > & _next_move_generator, - moMoveIncrEval < M > & _incremental_evaluation, moMoveSelect < M > & _move_selection, - moSolContinue & _continue, moComparator & _acceptance_criterion, - eoMonOp & _perturbation, eoEvalFunc & _full_evaluation): - algorithm(new moHC(_move_initializer, _next_move_generator, _incremental_evaluation, _move_selection, _full_evaluation) ), - continu(_continue), acceptance_criterion(_acceptance_criterion), perturbation(_perturbation), full_evaluation(_full_evaluation), - algorithm_memory_allocation(true) - {} - - //! Constructor for using a moTS for the moAlgo - /*! - \param _move_initializer The move initialisation (for the moTS). - \param _next_move_generator The move generator (for the moTS). - \param _incremental_evaluation The partial evaluation function (for the moTS). - \param _tabu_list The tabu list (for the moTS !!!!). - \param _aspiration_criterion The aspiration criterion (for the moTS). - \param _moTS_continue The stopping criterion (for the moTS). - \param _continue The stopping criterion. - \param _acceptance_criterion The acceptance criterion. - \param _perturbation The pertubation generator. - \param _full_evaluation The evaluation function. - */ - moILS (moMoveInit & _move_initializer, moNextMove & _next_move_generator, - moMoveIncrEval & _incremental_evaluation, moTabuList & _tabu_list, - moAspirCrit & _aspiration_criterion, moSolContinue & _moTS_continue, - moSolContinue & _continue, moComparator & _acceptance_criterion, eoMonOp & _perturbation, - eoEvalFunc & _full_evaluation): - algorithm(new moTS(_move_initializer, _next_move_generator, _incremental_evaluation, _tabu_list, _aspiration_criterion, - _moTS_continue, _full_evaluation) ), - continu(_continue), acceptance_criterion(_acceptance_criterion), perturbation(_perturbation), full_evaluation(_full_evaluation), - algorithm_memory_allocation(true) - {} - - //! Constructor for using a moSA for the moAlgo - /*! - \param _random_move_generator The random move generator (for the moSA). - \param _incremental_evaluation The partial evaluation function (for the moSA). - \param _moSA_continue The stopping criterion (for the moSA). - \param _initial_temperature The initial temperature (for the moSA). - \param _cooling_schedule The cooling schedule (for the moSA). - \param _continue The stopping criterion. - \param _acceptance_criterion The acceptance criterion. - \param _perturbation The pertubation generator. - \param _full_evaluation The evaluation function. - */ - moILS (moRandMove & _random_move_generator, moMoveIncrEval & _incremental_evaluation, moSolContinue & _moSA_continue, - double _initial_temperature, moCoolingSchedule & _cooling_schedule, moSolContinue & _continue, - moComparator & _acceptance_criterion, eoMonOp & _perturbation, eoEvalFunc & _full_evaluation): - algorithm(new moSA(_random_move_generator, _incremental_evaluation, _moSA_continue, _initial_temperature, - _cooling_schedule, _full_evaluation) ), - continu(_continue), acceptance_criterion(_acceptance_criterion), perturbation(_perturbation), full_evaluation(_full_evaluation), - algorithm_memory_allocation(true) - {} - - //! Destructor - ~moILS() - { - if(algorithm_memory_allocation) - { - delete(algorithm); - } - } - - //! Function which launches the ILS - /*! - The ILS has to improve a current solution. - As the moSA, the moTS and the moHC, it can be used for HYBRIDATION in an evolutionnary algorithm. - - \param _solution a current solution to improve. - \return true. - */ - bool operator()(EOT & _solution) - { - EOT _solution_saved; - - if ( _solution.invalid() ) - { - full_evaluation(_solution); - } - - _solution_saved=_solution; - - continu.init (); - - // some code has been duplicated in order to avoid one perturbation and one evaluation without adding a test in the loop. - // better than a do {} while; with a test in the loop. - - (*algorithm)(_solution); - - if ( acceptance_criterion(_solution, _solution_saved) ) - { - _solution_saved=_solution; - - } - else - { - _solution=_solution_saved; - } - - while ( continu (_solution) ) - { - perturbation(_solution); - //_solution.invalidate(); - full_evaluation(_solution); - - (*algorithm)(_solution); - - if ( acceptance_criterion(_solution, _solution_saved) ) - { - _solution_saved=_solution; - } - else - { - _solution=_solution_saved; - } - } - - return true; - } - - private: - - //! The solution based heuristic. - moAlgo * algorithm; - - //! The stopping criterion. - moSolContinue & continu; - - //! The acceptance criterion. - moComparator & acceptance_criterion; - - //! The perturbation generator - eoMonOp & perturbation; - - //! The full evaluation function - eoEvalFunc & full_evaluation; - - //! Indicate if the memory has been allocated for the algorithm. - bool algorithm_memory_allocation; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moImprBestFitAspirCrit.h b/trunk/paradiseo-old-mo/src/moImprBestFitAspirCrit.h deleted file mode 100755 index af798a387..000000000 --- a/trunk/paradiseo-old-mo/src/moImprBestFitAspirCrit.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moImprBestFitAspirCrit_h -#define _moImprBestFitAspirCrit_h - -#include - -//! One of the possible moAspirCrit -/*! - This criterion is satisfied when a given fitness - is the best ever considered. -*/ -template < class M > -class moImprBestFitAspirCrit:public moAspirCrit < M > -{ - - public: - - //! Alias for the fitness - typedef typename M::EOType::Fitness Fitness; - - //! Contructor - moImprBestFitAspirCrit (): first_time(true) - {} - - //! Initialisation procedure - void init () - { - first_time = true; - } - - //! Function that indicates if the current fitness is better that the already saved fitness - /*! - The first time, the function only saved the current move and fitness. - - \param _move A move. - \param _fitness A fitness linked to the move. - \return true The first time and if _fitness > best_fitness, else false. - */ - bool operator () (const M & _move, const Fitness & _fitness) - { - //code only used for avoiding warning because _move is not used in this function. - const M move(_move); - - if (first_time) - { - best_fitness = _fitness; - first_time = false; - - return true; - } - - if (_fitness > best_fitness) - { - best_fitness = _fitness; - return true; - } - return false; - } - - private: - - //! Best fitness found until now - Fitness best_fitness; - - //! Indicates that a fitness has been already saved or not - bool first_time; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moIncrEvalWrapper.h b/trunk/paradiseo-old-mo/src/moIncrEvalWrapper.h deleted file mode 100644 index 5d4b2b86b..000000000 --- a/trunk/paradiseo-old-mo/src/moIncrEvalWrapper.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef moIncrEvalWrapper_H -#define moIncrEvalWrapper_H - -#include -#include - -/* - * (Old fashioned) Incremental evaluation to use with a moMoveNeighbor - * WARNING: Don't use this class unless you are an moMove user. - */ -template -class moIncrEvalWrapper : public moEval -{ -public: - using moEval::EOT EOT; - using moEval::Fitness Fitness; - - moIncrEvalWrapper(moIncrEval& _incr):incr(_incr) {} - - /* - * make the evaluation of the current neighbor and update the information on this neighbor - * the evaluation could be incremental - */ - virtual void eval(MoveNeighbor& _neighbor,EOT & _solution) { - _neighbor.fitness(incrEval(*(_neighbor.getMove()), _solution)); - } - -private: - /** the full evaluation object */ - moIncrEval & incrEval; - -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moItRandNextMove.h b/trunk/paradiseo-old-mo/src/moItRandNextMove.h deleted file mode 100755 index 0bb3ef155..000000000 --- a/trunk/paradiseo-old-mo/src/moItRandNextMove.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moItRandNextMove_h -#define _moItRandNextMove_h - -#include -#include - -//! One of the possible moNextMove. -/*! - This class is a move (moMove) generator with a bound for the maximum number of iterations. -*/ -template < class M > -class moItRandNextMove:public moNextMove < M > -{ - //! Alias for the type. - typedef typename M::EOType EOT; - - public: - - //! The constructor. - /*! - Parameters only for initialising the attributes. - - \param _random_move_generator The random move generator. - \param _iteration_maximum_number The iteration maximum number. - */ - moItRandNextMove (moRandMove < M > & _random_move_generator, unsigned int _iteration_maximum_number): - random_move_generator(_random_move_generator), iteration_maximum_number(_iteration_maximum_number), iteration_number(0) - {} - - //! Generation of a new move - /*! - If the maximum number is not already reached, the current move is forgotten and remplaced by another one. - - \param _move the current move. - \param _solution the current solution. - \return false if the maximum number of iteration is reached, else true. - */ - bool operator () (M & _move, const EOT & _solution) - { - //code only used to avoid warning because _solution is not used in this function. - const EOT solution(_solution); - - if (iteration_number > iteration_maximum_number) - { - iteration_number = 0; - return false; - } - - random_move_generator (_move); - iteration_number++; - - return true; - } - - private: - - //! A move generator (generally randomly). - moRandMove < M > & random_move_generator; - - //! Iteration maximum number. - unsigned int iteration_maximum_number; - - //! Iteration current number. - unsigned int iteration_number; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moLSCheckPoint.h b/trunk/paradiseo-old-mo/src/moLSCheckPoint.h deleted file mode 100755 index 1b5c64943..000000000 --- a/trunk/paradiseo-old-mo/src/moLSCheckPoint.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moLSCheckPoint_h -#define _moLSCheckPoint_h - -#include - -//! Class which allows a checkpointing system. -/*! - Thanks to this class, at each iteration, additionnal function can be used (and not only one). -*/ -template < class M > -class moLSCheckPoint:public eoBF < const M &, const typename M::EOType &, void > -{ - public: - - //! Function which launches the checkpointing - /*! - Each saved function is used on the current move and the current solution. - - \param _move a move. - \param _solution a solution. - */ - void operator () (const M & _move, const typename M::EOType & _solution) - { - unsigned int i; - - for (i = 0; i < functions.size (); i++) - { - functions[i]->operator ()(_move, _solution); - } - } - - //! Procedure which add a new function to the function vector - /*! - The new function is added at the end of the vector. - \param _function a new function to add. - */ - void add (eoBF < const M &, const typename M::EOType &, void >& _function) - { - functions.push_back(& _function); - } - - private: - - //! Vector of functions. - std::vector < eoBF < const M &, const typename M::EOType &, void >*> functions; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moLinearCoolingSchedule.h b/trunk/paradiseo-old-mo/src/moLinearCoolingSchedule.h deleted file mode 100644 index 205593ce4..000000000 --- a/trunk/paradiseo-old-mo/src/moLinearCoolingSchedule.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moLinearCoolingSchedule_h -#define _moLinearCoolingSchedule_h - -#include - -//! One of the possible moCoolingSchedule -/*! - An another very simple cooling schedule, the temperature decrease according to a quantity while - the temperature is greater than a threshold. -*/ -class moLinearCoolingSchedule: public moCoolingSchedule -{ - - public: - //! Simple constructor - /*! - \param _threshold the threshold. - \param _quantity the quantity used to descrease the temperature. - */ - moLinearCoolingSchedule (double _threshold, double _quantity):threshold (_threshold), quantity (_quantity) - {} - - //! Function which proceeds to the cooling. - /*! - It decreases the temperature and indicates if it is greater than the threshold. - - \param _current_temperature The current temperature. - \return true if the new temperature (current temperature - quantity) is greater than the threshold, false otherwise. - */ - bool operator() (double & _current_temperature) - { - return (_current_temperature -= quantity) > threshold; - } - - private: - - //! The temperature threhold. - double threshold; - - //! The quantity that allows the temperature to decrease. - double quantity; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moMove.h b/trunk/paradiseo-old-mo/src/moMove.h deleted file mode 100755 index d24832db3..000000000 --- a/trunk/paradiseo-old-mo/src/moMove.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr - -*/ - -#ifndef _moMove_h -#define _moMove_h - -#include - -//! Definition of a move. - -/*! - A move transforms a solution to another close solution. - It describes how a solution can be modified to another one. -*/ -template < class EOT > -class moMove:public eoUF < EOT &, void > -{ - public: - - //! Alias for the type - typedef EOT EOType; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moMoveExpl.h b/trunk/paradiseo-old-mo/src/moMoveExpl.h deleted file mode 100755 index 3fb266f7a..000000000 --- a/trunk/paradiseo-old-mo/src/moMoveExpl.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moMoveExpl_h -#define _moMoveExpl_h - -#include - -//! Description of a move (moMove) explorer -/*! - Only a description...See moMoveLoopExpl. -*/ -template < class M > -class moMoveExpl : public eoBF < const typename M::EOType &, typename M::EOType &, void > -{}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moMoveIncrEval.h b/trunk/paradiseo-old-mo/src/moMoveIncrEval.h deleted file mode 100755 index af1032dcd..000000000 --- a/trunk/paradiseo-old-mo/src/moMoveIncrEval.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moMoveIncrEval_h -#define _moMoveIncrEval_h - -#include - -//! (generally) Efficient evaluation function based a move and a solution. - -/*! - From a move and a solution, it computes - a new fitness that could be associated to - the solution if this one is updated. -*/ -template < class M, class Objective = typename M::EOType::Fitness> -class moMoveIncrEval:public eoBF < const M &, const typename M::EOType &, Objective > -{}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moMoveInit.h b/trunk/paradiseo-old-mo/src/moMoveInit.h deleted file mode 100755 index bd521d90a..000000000 --- a/trunk/paradiseo-old-mo/src/moMoveInit.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moMoveInit_h -#define _moMoveInit_h - -#include - -//! Move (moMove) initializer -/*! - Class which allows to initiase a move. - Only a description... An object that herits from this class needs to be designed to be used. -*/ -template < class M > -class moMoveInit:public eoBF < M &, const typename M::EOType &, void > -{}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moMoveLoopExpl.h b/trunk/paradiseo-old-mo/src/moMoveLoopExpl.h deleted file mode 100755 index 9068f1c81..000000000 --- a/trunk/paradiseo-old-mo/src/moMoveLoopExpl.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr - -*/ - -#ifndef _moMoveLoopExpl_h -#define _moMoveLoopExpl_h - -#include - -//! Class which describes an iterative explorer -/*! - Only a description... moHCMoveLoopExpl and moTSMoveLoopExpl are exemples of class that are a moMoveLoopExpl. -*/ -template < class M > -class moMoveLoopExpl:public moMoveExpl < M > -{}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moMoveNeighbor.h b/trunk/paradiseo-old-mo/src/moMoveNeighbor.h deleted file mode 100644 index 7550be693..000000000 --- a/trunk/paradiseo-old-mo/src/moMoveNeighbor.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef _moMoveNeighbor_h -#define _moMoveNeighbor_h - -#include - -#include -#include -#include - - -/* - contener of the neighbor informations -*/ -template< class M , class Fitness > -class moMoveNeighbor : public moNeighbor -{ -public: - - typedef typename M::EOType EOT; - - // empty constructor - moMoveNeighbor() { - move=new M(); - }; - - ~moMoveNeighbor() { - delete move; - }; - - // copy constructeur - moMoveNeighbor(const moMoveNeighbor & _n) { - moNeighbor::operator=(_n); - (*move) = *(_n.getMove()); - } - - // assignment operator - virtual moMoveNeighbor & operator=(const moMoveNeighbor & _n) { - moNeighbor ::operator=(_n); - (*move) = *(_n.getMove()); - return *this ; - } - - /* - * move the solution - */ - virtual void move(EOT & _solution) { - (*move)(_solution); - } - - /** Return the class id. - * @return the class name as a std::string - */ - virtual std::string className() const { - return "moMoveNeighbor"; - } - - void setMove(M* _move) { - move=_move; - } - - M* getMove() { - return move; - } - - -private: - M* move; - -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moMoveNeighborhood.h b/trunk/paradiseo-old-mo/src/moMoveNeighborhood.h deleted file mode 100644 index aede5fc44..000000000 --- a/trunk/paradiseo-old-mo/src/moMoveNeighborhood.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef _moMoveNeighborhood_h -#define _moMoveNeighborhood_h - -#include -#include - -#include -#include - -template< class M, class Fitness > -class moMoveNeighborhood : public moNeighborhood > -{ -public: - - typedef moMoveNeighbor Neighbor; - typedef typename M::EOType EOT; - - moMoveNeighborhood(moMoveInit& i, moNextMove& n):_init(i), _next(n), isContinue(true) {} - - virtual bool hasNeighbor(EOT & solution) { - return true; - } - - /* - initialisation of the neighborhood - */ - virtual void init(EOT & solution, Neighbor & current) { - _init(*(current._move), solution); - isContinue=true; - } - - /* - Give the next neighbor - */ - virtual void next(EOT & solution, Neighbor & current) { - isContinue=_next(*(current._move), solution); - } - - /* - if false, there is no neighbor left to explore - */ - virtual bool cont(EOT & solution) { - return isContinue; - } - - /** Return the class id. - * @return the class name as a std::string - */ - virtual std::string className() const { - return "moMoveNeighborhood"; - } - -private: - moMoveInit& _init; - moNextMove& _next; - bool isContinue; - -}; - - -#endif diff --git a/trunk/paradiseo-old-mo/src/moMoveSelect.h b/trunk/paradiseo-old-mo/src/moMoveSelect.h deleted file mode 100755 index 0b7b863a5..000000000 --- a/trunk/paradiseo-old-mo/src/moMoveSelect.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr - -*/ - -#ifndef _moMoveSelect_h -#define _moMoveSelect_h - -#include -#include - -//! Class that describes a move selector (moMove). -/*! - It iteratively considers some moves (moMove) and their - associated fitnesses. The best move is so regularly updated. - At any time, it could be accessed. -*/ -template < class M > -class moMoveSelect:public eoBF < M &, typename M::EOType::Fitness &, void > -{ - public: - //! Alias for the fitness - typedef typename M::EOType::Fitness Fitness; - - //! Procedure which initialises all that the move selector needs including the initial fitness. - /*! - In order to know the fitness of the solution, - for which the neighborhood will - be soon explored - - \param _fitness the current fitness. - */ - virtual void init (const Fitness & _fitness) = 0; - - //! Function which updates the best solutions. - /*! - \param _move a new move. - \param _fitness a fitness linked to the new move. - \return a boolean that expresses the need to resume the exploration. - */ - virtual bool update (const M & _move, const Fitness & _fitness) = 0; - -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moNextMove.h b/trunk/paradiseo-old-mo/src/moNextMove.h deleted file mode 100755 index 5a067039c..000000000 --- a/trunk/paradiseo-old-mo/src/moNextMove.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moNextMove_h -#define _moNextMove_h - -#include - -//! Class which allows to generate a new move (moMove). -/*! - Useful for the explorer (for moTS or moHC). - Does nothing... An object that herits from this class needs to be designed for being used. -*/ -template < class M > -class moNextMove:public eoBF < M &, const typename M::EOType &, bool > -{}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moNoAspirCrit.h b/trunk/paradiseo-old-mo/src/moNoAspirCrit.h deleted file mode 100755 index cbff69ec7..000000000 --- a/trunk/paradiseo-old-mo/src/moNoAspirCrit.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr - -*/ - -#ifndef _moNoAspirCrit_h -#define _moNoAspirCrit_h - -#include - -//! One of the possible aspiration criterion (moAspirCrit) -/*! - The simplest : never satisfied. -*/ -template < class M > -class moNoAspirCrit:public moAspirCrit < M > -{ - public: - - //! Function which describes the aspiration criterion behaviour - /*! - Does nothing. - - \param _move a move. - \param _fitness a fitness. - \return false. - */ - bool operator () (const M & _move, const typename M::EOType::Fitness & _fitness) - { - //Code only used to avoid warning because _move and _fitness are not used in this procedure. - const M move(_move); - typename M::EOType::Fitness fitness; - fitness=(typename M::EOType::Fitness)_fitness; - - return false; - } - - //! Procedure which initialises all that needs a moNoAspirCrit. - /*! - Nothing... - */ - void init () - {} -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moNoFitImprSolContinue.h b/trunk/paradiseo-old-mo/src/moNoFitImprSolContinue.h deleted file mode 100644 index 1ff44a788..000000000 --- a/trunk/paradiseo-old-mo/src/moNoFitImprSolContinue.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moNoFitImprSolContinue_h -#define _moNoFitImprSolContinue_h - -#include - -//! One possible stop criterion for a solution-based heuristic. -/*! - The stop criterion corresponds to a maximum number of iterations without improvement. -*/ -template < class EOT > -class moNoFitImprSolContinue:public moSolContinue < EOT > -{ - public: - - //! Alias for the fitness. - typedef typename EOT::Fitness Fitness; - - //! Basic constructor. - /*! - \param _maxNumberOfIterationWithoutImprovement The number of iterations without fitness improvement to reach for stop. - */ - moNoFitImprSolContinue (unsigned int _maxNumberOfIterationWithoutImprovement) - : maxNumberOfIterationsWithoutImprovement(_maxNumberOfIterationWithoutImprovement), firstFitnessSaved(true), counter(0) - {} - - //! Function that activates the stopping criterion. - /*! - Indicates if the fitness has not been improved since a given number of iterations (after a minimum of iterations). - \param _solution the current solution. - \return true or false. - */ - bool operator () (const EOT & _solution) - { - if (_solution.invalid()) - { - throw std::runtime_error("[moNoFitImprSolContinue.h]: The current solution has not been evaluated."); - } - - if (firstFitnessSaved) - { - fitness=_solution.fitness(); - counter=0; - firstFitnessSaved=false; - return true; - } - - counter++; - - if ( _solution.fitness() > fitness) - { - fitness=_solution.fitness(); - counter=0; - } - - if (counter==maxNumberOfIterationsWithoutImprovement) - { - std::cout << "[moNoFitImrpSolContinue.h]: Done [" << counter << "] iterations without improvement." << std::endl; - } - - return counter!=maxNumberOfIterationsWithoutImprovement; - } - - //! Procedure which allows to initialise all the stuff needed. - /*! - It can be also used to reinitialize all the needed things. - */ - void init () - { - firstFitnessSaved=true; - counter=0; - } - - private: - - //! Maximum number of iterations without improvement allowed. - unsigned int maxNumberOfIterationsWithoutImprovement; - - //! Flag that this is the first time that the fitness is used. - bool firstFitnessSaved; - - //! Current Fitness. - Fitness fitness; - - //! The iteration couter. - unsigned int counter; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moRandImprSelect.h b/trunk/paradiseo-old-mo/src/moRandImprSelect.h deleted file mode 100755 index 447b7b455..000000000 --- a/trunk/paradiseo-old-mo/src/moRandImprSelect.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moRandImprSelect_h -#define _moRandImprSelect_h - -#include -#include -#include - -//! One of the possible moMove selector (moMoveSelect) -/*! - All the neighbors are considered. - One of them that enables an improvment of the objective function is choosen. -*/ -template < class M > -class moRandImprSelect: public moMoveSelect < M > -{ - public: - - //! Alias for the fitness - typedef typename M::EOType::Fitness Fitness; - - //!Procedure which all that needs a moRandImprSelect - /*! - Give a value to the initialise fitness. - Clean the move and fitness vectors. - - \param _fitness the current best fitness - */ - void init (const Fitness & _fitness) - { - initial_fitness = _fitness; - better_fitnesses.clear(); - better_moves.clear(); - firstTime=true; - } - - //! Function that updates the fitness and move vectors - /*! - if a move give a better fitness than the initial fitness, - it is saved and the fitness too. - - \param _move a new move. - \param _fitness a new fitness associated to the new move. - \return true. - */ - bool update (const M & _move, const Fitness & _fitness) - { - firstTime=false; - - if (_fitness > initial_fitness) - { - better_fitnesses.push_back(_fitness); - better_moves.push_back(_move); - } - - return true; - } - - //! The move selection - /*! - One the saved move is randomly chosen. - - \param _move the reference of the move that can be initialised by the function. - \param _fitness the reference of the fitness that can be initialised by the function. - */ - void operator () (M & _move, Fitness & _fitness) - { - unsigned int index; - - index=0; - - if( (better_fitnesses.size()==0) || (better_moves.size()==0) ) - { - if(firstTime) - { - throw std::runtime_error("[moRandImprSelect.h]: no move or/and no fitness already saved, update has to be called first."); - } - return; - } - - index = rng.random (better_fitnesses.size ()); - - _move = better_moves[index]; - _fitness = better_fitnesses[index]; - } - - private: - - //! Fitness of the current solution. - Fitness initial_fitness; - - //! Candidate fitnesse vector. - std::vector < Fitness > better_fitnesses; - - //! Candidate move vector. - std::vector < M > better_moves; - - //! Indicate if update has been called or not. - bool firstTime; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moRandMove.h b/trunk/paradiseo-old-mo/src/moRandMove.h deleted file mode 100755 index 0ed46072a..000000000 --- a/trunk/paradiseo-old-mo/src/moRandMove.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moRandMove_h -#define _moRandMove_h - -#include - -//! Random move generator -/*! - Only a description... An object that herits from this class needs to be designed in order to use a moSA. -*/ -template < class M > -class moRandMove:public eoUF < M &, void > -{}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moSA.h b/trunk/paradiseo-old-mo/src/moSA.h deleted file mode 100755 index 8506f799e..000000000 --- a/trunk/paradiseo-old-mo/src/moSA.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moSA_h -#define _moSA_h - -#include -#include -#include -#include -#include -#include - -//! Simulated Annealing (SA) -/*! - Class that describes a Simulated Annealing algorithm. -*/ -template < class M > -class moSA:public moAlgo < typename M::EOType > -{ - //! Alias for the type - typedef typename M::EOType EOT; - - //! Alias for the fitness - typedef typename EOT::Fitness Fitness; - - public: - - //! SA constructor - /*! - All the boxes used by a SA need to be given. - - \param _random_move_generator The move generator (generally randomly). - \param _incremental_evaluation The (generally) efficient evaluation function - \param _continue The stopping criterion. - \param _initial_temperature The initial temperature. - \param _cooling_schedule The cooling schedule, describes how the temperature is modified. - \param _full_evaluation The full evaluation function. - */ - moSA (moRandMove < M > & _random_move_generator, moMoveIncrEval < M > & _incremental_evaluation, - moSolContinue < EOT > & _continue, double _initial_temperature, moCoolingSchedule & _cooling_schedule, - eoEvalFunc < EOT > & _full_evaluation): - random_move_generator(_random_move_generator), incremental_evaluation(_incremental_evaluation), - continu(_continue), initial_temperature(_initial_temperature), - cooling_schedule(_cooling_schedule), full_evaluation(_full_evaluation) - {} - - //! function that launches the SA algorithm. - /*! - As a moTS or a moHC, the SA can be used for HYBRIDATION in an evolutionary algorithm. - - \param _solution A solution to improve. - \return TRUE. - */ - bool operator ()(EOT & _solution) - { - Fitness incremental_fitness, delta_fit; - EOT best_solution; - double temperature; - M move; - - if (_solution.invalid()) - { - full_evaluation (_solution); - } - - temperature = initial_temperature; - - best_solution = _solution; - - do - { - continu.init (); - - do - { - random_move_generator(move); - - incremental_fitness = incremental_evaluation (move, _solution); - - delta_fit = incremental_fitness - _solution.fitness (); - - if( (_solution.fitness() > incremental_fitness ) && (exp (delta_fit / temperature) > 1.0) ) - { - delta_fit = -delta_fit; - } - - if ( (incremental_fitness > _solution.fitness()) || (rng.uniform () < exp (delta_fit / temperature)) ) - { - move(_solution); - _solution.fitness(incremental_fitness); - - // Updating the best solution found until now ? - if ( _solution.fitness() > best_solution.fitness() ) - { - best_solution = _solution; - } - } - - } - while ( continu (_solution) ); - } - while ( cooling_schedule (temperature) ); - - _solution = best_solution; - - return true; - } - - private: - - //! A move generator (generally randomly) - moRandMove < M > & random_move_generator; - - //! A (generally) efficient evaluation function. - moMoveIncrEval < M > & incremental_evaluation; - - //! Stopping criterion before temperature update - moSolContinue < EOT > & continu; - - //! Initial temperature - double initial_temperature; - - //! The cooling schedule - moCoolingSchedule & cooling_schedule; - - //! A full evaluation function. - eoEvalFunc < EOT > & full_evaluation; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moSimpleMoveTabuList.h b/trunk/paradiseo-old-mo/src/moSimpleMoveTabuList.h deleted file mode 100755 index e7f51c032..000000000 --- a/trunk/paradiseo-old-mo/src/moSimpleMoveTabuList.h +++ /dev/null @@ -1,154 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moSimpleMoveTabuList_h -#define _moSimpleMoveTabuList_h - -#include -#include - -#include - -//! Class describing a move tabu list with a limited memory. -template -class moSimpleMoveTabuList: public moTabuList < M > -{ - public: - - //! Alias for the type - typedef typename M::EOType EOT; - - //! Alias for an iterator of a move list. - typedef typename std::list::iterator moveIterator; - - //! Constructor - /* - \param _size The maximum size of the move tabu list. - */ - moSimpleMoveTabuList(unsigned int _memory_maximum_size): memory_maximum_size(_memory_maximum_size), memory_size(0) - {} - - //! Function that indicates if, in a given state, the _move is tabu or not. - /*! - \param _move A given moMove. - \param _solution A solution. - \return true or false. - */ - bool operator () (const M & _move, const EOT & _solution) - { - moveIterator it; - //code only used to avoid warning because _solution is not used in this function. - EOT solution=(EOT)_solution; - - it=tabuList.begin(); - // The code is !(*it)==_move instead of (*it)!=_move because people designing their specific move representation - // will write the "==" operator (I hope) but not necessary the "!=" operator. - while ( it!=tabuList.end() && !((*it)==_move) ) - { - it++; - } - - return it!=tabuList.end(); - } - - void add(const M & _move, const EOT & _solution) - { - //code only used to avoid warning because _solution is not used in this function. - const EOT solution(_solution); - - if (memory_size!=0) - { - // Useful in the case of a move has been kept thanks to the moAspirCrit. - // In this case, the move can already be in the tabuList. - removeMove(_move); - } - - tabuList.push_back(_move); - - if (memory_size == memory_maximum_size) - { - tabuList.erase(tabuList.begin()); - } - else - { - memory_size++; - } - } - - void update () - { - //nothing to do - } - - void init () - { - //nothing to do - } - - private: - - //! Procedure that removes a given move from the tabu list (if it is into, else do nothing). - /*! - \param _move A given moMove. - */ - void removeMove(const M & _move) - { - moveIterator it; - - it=tabuList.begin(); - // The code is !(*it)==_move instead of (*it)!=_move because people designing their specific move representation - // will write the "==" operator (I hope) but not necessary the "!=" operator. - while ( it!=tabuList.end() && (!((*it)==_move) )) - { - it++; - } - - if (it!=tabuList.end()) - { - tabuList.erase(it); - } - } - - //! The maximum size of the tabu list. - unsigned int memory_maximum_size; - - //! The current size of the tabu list. - unsigned int memory_size; - - //! The move tabu list. - std::list tabuList; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moSimpleSolutionTabuList.h b/trunk/paradiseo-old-mo/src/moSimpleSolutionTabuList.h deleted file mode 100755 index f00a1523e..000000000 --- a/trunk/paradiseo-old-mo/src/moSimpleSolutionTabuList.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moSimpleSolutionTabuList_h -#define _moSimpleSolutionTabuList_h - -#include -#include - -#include - -//! Class describing a solution tabu list with limited length. -template -class moSimpleSolutionTabuList: public moTabuList < M > -{ - public: - - //! Alias for the type - typedef typename M::EOType EOT; - - //! Alias for an iterator of a solution list. - typedef typename std::list::iterator solutionIterator; - - //! Constructor - /*! - \param _memory_maximum_size The maximum size of the solution tabu list. - */ - moSimpleSolutionTabuList(unsigned int _memory_maximum_size): memory_maximum_size(_memory_maximum_size), memory_size(0) - {} - - //! Function that indicates if, in a given state, the _move is tabu or not. - /*! - \param _move A given moMove. - \param _solution A solution. - \return true or false. - */ - bool operator () (const M & _move, const EOT & _solution) - { - M move((M)_move); - EOT solution((EOT)_solution); - - solutionIterator it; - - move(solution); - - it=tabuList.begin(); - // The code is !(*it)==_solution instead of (*it)!=_solution because people designing their specific solution representation - // will write the "==" operator (I hope) but not necessary the "!=" operator. - while (it!=tabuList.end()&&(!((*it)==solution))) - { - it++; - } - - return it!=tabuList.end(); - } - - void add (const M & _move, const EOT & _solution) - { - M move=(M)_move; - EOT solution=(EOT) _solution; - - move(solution); - - if (memory_size!=0) - { - // Useful in the case of a solution has been kept thanks to the moAspirCrit. - // In this case, the solution can already be in the tabuList. - removeSolution(_solution); - } - - tabuList.push_back(_solution); - - if (memory_size == memory_maximum_size) - { - tabuList.erase(tabuList.begin()); - } - else - { - memory_size++; - } - } - - void update () - { - //nothing to do - } - - void init () - { - //nothing to do - } - - private: - - //! Procedure that removes a given solution from the tabu list (if it is into, else does nothing). - /*! - \param _solution A given solution. - */ - void removeSolution(const EOT & _solution) - { - solutionIterator it; - - it=tabuList.begin(); - // The code is !(*it)==_solution instead of (*it)!=_solution because people designing their specific solution representation - // will write the "==" operator (I hope) but not necessary the "!=" operator. - while ( it!=tabuList.end() && !((*it)==_solution) ) - { - it++; - } - - if (it!=tabuList.end()) - { - tabuList.erase(it); - memory_size--; - } - } - - //! The maximum size of the tabu list. - unsigned int memory_maximum_size; - - //! The current size of the tabu list. - unsigned int memory_size; - - //! The solution tabu list. - std::list tabuList; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moSolContinue.h b/trunk/paradiseo-old-mo/src/moSolContinue.h deleted file mode 100755 index eb4c72cc0..000000000 --- a/trunk/paradiseo-old-mo/src/moSolContinue.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moSolContinue_h -#define _moSolContinue_h - -#include -#include - -//! Class that describes a stop criterion for a solution-based heuristic - -/*! - It allows to add an initialisation procedure to an object that is a unary function (eoUF). -*/ -template < class EOT > -class moSolContinue:public eoUF < const EOT &, bool > -{ - public: - //! Procedure which initialises all that the stop criterion needs - /*! - Generally, it allocates some data structures or initialises some counters. - */ - virtual void init () = 0; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moSteadyFitSolContinue.h b/trunk/paradiseo-old-mo/src/moSteadyFitSolContinue.h deleted file mode 100644 index ff79bdb17..000000000 --- a/trunk/paradiseo-old-mo/src/moSteadyFitSolContinue.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moSteadyFitSolContinue_h -#define _moSteadyFitSolContinue_h - -#include - -//! One possible stopping criterion for a solution-based heuristic. -/*! - The stop criterion corresponds to a maximum number of iterations without improvement (after a minimum number of iterations). -*/ -template < class EOT > -class moSteadyFitSolContinue:public moSolContinue < EOT > -{ - public: - - //! Alias for the fitness. - typedef typename EOT::Fitness Fitness; - - //! Basic constructor. - /*! - \param _maxNumberOfIterations The number of iterations to reach before looking for the fitness. - \param _maxNumberOfIterationWithoutImprovement The number of iterations without fitness improvement to reach for stop. - */ - moSteadyFitSolContinue (unsigned int _maxNumberOfIterations, unsigned int _maxNumberOfIterationWithoutImprovement) - : maxNumberOfIterations (_maxNumberOfIterations), maxNumberOfIterationsWithoutImprovement(_maxNumberOfIterationWithoutImprovement), - maxNumberOfIterationsReached(false), firstFitnessSaved(true), counter(0) - {} - - //! Function that activates the stopping criterion. - /*! - Indicates if the fitness has not been improved since a number of iterations (after a minimum of iterations). - - \param _solution the current solution. - \return true or false. - */ - bool operator () (const EOT & _solution) - { - if (!maxNumberOfIterationsReached) - { - maxNumberOfIterationsReached=((++counter)==maxNumberOfIterations); - if (maxNumberOfIterationsReached) - { - std::cout << "[moSteadyFitSolContinue.h]: Done the minimum number of iterations [" << counter << "]." << std::endl; - } - return true; - } - - if (_solution.invalid()) - { - throw std::runtime_error("[moSteadyFitSolContinue.h]: The current solution has not been evaluated."); - } - - if (firstFitnessSaved) - { - fitness=_solution.fitness(); - counter=0; - firstFitnessSaved=false; - return true; - } - - counter++; - - if ( _solution.fitness() > fitness ) - { - fitness=_solution.fitness(); - counter=0; - } - - if (counter==maxNumberOfIterationsWithoutImprovement) - { - std::cout << "[moSteadyFitSolContinue.h]: Done [" << counter << "] iterations without improvement." << std::endl; - } - return counter!=maxNumberOfIterationsWithoutImprovement; - } - - //! Procedure which allows to initialise the stuff needed. - /*! - It can be also used to reinitialize the counter all the needed things. - */ - void init () - { - maxNumberOfIterationsReached=false; - counter=0; - firstFitnessSaved=true; - } - - private: - - //! Maximum number of iterations before considering the fitness. - unsigned int maxNumberOfIterations; - - //! Maximum number of iterations without improvement allowed. - unsigned int maxNumberOfIterationsWithoutImprovement; - - //! Flag that indicates that the maxNumberIteration have been reached. - bool maxNumberOfIterationsReached; - - //! Flag that this is the first time that the fitness is used. - bool firstFitnessSaved; - - //! Current Fitness. - Fitness fitness; - - //! The iteration couter. - unsigned int counter; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moTA.h b/trunk/paradiseo-old-mo/src/moTA.h deleted file mode 100644 index e963c88ed..000000000 --- a/trunk/paradiseo-old-mo/src/moTA.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2008-2009 - (C) OPAC Team, LIFL, 2002-2008 - - Salma Mesmoudi - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moTA_h -#define _moTA_h - -#include -#include -#include -#include -#include -#include - -//! Threshold Accepting (TA) -/*! - Class that describes a Threshold Accepting algorithm. -*/ -template < class M > -class moTA:public moAlgo < typename M::EOType > -{ - //! Alias for the type - typedef typename M::EOType EOT; - - //! Alias for the fitness - typedef typename EOT::Fitness Fitness; - - - public: - - //! TA constructor - /*! - All the boxes used by a TA need to be given. It is equivalent to a SA object. - - \param _random_move_generator The move generator (generally randomly). - \param _incremental_evaluation The (generally) efficient evaluation function - \param _continue The stopping criterion. - \param _initial_threshold The initial threshold. - \param _cooling_schedule The cooling schedule, describes how the temperature is modified. - \param _full_evaluation The full evaluation function. - */ - moTA (moRandMove < M > & _random_move_generator, moMoveIncrEval < M > & _incremental_evaluation, - moSolContinue < EOT > & _continue, double _initial_threshold, moCoolingSchedule & _cooling_schedule, - eoEvalFunc < EOT > & _full_evaluation): - random_move_generator(_random_move_generator), incremental_evaluation(_incremental_evaluation), - continu(_continue), initial_threshold(_initial_threshold), - cooling_schedule(_cooling_schedule), full_evaluation(_full_evaluation) - {} - - //! function that launches the TA algorithm. - /*! - As a moSA the TA can be used for HYBRIDATION in an evolutionary algorithm. - - \param _solution A solution to improve. - \return TRUE. - */ - bool operator ()(EOT & _solution) - { - Fitness incremental_fitness, delta_fit; - EOT best_solution; - double threshold; - M move; - - if (_solution.invalid()) - { - full_evaluation (_solution); - } - - threshold = initial_threshold; - - best_solution = _solution; - - do - { - continu.init (); - - do - { - random_move_generator(move); - - incremental_fitness = incremental_evaluation (move, _solution); - - delta_fit = incremental_fitness - _solution.fitness (); - - if ( threshold > delta_fit) - - { - move(_solution); - _solution.fitness(incremental_fitness); - - // Updating the best solution found until now ? - if ( _solution.fitness() > best_solution.fitness() ) - { - best_solution = _solution; - } - } - - } - while ( continu (_solution)); - } - while ( cooling_schedule (threshold) ); - - _solution = best_solution; - - return true; - } - - private: - - //! A move generator (generally randomly) - moRandMove < M > & random_move_generator; - - //! A (generally) efficient evaluation function. - moMoveIncrEval < M > & incremental_evaluation; - - //! Stopping criterion before threshold update - moSolContinue < EOT > & continu; - - //! Initial temperature - double initial_threshold; - - //! The cooling schedule - moCoolingSchedule & cooling_schedule; - - //! A full evaluation function. - eoEvalFunc < EOT > & full_evaluation; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moTS.h b/trunk/paradiseo-old-mo/src/moTS.h deleted file mode 100755 index 1aa5fb451..000000000 --- a/trunk/paradiseo-old-mo/src/moTS.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moTS_h -#define _moTS_h - -#include - -#include -#include -#include - -//! Tabu Search (TS) -/*! - Generic algorithm that describes a tabu search. -*/ -template < class M > -class moTS:public moAlgo < typename M::EOType > -{ - //!Alias for the type - typedef typename M::EOType EOT; - - //!Alias for the fitness - typedef typename EOT::Fitness Fitness; - - public: - - //!Constructor of a moTS specifying all the boxes - /*! - In this constructor, a moTSMoveLoopExpl is instanciated. - - \param _move_initializer The move initializer. - \param _next_move_generator The neighbourhood explorer. - \param _incremental_evaluation The (generally) efficient evaluation. - \param _tabu_list The tabu list. - \param _aspiration_criterion An aspiration criterion. - \param _continue The stopping criterion. - \param _full_evaluation A full evaluation function. - */ - moTS (moMoveInit < M > & _move_initializer, moNextMove < M > & _next_move_generator, - moMoveIncrEval < M > & _incremental_evaluation, moTabuList < M > & _tabu_list, - moAspirCrit < M > & _aspiration_criterion, moSolContinue < EOT > & _continue, - eoEvalFunc < EOT > & _full_evaluation): - move_explorer (new moTSMoveLoopExpl < M >(_move_initializer, _next_move_generator, _incremental_evaluation, - _tabu_list,_aspiration_criterion) ), - continu (_continue), full_evaluation (_full_evaluation), move_explorer_memory_allocation(true) - {} - - //! Constructor with less parameters - /*! - The explorer is given in the parameters. - - \param _move_explorer The explorer (generally different that a moTSMoveLoopExpl). - \param _continue The stopping criterion. - \param _full_evaluation A full evaluation function. - */ - moTS (moMoveExpl < M > & _move_explorer, moSolContinue < EOT > & _continue, eoEvalFunc < EOT > & _full_evaluation): - move_explorer (&_move_explorer), continu (_continue), full_evaluation (_full_evaluation), move_explorer_memory_allocation(false) - {} - - //! Destructor - ~moTS() - { - if(move_explorer_memory_allocation) - { - delete(move_explorer); - } - } - - //! Function which launchs the Tabu Search - /*! - Algorithm of the tabu search. - As a moSA or a moHC, it can be used for HYBRIDATION in an evolutionary algorithm. - For security a lock (pthread_mutex_t) is closed during the algorithm. - - \param _solution a solution to improve. - \return TRUE. - */ - bool operator ()(EOT & _solution) - { - M move; - - EOT best_solution, new_solution; - - if ( _solution.invalid () ) - { - full_evaluation (_solution); - } - - best_solution=_solution; - - // code used for avoiding warning because new_solution is indirectly initialized by move_expl. - new_solution=_solution; - - continu.init (); - - do - { - (*move_explorer) (_solution, new_solution); - - // Updating the best solution found until now ? - if (new_solution.fitness() > best_solution.fitness()) - { - best_solution = new_solution; - } - - _solution = new_solution; - } - while ( continu (_solution) ); - - _solution = best_solution; - - return true; - } - - private: - - //! Neighborhood explorer - moMoveExpl < M > * move_explorer; - - //! Stop criterion - moSolContinue < EOT > & continu; - - //! Full evaluation function - eoEvalFunc < EOT > & full_evaluation; - - //! Indicate if the memory has been allocated for the move_explorer. - bool move_explorer_memory_allocation; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moTSMoveLoopExpl.h b/trunk/paradiseo-old-mo/src/moTSMoveLoopExpl.h deleted file mode 100755 index 9e78f85fe..000000000 --- a/trunk/paradiseo-old-mo/src/moTSMoveLoopExpl.h +++ /dev/null @@ -1,165 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moTSMoveLoopExpl_h -#define _moTSMoveLoopExpl_h - -#include -#include -#include -#include -#include -#include -#include -#include - -//! Explorer for a Tabu Search algorithm -/*! - It is used by a moTS. -*/ -template < class M > -class moTSMoveLoopExpl:public moMoveLoopExpl < M > -{ - //!Alias for the type - typedef typename M::EOType EOT; - - //!Alias for the fitness - typedef typename M::EOType::Fitness Fitness; - - public: - - //!Constructor - /*! - \param _move_initializer The move initializer. - \param _next_move_generator The neighbourhood explorer. - \param _incremental_evaluation A (generally) efficient evaluation. - \param _tabu_list The tabu list. - \param _aspiration_criterion An aspiration criterion. - */ - moTSMoveLoopExpl (moMoveInit < M > & _move_initializer, moNextMove < M > & _next_move_generator, - moMoveIncrEval < M > & _incremental_evaluation, moTabuList < M > & _tabu_list, - moAspirCrit < M > & _aspiration_criterion): - move_initializer(_move_initializer), next_move_generator(_next_move_generator), incremental_evaluation(_incremental_evaluation), - tabu_list(_tabu_list), aspiration_criterion(_aspiration_criterion) - { - tabu_list.init (); - aspiration_criterion.init (); - } - - //!Procedure which lauches the exploration - /*! - The exploration continues while the chosen move is not in the tabu list - or the aspiration criterion is true. If these 2 conditions are not true, the - exploration stops if the move selector update function returns false. - - \param _old_solution the initial solution - \param _new_solution the new solution - */ - void operator () (const EOT & _old_solution, EOT & _new_solution) - { - M move, best_move; - Fitness fitness, best_move_fitness; - - bool move_is_tabu, aspiration_criterion_is_verified, selection_update_is_ok, has_next_move; - - if( _old_solution.invalid() ) - { - throw std::runtime_error("[moTSMoveLoopExpl.h]: The current solution has not been evaluated."); - } - - //At the begining, the new solution is equivalent to the old one. - _new_solution=(EOT)_old_solution; - - // Restarting the exploration of of the neighborhood ! - move_initializer (move, _old_solution); - - move_selection.init( _old_solution.fitness() ); - - selection_update_is_ok=true; - - do - { - fitness = incremental_evaluation(move, _old_solution); - - move_is_tabu = tabu_list(move, _old_solution); - - aspiration_criterion_is_verified = aspiration_criterion(move, fitness); - - if( !move_is_tabu || aspiration_criterion_is_verified ) - { - selection_update_is_ok = move_selection.update(move, fitness); - } - - has_next_move = next_move_generator(move, _old_solution); - } - while( has_next_move && selection_update_is_ok ); - - move_selection(best_move, best_move_fitness); - - // Apply the best move. - best_move(_new_solution); - - // The fitness is set to avoid an additionnal fitness computation. - _new_solution.fitness(best_move_fitness); - - // Removing moves that are no more tabu. - tabu_list.update (); - - // Updating the tabu list - tabu_list.add(best_move, _new_solution); - } - - private: - - //! Move initialisation - moMoveInit < M > & move_initializer; - - //! Neighborhood explorer - moNextMove < M > & next_move_generator; - - //! Efficient evaluation - moMoveIncrEval < M > & incremental_evaluation; - - //! Move selector - moBestImprSelect < M > move_selection; - - //! Tabu list - moTabuList < M > & tabu_list; - - //! Aspiration criterion - moAspirCrit < M > & aspiration_criterion; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moTabuList.h b/trunk/paradiseo-old-mo/src/moTabuList.h deleted file mode 100755 index 8a254edad..000000000 --- a/trunk/paradiseo-old-mo/src/moTabuList.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _moTabuList_h -#define _moTabuList_h - -#include - -//! Class describing a tabu list that a moTS uses. -/*! - It is only a description, does nothing... A new object that herits from this class has to be defined in order - to be used in a moTS. -*/ -template < class M > class moTabuList: public eoBF < const M &, const typename M::EOType &, bool > -{ - public: - - //! Alias for the type - typedef typename M::EOType EOT; - - //! Procedure to add a move in the tabu list - /*! - The two parameters have not to be modified so they are constant parameters. - - \param _move a new tabu move. - \param _solution the origianl solution associated to this move. - */ - virtual void add(const M & _move, const EOT & _solution) = 0; - - //! Procedure that updates the tabu list content. - /*! - Generally, a counter associated to each saved move is decreased by one. - */ - virtual void update () = 0; - - //! Procedure which initialises the tabu list. - /*! - Can be useful if the data structure needs to be allocated before being used. - */ - virtual void init () = 0; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/moVNS.h b/trunk/paradiseo-old-mo/src/moVNS.h deleted file mode 100644 index f25a45f7d..000000000 --- a/trunk/paradiseo-old-mo/src/moVNS.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Salma Mesmoudi (salma.mesmoudi@inria.fr), Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr - */ - -#ifndef _moVNS_h -#define _moVNS_h - -#include - -//! Variable Neighbors Search (VNS) -/*! - Class which describes the algorithm for a Variable Neighbors Search. -*/ - -template < class EOT> -class moVNS : public moAlgo < EOT> -{ - //! Alias for the fitness. - typedef typename EOT::Fitness Fitness; - - public: - - //! Generic constructor - /*! - Generic constructor using a moExpl - - \param _explorer Vector of Neighborhoods. - \param _full_evaluation The evaluation function. - */ - moVNS(moExpl< EOT> & _explorer, eoEvalFunc < EOT> & _full_evaluation): explorer(_explorer), full_evaluation(_full_evaluation) {} - - - //! Function which launches the VNS - /*! - The VNS has to improve a current solution. - - \param _solution a current solution to improve. - \return true. - */ - bool operator()(EOT & _solution) - { - bool change; - unsigned int i; - - EOT solution_prime, solution_second; - EOT solution_initial=_solution; - - change=false; - i=0; - explorer.setCurrentExplorer(i); - - while( i solution_initial.fitness() ) - { - solution_initial=solution_second; - change=true; - if(i!= 0) - { - i=0; - explorer.setCurrentExplorer(i); - } - } - else - { - i++; - if( i & explorer; - - //!The full evaluation function - eoEvalFunc & full_evaluation; -}; - -#endif diff --git a/trunk/paradiseo-old-mo/src/oldmo b/trunk/paradiseo-old-mo/src/oldmo deleted file mode 100755 index cbcc01b8e..000000000 --- a/trunk/paradiseo-old-mo/src/oldmo +++ /dev/null @@ -1,41 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef __oldmo -#define __oldmo - -#include "oldmo.h" - -#endif diff --git a/trunk/paradiseo-old-mo/src/oldmo.h b/trunk/paradiseo-old-mo/src/oldmo.h deleted file mode 100755 index ad81a9602..000000000 --- a/trunk/paradiseo-old-mo/src/oldmo.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 - (C) OPAC Team, LIFL, 2002-2007 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _oldmo_h -#define _oldmo_h - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/trunk/paradiseo-old-mo/test/CMakeLists.txt b/trunk/paradiseo-old-mo/test/CMakeLists.txt deleted file mode 100644 index 69254c582..000000000 --- a/trunk/paradiseo-old-mo/test/CMakeLists.txt +++ /dev/null @@ -1,93 +0,0 @@ -############################################################################### -## -## CMakeLists file for ParadisEO-MO/test -## -############################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${OLDMO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${OLDMO_BIN_DIR}/lib) - -###################################################################################### - - - -###################################################################################### -### 3) Define your targets and link the librairies -###################################################################################### - -SET (TEST_LIST t-moBestImprSelect - t-moFirstImprSelect - t-moFitComparator - t-moFitSolContinue - t-moGenSolContinue - t-moGeometricCoolingSchedule - t-moHC - t-moHC_2 - t-moHCMoveLoopExpl - t-moILS - t-moILS_HC - t-moILS_TS - t-moILS_SA - t-moImprBestFitAspirCrit - t-moItRandNextMove - t-moLinearCoolingSchedule - t-moLSCheckPoint - t-moNoAspirCrit - t-moNoFitImprSolContinue - t-moRandImprSelect - t-moSA - t-moSimpleMoveTabuList - t-moSimpleSolutionTabuList - t-moSteadyFitSolContinue - t-moTS - t-moTS_2 - t-moTSMoveLoopExpl - t-moTA - t-moVNS - ) - -FOREACH (test ${TEST_LIST}) - SET ("T_${test}_SOURCES" "${test}.cpp") -ENDFOREACH (test) - - -IF(ENABLE_MINIMAL_CMAKE_TESTING) - SET (MIN_TEST_LIST t-moHC) - FOREACH (mintest ${MIN_TEST_LIST}) - SET ("T_${mintest}_SOURCES" "${mintest}.cpp") - ADD_EXECUTABLE(${mintest} ${T_${mintest}_SOURCES}) - ADD_TEST(${mintest} ${mintest}) - ENDFOREACH (mintest) - -ELSEIF(ENABLE_CMAKE_TESTING) - - # Add the tests - FOREACH (test ${TEST_LIST}) - ADD_EXECUTABLE(${test} ${T_${test}_SOURCES}) - ADD_TEST(${test} ${test}) - ENDFOREACH (test) - - # Link the librairies - FOREACH (test ${TEST_LIST}) - TARGET_LINK_LIBRARIES(${test} ga es eoutils eo) - ENDFOREACH (test) - -ENDIF(ENABLE_MINIMAL_CMAKE_TESTING) - -###################################################################################### - diff --git a/trunk/paradiseo-old-mo/test/t-moBestImprSelect.cpp b/trunk/paradiseo-old-mo/test/t-moBestImprSelect.cpp deleted file mode 100644 index 55331d272..000000000 --- a/trunk/paradiseo-old-mo/test/t-moBestImprSelect.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moBestImprSelect.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - _solution=_solution; - } -} ; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result, test_1, test_2; - int return_value, value_1, value_2; - - unsigned int i, fitness; - - moBestImprSelect selection; - - solution solution; - - testMove move; - - cout << "[ moBestImprSelect ] ==> "; - - i=fitness=0; - - selection.init(0); - - test_1="KO"; - - try - { - selection(move, fitness); - } - catch(std::runtime_error e) - { - test_1="OK"; - } - - value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - test_2=((!selection.update(move, i))?"KO":"OK"); - value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - selection(move, fitness); - - move(solution); - - test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO"); - return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moFirstImprSelect.cpp b/trunk/paradiseo-old-mo/test/t-moFirstImprSelect.cpp deleted file mode 100644 index ab415a747..000000000 --- a/trunk/paradiseo-old-mo/test/t-moFirstImprSelect.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moFirstImprSelect.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - _solution=_solution; - } -} ; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - unsigned int i, fitness; - - moFirstImprSelect selection; - - solution solution; - - testMove move; - - cout << "[ moFirstImprSelect ] ==> "; - - i=fitness=0; - - selection.init(10); - - while ( selection.update(move, i) && i<15 ) - { - i++; - } - - selection(move, fitness); - - move(solution); - - test_result=((fitness!=11)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moFitComparator.cpp b/trunk/paradiseo-old-mo/test/t-moFitComparator.cpp deleted file mode 100644 index c8089e223..000000000 --- a/trunk/paradiseo-old-mo/test/t-moFitComparator.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moFitComparator.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - solution sol1, sol2; - - moFitComparator comparator; - - sol1.fitness(0); - sol2.fitness(1); - - cout << "[ moFitComparator ] ==> "; - - test_result=((comparator(sol1,sol2))?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moFitSolContinue.cpp b/trunk/paradiseo-old-mo/test/t-moFitSolContinue.cpp deleted file mode 100644 index 2290dc67b..000000000 --- a/trunk/paradiseo-old-mo/test/t-moFitSolContinue.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moFitSolContinue.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result, test_1, test_2; - int return_value, value_1, value_2; - - unsigned int i; - - moFitSolContinue continu(10); - - solution solution; - - cout << "[ moFitSolContinue ] ==> "; - - continu.init(); - - test_1="KO"; - - try - { - continu(solution); - } - catch(std::runtime_error e) - { - test_1="OK"; - } - - value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - - - i=0; - solution.fitness(i); - while( continu(solution) ) - { - i++; - solution.fitness(i); - } - - test_2=((i!=10)?"KO":"OK"); - value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO"); - return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moGenSolContinue.cpp b/trunk/paradiseo-old-mo/test/t-moGenSolContinue.cpp deleted file mode 100644 index 23b9d1e20..000000000 --- a/trunk/paradiseo-old-mo/test/t-moGenSolContinue.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moGenSolContinue.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result, test_1, test_2; - int value_1, value_2, return_value; - - unsigned int i; - solution sol; - - moGenSolContinue continu(10); - - cout << "[ moGenSolContinue ] ==> "; - - i=0; - while( continu(sol) ) - { - i++; - } - - test_1=((i!=9)?"KO":"OK"); - value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - continu.init(); - - i=0; - while( continu(sol) ) - { - i++; - } - - test_2=((i!=9)?"KO":"OK"); - value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO"); - return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moGeometricCoolingSchedule.cpp b/trunk/paradiseo-old-mo/test/t-moGeometricCoolingSchedule.cpp deleted file mode 100644 index 916988492..000000000 --- a/trunk/paradiseo-old-mo/test/t-moGeometricCoolingSchedule.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moExponentialCoolingSchedule.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - - -//----------------------------------------------------------------------------- - -int -main() -{ - int return_value; - std::string test_result; - - unsigned int i; - double temperature; - - moGeometricCoolingSchedule coolingSchedule( 4.0, 0.5 ); - - temperature=10.0; - - cout << "[ moExponentialCoolingSchedule ] ==> "; - - i=0; - while( coolingSchedule(temperature) ) - { - i++; - } - - test_result=((i!=1)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moHC.cpp b/trunk/paradiseo-old-mo/test/t-moHC.cpp deleted file mode 100644 index e8fe505ec..000000000 --- a/trunk/paradiseo-old-mo/test/t-moHC.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moHC.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ -public : - void operator () (testMove & _move, const solution & _solution) - { - testMove move=_move; - const solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ -public : - bool operator () (testMove & _move, const solution & _solution) - { - testMove move=_move; - const solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ -public : - unsigned int operator () (const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution solution(_solution); - - return 2; - } -} ; - -class testMoveSelect : public moMoveSelect -{ -public : - void operator () (testMove & _move, unsigned int & _fitness) - { - testMove move; - - move=_move; - - _fitness=2; - } - - void init(const unsigned int & _fitness) - { - unsigned int fitness; - fitness=(unsigned int)_fitness; - } - - bool update(const testMove & _move, const unsigned int & _fitness) - { - testMove move; - unsigned int fitness; - - move=(testMove)_move; - fitness=(unsigned int)_fitness; - - return true; - } -} ; - -class solutionEval : public eoEvalFunc -{ -public : - void operator () (solution & _solution) - { - _solution.fitness(2); - } -} ; - - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - solution solution; - - testMoveInit init; - testMoveNext next; - testMoveIncrEval incrEval; - testMoveSelect select; - solutionEval eval; - - moHC hc(init, next, incrEval, select, eval); - - cout << "[ moHC ] ==> "; - - hc(solution); - - test_result=((solution.fitness()!=2)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moHCMoveLoopExpl.cpp b/trunk/paradiseo-old-mo/test/t-moHCMoveLoopExpl.cpp deleted file mode 100644 index 9d431a071..000000000 --- a/trunk/paradiseo-old-mo/test/t-moHCMoveLoopExpl.cpp +++ /dev/null @@ -1,170 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moHCMoveLoopExpl.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ -public : - void operator () (testMove & _move, const solution & _solution) - { - testMove move=_move; - const solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ -public : - bool operator () (testMove & _move, const solution & _solution) - { - testMove move=_move; - const solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ -public : - unsigned int operator () (const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution solution(_solution); - - return 2; - } -} ; - -class testMoveSelect : public moMoveSelect -{ -public : - void operator () (testMove & _move, unsigned int & _fitness) - { - testMove move; - - move=_move; - - _fitness=2; - } - - void init(const unsigned int & _fitness) - { - unsigned int fitness; - fitness=(unsigned int)_fitness; - } - - bool update(const testMove & _move, const unsigned int & _fitness) - { - testMove move; - unsigned int fitness; - - move=(testMove)_move; - fitness=(unsigned int)_fitness; - - return true; - } -} ; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result, test_1, test_2; - int return_value, value_1, value_2; - - solution solution_1, solution_2; - - testMoveInit init; - testMoveNext next; - testMoveIncrEval incrEval; - testMoveSelect select; - - moHCMoveLoopExpl explorer(init, next, incrEval, select); - - cout << "[ moHCMoveLoopExpl ] ==> "; - - test_1="KO"; - - try - { - explorer(solution_1, solution_2); - } - catch(std::runtime_error e) - { - test_1="OK"; - } - - value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - solution_1.fitness(0); - solution_2.fitness(0); - - explorer(solution_1, solution_2); - - test_2=((solution_2.fitness()!=2)?"KO":"OK"); - value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO"); - return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moHC_2.cpp b/trunk/paradiseo-old-mo/test/t-moHC_2.cpp deleted file mode 100644 index df0b57d34..000000000 --- a/trunk/paradiseo-old-mo/test/t-moHC_2.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moHC_2.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - solution sol=_solution; - } -} ; - -class testMoveExplorer : public moMoveExpl -{ -public : - void operator () (const solution & _solution_1, solution & _solution_2) - { - const solution sol(_solution_1); - - _solution_2.fitness(2); - } -}; - -class solutionEval : public eoEvalFunc -{ -public : - void operator () (solution & _solution) - { - _solution.fitness(0); - } -} ; - - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - solution solution; - - solutionEval eval; - testMoveExplorer explorer; - - moHC hc(explorer, eval); - - cout << "[ moHC_2 ] ==> "; - - hc(solution); - - test_result=((solution.fitness()!=2)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moILS.cpp b/trunk/paradiseo-old-mo/test/t-moILS.cpp deleted file mode 100644 index ec5f211ca..000000000 --- a/trunk/paradiseo-old-mo/test/t-moILS.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moILS.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - solution sol=_solution; - } -} ; - -class solutionAlgo : public moAlgo -{ -public : - bool operator () (solution & _solution) - { - solution solution(_solution); - return true; - } -} ; - -class solutionContinue : public moSolContinue -{ -public : - solutionContinue(): counter(0) - {} - - bool operator () (const solution & _solution) - { - const solution sol(_solution); - - if(counter<2) - { - counter++; - return true; - } - return false; - } - - void init() - {} -private : - unsigned int counter; -} ; - -class solutionComparator : public moComparator -{ -public : - - solutionComparator() : counter(0) - {} - - bool operator () (const solution & _solution1 , const solution & _solution2) - { - const solution sol1(_solution1); - const solution sol2(_solution2); - - if(counter<2) - { - counter++; - return false; - } - - return true; - } -private : - unsigned int counter; -} ; - -class solutionPerturbation : public eoMonOp -{ -public : - bool operator () (solution & _solution) - { - _solution.fitness(2); - - return true; - } -} ; - -class solutionEval : public eoEvalFunc -{ -public : - void operator () (solution & _solution) - { - solution solution(_solution); - _solution.fitness(2); - } -} ; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - solution solution; - - solutionAlgo algorithm; - solutionContinue continu; - solutionComparator comparator; - solutionPerturbation perturbation; - solutionEval eval; - - moILS ils(algorithm, continu, comparator, perturbation, eval); - - cout << "[ moILS ] ==> "; - - solution.fitness(0); - - ils(solution); - - test_result=((solution.fitness()!=2)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moILS_HC.cpp b/trunk/paradiseo-old-mo/test/t-moILS_HC.cpp deleted file mode 100644 index 3dbca1ecb..000000000 --- a/trunk/paradiseo-old-mo/test/t-moILS_HC.cpp +++ /dev/null @@ -1,211 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moILS_HC.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ -public : - void operator () (testMove & _move, const solution & _solution) - { - testMove move=_move; - const solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ -public : - bool operator () (testMove & _move, const solution & _solution) - { - testMove move=_move; - const solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ -public : - unsigned int operator () (const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution solution(_solution); - - return 2; - } -} ; - -class testMoveSelect : public moMoveSelect -{ -public : - void operator () (testMove & _move, unsigned int & _fitness) - { - testMove move; - - move=_move; - - _fitness=2; - } - - void init(const unsigned int & _fitness) - { - unsigned int fitness; - fitness=(unsigned int)_fitness; - } - - bool update(const testMove & _move, const unsigned int & _fitness) - { - testMove move; - unsigned int fitness; - - move=(testMove)_move; - fitness=(unsigned int)_fitness; - - return true; - } -} ; - -class solutionEval : public eoEvalFunc -{ -public : - void operator () (solution & _solution) - { - _solution.fitness(0); - } -} ; - -class solutionContinue : public moSolContinue -{ -public : - solutionContinue(): counter(0) - {} - - bool operator () (const solution & _solution) - { - const solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} -private : - unsigned int counter; -} ; - -class solutionComparator : public moComparator -{ -public : - bool operator () (const solution & _solution1 , const solution & _solution2) - { - const solution sol1(_solution1); - const solution sol2(_solution2); - - return true; - } -} ; - -class solutionPerturbation : public eoMonOp -{ -public : - bool operator () (solution & _solution) - { - _solution.fitness(2); - - return true; - } -} ; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - solution solution; - - testMoveInit init; - testMoveNext next; - testMoveIncrEval incrEval; - testMoveSelect select; - solutionEval eval; - solutionContinue continu; - solutionComparator comparator; - solutionPerturbation perturbation; - - moILS ils(init, next, incrEval, select, continu, comparator, perturbation, eval); - - cout << "[ moILS_HC ] ==> "; - - ils(solution); - - test_result=((solution.fitness()!=2)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moILS_SA.cpp b/trunk/paradiseo-old-mo/test/t-moILS_SA.cpp deleted file mode 100644 index 1df643357..000000000 --- a/trunk/paradiseo-old-mo/test/t-moILS_SA.cpp +++ /dev/null @@ -1,190 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moILS_SA.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - solution sol=_solution; - } -} ; - -class testRandMove : public moRandMove -{ -public : - void operator () (testMove & _move) - { - _move=_move; - } -}; - -class testMoveIncrEval : public moMoveIncrEval -{ -public : - int operator () (const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution solution(_solution); - - return 2; - } -} ; - -class testCooling : public moCoolingSchedule -{ -public : - bool operator () (double & _temperature) - { - double temperature; - temperature=_temperature; - - return false; - } -}; - -class solutionEval : public eoEvalFunc -{ -public : - void operator () (solution & _solution) - { - const solution solution(_solution); - } -} ; - -class solutionContinue : public moSolContinue -{ -public : - solutionContinue(): counter(0) - {} - - bool operator () (const solution & _solution) - { - const solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} -private : - unsigned int counter; -} ; - -class solutionComparator : public moComparator -{ -public : - - solutionComparator() : counter(0) - {} - - bool operator () (const solution & _solution1 , const solution & _solution2) - { - const solution solution1(_solution1); - const solution solution2(_solution2); - - return true; - } -private : - unsigned int counter; -} ; - -class solutionPerturbation : public eoMonOp -{ -public : - bool operator () (solution & _solution) - { - _solution.fitness(2); - - return true; - } -} ; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - solution solution; - - testRandMove rand; - testMoveIncrEval incrEval; - solutionContinue continu; - solutionContinue continu_2; - testCooling cooling; - solutionEval eval; - solutionComparator comparator; - solutionPerturbation perturbation; - - moILS ils(rand, incrEval, continu, 10.0, cooling, continu_2, comparator, perturbation, eval); - - cout << "[ moILS_SA ] ==> "; - - solution.fitness(0); - - eval(solution); - - ils(solution); - - test_result=((solution.fitness()!=2)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moILS_TS.cpp b/trunk/paradiseo-old-mo/test/t-moILS_TS.cpp deleted file mode 100644 index e09b89262..000000000 --- a/trunk/paradiseo-old-mo/test/t-moILS_TS.cpp +++ /dev/null @@ -1,223 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moILS_TS.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ -public : - void operator () (testMove & _move, const solution & _solution) - { - testMove move=_move; - const solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ -public : - bool operator () (testMove & _move, const solution & _solution) - { - testMove move=_move; - const solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ -public : - unsigned int operator () (const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution solution(_solution); - - return 2; - } -} ; - -class testTabuList : public moTabuList -{ -public: - bool operator() (const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ -public: - bool operator() (const testMove & _move, const unsigned int & _fitness) - { - unsigned int fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -class solutionContinue : public moSolContinue -{ -public : - solutionContinue(): counter(0) - {} - - bool operator () (const solution & _solution) - { - const solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - return false; - } - - void init() - {} -private : - unsigned int counter; -} ; - -class solutionComparator : public moComparator -{ -public : - bool operator () (const solution & _solution1 , const solution & _solution2) - { - const solution sol1(_solution1); - const solution sol2(_solution2); - - return true; - } -} ; - -class solutionPerturbation : public eoMonOp -{ -public : - bool operator () (solution & _solution) - { - _solution.fitness(2); - - return true; - } -} ; - -class solutionEval : public eoEvalFunc -{ -public : - void operator () (solution & _solution) - { - _solution.fitness(0); - } -} ; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - solution solution; - - testMoveInit init; - testMoveNext next; - testMoveIncrEval incrEval; - testTabuList tabuList; - testAspirCrit aspirCrit; - solutionEval eval; - solutionContinue continu; - solutionContinue continu_2; - solutionComparator comparator; - solutionPerturbation perturbation; - - moILS ils(init, next, incrEval, tabuList, aspirCrit, continu, continu_2, comparator, perturbation, eval); - - cout << "[ moILS_TS ] ==> "; - - ils(solution); - - test_result=((solution.fitness()!=2)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moImprBestFitAspirCrit.cpp b/trunk/paradiseo-old-mo/test/t-moImprBestFitAspirCrit.cpp deleted file mode 100644 index fe642ef51..000000000 --- a/trunk/paradiseo-old-mo/test/t-moImprBestFitAspirCrit.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moImprBestFitAspirCrit.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - _solution=_solution; - } -} ; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result, test_1, test_2; - int return_value, value_1, value_2; - - solution solution; - - unsigned int i; - - moImprBestFitAspirCrit aspirCriterion; - - testMove move; - - cout << "[ moImprBestFitAspirCrit ] ==> "; - - aspirCriterion(move, 10); - - i=0; - while ( !aspirCriterion(move,i) && i<15) - { - i++; - } - - test_1=((i!=11)?"KO":"OK"); - value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - aspirCriterion.init(); - aspirCriterion(move, i); - - i=0; - while ( !aspirCriterion(move,i) && i<15) - { - i++; - } - - move(solution); - - test_2=((i!=12)?"KO":"OK"); - value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO"); - return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moItRandNextMove.cpp b/trunk/paradiseo-old-mo/test/t-moItRandNextMove.cpp deleted file mode 100644 index b04c485ca..000000000 --- a/trunk/paradiseo-old-mo/test/t-moItRandNextMove.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moItRandNextMove.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - _solution=_solution; - } -} ; - -class testRandMove : public moRandMove -{ -public : - void operator () (testMove & _move) - { - _move=_move; - } -}; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result, test_1, test_2; - int value_1, value_2, return_value; - - unsigned int i; - - testMove move; - solution solution; - - testRandMove rand; - - moItRandNextMove next(rand, 10); - - cout << "[ moItRandNextMove ] ==> "; - - i=0; - while( next(move, solution) && i<15 ) - { - i++; - } - - test_1=((i!=11)?"KO":"OK"); - value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - i=0; - while( next(move, solution) && i<15 ) - { - i++; - } - - move(solution); - - test_2=((i!=11)?"KO":"OK"); - value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO"); - return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moLSCheckPoint.cpp b/trunk/paradiseo-old-mo/test/t-moLSCheckPoint.cpp deleted file mode 100644 index 611efed94..000000000 --- a/trunk/paradiseo-old-mo/test/t-moLSCheckPoint.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moLSCheckPoint.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - _solution=_solution; - } -} ; - -class testBF : public eoBF -{ - void operator () (const testMove & _move, const testMove::EOType & _solution) - { - const testMove move(_move); - const testMove::EOType sol(_solution); - std::ofstream os("test.txt"); - os << "OK" << endl; - } -}; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result, test_1, test_2; - int value_1, value_2, return_value; - - unsigned int i; - std::string result; - - testBF test; - moLSCheckPoint checkpoint; - - solution solution; - - testMove move; - - std::ifstream is; - - cout << "[ moLSCheckPoint ] ==> "; - - i=0; - - checkpoint.add(test); - checkpoint(move, solution); - - move(solution); - - is.open("test.txt"); - - test_1=((!is.is_open())?"KO":"OK"); - value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - is >> result; - - test_2=((result.compare("OK")!=0)?"KO":"OK"); - value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO"); - return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moLinearCoolingSchedule.cpp b/trunk/paradiseo-old-mo/test/t-moLinearCoolingSchedule.cpp deleted file mode 100644 index 02588ee8a..000000000 --- a/trunk/paradiseo-old-mo/test/t-moLinearCoolingSchedule.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moLinearCoolingSchedule.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - unsigned int i; - double temperature; - - moLinearCoolingSchedule coolingSchedule( 1.0, 0.5 ); - - cout << "[ moLinearCoolingSchedule ] ==> "; - - temperature=2.0; - - i=0; - while( coolingSchedule(temperature) ) - { - i++; - } - - test_result=((i!=1)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moNoAspirCrit.cpp b/trunk/paradiseo-old-mo/test/t-moNoAspirCrit.cpp deleted file mode 100644 index 61961b207..000000000 --- a/trunk/paradiseo-old-mo/test/t-moNoAspirCrit.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moNoAspirCrit.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - _solution=_solution; - } -} ; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - unsigned int i; - moNoAspirCrit aspirCriterion; - testMove move; - solution solution; - - cout << "[ moNoAspirCrit ] ==> "; - - move(solution); - - aspirCriterion.init(); - - test_result=((aspirCriterion(move, i))?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moNoFitImprSolContinue.cpp b/trunk/paradiseo-old-mo/test/t-moNoFitImprSolContinue.cpp deleted file mode 100644 index a8dabffe8..000000000 --- a/trunk/paradiseo-old-mo/test/t-moNoFitImprSolContinue.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moNoFitImprSolContinue.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result, test_1, test_2; - int return_value, value_1, value_2; - - - unsigned int i; - - moNoFitImprSolContinue continu(10); - - solution solution; - - cout << "[ moNoFitImprSolContinue ] ==> "; - - continu.init(); - - test_1="KO"; - - try - { - continu(solution); - } - catch(std::runtime_error e) - { - test_1="OK"; - } - - value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - solution.fitness(0); - - i=0; - while( continu(solution) ) - { - i++; - solution.fitness(2); - } - - test_2=((i!=11)?"KO":"OK"); - value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO"); - return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moRandImprSelect.cpp b/trunk/paradiseo-old-mo/test/t-moRandImprSelect.cpp deleted file mode 100644 index 97d576df4..000000000 --- a/trunk/paradiseo-old-mo/test/t-moRandImprSelect.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moRandImprSelect.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - _solution=_solution; - } -} ; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result, test_1, test_2, test_3; - int value_1, value_2, value_3, return_value; - - unsigned int i; - - moRandImprSelect selection; - - solution solution; - - testMove move; - - cout << "[ moRandImprSelect ] ==> "; - - selection.init(0); - - test_1="KO"; - - i=0; - - try - { - selection(move, i); - } - catch(std::runtime_error e) - { - test_1="OK"; - } - - value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - move(solution); - - test_2=((!selection.update(move, i))?"KO":"OK"); - value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - selection(move, i); - - i++; - - test_3=((!selection.update(move, i))?"KO":"OK"); - value_3=((test_3.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - selection(move, i); - - test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0)&&(test_3.compare("OK")==0))?"OK":"KO"); - return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS)&&(value_3==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moSA.cpp b/trunk/paradiseo-old-mo/test/t-moSA.cpp deleted file mode 100644 index 0c8ad4477..000000000 --- a/trunk/paradiseo-old-mo/test/t-moSA.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moSA.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - solution sol=_solution; - } -} ; - -class testRandMove : public moRandMove -{ -public : - void operator () (testMove & _move) - { - _move=_move; - } -}; - -class testMoveIncrEval : public moMoveIncrEval -{ -public : - - testMoveIncrEval() : counter(0) - {} - - int operator () (const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution solution(_solution); - - if(counter==0) - { - counter++; - return 2; - } - return 0; - } -private : - unsigned int counter; -} ; - -class solutionContinue : public moSolContinue -{ -public : - - solutionContinue() : counter(0) - {} - - bool operator () (const solution & _solution) - { - const solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - - return false; - } - - void init() - {} -private : - unsigned int counter; -} ; - -class testCooling : public moCoolingSchedule -{ -public : - bool operator () (double & _temperature) - { - double temperature; - temperature=_temperature; - - return false; - } -}; - -class solutionEval : public eoEvalFunc -{ -public : - void operator () (solution & _solution) - { - _solution.fitness(0); - } -} ; - - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - solution solution; - - testRandMove rand; - testMoveIncrEval incrEval; - solutionContinue continu; - testCooling cooling; - solutionEval eval; - - moSA sa(rand, incrEval, continu, 10.0, cooling, eval); - - cout << "[ moSA ] ==> "; - - sa(solution); - - test_result=((solution.fitness()!=2)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moSimpleMoveTabuList.cpp b/trunk/paradiseo-old-mo/test/t-moSimpleMoveTabuList.cpp deleted file mode 100644 index d77e6e969..000000000 --- a/trunk/paradiseo-old-mo/test/t-moSimpleMoveTabuList.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moSimpleMoveTabuList.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - testMove(unsigned int _value): value(_value) - {} - - void operator () (solution & _solution) - { - _solution=_solution; - } - - bool operator == (const testMove & _move) - { - return (value==_move.value); - } -private : - unsigned int value; -} ; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - moSimpleMoveTabuList tabuList(1); - - solution solution; - - testMove move_1(1), move_2(2); - - cout << "[ moSimpleMoveTabuList ] ==> "; - - tabuList.init(); - tabuList.update(); - - tabuList.add(move_1, solution); - - tabuList(move_2, solution); - - move_1(solution); - - tabuList.add(move_2, solution); - tabuList.add(move_2, solution); - - test_result=((tabuList(move_1, solution))?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moSimpleSolutionTabuList.cpp b/trunk/paradiseo-old-mo/test/t-moSimpleSolutionTabuList.cpp deleted file mode 100644 index 6d778b767..000000000 --- a/trunk/paradiseo-old-mo/test/t-moSimpleSolutionTabuList.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moSimpleSolutionTabuList.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -class solution : public EO -{ -public: - solution(unsigned int _value): value(_value) - {} - - bool operator == (const solution & _solution) - { - return (value==_solution.value); - } - -private: - unsigned int value; -}; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - solution solution(_solution); - } -}; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - moSimpleSolutionTabuList tabuList(1); - - solution solution_1(1), solution_2(2); - - testMove move; - - cout << "[ moSimpleSolutionTabuList ] ==> "; - - tabuList.init(); - tabuList.update(); - - tabuList.add(move, solution_1); - - move(solution_1); - - tabuList.add(move, solution_2); - - tabuList.add(move, solution_2); - - test_result=((tabuList(move, solution_1))?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moSteadyFitSolContinue.cpp b/trunk/paradiseo-old-mo/test/t-moSteadyFitSolContinue.cpp deleted file mode 100644 index ee655c430..000000000 --- a/trunk/paradiseo-old-mo/test/t-moSteadyFitSolContinue.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moSteadyFitSolContinue.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result, test_1, test_2; - int return_value, value_1, value_2; - - unsigned int i; - solution solution_1, solution_2; - - moSteadyFitSolContinue continu(10,10); - - cout << "[ moSteadyFitSolContinue ] ==> "; - - continu.init(); - - i=0; - solution_1.fitness(i); - while( continu(solution_1) && i<50) - { - i++; - - if(i<11) - { - solution_1.fitness(i); - } - - if(i==11) - { - test_1="KO"; - try - { - continu(solution_2); - } - catch(std::runtime_error e) - { - test_1="OK"; - } - value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - } - - if(i==15) - { - solution_1.fitness(i); - } - } - - test_2=((i!=25)?"KO":"OK"); - value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO"); - return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moTA.cpp b/trunk/paradiseo-old-mo/test/t-moTA.cpp deleted file mode 100644 index 661baff80..000000000 --- a/trunk/paradiseo-old-mo/test/t-moTA.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2007-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Salma Mesmoudi -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moTA.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - solution sol=_solution; - } -} ; - -class testRandMove : public moRandMove -{ -public : - void operator () (testMove & _move) - { - _move=_move; - } -}; - -class testMoveIncrEval : public moMoveIncrEval -{ -public : - - testMoveIncrEval() : counter(0) - {} - - int operator () (const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution solution(_solution); - - if(counter==0) - { - counter++; - return 2; - } - return 0; - } -private : - unsigned int counter; -} ; - -class solutionContinue : public moSolContinue -{ -public : - - solutionContinue() : counter(0) - {} - - bool operator () (const solution & _solution) - { - const solution sol(_solution); - - if(counter==0) - { - counter++; - return true; - } - - return false; - } - - void init() - {} -private : - unsigned int counter; -} ; - -class testCooling : public moCoolingSchedule -{ -public : - bool operator () (double & _threeshold) - { - double threeshold; - threeshold=_threeshold; - - return false; - } -}; - -class solutionEval : public eoEvalFunc -{ -public : - void operator () (solution & _solution) - { - _solution.fitness(0); - } -} ; - - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - solution solution; - - testRandMove rand; - testMoveIncrEval incrEval; - solutionContinue continu; - testCooling cooling; - solutionEval eval; - - moTA ta(rand, incrEval, continu, 10.0, cooling, eval); - - cout << "[ moTA ] ==> "; - - ta(solution); - - test_result=((solution.fitness()!=2)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moTS.cpp b/trunk/paradiseo-old-mo/test/t-moTS.cpp deleted file mode 100644 index 9748f621d..000000000 --- a/trunk/paradiseo-old-mo/test/t-moTS.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moTS.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ -public : - void operator () (testMove & _move, const solution & _solution) - { - testMove move=_move; - const solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ -public : - bool operator () (testMove & _move, const solution & _solution) - { - testMove move(_move); - const solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ -public : - unsigned int operator () (const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution solution(_solution); - - return 2; - } -} ; - -class testTabuList : public moTabuList -{ -public: - bool operator() (const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ -public: - bool operator() (const testMove & _move, const unsigned int & _fitness) - { - unsigned int fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -class solutionContinue : public moSolContinue -{ -public : - bool operator () (const solution & _solution) - { - const solution sol(_solution); - - return false; - } - - void init() - {} -} ; - -class solutionEval : public eoEvalFunc -{ -public : - void operator () (solution & _solution) - { - _solution.fitness(2); - } -} ; - - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - solution solution; - - testMoveInit init; - testMoveNext next; - testMoveIncrEval incrEval; - testTabuList tabuList; - testAspirCrit aspirCrit; - solutionContinue continu; - solutionEval eval; - - moTS ts(init, next, incrEval, tabuList, aspirCrit, continu, eval); - - cout << "[ moTS ] ==> "; - - ts(solution); - - test_result=((solution.fitness()!=2)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moTSMoveLoopExpl.cpp b/trunk/paradiseo-old-mo/test/t-moTSMoveLoopExpl.cpp deleted file mode 100644 index 8dd033878..000000000 --- a/trunk/paradiseo-old-mo/test/t-moTSMoveLoopExpl.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moTSMoveLoopExpl.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - solution sol=_solution; - } -} ; - -class testMoveInit : public moMoveInit -{ -public : - void operator () (testMove & _move, const solution & _solution) - { - testMove move=_move; - const solution sol(_solution); - } -} ; - -class testMoveNext : public moNextMove -{ -public : - bool operator () (testMove & _move, const solution & _solution) - { - testMove move(_move); - const solution sol(_solution); - - return false; - } -} ; - -class testMoveIncrEval : public moMoveIncrEval -{ -public : - unsigned int operator () (const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution solution(_solution); - - return 2; - } -} ; - -class testTabuList : public moTabuList -{ -public: - bool operator() (const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution sol(_solution); - - return false; - } - - void add(const testMove & _move, const solution & _solution) - { - const testMove move(_move); - const solution sol(_solution); - } - - void update() - {} - - void init() - {} -}; - -class testAspirCrit : public moAspirCrit -{ -public: - bool operator() (const testMove & _move, const unsigned int & _fitness) - { - unsigned int fitness; - const testMove move(_move); - fitness=_fitness; - - return false; - } - - void init() - {} -}; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result, test_1, test_2; - int return_value, value_1, value_2; - - solution solution_1 ,solution_2; - - testMoveInit init; - testMoveNext next; - testMoveIncrEval incrEval; - testTabuList tabuList; - testAspirCrit aspirCrit; - - moTSMoveLoopExpl explorer(init, next, incrEval, tabuList, aspirCrit); - - cout << "[ moTSMoveLoopExpl ] ==> "; - - test_1="KO"; - - try - { - explorer(solution_1, solution_2); - } - catch(std::runtime_error e) - { - test_1="OK"; - } - - value_1=((test_1.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - solution_1.fitness(0); - - explorer(solution_1, solution_2); - - test_2=((solution_2.fitness()!=2)?"KO":"OK"); - value_2=((test_2.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - test_result=(((test_1.compare("OK")==0)&&(test_2.compare("OK")==0))?"OK":"KO"); - return_value=(((value_1==EXIT_SUCCESS)&&(value_2==EXIT_SUCCESS))?EXIT_SUCCESS:EXIT_FAILURE); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moTS_2.cpp b/trunk/paradiseo-old-mo/test/t-moTS_2.cpp deleted file mode 100644 index b3917a28c..000000000 --- a/trunk/paradiseo-old-mo/test/t-moTS_2.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moTS_2.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; - -class testMove : public moMove -{ -public : - void operator () (solution & _solution) - { - solution sol=_solution; - } -} ; - -class testMoveExplorer : public moMoveExpl -{ -public : - void operator () (const solution & _solution_1, solution & _solution_2) - { - const solution solution(_solution_1); - _solution_2.fitness(2); - } -}; - -class solutionContinue : public moSolContinue -{ -public : - bool operator () (const solution & _solution) - { - const solution sol(_solution); - - return false; - } - - void init() - {} -} ; - -class solutionEval : public eoEvalFunc -{ -public : - void operator () (solution & _solution) - { - _solution.fitness(0); - } -} ; - - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - int return_value; - - solution solution; - - testMoveExplorer explorer; - solutionContinue continu; - solutionEval eval; - testMove move; - - moTS ts(explorer, continu, eval); - - cout << "[ moTS_2 ] ==> "; - - ts(solution); - - move(solution); - - test_result=((solution.fitness()!=2)?"KO":"OK"); - return_value=((test_result.compare("KO")==0)?EXIT_FAILURE:EXIT_SUCCESS); - - cout << test_result << endl; - return return_value; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/test/t-moVNS.cpp b/trunk/paradiseo-old-mo/test/t-moVNS.cpp deleted file mode 100644 index 03e74aa52..000000000 --- a/trunk/paradiseo-old-mo/test/t-moVNS.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2007-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Salma Mesmoudi (salma.mesmoudi@inria.fr), Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* Jeremie Humeau (jeremie.humeau@inria.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -//----------------------------------------------------------------------------- -// t-moVNS.cpp -//----------------------------------------------------------------------------- - -#include // EO -#include // MO -#include - -using std::cout; -using std::endl; - -//----------------------------------------------------------------------------- - -typedef EO solution; -typedef eoScalarFitness< float, std::greater > tspFitness ; -typedef eoVector Route ; - -int cpt=0; -int tableau[7]={10.0, 9.0, 8.0, 8.0, 7.0, 7.0, 7.0}; - -class testMove : public moMove -{ -public : - - void operator () (solution & _solution) - { - solution sol=_solution; - } -} ; - - -class solutionAlgo : public moAlgo -{ -public : - bool operator () (solution & _solution) - { - solution solution(_solution); - return true; - } -} ; - -class Voisinage : public eoMonOp -{ -public : - bool operator () (Route & _solution) - { - _solution.invalidate(); - //_solution.fitness(); - - return true; - } -} ; - -class Explorer : public moExpl -{ -public: - Explorer(eoMonOp & expl): moExpl( expl) - { - - } -}; - -class solutionEval : public eoEvalFunc -{ -public : - void operator () (Route & _solution) - { - _solution.fitness(tableau[cpt]); - cpt++; - } -}; - -//----------------------------------------------------------------------------- - -int -main() -{ - std::string test_result; - - //solution solution; - Route so ; - - Voisinage sol1; - Voisinage sol2; - Explorer explorer(sol1); - explorer.addExplorer(sol2); - solutionEval eval; - - moVNS vns(explorer, eval); - - cout << "[moVNS] ==> "; - - so.fitness(20.0); - - vns(so); - - assert(so.fitness()==7.0); - - cout << "OK" << endl; - - return EXIT_SUCCESS; -} - -//----------------------------------------------------------------------------- diff --git a/trunk/paradiseo-old-mo/tutorial/CMakeLists.txt b/trunk/paradiseo-old-mo/tutorial/CMakeLists.txt deleted file mode 100644 index b520d0450..000000000 --- a/trunk/paradiseo-old-mo/tutorial/CMakeLists.txt +++ /dev/null @@ -1,222 +0,0 @@ -IF(COMMAND cmake_policy) - CMAKE_POLICY(SET CMP0003 NEW) -ENDIF(COMMAND cmake_policy) -###################################################################################### -### 1) Definitions (required for tsp target) -###################################################################################### - -SET(TSP_SRC_DIR ${OLDMO_SRC_DIR}/tutorial/examples/tsp CACHE PATH "TSP src directory") -SET(TSP_BIN_DIR ${OLDMO_BIN_DIR}/tutorial/examples/tsp CACHE PATH "TSP binary directory") - -SET(FUNCTION_SRC_DIR ${OLDMO_SRC_DIR}/tutorial/examples/function CACHE PATH "FUNCTION src directory") -SET(FUNCTION_BIN_DIR ${OLDMO_BIN_DIR}/tutorial/examples/function CACHE PATH "FUNCTION binary directory") - -###################################################################################### - -###################################################################################### -### 2) How to manage copy of benchs ? -###################################################################################### - -IF(ENABLE_CMAKE_EXAMPLE OR CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SET(BENCH_LIST - berlin52.tsp - eil101.tsp - pr2392.tsp - rl5915.tsp - usa13509.tsp - ) - - FOREACH (bench ${BENCH_LIST}) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/examples/tsp/benchs/${bench} - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/${bench} - ) - ENDFOREACH (bench) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/Lesson1/param - ${OLDMO_BIN_DIR}/tutorial/Lesson1/param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/Lesson2/param - ${OLDMO_BIN_DIR}/tutorial/Lesson2/param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/Lesson3/param - ${OLDMO_BIN_DIR}/tutorial/Lesson3/param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/Lesson4/param - ${OLDMO_BIN_DIR}/tutorial/Lesson4/param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/Lesson5/param - ${OLDMO_BIN_DIR}/tutorial/Lesson5/param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/HybridLesson/param - ${OLDMO_BIN_DIR}/tutorial/HybridLesson/param - ) -ENDIF(ENABLE_CMAKE_EXAMPLE OR CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -###################################################################################### -### 3) Where must cmake go now ? -###################################################################################### - -MACRO(ADD_COMMANDS_OLDMO) - ADD_CUSTOM_COMMAND( - OUTPUT - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/examples/tsp/benchs/eil101.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${OLDMO_BIN_DIR}/tutorial/Lesson1/param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/Lesson1/param - ${OLDMO_BIN_DIR}/tutorial/Lesson1 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${OLDMO_BIN_DIR}/tutorial/Lesson2/param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/Lesson2/param - ${OLDMO_BIN_DIR}/tutorial/Lesson2 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${OLDMO_BIN_DIR}/tutorial/Lesson3/param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/Lesson3/param - ${OLDMO_BIN_DIR}/tutorial/Lesson3 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${OLDMO_BIN_DIR}/tutorial/Lesson4/param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/Lesson4/param - ${OLDMO_BIN_DIR}/tutorial/Lesson4 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${OLDMO_BIN_DIR}/tutorial/Lesson5/param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/Lesson5/param - ${OLDMO_BIN_DIR}/tutorial/Lesson5 - ) - ADD_CUSTOM_COMMAND( - OUTPUT ${OLDMO_BIN_DIR}/tutorial/Lesson6/param - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OLDMO_SRC_DIR}/tutorial/HybridLesson/param - ${OLDMO_BIN_DIR}/tutorial/HybridLesson - ) -ENDMACRO(ADD_COMMANDS_OLDMO) - -MACRO(ADD_TARGET_OLDMO n) - IF(${n} STREQUAL "lesson1") - ADD_CUSTOM_TARGET(lesson1 DEPENDS - ${OLDMO_BIN_DIR}/tutorial/Lesson1/param - ${OLDMO_BIN_DIR}/tutorial/Lesson1/hill_climbing - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp - ) - ELSEIF(${n} STREQUAL "lesson2") - ADD_CUSTOM_TARGET(lesson2 DEPENDS - ${OLDMO_BIN_DIR}/tutorial/Lesson2/param - ${OLDMO_BIN_DIR}/tutorial/Lesson2/tabu_search - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp - ) - ELSEIF(${n} STREQUAL "lesson3") - ADD_CUSTOM_TARGET(lesson3 DEPENDS - ${OLDOLDMO_BIN_DIR}/tutorial/Lesson3/param - ${OLDMO_BIN_DIR}/tutorial/Lesson3/simulated_annealing - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp - ) - ELSEIF(${n} STREQUAL "lesson4") - ADD_CUSTOM_TARGET(lesson4 DEPENDS - ${OLDMO_BIN_DIR}/tutorial/Lesson4/param - ${OLDMO_BIN_DIR}/tutorial/Lesson4/iterated_local_search - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp - ) - ELSEIF(${n} STREQUAL "lesson5") - ADD_CUSTOM_TARGET(lesson5 DEPENDS - ${OLDMO_BIN_DIR}/tutorial/Lesson5/param - ${OLDMO_BIN_DIR}/tutorial/Lesson5/variable_neighborhood_search - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp - ) - ELSEIF(${n} STREQUAL "hybridlesson") - ADD_CUSTOM_TARGET(hybridlesson DEPENDS - ${OLDMO_BIN_DIR}/tutorial/HybridLesson/param - ${OLDMO_BIN_DIR}/tutorial/HybridLesson/hybrid_ga - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp - ) - ELSEIF(${n} STREQUAL "install") - ADD_CUSTOM_TARGET(install DEPENDS - ${OLDMO_BIN_DIR}/tutorial/Lesson1/param - ${OLDMO_BIN_DIR}/tutorial/Lesson2/param - ${OLDMO_BIN_DIR}/tutorial/Lesson3/param - ${OLDMO_BIN_DIR}/tutorial/Lesson4/param - ${OLDMO_BIN_DIR}/tutorial/Lesson5/param - ${OLDMO_BIN_DIR}/tutorial/HybridLesson/param - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp - ) - ELSEIF(${n} STREQUAL "benchs") - ADD_CUSTOM_TARGET(benchs DEPENDS - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp - ${OLDMO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp - ) - ENDIF(${n} STREQUAL "lesson1") -ENDMACRO(ADD_TARGET_OLDMO) - -IF(NOT CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" AND NOT CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_OLDMO() - ADD_TARGET_OLDMO(install) - ADD_TARGET_OLDMO(benchs) -ENDIF(NOT CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" AND NOT CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -ADD_SUBDIRECTORY(examples) -ADD_SUBDIRECTORY(Lesson1) -ADD_SUBDIRECTORY(Lesson2) -ADD_SUBDIRECTORY(Lesson3) -ADD_SUBDIRECTORY(Lesson4) -ADD_SUBDIRECTORY(Lesson5) -ADD_SUBDIRECTORY(HybridLesson) diff --git a/trunk/paradiseo-old-mo/tutorial/HybridLesson/CMakeLists.txt b/trunk/paradiseo-old-mo/tutorial/HybridLesson/CMakeLists.txt deleted file mode 100644 index 62ed15d5a..000000000 --- a/trunk/paradiseo-old-mo/tutorial/HybridLesson/CMakeLists.txt +++ /dev/null @@ -1,65 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src/utils) -INCLUDE_DIRECTORIES(${OLDMO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${TSP_SRC_DIR}) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${TSP_BIN_DIR}/lib) - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES hybrid_ga.cpp) - - SOURCE_GROUP(benchs FILES - ${TSP_BIN_DIR}/benchs/berlin52.tsp - ${TSP_BIN_DIR}/benchs/eil101.tsp - ${TSP_BIN_DIR}/benchs/pr2392.tsp - ${TSP_BIN_DIR}/benchs/rl5915.tsp - ${TSP_BIN_DIR}/benchs/usa13509.tsp - ) - - ADD_EXECUTABLE(hybrid_ga - hybrid_ga.cpp - ${OLDMO_BIN_DIR}/tutorial/HybridLesson/param - ${TSP_BIN_DIR}/benchs/berlin52.tsp - ${TSP_BIN_DIR}/benchs/eil101.tsp - ${TSP_BIN_DIR}/benchs/pr2392.tsp - ${TSP_BIN_DIR}/benchs/rl5915.tsp - ${TSP_BIN_DIR}/benchs/usa13509.tsp - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_OLDMO() - ADD_TARGET_OLDMO(lesson6) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(hybrid_ga hybrid_ga.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(hybrid_ga EXCLUDE_FROM_ALL hybrid_ga.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -ADD_DEPENDENCIES(hybrid_ga tsp) - -###################################################################################### -### 4) Optionnal: define your target(s)'s version: no effect for windows -###################################################################################### - -SET(HYBRIDGA_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(hybrid_ga PROPERTIES VERSION "${HYBRIDGA_VERSION}") - -###################################################################################### -### 5) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(hybrid_ga tsp eo eoutils) - -###################################################################################### diff --git a/trunk/paradiseo-old-mo/tutorial/HybridLesson/hybrid_ga.cpp b/trunk/paradiseo-old-mo/tutorial/HybridLesson/hybrid_ga.cpp deleted file mode 100644 index 6c8e464e1..000000000 --- a/trunk/paradiseo-old-mo/tutorial/HybridLesson/hybrid_ga.cpp +++ /dev/null @@ -1,194 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Thomas Legrand -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include -#include -#include - -void manage_configuration_file(eoParser & _parser); - -int -main (int _argc, char* _argv []) -{ - std::string instancePath, crossoverType, selectionType; - unsigned int seed, populationSize, maxIterations, selectedParentNumber; - double crossoverRate, mutationRate, elitismRate, tournamentRate; - - eoParser parser(_argc, _argv); - - manage_configuration_file(parser); - - seed=atoi( (parser.getParamWithLongName("seed")->getValue()).c_str() ); - instancePath=parser.getParamWithLongName("instancePath")->getValue(); - populationSize=atoi( (parser.getParamWithLongName("popSize")->getValue()).c_str() ); - maxIterations=atoi( (parser.getParamWithLongName("maxIter")->getValue()).c_str() ); - crossoverRate=atof( (parser.getParamWithLongName("crossRate")->getValue()).c_str() ); - mutationRate=atof( (parser.getParamWithLongName("mutRate")->getValue()).c_str() ); - selectedParentNumber=atoi( (parser.getParamWithLongName("nbSelPar")->getValue()).c_str() ); - elitismRate=atof( (parser.getParamWithLongName("elitismRate")->getValue()).c_str() ); - tournamentRate=atof( (parser.getParamWithLongName("tournRate")->getValue()).c_str() ); - crossoverType=parser.getParamWithLongName("crossType")->getValue(); - selectionType=parser.getParamWithLongName("selectionType")->getValue(); - - srand (seed); - Graph::load(instancePath.c_str()); - - RouteInit init ; - - RouteEval full_evaluation ; - - eoPop population (populationSize, init) ; - apply (full_evaluation, population) ; - - std :: cout << "[From] " << population.best_element () << std :: endl ; - - eoGenContinue continu (maxIterations) ; - - eoStochTournamentSelect select_one ; - - eoSelectNumber select (select_one, selectedParentNumber) ; - - eoQuadOp *crossover; - - if(crossoverType.compare("Partial")==0) - { - crossover=new PartialMappedXover(); - } - else if (crossoverType.compare("Order")==0) - { - crossover=new OrderXover(); - } - else if (crossoverType.compare("Edge")==0) - { - crossover=new EdgeXover(); - } - else - { - throw std::runtime_error("[tsp.cpp]: the crossover type '"+crossoverType+"' is not correct."); - } - - TwoOptInit two_opt_initializer; - - TwoOptNext two_opt_next_move_generator; - - TwoOptIncrEval two_opt_incremental_evaluation; - - moMoveSelect* two_opt_selection; - - if(selectionType.compare("Best")==0) - { - two_opt_selection= new moBestImprSelect(); - } - else if (selectionType.compare("First")==0) - { - two_opt_selection= new moFirstImprSelect(); - } - else if (selectionType.compare("Random")==0) - { - two_opt_selection= new moRandImprSelect(); - } - else - { - throw std::runtime_error("[hill_climbing.cpp]: the type of selection '"+selectionType+"' is not correct."); - } - - moHC hill_climbing_mutation (two_opt_initializer, two_opt_next_move_generator, two_opt_incremental_evaluation, - *two_opt_selection, full_evaluation); - - eoSGATransform transform (*crossover, crossoverRate, hill_climbing_mutation, mutationRate) ; - - eoElitism merge (elitismRate) ; - - eoStochTournamentTruncate reduce (tournamentRate) ; - - eoEasyEA ea (continu, full_evaluation, select, transform, merge, reduce) ; - - ea (population) ; - - std :: cout << "[To] " << population.best_element () << std :: endl ; - - delete(crossover); - delete(two_opt_selection); - - return EXIT_SUCCESS; -} - -void -manage_configuration_file(eoParser & _parser) -{ - std::ofstream os; - - _parser.createParam(std::string("../examples/tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.", - 0, "Configuration", false); - - _parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false); - - _parser.getORcreateParam((unsigned int)100, "popSize", "Size of the population.", 0, "Configuration", false); - - _parser.getORcreateParam((unsigned int)1000, "maxIter", "Maximum number of iterations.", 0, "Configuration", false); - - _parser.getORcreateParam((double)1.0, "crossRate", "Probability of crossover.", 0, "Configuration", false); - - _parser.getORcreateParam((double)0.01, "mutRate", "Probability of mutation.", 0, "Configuration", false); - - _parser.getORcreateParam((unsigned int)100, "nbSelPar", "Number of selected parents.", 0, "Configuration", false); - - _parser.getORcreateParam((double)1.0, "elitismRate", "Percentage of the best individuals kept.", 0, "Configuration", false); - - _parser.getORcreateParam((double)0.7, "tournRate", "Percentage of the individuals used during the tournament.", - 0, "Configuration", false); - - _parser.getORcreateParam(std::string("Partial"), "crossType", "Crossover to use, it can be 'Partial', 'Order' or 'Edge'.", - 0, "Configuration", false); - - - _parser.getORcreateParam(std::string("Best"), "selectionType", "Type of the selection: 'Best', 'First' or 'Random'.", - 0, "Configuration", false); - - if (_parser.userNeedsHelp()) - { - _parser.printHelp(std::cout); - exit(EXIT_FAILURE); - } - - os.open("current_param"); - if(!os.is_open()) - { - throw std::runtime_error("[tsp.cpp]: the file current_param cannot be created."); - } - os <<_parser; - os.close(); -} diff --git a/trunk/paradiseo-old-mo/tutorial/HybridLesson/param b/trunk/paradiseo-old-mo/tutorial/HybridLesson/param deleted file mode 100644 index f0a3f9217..000000000 --- a/trunk/paradiseo-old-mo/tutorial/HybridLesson/param +++ /dev/null @@ -1,17 +0,0 @@ - -###### General ###### -# --help=0 # -h : Prints this message -# --stopOnUnknownParam=1 # Stop if unkown param entered - -###### Configuration ###### -# --instancePath=../examples/tsp/benchs/berlin52.tsp # Path to the instance. -# --seed=1224599328 # Seed for rand. -# --popSize=100 # Size of the population. -# --maxIter=1000 # Maximum number of iterations. -# --crossRate=1 # Probability of crossover. -# --mutRate=0.01 # Probability of mutation. -# --nbSelPar=100 # Number of selected parents. -# --elitismRate=1 # Percentage of the best individuals kept. -# --tournRate=0.7 # Percentage of the individuals used during the tournament. -# --crossType=Partial # Crossover to use, it can be 'Partial', 'Order' or 'Edge'. -# --selectionType=Best # Type of the selection: 'Best', 'First' or 'Random'. diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson1/CMakeLists.txt b/trunk/paradiseo-old-mo/tutorial/Lesson1/CMakeLists.txt deleted file mode 100644 index 8b0f54c04..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson1/CMakeLists.txt +++ /dev/null @@ -1,67 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src/utils) -INCLUDE_DIRECTORIES(${OLDMO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${TSP_SRC_DIR}) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${TSP_BIN_DIR}/lib) - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES hill_climbing.cpp) - - SOURCE_GROUP(benchs FILES - ${TSP_BIN_DIR}/benchs/berlin52.tsp - ${TSP_BIN_DIR}/benchs/eil101.tsp - ${TSP_BIN_DIR}/benchs/pr2392.tsp - ${TSP_BIN_DIR}/benchs/rl5915.tsp - ${TSP_BIN_DIR}/benchs/usa13509.tsp - ) - - ADD_EXECUTABLE(hill_climbing - hill_climbing.cpp - ${OLDMO_BIN_DIR}/tutorial/Lesson1/param - ${TSP_BIN_DIR}/benchs/berlin52.tsp - ${TSP_BIN_DIR}/benchs/eil101.tsp - ${TSP_BIN_DIR}/benchs/pr2392.tsp - ${TSP_BIN_DIR}/benchs/rl5915.tsp - ${TSP_BIN_DIR}/benchs/usa13509.tsp - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_OLDMO() - ADD_TARGET_OLDMO(lesson1) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(hill_climbing hill_climbing.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(hill_climbing EXCLUDE_FROM_ALL hill_climbing.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - - -ADD_DEPENDENCIES(hill_climbing tsp) - -###################################################################################### -### 4) Optionnal: define your target(s)'s version: no effect for windows -###################################################################################### - -SET(HILLCLIMBING_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(hill_climbing PROPERTIES VERSION "${HILLCLIMBING_VERSION}") - -###################################################################################### -### 5) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(hill_climbing tsp eo eoutils) - -###################################################################################### - diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson1/hill_climbing.cpp b/trunk/paradiseo-old-mo/tutorial/Lesson1/hill_climbing.cpp deleted file mode 100644 index 9727c891c..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson1/hill_climbing.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#include -#include -#include - -void manage_configuration_file(eoParser & _parser); - -int -main (int _argc, char* _argv []) -{ - std::string instancePath, selectionType; - unsigned int seed; - - eoParser parser(_argc, _argv); - - manage_configuration_file(parser); - - seed=atoi( (parser.getParamWithLongName("seed")->getValue()).c_str() ); - instancePath=parser.getParamWithLongName("instancePath")->getValue(); - selectionType=parser.getParamWithLongName("selectionType")->getValue(); - - srand (seed); - Graph::load(instancePath.c_str()); - - Route solution; - - RouteInit initializer; - initializer (solution); - - RouteEval full_evaluation; - full_evaluation (solution); - - std :: cout << "[From] " << solution << std :: endl; - - /* Tools for an efficient (? :-)) - local search ! */ - - TwoOptInit two_opt_initializer; - - TwoOptNext two_opt_next_move_generator; - - TwoOptIncrEval two_opt_incremental_evaluation; - - moMoveSelect* two_opt_selection; - - if(selectionType.compare("Best")==0) - { - two_opt_selection= new moBestImprSelect(); - } - else if (selectionType.compare("First")==0) - { - two_opt_selection= new moFirstImprSelect(); - } - else if (selectionType.compare("Random")==0) - { - two_opt_selection= new moRandImprSelect(); - } - else - { - throw std::runtime_error("[hill_climbing.cpp]: the type of selection '"+selectionType+"' is not correct."); - } - - moHC hill_climbing (two_opt_initializer, two_opt_next_move_generator, two_opt_incremental_evaluation, - *two_opt_selection, full_evaluation); - hill_climbing (solution) ; - - std :: cout << "[To] " << solution << std :: endl; - - delete(two_opt_selection); - - return EXIT_SUCCESS; -} - -void -manage_configuration_file(eoParser & _parser) -{ - std::ofstream os; - - _parser.createParam(std::string("../examples/tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.", - 0, "Configuration", false); - - _parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false); - - _parser.getORcreateParam(std::string("Best"), "selectionType", "Type of the selection: 'Best', 'First' or 'Random'.", - 0, "Configuration", false); - - if (_parser.userNeedsHelp()) - { - _parser.printHelp(std::cout); - exit(EXIT_FAILURE); - } - - os.open("current_param"); - if(!os.is_open()) - { - throw std::runtime_error("[hill_climbing.cpp]: the file current_param cannot be created."); - } - os <<_parser; - os.close(); -} diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson1/param b/trunk/paradiseo-old-mo/tutorial/Lesson1/param deleted file mode 100644 index 8bdb97f37..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson1/param +++ /dev/null @@ -1,9 +0,0 @@ - -###### General ###### -# --help=0 # -h : Prints this message -# --stopOnUnknownParam=1 # Stop if unkown param entered - -###### Configuration ###### -# --instancePath=../examples/tsp/benchs/berlin52.tsp # Path to the instance. -# --seed=1203517190 # Seed for rand. -# --selectionType=Best # Type of the selection: 'Best', 'First' or 'Random'. diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson2/CMakeLists.txt b/trunk/paradiseo-old-mo/tutorial/Lesson2/CMakeLists.txt deleted file mode 100644 index 288bbda32..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson2/CMakeLists.txt +++ /dev/null @@ -1,66 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src/utils) -INCLUDE_DIRECTORIES(${OLDMO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${TSP_SRC_DIR}) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${TSP_BIN_DIR}/lib) - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES tabu_search.cpp) - - SOURCE_GROUP(benchs FILES - ${TSP_BIN_DIR}/benchs/berlin52.tsp - ${TSP_BIN_DIR}/benchs/eil101.tsp - ${TSP_BIN_DIR}/benchs/pr2392.tsp - ${TSP_BIN_DIR}/benchs/rl5915.tsp - ${TSP_BIN_DIR}/benchs/usa13509.tsp - ) - - ADD_EXECUTABLE(tabu_search - tabu_search.cpp - ${OLDMO_BIN_DIR}/tutorial/Lesson2/param - ${TSP_BIN_DIR}/benchs/berlin52.tsp - ${TSP_BIN_DIR}/benchs/eil101.tsp - ${TSP_BIN_DIR}/benchs/pr2392.tsp - ${TSP_BIN_DIR}/benchs/rl5915.tsp - ${TSP_BIN_DIR}/benchs/usa13509.tsp - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_OLDMO() - ADD_TARGET_OLDMO(lesson2) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(tabu_search tabu_search.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(tabu_search EXCLUDE_FROM_ALL tabu_search.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -ADD_DEPENDENCIES(tabu_search tsp) - -###################################################################################### -### 4) Optionnal: define your target(s)'s version: no effect for windows -###################################################################################### - -SET(TABUSEARCH_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(tabu_search PROPERTIES VERSION "${TABUSEARCH_VERSION}") - -###################################################################################### -### 5) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(tabu_search tsp eo eoutils) - -###################################################################################### - diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson2/param b/trunk/paradiseo-old-mo/tutorial/Lesson2/param deleted file mode 100644 index 53d46bed9..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson2/param +++ /dev/null @@ -1,11 +0,0 @@ - -###### General ###### -# --help=0 # -h : Prints this message -# --stopOnUnknownParam=1 # Stop if unkown param entered - -###### Configuration ###### -# --instancePath=../examples/tsp/benchs/berlin52.tsp # Path to the instance -# --seed=1202917905 # Seed for rand -# --tabuListSize=10 # Size of the tabu list -# --maxIter=1000 # Maximum number of iterations -# --tabuListType=TwoOpt # Type of the tabu list: 'TwoOpt', 'SimpleMove' or 'SimpleSolution' diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson2/tabu_search.cpp b/trunk/paradiseo-old-mo/tutorial/Lesson2/tabu_search.cpp deleted file mode 100644 index 579d66f10..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson2/tabu_search.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr - -*/ - -#include -#include -#include - -void manage_configuration_file(eoParser & _parser); - -int -main (int _argc, char* _argv []) -{ - std::string instancePath, value; - unsigned int seed, maxIterations, tabuListSize; - - eoParser parser(_argc, _argv); - - manage_configuration_file(parser); - - seed=atoi( (parser.getParamWithLongName("seed")->getValue()).c_str() ); - maxIterations=atoi( (parser.getParamWithLongName("maxIter")->getValue()).c_str() ); - tabuListSize=atoi( (parser.getParamWithLongName("tabuListSize")->getValue()).c_str() ); - instancePath=parser.getParamWithLongName("instancePath")->getValue(); - value=parser.getParamWithLongName("tabuListType")->getValue(); - - srand (seed); - Graph::load(instancePath.c_str()); - - Route solution; - - RouteInit initializer; - initializer(solution); - - RouteEval full_evaluation; - full_evaluation(solution); - - std :: cout << "[From] " << solution << std :: endl; - - /* Tools for an efficient (? :-)) - local search ! */ - - TwoOptInit two_opt_initializer; - - TwoOptNext two_opt_next_move_generator; - - TwoOptIncrEval two_opt_incremental_evaluation; - - moTabuList *tabuList; - - if(value.compare("TwoOpt")==0) - { - tabuList=new TwoOptTabuList(); - } - else if (value.compare("SimpleMove")==0) - { - tabuList=new moSimpleMoveTabuList(tabuListSize); - } - else if (value.compare("SimpleSolution")==0) - { - tabuList=new moSimpleSolutionTabuList(tabuListSize); - } - else - { - throw std::runtime_error("[tabu_search.cpp]: the type of tabu list '"+value+"' is not correct."); - } - - moNoAspirCrit aspiration_criterion; - - moGenSolContinue continu (maxIterations); - - moTS tabu_search (two_opt_initializer, two_opt_next_move_generator, - two_opt_incremental_evaluation, *tabuList, aspiration_criterion, continu, full_evaluation); - tabu_search(solution); - - std :: cout << "[To] " << solution << std :: endl; - - delete(tabuList); - - return EXIT_SUCCESS; -} - -void -manage_configuration_file(eoParser & _parser) -{ - std::ofstream os; - - _parser.createParam(std::string("../examples/tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.", - 0, "Configuration", false); - - _parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false); - - _parser.getORcreateParam((unsigned int)10, "tabuListSize", "Size of the tabu list.", 0, "Configuration", false); - - _parser.getORcreateParam((unsigned int)1000, "maxIter", "Maximum number of iterations.", 0, "Configuration", false); - - _parser.getORcreateParam(std::string("TwoOpt"), "tabuListType", "Type of the tabu list: 'TwoOpt', 'SimpleMove' or 'SimpleSolution'.", - 0, "Configuration", false); - - if (_parser.userNeedsHelp()) - { - _parser.printHelp(std::cout); - exit(EXIT_FAILURE); - } - - os.open("current_param"); - if(!os.is_open()) - { - throw std::runtime_error("[tabu_search.cpp]: the file current_param cannot be created."); - } - os <<_parser; - os.close(); -} diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson3/CMakeLists.txt b/trunk/paradiseo-old-mo/tutorial/Lesson3/CMakeLists.txt deleted file mode 100644 index 63320d077..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson3/CMakeLists.txt +++ /dev/null @@ -1,66 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src/utils) -INCLUDE_DIRECTORIES(${OLDMO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${TSP_SRC_DIR}) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${TSP_BIN_DIR}/lib) - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES simulated_annealing.cpp) - - SOURCE_GROUP(benchs FILES - ${TSP_BIN_DIR}/benchs/berlin52.tsp - ${TSP_BIN_DIR}/benchs/eil101.tsp - ${TSP_BIN_DIR}/benchs/pr2392.tsp - ${TSP_BIN_DIR}/benchs/rl5915.tsp - ${TSP_BIN_DIR}/benchs/usa13509.tsp - ) - - ADD_EXECUTABLE(simulated_annealing - simulated_annealing.cpp - ${OLDMO_BIN_DIR}/tutorial/Lesson3/param - ${TSP_BIN_DIR}/benchs/berlin52.tsp - ${TSP_BIN_DIR}/benchs/eil101.tsp - ${TSP_BIN_DIR}/benchs/pr2392.tsp - ${TSP_BIN_DIR}/benchs/rl5915.tsp - ${TSP_BIN_DIR}/benchs/usa13509.tsp - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_OLDMO() - ADD_TARGET_OLDMO(lesson3) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(simulated_annealing simulated_annealing.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(simulated_annealing EXCLUDE_FROM_ALL simulated_annealing.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -ADD_DEPENDENCIES(simulated_annealing tsp) - -###################################################################################### -### 4) Optionnal: define your target(s)'s version: no effect for windows -###################################################################################### - -SET(SIMULATEDANNEALING_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(simulated_annealing PROPERTIES VERSION "${SIMULATEDANNEALING_VERSION}") - -###################################################################################### -### 5) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(simulated_annealing tsp eo eoutils) - -###################################################################################### - diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson3/param b/trunk/paradiseo-old-mo/tutorial/Lesson3/param deleted file mode 100644 index d80626b17..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson3/param +++ /dev/null @@ -1,14 +0,0 @@ - -###### General ###### -# --help=0 # -h : Prints this message -# --stopOnUnknownParam=1 # Stop if unkown param entered - -###### Configuration ###### -# --instancePath=../examples/tsp/benchs/berlin52.tsp # Path to the instance. -# --seed=1202919978 # Seed for rand. -# --maxIter=1000 # Maximum number of iterations. -# --initialTemp=1000 # Initial temperature. -# --threshold=0.1 # Minimum temperature allowed. -# --expoRatio=0.98 # Ratio used if exponential cooling schedule is chosen. -# --lineaRatio=0.5 # Ratio used if linear cooling schedule is chosen. -# --coolSchedType=Expo # Type the cooling schedule: 'Expo' or 'Linear'. diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson3/simulated_annealing.cpp b/trunk/paradiseo-old-mo/tutorial/Lesson3/simulated_annealing.cpp deleted file mode 100644 index 13f149013..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson3/simulated_annealing.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#include -#include -#include - -void manage_configuration_file(eoParser & _parser); - -int -main (int _argc, char* _argv []) -{ - std::string instancePath, value; - unsigned int seed, maxIterations; - double threshold, geometricRatio, linearRatio, initialTemperature; - - eoParser parser(_argc, _argv); - - manage_configuration_file(parser); - - seed=atoi( (parser.getParamWithLongName("seed")->getValue()).c_str() ); - instancePath=parser.getParamWithLongName("instancePath")->getValue(); - maxIterations=atoi( (parser.getParamWithLongName("maxIter")->getValue()).c_str() ); - initialTemperature=atof( (parser.getParamWithLongName("initialTemp")->getValue()).c_str() ); - threshold=atof( (parser.getParamWithLongName("threshold")->getValue()).c_str() ); - geometricRatio=atof( (parser.getParamWithLongName("geometricRatio")->getValue()).c_str() ); - linearRatio=atof( (parser.getParamWithLongName("lineaRatio")->getValue()).c_str() ); - value=parser.getParamWithLongName("coolSchedType")->getValue(); - - srand (seed); - Graph::load(instancePath.c_str()); - - Route solution; - - RouteInit initializer; - initializer (solution); - - RouteEval full_evaluation; - full_evaluation (solution); - - std :: cout << "[From] " << solution << std :: endl; - - /* Tools for an efficient (? :-)) - local search ! */ - - TwoOptRand two_opt_random_move_generator; - - TwoOptIncrEval two_opt_incremental_evaluation; - - TwoOpt move; - - moCoolingSchedule* coolingSchedule; - - if(value.compare("Geometric")==0) - { - coolingSchedule=new moGeometricCoolingSchedule(threshold, geometricRatio); - } - else if (value.compare("Linear")==0) - { - coolingSchedule=new moLinearCoolingSchedule(threshold, linearRatio); - } - else - { - throw std::runtime_error("[simulated_annealing.cpp]: the type of cooling schedule '"+value+"' is not correct."); - } - - moGenSolContinue continu (maxIterations); - - moSA simulated_annealing (two_opt_random_move_generator, two_opt_incremental_evaluation, - continu, initialTemperature, *coolingSchedule, full_evaluation); - simulated_annealing (solution); - - std :: cout << "[To] " << solution << std :: endl; - - delete(coolingSchedule); - - return EXIT_SUCCESS ; -} - -void -manage_configuration_file(eoParser & _parser) -{ - std::ofstream os; - - _parser.createParam(std::string("../examples/tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.", - 0, "Configuration", false); - - _parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false); - - _parser.getORcreateParam((unsigned int)1000, "maxIter", "Maximum number of iterations.", 0, "Configuration", false); - - _parser.getORcreateParam((double)1000, "initialTemp", "Initial temperature.", 0, "Configuration", false); - - _parser.getORcreateParam((double)0.1, "threshold", "Minimum temperature allowed.", 0, "Configuration", false); - - _parser.getORcreateParam((double)0.98, "geometricRatio", "Ratio used if exponential cooling schedule is chosen.", 0, "Configuration", false); - - _parser.getORcreateParam((double)0.5, "lineaRatio", "Ratio used if linear cooling schedule is chosen.", 0, "Configuration", false); - - _parser.getORcreateParam(std::string("Geometric"), "coolSchedType", "Type the cooling schedule: 'Geometric' or 'Linear'.", - 0, "Configuration", false); - - if (_parser.userNeedsHelp()) - { - _parser.printHelp(std::cout); - exit(EXIT_FAILURE); - } - - os.open("current_param"); - if(!os.is_open()) - { - throw std::runtime_error("[simulated_annealing.cpp]: the file current_param cannot be created."); - } - os <<_parser; - os.close(); -} diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson4/CMakeLists.txt b/trunk/paradiseo-old-mo/tutorial/Lesson4/CMakeLists.txt deleted file mode 100644 index 6acc58a4d..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson4/CMakeLists.txt +++ /dev/null @@ -1,65 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src/utils) -INCLUDE_DIRECTORIES(${OLDMO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${TSP_SRC_DIR}) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${TSP_BIN_DIR}/lib) - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES iterated_local_search.cpp) - - SOURCE_GROUP(benchs FILES - ${TSP_BIN_DIR}/benchs/berlin52.tsp - ${TSP_BIN_DIR}/benchs/eil101.tsp - ${TSP_BIN_DIR}/benchs/pr2392.tsp - ${TSP_BIN_DIR}/benchs/rl5915.tsp - ${TSP_BIN_DIR}/benchs/usa13509.tsp - ) - - ADD_EXECUTABLE(iterated_local_search - iterated_local_search.cpp - ${OLDMO_BIN_DIR}/tutorial/Lesson4/param - ${TSP_BIN_DIR}/benchs/berlin52.tsp - ${TSP_BIN_DIR}/benchs/eil101.tsp - ${TSP_BIN_DIR}/benchs/pr2392.tsp - ${TSP_BIN_DIR}/benchs/rl5915.tsp - ${TSP_BIN_DIR}/benchs/usa13509.tsp - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_OLDMO() - ADD_TARGET_OLDMO(lesson4) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(iterated_local_search iterated_local_search.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(iterated_local_search EXCLUDE_FROM_ALL iterated_local_search.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -ADD_DEPENDENCIES(iterated_local_search tsp) - -###################################################################################### -### 4) Optionnal: define your target(s)'s version: no effect for windows -###################################################################################### - -SET(ITERATEDLOCALSEARCH_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(iterated_local_search PROPERTIES VERSION "${ITERATEDLOCALSEARCH_VERSION}") - -###################################################################################### -### 5) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(iterated_local_search tsp eo eoutils) - -###################################################################################### diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson4/iterated_local_search.cpp b/trunk/paradiseo-old-mo/tutorial/Lesson4/iterated_local_search.cpp deleted file mode 100644 index b3293c610..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson4/iterated_local_search.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#include -#include -#include - -void manage_configuration_file(eoParser & _parser); - -int -main (int _argc, char* _argv []) -{ - std::string instancePath; - unsigned int seed, maxIterations; - - eoParser parser(_argc, _argv); - - manage_configuration_file(parser); - - seed=atoi( (parser.getParamWithLongName("seed")->getValue()).c_str() ); - instancePath=parser.getParamWithLongName("instancePath")->getValue(); - maxIterations=atoi( (parser.getParamWithLongName("maxIter")->getValue()).c_str() ); - - srand(seed); - Graph::load (instancePath.c_str()); - - Route solution; - - RouteInit initializer; - initializer (solution); - - RouteEval full_evaluation; - full_evaluation (solution); - - std :: cout << "[From] " << solution << std :: endl; - - TwoOptInit two_opt_initializer; - - TwoOptNext two_opt_next_move_generator; - - TwoOptIncrEval two_opt_incremental_evaluation; - - moBestImprSelect two_opt_selection; - - moGenSolContinue continu(maxIterations); - - moFitComparator comparator; - - CitySwap perturbation; - - moILS iterated_local_search (two_opt_initializer, two_opt_next_move_generator, two_opt_incremental_evaluation, - two_opt_selection, continu, comparator, perturbation, full_evaluation) ; - iterated_local_search(solution); - - std :: cout << "[To] " << solution << std :: endl; - - return EXIT_SUCCESS; -} - -void -manage_configuration_file(eoParser & _parser) -{ - std::ofstream os; - - _parser.createParam(std::string("../examples/tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.", - 0, "Configuration", false); - - _parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false); - - _parser.getORcreateParam((unsigned int)1000, "maxIter", "Maximum number of iterations.", 0, "Configuration", false); - - if (_parser.userNeedsHelp()) - { - _parser.printHelp(std::cout); - exit(EXIT_FAILURE); - } - - os.open("current_param"); - if(!os.is_open()) - { - throw std::runtime_error("[iterated_local_search.cpp]: the file current_param cannot be created."); - } - os <<_parser; - os.close(); -} diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson4/param b/trunk/paradiseo-old-mo/tutorial/Lesson4/param deleted file mode 100644 index 91a5284c8..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson4/param +++ /dev/null @@ -1,9 +0,0 @@ - -###### General ###### -# --help=0 # -h : Prints this message -# --stopOnUnknownParam=1 # Stop if unkown param entered - -###### Configuration ###### -# --instancePath=../examples/tsp/benchs/berlin52.tsp # Path to the instance. -# --seed=1203080388 # Seed for rand. -# --maxIter=1000 # Maximum number of iterations. diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson5/CMakeLists.txt b/trunk/paradiseo-old-mo/tutorial/Lesson5/CMakeLists.txt deleted file mode 100644 index a4a2f6532..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson5/CMakeLists.txt +++ /dev/null @@ -1,65 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src/utils) -INCLUDE_DIRECTORIES(${OLDMO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${TSP_SRC_DIR}) - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${TSP_BIN_DIR}/lib) - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - SOURCE_GROUP(src FILES variable_neighborhood_search.cpp) - - SOURCE_GROUP(benchs FILES - ${TSP_BIN_DIR}/benchs/berlin52.tsp - ${TSP_BIN_DIR}/benchs/eil101.tsp - ${TSP_BIN_DIR}/benchs/pr2392.tsp - ${TSP_BIN_DIR}/benchs/rl5915.tsp - ${TSP_BIN_DIR}/benchs/usa13509.tsp - ) - - ADD_EXECUTABLE(variable_neighborhood_search - variable_neighborhood_search.cpp - ${OLDMO_BIN_DIR}/tutorial/Lesson5/param - ${TSP_BIN_DIR}/benchs/berlin52.tsp - ${TSP_BIN_DIR}/benchs/eil101.tsp - ${TSP_BIN_DIR}/benchs/pr2392.tsp - ${TSP_BIN_DIR}/benchs/rl5915.tsp - ${TSP_BIN_DIR}/benchs/usa13509.tsp - ) -ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - ADD_COMMANDS_OLDMO() - ADD_TARGET_OLDMO(lesson5) - IF(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(variable_neighborhood_search variable_neighborhood_search.cpp) - ELSE(ENABLE_CMAKE_EXAMPLE) - ADD_EXECUTABLE(variable_neighborhood_search EXCLUDE_FROM_ALL variable_neighborhood_search.cpp) - ENDIF(ENABLE_CMAKE_EXAMPLE) -ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" OR CMAKE_GENERATOR STREQUAL "Visual Studio 10") - -ADD_DEPENDENCIES(variable_neighborhood_search tsp) - -###################################################################################### -### 4) Optionnal: define your target(s)'s version: no effect for windows -###################################################################################### - -SET(ITERATEDLOCALSEARCH_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(variable_neighborhood_search PROPERTIES VERSION "${ITERATEDLOCALSEARCH_VERSION}") - -###################################################################################### -### 5) Link the librairies for your target(s) -###################################################################################### - -TARGET_LINK_LIBRARIES(variable_neighborhood_search tsp eo eoutils) - -###################################################################################### diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson5/param b/trunk/paradiseo-old-mo/tutorial/Lesson5/param deleted file mode 100644 index d81cd02b9..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson5/param +++ /dev/null @@ -1,8 +0,0 @@ -###### General ###### -# --help=0 # -h : Prints this message -# --stopOnUnknownParam=1 # Stop if unkown param entered - -###### Configuration ###### -# --instancePath=../examples/tsp/benchs/berlin52.tsp # Path to the instance. -# --seed=1231949999 # Seed for rand. -# --selectionType=Best # Type of the selection: 'Best', 'First' or 'Random'. diff --git a/trunk/paradiseo-old-mo/tutorial/Lesson5/variable_neighborhood_search.cpp b/trunk/paradiseo-old-mo/tutorial/Lesson5/variable_neighborhood_search.cpp deleted file mode 100644 index 561a23725..000000000 --- a/trunk/paradiseo-old-mo/tutorial/Lesson5/variable_neighborhood_search.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Salma Mesmoudi (salma.mesmoudi@inria.fr), Jean-Charles Boisson - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#include -#include -#include -#include - - -//template void add(T& var, P& vect); -void manage_configuration_file(eoParser & _parser); -//void ajouter (std::vector > >& V, moMove& K)const ; - -int -main (int _argc, char* _argv []) -{ - std::string instancePath, selectionType; - unsigned int seed; - - eoParser parser(_argc, _argv); - - manage_configuration_file(parser); - - seed=atoi( (parser.getParamWithLongName("seed")->getValue()).c_str() ); - instancePath=parser.getParamWithLongName("instancePath")->getValue(); - selectionType=parser.getParamWithLongName("selectionType")->getValue(); - - srand (seed); - Graph::load(instancePath.c_str()); - - Route solution; - - RouteInit initializer; - initializer (solution); - - RouteEval full_evaluation; - full_evaluation (solution); - - std :: cout << "[From] " << solution << std :: endl; - //A neighbor is a local search or mutation - - /*Tools for an efficient (? :-)) - local search ! */ - //---------------------first neighbor---------------------------------- - - TwoOptInit two_opt_initializer; - - TwoOptNext two_opt_next_move_generator; - - TwoOptIncrEval two_opt_incremental_evaluation; - - moMoveSelect* two_opt_selection; - - if(selectionType.compare("Best")==0) - { - two_opt_selection= new moBestImprSelect(); - } - else if (selectionType.compare("First")==0) - { - two_opt_selection= new moFirstImprSelect(); - } - else if (selectionType.compare("Random")==0) - { - two_opt_selection= new moRandImprSelect(); - } - else - { - throw std::runtime_error("[hill_climbing.cpp]: the type of selection '"+selectionType+"' is not correct."); - } - - - moHC hill_climbing (two_opt_initializer, two_opt_next_move_generator, two_opt_incremental_evaluation, - *two_opt_selection, full_evaluation); - - - //--------------------second neighbor----------------- - - CitySwap perturbation; - - //-----------neighbor vector-------------------------- - - moExpl explorer(perturbation); - explorer.addExplorer(hill_climbing); - explorer.addExplorer(perturbation); - - //------------VNS application-------------------------- - - moVNS vns(explorer, full_evaluation); - vns(solution); - //hill_climbing(solution); - std :: cout << "[To] " << solution << std :: endl; - - delete(two_opt_selection); - - return EXIT_SUCCESS; -} - - -void -manage_configuration_file(eoParser & _parser) -{ - std::ofstream os; - - _parser.createParam(std::string("../examples/tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.", - 0, "Configuration", false); - - _parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false); - - _parser.getORcreateParam(std::string("Best"), "selectionType", "Type of the selection: 'Best', 'First' or 'Random'.", - 0, "Configuration", false); - - if (_parser.userNeedsHelp()) - { - _parser.printHelp(std::cout); - exit(EXIT_FAILURE); - } - - os.open("current_param"); - if(!os.is_open()) - { - throw std::runtime_error("[hill_climbing.cpp]: the file current_param cannot be created."); - } - os <<_parser; - os.close(); -} - - - diff --git a/trunk/paradiseo-old-mo/tutorial/OldLesson/minimize_function.cpp b/trunk/paradiseo-old-mo/tutorial/OldLesson/minimize_function.cpp deleted file mode 100644 index ca73c5ab2..000000000 --- a/trunk/paradiseo-old-mo/tutorial/OldLesson/minimize_function.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#include -#include -#include - -void manage_configuration_file(eoParser & _parser); - -int -main (int _argc, char* _argv []) -{ - std::string selectionType; - double initialBound, searchBound, searchStep; - eoParser parser(_argc, _argv); - - manage_configuration_file(parser); - - initialBound=atof( (parser.getParamWithLongName("initialBound")->getValue()).c_str() ); - searchBound=atof( (parser.getParamWithLongName("searchBound")->getValue()).c_str() ); - searchStep=atof( (parser.getParamWithLongName("searchStep")->getValue()).c_str() ); - selectionType=parser.getParamWithLongName("selectionType")->getValue(); - - Affectation solution; - - AffectationInit initialize(initialBound); - initialize (solution); - - AffectationEval evaluation; - evaluation (solution); - - std::cout << "Initial affectation : " << std::endl; - std::cout << "\t x1 = " << solution.first << std::endl; - std::cout << "\t x2 = " << solution.second << std::endl; - std::cout << "\t f(x1,x2) = " << solution.fitness() << std::endl; - - DeviationInit deviation_initializer(searchBound); - - DeviationNext deviation_next_move_generator(searchBound, searchStep); - - DeviationIncrEval deviation_incremental_evaluation; - - moMoveSelect* deviation_selection; - - if(selectionType.compare("Best")==0) - { - deviation_selection= new moBestImprSelect(); - } - else if (selectionType.compare("First")==0) - { - deviation_selection= new moFirstImprSelect(); - } - else if (selectionType.compare("Random")==0) - { - deviation_selection= new moRandImprSelect(); - } - else - { - throw std::runtime_error("[minimize_function.cpp]: the type of selection '"+selectionType+"' is not correct."); - } - - moHC hill_climbing (deviation_initializer, deviation_next_move_generator, deviation_incremental_evaluation, - *deviation_selection, evaluation); - hill_climbing (solution) ; - - std::cout << "Final affectation : " << std::endl; - std::cout << "\t x1 = " << solution.first << std::endl; - std::cout << "\t x2 = " << solution.second << std::endl; - std::cout << "\t f(x1,x2) = " << solution.fitness() << std::endl; - - delete(deviation_selection); - - return EXIT_SUCCESS; -} - -void -manage_configuration_file(eoParser & _parser) -{ - std::ofstream os; - - _parser.createParam((double)1, "initialBound", "Bound for the initial affectation.", 0, "Configuration", false); - - _parser.createParam((double)1, "searchBound", "Bound for neighbourhood exploration.", 0, "Configuration", false); - - _parser.createParam((double)1, "searchStep", "Step between two values during the neighbourhood exploration.", - 0, "Configuration", false); - - _parser.createParam(std::string("First"), "selectionType", "Type of the selection: 'Best', 'First' or 'Random'.", - 0, "Configuration", false); - - if (_parser.userNeedsHelp()) - { - _parser.printHelp(std::cout); - exit(EXIT_FAILURE); - } - - os.open("current_param"); - if(!os.is_open()) - { - throw std::runtime_error("[minimize_function.cpp]: the file current_param cannot be created."); - } - os <<_parser; - os.close(); -} diff --git a/trunk/paradiseo-old-mo/tutorial/OldLesson/param b/trunk/paradiseo-old-mo/tutorial/OldLesson/param deleted file mode 100644 index 726b2e29f..000000000 --- a/trunk/paradiseo-old-mo/tutorial/OldLesson/param +++ /dev/null @@ -1,10 +0,0 @@ - -###### General ###### -# --help=0 # -h : Prints this message -# --stopOnUnknownParam=1 # Stop if unkown param entered - -###### Configuration ###### -# --initialBound=1 # Bound for the initial affectation. -# --searchBound=1 # Bound for neighbourhood exploration. -# --searchStep=1 # Step between two values during the neighbourhood exploration. -# --selectionType=First # Type of the selection: 'Best', 'First' or 'Random'. diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/CMakeLists.txt b/trunk/paradiseo-old-mo/tutorial/examples/function/CMakeLists.txt deleted file mode 100644 index ba209c1aa..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -###################################################################################### -### 0) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${OLDMO_SRC_DIR}/src) - -###################################################################################### - - -###################################################################################### -### 1) Define your target(s): just the tsp here -###################################################################################### - -SET(FUNCTION_LIB_OUTPUT_PATH ${FUNCTION_BIN_DIR}/lib) -SET(LIBRARY_OUTPUT_PATH ${FUNCTION_LIB_OUTPUT_PATH}) - -SET (FUNCTION_SOURCES affectation_eval.cpp - affectation_init.cpp - deviation.cpp - deviation_init.cpp - deviation_next.cpp - deviation_incr_eval.cpp ) - -ADD_LIBRARY(function STATIC ${FUNCTION_SOURCES}) - -###################################################################################### - - -###################################################################################### -### 2) Optionnal: define your target(s)'s version: no effect for windows -###################################################################################### - -SET(FUNCTION_VERSION "${GLOBAL_VERSION}") -SET_TARGET_PROPERTIES(function PROPERTIES VERSION "${FUNCTION_VERSION}") -###################################################################################### diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/affectation.h b/trunk/paradiseo-old-mo/tutorial/examples/function/affectation.h deleted file mode 100644 index aa45da336..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/affectation.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef affectation_h -#define affectation_h - -#include -#include - -// A double that has to be minimized. -typedef eoScalarFitness< double, std::greater > functionFitness ; - -class Affectation : public EO, public std::pair -{}; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/affectation_eval.cpp b/trunk/paradiseo-old-mo/tutorial/examples/function/affectation_eval.cpp deleted file mode 100644 index ab2d569d7..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/affectation_eval.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "affectation_eval.h" - -void AffectationEval :: operator () (Affectation & _affectation) -{ - double x1, x2, result; - - //std::cout << "AffectationEval" << std::endl; - - x1=_affectation.first; - x2=_affectation.second; - - result=(2*x1*x1) + (x2*x2) + (x1*x2) - (2*x1) - x2; - - //std::cout << result << std::endl; - - _affectation.fitness(result); -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/affectation_eval.h b/trunk/paradiseo-old-mo/tutorial/examples/function/affectation_eval.h deleted file mode 100644 index affa225c9..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/affectation_eval.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef affectation_eval_h -#define affectation_eval_h - -#include - -#include "affectation.h" - -//! Affectation Evaluator -class AffectationEval : public eoEvalFunc -{ - - public : - - void operator () (Affectation & _affectation) ; - -} ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/affectation_init.cpp b/trunk/paradiseo-old-mo/tutorial/examples/function/affectation_init.cpp deleted file mode 100644 index 6299b6607..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/affectation_init.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include - -#include "affectation_init.h" - -AffectationInit::AffectationInit(double _bound): bound(_bound) -{ - if(bound < 0.0) - { - std::cout << "[affectation_init.cpp][AffectationInit]: bound is negative, " << bound << " is tranformed to "; - bound = -bound; - std::cout << bound << "." << std::endl; - } -} - -void AffectationInit::operator()(Affectation & _affectation) -{ - eoBooleanGenerator booleanGenerator; - - eoUniformGenerator doubleGenerator(bound); - - //A value between 0.0 and bound. - _affectation.first = doubleGenerator(); - - //value or -value ? - if(booleanGenerator()) - { - _affectation.first= - _affectation.first; - } - - //A value between 0.0 and bound. - _affectation.second = doubleGenerator(); - - //value or -value ? - if(booleanGenerator()) - { - _affectation.second= - _affectation.second; - } -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/affectation_init.h b/trunk/paradiseo-old-mo/tutorial/examples/function/affectation_init.h deleted file mode 100644 index a0be33a69..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/affectation_init.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef affectation_init_h -#define affectation_init_h - -#include - -#include "affectation.h" - -class AffectationInit : public eoInit - { - - public : - - AffectationInit(double _bound); - - void operator () (Affectation & _affectation) ; - - //! A bound for the initial value for the affectation - double bound; - - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation.cpp b/trunk/paradiseo-old-mo/tutorial/examples/function/deviation.cpp deleted file mode 100644 index 7c86c6ea5..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "deviation.h" - -void Deviation::operator () (Affectation & _affectation) -{ - _affectation.first += first; - _affectation.second += second; -} - diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation.h b/trunk/paradiseo-old-mo/tutorial/examples/function/deviation.h deleted file mode 100644 index a575b6235..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef deviation_h -#define deviation_h - -#include -#include "affectation.h" - -class Deviation : public moMove , public std :: pair -{ - public : - - void operator () (Affectation & _affectation) ; -} ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_incr_eval.cpp b/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_incr_eval.cpp deleted file mode 100644 index 440b18ae8..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_incr_eval.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "deviation_incr_eval.h" - -functionFitness DeviationIncrEval :: operator () (const Deviation & _move, const Affectation & _affectation) -{ - double x1, x2, deltaX1, deltaX2; - - x1=_affectation.first; - x2=_affectation.second; - - deltaX1=_move.first; - deltaX2=_move.second; - - return _affectation.fitness() - + ( 2*deltaX1*deltaX1 ) + ( deltaX2*deltaX2 ) + ( deltaX1*deltaX2 ) - ( 2*deltaX1 ) - deltaX2 - + ( deltaX1 * ( (4*x1) + x2 ) ) + ( x2*deltaX1 ); -} - diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_incr_eval.h b/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_incr_eval.h deleted file mode 100644 index b3f4cda25..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_incr_eval.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef deviation_incr_eval_h -#define deviation_incr_eval_h - -#include -#include "deviation.h" - -class DeviationIncrEval : public moMoveIncrEval - { - public : - - functionFitness operator () (const Deviation & _move, const Affectation & _affectation); - - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_init.cpp b/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_init.cpp deleted file mode 100644 index edcfee536..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_init.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "deviation_init.h" - -DeviationInit::DeviationInit(double _bound): bound(_bound) -{ - if(bound < 0.0) - { - std::cout << "[deviation_init.cpp][DeviationInit]: bound is negative, " << bound << " is tranformed to "; - bound = -bound; - std::cout << bound << "." << std::endl;; - } -} - -void DeviationInit::operator () (Deviation & _move, const Affectation & _affectation) -{ - //Code only used to avoid compilation warning because _affectation is not used in this procedure. - Affectation affectation(_affectation); - - _move.first=-bound; - _move.second=-bound; -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_init.h b/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_init.h deleted file mode 100644 index 48d11839b..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_init.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef deviation_init_h -#define deviation_init_h - -#include -#include - -#include "deviation.h" - -/** It sets the first couple of edges */ -class DeviationInit : public moMoveInit - { - - public : - - DeviationInit(double _bound); - - void operator () (Deviation & _move, const Affectation & _affectation) ; - - private : - - //! A bound for the initial value for the deviations - double bound; - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_next.cpp b/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_next.cpp deleted file mode 100644 index bb36ae695..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_next.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "deviation_next.h" - -DeviationNext::DeviationNext(double _bound, double _step): bound(_bound), step(_step) -{ - if(bound<0.0) - { - std::cout << "[deviation_next.cpp][DeviationNext]: bound is negative, " << bound << " is tranformed to "; - bound=-bound; - std::cout << bound << "." << std::endl; - } - - if(step<0.0) - { - std::cout << "[deviation_next.cpp][DeviationNext]: step is negative, " << step << " is tranformed to "; - step=-step; - std::cout << step << "." << std::endl; - } - - if(step>bound) - { - std::cout << "[deviation_next.cpp][DeviationNext]: step is higher than bound, " << step << " is tranformed to "; - step = bound / 2; - std::cout << step << "." << std::endl; - } -} - -bool DeviationNext::operator () (Deviation & _move, const Affectation & _affectation) -{ - Affectation affectation(_affectation); - - double deltaX1, deltaX2; - - deltaX1=_move.first; - deltaX2=_move.second; - - //std::cout << "deltaX1 = " << deltaX1 << ", deltaX2 = " << deltaX2 << std::endl; - - if( (deltaX1 >= bound) && (deltaX2 > bound) ) - { - return false; - } - - if(deltaX2 > bound) - { - deltaX1+=step; - deltaX2=-bound; - - _move.first=deltaX1; - _move.second=deltaX2; - - return true; - } - - deltaX2+=step; - - _move.second=deltaX2; - - return true; -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_next.h b/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_next.h deleted file mode 100644 index a28689cf7..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/deviation_next.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef deviation_next_h -#define deviation_next_h - -#include -#include "deviation.h" - -class DeviationNext : public moNextMove - { - - public : - - DeviationNext (double _bound, double _step); - - bool operator () (Deviation & _move, const Affectation & _affectation) ; - - - private : - - //! A bound for the search in the neighbourhood. - double bound; - - //! A step between two values. - double step; - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/function b/trunk/paradiseo-old-mo/tutorial/examples/function/function deleted file mode 100644 index 3d0cb7659..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/function +++ /dev/null @@ -1,41 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -#ifndef __function -#define __function - -#include "function.h" - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/function/function.h b/trunk/paradiseo-old-mo/tutorial/examples/function/function.h deleted file mode 100644 index d577c546a..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/function/function.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __function_h -#define __function_h - -#include "affectation.h" -#include "affectation_eval.h" -#include "affectation_init.h" -#include "deviation.h" -#include "deviation_incr_eval.h" -#include "deviation_init.h" -#include "deviation_next.h" - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/CMakeLists.txt b/trunk/paradiseo-old-mo/tutorial/examples/tsp/CMakeLists.txt deleted file mode 100755 index 17f5c2ac4..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/CMakeLists.txt +++ /dev/null @@ -1,45 +0,0 @@ -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${OLDMO_SRC_DIR}/src) - -###################################################################################### - - -###################################################################################### -### 2) Define your target(s): just the tsp here -###################################################################################### - -SET(TSP_LIB_OUTPUT_PATH ${TSP_BIN_DIR}/lib) -SET(LIBRARY_OUTPUT_PATH ${TSP_LIB_OUTPUT_PATH}) - -SET (TSP_SOURCES graph.cpp - route_init.cpp - route_eval.cpp - part_route_eval.cpp - edge_xover.cpp - order_xover.cpp - route_valid.cpp - partial_mapped_xover.cpp - city_swap.cpp - two_opt.cpp - two_opt_init.cpp - two_opt_next.cpp - two_opt_incr_eval.cpp - two_opt_tabu_list.cpp - two_opt_rand.cpp) - -ADD_LIBRARY(tsp STATIC ${TSP_SOURCES}) - -###################################################################################### - - -###################################################################################### -### 3) Optionnal: define your target(s)'s version: no effect for windows -###################################################################################### - -SET(TSP_VERSION "${GLOBAL_VERSION}") -SET_TARGET_PROPERTIES(tsp PROPERTIES VERSION "${TSP_VERSION}") -###################################################################################### diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/berlin52.tsp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/berlin52.tsp deleted file mode 100644 index 6f3579180..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/berlin52.tsp +++ /dev/null @@ -1,60 +0,0 @@ -NAME: berlin52 -TYPE: TSP -COMMENT: 52 locations in Berlin (Groetschel) -DIMENSION: 52 -EDGE_WEIGHT_TYPE: EUC_2D -NODE_COORD_SECTION -1 565.0 575.0 -2 25.0 185.0 -3 345.0 750.0 -4 945.0 685.0 -5 845.0 655.0 -6 880.0 660.0 -7 25.0 230.0 -8 525.0 1000.0 -9 580.0 1175.0 -10 650.0 1130.0 -11 1605.0 620.0 -12 1220.0 580.0 -13 1465.0 200.0 -14 1530.0 5.0 -15 845.0 680.0 -16 725.0 370.0 -17 145.0 665.0 -18 415.0 635.0 -19 510.0 875.0 -20 560.0 365.0 -21 300.0 465.0 -22 520.0 585.0 -23 480.0 415.0 -24 835.0 625.0 -25 975.0 580.0 -26 1215.0 245.0 -27 1320.0 315.0 -28 1250.0 400.0 -29 660.0 180.0 -30 410.0 250.0 -31 420.0 555.0 -32 575.0 665.0 -33 1150.0 1160.0 -34 700.0 580.0 -35 685.0 595.0 -36 685.0 610.0 -37 770.0 610.0 -38 795.0 645.0 -39 720.0 635.0 -40 760.0 650.0 -41 475.0 960.0 -42 95.0 260.0 -43 875.0 920.0 -44 700.0 500.0 -45 555.0 815.0 -46 830.0 485.0 -47 1170.0 65.0 -48 830.0 610.0 -49 605.0 625.0 -50 595.0 360.0 -51 1340.0 725.0 -52 1740.0 245.0 -EOF - diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/eil101.tsp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/eil101.tsp deleted file mode 100644 index 46ff3bcc6..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/eil101.tsp +++ /dev/null @@ -1,108 +0,0 @@ -NAME: eil101 -TYPE: TSP -COMMENT: 101-city problem (Christofides/Eilon) -DIMENSION: 101 -EDGE_WEIGHT_TYPE: EUC_2D -NODE_COORD_SECTION -1 41 49 -2 35 17 -3 55 45 -4 55 20 -5 15 30 -6 25 30 -7 20 50 -8 10 43 -9 55 60 -10 30 60 -11 20 65 -12 50 35 -13 30 25 -14 15 10 -15 30 5 -16 10 20 -17 5 30 -18 20 40 -19 15 60 -20 45 65 -21 45 20 -22 45 10 -23 55 5 -24 65 35 -25 65 20 -26 45 30 -27 35 40 -28 41 37 -29 64 42 -30 40 60 -31 31 52 -32 35 69 -33 53 52 -34 65 55 -35 63 65 -36 2 60 -37 20 20 -38 5 5 -39 60 12 -40 40 25 -41 42 7 -42 24 12 -43 23 3 -44 11 14 -45 6 38 -46 2 48 -47 8 56 -48 13 52 -49 6 68 -50 47 47 -51 49 58 -52 27 43 -53 37 31 -54 57 29 -55 63 23 -56 53 12 -57 32 12 -58 36 26 -59 21 24 -60 17 34 -61 12 24 -62 24 58 -63 27 69 -64 15 77 -65 62 77 -66 49 73 -67 67 5 -68 56 39 -69 37 47 -70 37 56 -71 57 68 -72 47 16 -73 44 17 -74 46 13 -75 49 11 -76 49 42 -77 53 43 -78 61 52 -79 57 48 -80 56 37 -81 55 54 -82 15 47 -83 14 37 -84 11 31 -85 16 22 -86 4 18 -87 28 18 -88 26 52 -89 26 35 -90 31 67 -91 15 19 -92 22 22 -93 18 24 -94 26 27 -95 25 24 -96 22 27 -97 25 21 -98 19 21 -99 20 26 -100 18 18 -101 35 35 -EOF diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/pr2392.tsp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/pr2392.tsp deleted file mode 100644 index 2cd96eff4..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/pr2392.tsp +++ /dev/null @@ -1,2399 +0,0 @@ -NAME: pr2392 -TYPE: TSP -COMMENT: 2392-city problem (Padberg/Rinaldi) -DIMENSION: 2392 -EDGE_WEIGHT_TYPE: EUC_2D -NODE_COORD_SECTION -1 1.63900e+03 2.15600e+03 -2 1.87500e+03 2.92500e+03 -3 2.15000e+03 2.92500e+03 -4 2.42500e+03 2.92500e+03 -5 2.52500e+03 2.67500e+03 -6 2.52500e+03 2.57500e+03 -7 2.52500e+03 2.37500e+03 -8 2.52500e+03 2.27500e+03 -9 2.52500e+03 2.17500e+03 -10 2.78600e+03 2.14800e+03 -11 2.78600e+03 2.24900e+03 -12 2.78600e+03 2.35200e+03 -13 2.78500e+03 2.45100e+03 -14 2.78500e+03 2.55200e+03 -15 2.78700e+03 2.65100e+03 -16 2.92500e+03 2.92500e+03 -17 3.19800e+03 2.92500e+03 -18 3.47500e+03 2.92500e+03 -19 3.72500e+03 2.92500e+03 -20 3.67500e+03 2.67500e+03 -21 3.67500e+03 2.57500e+03 -22 3.67500e+03 2.37500e+03 -23 3.67500e+03 2.27500e+03 -24 3.67500e+03 2.17500e+03 -25 4.18900e+03 2.15600e+03 -26 4.19000e+03 2.25600e+03 -27 4.19000e+03 2.35500e+03 -28 4.18900e+03 2.45600e+03 -29 4.18900e+03 2.55600e+03 -30 4.19000e+03 2.65600e+03 -31 4.27500e+03 2.97500e+03 -32 4.42500e+03 2.92500e+03 -33 4.70000e+03 2.92500e+03 -34 4.97500e+03 2.92500e+03 -35 5.07500e+03 2.67500e+03 -36 5.07500e+03 2.57500e+03 -37 5.07500e+03 2.37500e+03 -38 5.07500e+03 2.27500e+03 -39 5.07500e+03 2.17500e+03 -40 5.33600e+03 2.14800e+03 -41 5.33600e+03 2.24900e+03 -42 5.33600e+03 2.35200e+03 -43 5.33500e+03 2.45100e+03 -44 5.33500e+03 2.55200e+03 -45 5.33700e+03 2.65100e+03 -46 5.47500e+03 2.92500e+03 -47 5.74800e+03 2.92500e+03 -48 6.02500e+03 2.92500e+03 -49 6.27500e+03 2.92500e+03 -50 6.22500e+03 2.67500e+03 -51 6.22500e+03 2.57500e+03 -52 6.22500e+03 2.37500e+03 -53 6.22500e+03 2.27500e+03 -54 6.22500e+03 2.17500e+03 -55 6.73900e+03 2.15600e+03 -56 6.74000e+03 2.25600e+03 -57 6.74000e+03 2.35500e+03 -58 6.73900e+03 2.45600e+03 -59 6.73900e+03 2.55600e+03 -60 6.74000e+03 2.65600e+03 -61 6.82500e+03 2.97500e+03 -62 6.97500e+03 2.92500e+03 -63 7.25000e+03 2.92500e+03 -64 7.52500e+03 2.92500e+03 -65 7.62500e+03 2.67500e+03 -66 7.62500e+03 2.57500e+03 -67 7.62500e+03 2.37500e+03 -68 7.62500e+03 2.27500e+03 -69 7.62500e+03 2.17500e+03 -70 7.88600e+03 2.14800e+03 -71 7.88600e+03 2.24900e+03 -72 7.88600e+03 2.35200e+03 -73 7.88500e+03 2.45100e+03 -74 7.88500e+03 2.55200e+03 -75 7.88700e+03 2.65100e+03 -76 8.02500e+03 2.92500e+03 -77 8.29800e+03 2.92500e+03 -78 8.57500e+03 2.92500e+03 -79 8.82500e+03 2.92500e+03 -80 8.77500e+03 2.67500e+03 -81 8.77500e+03 2.57500e+03 -82 8.77500e+03 2.37500e+03 -83 8.77500e+03 2.27500e+03 -84 8.77500e+03 2.17500e+03 -85 9.28900e+03 2.15600e+03 -86 9.29000e+03 2.25600e+03 -87 9.29000e+03 2.35500e+03 -88 9.28900e+03 2.45600e+03 -89 9.28900e+03 2.55600e+03 -90 9.29000e+03 2.65600e+03 -91 9.37500e+03 2.97500e+03 -92 9.52500e+03 2.92500e+03 -93 9.80000e+03 2.92500e+03 -94 1.00750e+04 2.92500e+03 -95 1.01750e+04 2.67500e+03 -96 1.01750e+04 2.57500e+03 -97 1.01750e+04 2.37500e+03 -98 1.01750e+04 2.27500e+03 -99 1.01750e+04 2.17500e+03 -100 1.04360e+04 2.14800e+03 -101 1.04360e+04 2.24900e+03 -102 1.04360e+04 2.35200e+03 -103 1.04350e+04 2.45100e+03 -104 1.04350e+04 2.55200e+03 -105 1.04370e+04 2.65100e+03 -106 1.05750e+04 2.92500e+03 -107 1.08480e+04 2.92500e+03 -108 1.11250e+04 2.92500e+03 -109 1.13250e+04 2.17500e+03 -110 1.13250e+04 2.27500e+03 -111 1.13250e+04 2.37500e+03 -112 1.13250e+04 2.57500e+03 -113 1.13250e+04 2.67500e+03 -114 1.13750e+04 2.92500e+03 -115 1.13750e+04 3.12500e+03 -116 1.14000e+04 3.22500e+03 -117 1.14000e+04 3.32500e+03 -118 1.14000e+04 3.47500e+03 -119 1.14000e+04 3.62500e+03 -120 1.13000e+04 3.82500e+03 -121 1.11250e+04 3.82500e+03 -122 1.11250e+04 3.92500e+03 -123 1.10250e+04 3.97500e+03 -124 1.09250e+04 3.97500e+03 -125 1.09250e+04 3.87500e+03 -126 1.05500e+04 3.92500e+03 -127 1.05500e+04 3.72500e+03 -128 1.05500e+04 3.32500e+03 -129 1.01000e+04 3.32500e+03 -130 1.01000e+04 3.72500e+03 -131 1.01000e+04 3.92500e+03 -132 9.72500e+03 3.87500e+03 -133 9.72500e+03 3.97500e+03 -134 9.62500e+03 3.97500e+03 -135 9.55000e+03 3.87500e+03 -136 9.42500e+03 3.87500e+03 -137 9.27500e+03 3.90000e+03 -138 9.25000e+03 3.70000e+03 -139 9.25000e+03 3.57500e+03 -140 9.25000e+03 3.47500e+03 -141 9.25000e+03 3.37500e+03 -142 9.25000e+03 3.27500e+03 -143 8.82500e+03 3.12500e+03 -144 8.85000e+03 3.22500e+03 -145 8.85000e+03 3.32500e+03 -146 8.85000e+03 3.47500e+03 -147 8.85000e+03 3.62500e+03 -148 8.75000e+03 3.82500e+03 -149 8.57500e+03 3.82500e+03 -150 8.57500e+03 3.92500e+03 -151 8.47500e+03 3.97500e+03 -152 8.37500e+03 3.87500e+03 -153 8.37500e+03 3.97500e+03 -154 8.40000e+03 4.12500e+03 -155 8.30000e+03 4.17500e+03 -156 8.40000e+03 4.27500e+03 -157 8.50000e+03 4.17500e+03 -158 8.67500e+03 4.32500e+03 -159 8.77500e+03 4.42500e+03 -160 8.82500e+03 4.32500e+03 -161 9.27500e+03 4.27500e+03 -162 9.37500e+03 4.27500e+03 -163 9.32500e+03 4.37500e+03 -164 9.40000e+03 4.45000e+03 -165 9.40000e+03 4.55000e+03 -166 9.32500e+03 4.50000e+03 -167 9.21500e+03 4.56000e+03 -168 9.21500e+03 4.71000e+03 -169 9.37500e+03 4.77500e+03 -170 9.21500e+03 4.86000e+03 -171 9.21500e+03 5.01000e+03 -172 9.21500e+03 5.16000e+03 -173 9.21500e+03 5.31000e+03 -174 9.21500e+03 5.46000e+03 -175 9.21500e+03 5.61000e+03 -176 9.47500e+03 5.67500e+03 -177 9.47500e+03 5.52500e+03 -178 9.47500e+03 5.42500e+03 -179 9.47500e+03 5.27500e+03 -180 9.47500e+03 5.02500e+03 -181 9.57500e+03 5.07500e+03 -182 9.72500e+03 5.07500e+03 -183 9.67500e+03 4.97500e+03 -184 9.57500e+03 4.92500e+03 -185 9.52500e+03 4.77500e+03 -186 9.60000e+03 4.67500e+03 -187 9.62500e+03 4.77500e+03 -188 9.77500e+03 4.77500e+03 -189 9.97500e+03 4.60000e+03 -190 9.87500e+03 4.60000e+03 -191 9.80000e+03 4.52500e+03 -192 9.70000e+03 4.52500e+03 -193 9.70000e+03 4.42500e+03 -194 9.80000e+03 4.42500e+03 -195 9.80000e+03 4.32500e+03 -196 9.70000e+03 4.27500e+03 -197 9.60000e+03 4.17500e+03 -198 9.70000e+03 4.12500e+03 -199 9.80000e+03 4.17500e+03 -200 9.87500e+03 4.27500e+03 -201 9.97500e+03 4.27500e+03 -202 1.00750e+04 4.17500e+03 -203 1.02750e+04 4.17500e+03 -204 1.03750e+04 4.17500e+03 -205 1.05750e+04 4.17500e+03 -206 1.06750e+04 4.27500e+03 -207 1.07750e+04 4.27500e+03 -208 1.08500e+04 4.32500e+03 -209 1.08500e+04 4.42500e+03 -210 1.08500e+04 4.52500e+03 -211 1.07750e+04 4.57500e+03 -212 1.06750e+04 4.57500e+03 -213 1.08750e+04 4.77500e+03 -214 1.10250e+04 4.77500e+03 -215 1.11750e+04 4.72500e+03 -216 1.10500e+04 4.67500e+03 -217 1.09500e+04 4.50000e+03 -218 1.09500e+04 4.40000e+03 -219 1.09500e+04 4.27500e+03 -220 1.08500e+04 4.17500e+03 -221 1.09500e+04 4.12500e+03 -222 1.10500e+04 4.17500e+03 -223 1.12250e+04 4.32500e+03 -224 1.13750e+04 4.32500e+03 -225 1.13250e+04 4.42500e+03 -226 1.13250e+04 4.57500e+03 -227 1.13250e+04 4.67500e+03 -228 1.13250e+04 4.77500e+03 -229 1.13250e+04 4.92500e+03 -230 1.14500e+04 4.92500e+03 -231 1.14500e+04 5.07500e+03 -232 1.14220e+04 5.20400e+03 -233 1.14250e+04 5.32500e+03 -234 1.13250e+04 5.27500e+03 -235 1.13250e+04 5.37500e+03 -236 1.11750e+04 5.37500e+03 -237 1.11750e+04 5.27500e+03 -238 1.11250e+04 5.17500e+03 -239 1.11000e+04 5.02500e+03 -240 1.09750e+04 4.97500e+03 -241 1.09250e+04 5.07500e+03 -242 1.09500e+04 5.17500e+03 -243 1.09000e+04 5.27500e+03 -244 1.09000e+04 5.37500e+03 -245 1.08000e+04 5.17500e+03 -246 1.05250e+04 5.17500e+03 -247 1.03250e+04 5.17500e+03 -248 1.03250e+04 5.02500e+03 -249 1.04250e+04 5.07500e+03 -250 1.04750e+04 4.97500e+03 -251 1.03250e+04 4.87500e+03 -252 1.01750e+04 4.97500e+03 -253 1.02250e+04 5.07500e+03 -254 1.01250e+04 5.17500e+03 -255 9.97500e+03 5.17500e+03 -256 1.00500e+04 5.25000e+03 -257 1.00500e+04 5.35000e+03 -258 1.00250e+04 5.45000e+03 -259 1.01750e+04 5.45000e+03 -260 1.03250e+04 5.45000e+03 -261 1.04750e+04 5.45000e+03 -262 1.05750e+04 5.45000e+03 -263 1.06750e+04 5.45000e+03 -264 1.05250e+04 6.02500e+03 -265 1.05250e+04 6.12500e+03 -266 1.06750e+04 6.12500e+03 -267 1.08250e+04 6.02500e+03 -268 1.10250e+04 6.05000e+03 -269 1.12240e+04 5.90800e+03 -270 1.14000e+04 5.97500e+03 -271 1.14000e+04 6.37500e+03 -272 1.14000e+04 6.57500e+03 -273 1.11750e+04 6.57500e+03 -274 1.10250e+04 6.45000e+03 -275 1.09750e+04 6.67500e+03 -276 1.10750e+04 6.77500e+03 -277 1.09750e+04 6.87500e+03 -278 1.11750e+04 6.97500e+03 -279 1.13750e+04 6.97500e+03 -280 1.13250e+04 7.07500e+03 -281 1.14000e+04 7.15000e+03 -282 1.11250e+04 7.15000e+03 -283 1.09750e+04 7.15000e+03 -284 1.08750e+04 7.32500e+03 -285 1.09250e+04 7.42500e+03 -286 1.10750e+04 7.42500e+03 -287 1.11750e+04 7.47500e+03 -288 1.10750e+04 7.57500e+03 -289 1.11750e+04 7.62500e+03 -290 1.11750e+04 7.72500e+03 -291 1.10250e+04 7.72500e+03 -292 1.10250e+04 7.82500e+03 -293 1.11750e+04 7.82500e+03 -294 1.13250e+04 7.87500e+03 -295 1.14250e+04 7.92500e+03 -296 1.14250e+04 8.07500e+03 -297 1.13250e+04 8.07500e+03 -298 1.12750e+04 8.17500e+03 -299 1.14250e+04 8.22500e+03 -300 1.14250e+04 8.37500e+03 -301 1.12750e+04 8.32500e+03 -302 1.11750e+04 8.32500e+03 -303 1.10750e+04 8.22500e+03 -304 1.09750e+04 8.22500e+03 -305 1.09250e+04 7.97500e+03 -306 1.07750e+04 7.82500e+03 -307 1.08250e+04 7.60000e+03 -308 1.07250e+04 7.57500e+03 -309 1.07750e+04 7.42500e+03 -310 1.06750e+04 7.42500e+03 -311 1.05250e+04 7.42500e+03 -312 1.05250e+04 7.57500e+03 -313 1.04500e+04 7.75000e+03 -314 1.03000e+04 7.75000e+03 -315 1.04250e+04 7.87500e+03 -316 1.05250e+04 7.92500e+03 -317 1.05750e+04 7.82500e+03 -318 1.06250e+04 7.97500e+03 -319 1.07250e+04 7.97500e+03 -320 1.07250e+04 8.07500e+03 -321 1.06250e+04 8.12500e+03 -322 1.05250e+04 8.07500e+03 -323 1.04250e+04 8.02500e+03 -324 1.04250e+04 8.12500e+03 -325 1.02500e+04 8.22500e+03 -326 1.01500e+04 8.22500e+03 -327 1.02250e+04 8.12500e+03 -328 1.02750e+04 7.97500e+03 -329 1.01250e+04 7.97500e+03 -330 1.00000e+04 7.87500e+03 -331 1.00000e+04 7.77500e+03 -332 9.82500e+03 7.82500e+03 -333 9.62500e+03 7.72500e+03 -334 9.47500e+03 7.72500e+03 -335 9.42500e+03 7.62500e+03 -336 9.57500e+03 7.62500e+03 -337 9.62500e+03 7.47500e+03 -338 9.72500e+03 7.57500e+03 -339 9.82500e+03 7.47500e+03 -340 1.00250e+04 7.52500e+03 -341 9.97500e+03 7.42500e+03 -342 9.92500e+03 7.27500e+03 -343 9.82500e+03 7.07500e+03 -344 9.62500e+03 7.07500e+03 -345 9.72500e+03 6.97500e+03 -346 9.87500e+03 6.77500e+03 -347 9.72500e+03 6.77500e+03 -348 9.57500e+03 6.82500e+03 -349 9.57500e+03 6.67500e+03 -350 9.72500e+03 6.42500e+03 -351 9.62500e+03 6.20000e+03 -352 9.72500e+03 6.02500e+03 -353 9.62500e+03 6.00000e+03 -354 9.22500e+03 6.37500e+03 -355 9.22500e+03 6.52500e+03 -356 9.37500e+03 6.52500e+03 -357 9.37500e+03 6.67500e+03 -358 9.22500e+03 6.67500e+03 -359 9.22500e+03 6.87500e+03 -360 9.22500e+03 7.07500e+03 -361 9.22600e+03 7.25900e+03 -362 9.22500e+03 7.26000e+03 -363 9.22600e+03 7.40900e+03 -364 9.22500e+03 7.41000e+03 -365 9.22500e+03 7.56000e+03 -366 9.22600e+03 7.56000e+03 -367 9.22500e+03 7.71000e+03 -368 9.22500e+03 7.71100e+03 -369 9.32500e+03 7.82500e+03 -370 9.22500e+03 7.87500e+03 -371 9.22500e+03 7.97500e+03 -372 9.22500e+03 8.07500e+03 -373 9.22500e+03 8.17500e+03 -374 9.22500e+03 8.27500e+03 -375 9.22500e+03 8.37500e+03 -376 9.22500e+03 8.47500e+03 -377 9.27500e+03 8.82500e+03 -378 9.47500e+03 8.82500e+03 -379 9.57800e+03 8.82000e+03 -380 9.84700e+03 8.70300e+03 -381 9.87500e+03 8.82500e+03 -382 1.00250e+04 8.72500e+03 -383 1.00750e+04 8.82500e+03 -384 1.01750e+04 8.72500e+03 -385 1.01000e+04 8.57500e+03 -386 1.02500e+04 8.37500e+03 -387 1.02500e+04 8.47500e+03 -388 1.02500e+04 8.62500e+03 -389 1.04750e+04 8.77500e+03 -390 1.05750e+04 8.77500e+03 -391 1.06750e+04 8.77500e+03 -392 1.07750e+04 8.77500e+03 -393 1.09250e+04 8.77500e+03 -394 1.08750e+04 8.62500e+03 -395 1.08750e+04 8.52500e+03 -396 1.09750e+04 8.57500e+03 -397 1.11750e+04 8.47500e+03 -398 1.12750e+04 8.42500e+03 -399 1.13500e+04 8.57500e+03 -400 1.14500e+04 8.67500e+03 -401 1.13500e+04 8.77500e+03 -402 1.13250e+04 9.32500e+03 -403 1.13250e+04 9.42500e+03 -404 1.13250e+04 9.52500e+03 -405 1.13250e+04 9.72500e+03 -406 1.13250e+04 9.82500e+03 -407 1.11250e+04 1.00750e+04 -408 1.13750e+04 1.00750e+04 -409 1.13750e+04 1.02750e+04 -410 1.14000e+04 1.03750e+04 -411 1.14000e+04 1.04750e+04 -412 1.14000e+04 1.06250e+04 -413 1.14000e+04 1.07750e+04 -414 1.13000e+04 1.09750e+04 -415 1.11250e+04 1.09750e+04 -416 1.11250e+04 1.10750e+04 -417 1.10250e+04 1.11250e+04 -418 1.09250e+04 1.11250e+04 -419 1.09250e+04 1.10250e+04 -420 1.05500e+04 1.08750e+04 -421 1.05500e+04 1.10750e+04 -422 1.02750e+04 1.13250e+04 -423 1.03750e+04 1.13250e+04 -424 1.05750e+04 1.13250e+04 -425 1.06750e+04 1.14250e+04 -426 1.07750e+04 1.14250e+04 -427 1.08500e+04 1.14750e+04 -428 1.08500e+04 1.15750e+04 -429 1.08500e+04 1.16750e+04 -430 1.07750e+04 1.17250e+04 -431 1.06750e+04 1.17250e+04 -432 1.08750e+04 1.19250e+04 -433 1.10250e+04 1.19250e+04 -434 1.11750e+04 1.18750e+04 -435 1.10500e+04 1.18250e+04 -436 1.09500e+04 1.16500e+04 -437 1.09500e+04 1.15500e+04 -438 1.09500e+04 1.14250e+04 -439 1.08500e+04 1.13250e+04 -440 1.09500e+04 1.12750e+04 -441 1.10500e+04 1.13250e+04 -442 1.12250e+04 1.14750e+04 -443 1.13750e+04 1.14750e+04 -444 1.13250e+04 1.15750e+04 -445 1.13250e+04 1.17250e+04 -446 1.13250e+04 1.18250e+04 -447 1.13250e+04 1.19250e+04 -448 1.13250e+04 1.20750e+04 -449 1.14500e+04 1.20750e+04 -450 1.14500e+04 1.22250e+04 -451 1.14220e+04 1.23540e+04 -452 1.14250e+04 1.24750e+04 -453 1.13250e+04 1.24250e+04 -454 1.13250e+04 1.25250e+04 -455 1.11750e+04 1.25250e+04 -456 1.11750e+04 1.24250e+04 -457 1.11250e+04 1.23250e+04 -458 1.11000e+04 1.21750e+04 -459 1.09750e+04 1.21250e+04 -460 1.09250e+04 1.22250e+04 -461 1.09500e+04 1.23250e+04 -462 1.09000e+04 1.24250e+04 -463 1.09000e+04 1.25250e+04 -464 1.08000e+04 1.23250e+04 -465 1.05250e+04 1.23250e+04 -466 1.04250e+04 1.22250e+04 -467 1.04750e+04 1.21250e+04 -468 1.03250e+04 1.20250e+04 -469 1.01750e+04 1.21250e+04 -470 1.02250e+04 1.22250e+04 -471 1.03250e+04 1.21750e+04 -472 1.03250e+04 1.23250e+04 -473 1.01250e+04 1.23250e+04 -474 9.97500e+03 1.23250e+04 -475 1.00500e+04 1.24000e+04 -476 1.00500e+04 1.25000e+04 -477 1.00250e+04 1.26000e+04 -478 1.01750e+04 1.26000e+04 -479 1.03250e+04 1.26000e+04 -480 1.04750e+04 1.26000e+04 -481 1.05750e+04 1.26000e+04 -482 1.06750e+04 1.26000e+04 -483 1.05250e+04 1.31750e+04 -484 1.05250e+04 1.32750e+04 -485 1.06750e+04 1.32750e+04 -486 1.08250e+04 1.31750e+04 -487 1.10250e+04 1.32000e+04 -488 1.12240e+04 1.30580e+04 -489 1.14000e+04 1.31250e+04 -490 1.14000e+04 1.35250e+04 -491 1.14000e+04 1.37250e+04 -492 1.11750e+04 1.37250e+04 -493 1.10250e+04 1.36000e+04 -494 1.09750e+04 1.38250e+04 -495 1.10750e+04 1.39250e+04 -496 1.09750e+04 1.40250e+04 -497 1.11750e+04 1.41250e+04 -498 1.13750e+04 1.41250e+04 -499 1.13250e+04 1.42250e+04 -500 1.14000e+04 1.43000e+04 -501 1.11250e+04 1.43000e+04 -502 1.09750e+04 1.43000e+04 -503 1.08750e+04 1.44750e+04 -504 1.09250e+04 1.45750e+04 -505 1.08250e+04 1.47500e+04 -506 1.07250e+04 1.47250e+04 -507 1.07750e+04 1.45750e+04 -508 1.06750e+04 1.45750e+04 -509 1.05250e+04 1.45750e+04 -510 1.05250e+04 1.47250e+04 -511 1.04500e+04 1.49000e+04 -512 1.03000e+04 1.49000e+04 -513 1.04250e+04 1.50250e+04 -514 1.04250e+04 1.51750e+04 -515 1.04250e+04 1.52750e+04 -516 1.05250e+04 1.52250e+04 -517 1.06250e+04 1.52750e+04 -518 1.07250e+04 1.52250e+04 -519 1.07250e+04 1.51250e+04 -520 1.06250e+04 1.51250e+04 -521 1.05250e+04 1.50750e+04 -522 1.05750e+04 1.49750e+04 -523 1.07750e+04 1.49750e+04 -524 1.09250e+04 1.51250e+04 -525 1.10250e+04 1.49750e+04 -526 1.10250e+04 1.48750e+04 -527 1.10750e+04 1.47250e+04 -528 1.10750e+04 1.45750e+04 -529 1.11750e+04 1.46250e+04 -530 1.11750e+04 1.47750e+04 -531 1.11750e+04 1.48750e+04 -532 1.11750e+04 1.49750e+04 -533 1.13250e+04 1.50250e+04 -534 1.14250e+04 1.50750e+04 -535 1.14250e+04 1.52250e+04 -536 1.13250e+04 1.52250e+04 -537 1.12750e+04 1.53250e+04 -538 1.14250e+04 1.53750e+04 -539 1.14250e+04 1.55250e+04 -540 1.13500e+04 1.57250e+04 -541 1.14500e+04 1.58250e+04 -542 1.13500e+04 1.59250e+04 -543 1.11750e+04 1.56250e+04 -544 1.12750e+04 1.55750e+04 -545 1.12750e+04 1.54750e+04 -546 1.11750e+04 1.54750e+04 -547 1.10750e+04 1.53750e+04 -548 1.09750e+04 1.53750e+04 -549 1.08750e+04 1.56750e+04 -550 1.09750e+04 1.57250e+04 -551 1.08750e+04 1.57750e+04 -552 1.09250e+04 1.59250e+04 -553 1.07750e+04 1.59250e+04 -554 1.06750e+04 1.59250e+04 -555 1.05750e+04 1.59250e+04 -556 1.04750e+04 1.59250e+04 -557 1.02500e+04 1.57750e+04 -558 1.01750e+04 1.58750e+04 -559 1.00750e+04 1.59750e+04 -560 9.87500e+03 1.59750e+04 -561 9.84700e+03 1.58530e+04 -562 1.00250e+04 1.58750e+04 -563 1.01000e+04 1.57250e+04 -564 1.02500e+04 1.56250e+04 -565 1.02500e+04 1.55250e+04 -566 1.02500e+04 1.53750e+04 -567 1.01500e+04 1.53750e+04 -568 1.02250e+04 1.52750e+04 -569 1.02750e+04 1.51250e+04 -570 1.01250e+04 1.51250e+04 -571 1.00000e+04 1.50250e+04 -572 1.00000e+04 1.49250e+04 -573 9.82500e+03 1.49750e+04 -574 9.62500e+03 1.48750e+04 -575 9.47500e+03 1.48750e+04 -576 9.42500e+03 1.47750e+04 -577 9.57500e+03 1.47750e+04 -578 9.62500e+03 1.46250e+04 -579 9.72500e+03 1.47250e+04 -580 9.82500e+03 1.46250e+04 -581 1.00250e+04 1.46750e+04 -582 9.97500e+03 1.45750e+04 -583 9.92500e+03 1.44250e+04 -584 9.82500e+03 1.42250e+04 -585 9.62500e+03 1.42250e+04 -586 9.72500e+03 1.41250e+04 -587 9.87500e+03 1.39250e+04 -588 9.72500e+03 1.39250e+04 -589 9.57500e+03 1.39750e+04 -590 9.57500e+03 1.38250e+04 -591 9.72500e+03 1.35750e+04 -592 9.62500e+03 1.33500e+04 -593 9.72500e+03 1.31750e+04 -594 9.62500e+03 1.31500e+04 -595 9.22500e+03 1.35250e+04 -596 9.22500e+03 1.36750e+04 -597 9.37500e+03 1.36750e+04 -598 9.37500e+03 1.38250e+04 -599 9.22500e+03 1.38250e+04 -600 9.22500e+03 1.40250e+04 -601 9.22500e+03 1.42250e+04 -602 9.22600e+03 1.44090e+04 -603 9.22500e+03 1.44100e+04 -604 9.22600e+03 1.45590e+04 -605 9.22500e+03 1.45600e+04 -606 9.22500e+03 1.47100e+04 -607 9.22600e+03 1.47100e+04 -608 9.22500e+03 1.48600e+04 -609 9.22500e+03 1.48610e+04 -610 9.32500e+03 1.49750e+04 -611 9.22500e+03 1.50250e+04 -612 9.22500e+03 1.51250e+04 -613 9.22500e+03 1.52250e+04 -614 9.22500e+03 1.53250e+04 -615 9.22500e+03 1.54250e+04 -616 9.22500e+03 1.55250e+04 -617 9.22500e+03 1.56250e+04 -618 9.57800e+03 1.59700e+04 -619 9.47500e+03 1.59750e+04 -620 9.27500e+03 1.59750e+04 -621 8.90000e+03 1.58250e+04 -622 8.80000e+03 1.59250e+04 -623 8.80000e+03 1.57250e+04 -624 8.72500e+03 1.55750e+04 -625 8.62500e+03 1.56250e+04 -626 8.42500e+03 1.57250e+04 -627 8.32500e+03 1.56750e+04 -628 8.32500e+03 1.57750e+04 -629 8.37500e+03 1.59250e+04 -630 8.22500e+03 1.59250e+04 -631 8.12500e+03 1.59250e+04 -632 8.02500e+03 1.59250e+04 -633 7.92500e+03 1.59250e+04 -634 7.70000e+03 1.57750e+04 -635 7.70000e+03 1.56250e+04 -636 7.70000e+03 1.55250e+04 -637 7.55000e+03 1.57250e+04 -638 7.62500e+03 1.58750e+04 -639 7.52500e+03 1.59750e+04 -640 7.47500e+03 1.58750e+04 -641 7.32500e+03 1.59750e+04 -642 7.29700e+03 1.58530e+04 -643 7.02800e+03 1.59700e+04 -644 6.92500e+03 1.59750e+04 -645 6.72500e+03 1.59750e+04 -646 6.67500e+03 1.56250e+04 -647 6.67500e+03 1.55250e+04 -648 6.67500e+03 1.54250e+04 -649 6.67500e+03 1.53250e+04 -650 6.67500e+03 1.52250e+04 -651 6.67500e+03 1.51250e+04 -652 6.67500e+03 1.50250e+04 -653 6.77500e+03 1.49750e+04 -654 6.67500e+03 1.48610e+04 -655 6.67500e+03 1.48600e+04 -656 6.67600e+03 1.47100e+04 -657 6.67500e+03 1.47100e+04 -658 6.67500e+03 1.45600e+04 -659 6.67600e+03 1.45590e+04 -660 6.67500e+03 1.44100e+04 -661 6.67600e+03 1.44090e+04 -662 6.67500e+03 1.42250e+04 -663 6.67500e+03 1.40250e+04 -664 6.67500e+03 1.38250e+04 -665 6.82500e+03 1.38250e+04 -666 6.82500e+03 1.36750e+04 -667 6.67500e+03 1.36750e+04 -668 6.67500e+03 1.35250e+04 -669 7.07500e+03 1.31500e+04 -670 7.17500e+03 1.31750e+04 -671 7.07500e+03 1.33500e+04 -672 7.17500e+03 1.35750e+04 -673 7.02500e+03 1.38250e+04 -674 7.02500e+03 1.39750e+04 -675 7.17500e+03 1.39250e+04 -676 7.32500e+03 1.39250e+04 -677 7.17500e+03 1.41250e+04 -678 7.07500e+03 1.42250e+04 -679 7.27500e+03 1.42250e+04 -680 7.37500e+03 1.44250e+04 -681 7.42500e+03 1.45750e+04 -682 7.47500e+03 1.46750e+04 -683 7.27500e+03 1.46250e+04 -684 7.17500e+03 1.47250e+04 -685 7.07500e+03 1.46250e+04 -686 7.02500e+03 1.47750e+04 -687 6.87500e+03 1.47750e+04 -688 6.92500e+03 1.48750e+04 -689 7.07500e+03 1.48750e+04 -690 7.27500e+03 1.49750e+04 -691 7.45000e+03 1.49250e+04 -692 7.45000e+03 1.50250e+04 -693 7.57500e+03 1.51250e+04 -694 7.72500e+03 1.51250e+04 -695 7.67500e+03 1.52750e+04 -696 7.60000e+03 1.53750e+04 -697 7.70000e+03 1.53750e+04 -698 7.87500e+03 1.52750e+04 -699 7.87500e+03 1.51750e+04 -700 7.97500e+03 1.52250e+04 -701 8.07500e+03 1.52750e+04 -702 8.17500e+03 1.52250e+04 -703 8.17500e+03 1.51250e+04 -704 8.07500e+03 1.51250e+04 -705 8.02500e+03 1.49750e+04 -706 7.97500e+03 1.50750e+04 -707 7.87500e+03 1.50250e+04 -708 7.75000e+03 1.49000e+04 -709 7.90000e+03 1.49000e+04 -710 7.97500e+03 1.47250e+04 -711 7.97500e+03 1.45750e+04 -712 8.12500e+03 1.45750e+04 -713 8.22500e+03 1.45750e+04 -714 8.17500e+03 1.47250e+04 -715 8.27500e+03 1.47500e+04 -716 8.22500e+03 1.49750e+04 -717 8.37500e+03 1.51250e+04 -718 8.42500e+03 1.53750e+04 -719 8.52500e+03 1.53750e+04 -720 8.62500e+03 1.54750e+04 -721 8.72500e+03 1.54750e+04 -722 8.87500e+03 1.55250e+04 -723 8.87500e+03 1.53750e+04 -724 8.72500e+03 1.53250e+04 -725 8.77500e+03 1.52250e+04 -726 8.87500e+03 1.52250e+04 -727 8.87500e+03 1.50750e+04 -728 8.77500e+03 1.50250e+04 -729 8.62500e+03 1.49750e+04 -730 8.47500e+03 1.49750e+04 -731 8.47500e+03 1.48750e+04 -732 8.62500e+03 1.48750e+04 -733 8.62500e+03 1.47750e+04 -734 8.52500e+03 1.47250e+04 -735 8.62500e+03 1.46250e+04 -736 8.52500e+03 1.45750e+04 -737 8.37500e+03 1.45750e+04 -738 8.32500e+03 1.44750e+04 -739 8.42500e+03 1.43000e+04 -740 8.57500e+03 1.43000e+04 -741 8.85000e+03 1.43000e+04 -742 8.77500e+03 1.42250e+04 -743 8.82500e+03 1.41250e+04 -744 8.62500e+03 1.41250e+04 -745 8.42500e+03 1.40250e+04 -746 8.52500e+03 1.39250e+04 -747 8.42500e+03 1.38250e+04 -748 8.47500e+03 1.36000e+04 -749 8.62500e+03 1.37250e+04 -750 8.85000e+03 1.37250e+04 -751 8.85000e+03 1.35250e+04 -752 8.85000e+03 1.31250e+04 -753 8.67400e+03 1.30580e+04 -754 8.47500e+03 1.32000e+04 -755 8.27500e+03 1.31750e+04 -756 8.12500e+03 1.32750e+04 -757 7.97500e+03 1.32750e+04 -758 7.97500e+03 1.31750e+04 -759 8.12500e+03 1.26000e+04 -760 8.02500e+03 1.26000e+04 -761 7.92500e+03 1.26000e+04 -762 7.77500e+03 1.26000e+04 -763 7.62500e+03 1.26000e+04 -764 7.47500e+03 1.26000e+04 -765 7.50000e+03 1.25000e+04 -766 7.50000e+03 1.24000e+04 -767 7.42500e+03 1.23250e+04 -768 7.57500e+03 1.23250e+04 -769 7.67500e+03 1.22250e+04 -770 7.62500e+03 1.21250e+04 -771 7.77500e+03 1.20250e+04 -772 7.92500e+03 1.21250e+04 -773 7.87500e+03 1.22250e+04 -774 7.77500e+03 1.21750e+04 -775 7.77500e+03 1.23250e+04 -776 7.97500e+03 1.23250e+04 -777 8.25000e+03 1.23250e+04 -778 8.35000e+03 1.25250e+04 -779 8.35000e+03 1.24250e+04 -780 8.40000e+03 1.23250e+04 -781 8.37500e+03 1.22250e+04 -782 8.42500e+03 1.21250e+04 -783 8.55000e+03 1.21750e+04 -784 8.57500e+03 1.23250e+04 -785 8.62500e+03 1.24250e+04 -786 8.62500e+03 1.25250e+04 -787 8.77500e+03 1.25250e+04 -788 8.77500e+03 1.24250e+04 -789 8.87500e+03 1.24750e+04 -790 8.87200e+03 1.23540e+04 -791 8.90000e+03 1.22250e+04 -792 8.90000e+03 1.20750e+04 -793 8.77500e+03 1.20750e+04 -794 8.77500e+03 1.19250e+04 -795 8.77500e+03 1.18250e+04 -796 8.77500e+03 1.17250e+04 -797 8.77500e+03 1.15750e+04 -798 8.82500e+03 1.14750e+04 -799 8.67500e+03 1.14750e+04 -800 8.50000e+03 1.13250e+04 -801 8.40000e+03 1.12750e+04 -802 8.30000e+03 1.13250e+04 -803 8.40000e+03 1.14250e+04 -804 8.40000e+03 1.15500e+04 -805 8.40000e+03 1.16500e+04 -806 8.50000e+03 1.18250e+04 -807 8.62500e+03 1.18750e+04 -808 8.47500e+03 1.19250e+04 -809 8.32500e+03 1.19250e+04 -810 8.12500e+03 1.17250e+04 -811 8.22500e+03 1.17250e+04 -812 8.30000e+03 1.16750e+04 -813 8.30000e+03 1.15750e+04 -814 8.30000e+03 1.14750e+04 -815 8.22500e+03 1.14250e+04 -816 8.12500e+03 1.14250e+04 -817 8.02500e+03 1.13250e+04 -818 7.82500e+03 1.13250e+04 -819 7.72500e+03 1.13250e+04 -820 7.52500e+03 1.13250e+04 -821 7.42500e+03 1.14250e+04 -822 7.32500e+03 1.14250e+04 -823 7.25000e+03 1.13250e+04 -824 7.15000e+03 1.12750e+04 -825 7.05000e+03 1.13250e+04 -826 7.15000e+03 1.14250e+04 -827 7.25000e+03 1.14750e+04 -828 7.25000e+03 1.15750e+04 -829 7.15000e+03 1.15750e+04 -830 7.15000e+03 1.16750e+04 -831 7.25000e+03 1.16750e+04 -832 7.32500e+03 1.17500e+04 -833 7.42500e+03 1.17500e+04 -834 7.22500e+03 1.19250e+04 -835 7.07500e+03 1.19250e+04 -836 7.05000e+03 1.18250e+04 -837 6.97500e+03 1.19250e+04 -838 7.02500e+03 1.20750e+04 -839 7.12500e+03 1.21250e+04 -840 7.17500e+03 1.22250e+04 -841 7.02500e+03 1.22250e+04 -842 6.92500e+03 1.21750e+04 -843 6.92500e+03 1.24250e+04 -844 6.92500e+03 1.25750e+04 -845 6.92500e+03 1.26750e+04 -846 6.92500e+03 1.28250e+04 -847 6.66500e+03 1.27600e+04 -848 6.66500e+03 1.26100e+04 -849 6.66500e+03 1.24600e+04 -850 6.66500e+03 1.23100e+04 -851 6.66500e+03 1.21600e+04 -852 6.66500e+03 1.20100e+04 -853 6.82500e+03 1.19250e+04 -854 6.66500e+03 1.18600e+04 -855 6.66500e+03 1.17100e+04 -856 6.77500e+03 1.16500e+04 -857 6.85000e+03 1.17000e+04 -858 6.85000e+03 1.16000e+04 -859 6.77500e+03 1.15250e+04 -860 6.82500e+03 1.14250e+04 -861 6.72500e+03 1.14250e+04 -862 6.27500e+03 1.14750e+04 -863 6.22500e+03 1.15750e+04 -864 6.12500e+03 1.14750e+04 -865 5.95000e+03 1.13250e+04 -866 5.85000e+03 1.14250e+04 -867 5.75000e+03 1.13250e+04 -868 5.85000e+03 1.12750e+04 -869 5.82500e+03 1.11250e+04 -870 5.82500e+03 1.10250e+04 -871 5.92500e+03 1.11250e+04 -872 6.02500e+03 1.10750e+04 -873 6.02500e+03 1.09750e+04 -874 6.20000e+03 1.09750e+04 -875 6.30000e+03 1.07750e+04 -876 6.30000e+03 1.06250e+04 -877 6.30000e+03 1.04750e+04 -878 6.30000e+03 1.03750e+04 -879 6.27500e+03 1.02750e+04 -880 6.70000e+03 1.04250e+04 -881 6.70000e+03 1.05250e+04 -882 6.70000e+03 1.06250e+04 -883 6.70000e+03 1.07250e+04 -884 6.70000e+03 1.08500e+04 -885 6.72500e+03 1.10500e+04 -886 6.87500e+03 1.10250e+04 -887 7.00000e+03 1.10250e+04 -888 7.07500e+03 1.11250e+04 -889 7.17500e+03 1.11250e+04 -890 7.17500e+03 1.10250e+04 -891 7.55000e+03 1.10750e+04 -892 7.55000e+03 1.08750e+04 -893 7.55000e+03 1.04750e+04 -894 8.00000e+03 1.04750e+04 -895 8.00000e+03 1.08750e+04 -896 8.00000e+03 1.10750e+04 -897 8.37500e+03 1.10250e+04 -898 8.37500e+03 1.11250e+04 -899 8.47500e+03 1.11250e+04 -900 8.57500e+03 1.10750e+04 -901 8.57500e+03 1.09750e+04 -902 8.75000e+03 1.09750e+04 -903 8.85000e+03 1.07750e+04 -904 8.85000e+03 1.06250e+04 -905 8.85000e+03 1.04750e+04 -906 8.85000e+03 1.03750e+04 -907 8.82500e+03 1.02750e+04 -908 9.25000e+03 1.04250e+04 -909 9.25000e+03 1.05250e+04 -910 9.25000e+03 1.06250e+04 -911 9.25000e+03 1.07250e+04 -912 9.25000e+03 1.08500e+04 -913 9.27500e+03 1.10500e+04 -914 9.42500e+03 1.10250e+04 -915 9.55000e+03 1.10250e+04 -916 9.62500e+03 1.11250e+04 -917 9.72500e+03 1.10250e+04 -918 9.72500e+03 1.11250e+04 -919 9.70000e+03 1.12750e+04 -920 9.80000e+03 1.13250e+04 -921 9.70000e+03 1.14250e+04 -922 9.60000e+03 1.13250e+04 -923 9.37500e+03 1.14250e+04 -924 9.27500e+03 1.14250e+04 -925 9.32500e+03 1.15250e+04 -926 9.40000e+03 1.16000e+04 -927 9.40000e+03 1.17000e+04 -928 9.32500e+03 1.16500e+04 -929 9.21500e+03 1.17100e+04 -930 9.21500e+03 1.18600e+04 -931 9.37500e+03 1.19250e+04 -932 9.21500e+03 1.20100e+04 -933 9.21500e+03 1.21600e+04 -934 9.21500e+03 1.23100e+04 -935 9.21500e+03 1.24600e+04 -936 9.21500e+03 1.26100e+04 -937 9.21500e+03 1.27600e+04 -938 9.47500e+03 1.28250e+04 -939 9.47500e+03 1.26750e+04 -940 9.47500e+03 1.25750e+04 -941 9.47500e+03 1.24250e+04 -942 9.47500e+03 1.21750e+04 -943 9.57500e+03 1.22250e+04 -944 9.72500e+03 1.22250e+04 -945 9.67500e+03 1.21250e+04 -946 9.57500e+03 1.20750e+04 -947 9.52500e+03 1.19250e+04 -948 9.60000e+03 1.18250e+04 -949 9.62500e+03 1.19250e+04 -950 9.77500e+03 1.19250e+04 -951 9.97500e+03 1.17500e+04 -952 9.87500e+03 1.17500e+04 -953 9.80000e+03 1.16750e+04 -954 9.70000e+03 1.16750e+04 -955 9.70000e+03 1.15750e+04 -956 9.80000e+03 1.15750e+04 -957 9.80000e+03 1.14750e+04 -958 9.87500e+03 1.14250e+04 -959 9.97500e+03 1.14250e+04 -960 1.00750e+04 1.13250e+04 -961 1.01000e+04 1.10750e+04 -962 1.01000e+04 1.08750e+04 -963 1.01000e+04 1.04750e+04 -964 1.05500e+04 1.04750e+04 -965 1.08480e+04 1.00750e+04 -966 1.05750e+04 1.00750e+04 -967 1.04370e+04 9.80100e+03 -968 1.04350e+04 9.70200e+03 -969 1.04350e+04 9.60100e+03 -970 1.04360e+04 9.50200e+03 -971 1.04360e+04 9.39900e+03 -972 1.04360e+04 9.29800e+03 -973 1.01750e+04 9.32500e+03 -974 1.01750e+04 9.42500e+03 -975 1.01750e+04 9.52500e+03 -976 1.01750e+04 9.72500e+03 -977 1.01750e+04 9.82500e+03 -978 1.00750e+04 1.00750e+04 -979 9.80000e+03 1.00750e+04 -980 9.52500e+03 1.00750e+04 -981 9.37500e+03 1.01250e+04 -982 9.29000e+03 9.80600e+03 -983 9.28900e+03 9.70600e+03 -984 9.28900e+03 9.60600e+03 -985 9.29000e+03 9.50500e+03 -986 9.29000e+03 9.40600e+03 -987 9.28900e+03 9.30600e+03 -988 8.77500e+03 9.32500e+03 -989 8.77500e+03 9.42500e+03 -990 8.77500e+03 9.52500e+03 -991 8.77500e+03 9.72500e+03 -992 8.77500e+03 9.82500e+03 -993 8.82500e+03 1.00750e+04 -994 8.57500e+03 1.00750e+04 -995 8.29800e+03 1.00750e+04 -996 8.02500e+03 1.00750e+04 -997 7.88700e+03 9.80100e+03 -998 7.88500e+03 9.70200e+03 -999 7.88500e+03 9.60100e+03 -1000 7.88600e+03 9.50200e+03 -1001 7.88600e+03 9.39900e+03 -1002 7.88600e+03 9.29800e+03 -1003 7.62500e+03 9.32500e+03 -1004 7.62500e+03 9.42500e+03 -1005 7.62500e+03 9.52500e+03 -1006 7.62500e+03 9.72500e+03 -1007 7.62500e+03 9.82500e+03 -1008 7.52500e+03 1.00750e+04 -1009 7.25000e+03 1.00750e+04 -1010 6.97500e+03 1.00750e+04 -1011 6.82500e+03 1.01250e+04 -1012 6.74000e+03 9.80600e+03 -1013 6.73900e+03 9.70600e+03 -1014 6.73900e+03 9.60600e+03 -1015 6.74000e+03 9.50500e+03 -1016 6.74000e+03 9.40600e+03 -1017 6.73900e+03 9.30600e+03 -1018 7.02800e+03 8.82000e+03 -1019 6.92500e+03 8.82500e+03 -1020 6.72500e+03 8.82500e+03 -1021 6.67500e+03 8.47500e+03 -1022 6.67500e+03 8.37500e+03 -1023 6.67500e+03 8.27500e+03 -1024 6.67500e+03 8.17500e+03 -1025 6.67500e+03 8.07500e+03 -1026 6.67500e+03 7.97500e+03 -1027 6.67500e+03 7.87500e+03 -1028 6.77500e+03 7.82500e+03 -1029 6.67500e+03 7.71100e+03 -1030 6.67500e+03 7.71000e+03 -1031 6.67600e+03 7.56000e+03 -1032 6.67500e+03 7.56000e+03 -1033 6.67500e+03 7.41000e+03 -1034 6.67600e+03 7.40900e+03 -1035 6.67500e+03 7.26000e+03 -1036 6.67600e+03 7.25900e+03 -1037 6.67500e+03 7.07500e+03 -1038 6.67500e+03 6.87500e+03 -1039 6.67500e+03 6.67500e+03 -1040 6.82500e+03 6.67500e+03 -1041 6.82500e+03 6.52500e+03 -1042 6.67500e+03 6.52500e+03 -1043 6.67500e+03 6.37500e+03 -1044 7.07500e+03 6.00000e+03 -1045 7.17500e+03 6.02500e+03 -1046 7.07500e+03 6.20000e+03 -1047 7.17500e+03 6.42500e+03 -1048 7.02500e+03 6.67500e+03 -1049 7.02500e+03 6.82500e+03 -1050 7.17500e+03 6.77500e+03 -1051 7.32500e+03 6.77500e+03 -1052 7.17500e+03 6.97500e+03 -1053 7.07500e+03 7.07500e+03 -1054 7.27500e+03 7.07500e+03 -1055 7.37500e+03 7.27500e+03 -1056 7.42500e+03 7.42500e+03 -1057 7.47500e+03 7.52500e+03 -1058 7.27500e+03 7.47500e+03 -1059 7.17500e+03 7.57500e+03 -1060 7.07500e+03 7.47500e+03 -1061 7.02500e+03 7.62500e+03 -1062 6.87500e+03 7.62500e+03 -1063 6.92500e+03 7.72500e+03 -1064 7.07500e+03 7.72500e+03 -1065 7.27500e+03 7.82500e+03 -1066 7.45000e+03 7.77500e+03 -1067 7.45000e+03 7.87500e+03 -1068 7.57500e+03 7.97500e+03 -1069 7.72500e+03 7.97500e+03 -1070 7.67500e+03 8.12500e+03 -1071 7.60000e+03 8.22500e+03 -1072 7.70000e+03 8.22500e+03 -1073 7.70000e+03 8.37500e+03 -1074 7.70000e+03 8.47500e+03 -1075 7.55000e+03 8.57500e+03 -1076 7.47500e+03 8.72500e+03 -1077 7.29700e+03 8.70300e+03 -1078 7.32500e+03 8.82500e+03 -1079 7.52500e+03 8.82500e+03 -1080 7.62500e+03 8.72500e+03 -1081 7.70000e+03 8.62500e+03 -1082 7.92500e+03 8.77500e+03 -1083 8.02500e+03 8.77500e+03 -1084 8.12500e+03 8.77500e+03 -1085 8.22500e+03 8.77500e+03 -1086 8.37500e+03 8.77500e+03 -1087 8.32500e+03 8.62500e+03 -1088 8.42500e+03 8.57500e+03 -1089 8.32500e+03 8.52500e+03 -1090 8.42500e+03 8.22500e+03 -1091 8.52500e+03 8.22500e+03 -1092 8.62500e+03 8.32500e+03 -1093 8.72500e+03 8.32500e+03 -1094 8.72500e+03 8.42500e+03 -1095 8.62500e+03 8.47500e+03 -1096 8.80000e+03 8.77500e+03 -1097 8.90000e+03 8.67500e+03 -1098 8.80000e+03 8.57500e+03 -1099 8.87500e+03 8.37500e+03 -1100 8.87500e+03 8.22500e+03 -1101 8.72500e+03 8.17500e+03 -1102 8.77500e+03 8.07500e+03 -1103 8.87500e+03 8.07500e+03 -1104 8.87500e+03 7.92500e+03 -1105 8.77500e+03 7.87500e+03 -1106 8.62500e+03 7.82500e+03 -1107 8.62500e+03 7.72500e+03 -1108 8.62500e+03 7.62500e+03 -1109 8.62500e+03 7.47500e+03 -1110 8.52500e+03 7.42500e+03 -1111 8.52500e+03 7.57500e+03 -1112 8.47500e+03 7.72500e+03 -1113 8.47500e+03 7.82500e+03 -1114 8.37500e+03 7.97500e+03 -1115 8.22500e+03 7.82500e+03 -1116 8.02500e+03 7.82500e+03 -1117 7.97500e+03 7.92500e+03 -1118 8.07500e+03 7.97500e+03 -1119 8.17500e+03 7.97500e+03 -1120 8.17500e+03 8.07500e+03 -1121 8.07500e+03 8.12500e+03 -1122 7.97500e+03 8.07500e+03 -1123 7.87500e+03 8.12500e+03 -1124 7.87500e+03 8.02500e+03 -1125 7.87500e+03 7.87500e+03 -1126 7.75000e+03 7.75000e+03 -1127 7.90000e+03 7.75000e+03 -1128 7.97500e+03 7.57500e+03 -1129 7.97500e+03 7.42500e+03 -1130 8.12500e+03 7.42500e+03 -1131 8.22500e+03 7.42500e+03 -1132 8.17500e+03 7.57500e+03 -1133 8.27500e+03 7.60000e+03 -1134 8.37500e+03 7.42500e+03 -1135 8.32500e+03 7.32500e+03 -1136 8.42500e+03 7.15000e+03 -1137 8.57500e+03 7.15000e+03 -1138 8.85000e+03 7.15000e+03 -1139 8.77500e+03 7.07500e+03 -1140 8.82500e+03 6.97500e+03 -1141 8.62500e+03 6.97500e+03 -1142 8.42500e+03 6.87500e+03 -1143 8.52500e+03 6.77500e+03 -1144 8.42500e+03 6.67500e+03 -1145 8.47500e+03 6.45000e+03 -1146 8.62500e+03 6.57500e+03 -1147 8.85000e+03 6.57500e+03 -1148 8.85000e+03 6.37500e+03 -1149 8.85000e+03 5.97500e+03 -1150 8.67400e+03 5.90800e+03 -1151 8.47500e+03 6.05000e+03 -1152 8.27500e+03 6.02500e+03 -1153 8.12500e+03 6.12500e+03 -1154 7.97500e+03 6.12500e+03 -1155 7.97500e+03 6.02500e+03 -1156 8.12500e+03 5.45000e+03 -1157 8.02500e+03 5.45000e+03 -1158 7.92500e+03 5.45000e+03 -1159 7.77500e+03 5.45000e+03 -1160 7.62500e+03 5.45000e+03 -1161 7.47500e+03 5.45000e+03 -1162 7.50000e+03 5.35000e+03 -1163 7.50000e+03 5.25000e+03 -1164 7.42500e+03 5.17500e+03 -1165 7.57500e+03 5.17500e+03 -1166 7.67500e+03 5.07500e+03 -1167 7.62500e+03 4.97500e+03 -1168 7.77500e+03 4.87500e+03 -1169 7.92500e+03 4.97500e+03 -1170 7.87500e+03 5.07500e+03 -1171 7.77500e+03 5.02500e+03 -1172 7.77500e+03 5.17500e+03 -1173 7.97500e+03 5.17500e+03 -1174 8.25000e+03 5.17500e+03 -1175 8.35000e+03 5.37500e+03 -1176 8.35000e+03 5.27500e+03 -1177 8.40000e+03 5.17500e+03 -1178 8.37500e+03 5.07500e+03 -1179 8.42500e+03 4.97500e+03 -1180 8.55000e+03 5.02500e+03 -1181 8.57500e+03 5.17500e+03 -1182 8.62500e+03 5.27500e+03 -1183 8.62500e+03 5.37500e+03 -1184 8.77500e+03 5.37500e+03 -1185 8.77500e+03 5.27500e+03 -1186 8.87500e+03 5.32500e+03 -1187 8.87200e+03 5.20400e+03 -1188 8.90000e+03 5.07500e+03 -1189 8.90000e+03 4.92500e+03 -1190 8.77500e+03 4.92500e+03 -1191 8.77500e+03 4.77500e+03 -1192 8.77500e+03 4.67500e+03 -1193 8.77500e+03 4.57500e+03 -1194 8.62500e+03 4.72500e+03 -1195 8.50000e+03 4.67500e+03 -1196 8.47500e+03 4.77500e+03 -1197 8.32500e+03 4.77500e+03 -1198 8.12500e+03 4.57500e+03 -1199 8.22500e+03 4.57500e+03 -1200 8.30000e+03 4.52500e+03 -1201 8.40000e+03 4.50000e+03 -1202 8.40000e+03 4.40000e+03 -1203 8.30000e+03 4.42500e+03 -1204 8.30000e+03 4.32500e+03 -1205 8.22500e+03 4.27500e+03 -1206 8.12500e+03 4.27500e+03 -1207 8.02500e+03 4.17500e+03 -1208 8.00000e+03 3.92500e+03 -1209 8.00000e+03 3.72500e+03 -1210 8.00000e+03 3.32500e+03 -1211 7.55000e+03 3.32500e+03 -1212 7.55000e+03 3.72500e+03 -1213 7.55000e+03 3.92500e+03 -1214 7.82500e+03 4.17500e+03 -1215 7.72500e+03 4.17500e+03 -1216 7.52500e+03 4.17500e+03 -1217 7.42500e+03 4.27500e+03 -1218 7.32500e+03 4.27500e+03 -1219 7.25000e+03 4.32500e+03 -1220 7.25000e+03 4.42500e+03 -1221 7.15000e+03 4.42500e+03 -1222 7.15000e+03 4.52500e+03 -1223 7.25000e+03 4.52500e+03 -1224 7.32500e+03 4.60000e+03 -1225 7.42500e+03 4.60000e+03 -1226 7.22500e+03 4.77500e+03 -1227 7.07500e+03 4.77500e+03 -1228 7.05000e+03 4.67500e+03 -1229 6.97500e+03 4.77500e+03 -1230 7.02500e+03 4.92500e+03 -1231 7.12500e+03 4.97500e+03 -1232 7.17500e+03 5.07500e+03 -1233 7.02500e+03 5.07500e+03 -1234 6.92500e+03 5.02500e+03 -1235 6.92500e+03 5.27500e+03 -1236 6.92500e+03 5.42500e+03 -1237 6.92500e+03 5.52500e+03 -1238 6.92500e+03 5.67500e+03 -1239 6.66500e+03 5.61000e+03 -1240 6.66500e+03 5.46000e+03 -1241 6.66500e+03 5.31000e+03 -1242 6.66500e+03 5.16000e+03 -1243 6.66500e+03 5.01000e+03 -1244 6.66500e+03 4.86000e+03 -1245 6.82500e+03 4.77500e+03 -1246 6.66500e+03 4.71000e+03 -1247 6.66500e+03 4.56000e+03 -1248 6.77500e+03 4.50000e+03 -1249 6.85000e+03 4.55000e+03 -1250 6.85000e+03 4.45000e+03 -1251 6.77500e+03 4.37500e+03 -1252 6.72500e+03 4.27500e+03 -1253 6.82500e+03 4.27500e+03 -1254 7.05000e+03 4.17500e+03 -1255 7.15000e+03 4.27500e+03 -1256 7.25000e+03 4.17500e+03 -1257 7.15000e+03 4.12500e+03 -1258 7.17500e+03 3.97500e+03 -1259 7.17500e+03 3.87500e+03 -1260 7.07500e+03 3.97500e+03 -1261 7.00000e+03 3.87500e+03 -1262 6.87500e+03 3.87500e+03 -1263 6.72500e+03 3.90000e+03 -1264 6.70000e+03 3.70000e+03 -1265 6.70000e+03 3.57500e+03 -1266 6.70000e+03 3.47500e+03 -1267 6.70000e+03 3.37500e+03 -1268 6.70000e+03 3.27500e+03 -1269 6.27500e+03 3.12500e+03 -1270 6.30000e+03 3.22500e+03 -1271 6.30000e+03 3.32500e+03 -1272 6.30000e+03 3.47500e+03 -1273 6.30000e+03 3.62500e+03 -1274 6.20000e+03 3.82500e+03 -1275 6.02500e+03 3.82500e+03 -1276 6.02500e+03 3.92500e+03 -1277 5.92500e+03 3.97500e+03 -1278 5.82500e+03 3.97500e+03 -1279 5.82500e+03 3.87500e+03 -1280 5.45000e+03 3.92500e+03 -1281 5.45000e+03 3.72500e+03 -1282 5.45000e+03 3.32500e+03 -1283 5.00000e+03 3.32500e+03 -1284 5.00000e+03 3.72500e+03 -1285 5.00000e+03 3.92500e+03 -1286 4.62500e+03 3.87500e+03 -1287 4.62500e+03 3.97500e+03 -1288 4.52500e+03 3.97500e+03 -1289 4.45000e+03 3.87500e+03 -1290 4.32500e+03 3.87500e+03 -1291 4.17500e+03 3.90000e+03 -1292 4.15000e+03 3.70000e+03 -1293 4.15000e+03 3.57500e+03 -1294 4.15000e+03 3.47500e+03 -1295 4.15000e+03 3.37500e+03 -1296 4.15000e+03 3.27500e+03 -1297 3.72500e+03 3.12500e+03 -1298 3.75000e+03 3.22500e+03 -1299 3.75000e+03 3.32500e+03 -1300 3.75000e+03 3.47500e+03 -1301 3.75000e+03 3.62500e+03 -1302 3.65000e+03 3.82500e+03 -1303 3.47500e+03 3.82500e+03 -1304 3.47500e+03 3.92500e+03 -1305 3.37500e+03 3.97500e+03 -1306 3.27500e+03 3.87500e+03 -1307 3.27500e+03 3.97500e+03 -1308 3.30000e+03 4.12500e+03 -1309 3.20000e+03 4.17500e+03 -1310 3.30000e+03 4.27500e+03 -1311 3.40000e+03 4.17500e+03 -1312 3.57500e+03 4.32500e+03 -1313 3.67500e+03 4.42500e+03 -1314 3.72500e+03 4.32500e+03 -1315 4.17500e+03 4.27500e+03 -1316 4.27500e+03 4.27500e+03 -1317 4.22500e+03 4.37500e+03 -1318 4.30000e+03 4.45000e+03 -1319 4.30000e+03 4.55000e+03 -1320 4.22500e+03 4.50000e+03 -1321 4.11500e+03 4.56000e+03 -1322 4.11500e+03 4.71000e+03 -1323 4.27500e+03 4.77500e+03 -1324 4.11500e+03 4.86000e+03 -1325 4.11500e+03 5.01000e+03 -1326 4.11500e+03 5.16000e+03 -1327 4.11500e+03 5.31000e+03 -1328 4.11500e+03 5.46000e+03 -1329 4.11500e+03 5.61000e+03 -1330 4.37500e+03 5.67500e+03 -1331 4.37500e+03 5.52500e+03 -1332 4.37500e+03 5.42500e+03 -1333 4.37500e+03 5.27500e+03 -1334 4.37500e+03 5.02500e+03 -1335 4.47500e+03 5.07500e+03 -1336 4.62500e+03 5.07500e+03 -1337 4.57500e+03 4.97500e+03 -1338 4.47500e+03 4.92500e+03 -1339 4.42500e+03 4.77500e+03 -1340 4.50000e+03 4.67500e+03 -1341 4.52500e+03 4.77500e+03 -1342 4.67500e+03 4.77500e+03 -1343 4.87500e+03 4.60000e+03 -1344 4.77500e+03 4.60000e+03 -1345 4.70000e+03 4.52500e+03 -1346 4.60000e+03 4.52500e+03 -1347 4.60000e+03 4.42500e+03 -1348 4.70000e+03 4.42500e+03 -1349 4.70000e+03 4.32500e+03 -1350 4.60000e+03 4.27500e+03 -1351 4.50000e+03 4.17500e+03 -1352 4.60000e+03 4.12500e+03 -1353 4.70000e+03 4.17500e+03 -1354 4.77500e+03 4.27500e+03 -1355 4.87500e+03 4.27500e+03 -1356 4.97500e+03 4.17500e+03 -1357 5.17500e+03 4.17500e+03 -1358 5.27500e+03 4.17500e+03 -1359 5.47500e+03 4.17500e+03 -1360 5.57500e+03 4.27500e+03 -1361 5.67500e+03 4.27500e+03 -1362 5.75000e+03 4.32500e+03 -1363 5.75000e+03 4.42500e+03 -1364 5.75000e+03 4.52500e+03 -1365 5.67500e+03 4.57500e+03 -1366 5.57500e+03 4.57500e+03 -1367 5.77500e+03 4.77500e+03 -1368 5.92500e+03 4.77500e+03 -1369 6.07500e+03 4.72500e+03 -1370 5.95000e+03 4.67500e+03 -1371 5.85000e+03 4.50000e+03 -1372 5.85000e+03 4.40000e+03 -1373 5.85000e+03 4.27500e+03 -1374 5.75000e+03 4.17500e+03 -1375 5.85000e+03 4.12500e+03 -1376 5.95000e+03 4.17500e+03 -1377 6.12500e+03 4.32500e+03 -1378 6.27500e+03 4.32500e+03 -1379 6.22500e+03 4.42500e+03 -1380 6.22500e+03 4.57500e+03 -1381 6.22500e+03 4.67500e+03 -1382 6.22500e+03 4.77500e+03 -1383 6.22500e+03 4.92500e+03 -1384 6.35000e+03 4.92500e+03 -1385 6.35000e+03 5.07500e+03 -1386 6.32200e+03 5.20400e+03 -1387 6.32500e+03 5.32500e+03 -1388 6.22500e+03 5.27500e+03 -1389 6.22500e+03 5.37500e+03 -1390 6.07500e+03 5.37500e+03 -1391 6.07500e+03 5.27500e+03 -1392 6.02500e+03 5.17500e+03 -1393 6.00000e+03 5.02500e+03 -1394 5.87500e+03 4.97500e+03 -1395 5.82500e+03 5.07500e+03 -1396 5.85000e+03 5.17500e+03 -1397 5.80000e+03 5.27500e+03 -1398 5.80000e+03 5.37500e+03 -1399 5.70000e+03 5.17500e+03 -1400 5.42500e+03 5.17500e+03 -1401 5.32500e+03 5.07500e+03 -1402 5.37500e+03 4.97500e+03 -1403 5.22500e+03 4.87500e+03 -1404 5.07500e+03 4.97500e+03 -1405 5.12500e+03 5.07500e+03 -1406 5.22500e+03 5.02500e+03 -1407 5.22500e+03 5.17500e+03 -1408 5.02500e+03 5.17500e+03 -1409 4.87500e+03 5.17500e+03 -1410 4.95000e+03 5.25000e+03 -1411 4.95000e+03 5.35000e+03 -1412 4.92500e+03 5.45000e+03 -1413 5.07500e+03 5.45000e+03 -1414 5.22500e+03 5.45000e+03 -1415 5.37500e+03 5.45000e+03 -1416 5.47500e+03 5.45000e+03 -1417 5.57500e+03 5.45000e+03 -1418 5.42500e+03 6.02500e+03 -1419 5.42500e+03 6.12500e+03 -1420 5.57500e+03 6.12500e+03 -1421 5.72500e+03 6.02500e+03 -1422 5.92500e+03 6.05000e+03 -1423 6.12400e+03 5.90800e+03 -1424 6.30000e+03 5.97500e+03 -1425 6.30000e+03 6.37500e+03 -1426 6.30000e+03 6.57500e+03 -1427 6.07500e+03 6.57500e+03 -1428 5.92500e+03 6.45000e+03 -1429 5.87500e+03 6.67500e+03 -1430 5.97500e+03 6.77500e+03 -1431 5.87500e+03 6.87500e+03 -1432 6.07500e+03 6.97500e+03 -1433 6.27500e+03 6.97500e+03 -1434 6.22500e+03 7.07500e+03 -1435 6.30000e+03 7.15000e+03 -1436 6.02500e+03 7.15000e+03 -1437 5.87500e+03 7.15000e+03 -1438 5.77500e+03 7.32500e+03 -1439 5.82500e+03 7.42500e+03 -1440 5.97500e+03 7.42500e+03 -1441 6.07500e+03 7.47500e+03 -1442 5.97500e+03 7.57500e+03 -1443 6.07500e+03 7.62500e+03 -1444 6.07500e+03 7.72500e+03 -1445 5.92500e+03 7.72500e+03 -1446 5.92500e+03 7.82500e+03 -1447 6.07500e+03 7.82500e+03 -1448 6.22500e+03 7.87500e+03 -1449 6.32500e+03 7.92500e+03 -1450 6.32500e+03 8.07500e+03 -1451 6.22500e+03 8.07500e+03 -1452 6.17500e+03 8.17500e+03 -1453 6.32500e+03 8.22500e+03 -1454 6.32500e+03 8.37500e+03 -1455 6.17500e+03 8.32500e+03 -1456 6.07500e+03 8.32500e+03 -1457 5.97500e+03 8.22500e+03 -1458 5.87500e+03 8.22500e+03 -1459 5.82500e+03 7.97500e+03 -1460 5.67500e+03 7.82500e+03 -1461 5.72500e+03 7.60000e+03 -1462 5.62500e+03 7.57500e+03 -1463 5.67500e+03 7.42500e+03 -1464 5.57500e+03 7.42500e+03 -1465 5.42500e+03 7.42500e+03 -1466 5.42500e+03 7.57500e+03 -1467 5.35000e+03 7.75000e+03 -1468 5.20000e+03 7.75000e+03 -1469 5.32500e+03 7.87500e+03 -1470 5.47500e+03 7.82500e+03 -1471 5.42500e+03 7.92500e+03 -1472 5.52500e+03 7.97500e+03 -1473 5.62500e+03 7.97500e+03 -1474 5.62500e+03 8.07500e+03 -1475 5.52500e+03 8.12500e+03 -1476 5.42500e+03 8.07500e+03 -1477 5.32500e+03 8.02500e+03 -1478 5.32500e+03 8.12500e+03 -1479 5.15000e+03 8.22500e+03 -1480 5.05000e+03 8.22500e+03 -1481 5.12500e+03 8.12500e+03 -1482 5.17500e+03 7.97500e+03 -1483 5.02500e+03 7.97500e+03 -1484 4.90000e+03 7.87500e+03 -1485 4.90000e+03 7.77500e+03 -1486 4.72500e+03 7.82500e+03 -1487 4.52500e+03 7.72500e+03 -1488 4.37500e+03 7.72500e+03 -1489 4.32500e+03 7.62500e+03 -1490 4.47500e+03 7.62500e+03 -1491 4.52500e+03 7.47500e+03 -1492 4.62500e+03 7.57500e+03 -1493 4.72500e+03 7.47500e+03 -1494 4.92500e+03 7.52500e+03 -1495 4.87500e+03 7.42500e+03 -1496 4.82500e+03 7.27500e+03 -1497 4.72500e+03 7.07500e+03 -1498 4.52500e+03 7.07500e+03 -1499 4.62500e+03 6.97500e+03 -1500 4.77500e+03 6.77500e+03 -1501 4.62500e+03 6.77500e+03 -1502 4.47500e+03 6.82500e+03 -1503 4.47500e+03 6.67500e+03 -1504 4.62500e+03 6.42500e+03 -1505 4.52500e+03 6.20000e+03 -1506 4.62500e+03 6.02500e+03 -1507 4.52500e+03 6.00000e+03 -1508 4.12500e+03 6.37500e+03 -1509 4.12500e+03 6.52500e+03 -1510 4.27500e+03 6.52500e+03 -1511 4.27500e+03 6.67500e+03 -1512 4.12500e+03 6.67500e+03 -1513 4.12500e+03 6.87500e+03 -1514 4.12500e+03 7.07500e+03 -1515 4.12600e+03 7.25900e+03 -1516 4.12500e+03 7.26000e+03 -1517 4.12600e+03 7.40900e+03 -1518 4.12500e+03 7.41000e+03 -1519 4.12500e+03 7.56000e+03 -1520 4.12600e+03 7.56000e+03 -1521 4.12500e+03 7.71000e+03 -1522 4.12500e+03 7.71100e+03 -1523 4.22500e+03 7.82500e+03 -1524 4.12500e+03 7.87500e+03 -1525 4.12500e+03 7.97500e+03 -1526 4.12500e+03 8.07500e+03 -1527 4.12500e+03 8.17500e+03 -1528 4.12500e+03 8.27500e+03 -1529 4.12500e+03 8.37500e+03 -1530 4.12500e+03 8.47500e+03 -1531 4.17500e+03 8.82500e+03 -1532 4.37500e+03 8.82500e+03 -1533 4.47800e+03 8.82000e+03 -1534 4.74700e+03 8.70300e+03 -1535 4.77500e+03 8.82500e+03 -1536 4.92500e+03 8.72500e+03 -1537 4.97500e+03 8.82500e+03 -1538 5.07500e+03 8.72500e+03 -1539 5.00000e+03 8.57500e+03 -1540 5.15000e+03 8.37500e+03 -1541 5.15000e+03 8.47500e+03 -1542 5.15000e+03 8.62500e+03 -1543 5.37500e+03 8.77500e+03 -1544 5.47500e+03 8.77500e+03 -1545 5.57500e+03 8.77500e+03 -1546 5.67500e+03 8.77500e+03 -1547 5.82500e+03 8.77500e+03 -1548 5.77500e+03 8.62500e+03 -1549 5.77500e+03 8.52500e+03 -1550 5.87500e+03 8.57500e+03 -1551 6.07500e+03 8.47500e+03 -1552 6.17500e+03 8.42500e+03 -1553 6.25000e+03 8.57500e+03 -1554 6.35000e+03 8.67500e+03 -1555 6.25000e+03 8.77500e+03 -1556 6.22500e+03 9.32500e+03 -1557 6.22500e+03 9.42500e+03 -1558 6.22500e+03 9.52500e+03 -1559 6.22500e+03 9.72500e+03 -1560 6.22500e+03 9.82500e+03 -1561 6.27500e+03 1.00750e+04 -1562 6.02500e+03 1.00750e+04 -1563 5.74800e+03 1.00750e+04 -1564 5.47500e+03 1.00750e+04 -1565 5.33700e+03 9.80100e+03 -1566 5.33500e+03 9.70200e+03 -1567 5.33500e+03 9.60100e+03 -1568 5.33600e+03 9.50200e+03 -1569 5.33600e+03 9.39900e+03 -1570 5.33600e+03 9.29800e+03 -1571 5.07500e+03 9.32500e+03 -1572 5.07500e+03 9.42500e+03 -1573 5.07500e+03 9.52500e+03 -1574 5.07500e+03 9.72500e+03 -1575 5.07500e+03 9.82500e+03 -1576 4.97500e+03 1.00750e+04 -1577 4.70000e+03 1.00750e+04 -1578 4.42500e+03 1.00750e+04 -1579 4.27500e+03 1.01250e+04 -1580 4.19000e+03 9.80600e+03 -1581 4.18900e+03 9.70600e+03 -1582 4.18900e+03 9.60600e+03 -1583 4.19000e+03 9.50500e+03 -1584 4.19000e+03 9.40600e+03 -1585 4.18900e+03 9.30600e+03 -1586 3.67500e+03 9.32500e+03 -1587 3.67500e+03 9.42500e+03 -1588 3.67500e+03 9.52500e+03 -1589 3.67500e+03 9.72500e+03 -1590 3.67500e+03 9.82500e+03 -1591 3.72500e+03 1.00750e+04 -1592 3.47500e+03 1.00750e+04 -1593 3.19800e+03 1.00750e+04 -1594 2.92500e+03 1.00750e+04 -1595 2.78700e+03 9.80100e+03 -1596 2.78500e+03 9.70200e+03 -1597 2.78500e+03 9.60100e+03 -1598 2.78600e+03 9.50200e+03 -1599 2.78600e+03 9.39900e+03 -1600 2.78600e+03 9.29800e+03 -1601 2.52500e+03 9.32500e+03 -1602 2.52500e+03 9.42500e+03 -1603 2.52500e+03 9.52500e+03 -1604 2.52500e+03 9.72500e+03 -1605 2.52500e+03 9.82500e+03 -1606 2.42500e+03 1.00750e+04 -1607 2.15000e+03 1.00750e+04 -1608 2.45000e+03 1.04750e+04 -1609 2.90000e+03 1.04750e+04 -1610 2.90000e+03 1.08750e+04 -1611 2.90000e+03 1.10750e+04 -1612 3.27500e+03 1.10250e+04 -1613 3.27500e+03 1.11250e+04 -1614 3.37500e+03 1.11250e+04 -1615 3.47500e+03 1.10750e+04 -1616 3.47500e+03 1.09750e+04 -1617 3.65000e+03 1.09750e+04 -1618 3.75000e+03 1.07750e+04 -1619 3.75000e+03 1.06250e+04 -1620 3.75000e+03 1.04750e+04 -1621 3.75000e+03 1.03750e+04 -1622 3.72500e+03 1.02750e+04 -1623 4.15000e+03 1.04250e+04 -1624 4.15000e+03 1.05250e+04 -1625 4.15000e+03 1.06250e+04 -1626 4.15000e+03 1.07250e+04 -1627 4.15000e+03 1.08500e+04 -1628 4.17500e+03 1.10500e+04 -1629 4.32500e+03 1.10250e+04 -1630 4.45000e+03 1.10250e+04 -1631 4.52500e+03 1.11250e+04 -1632 4.62500e+03 1.10250e+04 -1633 4.62500e+03 1.11250e+04 -1634 4.60000e+03 1.12750e+04 -1635 4.70000e+03 1.13250e+04 -1636 4.60000e+03 1.14250e+04 -1637 4.50000e+03 1.13250e+04 -1638 4.27500e+03 1.14250e+04 -1639 4.17500e+03 1.14250e+04 -1640 4.22500e+03 1.15250e+04 -1641 4.30000e+03 1.16000e+04 -1642 4.30000e+03 1.17000e+04 -1643 4.22500e+03 1.16500e+04 -1644 4.11500e+03 1.17100e+04 -1645 4.11500e+03 1.18600e+04 -1646 4.27500e+03 1.19250e+04 -1647 4.11500e+03 1.20100e+04 -1648 4.11500e+03 1.21600e+04 -1649 4.11500e+03 1.23100e+04 -1650 4.11500e+03 1.24600e+04 -1651 4.11500e+03 1.26100e+04 -1652 4.11500e+03 1.27600e+04 -1653 4.37500e+03 1.28250e+04 -1654 4.37500e+03 1.26750e+04 -1655 4.37500e+03 1.25750e+04 -1656 4.37500e+03 1.24250e+04 -1657 4.37500e+03 1.21750e+04 -1658 4.47500e+03 1.22250e+04 -1659 4.62500e+03 1.22250e+04 -1660 4.57500e+03 1.21250e+04 -1661 4.47500e+03 1.20750e+04 -1662 4.42500e+03 1.19250e+04 -1663 4.50000e+03 1.18250e+04 -1664 4.52500e+03 1.19250e+04 -1665 4.67500e+03 1.19250e+04 -1666 4.87500e+03 1.17500e+04 -1667 4.77500e+03 1.17500e+04 -1668 4.70000e+03 1.16750e+04 -1669 4.60000e+03 1.16750e+04 -1670 4.60000e+03 1.15750e+04 -1671 4.70000e+03 1.15750e+04 -1672 4.70000e+03 1.14750e+04 -1673 4.77500e+03 1.14250e+04 -1674 4.87500e+03 1.14250e+04 -1675 4.97500e+03 1.13250e+04 -1676 5.17500e+03 1.13250e+04 -1677 5.27500e+03 1.13250e+04 -1678 5.00000e+03 1.10750e+04 -1679 5.00000e+03 1.08750e+04 -1680 5.00000e+03 1.04750e+04 -1681 5.45000e+03 1.04750e+04 -1682 5.45000e+03 1.08750e+04 -1683 5.45000e+03 1.10750e+04 -1684 5.47500e+03 1.13250e+04 -1685 5.57500e+03 1.14250e+04 -1686 5.67500e+03 1.14250e+04 -1687 5.75000e+03 1.14750e+04 -1688 5.75000e+03 1.15750e+04 -1689 5.85000e+03 1.15500e+04 -1690 5.85000e+03 1.16500e+04 -1691 5.75000e+03 1.16750e+04 -1692 5.67500e+03 1.17250e+04 -1693 5.57500e+03 1.17250e+04 -1694 5.77500e+03 1.19250e+04 -1695 5.92500e+03 1.19250e+04 -1696 5.95000e+03 1.18250e+04 -1697 6.07500e+03 1.18750e+04 -1698 6.22500e+03 1.17250e+04 -1699 6.22500e+03 1.18250e+04 -1700 6.22500e+03 1.19250e+04 -1701 6.22500e+03 1.20750e+04 -1702 6.35000e+03 1.20750e+04 -1703 6.35000e+03 1.22250e+04 -1704 6.32200e+03 1.23540e+04 -1705 6.32500e+03 1.24750e+04 -1706 6.22500e+03 1.24250e+04 -1707 6.22500e+03 1.25250e+04 -1708 6.07500e+03 1.25250e+04 -1709 6.07500e+03 1.24250e+04 -1710 6.02500e+03 1.23250e+04 -1711 6.00000e+03 1.21750e+04 -1712 5.87500e+03 1.21250e+04 -1713 5.82500e+03 1.22250e+04 -1714 5.85000e+03 1.23250e+04 -1715 5.80000e+03 1.24250e+04 -1716 5.80000e+03 1.25250e+04 -1717 5.70000e+03 1.23250e+04 -1718 5.42500e+03 1.23250e+04 -1719 5.32500e+03 1.22250e+04 -1720 5.37500e+03 1.21250e+04 -1721 5.22500e+03 1.20250e+04 -1722 5.07500e+03 1.21250e+04 -1723 5.12500e+03 1.22250e+04 -1724 5.22500e+03 1.21750e+04 -1725 5.22500e+03 1.23250e+04 -1726 5.02500e+03 1.23250e+04 -1727 4.87500e+03 1.23250e+04 -1728 4.95000e+03 1.24000e+04 -1729 4.95000e+03 1.25000e+04 -1730 4.92500e+03 1.26000e+04 -1731 5.07500e+03 1.26000e+04 -1732 5.22500e+03 1.26000e+04 -1733 5.37500e+03 1.26000e+04 -1734 5.47500e+03 1.26000e+04 -1735 5.57500e+03 1.26000e+04 -1736 5.42500e+03 1.31750e+04 -1737 5.42500e+03 1.32750e+04 -1738 5.57500e+03 1.32750e+04 -1739 5.72500e+03 1.31750e+04 -1740 5.92500e+03 1.32000e+04 -1741 6.12400e+03 1.30580e+04 -1742 6.30000e+03 1.31250e+04 -1743 6.30000e+03 1.35250e+04 -1744 6.30000e+03 1.37250e+04 -1745 6.07500e+03 1.37250e+04 -1746 5.92500e+03 1.36000e+04 -1747 5.87500e+03 1.38250e+04 -1748 5.97500e+03 1.39250e+04 -1749 5.87500e+03 1.40250e+04 -1750 6.07500e+03 1.41250e+04 -1751 6.27500e+03 1.41250e+04 -1752 6.22500e+03 1.42250e+04 -1753 6.30000e+03 1.43000e+04 -1754 6.02500e+03 1.43000e+04 -1755 5.87500e+03 1.43000e+04 -1756 5.77500e+03 1.44750e+04 -1757 5.82500e+03 1.45750e+04 -1758 5.72500e+03 1.47500e+04 -1759 5.62500e+03 1.47250e+04 -1760 5.67500e+03 1.45750e+04 -1761 5.57500e+03 1.45750e+04 -1762 5.42500e+03 1.45750e+04 -1763 5.42500e+03 1.47250e+04 -1764 5.35000e+03 1.49000e+04 -1765 5.20000e+03 1.49000e+04 -1766 5.32500e+03 1.50250e+04 -1767 5.32500e+03 1.51750e+04 -1768 5.32500e+03 1.52750e+04 -1769 5.42500e+03 1.52250e+04 -1770 5.52500e+03 1.52750e+04 -1771 5.62500e+03 1.52250e+04 -1772 5.62500e+03 1.51250e+04 -1773 5.52500e+03 1.51250e+04 -1774 5.42500e+03 1.50750e+04 -1775 5.47500e+03 1.49750e+04 -1776 5.67500e+03 1.49750e+04 -1777 5.82500e+03 1.51250e+04 -1778 5.92500e+03 1.49750e+04 -1779 5.92500e+03 1.48750e+04 -1780 5.97500e+03 1.47250e+04 -1781 5.97500e+03 1.45750e+04 -1782 6.07500e+03 1.46250e+04 -1783 6.07500e+03 1.47750e+04 -1784 6.07500e+03 1.48750e+04 -1785 6.07500e+03 1.49750e+04 -1786 6.22500e+03 1.50250e+04 -1787 6.32500e+03 1.50750e+04 -1788 6.32500e+03 1.52250e+04 -1789 6.22500e+03 1.52250e+04 -1790 6.17500e+03 1.53250e+04 -1791 6.32500e+03 1.53750e+04 -1792 6.32500e+03 1.55250e+04 -1793 6.25000e+03 1.57250e+04 -1794 6.35000e+03 1.58250e+04 -1795 6.25000e+03 1.59250e+04 -1796 6.07500e+03 1.56250e+04 -1797 6.17500e+03 1.55750e+04 -1798 6.17500e+03 1.54750e+04 -1799 6.07500e+03 1.54750e+04 -1800 5.97500e+03 1.53750e+04 -1801 5.87500e+03 1.53750e+04 -1802 5.77500e+03 1.56750e+04 -1803 5.87500e+03 1.57250e+04 -1804 5.77500e+03 1.57750e+04 -1805 5.82500e+03 1.59250e+04 -1806 5.67500e+03 1.59250e+04 -1807 5.57500e+03 1.59250e+04 -1808 5.47500e+03 1.59250e+04 -1809 5.37500e+03 1.59250e+04 -1810 5.15000e+03 1.57750e+04 -1811 5.07500e+03 1.58750e+04 -1812 4.97500e+03 1.59750e+04 -1813 4.77500e+03 1.59750e+04 -1814 4.74700e+03 1.58530e+04 -1815 4.92500e+03 1.58750e+04 -1816 5.00000e+03 1.57250e+04 -1817 5.15000e+03 1.56250e+04 -1818 5.15000e+03 1.55250e+04 -1819 5.15000e+03 1.53750e+04 -1820 5.05000e+03 1.53750e+04 -1821 5.12500e+03 1.52750e+04 -1822 5.17500e+03 1.51250e+04 -1823 5.02500e+03 1.51250e+04 -1824 4.90000e+03 1.50250e+04 -1825 4.90000e+03 1.49250e+04 -1826 4.72500e+03 1.49750e+04 -1827 4.52500e+03 1.48750e+04 -1828 4.37500e+03 1.48750e+04 -1829 4.32500e+03 1.47750e+04 -1830 4.47500e+03 1.47750e+04 -1831 4.52500e+03 1.46250e+04 -1832 4.62500e+03 1.47250e+04 -1833 4.72500e+03 1.46250e+04 -1834 4.92500e+03 1.46750e+04 -1835 4.87500e+03 1.45750e+04 -1836 4.82500e+03 1.44250e+04 -1837 4.72500e+03 1.42250e+04 -1838 4.52500e+03 1.42250e+04 -1839 4.62500e+03 1.41250e+04 -1840 4.77500e+03 1.39250e+04 -1841 4.62500e+03 1.39250e+04 -1842 4.47500e+03 1.39750e+04 -1843 4.47500e+03 1.38250e+04 -1844 4.62500e+03 1.35750e+04 -1845 4.52500e+03 1.33500e+04 -1846 4.62500e+03 1.31750e+04 -1847 4.52500e+03 1.31500e+04 -1848 4.12500e+03 1.35250e+04 -1849 4.12500e+03 1.36750e+04 -1850 4.27500e+03 1.36750e+04 -1851 4.27500e+03 1.38250e+04 -1852 4.12500e+03 1.38250e+04 -1853 4.12500e+03 1.40250e+04 -1854 4.12500e+03 1.42250e+04 -1855 4.12600e+03 1.44090e+04 -1856 4.12500e+03 1.44100e+04 -1857 4.12600e+03 1.45590e+04 -1858 4.12500e+03 1.45600e+04 -1859 4.12500e+03 1.47100e+04 -1860 4.12600e+03 1.47100e+04 -1861 4.12500e+03 1.48600e+04 -1862 4.12500e+03 1.48610e+04 -1863 4.22500e+03 1.49750e+04 -1864 4.12500e+03 1.50250e+04 -1865 4.12500e+03 1.51250e+04 -1866 4.12500e+03 1.52250e+04 -1867 4.12500e+03 1.53250e+04 -1868 4.12500e+03 1.54250e+04 -1869 4.12500e+03 1.55250e+04 -1870 4.12500e+03 1.56250e+04 -1871 4.47800e+03 1.59700e+04 -1872 4.37500e+03 1.59750e+04 -1873 4.17500e+03 1.59750e+04 -1874 3.80000e+03 1.58250e+04 -1875 3.70000e+03 1.59250e+04 -1876 3.70000e+03 1.57250e+04 -1877 3.62500e+03 1.55750e+04 -1878 3.52500e+03 1.56250e+04 -1879 3.32500e+03 1.57250e+04 -1880 3.22500e+03 1.56750e+04 -1881 3.22500e+03 1.57750e+04 -1882 3.27500e+03 1.59250e+04 -1883 3.12500e+03 1.59250e+04 -1884 3.02500e+03 1.59250e+04 -1885 2.92500e+03 1.59250e+04 -1886 2.82500e+03 1.59250e+04 -1887 2.60000e+03 1.57750e+04 -1888 2.60000e+03 1.56250e+04 -1889 2.60000e+03 1.55250e+04 -1890 2.45000e+03 1.57250e+04 -1891 2.52500e+03 1.58750e+04 -1892 2.42500e+03 1.59750e+04 -1893 2.37500e+03 1.58750e+04 -1894 2.22500e+03 1.59750e+04 -1895 2.19700e+03 1.58530e+04 -1896 1.92800e+03 1.59700e+04 -1897 1.82500e+03 1.59750e+04 -1898 1.62500e+03 1.59750e+04 -1899 1.57500e+03 1.56250e+04 -1900 1.57500e+03 1.55250e+04 -1901 1.57500e+03 1.54250e+04 -1902 1.57500e+03 1.53250e+04 -1903 1.57500e+03 1.52250e+04 -1904 1.57500e+03 1.51250e+04 -1905 1.57500e+03 1.50250e+04 -1906 1.67500e+03 1.49750e+04 -1907 1.57500e+03 1.48610e+04 -1908 1.57500e+03 1.48600e+04 -1909 1.57500e+03 1.47100e+04 -1910 1.57600e+03 1.47100e+04 -1911 1.57500e+03 1.45600e+04 -1912 1.57600e+03 1.45590e+04 -1913 1.57500e+03 1.44100e+04 -1914 1.57600e+03 1.44090e+04 -1915 1.57500e+03 1.42250e+04 -1916 1.57500e+03 1.40250e+04 -1917 1.57500e+03 1.38250e+04 -1918 1.72500e+03 1.38250e+04 -1919 1.72500e+03 1.36750e+04 -1920 1.57500e+03 1.36750e+04 -1921 1.57500e+03 1.35250e+04 -1922 1.97500e+03 1.31500e+04 -1923 2.07500e+03 1.31750e+04 -1924 1.97500e+03 1.33500e+04 -1925 2.07500e+03 1.35750e+04 -1926 1.92500e+03 1.38250e+04 -1927 1.92500e+03 1.39750e+04 -1928 2.07500e+03 1.39250e+04 -1929 2.22500e+03 1.39250e+04 -1930 2.07500e+03 1.41250e+04 -1931 1.97500e+03 1.42250e+04 -1932 2.17500e+03 1.42250e+04 -1933 2.27500e+03 1.44250e+04 -1934 2.32500e+03 1.45750e+04 -1935 2.37500e+03 1.46750e+04 -1936 2.17500e+03 1.46250e+04 -1937 2.07500e+03 1.47250e+04 -1938 1.97500e+03 1.46250e+04 -1939 1.92500e+03 1.47750e+04 -1940 1.77500e+03 1.47750e+04 -1941 1.82500e+03 1.48750e+04 -1942 1.97500e+03 1.48750e+04 -1943 2.17500e+03 1.49750e+04 -1944 2.35000e+03 1.49250e+04 -1945 2.35000e+03 1.50250e+04 -1946 2.47500e+03 1.51250e+04 -1947 2.62500e+03 1.51250e+04 -1948 2.57500e+03 1.52750e+04 -1949 2.50000e+03 1.53750e+04 -1950 2.60000e+03 1.53750e+04 -1951 2.77500e+03 1.52750e+04 -1952 2.77500e+03 1.51750e+04 -1953 2.87500e+03 1.52250e+04 -1954 2.97500e+03 1.52750e+04 -1955 3.07500e+03 1.52250e+04 -1956 3.07500e+03 1.51250e+04 -1957 2.97500e+03 1.51250e+04 -1958 2.92500e+03 1.49750e+04 -1959 2.87500e+03 1.50750e+04 -1960 2.77500e+03 1.50250e+04 -1961 2.65000e+03 1.49000e+04 -1962 2.80000e+03 1.49000e+04 -1963 2.87500e+03 1.47250e+04 -1964 2.87500e+03 1.45750e+04 -1965 3.02500e+03 1.45750e+04 -1966 3.12500e+03 1.45750e+04 -1967 3.07500e+03 1.47250e+04 -1968 3.17500e+03 1.47500e+04 -1969 3.12500e+03 1.49750e+04 -1970 3.27500e+03 1.51250e+04 -1971 3.32500e+03 1.53750e+04 -1972 3.42500e+03 1.53750e+04 -1973 3.52500e+03 1.54750e+04 -1974 3.62500e+03 1.54750e+04 -1975 3.77500e+03 1.55250e+04 -1976 3.77500e+03 1.53750e+04 -1977 3.62500e+03 1.53250e+04 -1978 3.67500e+03 1.52250e+04 -1979 3.77500e+03 1.52250e+04 -1980 3.77500e+03 1.50750e+04 -1981 3.67500e+03 1.50250e+04 -1982 3.52500e+03 1.49750e+04 -1983 3.37500e+03 1.49750e+04 -1984 3.37500e+03 1.48750e+04 -1985 3.52500e+03 1.48750e+04 -1986 3.52500e+03 1.47750e+04 -1987 3.42500e+03 1.47250e+04 -1988 3.52500e+03 1.46250e+04 -1989 3.42500e+03 1.45750e+04 -1990 3.27500e+03 1.45750e+04 -1991 3.22500e+03 1.44750e+04 -1992 3.32500e+03 1.43000e+04 -1993 3.47500e+03 1.43000e+04 -1994 3.75000e+03 1.43000e+04 -1995 3.67500e+03 1.42250e+04 -1996 3.72500e+03 1.41250e+04 -1997 3.52500e+03 1.41250e+04 -1998 3.32500e+03 1.40250e+04 -1999 3.42500e+03 1.39250e+04 -2000 3.32500e+03 1.38250e+04 -2001 3.37500e+03 1.36000e+04 -2002 3.52500e+03 1.37250e+04 -2003 3.75000e+03 1.37250e+04 -2004 3.75000e+03 1.35250e+04 -2005 3.75000e+03 1.31250e+04 -2006 3.57400e+03 1.30580e+04 -2007 3.37500e+03 1.32000e+04 -2008 3.17500e+03 1.31750e+04 -2009 3.02500e+03 1.32750e+04 -2010 2.87500e+03 1.32750e+04 -2011 2.87500e+03 1.31750e+04 -2012 3.02500e+03 1.26000e+04 -2013 2.92500e+03 1.26000e+04 -2014 2.82500e+03 1.26000e+04 -2015 2.67500e+03 1.26000e+04 -2016 2.52500e+03 1.26000e+04 -2017 2.37500e+03 1.26000e+04 -2018 2.40000e+03 1.25000e+04 -2019 2.40000e+03 1.24000e+04 -2020 2.32500e+03 1.23250e+04 -2021 2.47500e+03 1.23250e+04 -2022 2.57500e+03 1.22250e+04 -2023 2.52500e+03 1.21250e+04 -2024 2.67500e+03 1.20250e+04 -2025 2.82500e+03 1.21250e+04 -2026 2.77500e+03 1.22250e+04 -2027 2.67500e+03 1.21750e+04 -2028 2.67500e+03 1.23250e+04 -2029 2.87500e+03 1.23250e+04 -2030 3.15000e+03 1.23250e+04 -2031 3.25000e+03 1.25250e+04 -2032 3.25000e+03 1.24250e+04 -2033 3.30000e+03 1.23250e+04 -2034 3.27500e+03 1.22250e+04 -2035 3.32500e+03 1.21250e+04 -2036 3.45000e+03 1.21750e+04 -2037 3.47500e+03 1.23250e+04 -2038 3.52500e+03 1.24250e+04 -2039 3.52500e+03 1.25250e+04 -2040 3.67500e+03 1.25250e+04 -2041 3.67500e+03 1.24250e+04 -2042 3.77500e+03 1.24750e+04 -2043 3.77200e+03 1.23540e+04 -2044 3.80000e+03 1.22250e+04 -2045 3.80000e+03 1.20750e+04 -2046 3.67500e+03 1.20750e+04 -2047 3.67500e+03 1.19250e+04 -2048 3.67500e+03 1.18250e+04 -2049 3.67500e+03 1.17250e+04 -2050 3.67500e+03 1.15750e+04 -2051 3.72500e+03 1.14750e+04 -2052 3.57500e+03 1.14750e+04 -2053 3.40000e+03 1.13250e+04 -2054 3.30000e+03 1.12750e+04 -2055 3.20000e+03 1.13250e+04 -2056 3.30000e+03 1.14250e+04 -2057 3.30000e+03 1.15500e+04 -2058 3.30000e+03 1.16500e+04 -2059 3.40000e+03 1.18250e+04 -2060 3.52500e+03 1.18750e+04 -2061 3.37500e+03 1.19250e+04 -2062 3.22500e+03 1.19250e+04 -2063 3.02500e+03 1.17250e+04 -2064 3.12500e+03 1.17250e+04 -2065 3.20000e+03 1.16750e+04 -2066 3.20000e+03 1.15750e+04 -2067 3.20000e+03 1.14750e+04 -2068 3.12500e+03 1.14250e+04 -2069 3.02500e+03 1.14250e+04 -2070 2.92500e+03 1.13250e+04 -2071 2.72500e+03 1.13250e+04 -2072 2.62500e+03 1.13250e+04 -2073 2.45000e+03 1.08750e+04 -2074 2.45000e+03 1.10750e+04 -2075 2.42500e+03 1.13250e+04 -2076 2.32500e+03 1.14250e+04 -2077 2.22500e+03 1.14250e+04 -2078 2.15000e+03 1.14750e+04 -2079 2.15000e+03 1.15750e+04 -2080 2.05000e+03 1.15750e+04 -2081 2.05000e+03 1.16750e+04 -2082 2.15000e+03 1.16750e+04 -2083 2.22500e+03 1.17500e+04 -2084 2.32500e+03 1.17500e+04 -2085 2.12500e+03 1.19250e+04 -2086 1.97500e+03 1.19250e+04 -2087 1.95000e+03 1.18250e+04 -2088 1.87500e+03 1.19250e+04 -2089 1.92500e+03 1.20750e+04 -2090 2.02500e+03 1.21250e+04 -2091 2.07500e+03 1.22250e+04 -2092 1.92500e+03 1.22250e+04 -2093 1.82500e+03 1.21750e+04 -2094 1.82500e+03 1.24250e+04 -2095 1.82500e+03 1.25750e+04 -2096 1.82500e+03 1.26750e+04 -2097 1.82500e+03 1.28250e+04 -2098 1.56500e+03 1.27600e+04 -2099 1.56500e+03 1.26100e+04 -2100 1.56500e+03 1.24600e+04 -2101 1.56500e+03 1.23100e+04 -2102 1.56500e+03 1.21600e+04 -2103 1.56500e+03 1.20100e+04 -2104 1.72500e+03 1.19250e+04 -2105 1.56500e+03 1.18600e+04 -2106 1.56500e+03 1.17100e+04 -2107 1.67500e+03 1.16500e+04 -2108 1.75000e+03 1.17000e+04 -2109 1.75000e+03 1.16000e+04 -2110 1.67500e+03 1.15250e+04 -2111 1.62500e+03 1.14250e+04 -2112 1.72500e+03 1.14250e+04 -2113 1.95000e+03 1.13250e+04 -2114 2.05000e+03 1.14250e+04 -2115 2.15000e+03 1.13250e+04 -2116 2.05000e+03 1.12750e+04 -2117 2.07500e+03 1.11250e+04 -2118 2.07500e+03 1.10250e+04 -2119 1.97500e+03 1.11250e+04 -2120 1.90000e+03 1.10250e+04 -2121 1.77500e+03 1.10250e+04 -2122 1.62500e+03 1.10500e+04 -2123 1.60000e+03 1.08500e+04 -2124 1.60000e+03 1.07250e+04 -2125 1.60000e+03 1.06250e+04 -2126 1.60000e+03 1.05250e+04 -2127 1.60000e+03 1.04250e+04 -2128 1.72500e+03 1.01250e+04 -2129 1.87500e+03 1.00750e+04 -2130 1.64000e+03 9.80600e+03 -2131 1.63900e+03 9.70600e+03 -2132 1.63900e+03 9.60600e+03 -2133 1.64000e+03 9.50500e+03 -2134 1.64000e+03 9.40600e+03 -2135 1.63900e+03 9.30600e+03 -2136 1.92800e+03 8.82000e+03 -2137 1.82500e+03 8.82500e+03 -2138 1.62500e+03 8.82500e+03 -2139 1.57500e+03 8.47500e+03 -2140 1.57500e+03 8.37500e+03 -2141 1.57500e+03 8.27500e+03 -2142 1.57500e+03 8.17500e+03 -2143 1.57500e+03 8.07500e+03 -2144 1.57500e+03 7.97500e+03 -2145 1.57500e+03 7.87500e+03 -2146 1.67500e+03 7.82500e+03 -2147 1.57500e+03 7.71100e+03 -2148 1.57500e+03 7.71000e+03 -2149 1.57600e+03 7.56000e+03 -2150 1.57500e+03 7.56000e+03 -2151 1.57500e+03 7.41000e+03 -2152 1.57600e+03 7.40900e+03 -2153 1.57500e+03 7.26000e+03 -2154 1.57600e+03 7.25900e+03 -2155 1.57500e+03 7.07500e+03 -2156 1.57500e+03 6.87500e+03 -2157 1.57500e+03 6.67500e+03 -2158 1.72500e+03 6.67500e+03 -2159 1.72500e+03 6.52500e+03 -2160 1.57500e+03 6.52500e+03 -2161 1.57500e+03 6.37500e+03 -2162 1.97500e+03 6.00000e+03 -2163 2.07500e+03 6.02500e+03 -2164 1.97500e+03 6.20000e+03 -2165 2.07500e+03 6.42500e+03 -2166 1.92500e+03 6.67500e+03 -2167 1.92500e+03 6.82500e+03 -2168 2.07500e+03 6.77500e+03 -2169 2.22500e+03 6.77500e+03 -2170 2.07500e+03 6.97500e+03 -2171 1.97500e+03 7.07500e+03 -2172 2.17500e+03 7.07500e+03 -2173 2.27500e+03 7.27500e+03 -2174 2.32500e+03 7.42500e+03 -2175 2.37500e+03 7.52500e+03 -2176 2.17500e+03 7.47500e+03 -2177 2.07500e+03 7.57500e+03 -2178 1.97500e+03 7.47500e+03 -2179 1.92500e+03 7.62500e+03 -2180 1.77500e+03 7.62500e+03 -2181 1.82500e+03 7.72500e+03 -2182 1.97500e+03 7.72500e+03 -2183 2.17500e+03 7.82500e+03 -2184 2.35000e+03 7.77500e+03 -2185 2.35000e+03 7.87500e+03 -2186 2.47500e+03 7.97500e+03 -2187 2.62500e+03 7.97500e+03 -2188 2.57500e+03 8.12500e+03 -2189 2.50000e+03 8.22500e+03 -2190 2.60000e+03 8.22500e+03 -2191 2.60000e+03 8.37500e+03 -2192 2.60000e+03 8.47500e+03 -2193 2.45000e+03 8.57500e+03 -2194 2.37500e+03 8.72500e+03 -2195 2.19700e+03 8.70300e+03 -2196 2.22500e+03 8.82500e+03 -2197 2.42500e+03 8.82500e+03 -2198 2.52500e+03 8.72500e+03 -2199 2.60000e+03 8.62500e+03 -2200 2.82500e+03 8.77500e+03 -2201 2.92500e+03 8.77500e+03 -2202 3.02500e+03 8.77500e+03 -2203 3.12500e+03 8.77500e+03 -2204 3.27500e+03 8.77500e+03 -2205 3.22500e+03 8.62500e+03 -2206 3.32500e+03 8.57500e+03 -2207 3.22500e+03 8.52500e+03 -2208 3.32500e+03 8.22500e+03 -2209 3.42500e+03 8.22500e+03 -2210 3.52500e+03 8.32500e+03 -2211 3.62500e+03 8.32500e+03 -2212 3.62500e+03 8.42500e+03 -2213 3.52500e+03 8.47500e+03 -2214 3.70000e+03 8.77500e+03 -2215 3.80000e+03 8.67500e+03 -2216 3.70000e+03 8.57500e+03 -2217 3.77500e+03 8.37500e+03 -2218 3.77500e+03 8.22500e+03 -2219 3.62500e+03 8.17500e+03 -2220 3.67500e+03 8.07500e+03 -2221 3.77500e+03 8.07500e+03 -2222 3.77500e+03 7.92500e+03 -2223 3.67500e+03 7.87500e+03 -2224 3.52500e+03 7.82500e+03 -2225 3.52500e+03 7.72500e+03 -2226 3.52500e+03 7.62500e+03 -2227 3.52500e+03 7.47500e+03 -2228 3.42500e+03 7.42500e+03 -2229 3.42500e+03 7.57500e+03 -2230 3.37500e+03 7.72500e+03 -2231 3.37500e+03 7.82500e+03 -2232 3.27500e+03 7.97500e+03 -2233 3.12500e+03 7.82500e+03 -2234 2.92500e+03 7.82500e+03 -2235 2.87500e+03 7.92500e+03 -2236 2.97500e+03 7.97500e+03 -2237 3.07500e+03 7.97500e+03 -2238 3.07500e+03 8.07500e+03 -2239 2.97500e+03 8.12500e+03 -2240 2.87500e+03 8.07500e+03 -2241 2.77500e+03 8.12500e+03 -2242 2.77500e+03 8.02500e+03 -2243 2.77500e+03 7.87500e+03 -2244 2.65000e+03 7.75000e+03 -2245 2.80000e+03 7.75000e+03 -2246 2.87500e+03 7.57500e+03 -2247 2.87500e+03 7.42500e+03 -2248 3.02500e+03 7.42500e+03 -2249 3.12500e+03 7.42500e+03 -2250 3.07500e+03 7.57500e+03 -2251 3.17500e+03 7.60000e+03 -2252 3.27500e+03 7.42500e+03 -2253 3.22500e+03 7.32500e+03 -2254 3.32500e+03 7.15000e+03 -2255 3.47500e+03 7.15000e+03 -2256 3.75000e+03 7.15000e+03 -2257 3.67500e+03 7.07500e+03 -2258 3.72500e+03 6.97500e+03 -2259 3.52500e+03 6.97500e+03 -2260 3.32500e+03 6.87500e+03 -2261 3.42500e+03 6.77500e+03 -2262 3.32500e+03 6.67500e+03 -2263 3.37500e+03 6.45000e+03 -2264 3.52500e+03 6.57500e+03 -2265 3.75000e+03 6.57500e+03 -2266 3.75000e+03 6.37500e+03 -2267 3.75000e+03 5.97500e+03 -2268 3.57400e+03 5.90800e+03 -2269 3.37500e+03 6.05000e+03 -2270 3.17500e+03 6.02500e+03 -2271 3.02500e+03 6.12500e+03 -2272 2.87500e+03 6.12500e+03 -2273 2.87500e+03 6.02500e+03 -2274 3.02500e+03 5.45000e+03 -2275 2.92500e+03 5.45000e+03 -2276 2.82500e+03 5.45000e+03 -2277 2.67500e+03 5.45000e+03 -2278 2.52500e+03 5.45000e+03 -2279 2.37500e+03 5.45000e+03 -2280 2.40000e+03 5.35000e+03 -2281 2.40000e+03 5.25000e+03 -2282 2.32500e+03 5.17500e+03 -2283 2.47500e+03 5.17500e+03 -2284 2.57500e+03 5.07500e+03 -2285 2.52500e+03 4.97500e+03 -2286 2.67500e+03 4.87500e+03 -2287 2.82500e+03 4.97500e+03 -2288 2.77500e+03 5.07500e+03 -2289 2.67500e+03 5.02500e+03 -2290 2.67500e+03 5.17500e+03 -2291 2.87500e+03 5.17500e+03 -2292 3.15000e+03 5.17500e+03 -2293 3.25000e+03 5.37500e+03 -2294 3.25000e+03 5.27500e+03 -2295 3.30000e+03 5.17500e+03 -2296 3.27500e+03 5.07500e+03 -2297 3.32500e+03 4.97500e+03 -2298 3.45000e+03 5.02500e+03 -2299 3.47500e+03 5.17500e+03 -2300 3.52500e+03 5.27500e+03 -2301 3.52500e+03 5.37500e+03 -2302 3.67500e+03 5.37500e+03 -2303 3.67500e+03 5.27500e+03 -2304 3.77500e+03 5.32500e+03 -2305 3.77200e+03 5.20400e+03 -2306 3.80000e+03 5.07500e+03 -2307 3.80000e+03 4.92500e+03 -2308 3.67500e+03 4.92500e+03 -2309 3.67500e+03 4.77500e+03 -2310 3.67500e+03 4.67500e+03 -2311 3.67500e+03 4.57500e+03 -2312 3.52500e+03 4.72500e+03 -2313 3.40000e+03 4.67500e+03 -2314 3.37500e+03 4.77500e+03 -2315 3.22500e+03 4.77500e+03 -2316 3.02500e+03 4.57500e+03 -2317 3.12500e+03 4.57500e+03 -2318 3.20000e+03 4.52500e+03 -2319 3.30000e+03 4.50000e+03 -2320 3.30000e+03 4.40000e+03 -2321 3.20000e+03 4.42500e+03 -2322 3.20000e+03 4.32500e+03 -2323 3.12500e+03 4.27500e+03 -2324 3.02500e+03 4.27500e+03 -2325 2.92500e+03 4.17500e+03 -2326 2.90000e+03 3.92500e+03 -2327 2.90000e+03 3.72500e+03 -2328 2.90000e+03 3.32500e+03 -2329 2.45000e+03 3.32500e+03 -2330 2.45000e+03 3.72500e+03 -2331 2.45000e+03 3.92500e+03 -2332 2.72500e+03 4.17500e+03 -2333 2.62500e+03 4.17500e+03 -2334 2.42500e+03 4.17500e+03 -2335 2.32500e+03 4.27500e+03 -2336 2.22500e+03 4.27500e+03 -2337 2.15000e+03 4.32500e+03 -2338 2.15000e+03 4.42500e+03 -2339 2.05000e+03 4.42500e+03 -2340 2.05000e+03 4.52500e+03 -2341 2.15000e+03 4.52500e+03 -2342 2.22500e+03 4.60000e+03 -2343 2.32500e+03 4.60000e+03 -2344 2.12500e+03 4.77500e+03 -2345 1.97500e+03 4.77500e+03 -2346 1.95000e+03 4.67500e+03 -2347 1.87500e+03 4.77500e+03 -2348 1.92500e+03 4.92500e+03 -2349 2.02500e+03 4.97500e+03 -2350 2.07500e+03 5.07500e+03 -2351 1.92500e+03 5.07500e+03 -2352 1.82500e+03 5.02500e+03 -2353 1.82500e+03 5.27500e+03 -2354 1.82500e+03 5.42500e+03 -2355 1.82500e+03 5.52500e+03 -2356 1.82500e+03 5.67500e+03 -2357 1.56500e+03 5.61000e+03 -2358 1.56500e+03 5.46000e+03 -2359 1.56500e+03 5.31000e+03 -2360 1.56500e+03 5.16000e+03 -2361 1.56500e+03 5.01000e+03 -2362 1.56500e+03 4.86000e+03 -2363 1.72500e+03 4.77500e+03 -2364 1.56500e+03 4.71000e+03 -2365 1.56500e+03 4.56000e+03 -2366 1.67500e+03 4.50000e+03 -2367 1.75000e+03 4.55000e+03 -2368 1.75000e+03 4.45000e+03 -2369 1.67500e+03 4.37500e+03 -2370 1.62500e+03 4.27500e+03 -2371 1.72500e+03 4.27500e+03 -2372 1.95000e+03 4.17500e+03 -2373 2.05000e+03 4.27500e+03 -2374 2.15000e+03 4.17500e+03 -2375 2.05000e+03 4.12500e+03 -2376 2.07500e+03 3.97500e+03 -2377 2.07500e+03 3.87500e+03 -2378 1.97500e+03 3.97500e+03 -2379 1.90000e+03 3.87500e+03 -2380 1.77500e+03 3.87500e+03 -2381 1.62500e+03 3.90000e+03 -2382 1.60000e+03 3.70000e+03 -2383 1.60000e+03 3.57500e+03 -2384 1.60000e+03 3.47500e+03 -2385 1.60000e+03 3.37500e+03 -2386 1.60000e+03 3.27500e+03 -2387 1.72500e+03 2.97500e+03 -2388 1.64000e+03 2.65600e+03 -2389 1.63900e+03 2.55600e+03 -2390 1.63900e+03 2.45600e+03 -2391 1.64000e+03 2.35500e+03 -2392 1.64000e+03 2.25600e+03 -EOF diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/readme b/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/readme deleted file mode 100644 index 6a9fb5488..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/readme +++ /dev/null @@ -1,93 +0,0 @@ -All the instances in this directory come from the TSPLIB database. All the TSPLIB instances can be downloaded at this address: -http://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/tsp/ - -The accepted format is: - -NAME: instance_name -TYPE: TSP -COMMENT: comments about the instance -DIMENSION: number of towns. -EDGE_WEIGHT_TYPE: EUC_2D -NODE_COORD_SECTION -1 565.0 575.0 -2 25.0 185.0 -3 345.0 750.0 -. -. -. -. -. -. -EOF - -Compatibility bugs with some TSPLIB instances (soon corrected): - -==> some instances have a space after a section title, for example "NAME :" instead of "NAME:". -==> several instances have the "COMMENT:" section before the "TYPE:" section. -==> several section are not yet implemented ("DISPLAY_DATA_TYPE:", ...). - -Already corrected bugs: - -==> some instances have several lines with the keyword "COMMENTS:" - -For instance, the Berlin52 instance: - -NAME: berlin52 -TYPE: TSP -COMMENT: 52 locations in Berlin (Groetschel) -DIMENSION: 52 -EDGE_WEIGHT_TYPE: EUC_2D -NODE_COORD_SECTION -1 565.0 575.0 -2 25.0 185.0 -3 345.0 750.0 -4 945.0 685.0 -5 845.0 655.0 -6 880.0 660.0 -7 25.0 230.0 -8 525.0 1000.0 -9 580.0 1175.0 -10 650.0 1130.0 -11 1605.0 620.0 -12 1220.0 580.0 -13 1465.0 200.0 -14 1530.0 5.0 -15 845.0 680.0 -16 725.0 370.0 -17 145.0 665.0 -18 415.0 635.0 -19 510.0 875.0 -20 560.0 365.0 -21 300.0 465.0 -22 520.0 585.0 -23 480.0 415.0 -24 835.0 625.0 -25 975.0 580.0 -26 1215.0 245.0 -27 1320.0 315.0 -28 1250.0 400.0 -29 660.0 180.0 -30 410.0 250.0 -31 420.0 555.0 -32 575.0 665.0 -33 1150.0 1160.0 -34 700.0 580.0 -35 685.0 595.0 -36 685.0 610.0 -37 770.0 610.0 -38 795.0 645.0 -39 720.0 635.0 -40 760.0 650.0 -41 475.0 960.0 -42 95.0 260.0 -43 875.0 920.0 -44 700.0 500.0 -45 555.0 815.0 -46 830.0 485.0 -47 1170.0 65.0 -48 830.0 610.0 -49 605.0 625.0 -50 595.0 360.0 -51 1340.0 725.0 -52 1740.0 245.0 -EOF diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/rl5915.tsp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/rl5915.tsp deleted file mode 100644 index 86f6a24fd..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/rl5915.tsp +++ /dev/null @@ -1,5922 +0,0 @@ -NAME: rl5915 -TYPE: TSP -COMMENT: 5915-city TSP (Reinelt) -DIMENSION: 5915 -EDGE_WEIGHT_TYPE: EUC_2D -NODE_COORD_SECTION -1 1.81920e+04 8.95400e+03 -2 1.81920e+04 9.85600e+03 -3 1.81920e+04 1.13190e+04 -4 1.82720e+04 8.62400e+03 -5 1.84160e+04 7.34800e+03 -6 1.84160e+04 8.29400e+03 -7 1.20000e+03 7.37000e+03 -8 1.20000e+03 8.18400e+03 -9 1.20000e+03 1.09120e+04 -10 1.20000e+03 1.14400e+04 -11 1.79040e+04 5.72000e+02 -12 1.79040e+04 2.68400e+03 -13 1.79040e+04 6.90800e+03 -14 1.79040e+04 7.34800e+03 -15 1.79040e+04 8.62400e+03 -16 8.27200e+03 3.08000e+02 -17 8.27200e+03 2.06800e+03 -18 8.27200e+03 2.50800e+03 -19 8.27200e+03 3.08000e+03 -20 8.27200e+03 3.60800e+03 -21 8.27200e+03 5.30200e+03 -22 8.33600e+03 7.26000e+03 -23 8.46400e+03 7.26000e+03 -24 8.49600e+03 9.54800e+03 -25 8.49600e+03 1.05820e+04 -26 8.49600e+03 1.14400e+04 -27 1.58880e+04 9.06400e+03 -28 1.58880e+04 9.50400e+03 -29 1.58880e+04 1.02520e+04 -30 1.58880e+04 1.10000e+04 -31 1.59360e+04 8.18400e+03 -32 1.60480e+04 8.18400e+03 -33 1.62080e+04 8.18400e+03 -34 1.63360e+04 5.72000e+02 -35 1.63360e+04 1.01200e+03 -36 1.63360e+04 1.45200e+03 -37 1.63360e+04 2.99200e+03 -38 1.63360e+04 4.81800e+03 -39 1.63360e+04 6.02800e+03 -40 1.63360e+04 7.34800e+03 -41 1.04000e+03 7.37000e+03 -42 1.04000e+03 8.18400e+03 -43 1.04000e+03 1.09120e+04 -44 1.04000e+03 1.14400e+04 -45 4.46400e+03 3.08000e+02 -46 4.64000e+03 3.08000e+02 -47 4.81600e+03 3.08000e+02 -48 4.94400e+03 3.08000e+02 -49 5.16800e+03 3.08000e+02 -50 5.44000e+03 3.08000e+02 -51 5.61600e+03 3.08000e+02 -52 5.72800e+03 3.08000e+02 -53 5.80800e+03 3.08000e+03 -54 5.80800e+03 3.60800e+03 -55 5.80800e+03 4.66400e+03 -56 5.80800e+03 5.36800e+03 -57 5.80800e+03 6.07200e+03 -58 5.80800e+03 7.12800e+03 -59 5.93600e+03 9.65800e+03 -60 5.93600e+03 1.12860e+04 -61 1.68480e+04 5.72000e+02 -62 1.68480e+04 1.45200e+03 -63 1.68480e+04 2.99200e+03 -64 1.68480e+04 4.70800e+03 -65 1.68480e+04 6.02800e+03 -66 1.68480e+04 7.34800e+03 -67 1.68480e+04 8.51400e+03 -68 1.68480e+04 9.28400e+03 -69 1.68480e+04 9.92200e+03 -70 1.68480e+04 1.11980e+04 -71 8.24000e+03 7.48000e+03 -72 8.40000e+03 9.54800e+03 -73 8.40000e+03 1.05820e+04 -74 8.40000e+03 1.14400e+04 -75 1.52000e+03 9.15200e+03 -76 1.52000e+03 1.09120e+04 -77 1.52000e+03 1.14400e+04 -78 1.58400e+03 6.44600e+03 -79 1.58400e+03 7.59000e+03 -80 1.58400e+03 8.29400e+03 -81 5.16800e+03 1.14400e+04 -82 5.28000e+03 1.14400e+04 -83 5.45600e+03 1.14400e+04 -84 5.58400e+03 1.14400e+04 -85 5.71200e+03 1.14400e+04 -86 2.67200e+03 6.33600e+03 -87 2.78400e+03 6.55600e+03 -88 2.97600e+03 6.55600e+03 -89 3.10400e+03 6.55600e+03 -90 3.26400e+03 6.55600e+03 -91 3.36000e+03 6.55600e+03 -92 3.60000e+03 6.55600e+03 -93 3.85600e+03 6.55600e+03 -94 3.92000e+03 6.55600e+03 -95 4.01600e+03 6.55600e+03 -96 4.14400e+03 6.55600e+03 -97 4.20800e+03 6.55600e+03 -98 4.35200e+03 6.55600e+03 -99 4.46400e+03 6.55600e+03 -100 4.56000e+03 6.55600e+03 -101 4.68800e+03 6.55600e+03 -102 4.72000e+03 7.26000e+03 -103 4.72000e+03 8.14000e+03 -104 4.72000e+03 9.70200e+03 -105 4.72000e+03 1.05820e+04 -106 4.72000e+03 1.11320e+04 -107 1.70080e+04 5.72000e+02 -108 1.70080e+04 1.45200e+03 -109 1.70080e+04 2.99200e+03 -110 1.70080e+04 5.87400e+03 -111 1.70080e+04 7.34800e+03 -112 1.70720e+04 8.09600e+03 -113 1.71360e+04 8.09600e+03 -114 1.72800e+04 8.09600e+03 -115 1.74560e+04 8.09600e+03 -116 1.75200e+04 8.40400e+03 -117 1.75200e+04 8.95400e+03 -118 1.75200e+04 1.01420e+04 -119 1.75200e+04 1.13190e+04 -120 8.80000e+02 7.37000e+03 -121 8.80000e+02 8.18400e+03 -122 8.80000e+02 1.14400e+04 -123 4.14400e+03 4.84000e+03 -124 4.14400e+03 7.70000e+03 -125 4.30400e+03 8.36000e+03 -126 4.41600e+03 8.36000e+03 -127 4.57600e+03 8.36000e+03 -128 4.65600e+03 8.36000e+03 -129 4.86400e+03 8.36000e+03 -130 5.04000e+03 8.36000e+03 -131 5.29600e+03 8.36000e+03 -132 5.45600e+03 8.84400e+03 -133 5.45600e+03 9.81200e+03 -134 5.52000e+03 3.60800e+03 -135 5.52000e+03 4.66400e+03 -136 5.52000e+03 5.36800e+03 -137 5.52000e+03 5.91800e+03 -138 5.52000e+03 6.93000e+03 -139 1.65600e+04 8.95400e+03 -140 1.65600e+04 9.92200e+03 -141 1.65920e+04 5.72000e+02 -142 1.65920e+04 1.45200e+03 -143 1.65920e+04 2.99200e+03 -144 1.65920e+04 4.81800e+03 -145 1.65920e+04 6.13800e+03 -146 1.65920e+04 7.34800e+03 -147 7.72800e+03 7.74400e+03 -148 7.72800e+03 9.54800e+03 -149 7.72800e+03 1.08460e+04 -150 7.79200e+03 7.04000e+03 -151 7.85600e+03 7.04000e+03 -152 7.95200e+03 7.04000e+03 -153 8.01600e+03 3.08000e+02 -154 8.01600e+03 2.06800e+03 -155 8.01600e+03 2.50800e+03 -156 8.01600e+03 3.08000e+03 -157 8.01600e+03 3.60800e+03 -158 8.01600e+03 4.26800e+03 -159 8.01600e+03 5.85200e+03 -160 1.62720e+04 9.06400e+03 -161 1.62720e+04 9.50400e+03 -162 1.62720e+04 9.92200e+03 -163 1.62720e+04 1.10000e+04 -164 1.66400e+04 8.84400e+03 -165 1.67200e+04 8.84400e+03 -166 1.67840e+04 6.02800e+03 -167 1.67840e+04 7.34800e+03 -168 1.67840e+04 8.51400e+03 -169 4.64000e+02 1.14400e+04 -170 5.28000e+02 8.18400e+03 -171 6.40000e+02 8.18400e+03 -172 7.84000e+02 7.37000e+03 -173 7.84000e+02 7.96400e+03 -174 7.66400e+03 6.44600e+03 -175 7.66400e+03 8.07400e+03 -176 7.66400e+03 9.54800e+03 -177 7.66400e+03 1.08460e+04 -178 7.72800e+03 3.08000e+02 -179 7.72800e+03 2.06800e+03 -180 7.72800e+03 2.50800e+03 -181 7.72800e+03 3.08000e+03 -182 7.72800e+03 3.60800e+03 -183 7.72800e+03 4.04800e+03 -184 7.72800e+03 4.48800e+03 -185 5.23200e+03 3.60800e+03 -186 5.23200e+03 4.66400e+03 -187 5.23200e+03 5.36800e+03 -188 5.23200e+03 5.91800e+03 -189 5.23200e+03 6.77600e+03 -190 5.52000e+03 7.92000e+03 -191 3.85600e+03 7.48000e+03 -192 3.92000e+03 7.92000e+03 -193 4.01600e+03 7.92000e+03 -194 4.17600e+03 9.15200e+03 -195 4.17600e+03 9.92200e+03 -196 4.17600e+03 1.04720e+04 -197 4.17600e+03 1.09120e+04 -198 4.17600e+03 1.14400e+04 -199 5.98400e+03 7.48000e+02 -200 6.09600e+03 3.08000e+03 -201 6.09600e+03 3.60800e+03 -202 6.09600e+03 4.66400e+03 -203 6.16000e+03 5.36800e+03 -204 6.22400e+03 5.36800e+03 -205 6.32000e+03 5.36800e+03 -206 6.49600e+03 5.36800e+03 -207 6.60800e+03 5.69800e+03 -208 6.60800e+03 6.33600e+03 -209 6.60800e+03 7.50200e+03 -210 6.60800e+03 9.06400e+03 -211 6.60800e+03 1.01420e+04 -212 6.60800e+03 1.10220e+04 -213 1.72000e+04 5.87400e+03 -214 1.72000e+04 7.34800e+03 -215 1.72000e+04 9.28400e+03 -216 1.72000e+04 9.92200e+03 -217 1.72000e+04 1.11980e+04 -218 1.72960e+04 5.19200e+03 -219 1.74400e+04 5.19200e+03 -220 1.75680e+04 5.19200e+03 -221 1.76160e+04 5.72000e+02 -222 1.76160e+04 2.99200e+03 -223 7.24800e+03 1.03620e+04 -224 7.24800e+03 1.12860e+04 -225 7.37600e+03 3.08000e+02 -226 7.37600e+03 9.68000e+02 -227 7.37600e+03 2.06800e+03 -228 7.37600e+03 2.50800e+03 -229 7.37600e+03 3.08000e+03 -230 7.37600e+03 3.60800e+03 -231 7.37600e+03 4.48800e+03 -232 7.37600e+03 5.58800e+03 -233 7.37600e+03 6.55600e+03 -234 7.37600e+03 7.74400e+03 -235 1.80800e+03 6.44600e+03 -236 1.84000e+03 7.43600e+03 -237 1.84000e+03 8.40400e+03 -238 1.84000e+03 9.04200e+03 -239 1.84000e+03 1.09120e+04 -240 1.84000e+03 1.14400e+04 -241 1.22720e+04 9.87800e+03 -242 1.24640e+04 9.06400e+03 -243 1.25920e+04 9.06400e+03 -244 1.27360e+04 9.06400e+03 -245 1.28480e+04 9.02000e+02 -246 1.28480e+04 1.98000e+03 -247 1.28480e+04 2.64000e+03 -248 1.28480e+04 3.16800e+03 -249 1.28480e+04 3.60800e+03 -250 1.28480e+04 4.15800e+03 -251 1.28480e+04 5.36800e+03 -252 1.28480e+04 6.55600e+03 -253 1.28480e+04 6.99600e+03 -254 1.28480e+04 8.00800e+03 -255 1.28480e+04 8.84400e+03 -256 1.64800e+03 8.40400e+03 -257 1.64800e+03 9.15200e+03 -258 1.64800e+03 1.09120e+04 -259 1.64800e+03 1.14400e+04 -260 1.68000e+03 6.44600e+03 -261 1.68000e+03 7.59000e+03 -262 6.25600e+03 9.65800e+03 -263 6.25600e+03 1.10220e+04 -264 1.69760e+04 8.51400e+03 -265 1.69760e+04 9.28400e+03 -266 1.69760e+04 9.92200e+03 -267 1.69760e+04 1.11980e+04 -268 1.70720e+04 5.72000e+03 -269 1.71360e+04 5.72000e+03 -270 1.74400e+04 5.72000e+03 -271 1.76000e+04 5.72000e+03 -272 1.16000e+04 5.72000e+02 -273 1.16000e+04 1.76000e+03 -274 1.16000e+04 3.38800e+03 -275 1.16000e+04 5.25800e+03 -276 1.16000e+04 6.55600e+03 -277 1.16000e+04 6.99600e+03 -278 1.16000e+04 7.89800e+03 -279 1.16320e+04 8.60200e+03 -280 1.16320e+04 9.28400e+03 -281 1.16320e+04 1.02080e+04 -282 1.73760e+04 1.01420e+04 -283 1.77280e+04 1.01420e+04 -284 1.84160e+04 1.01420e+04 -285 1.86080e+04 1.01420e+04 -286 1.87040e+04 1.01420e+04 -287 1.88640e+04 1.01420e+04 -288 1.89920e+04 1.01420e+04 -289 1.90880e+04 1.01420e+04 -290 6.22400e+03 9.68000e+02 -291 6.22400e+03 3.08000e+03 -292 6.22400e+03 3.60800e+03 -293 6.22400e+03 4.66400e+03 -294 6.40000e+03 1.09120e+04 -295 6.76800e+03 1.09120e+04 -296 6.86400e+03 1.12860e+04 -297 1.93600e+03 6.33600e+03 -298 1.93600e+03 7.43600e+03 -299 1.96800e+03 8.40400e+03 -300 1.96800e+03 9.15200e+03 -301 1.96800e+03 1.09120e+04 -302 1.96800e+03 1.14400e+04 -303 3.98400e+03 8.71200e+03 -304 4.30400e+03 8.93200e+03 -305 4.41600e+03 8.93200e+03 -306 4.49600e+03 1.08020e+04 -307 1.54400e+04 1.23200e+03 -308 1.54400e+04 3.60800e+03 -309 1.54400e+04 4.18000e+03 -310 1.54400e+04 4.81800e+03 -311 1.55360e+04 5.80800e+03 -312 1.56480e+04 5.80800e+03 -313 1.57600e+04 5.80800e+03 -314 1.58400e+04 5.80800e+03 -315 1.59360e+04 5.80800e+03 -316 1.60480e+04 5.80800e+03 -317 1.62080e+04 5.80800e+03 -318 5.58400e+03 1.02520e+04 -319 5.72800e+03 1.02520e+04 -320 6.00000e+03 1.02520e+04 -321 6.06400e+03 1.02520e+04 -322 6.16000e+03 1.02520e+04 -323 6.32000e+03 9.68000e+02 -324 6.32000e+03 3.08000e+03 -325 6.32000e+03 3.60800e+03 -326 6.32000e+03 4.66400e+03 -327 6.38400e+03 9.54800e+03 -328 6.38400e+03 1.04720e+04 -329 1.67200e+04 1.11980e+04 -330 1.70880e+04 1.11980e+04 -331 1.73760e+04 1.11980e+04 -332 1.77280e+04 1.11980e+04 -333 1.84160e+04 1.11980e+04 -334 1.86080e+04 1.11980e+04 -335 1.87040e+04 1.11980e+04 -336 1.88480e+04 1.11980e+04 -337 1.52800e+04 5.72000e+02 -338 1.52800e+04 1.23200e+03 -339 1.52800e+04 3.60800e+03 -340 1.52800e+04 4.18000e+03 -341 1.52800e+04 4.81800e+03 -342 1.52800e+04 6.13800e+03 -343 1.52800e+04 7.34800e+03 -344 1.52800e+04 8.22800e+03 -345 1.52800e+04 9.06400e+03 -346 1.52800e+04 9.50400e+03 -347 1.52800e+04 1.02520e+04 -348 1.52800e+04 1.10000e+04 -349 3.47200e+03 7.92000e+03 -350 3.47200e+03 8.71200e+03 -351 3.47200e+03 9.37200e+03 -352 3.47200e+03 1.04720e+04 -353 3.47200e+03 1.09120e+04 -354 3.47200e+03 1.14400e+04 -355 2.08000e+02 1.14400e+04 -356 4.32000e+02 7.96400e+03 -357 9.44000e+02 7.96400e+03 -358 1.10400e+03 7.37000e+03 -359 1.42400e+03 6.44600e+03 -360 1.42400e+03 7.37000e+03 -361 1.42400e+03 8.29400e+03 -362 1.00960e+04 4.37800e+03 -363 1.00960e+04 5.47800e+03 -364 1.00960e+04 6.55600e+03 -365 1.00960e+04 7.48000e+03 -366 1.00960e+04 8.00800e+03 -367 1.00960e+04 8.60200e+03 -368 1.00960e+04 9.28400e+03 -369 1.00960e+04 1.03180e+04 -370 1.00960e+04 1.14400e+04 -371 1.02560e+04 3.60800e+03 -372 1.03360e+04 3.60800e+03 -373 1.04480e+04 3.60800e+03 -374 1.05440e+04 3.60800e+03 -375 1.06080e+04 3.60800e+03 -376 1.06720e+04 3.60800e+03 -377 1.07520e+04 3.60800e+03 -378 1.08640e+04 3.60800e+03 -379 1.09920e+04 3.60800e+03 -380 1.10880e+04 3.60800e+03 -381 1.11680e+04 3.60800e+03 -382 1.12800e+04 3.60800e+03 -383 1.14080e+04 3.60800e+03 -384 6.88000e+02 7.37000e+03 -385 6.88000e+02 1.14400e+04 -386 6.16000e+03 9.68000e+02 -387 6.49600e+03 9.68000e+02 -388 6.59200e+03 9.68000e+02 -389 6.73600e+03 9.68000e+02 -390 6.84800e+03 9.68000e+02 -391 6.94400e+03 9.68000e+02 -392 7.10400e+03 9.68000e+02 -393 7.23200e+03 9.68000e+02 -394 7.55200e+03 9.68000e+02 -395 7.60000e+03 3.08000e+02 -396 7.60000e+03 2.06800e+03 -397 7.60000e+03 2.50800e+03 -398 7.60000e+03 3.08000e+03 -399 7.60000e+03 3.60800e+03 -400 7.60000e+03 4.04800e+03 -401 7.60000e+03 4.48800e+03 -402 7.63200e+03 5.14800e+03 -403 7.79200e+03 5.14800e+03 -404 7.85600e+03 5.14800e+03 -405 7.92000e+03 5.14800e+03 -406 8.11200e+03 5.14800e+03 -407 8.38400e+03 5.14800e+03 -408 8.46400e+03 5.14800e+03 -409 8.62400e+03 5.14800e+03 -410 8.80000e+03 5.14800e+03 -411 8.91200e+03 5.14800e+03 -412 9.21600e+03 5.14800e+03 -413 9.50400e+03 5.14800e+03 -414 9.61600e+03 5.14800e+03 -415 9.74400e+03 5.14800e+03 -416 9.88800e+03 5.14800e+03 -417 9.93600e+03 6.55600e+03 -418 9.93600e+03 7.48000e+03 -419 9.93600e+03 8.38200e+03 -420 9.93600e+03 9.28400e+03 -421 9.93600e+03 1.14400e+04 -422 1.00320e+04 5.72000e+02 -423 1.00320e+04 1.45200e+03 -424 1.00320e+04 2.72800e+03 -425 6.49600e+03 7.08400e+03 -426 6.73600e+03 7.08400e+03 -427 6.76800e+03 9.06400e+03 -428 6.76800e+03 1.01420e+04 -429 9.93600e+03 5.72000e+02 -430 9.93600e+03 1.45200e+03 -431 5.20000e+03 1.00320e+04 -432 7.40800e+03 1.03620e+04 -433 7.56800e+03 1.06920e+04 -434 7.85600e+03 1.06920e+04 -435 7.93600e+03 1.06920e+04 -436 8.03200e+03 1.06920e+04 -437 8.14400e+03 1.06920e+04 -438 8.22400e+03 1.06920e+04 -439 8.32000e+03 1.06920e+04 -440 8.78400e+03 1.06920e+04 -441 8.97600e+03 1.06920e+04 -442 9.40800e+03 1.06920e+04 -443 1.02880e+04 1.06920e+04 -444 1.04000e+04 1.06920e+04 -445 1.05600e+04 1.06920e+04 -446 1.07040e+04 1.06920e+04 -447 1.08640e+04 1.06920e+04 -448 1.09600e+04 1.06920e+04 -449 1.11360e+04 1.06920e+04 -450 1.12640e+04 1.06920e+04 -451 1.13920e+04 1.06920e+04 -452 1.14720e+04 1.06920e+04 -453 1.15680e+04 1.06920e+04 -454 4.88000e+03 9.21800e+03 -455 4.88000e+03 1.00320e+04 -456 4.88000e+03 1.05820e+04 -457 4.88000e+03 1.11320e+04 -458 4.94400e+03 3.60800e+03 -459 4.94400e+03 4.66400e+03 -460 4.94400e+03 5.36800e+03 -461 4.94400e+03 5.91800e+03 -462 4.94400e+03 6.77600e+03 -463 4.94400e+03 7.43600e+03 -464 6.94400e+03 3.08000e+02 -465 7.10400e+03 3.08000e+02 -466 7.23200e+03 3.08000e+02 -467 7.79200e+03 3.08000e+02 -468 7.85600e+03 3.08000e+02 -469 7.92000e+03 3.08000e+02 -470 8.12800e+03 3.08000e+02 -471 8.38400e+03 3.08000e+02 -472 8.46400e+03 3.08000e+02 -473 8.52800e+03 3.08000e+02 -474 8.59200e+03 3.08000e+02 -475 8.68800e+03 3.08000e+02 -476 8.80000e+03 3.08000e+02 -477 8.91200e+03 3.08000e+02 -478 9.00800e+03 3.08000e+02 -479 9.10400e+03 3.08000e+02 -480 9.20000e+03 3.08000e+02 -481 9.23200e+03 1.45200e+03 -482 9.23200e+03 2.28800e+03 -483 9.23200e+03 3.38800e+03 -484 9.34400e+03 7.26000e+03 -485 9.45600e+03 8.60200e+03 -486 9.45600e+03 1.14400e+04 -487 3.56800e+03 7.92000e+03 -488 3.66400e+03 7.92000e+03 -489 3.72800e+03 7.92000e+03 -490 8.24000e+03 9.54800e+03 -491 8.24000e+03 1.14400e+04 -492 9.37600e+03 6.77600e+03 -493 9.77600e+03 5.72000e+02 -494 9.77600e+03 1.45200e+03 -495 9.77600e+03 2.50800e+03 -496 9.77600e+03 3.38800e+03 -497 6.99200e+03 7.85400e+03 -498 6.99200e+03 9.17400e+03 -499 6.99200e+03 9.81200e+03 -500 6.99200e+03 1.03620e+04 -501 7.05600e+03 2.06800e+03 -502 7.05600e+03 3.08000e+03 -503 7.05600e+03 3.60800e+03 -504 7.05600e+03 4.66400e+03 -505 7.05600e+03 5.58800e+03 -506 7.05600e+03 6.55600e+03 -507 1.45120e+04 6.82000e+02 -508 1.46400e+04 3.60800e+03 -509 1.46400e+04 4.04800e+03 -510 1.46400e+04 4.59800e+03 -511 1.46400e+04 6.13800e+03 -512 1.46400e+04 7.56800e+03 -513 1.46400e+04 8.22800e+03 -514 1.46400e+04 9.06400e+03 -515 1.46400e+04 9.50400e+03 -516 1.46400e+04 1.02520e+04 -517 1.46400e+04 1.10000e+04 -518 1.47680e+04 1.01200e+03 -519 1.48480e+04 1.01200e+03 -520 1.49600e+04 1.01200e+03 -521 1.53760e+04 1.01200e+03 -522 1.55360e+04 1.01200e+03 -523 1.56640e+04 1.01200e+03 -524 1.57600e+04 1.01200e+03 -525 1.58400e+04 1.01200e+03 -526 1.59360e+04 1.01200e+03 -527 1.60480e+04 1.01200e+03 -528 1.62080e+04 1.01200e+03 -529 1.64640e+04 1.01200e+03 -530 1.65280e+04 5.72000e+02 -531 1.47360e+04 6.13800e+03 -532 1.47360e+04 7.56800e+03 -533 1.47360e+04 8.22800e+03 -534 1.47360e+04 9.06400e+03 -535 1.47360e+04 9.50400e+03 -536 1.47360e+04 1.02520e+04 -537 1.47360e+04 1.08900e+04 -538 1.47680e+04 4.92800e+03 -539 1.48800e+04 4.92800e+03 -540 1.49760e+04 4.92800e+03 -541 1.53760e+04 4.92800e+03 -542 1.55360e+04 4.92800e+03 -543 1.56480e+04 4.92800e+03 -544 1.57600e+04 4.92800e+03 -545 1.58400e+04 4.92800e+03 -546 1.59360e+04 4.92800e+03 -547 1.60480e+04 4.92800e+03 -548 1.62080e+04 4.92800e+03 -549 1.64640e+04 4.92800e+03 -550 1.67040e+04 4.92800e+03 -551 1.38080e+04 6.02800e+03 -552 1.38080e+04 6.77600e+03 -553 1.38080e+04 7.78800e+03 -554 1.38080e+04 8.22800e+03 -555 1.38080e+04 9.50400e+03 -556 1.38080e+04 1.03620e+04 -557 1.38080e+04 1.11100e+04 -558 1.40320e+04 4.70800e+03 -559 1.41440e+04 4.70800e+03 -560 1.43200e+04 4.70800e+03 -561 1.44640e+04 4.70800e+03 -562 1.69440e+04 4.70800e+03 -563 3.66400e+03 8.71200e+03 -564 3.72800e+03 9.28400e+03 -565 3.76000e+03 9.70200e+03 -566 3.76000e+03 1.04720e+04 -567 3.76000e+03 1.09120e+04 -568 3.76000e+03 1.14400e+04 -569 3.60000e+03 8.71200e+03 -570 3.60000e+03 9.48200e+03 -571 4.04800e+03 9.81200e+03 -572 4.33600e+03 9.81200e+03 -573 4.57600e+03 9.81200e+03 -574 4.65600e+03 9.81200e+03 -575 4.97600e+03 8.84400e+03 -576 8.97600e+03 8.11800e+03 -577 8.97600e+03 9.39400e+03 -578 8.97600e+03 1.14400e+04 -579 1.01760e+04 6.55600e+03 -580 1.03040e+04 6.55600e+03 -581 1.04480e+04 6.55600e+03 -582 1.05760e+04 6.55600e+03 -583 1.07360e+04 6.55600e+03 -584 1.08320e+04 6.55600e+03 -585 1.08960e+04 6.55600e+03 -586 1.09760e+04 6.55600e+03 -587 1.10880e+04 6.55600e+03 -588 1.11680e+04 6.55600e+03 -589 1.12640e+04 6.55600e+03 -590 1.14240e+04 6.55600e+03 -591 1.15360e+04 6.55600e+03 -592 1.16640e+04 6.55600e+03 -593 1.17280e+04 6.55600e+03 -594 1.17920e+04 6.55600e+03 -595 1.18720e+04 6.55600e+03 -596 1.19680e+04 6.55600e+03 -597 1.21120e+04 6.55600e+03 -598 1.22720e+04 6.55600e+03 -599 1.24480e+04 6.55600e+03 -600 1.26080e+04 6.55600e+03 -601 1.27360e+04 6.55600e+03 -602 1.30080e+04 6.55600e+03 -603 1.30720e+04 1.01200e+03 -604 1.30720e+04 1.98000e+03 -605 1.30720e+04 2.64000e+03 -606 1.30720e+04 3.60800e+03 -607 1.30720e+04 4.26800e+03 -608 1.30720e+04 5.36800e+03 -609 1.31680e+04 5.72000e+02 -610 1.32640e+04 5.72000e+02 -611 1.34080e+04 5.72000e+02 -612 1.35680e+04 5.72000e+02 -613 1.36960e+04 5.72000e+02 -614 1.40160e+04 5.72000e+02 -615 1.41600e+04 5.72000e+02 -616 1.43200e+04 5.72000e+02 -617 1.51200e+04 5.72000e+02 -618 1.53760e+04 5.72000e+02 -619 1.04800e+04 5.72000e+02 -620 1.04800e+04 1.45200e+03 -621 1.04800e+04 6.00600e+03 -622 7.12000e+03 2.50800e+03 -623 7.12000e+03 3.08000e+03 -624 7.12000e+03 3.60800e+03 -625 7.12000e+03 4.66400e+03 -626 7.12000e+03 5.58800e+03 -627 7.12000e+03 6.55600e+03 -628 7.12000e+03 7.74400e+03 -629 7.12000e+03 9.06400e+03 -630 7.12000e+03 9.81200e+03 -631 7.12000e+03 1.03620e+04 -632 7.12000e+03 1.12860e+04 -633 3.72800e+03 8.71200e+03 -634 4.01600e+03 1.04720e+04 -635 4.01600e+03 1.09120e+04 -636 4.01600e+03 1.14400e+04 -637 6.48000e+03 9.06400e+03 -638 6.89600e+03 9.06400e+03 -639 7.24800e+03 2.06800e+03 -640 7.24800e+03 2.50800e+03 -641 7.24800e+03 3.08000e+03 -642 7.24800e+03 3.60800e+03 -643 7.24800e+03 4.66400e+03 -644 7.24800e+03 5.58800e+03 -645 7.24800e+03 6.55600e+03 -646 7.24800e+03 7.48000e+03 -647 3.92000e+03 8.71200e+03 -648 5.05600e+03 9.37200e+03 -649 3.53600e+03 9.37200e+03 -650 3.53600e+03 1.04720e+04 -651 3.53600e+03 1.09120e+04 -652 3.53600e+03 1.14400e+04 -653 8.78400e+03 8.44800e+03 -654 1.03040e+04 8.44800e+03 -655 1.05600e+04 8.44800e+03 -656 1.07040e+04 8.44800e+03 -657 1.07680e+04 8.44800e+03 -658 1.08480e+04 8.44800e+03 -659 1.09760e+04 8.44800e+03 -660 1.11200e+04 8.44800e+03 -661 1.12640e+04 8.44800e+03 -662 1.15520e+04 8.44800e+03 -663 1.17600e+04 8.44800e+03 -664 1.18880e+04 8.44800e+03 -665 1.20800e+04 8.44800e+03 -666 1.22400e+04 8.44800e+03 -667 1.27200e+04 5.72000e+02 -668 1.27200e+04 1.98000e+03 -669 1.27200e+04 3.71800e+03 -670 1.27200e+04 5.36800e+03 -671 1.27200e+04 6.99600e+03 -672 2.80000e+03 7.32600e+03 -673 2.92800e+03 7.70000e+03 -674 2.99200e+03 7.70000e+03 -675 3.10400e+03 7.70000e+03 -676 3.26400e+03 7.70000e+03 -677 4.20800e+03 7.70000e+03 -678 8.11200e+03 2.06800e+03 -679 8.11200e+03 2.50800e+03 -680 8.11200e+03 3.08000e+03 -681 8.11200e+03 3.60800e+03 -682 8.11200e+03 4.26800e+03 -683 8.11200e+03 7.48000e+03 -684 9.58400e+03 2.72800e+03 -685 9.58400e+03 3.38800e+03 -686 9.84000e+03 2.28800e+03 -687 1.14400e+04 2.28800e+03 -688 1.17280e+04 2.28800e+03 -689 1.18240e+04 2.28800e+03 -690 1.19840e+04 2.28800e+03 -691 1.21120e+04 2.28800e+03 -692 1.22560e+04 2.28800e+03 -693 1.23840e+04 2.28800e+03 -694 1.24640e+04 2.28800e+03 -695 1.24960e+04 5.72000e+02 -696 1.24960e+04 1.23200e+03 -697 1.26080e+04 1.01200e+03 -698 5.58400e+03 7.92000e+03 -699 5.68000e+03 7.92000e+03 -700 5.76000e+03 7.92000e+03 -701 6.89600e+03 7.92000e+03 -702 7.56800e+03 7.92000e+03 -703 8.14400e+03 7.92000e+03 -704 8.20800e+03 7.92000e+03 -705 9.13600e+03 7.59000e+03 -706 1.05440e+04 6.11600e+03 -707 1.10880e+04 6.11600e+03 -708 1.11680e+04 6.11600e+03 -709 1.12640e+04 6.11600e+03 -710 1.13120e+04 5.72000e+02 -711 1.13120e+04 1.49600e+03 -712 1.13120e+04 5.25800e+03 -713 1.07680e+04 5.72000e+02 -714 1.07680e+04 1.34200e+03 -715 1.07680e+04 4.48800e+03 -716 1.07680e+04 5.03800e+03 -717 1.07680e+04 5.58800e+03 -718 1.07680e+04 6.99600e+03 -719 1.07680e+04 9.28400e+03 -720 1.07680e+04 9.87800e+03 -721 5.58400e+03 8.84400e+03 -722 5.61600e+03 3.08000e+03 -723 6.16000e+03 3.08000e+03 -724 6.49600e+03 3.08000e+03 -725 6.60800e+03 3.08000e+03 -726 6.73600e+03 3.08000e+03 -727 6.84800e+03 3.08000e+03 -728 6.94400e+03 3.08000e+03 -729 7.79200e+03 3.08000e+03 -730 7.85600e+03 3.08000e+03 -731 7.92000e+03 3.08000e+03 -732 8.38400e+03 3.08000e+03 -733 8.46400e+03 3.08000e+03 -734 8.56000e+03 3.08000e+03 -735 8.68800e+03 3.08000e+03 -736 8.80000e+03 3.08000e+03 -737 8.91200e+03 3.08000e+03 -738 9.00800e+03 3.08000e+03 -739 8.68800e+03 2.28800e+03 -740 8.46400e+03 6.11600e+03 -741 8.52800e+03 2.06800e+03 -742 8.52800e+03 2.50800e+03 -743 8.52800e+03 3.60800e+03 -744 8.46400e+03 2.06800e+03 -745 8.46400e+03 2.50800e+03 -746 8.46400e+03 3.60800e+03 -747 1.74560e+04 5.72000e+02 -748 1.74560e+04 2.99200e+03 -749 1.74560e+04 7.23800e+03 -750 1.17280e+04 2.94800e+03 -751 1.18240e+04 2.94800e+03 -752 1.19840e+04 2.94800e+03 -753 1.21120e+04 2.94800e+03 -754 1.22560e+04 2.94800e+03 -755 1.23840e+04 2.94800e+03 -756 1.24640e+04 2.94800e+03 -757 1.25600e+04 5.72000e+02 -758 1.25600e+04 1.98000e+03 -759 1.25600e+04 2.72800e+03 -760 1.75520e+04 7.23800e+03 -761 1.76320e+04 8.18400e+03 -762 1.77760e+04 8.18400e+03 -763 1.80800e+04 8.18400e+03 -764 1.82560e+04 9.06400e+03 -765 1.04480e+04 1.00320e+04 -766 1.05600e+04 1.00320e+04 -767 1.07040e+04 1.00320e+04 -768 1.08640e+04 1.00320e+04 -769 1.09760e+04 1.00320e+04 -770 1.11360e+04 1.00320e+04 -771 1.17600e+04 1.00320e+04 -772 1.18880e+04 1.00320e+04 -773 1.20320e+04 1.00320e+04 -774 1.21440e+04 1.00320e+04 -775 1.28800e+04 1.00320e+04 -776 1.30080e+04 1.00320e+04 -777 1.31680e+04 1.00320e+04 -778 1.33120e+04 1.00320e+04 -779 1.34720e+04 1.00320e+04 -780 1.35840e+04 1.00320e+04 -781 1.36800e+04 3.60800e+03 -782 1.36800e+04 4.26800e+03 -783 1.36800e+04 6.02800e+03 -784 1.36800e+04 6.77600e+03 -785 1.36800e+04 8.00800e+03 -786 1.36800e+04 9.50400e+03 -787 1.77600e+04 6.90800e+03 -788 1.80480e+04 6.90800e+03 -789 1.81280e+04 7.34800e+03 -790 1.26400e+04 3.38800e+03 -791 1.27840e+04 2.64000e+03 -792 1.27840e+04 3.16800e+03 -793 1.09760e+04 8.00800e+03 -794 1.10880e+04 8.00800e+03 -795 1.12640e+04 8.00800e+03 -796 1.16640e+04 8.00800e+03 -797 1.17280e+04 8.00800e+03 -798 1.17920e+04 8.00800e+03 -799 1.18880e+04 8.00800e+03 -800 1.29120e+04 8.00800e+03 -801 1.30080e+04 8.00800e+03 -802 1.31840e+04 8.00800e+03 -803 1.33280e+04 8.00800e+03 -804 1.34560e+04 8.00800e+03 -805 1.35680e+04 8.00800e+03 -806 8.40000e+03 2.06800e+03 -807 8.40000e+03 2.50800e+03 -808 8.40000e+03 3.60800e+03 -809 9.32800e+03 1.45200e+03 -810 9.52000e+03 1.45200e+03 -811 9.63200e+03 1.45200e+03 -812 9.84000e+03 1.45200e+03 -813 1.01600e+04 1.45200e+03 -814 1.02560e+04 1.45200e+03 -815 1.03360e+04 1.45200e+03 -816 1.05440e+04 1.45200e+03 -817 1.06080e+04 1.45200e+03 -818 1.06720e+04 1.45200e+03 -819 1.08640e+04 1.45200e+03 -820 1.09920e+04 1.45200e+03 -821 1.10880e+04 1.45200e+03 -822 1.11680e+04 1.45200e+03 -823 1.23040e+04 5.72000e+02 -824 1.48640e+04 3.60800e+03 -825 1.48640e+04 4.04800e+03 -826 1.48640e+04 6.13800e+03 -827 1.48640e+04 7.56800e+03 -828 1.48640e+04 8.22800e+03 -829 1.48640e+04 9.06400e+03 -830 1.48640e+04 9.50400e+03 -831 1.48640e+04 1.02520e+04 -832 1.48640e+04 1.08900e+04 -833 7.79200e+03 2.06800e+03 -834 7.79200e+03 2.50800e+03 -835 7.79200e+03 3.60800e+03 -836 7.79200e+03 4.04800e+03 -837 7.79200e+03 4.48800e+03 -838 7.79200e+03 6.44600e+03 -839 1.53760e+04 3.60800e+03 -840 1.53760e+04 4.18000e+03 -841 1.53760e+04 6.13800e+03 -842 1.53760e+04 7.34800e+03 -843 6.86400e+03 2.06800e+03 -844 6.86400e+03 3.60800e+03 -845 6.86400e+03 4.77400e+03 -846 6.92800e+03 5.36800e+03 -847 1.05440e+04 5.36800e+03 -848 1.06720e+04 5.36800e+03 -849 1.07040e+04 9.28400e+03 -850 1.24640e+04 1.10000e+04 -851 1.25920e+04 1.10000e+04 -852 1.27360e+04 1.10000e+04 -853 1.28800e+04 1.10000e+04 -854 1.30080e+04 1.10000e+04 -855 1.31680e+04 1.10000e+04 -856 1.33120e+04 1.10000e+04 -857 1.34560e+04 1.10000e+04 -858 1.35840e+04 1.10000e+04 -859 1.41440e+04 1.10000e+04 -860 1.42240e+04 1.10000e+04 -861 1.43360e+04 1.10000e+04 -862 1.44160e+04 1.10000e+04 -863 1.49920e+04 1.10000e+04 -864 1.54400e+04 1.10000e+04 -865 1.56320e+04 1.10000e+04 -866 1.57600e+04 1.10000e+04 -867 1.58240e+04 1.10000e+04 -868 1.61600e+04 1.10000e+04 -869 1.64640e+04 1.10000e+04 -870 1.59520e+04 5.72000e+02 -871 1.59520e+04 1.45200e+03 -872 1.60480e+04 2.99200e+03 -873 1.62080e+04 2.99200e+03 -874 1.64640e+04 2.99200e+03 -875 1.67040e+04 2.99200e+03 -876 1.70720e+04 2.99200e+03 -877 1.71360e+04 2.99200e+03 -878 1.72960e+04 2.99200e+03 -879 1.56640e+04 5.72000e+02 -880 1.56640e+04 3.60800e+03 -881 1.56640e+04 4.18000e+03 -882 1.56640e+04 7.34800e+03 -883 1.56640e+04 7.78800e+03 -884 1.56640e+04 9.06400e+03 -885 1.56640e+04 9.50400e+03 -886 1.56640e+04 1.02520e+04 -887 1.64320e+04 1.45200e+03 -888 8.14400e+03 9.54800e+03 -889 8.14400e+03 1.14400e+04 -890 9.61600e+03 5.72000e+02 -891 1.21120e+04 5.72000e+02 -892 1.21120e+04 3.93800e+03 -893 1.21120e+04 5.25800e+03 -894 8.30400e+03 9.54800e+03 -895 8.30400e+03 1.14400e+04 -896 1.29120e+04 8.84400e+03 -897 1.30080e+04 8.84400e+03 -898 1.31840e+04 8.84400e+03 -899 1.33280e+04 8.84400e+03 -900 1.34560e+04 8.84400e+03 -901 1.35520e+04 3.60800e+03 -902 1.35520e+04 4.37800e+03 -903 1.35520e+04 5.36800e+03 -904 1.35520e+04 6.02800e+03 -905 1.35520e+04 6.77600e+03 -906 1.19200e+04 6.99600e+03 -907 1.19200e+04 9.28400e+03 -908 1.19520e+04 5.72000e+02 -909 1.19520e+04 3.93800e+03 -910 1.19520e+04 5.25800e+03 -911 1.03200e+04 5.72000e+02 -912 1.04480e+04 1.14400e+04 -913 1.18240e+04 5.72000e+02 -914 1.18240e+04 3.93800e+03 -915 1.18240e+04 5.25800e+03 -916 1.26560e+04 5.36800e+03 -917 5.00800e+03 1.06920e+04 -918 5.00800e+03 1.11320e+04 -919 1.31680e+04 1.98000e+03 -920 1.31680e+04 2.64000e+03 -921 1.31680e+04 3.60800e+03 -922 1.31680e+04 4.37800e+03 -923 1.31680e+04 5.47800e+03 -924 1.32320e+04 6.02800e+03 -925 1.33760e+04 6.02800e+03 -926 1.34880e+04 6.02800e+03 -927 1.40320e+04 6.02800e+03 -928 1.41440e+04 6.02800e+03 -929 1.42240e+04 6.02800e+03 -930 1.43200e+04 6.02800e+03 -931 1.44640e+04 6.02800e+03 -932 1.49760e+04 6.02800e+03 -933 1.67040e+04 6.02800e+03 -934 3.28000e+03 1.09120e+04 -935 3.28000e+03 1.14400e+04 -936 6.73600e+03 3.08000e+02 -937 6.73600e+03 2.06800e+03 -938 6.73600e+03 3.60800e+03 -939 6.73600e+03 4.77400e+03 -940 6.73600e+03 5.69800e+03 -941 6.73600e+03 6.33600e+03 -942 8.78400e+03 1.14400e+04 -943 1.02880e+04 1.14400e+04 -944 1.05120e+04 1.14400e+04 -945 1.17920e+04 6.99600e+03 -946 8.72000e+03 4.15800e+03 -947 6.80000e+03 5.80800e+03 -948 6.80000e+03 6.33600e+03 -949 6.91200e+03 6.55600e+03 -950 7.85600e+03 6.55600e+03 -951 8.89600e+03 6.55600e+03 -952 8.94400e+03 2.28800e+03 -953 8.94400e+03 3.60800e+03 -954 7.56800e+03 9.50400e+03 -955 7.85600e+03 9.50400e+03 -956 8.78400e+03 9.50400e+03 -957 1.41440e+04 8.22800e+03 -958 1.42240e+04 8.22800e+03 -959 1.43360e+04 8.22800e+03 -960 1.44160e+04 8.22800e+03 -961 1.44800e+04 8.22800e+03 -962 1.54400e+04 8.22800e+03 -963 1.55040e+04 8.22800e+03 -964 1.55360e+04 3.60800e+03 -965 1.55360e+04 4.18000e+03 -966 1.55360e+04 7.34800e+03 -967 1.55680e+04 5.72000e+02 -968 1.57600e+04 5.72000e+02 -969 1.58400e+04 5.72000e+02 -970 1.60480e+04 5.72000e+02 -971 1.62080e+04 5.72000e+02 -972 1.67040e+04 5.72000e+02 -973 1.71040e+04 5.72000e+02 -974 1.72960e+04 5.72000e+02 -975 1.80000e+04 5.72000e+02 -976 1.80800e+04 5.72000e+02 -977 1.17280e+04 5.72000e+02 -978 1.17280e+04 3.93800e+03 -979 1.17280e+04 5.25800e+03 -980 1.17280e+04 6.99600e+03 -981 1.17600e+04 9.28400e+03 -982 1.22720e+04 3.93800e+03 -983 1.22720e+04 5.25800e+03 -984 1.05120e+04 9.28400e+03 -985 7.85600e+03 4.04800e+03 -986 7.92000e+03 4.04800e+03 -987 8.78400e+03 2.28800e+03 -988 8.78400e+03 3.60800e+03 -989 8.78400e+03 4.26800e+03 -990 7.92000e+03 2.06800e+03 -991 7.92000e+03 2.50800e+03 -992 7.92000e+03 3.60800e+03 -993 7.92000e+03 4.48800e+03 -994 8.88000e+03 4.26800e+03 -995 1.05440e+04 5.72000e+02 -996 1.05440e+04 6.99600e+03 -997 1.06080e+04 4.48800e+03 -998 9.00800e+03 2.28800e+03 -999 9.31200e+03 2.28800e+03 -1000 1.14400e+04 5.72000e+02 -1001 1.14400e+04 5.25800e+03 -1002 1.14400e+04 6.99600e+03 -1003 1.15360e+04 6.99600e+03 -1004 1.58240e+04 7.34800e+03 -1005 1.58240e+04 7.78800e+03 -1006 1.58240e+04 9.06400e+03 -1007 1.58240e+04 9.50400e+03 -1008 1.58240e+04 1.02520e+04 -1009 6.60800e+03 2.06800e+03 -1010 6.60800e+03 3.60800e+03 -1011 6.60800e+03 4.66400e+03 -1012 6.89600e+03 5.80800e+03 -1013 1.12000e+02 1.11980e+04 -1014 1.06720e+04 4.48800e+03 -1015 1.08320e+04 4.48800e+03 -1016 1.08640e+04 5.72000e+02 -1017 1.08640e+04 5.03800e+03 -1018 1.10880e+04 6.99600e+03 -1019 9.52000e+03 5.72000e+02 -1020 9.52000e+03 2.06800e+03 -1021 1.22400e+04 6.99600e+03 -1022 3.28000e+03 8.71200e+03 -1023 3.28000e+03 9.15200e+03 -1024 3.63200e+03 1.04720e+04 -1025 3.63200e+03 1.09120e+04 -1026 3.63200e+03 1.14400e+04 -1027 1.15680e+04 9.28400e+03 -1028 1.41280e+04 1.04720e+04 -1029 1.41600e+04 1.34200e+03 -1030 1.41600e+04 3.60800e+03 -1031 1.41600e+04 4.04800e+03 -1032 1.41600e+04 6.77600e+03 -1033 1.41600e+04 7.67800e+03 -1034 1.41600e+04 9.50400e+03 -1035 4.08000e+03 1.04720e+04 -1036 4.33600e+03 1.04720e+04 -1037 4.57600e+03 1.04720e+04 -1038 4.97600e+03 1.00320e+04 -1039 5.28000e+02 7.37000e+03 -1040 1.60160e+04 1.45200e+03 -1041 1.60160e+04 7.34800e+03 -1042 1.60160e+04 9.06400e+03 -1043 1.60160e+04 9.50400e+03 -1044 1.61600e+04 9.92200e+03 -1045 1.64640e+04 9.92200e+03 -1046 1.66400e+04 9.92200e+03 -1047 1.67200e+04 9.92200e+03 -1048 1.70880e+04 9.92200e+03 -1049 1.74400e+03 1.09120e+04 -1050 2.11200e+03 1.09120e+04 -1051 2.36800e+03 1.09120e+04 -1052 2.54400e+03 1.09120e+04 -1053 2.94400e+03 1.09120e+04 -1054 3.05600e+03 8.71200e+03 -1055 3.05600e+03 9.15200e+03 -1056 3.08800e+03 1.09120e+04 -1057 4.08000e+03 1.09120e+04 -1058 4.33600e+03 1.09120e+04 -1059 4.43200e+03 1.09120e+04 -1060 1.34560e+04 9.50400e+03 -1061 1.42240e+04 7.78800e+03 -1062 1.43360e+04 7.78800e+03 -1063 1.44160e+04 7.78800e+03 -1064 1.44480e+04 1.34200e+03 -1065 1.44480e+04 3.60800e+03 -1066 1.44480e+04 4.04800e+03 -1067 1.28000e+03 8.40400e+03 -1068 1.74400e+03 8.40400e+03 -1069 1.90400e+03 8.40400e+03 -1070 2.16000e+03 8.40400e+03 -1071 2.22400e+03 8.40400e+03 -1072 2.36800e+03 8.40400e+03 -1073 2.54400e+03 8.40400e+03 -1074 2.70400e+03 7.54600e+03 -1075 1.40320e+04 1.34200e+03 -1076 1.40320e+04 3.60800e+03 -1077 1.40320e+04 6.77600e+03 -1078 1.49760e+04 7.56800e+03 -1079 1.43200e+04 4.04800e+03 -1080 1.47680e+04 4.04800e+03 -1081 1.33920e+04 1.98000e+03 -1082 1.33920e+04 3.60800e+03 -1083 1.33920e+04 4.37800e+03 -1084 1.33920e+04 5.36800e+03 -1085 1.66880e+04 1.45200e+03 -1086 1.33600e+04 6.77600e+03 -1087 1.62080e+04 1.45200e+03 -1088 1.62080e+04 7.34800e+03 -1089 1.50400e+03 6.33600e+03 -1090 2.06400e+03 6.33600e+03 -1091 2.16000e+03 6.33600e+03 -1092 2.22400e+03 6.33600e+03 -1093 2.38400e+03 6.33600e+03 -1094 2.54400e+03 6.33600e+03 -1095 4.56000e+03 7.37000e+03 -1096 4.30400e+03 7.26000e+03 -1097 4.38400e+03 7.26000e+03 -1098 4.46400e+03 7.26000e+03 -1099 4.81600e+03 7.26000e+03 -1100 4.88000e+03 7.26000e+03 -1101 1.43520e+04 1.34200e+03 -1102 1.43520e+04 3.60800e+03 -1103 1.43520e+04 9.50400e+03 -1104 1.43520e+04 1.02520e+04 -1105 5.74400e+03 8.84400e+03 -1106 4.33600e+03 1.14400e+04 -1107 6.16000e+03 3.60800e+03 -1108 6.16000e+03 4.66400e+03 -1109 6.16000e+03 1.11320e+04 -1110 6.51200e+03 3.60800e+03 -1111 6.51200e+03 4.66400e+03 -1112 6.92800e+03 2.06800e+03 -1113 6.92800e+03 3.60800e+03 -1114 6.92800e+03 4.66400e+03 -1115 1.12800e+04 6.99600e+03 -1116 1.25920e+04 6.99600e+03 -1117 1.34880e+04 3.60800e+03 -1118 1.47680e+04 3.60800e+03 -1119 1.49600e+04 3.60800e+03 -1120 1.57600e+04 3.60800e+03 -1121 1.58400e+04 3.60800e+03 -1122 1.59200e+04 7.34800e+03 -1123 1.23680e+04 5.72000e+02 -1124 1.23680e+04 1.23200e+03 -1125 1.23680e+04 3.93800e+03 -1126 1.23680e+04 5.25800e+03 -1127 1.16640e+04 6.99600e+03 -1128 1.77760e+04 2.68400e+03 -1129 1.24640e+04 3.93800e+03 -1130 1.34880e+04 4.26800e+03 -1131 1.32320e+04 6.66600e+03 -1132 1.01920e+04 5.72000e+02 -1133 9.44000e+02 7.37000e+03 -1134 1.08480e+04 9.28400e+03 -1135 1.70880e+04 9.28400e+03 -1136 1.73440e+04 9.28400e+03 -1137 4.59200e+03 4.84000e+03 -1138 4.59200e+03 6.02800e+03 -1139 1.10240e+04 5.72000e+02 -1140 1.10240e+04 5.03800e+03 -1141 2.38400e+03 7.43600e+03 -1142 2.38400e+03 9.15200e+03 -1143 2.38400e+03 1.14400e+04 -1144 2.92800e+03 8.71200e+03 -1145 2.92800e+03 9.15200e+03 -1146 2.92800e+03 1.14400e+04 -1147 2.54400e+03 7.54600e+03 -1148 2.54400e+03 9.15200e+03 -1149 2.54400e+03 1.14400e+04 -1150 9.64800e+03 7.48000e+03 -1151 2.04800e+03 7.17200e+03 -1152 2.16000e+03 7.17200e+03 -1153 2.22400e+03 7.17200e+03 -1154 3.44000e+03 7.17200e+03 -1155 1.74400e+03 9.04200e+03 -1156 1.74400e+03 1.14400e+04 -1157 2.09600e+03 9.15200e+03 -1158 2.09600e+03 1.14400e+04 -1159 3.05600e+03 1.14400e+04 -1160 1.09600e+04 6.99600e+03 -1161 2.99200e+03 8.71200e+03 -1162 2.99200e+03 9.15200e+03 -1163 1.08960e+04 6.99600e+03 -1164 4.08000e+03 1.14400e+04 -1165 1.61440e+04 9.06400e+03 -1166 1.61440e+04 9.50400e+03 -1167 1.42240e+04 6.77600e+03 -1168 1.42240e+04 9.50400e+03 -1169 1.42240e+04 1.02520e+04 -1170 1.71040e+04 8.62400e+03 -1171 1.71360e+04 7.34800e+03 -1172 1.54400e+04 9.06400e+03 -1173 1.54400e+04 9.50400e+03 -1174 1.54400e+04 1.02520e+04 -1175 1.57600e+04 7.78800e+03 -1176 1.58560e+04 1.45200e+03 -1177 4.20800e+03 4.84000e+03 -1178 1.83200e+04 7.34800e+03 -1179 1.57600e+04 4.18000e+03 -1180 9.71200e+03 7.48000e+03 -1181 1.70720e+04 1.45200e+03 -1182 1.70720e+04 7.34800e+03 -1183 1.64640e+04 9.50400e+03 -1184 7.85600e+03 2.06800e+03 -1185 7.85600e+03 2.50800e+03 -1186 7.85600e+03 3.60800e+03 -1187 7.85600e+03 4.48800e+03 -1188 1.67200e+04 7.34800e+03 -1189 1.55040e+04 9.06400e+03 -1190 4.36800e+03 4.84000e+03 -1191 6.00000e+03 1.11320e+04 -1192 6.06400e+03 1.11320e+04 -1193 4.68800e+03 5.80800e+03 -1194 4.81600e+03 5.80800e+03 -1195 4.88000e+03 5.80800e+03 -1196 9.00800e+03 3.60800e+03 -1197 1.57600e+04 9.06400e+03 -1198 1.74240e+04 9.06400e+03 -1199 1.85120e+04 8.29400e+03 -1200 4.88000e+03 4.66400e+03 -1201 4.88000e+03 5.36800e+03 -1202 4.88000e+03 6.77600e+03 -1203 4.68800e+03 4.48800e+03 -1204 4.75200e+03 4.48800e+03 -1205 4.81600e+03 4.48800e+03 -1206 1.86080e+04 8.86600e+03 -1207 1.44160e+04 9.50400e+03 -1208 1.44160e+04 1.02520e+04 -1209 1.57600e+04 7.34800e+03 -1210 1.82240e+04 7.34800e+03 -1211 1.34240e+04 6.77600e+03 -1212 1.87040e+04 8.86600e+03 -1213 1.10880e+04 4.92800e+03 -1214 1.11680e+04 4.92800e+03 -1215 1.24640e+04 5.36800e+03 -1216 1.57600e+04 1.45200e+03 -1217 1.57600e+04 9.50400e+03 -1218 1.57600e+04 1.02520e+04 -1219 4.32000e+02 7.48000e+03 -1220 1.11680e+04 6.99600e+03 -1221 1.34880e+04 6.77600e+03 -1222 1.35840e+04 9.50400e+03 -1223 1.34880e+04 5.36800e+03 -1224 1.11840e+04 5.72000e+02 -1225 4.46400e+03 4.84000e+03 -1226 4.52800e+03 4.84000e+03 -1227 4.81600e+03 5.36800e+03 -1228 4.81600e+03 6.77600e+03 -1229 1.10880e+04 5.72000e+02 -1230 1.06720e+04 5.72000e+02 -1231 1.02560e+04 5.72000e+02 -1232 9.84000e+03 5.72000e+02 -1233 1.81920e+04 1.06700e+04 -1234 1.83790e+04 8.62400e+03 -1235 1.84160e+04 3.61900e+03 -1236 1.84160e+04 7.76600e+03 -1237 1.20000e+03 3.57500e+03 -1238 1.20000e+03 9.65800e+03 -1239 1.79040e+04 2.31000e+02 -1240 1.79040e+04 1.62800e+03 -1241 1.79040e+04 4.79600e+03 -1242 1.79040e+04 7.76600e+03 -1243 1.79040e+04 9.43800e+03 -1244 1.79400e+04 9.57000e+03 -1245 1.82240e+04 1.06700e+04 -1246 8.27200e+03 1.18800e+03 -1247 8.27200e+03 7.02900e+03 -1248 8.41600e+03 7.26000e+03 -1249 8.49600e+03 8.86600e+03 -1250 1.58880e+04 8.50300e+03 -1251 1.58880e+04 9.87800e+03 -1252 1.58880e+04 1.06260e+04 -1253 1.58880e+04 1.14290e+04 -1254 1.59840e+04 8.18400e+03 -1255 1.61280e+04 8.18400e+03 -1256 1.62990e+04 8.18400e+03 -1257 1.63360e+04 2.22200e+03 -1258 1.63360e+04 3.85000e+03 -1259 1.63360e+04 5.36800e+03 -1260 1.63360e+04 6.79800e+03 -1261 1.63360e+04 7.88700e+03 -1262 1.04000e+03 3.57500e+03 -1263 1.04000e+03 9.65800e+03 -1264 4.43200e+03 2.20000e+02 -1265 4.49600e+03 3.08000e+02 -1266 4.78400e+03 3.08000e+02 -1267 4.84800e+03 3.08000e+02 -1268 5.04000e+03 3.08000e+02 -1269 5.29600e+03 3.08000e+02 -1270 5.58400e+03 3.08000e+02 -1271 5.64800e+03 3.08000e+02 -1272 5.80800e+03 2.20000e+02 -1273 5.80800e+03 2.02400e+03 -1274 5.80800e+03 4.04800e+03 -1275 5.93600e+03 8.38200e+03 -1276 5.93600e+03 1.08020e+04 -1277 1.68480e+04 1.01200e+03 -1278 1.68480e+04 2.22200e+03 -1279 1.68480e+04 3.85000e+03 -1280 1.68480e+04 5.36800e+03 -1281 1.68480e+04 6.68800e+03 -1282 1.68480e+04 7.87600e+03 -1283 1.68480e+04 1.05600e+04 -1284 1.68480e+04 1.15280e+04 -1285 8.24000e+03 1.18800e+03 -1286 8.24000e+03 7.01800e+03 -1287 8.26000e+03 7.70000e+03 -1288 8.40000e+03 8.75600e+03 -1289 1.52000e+03 1.00320e+04 -1290 1.55200e+03 8.93200e+03 -1291 1.58400e+03 3.11300e+03 -1292 1.58400e+03 7.01800e+03 -1293 1.58400e+03 8.78900e+03 -1294 5.13600e+03 1.15280e+04 -1295 5.20000e+03 1.14400e+04 -1296 5.36000e+03 1.14400e+04 -1297 5.55200e+03 1.15280e+04 -1298 5.61600e+03 1.14400e+04 -1299 5.80800e+03 1.14400e+04 -1300 5.96800e+03 1.15280e+04 -1301 2.67200e+03 3.11300e+03 -1302 2.73600e+03 6.55600e+03 -1303 2.88000e+03 6.55600e+03 -1304 3.02400e+03 6.55600e+03 -1305 3.20000e+03 6.55600e+03 -1306 3.31200e+03 6.55600e+03 -1307 3.40800e+03 6.55600e+03 -1308 3.80800e+03 6.55600e+03 -1309 3.88800e+03 6.55600e+03 -1310 3.95200e+03 6.55600e+03 -1311 4.09600e+03 6.55600e+03 -1312 4.17600e+03 6.55600e+03 -1313 4.25600e+03 6.55600e+03 -1314 4.43200e+03 6.55600e+03 -1315 4.49600e+03 6.55600e+03 -1316 4.64000e+03 6.55600e+03 -1317 4.72000e+03 7.59000e+03 -1318 4.72000e+03 8.86600e+03 -1319 4.72000e+03 1.14950e+04 -1320 1.70080e+04 1.01200e+03 -1321 1.70080e+04 2.22200e+03 -1322 1.70080e+04 4.35600e+03 -1323 1.70080e+04 6.68800e+03 -1324 1.70080e+04 7.84300e+03 -1325 1.70280e+04 8.09600e+03 -1326 1.71040e+04 8.09600e+03 -1327 1.71680e+04 8.09600e+03 -1328 1.74080e+04 8.09600e+03 -1329 1.74990e+04 8.09600e+03 -1330 1.75200e+04 9.60300e+03 -1331 1.75200e+04 1.06700e+04 -1332 8.80000e+02 3.57500e+03 -1333 8.80000e+02 9.92200e+03 -1334 4.14400e+03 2.36500e+03 -1335 4.14400e+03 5.43400e+03 -1336 4.14400e+03 6.90800e+03 -1337 4.27200e+03 8.36000e+03 -1338 4.33600e+03 8.36000e+03 -1339 4.51200e+03 8.36000e+03 -1340 4.62400e+03 8.36000e+03 -1341 4.68800e+03 8.36000e+03 -1342 4.78400e+03 8.36000e+03 -1343 4.94400e+03 8.36000e+03 -1344 5.13600e+03 8.36000e+03 -1345 5.48800e+03 7.30400e+03 -1346 5.45600e+03 8.48100e+03 -1347 5.45600e+03 1.06920e+04 -1348 5.52000e+03 2.17800e+03 -1349 5.52000e+03 4.04800e+03 -1350 5.52000e+03 6.40200e+03 -1351 1.65600e+04 1.08900e+04 -1352 1.65760e+04 8.18400e+03 -1353 1.65920e+04 1.01200e+03 -1354 1.65920e+04 2.22200e+03 -1355 1.65920e+04 3.85000e+03 -1356 1.65920e+04 5.47800e+03 -1357 1.65920e+04 6.79800e+03 -1358 1.65920e+04 7.88700e+03 -1359 7.72800e+03 8.75600e+03 -1360 7.74800e+03 7.04000e+03 -1361 7.82400e+03 7.04000e+03 -1362 7.88800e+03 7.04000e+03 -1363 8.01600e+03 1.18800e+03 -1364 8.01600e+03 4.81800e+03 -1365 8.01600e+03 6.91900e+03 -1366 1.62720e+04 1.04610e+04 -1367 1.62720e+04 1.14290e+04 -1368 1.64320e+04 8.84400e+03 -1369 1.65920e+04 8.84400e+03 -1370 1.66880e+04 8.84400e+03 -1371 1.67630e+04 8.84400e+03 -1372 1.67840e+04 1.01200e+03 -1373 1.67840e+04 2.22200e+03 -1374 1.67840e+04 3.85000e+03 -1375 1.67840e+04 5.47800e+03 -1376 1.67840e+04 6.68800e+03 -1377 1.67840e+04 7.87600e+03 -1378 4.64000e+02 9.69100e+03 -1379 4.84000e+02 8.18400e+03 -1380 5.60000e+02 8.18400e+03 -1381 7.47000e+02 8.18400e+03 -1382 7.84000e+02 3.57500e+03 -1383 7.66400e+03 6.90800e+03 -1384 7.66400e+03 8.75600e+03 -1385 7.72800e+03 1.18800e+03 -1386 7.72800e+03 4.81800e+03 -1387 5.23200e+03 2.17800e+03 -1388 5.23200e+03 4.04800e+03 -1389 5.23200e+03 6.40200e+03 -1390 5.23200e+03 7.31500e+03 -1391 5.49900e+03 7.61200e+03 -1392 5.52000e+03 8.38200e+03 -1393 5.52000e+03 1.06920e+04 -1394 3.85600e+03 2.95900e+03 -1395 3.85600e+03 6.90800e+03 -1396 3.87600e+03 7.92000e+03 -1397 3.95200e+03 7.92000e+03 -1398 4.09600e+03 7.92000e+03 -1399 4.78400e+03 7.48000e+02 -1400 4.84800e+03 7.48000e+02 -1401 5.04000e+03 7.48000e+02 -1402 5.29600e+03 7.48000e+02 -1403 5.58400e+03 7.48000e+02 -1404 5.64800e+03 7.48000e+02 -1405 5.87200e+03 7.48000e+02 -1406 6.09600e+03 2.64000e+02 -1407 6.09600e+03 2.02400e+03 -1408 6.09600e+03 4.04800e+03 -1409 6.09600e+03 5.22500e+03 -1410 6.11600e+03 5.36800e+03 -1411 6.19200e+03 5.36800e+03 -1412 6.25600e+03 5.36800e+03 -1413 6.41600e+03 5.36800e+03 -1414 6.57100e+03 5.36800e+03 -1415 6.09600e+03 5.94000e+02 -1416 6.60800e+03 8.64600e+03 -1417 6.60800e+03 9.43800e+03 -1418 6.60800e+03 1.14950e+04 -1419 1.72000e+04 5.33500e+03 -1420 1.72000e+04 6.68800e+03 -1421 1.72000e+04 7.72200e+03 -1422 1.72000e+04 1.05600e+04 -1423 1.72000e+04 1.15280e+04 -1424 1.73920e+04 5.19200e+03 -1425 1.75040e+04 5.19200e+03 -1426 1.76160e+04 2.31000e+02 -1427 1.76160e+04 1.78200e+03 -1428 1.76160e+04 4.21300e+03 -1429 7.24800e+03 1.08020e+04 -1430 7.37600e+03 6.38000e+02 -1431 7.37600e+03 1.51800e+03 -1432 7.37600e+03 4.04800e+03 -1433 7.37600e+03 4.92800e+03 -1434 7.37600e+03 8.75600e+03 -1435 1.80800e+03 3.11300e+03 -1436 1.82400e+03 6.86400e+03 -1437 1.84000e+03 8.05200e+03 -1438 1.84000e+03 1.00320e+04 -1439 1.22720e+04 1.11650e+04 -1440 1.23840e+04 9.06400e+03 -1441 1.25280e+04 9.06400e+03 -1442 1.26560e+04 9.06400e+03 -1443 1.28270e+04 9.06400e+03 -1444 1.28480e+04 1.60600e+03 -1445 1.28480e+04 2.31000e+03 -1446 1.28480e+04 4.70800e+03 -1447 1.28480e+04 6.07200e+03 -1448 1.28480e+04 7.39200e+03 -1449 1.28480e+04 8.53600e+03 -1450 1.64800e+03 8.77800e+03 -1451 1.64800e+03 1.00320e+04 -1452 1.66400e+03 8.18400e+03 -1453 1.68000e+03 3.11300e+03 -1454 1.68000e+03 7.01800e+03 -1455 1.68000e+03 8.06300e+03 -1456 4.78400e+03 5.28000e+02 -1457 4.84800e+03 5.28000e+02 -1458 5.04000e+03 5.28000e+02 -1459 5.29600e+03 5.28000e+02 -1460 5.58400e+03 5.28000e+02 -1461 5.64800e+03 5.28000e+02 -1462 5.87200e+03 5.28000e+02 -1463 5.93600e+03 3.30000e+02 -1464 5.93600e+03 2.02400e+03 -1465 5.93600e+03 4.04800e+03 -1466 5.93600e+03 5.32400e+03 -1467 6.09600e+03 6.55600e+03 -1468 6.19200e+03 6.55600e+03 -1469 6.25600e+03 8.38200e+03 -1470 6.25600e+03 1.14950e+04 -1471 1.69760e+04 6.68800e+03 -1472 1.69760e+04 7.87600e+03 -1473 1.69760e+04 1.05600e+04 -1474 1.69760e+04 1.15280e+04 -1475 1.70400e+04 5.72000e+03 -1476 1.71040e+04 5.72000e+03 -1477 1.71680e+04 5.72000e+03 -1478 1.73920e+04 5.72000e+03 -1479 1.75040e+04 5.72000e+03 -1480 1.76800e+04 2.31000e+02 -1481 1.76800e+04 1.78200e+03 -1482 1.76800e+04 4.24600e+03 -1483 1.16000e+04 2.31000e+02 -1484 1.16000e+04 9.02000e+02 -1485 1.16000e+04 4.48800e+03 -1486 1.16000e+04 6.07200e+03 -1487 1.16000e+04 7.39200e+03 -1488 1.16160e+04 8.22800e+03 -1489 1.16320e+04 1.12750e+04 -1490 1.72640e+04 1.05490e+04 -1491 1.72640e+04 1.15280e+04 -1492 1.72840e+04 1.01420e+04 -1493 1.74720e+04 1.01420e+04 -1494 1.75520e+04 1.01420e+04 -1495 1.79200e+04 1.01420e+04 -1496 1.83680e+04 1.01420e+04 -1497 1.85120e+04 1.01420e+04 -1498 1.86560e+04 1.01420e+04 -1499 1.87840e+04 1.01420e+04 -1500 1.89280e+04 1.01420e+04 -1501 1.90240e+04 1.01420e+04 -1502 6.22400e+03 4.29000e+02 -1503 6.22400e+03 2.02400e+03 -1504 6.22400e+03 4.04800e+03 -1505 6.22400e+03 8.38200e+03 -1506 6.22400e+03 1.08130e+04 -1507 6.35200e+03 1.09120e+04 -1508 6.46400e+03 1.09120e+04 -1509 6.67200e+03 1.09120e+04 -1510 6.84300e+03 1.09120e+04 -1511 1.93600e+03 3.11300e+03 -1512 1.93600e+03 6.75400e+03 -1513 1.93600e+03 8.06300e+03 -1514 1.95200e+03 8.18400e+03 -1515 1.96800e+03 8.77800e+03 -1516 1.96800e+03 1.00320e+04 -1517 8.16000e+02 3.57500e+03 -1518 8.16000e+02 9.92200e+03 -1519 3.98400e+03 2.95900e+03 -1520 3.98400e+03 6.90800e+03 -1521 4.12800e+03 8.93200e+03 -1522 4.27200e+03 8.93200e+03 -1523 4.33600e+03 8.93200e+03 -1524 4.49600e+03 9.03100e+03 -1525 4.49600e+03 1.14950e+04 -1526 1.54400e+04 5.83000e+02 -1527 1.54400e+04 2.53000e+03 -1528 1.54400e+04 5.48900e+03 -1529 1.54600e+04 5.80800e+03 -1530 1.56000e+04 5.80800e+03 -1531 1.57120e+04 5.80800e+03 -1532 1.57920e+04 5.80800e+03 -1533 1.58880e+04 5.80800e+03 -1534 1.59840e+04 5.80800e+03 -1535 1.61280e+04 5.80800e+03 -1536 1.62880e+04 5.80800e+03 -1537 1.64000e+04 6.79800e+03 -1538 1.64000e+04 7.87600e+03 -1539 1.64000e+04 1.04610e+04 -1540 1.64000e+04 1.14290e+04 -1541 5.36000e+03 2.17800e+03 -1542 5.36000e+03 4.04800e+03 -1543 5.36000e+03 7.19400e+03 -1544 5.55200e+03 1.02520e+04 -1545 5.63200e+03 1.02520e+04 -1546 5.80800e+03 1.02520e+04 -1547 5.96800e+03 1.02520e+04 -1548 6.03200e+03 1.02520e+04 -1549 6.11200e+03 1.02520e+04 -1550 6.19200e+03 1.02520e+04 -1551 6.30400e+03 8.53600e+03 -1552 6.28800e+03 1.14950e+04 -1553 6.32000e+03 4.29000e+02 -1554 6.32000e+03 2.02400e+03 -1555 6.32000e+03 4.04800e+03 -1556 1.16800e+03 9.65800e+03 -1557 1.23200e+03 3.57500e+03 -1558 1.23200e+03 7.84300e+03 -1559 6.35200e+03 4.29000e+02 -1560 6.35200e+03 2.02400e+03 -1561 6.35200e+03 4.04800e+03 -1562 6.35200e+03 8.65700e+03 -1563 6.36800e+03 8.84400e+03 -1564 6.38400e+03 1.14950e+04 -1565 1.66880e+04 1.14070e+04 -1566 1.67840e+04 1.11980e+04 -1567 1.69120e+04 1.11980e+04 -1568 1.70400e+04 1.11980e+04 -1569 1.71360e+04 1.11980e+04 -1570 1.72960e+04 1.11980e+04 -1571 1.74720e+04 1.11980e+04 -1572 1.75520e+04 1.11980e+04 -1573 1.79200e+04 1.11980e+04 -1574 1.83680e+04 1.11980e+04 -1575 1.85120e+04 1.11980e+04 -1576 1.86560e+04 1.11980e+04 -1577 1.87680e+04 1.11980e+04 -1578 1.89280e+04 1.11980e+04 -1579 1.52800e+04 2.53000e+03 -1580 1.52800e+04 5.47800e+03 -1581 1.52800e+04 6.79800e+03 -1582 1.52800e+04 7.78800e+03 -1583 1.52800e+04 8.64600e+03 -1584 1.52800e+04 9.87800e+03 -1585 1.52800e+04 1.06260e+04 -1586 1.52800e+04 1.14290e+04 -1587 3.47200e+03 1.00320e+04 -1588 3.48800e+03 7.48000e+03 -1589 3.50400e+03 3.11300e+03 -1590 3.50400e+03 7.13900e+03 -1591 2.08000e+02 9.58100e+03 -1592 3.08000e+02 7.96400e+03 -1593 4.80000e+02 7.96400e+03 -1594 5.60000e+02 7.96400e+03 -1595 7.36000e+02 7.96400e+03 -1596 8.48000e+02 7.96400e+03 -1597 9.12000e+02 7.96400e+03 -1598 9.76000e+02 7.96400e+03 -1599 1.08300e+03 7.96400e+03 -1600 1.10400e+03 3.57500e+03 -1601 1.10400e+03 7.84300e+03 -1602 1.39200e+03 2.90400e+03 -1603 1.39200e+03 5.85200e+03 -1604 1.40800e+03 6.02800e+03 -1605 1.42400e+03 8.77800e+03 -1606 1.42400e+03 1.00320e+04 -1607 1.02240e+04 3.60800e+03 -1608 1.02880e+04 3.60800e+03 -1609 1.03840e+04 3.60800e+03 -1610 1.05120e+04 3.60800e+03 -1611 1.05760e+04 3.60800e+03 -1612 1.06400e+04 3.60800e+03 -1613 1.07040e+04 3.60800e+03 -1614 1.08000e+04 3.60800e+03 -1615 1.09280e+04 3.60800e+03 -1616 1.10560e+04 3.60800e+03 -1617 1.11200e+04 3.60800e+03 -1618 1.12160e+04 3.60800e+03 -1619 1.13440e+04 3.60800e+03 -1620 1.14880e+04 3.60800e+03 -1621 1.16640e+04 9.02000e+02 -1622 6.88000e+02 3.57500e+03 -1623 6.88000e+02 9.92200e+03 -1624 5.87200e+03 9.68000e+02 -1625 6.12800e+03 9.68000e+02 -1626 6.19200e+03 9.68000e+02 -1627 6.25600e+03 9.68000e+02 -1628 6.41600e+03 9.68000e+02 -1629 6.54400e+03 9.68000e+02 -1630 6.67200e+03 9.68000e+02 -1631 6.78400e+03 9.68000e+02 -1632 6.89600e+03 9.68000e+02 -1633 7.00800e+03 9.68000e+02 -1634 7.18400e+03 9.68000e+02 -1635 7.31200e+03 9.68000e+02 -1636 7.50400e+03 9.68000e+02 -1637 7.60000e+03 7.59000e+02 -1638 7.60000e+03 1.39700e+03 -1639 7.60000e+03 4.93900e+03 -1640 7.66400e+03 5.14800e+03 -1641 7.76000e+03 5.14800e+03 -1642 7.82400e+03 5.14800e+03 -1643 7.88800e+03 5.14800e+03 -1644 7.95200e+03 5.14800e+03 -1645 8.04800e+03 5.14800e+03 -1646 8.17600e+03 5.14800e+03 -1647 8.33600e+03 5.14800e+03 -1648 8.43200e+03 5.14800e+03 -1649 8.49600e+03 5.14800e+03 -1650 8.75200e+03 5.14800e+03 -1651 8.84800e+03 5.14800e+03 -1652 8.99200e+03 5.14800e+03 -1653 9.44000e+03 5.14800e+03 -1654 9.55200e+03 5.14800e+03 -1655 9.68000e+03 5.14800e+03 -1656 9.82400e+03 5.14800e+03 -1657 1.00110e+04 5.14800e+03 -1658 1.00320e+04 2.31000e+02 -1659 1.00320e+04 1.01200e+03 -1660 1.00320e+04 1.76000e+03 -1661 5.48800e+03 2.17800e+03 -1662 5.48800e+03 4.04800e+03 -1663 5.48800e+03 6.40200e+03 -1664 5.64800e+03 7.08400e+03 -1665 5.93600e+03 7.08400e+03 -1666 6.09600e+03 7.08400e+03 -1667 6.19200e+03 7.08400e+03 -1668 6.41600e+03 7.08400e+03 -1669 6.54400e+03 7.08400e+03 -1670 6.67200e+03 7.08400e+03 -1671 6.76800e+03 7.16100e+03 -1672 6.76800e+03 8.64600e+03 -1673 6.76800e+03 9.43800e+03 -1674 9.93600e+03 2.31000e+02 -1675 9.93600e+03 1.01200e+03 -1676 9.93600e+03 1.76000e+03 -1677 5.20000e+03 2.17800e+03 -1678 5.20000e+03 4.04800e+03 -1679 5.20000e+03 6.40200e+03 -1680 5.20000e+03 7.45800e+03 -1681 5.20000e+03 1.05930e+04 -1682 7.40800e+03 6.38000e+02 -1683 7.40800e+03 1.51800e+03 -1684 7.40800e+03 4.04800e+03 -1685 7.40800e+03 4.92800e+03 -1686 7.40800e+03 8.75600e+03 -1687 7.53600e+03 1.06920e+04 -1688 7.60000e+03 1.06920e+04 -1689 7.69600e+03 1.06920e+04 -1690 7.82400e+03 1.06920e+04 -1691 7.88800e+03 1.06920e+04 -1692 7.98400e+03 1.06920e+04 -1693 8.09600e+03 1.06920e+04 -1694 8.17600e+03 1.06920e+04 -1695 8.27200e+03 1.06920e+04 -1696 8.36800e+03 1.06920e+04 -1697 8.43200e+03 1.06920e+04 -1698 8.72000e+03 1.06920e+04 -1699 8.84800e+03 1.06920e+04 -1700 9.10400e+03 1.06920e+04 -1701 9.72800e+03 1.06920e+04 -1702 1.00320e+04 1.06920e+04 -1703 1.02560e+04 1.06920e+04 -1704 1.03200e+04 1.06920e+04 -1705 1.04800e+04 1.06920e+04 -1706 1.06560e+04 1.06920e+04 -1707 1.07680e+04 1.06920e+04 -1708 1.09280e+04 1.06920e+04 -1709 1.10240e+04 1.06920e+04 -1710 1.12160e+04 1.06920e+04 -1711 1.13280e+04 1.06920e+04 -1712 1.14400e+04 1.06920e+04 -1713 1.15200e+04 1.06920e+04 -1714 1.16000e+04 1.06920e+04 -1715 1.17070e+04 1.06920e+04 -1716 1.17280e+04 1.13300e+04 -1717 1.17280e+04 1.08680e+04 -1718 4.88000e+03 1.14950e+04 -1719 4.94400e+03 2.17800e+03 -1720 4.94400e+03 4.04800e+03 -1721 4.94400e+03 6.40200e+03 -1722 6.89600e+03 2.20000e+02 -1723 7.00800e+03 3.08000e+02 -1724 7.18400e+03 3.08000e+02 -1725 7.31200e+03 3.08000e+02 -1726 7.50400e+03 3.08000e+02 -1727 7.66400e+03 3.08000e+02 -1728 7.76000e+03 3.08000e+02 -1729 7.82400e+03 3.08000e+02 -1730 7.88800e+03 3.08000e+02 -1731 7.95200e+03 3.08000e+02 -1732 8.04800e+03 3.08000e+02 -1733 8.20800e+03 3.08000e+02 -1734 8.33600e+03 3.08000e+02 -1735 8.43200e+03 3.08000e+02 -1736 8.49600e+03 3.08000e+02 -1737 8.56000e+03 3.08000e+02 -1738 8.62400e+03 3.08000e+02 -1739 8.75200e+03 3.08000e+02 -1740 8.84800e+03 3.08000e+02 -1741 8.97600e+03 3.08000e+02 -1742 9.04000e+03 3.08000e+02 -1743 9.16800e+03 3.08000e+02 -1744 9.23200e+03 2.20000e+02 -1745 9.23200e+03 7.59000e+02 -1746 9.23200e+03 1.76000e+03 -1747 9.23200e+03 2.94800e+03 -1748 9.23200e+03 7.02900e+03 -1749 3.44000e+03 1.00320e+04 -1750 3.50400e+03 7.92000e+03 -1751 3.63200e+03 7.92000e+03 -1752 3.69600e+03 7.92000e+03 -1753 3.76000e+03 3.11300e+03 -1754 3.76000e+03 6.90800e+03 -1755 8.24000e+03 8.89900e+03 -1756 8.27200e+03 8.75600e+03 -1757 8.30400e+03 1.18800e+03 -1758 8.30400e+03 6.90800e+03 -1759 8.30400e+03 8.61300e+03 -1760 9.29600e+03 6.89700e+03 -1761 9.29600e+03 9.87800e+03 -1762 9.45600e+03 6.77600e+03 -1763 9.55200e+03 6.77600e+03 -1764 9.68000e+03 6.77600e+03 -1765 9.77600e+03 2.31000e+02 -1766 9.77600e+03 1.01200e+03 -1767 9.77600e+03 1.76000e+03 -1768 6.99200e+03 8.64600e+03 -1769 6.99200e+03 1.08020e+04 -1770 7.02400e+03 7.26000e+03 -1771 7.05600e+03 6.38000e+02 -1772 7.05600e+03 1.51800e+03 -1773 7.05600e+03 2.57400e+03 -1774 7.05600e+03 4.04800e+03 -1775 7.05600e+03 7.13900e+03 -1776 1.46400e+04 2.53000e+03 -1777 1.46400e+04 5.36800e+03 -1778 1.46400e+04 6.79800e+03 -1779 1.46400e+04 8.64600e+03 -1780 1.46400e+04 9.87800e+03 -1781 1.46400e+04 1.15390e+04 -1782 1.47360e+04 1.01200e+03 -1783 1.48000e+04 1.01200e+03 -1784 1.49120e+04 1.01200e+03 -1785 1.51200e+04 1.01200e+03 -1786 1.53280e+04 1.01200e+03 -1787 1.54080e+04 1.01200e+03 -1788 1.54720e+04 1.01200e+03 -1789 1.56000e+04 1.01200e+03 -1790 1.57280e+04 1.01200e+03 -1791 1.57920e+04 1.01200e+03 -1792 1.58880e+04 1.01200e+03 -1793 1.59840e+04 1.01200e+03 -1794 1.61280e+04 1.01200e+03 -1795 1.62720e+04 1.01200e+03 -1796 1.64000e+04 1.01200e+03 -1797 1.65280e+04 9.13000e+02 -1798 1.47040e+04 2.53000e+03 -1799 1.47200e+04 4.92800e+03 -1800 1.47360e+04 5.35700e+03 -1801 1.47360e+04 6.79800e+03 -1802 1.47360e+04 8.64600e+03 -1803 1.47360e+04 9.87800e+03 -1804 1.47360e+04 1.14290e+04 -1805 1.48160e+04 4.92800e+03 -1806 1.49280e+04 4.92800e+03 -1807 1.51360e+04 4.92800e+03 -1808 1.53280e+04 4.92800e+03 -1809 1.54080e+04 4.92800e+03 -1810 1.54720e+04 4.92800e+03 -1811 1.56000e+04 4.92800e+03 -1812 1.57120e+04 4.92800e+03 -1813 1.57920e+04 4.92800e+03 -1814 1.58880e+04 4.92800e+03 -1815 1.59840e+04 4.92800e+03 -1816 1.61280e+04 4.92800e+03 -1817 1.62880e+04 4.92800e+03 -1818 1.64000e+04 4.92800e+03 -1819 1.65440e+04 4.92800e+03 -1820 1.66560e+04 4.92800e+03 -1821 1.67520e+04 4.92800e+03 -1822 1.68160e+04 1.01200e+03 -1823 1.68160e+04 2.22200e+03 -1824 1.68160e+04 3.85000e+03 -1825 1.38080e+04 5.13700e+03 -1826 1.38080e+04 7.28200e+03 -1827 1.38080e+04 8.86600e+03 -1828 1.38080e+04 9.87800e+03 -1829 1.38080e+04 1.15390e+04 -1830 1.39080e+04 4.70800e+03 -1831 1.40800e+04 4.70800e+03 -1832 1.42240e+04 4.70800e+03 -1833 1.44000e+04 4.70800e+03 -1834 1.45120e+04 4.70800e+03 -1835 1.47360e+04 4.70800e+03 -1836 1.48160e+04 4.70800e+03 -1837 1.49280e+04 4.70800e+03 -1838 1.51360e+04 4.70800e+03 -1839 1.53280e+04 4.70800e+03 -1840 1.54080e+04 4.70800e+03 -1841 1.54720e+04 4.70800e+03 -1842 1.56000e+04 4.70800e+03 -1843 1.57120e+04 4.70800e+03 -1844 1.57920e+04 4.70800e+03 -1845 1.58880e+04 4.70800e+03 -1846 1.59840e+04 4.70800e+03 -1847 1.61280e+04 4.70800e+03 -1848 1.62880e+04 4.70800e+03 -1849 1.64000e+04 4.70800e+03 -1850 1.65440e+04 4.70800e+03 -1851 1.66560e+04 4.70800e+03 -1852 1.67520e+04 4.70800e+03 -1853 1.69120e+04 4.70800e+03 -1854 1.69760e+04 1.01200e+03 -1855 1.69760e+04 2.22200e+03 -1856 1.69760e+04 3.97100e+03 -1857 3.66400e+03 3.11300e+03 -1858 3.66400e+03 7.01800e+03 -1859 3.66400e+03 9.11900e+03 -1860 3.68400e+03 9.28400e+03 -1861 3.76000e+03 1.01420e+04 -1862 3.60000e+03 3.11300e+03 -1863 3.60000e+03 7.12800e+03 -1864 3.60000e+03 9.04200e+03 -1865 3.71200e+03 9.81200e+03 -1866 3.88800e+03 9.81200e+03 -1867 4.12800e+03 9.81200e+03 -1868 4.27200e+03 9.81200e+03 -1869 4.40000e+03 9.81200e+03 -1870 4.52800e+03 9.81200e+03 -1871 4.62400e+03 9.81200e+03 -1872 4.68800e+03 9.81200e+03 -1873 4.79500e+03 9.81200e+03 -1874 4.95500e+03 9.15200e+03 -1875 4.81600e+03 1.14950e+04 -1876 4.97600e+03 2.17800e+03 -1877 4.97600e+03 4.04800e+03 -1878 4.97600e+03 6.40200e+03 -1879 8.97600e+03 6.89700e+03 -1880 8.97600e+03 9.87800e+03 -1881 8.99600e+03 6.55600e+03 -1882 9.29600e+03 6.55600e+03 -1883 9.45600e+03 6.55600e+03 -1884 9.55200e+03 6.55600e+03 -1885 9.68000e+03 6.55600e+03 -1886 9.80800e+03 6.55600e+03 -1887 1.00160e+04 6.55600e+03 -1888 1.01280e+04 6.55600e+03 -1889 1.02240e+04 6.55600e+03 -1890 1.03840e+04 6.55600e+03 -1891 1.05120e+04 6.55600e+03 -1892 1.06560e+04 6.55600e+03 -1893 1.08000e+04 6.55600e+03 -1894 1.08640e+04 6.55600e+03 -1895 1.09280e+04 6.55600e+03 -1896 1.10400e+04 6.55600e+03 -1897 1.11200e+04 6.55600e+03 -1898 1.12160e+04 6.55600e+03 -1899 1.13280e+04 6.55600e+03 -1900 1.15040e+04 6.55600e+03 -1901 1.15680e+04 6.55600e+03 -1902 1.16320e+04 6.55600e+03 -1903 1.16960e+04 6.55600e+03 -1904 1.17600e+04 6.55600e+03 -1905 1.18240e+04 6.55600e+03 -1906 1.19200e+04 6.55600e+03 -1907 1.20320e+04 6.55600e+03 -1908 1.21760e+04 6.55600e+03 -1909 1.23840e+04 6.55600e+03 -1910 1.25120e+04 6.55600e+03 -1911 1.26880e+04 6.55600e+03 -1912 1.28000e+04 6.55600e+03 -1913 1.29120e+04 6.55600e+03 -1914 1.30720e+04 4.84000e+02 -1915 1.30720e+04 1.60600e+03 -1916 1.30720e+04 2.31000e+03 -1917 1.30720e+04 3.12400e+03 -1918 1.30720e+04 3.93800e+03 -1919 1.30720e+04 4.70800e+03 -1920 1.30720e+04 6.19300e+03 -1921 1.31080e+04 5.72000e+02 -1922 1.32000e+04 5.72000e+02 -1923 1.33440e+04 5.72000e+02 -1924 1.34880e+04 5.72000e+02 -1925 1.36320e+04 5.72000e+02 -1926 1.38560e+04 5.72000e+02 -1927 1.40960e+04 5.72000e+02 -1928 1.42240e+04 5.72000e+02 -1929 1.44000e+04 5.72000e+02 -1930 1.46400e+04 5.72000e+02 -1931 1.47360e+04 5.72000e+02 -1932 1.48000e+04 5.72000e+02 -1933 1.49120e+04 5.72000e+02 -1934 1.50400e+04 5.72000e+02 -1935 1.52000e+04 5.72000e+02 -1936 1.53280e+04 5.72000e+02 -1937 1.54080e+04 4.84000e+02 -1938 1.00160e+04 6.77600e+03 -1939 1.01280e+04 6.77600e+03 -1940 1.02240e+04 6.77600e+03 -1941 1.03840e+04 6.77600e+03 -1942 1.04800e+04 2.31000e+02 -1943 1.04800e+04 1.01200e+03 -1944 1.04800e+04 1.76000e+03 -1945 7.12000e+03 6.38000e+02 -1946 7.12000e+03 1.51800e+03 -1947 7.12000e+03 4.04800e+03 -1948 7.12000e+03 8.53600e+03 -1949 7.12000e+03 1.08020e+04 -1950 3.72800e+03 3.11300e+03 -1951 3.72800e+03 6.90800e+03 -1952 3.89900e+03 9.59200e+03 -1953 4.01600e+03 1.01420e+04 -1954 5.77600e+03 1.08020e+04 -1955 5.79600e+03 9.06400e+03 -1956 5.96800e+03 9.06400e+03 -1957 6.03200e+03 9.06400e+03 -1958 6.11200e+03 9.06400e+03 -1959 6.19200e+03 9.06400e+03 -1960 6.35200e+03 9.06400e+03 -1961 6.43200e+03 9.06400e+03 -1962 6.51200e+03 9.06400e+03 -1963 6.67200e+03 9.06400e+03 -1964 6.86400e+03 9.06400e+03 -1965 6.92800e+03 9.06400e+03 -1966 7.02400e+03 9.06400e+03 -1967 7.21100e+03 9.06400e+03 -1968 7.24800e+03 6.38000e+02 -1969 7.24800e+03 1.51800e+03 -1970 7.24800e+03 4.04800e+03 -1971 7.24800e+03 7.12800e+03 -1972 7.24800e+03 8.76700e+03 -1973 3.92000e+03 2.95900e+03 -1974 3.92000e+03 6.90800e+03 -1975 3.92000e+03 9.16300e+03 -1976 3.97200e+03 9.37200e+03 -1977 4.12800e+03 9.37200e+03 -1978 4.27200e+03 9.37200e+03 -1979 4.52800e+03 9.37200e+03 -1980 4.62400e+03 9.37200e+03 -1981 4.68800e+03 9.37200e+03 -1982 4.78400e+03 9.37200e+03 -1983 4.96000e+03 9.37200e+03 -1984 5.13600e+03 9.37200e+03 -1985 5.55200e+03 9.37200e+03 -1986 5.63200e+03 9.37200e+03 -1987 5.80800e+03 9.37200e+03 -1988 5.96800e+03 9.37200e+03 -1989 6.03200e+03 9.37200e+03 -1990 6.11200e+03 9.37200e+03 -1991 6.19200e+03 9.37200e+03 -1992 6.35200e+03 9.37200e+03 -1993 6.43200e+03 9.37200e+03 -1994 6.51200e+03 9.47100e+03 -1995 6.51200e+03 1.14950e+04 -1996 1.63680e+04 2.22200e+03 -1997 1.63680e+04 3.85000e+03 -1998 1.63680e+04 5.36800e+03 -1999 1.63680e+04 6.79800e+03 -2000 1.63680e+04 7.87600e+03 -2001 1.63680e+04 1.04610e+04 -2002 1.63680e+04 1.14290e+04 -2003 3.53600e+03 3.11300e+03 -2004 3.53600e+03 7.12800e+03 -2005 3.53600e+03 1.00320e+04 -2006 8.46400e+03 8.74500e+03 -2007 8.72000e+03 8.44800e+03 -2008 8.84800e+03 8.44800e+03 -2009 9.10400e+03 8.44800e+03 -2010 9.72800e+03 8.44800e+03 -2011 1.00000e+04 8.44800e+03 -2012 1.02560e+04 8.44800e+03 -2013 1.03520e+04 8.44800e+03 -2014 1.04640e+04 8.44800e+03 -2015 1.06560e+04 8.44800e+03 -2016 1.07360e+04 8.44800e+03 -2017 1.08000e+04 8.44800e+03 -2018 1.09120e+04 8.44800e+03 -2019 1.10400e+04 8.44800e+03 -2020 1.12000e+04 8.44800e+03 -2021 1.13440e+04 8.44800e+03 -2022 1.15040e+04 8.44800e+03 -2023 1.16000e+04 8.44800e+03 -2024 1.17120e+04 8.44800e+03 -2025 1.17920e+04 8.44800e+03 -2026 1.19840e+04 8.44800e+03 -2027 1.21920e+04 8.44800e+03 -2028 1.22720e+04 8.44800e+03 -2029 1.23840e+04 8.44800e+03 -2030 1.25280e+04 8.44800e+03 -2031 1.26560e+04 8.44800e+03 -2032 1.27200e+04 1.60600e+03 -2033 1.27200e+04 2.57400e+03 -2034 1.27200e+04 4.70800e+03 -2035 1.27200e+04 6.07200e+03 -2036 1.27200e+04 7.39200e+03 -2037 1.28160e+04 7.92000e+02 -2038 1.29440e+04 7.92000e+02 -2039 1.31200e+04 7.92000e+02 -2040 1.32000e+04 7.92000e+02 -2041 1.33440e+04 7.92000e+02 -2042 1.34880e+04 7.92000e+02 -2043 1.36320e+04 7.92000e+02 -2044 1.38560e+04 7.92000e+02 -2045 1.40960e+04 7.92000e+02 -2046 1.42240e+04 7.92000e+02 -2047 1.44000e+04 7.92000e+02 -2048 1.46400e+04 7.92000e+02 -2049 1.47360e+04 7.92000e+02 -2050 1.48000e+04 7.92000e+02 -2051 1.49120e+04 7.92000e+02 -2052 1.50510e+04 7.92000e+02 -2053 2.80000e+03 3.11300e+03 -2054 2.80000e+03 6.86400e+03 -2055 2.85200e+03 7.70000e+03 -2056 2.96000e+03 7.70000e+03 -2057 3.02400e+03 7.70000e+03 -2058 3.20000e+03 7.70000e+03 -2059 3.31200e+03 7.70000e+03 -2060 3.42400e+03 7.70000e+03 -2061 3.50400e+03 7.70000e+03 -2062 3.63200e+03 7.70000e+03 -2063 3.69600e+03 7.70000e+03 -2064 3.80800e+03 7.70000e+03 -2065 3.88800e+03 7.70000e+03 -2066 3.95200e+03 7.70000e+03 -2067 4.09600e+03 7.70000e+03 -2068 4.17600e+03 7.70000e+03 -2069 4.24000e+03 7.79900e+03 -2070 8.04800e+03 8.75600e+03 -2071 8.08000e+03 7.70000e+03 -2072 8.11200e+03 1.18800e+03 -2073 8.11200e+03 4.81800e+03 -2074 8.11200e+03 7.01800e+03 -2075 1.32800e+03 3.22300e+03 -2076 1.32800e+03 6.91900e+03 -2077 1.45600e+03 8.77800e+03 -2078 1.45600e+03 1.00320e+04 -2079 9.68000e+03 2.28800e+03 -2080 9.80800e+03 2.28800e+03 -2081 9.87200e+03 2.28800e+03 -2082 1.00000e+04 2.28800e+03 -2083 1.00960e+04 2.28800e+03 -2084 1.02240e+04 2.28800e+03 -2085 1.02880e+04 2.28800e+03 -2086 1.03840e+04 2.28800e+03 -2087 1.05120e+04 2.28800e+03 -2088 1.05760e+04 2.28800e+03 -2089 1.06400e+04 2.28800e+03 -2090 1.07040e+04 2.28800e+03 -2091 1.08000e+04 2.28800e+03 -2092 1.09280e+04 2.28800e+03 -2093 1.10560e+04 2.28800e+03 -2094 1.11200e+04 2.28800e+03 -2095 1.12160e+04 2.28800e+03 -2096 1.13440e+04 2.28800e+03 -2097 1.14080e+04 2.28800e+03 -2098 1.14880e+04 2.28800e+03 -2099 1.16960e+04 2.28800e+03 -2100 1.17600e+04 2.28800e+03 -2101 1.19040e+04 2.28800e+03 -2102 1.20480e+04 2.28800e+03 -2103 1.21760e+04 2.28800e+03 -2104 1.23360e+04 2.28800e+03 -2105 1.24320e+04 2.28800e+03 -2106 1.24960e+04 9.13000e+02 -2107 1.24960e+04 1.60600e+03 -2108 1.25160e+04 1.01200e+03 -2109 1.26880e+04 1.01200e+03 -2110 1.28160e+04 1.01200e+03 -2111 1.29440e+04 1.01200e+03 -2112 1.31200e+04 1.01200e+03 -2113 1.32000e+04 1.01200e+03 -2114 1.33440e+04 1.01200e+03 -2115 1.34880e+04 1.01200e+03 -2116 1.36320e+04 1.01200e+03 -2117 1.38670e+04 1.01200e+03 -2118 5.23200e+03 1.04720e+04 -2119 5.48800e+03 7.92000e+03 -2120 5.55200e+03 7.92000e+03 -2121 5.63200e+03 7.92000e+03 -2122 5.71200e+03 7.92000e+03 -2123 5.80800e+03 7.92000e+03 -2124 5.96800e+03 7.92000e+03 -2125 6.09600e+03 7.92000e+03 -2126 6.19200e+03 7.92000e+03 -2127 6.41600e+03 7.92000e+03 -2128 6.54400e+03 7.92000e+03 -2129 6.67200e+03 7.92000e+03 -2130 6.86400e+03 7.92000e+03 -2131 6.92800e+03 7.92000e+03 -2132 7.04000e+03 7.92000e+03 -2133 7.18400e+03 7.92000e+03 -2134 7.53600e+03 7.92000e+03 -2135 7.60000e+03 7.92000e+03 -2136 7.69600e+03 7.92000e+03 -2137 7.76000e+03 7.92000e+03 -2138 7.82400e+03 7.92000e+03 -2139 7.88800e+03 7.92000e+03 -2140 8.09600e+03 7.92000e+03 -2141 8.17600e+03 7.92000e+03 -2142 8.25600e+03 7.92000e+03 -2143 8.44800e+03 7.92000e+03 -2144 8.72000e+03 7.92000e+03 -2145 8.84800e+03 7.92000e+03 -2146 9.11500e+03 7.92000e+03 -2147 9.13600e+03 1.18800e+03 -2148 9.13600e+03 2.94800e+03 -2149 9.13600e+03 5.96200e+03 -2150 9.13600e+03 7.01800e+03 -2151 9.44400e+03 6.11600e+03 -2152 9.55200e+03 6.11600e+03 -2153 9.68000e+03 6.11600e+03 -2154 9.80800e+03 6.11600e+03 -2155 1.00160e+04 6.11600e+03 -2156 1.01440e+04 6.11600e+03 -2157 1.02240e+04 6.11600e+03 -2158 1.03840e+04 6.11600e+03 -2159 1.05120e+04 6.11600e+03 -2160 1.05760e+04 6.11600e+03 -2161 1.06560e+04 6.11600e+03 -2162 1.08000e+04 6.11600e+03 -2163 1.08640e+04 6.11600e+03 -2164 1.09280e+04 6.11600e+03 -2165 1.10560e+04 6.11600e+03 -2166 1.11200e+04 6.11600e+03 -2167 1.12160e+04 6.11600e+03 -2168 1.13120e+04 2.31000e+02 -2169 1.13120e+04 9.02000e+02 -2170 1.13120e+04 4.48800e+03 -2171 1.13120e+04 5.97300e+03 -2172 9.00800e+03 9.87800e+03 -2173 9.10400e+03 1.18800e+03 -2174 9.10400e+03 2.94800e+03 -2175 9.10400e+03 5.96200e+03 -2176 9.10400e+03 7.02900e+03 -2177 5.64800e+03 1.06810e+04 -2178 5.80800e+03 1.04720e+04 -2179 5.96800e+03 1.04720e+04 -2180 6.03200e+03 1.04720e+04 -2181 6.11200e+03 1.04720e+04 -2182 6.19200e+03 1.04720e+04 -2183 6.35200e+03 1.04720e+04 -2184 6.46400e+03 1.04720e+04 -2185 6.67200e+03 1.04720e+04 -2186 6.84800e+03 1.04720e+04 -2187 7.02400e+03 1.04720e+04 -2188 7.20000e+03 1.04720e+04 -2189 7.37600e+03 1.04720e+04 -2190 7.53600e+03 1.04720e+04 -2191 7.60000e+03 1.04720e+04 -2192 7.69600e+03 1.04720e+04 -2193 7.82400e+03 1.04720e+04 -2194 7.88800e+03 1.04720e+04 -2195 7.98400e+03 1.04720e+04 -2196 8.09600e+03 1.04720e+04 -2197 8.17600e+03 1.04720e+04 -2198 8.27200e+03 1.04720e+04 -2199 8.36800e+03 1.04720e+04 -2200 8.43200e+03 1.04720e+04 -2201 8.72000e+03 1.04720e+04 -2202 8.84800e+03 1.04720e+04 -2203 9.10400e+03 1.04720e+04 -2204 9.72800e+03 1.04720e+04 -2205 1.00320e+04 1.04720e+04 -2206 1.02560e+04 1.04720e+04 -2207 1.03200e+04 1.04720e+04 -2208 1.04800e+04 1.04720e+04 -2209 1.06560e+04 1.04720e+04 -2210 1.07470e+04 1.04720e+04 -2211 1.07680e+04 2.31000e+02 -2212 1.07680e+04 9.02000e+02 -2213 1.07680e+04 1.76000e+03 -2214 1.07680e+04 7.39200e+03 -2215 1.07680e+04 1.03730e+04 -2216 1.00160e+04 9.06400e+03 -2217 1.00640e+04 2.31000e+02 -2218 1.00640e+04 1.01200e+03 -2219 1.00640e+04 1.76000e+03 -2220 5.58400e+03 3.22300e+03 -2221 5.58400e+03 4.04800e+03 -2222 5.58400e+03 6.40200e+03 -2223 5.58400e+03 8.38200e+03 -2224 5.58400e+03 1.06920e+04 -2225 5.66400e+03 3.08000e+03 -2226 5.87200e+03 3.08000e+03 -2227 6.12800e+03 3.08000e+03 -2228 6.19200e+03 3.08000e+03 -2229 6.25600e+03 3.08000e+03 -2230 6.41600e+03 3.08000e+03 -2231 6.56000e+03 3.08000e+03 -2232 6.67200e+03 3.08000e+03 -2233 6.78400e+03 3.08000e+03 -2234 6.89600e+03 3.08000e+03 -2235 7.00800e+03 3.08000e+03 -2236 7.08800e+03 3.08000e+03 -2237 7.18400e+03 3.08000e+03 -2238 7.31200e+03 3.08000e+03 -2239 7.50400e+03 3.08000e+03 -2240 7.66400e+03 3.08000e+03 -2241 7.76000e+03 3.08000e+03 -2242 7.82400e+03 3.08000e+03 -2243 7.88800e+03 3.08000e+03 -2244 7.95200e+03 3.08000e+03 -2245 8.04800e+03 3.08000e+03 -2246 8.20800e+03 3.08000e+03 -2247 8.33600e+03 3.08000e+03 -2248 8.43200e+03 3.08000e+03 -2249 8.49600e+03 3.08000e+03 -2250 8.62400e+03 3.08000e+03 -2251 8.75200e+03 3.08000e+03 -2252 8.84800e+03 3.08000e+03 -2253 8.97600e+03 3.08000e+03 -2254 9.05100e+03 3.08000e+03 -2255 9.07200e+03 1.18800e+03 -2256 9.07200e+03 2.91500e+03 -2257 8.62400e+03 5.96200e+03 -2258 8.62400e+03 8.86600e+03 -2259 8.68800e+03 1.18800e+03 -2260 8.59200e+03 8.86600e+03 -2261 8.65600e+03 1.18800e+03 -2262 8.65600e+03 5.96200e+03 -2263 7.95200e+03 8.75600e+03 -2264 8.04800e+03 6.11600e+03 -2265 8.17600e+03 6.11600e+03 -2266 8.43200e+03 6.11600e+03 -2267 8.50700e+03 6.11600e+03 -2268 8.52800e+03 1.18800e+03 -2269 8.52800e+03 5.97300e+03 -2270 8.46400e+03 1.18800e+03 -2271 8.65600e+03 8.86600e+03 -2272 7.05600e+03 1.08020e+04 -2273 7.19500e+03 8.84400e+03 -2274 7.21600e+03 6.38000e+02 -2275 7.21600e+03 1.51800e+03 -2276 7.21600e+03 4.04800e+03 -2277 7.21600e+03 7.12800e+03 -2278 7.21600e+03 8.65700e+03 -2279 1.74560e+04 1.78200e+03 -2280 1.74560e+04 4.09200e+03 -2281 1.74560e+04 6.57800e+03 -2282 1.74560e+04 7.72200e+03 -2283 1.74560e+04 8.74500e+03 -2284 1.74760e+04 8.84400e+03 -2285 1.75520e+04 8.84400e+03 -2286 1.77120e+04 9.60300e+03 -2287 1.77120e+04 1.06700e+04 -2288 9.42800e+03 2.94800e+03 -2289 9.68000e+03 2.94800e+03 -2290 9.80800e+03 2.94800e+03 -2291 9.87200e+03 2.94800e+03 -2292 1.00000e+04 2.94800e+03 -2293 1.00960e+04 2.94800e+03 -2294 1.02240e+04 2.94800e+03 -2295 1.02880e+04 2.94800e+03 -2296 1.03840e+04 2.94800e+03 -2297 1.05120e+04 2.94800e+03 -2298 1.05760e+04 2.94800e+03 -2299 1.06400e+04 2.94800e+03 -2300 1.07040e+04 2.94800e+03 -2301 1.08000e+04 2.94800e+03 -2302 1.09280e+04 2.94800e+03 -2303 1.10560e+04 2.94800e+03 -2304 1.11200e+04 2.94800e+03 -2305 1.12160e+04 2.94800e+03 -2306 1.13440e+04 2.94800e+03 -2307 1.14880e+04 2.94800e+03 -2308 1.16960e+04 2.94800e+03 -2309 1.17600e+04 2.94800e+03 -2310 1.19040e+04 2.94800e+03 -2311 1.20480e+04 2.94800e+03 -2312 1.21760e+04 2.94800e+03 -2313 1.23360e+04 2.94800e+03 -2314 1.24320e+04 2.94800e+03 -2315 1.25230e+04 2.94800e+03 -2316 1.25600e+04 1.60600e+03 -2317 1.25600e+04 2.35400e+03 -2318 1.75520e+04 1.78200e+03 -2319 1.75520e+04 4.09200e+03 -2320 1.75520e+04 6.57800e+03 -2321 1.75520e+04 7.88700e+03 -2322 1.77120e+04 8.18400e+03 -2323 1.78560e+04 8.18400e+03 -2324 1.79680e+04 8.18400e+03 -2325 1.81920e+04 8.18400e+03 -2326 1.82560e+04 9.42700e+03 -2327 1.82560e+04 1.06700e+04 -2328 9.72800e+03 1.00320e+04 -2329 1.00320e+04 1.00320e+04 -2330 1.02560e+04 1.00320e+04 -2331 1.03200e+04 1.00320e+04 -2332 1.04160e+04 1.00320e+04 -2333 1.04800e+04 1.00320e+04 -2334 1.06560e+04 1.00320e+04 -2335 1.07360e+04 1.00320e+04 -2336 1.08000e+04 1.00320e+04 -2337 1.09280e+04 1.00320e+04 -2338 1.10400e+04 1.00320e+04 -2339 1.12160e+04 1.00320e+04 -2340 1.13120e+04 1.00320e+04 -2341 1.14400e+04 1.00320e+04 -2342 1.15200e+04 1.00320e+04 -2343 1.16000e+04 1.00320e+04 -2344 1.17120e+04 1.00320e+04 -2345 1.17920e+04 1.00320e+04 -2346 1.19840e+04 1.00320e+04 -2347 1.20800e+04 1.00320e+04 -2348 1.22080e+04 1.00320e+04 -2349 1.23840e+04 1.00320e+04 -2350 1.25280e+04 1.00320e+04 -2351 1.26560e+04 1.00320e+04 -2352 1.28160e+04 1.00320e+04 -2353 1.29440e+04 1.00320e+04 -2354 1.30880e+04 1.00320e+04 -2355 1.32320e+04 1.00320e+04 -2356 1.34080e+04 1.00320e+04 -2357 1.35360e+04 1.00320e+04 -2358 1.36430e+04 1.00320e+04 -2359 1.36800e+04 2.53000e+03 -2360 1.36800e+04 5.14800e+03 -2361 1.36800e+04 7.28200e+03 -2362 1.36800e+04 8.86600e+03 -2363 1.36800e+04 9.88900e+03 -2364 1.77120e+04 2.31000e+02 -2365 1.77120e+04 1.78200e+03 -2366 1.77120e+04 4.24600e+03 -2367 1.77120e+04 6.32500e+03 -2368 1.78400e+04 6.90800e+03 -2369 1.79680e+04 6.90800e+03 -2370 1.81280e+04 7.00700e+03 -2371 1.81280e+04 7.76600e+03 -2372 1.81280e+04 1.06700e+04 -2373 9.07200e+03 3.48700e+03 -2374 9.07200e+03 5.96200e+03 -2375 9.07200e+03 6.90800e+03 -2376 9.07200e+03 9.87800e+03 -2377 9.44000e+03 3.38800e+03 -2378 9.52000e+03 3.38800e+03 -2379 9.68000e+03 3.38800e+03 -2380 9.84000e+03 3.38800e+03 -2381 1.00000e+04 3.38800e+03 -2382 1.00960e+04 3.38800e+03 -2383 1.02240e+04 3.38800e+03 -2384 1.02880e+04 3.38800e+03 -2385 1.03840e+04 3.38800e+03 -2386 1.05120e+04 3.38800e+03 -2387 1.05760e+04 3.38800e+03 -2388 1.06400e+04 3.38800e+03 -2389 1.07040e+04 3.38800e+03 -2390 1.08000e+04 3.38800e+03 -2391 1.09280e+04 3.38800e+03 -2392 1.10560e+04 3.38800e+03 -2393 1.11200e+04 3.38800e+03 -2394 1.12160e+04 3.38800e+03 -2395 1.13440e+04 3.38800e+03 -2396 1.14880e+04 3.38800e+03 -2397 1.16960e+04 3.38800e+03 -2398 1.17600e+04 3.38800e+03 -2399 1.19040e+04 3.38800e+03 -2400 1.20480e+04 3.38800e+03 -2401 1.21760e+04 3.38800e+03 -2402 1.23360e+04 3.38800e+03 -2403 1.24320e+04 3.38800e+03 -2404 1.25440e+04 3.38800e+03 -2405 1.26880e+04 3.38800e+03 -2406 1.27630e+04 3.38800e+03 -2407 1.27840e+04 1.60600e+03 -2408 1.27840e+04 2.31000e+03 -2409 9.23200e+03 8.10700e+03 -2410 9.23200e+03 9.87800e+03 -2411 9.64800e+03 8.00800e+03 -2412 9.74400e+03 8.00800e+03 -2413 9.90400e+03 8.00800e+03 -2414 1.00160e+04 8.00800e+03 -2415 1.01920e+04 8.00800e+03 -2416 1.02560e+04 8.00800e+03 -2417 1.03840e+04 8.00800e+03 -2418 1.04960e+04 8.00800e+03 -2419 1.06560e+04 8.00800e+03 -2420 1.08160e+04 8.00800e+03 -2421 1.09280e+04 8.00800e+03 -2422 1.10400e+04 8.00800e+03 -2423 1.11200e+04 8.00800e+03 -2424 1.12160e+04 8.00800e+03 -2425 1.13280e+04 8.00800e+03 -2426 1.15040e+04 8.00800e+03 -2427 1.15680e+04 8.00800e+03 -2428 1.16320e+04 8.00800e+03 -2429 1.16960e+04 8.00800e+03 -2430 1.17600e+04 8.00800e+03 -2431 1.18240e+04 8.00800e+03 -2432 1.19680e+04 8.00800e+03 -2433 1.21920e+04 8.00800e+03 -2434 1.22720e+04 8.00800e+03 -2435 1.23840e+04 8.00800e+03 -2436 1.25280e+04 8.00800e+03 -2437 1.26560e+04 8.00800e+03 -2438 1.28000e+04 8.00800e+03 -2439 1.28800e+04 8.00800e+03 -2440 1.29440e+04 8.00800e+03 -2441 1.30880e+04 8.00800e+03 -2442 1.32640e+04 8.00800e+03 -2443 1.33920e+04 8.00800e+03 -2444 1.35200e+04 8.00800e+03 -2445 1.36320e+04 8.00800e+03 -2446 1.37120e+04 2.53000e+03 -2447 1.37120e+04 5.14800e+03 -2448 1.37120e+04 7.28200e+03 -2449 8.40000e+03 1.18800e+03 -2450 8.40000e+03 6.91900e+03 -2451 8.42000e+03 7.04000e+03 -2452 8.50700e+03 7.04000e+03 -2453 8.52800e+03 7.13900e+03 -2454 8.52800e+03 8.86600e+03 -2455 9.16800e+03 1.63900e+03 -2456 9.16800e+03 2.94800e+03 -2457 9.16800e+03 5.96200e+03 -2458 9.16800e+03 7.01800e+03 -2459 9.16800e+03 8.07400e+03 -2460 9.16800e+03 9.87800e+03 -2461 9.26400e+03 1.45200e+03 -2462 9.42400e+03 1.45200e+03 -2463 9.58400e+03 1.45200e+03 -2464 9.68000e+03 1.45200e+03 -2465 9.80800e+03 1.45200e+03 -2466 9.87200e+03 1.45200e+03 -2467 1.00000e+04 1.45200e+03 -2468 1.00960e+04 1.45200e+03 -2469 1.02240e+04 1.45200e+03 -2470 1.02880e+04 1.45200e+03 -2471 1.03840e+04 1.45200e+03 -2472 1.05120e+04 1.45200e+03 -2473 1.05760e+04 1.45200e+03 -2474 1.06400e+04 1.45200e+03 -2475 1.07040e+04 1.45200e+03 -2476 1.08000e+04 1.45200e+03 -2477 1.09280e+04 1.45200e+03 -2478 1.10560e+04 1.45200e+03 -2479 1.11200e+04 1.45200e+03 -2480 1.12160e+04 1.45200e+03 -2481 1.13440e+04 1.45200e+03 -2482 1.14880e+04 1.45200e+03 -2483 1.16960e+04 1.45200e+03 -2484 1.17600e+04 1.45200e+03 -2485 1.19040e+04 1.45200e+03 -2486 1.20480e+04 1.45200e+03 -2487 1.21760e+04 1.45200e+03 -2488 1.23040e+04 9.02000e+02 -2489 9.36000e+03 2.82700e+03 -2490 9.41200e+03 2.72800e+03 -2491 9.68000e+03 2.72800e+03 -2492 9.80800e+03 2.72800e+03 -2493 9.87200e+03 2.72800e+03 -2494 1.00000e+04 2.72800e+03 -2495 1.00960e+04 2.72800e+03 -2496 1.02240e+04 2.72800e+03 -2497 1.02880e+04 2.72800e+03 -2498 1.03840e+04 2.72800e+03 -2499 1.05120e+04 2.72800e+03 -2500 1.05760e+04 2.72800e+03 -2501 1.06400e+04 2.72800e+03 -2502 1.07040e+04 2.72800e+03 -2503 1.08000e+04 2.72800e+03 -2504 1.09280e+04 2.72800e+03 -2505 1.10560e+04 2.72800e+03 -2506 1.11200e+04 2.72800e+03 -2507 1.12160e+04 2.72800e+03 -2508 1.13440e+04 2.72800e+03 -2509 1.14880e+04 2.72800e+03 -2510 1.16960e+04 2.72800e+03 -2511 1.17600e+04 2.72800e+03 -2512 1.19040e+04 2.72800e+03 -2513 1.20480e+04 2.72800e+03 -2514 1.21760e+04 2.72800e+03 -2515 1.23360e+04 2.72800e+03 -2516 1.24320e+04 2.72800e+03 -2517 1.25120e+04 2.72800e+03 -2518 1.25920e+04 1.60600e+03 -2519 1.25920e+04 2.47500e+03 -2520 1.48640e+04 2.53000e+03 -2521 1.48640e+04 4.37800e+03 -2522 1.48640e+04 5.47800e+03 -2523 1.48640e+04 6.79800e+03 -2524 1.48640e+04 8.64600e+03 -2525 1.48640e+04 9.87800e+03 -2526 1.48640e+04 1.14290e+04 -2527 7.76000e+03 8.74500e+03 -2528 7.77600e+03 8.44800e+03 -2529 7.79200e+03 1.18800e+03 -2530 7.79200e+03 4.81800e+03 -2531 1.53120e+04 7.88700e+03 -2532 1.53120e+04 8.64600e+03 -2533 1.53120e+04 9.87800e+03 -2534 1.53120e+04 1.06260e+04 -2535 1.53120e+04 1.14290e+04 -2536 1.53440e+04 7.78800e+03 -2537 1.53760e+04 2.53000e+03 -2538 1.53760e+04 5.47800e+03 -2539 1.53760e+04 6.79800e+03 -2540 1.53760e+04 7.68900e+03 -2541 6.86400e+03 4.29000e+02 -2542 6.86400e+03 1.51800e+03 -2543 6.86400e+03 2.57400e+03 -2544 6.86400e+03 4.04800e+03 -2545 7.00800e+03 5.36800e+03 -2546 7.08800e+03 5.36800e+03 -2547 7.18400e+03 5.36800e+03 -2548 7.32800e+03 5.36800e+03 -2549 7.58400e+03 5.36800e+03 -2550 7.66400e+03 5.36800e+03 -2551 7.76000e+03 5.36800e+03 -2552 7.82400e+03 5.36800e+03 -2553 7.88800e+03 5.36800e+03 -2554 7.95200e+03 5.36800e+03 -2555 8.04800e+03 5.36800e+03 -2556 8.17600e+03 5.36800e+03 -2557 8.33600e+03 5.36800e+03 -2558 8.43200e+03 5.36800e+03 -2559 8.49600e+03 5.36800e+03 -2560 8.75200e+03 5.36800e+03 -2561 8.84800e+03 5.36800e+03 -2562 8.99200e+03 5.36800e+03 -2563 9.44000e+03 5.36800e+03 -2564 9.55200e+03 5.36800e+03 -2565 9.68000e+03 5.36800e+03 -2566 9.82400e+03 5.36800e+03 -2567 1.00160e+04 5.36800e+03 -2568 1.01600e+04 5.36800e+03 -2569 1.02240e+04 5.36800e+03 -2570 1.02880e+04 5.36800e+03 -2571 1.03840e+04 5.36800e+03 -2572 1.05120e+04 5.36800e+03 -2573 1.06080e+04 5.36800e+03 -2574 1.07040e+04 7.39200e+03 -2575 1.07040e+04 1.14950e+04 -2576 1.24000e+04 1.14840e+04 -2577 1.25280e+04 1.10000e+04 -2578 1.26560e+04 1.10000e+04 -2579 1.28160e+04 1.10000e+04 -2580 1.29440e+04 1.10000e+04 -2581 1.30880e+04 1.10000e+04 -2582 1.32320e+04 1.10000e+04 -2583 1.33920e+04 1.10000e+04 -2584 1.35360e+04 1.10000e+04 -2585 1.36960e+04 1.10000e+04 -2586 1.39680e+04 1.10000e+04 -2587 1.41920e+04 1.10000e+04 -2588 1.42720e+04 1.10000e+04 -2589 1.43840e+04 1.10000e+04 -2590 1.44480e+04 1.10000e+04 -2591 1.24000e+04 1.11760e+04 -2592 1.45760e+04 2.53000e+03 -2593 1.45760e+04 5.36800e+03 -2594 1.45760e+04 6.79800e+03 -2595 1.45760e+04 8.64600e+03 -2596 1.45760e+04 9.87800e+03 -2597 1.47040e+04 1.10000e+04 -2598 1.47840e+04 1.10000e+04 -2599 1.49600e+04 1.10000e+04 -2600 1.51200e+04 1.10000e+04 -2601 1.53920e+04 1.10000e+04 -2602 1.55200e+04 1.10000e+04 -2603 1.57120e+04 1.10000e+04 -2604 1.57920e+04 1.10000e+04 -2605 1.58560e+04 1.10000e+04 -2606 1.60480e+04 1.10000e+04 -2607 1.62240e+04 1.10000e+04 -2608 1.64320e+04 1.10000e+04 -2609 1.64960e+04 1.14840e+04 -2610 1.64960e+04 1.11760e+04 -2611 7.08800e+03 8.53600e+03 -2612 7.08800e+03 1.08020e+04 -2613 7.15200e+03 6.38000e+02 -2614 7.15200e+03 1.51800e+03 -2615 7.15200e+03 4.04800e+03 -2616 7.15200e+03 7.13900e+03 -2617 1.59520e+04 2.34300e+03 -2618 1.59720e+04 2.99200e+03 -2619 1.61280e+04 2.99200e+03 -2620 1.62720e+04 2.99200e+03 -2621 1.64000e+04 2.99200e+03 -2622 1.65440e+04 2.99200e+03 -2623 1.66560e+04 2.99200e+03 -2624 1.67520e+04 2.99200e+03 -2625 1.69120e+04 2.99200e+03 -2626 1.70400e+04 2.99200e+03 -2627 1.71040e+04 2.99200e+03 -2628 1.71840e+04 2.99200e+03 -2629 1.73920e+04 2.99200e+03 -2630 1.75040e+04 2.99200e+03 -2631 1.77440e+04 4.12500e+03 -2632 1.77440e+04 6.20400e+03 -2633 1.77440e+04 7.76600e+03 -2634 1.77440e+04 8.73400e+03 -2635 1.77440e+04 9.60300e+03 -2636 1.77440e+04 1.06700e+04 -2637 1.56640e+04 2.53000e+03 -2638 1.56640e+04 5.36800e+03 -2639 1.56640e+04 6.79800e+03 -2640 1.56640e+04 8.42600e+03 -2641 1.56640e+04 9.87800e+03 -2642 1.56640e+04 1.06260e+04 -2643 1.56640e+04 1.14290e+04 -2644 1.75840e+04 2.31000e+02 -2645 1.75840e+04 1.78200e+03 -2646 1.75840e+04 4.09200e+03 -2647 1.75840e+04 6.57800e+03 -2648 1.75840e+04 7.76600e+03 -2649 1.75840e+04 9.60300e+03 -2650 1.75840e+04 1.06700e+04 -2651 1.64320e+04 2.22200e+03 -2652 1.64320e+04 3.85000e+03 -2653 1.64320e+04 5.47800e+03 -2654 1.64320e+04 6.79800e+03 -2655 1.64320e+04 7.88700e+03 -2656 1.65280e+04 1.08900e+04 -2657 8.14400e+03 1.18800e+03 -2658 8.14400e+03 4.81800e+03 -2659 8.14400e+03 7.01800e+03 -2660 8.14400e+03 8.75600e+03 -2661 9.61600e+03 2.31000e+02 -2662 9.61600e+03 1.01200e+03 -2663 9.61600e+03 1.76000e+03 -2664 9.61600e+03 7.13900e+03 -2665 1.21120e+04 9.02000e+02 -2666 1.21120e+04 4.48800e+03 -2667 1.21120e+04 5.96200e+03 -2668 1.21120e+04 7.39200e+03 -2669 8.36800e+03 1.18800e+03 -2670 8.36800e+03 6.90800e+03 -2671 8.36800e+03 8.76700e+03 -2672 1.27840e+04 1.14290e+04 -2673 1.28040e+04 8.84400e+03 -2674 1.28800e+04 8.84400e+03 -2675 1.29440e+04 8.84400e+03 -2676 1.30880e+04 8.84400e+03 -2677 1.32640e+04 8.84400e+03 -2678 1.33920e+04 8.84400e+03 -2679 1.35310e+04 8.84400e+03 -2680 1.35520e+04 2.53000e+03 -2681 1.35520e+04 3.93800e+03 -2682 1.35520e+04 4.92800e+03 -2683 1.35520e+04 7.28200e+03 -2684 1.35520e+04 8.65700e+03 -2685 1.88640e+04 1.08460e+04 -2686 1.88640e+04 1.15280e+04 -2687 1.89160e+04 9.08600e+03 -2688 1.90240e+04 9.08600e+03 -2689 1.19200e+04 7.39200e+03 -2690 1.19200e+04 1.11650e+04 -2691 1.19360e+04 6.77600e+03 -2692 1.19520e+04 9.02000e+02 -2693 1.19520e+04 4.48800e+03 -2694 1.19520e+04 6.07200e+03 -2695 1.03200e+04 2.31000e+02 -2696 1.03200e+04 1.01200e+03 -2697 1.03200e+04 1.76000e+03 -2698 1.03200e+04 7.39200e+03 -2699 1.04270e+04 9.50400e+03 -2700 1.18240e+04 9.02000e+02 -2701 1.18240e+04 4.48800e+03 -2702 1.18240e+04 6.08300e+03 -2703 1.18400e+04 6.33600e+03 -2704 1.18560e+04 7.39200e+03 -2705 1.18560e+04 1.11650e+04 -2706 1.26560e+04 1.60600e+03 -2707 1.26560e+04 2.57400e+03 -2708 1.26560e+04 4.70800e+03 -2709 1.26560e+04 6.07200e+03 -2710 1.26720e+04 6.77600e+03 -2711 1.26880e+04 7.39200e+03 -2712 1.26880e+04 1.14290e+04 -2713 5.00800e+03 1.14950e+04 -2714 5.07200e+03 2.17800e+03 -2715 5.07200e+03 4.04800e+03 -2716 5.07200e+03 6.40200e+03 -2717 5.07200e+03 7.19400e+03 -2718 1.31680e+04 1.60600e+03 -2719 1.31680e+04 2.31000e+03 -2720 1.31680e+04 3.12400e+03 -2721 1.31680e+04 3.93800e+03 -2722 1.31680e+04 4.92800e+03 -2723 1.31680e+04 5.92900e+03 -2724 1.32960e+04 6.02800e+03 -2725 1.34560e+04 6.02800e+03 -2726 1.35200e+04 6.02800e+03 -2727 1.36320e+04 6.02800e+03 -2728 1.37600e+04 6.02800e+03 -2729 1.39200e+04 6.02800e+03 -2730 1.40800e+04 6.02800e+03 -2731 1.41920e+04 6.02800e+03 -2732 1.42560e+04 6.02800e+03 -2733 1.44000e+04 6.02800e+03 -2734 1.45120e+04 6.02800e+03 -2735 1.47040e+04 6.02800e+03 -2736 1.48160e+04 6.02800e+03 -2737 1.49280e+04 6.02800e+03 -2738 1.51360e+04 6.02800e+03 -2739 1.53280e+04 6.02800e+03 -2740 1.54400e+04 6.02800e+03 -2741 1.56000e+04 6.02800e+03 -2742 1.57120e+04 6.02800e+03 -2743 1.57920e+04 6.02800e+03 -2744 1.58880e+04 6.02800e+03 -2745 1.59840e+04 6.02800e+03 -2746 1.61280e+04 6.02800e+03 -2747 1.62880e+04 6.02800e+03 -2748 1.65440e+04 6.02800e+03 -2749 1.66560e+04 6.02800e+03 -2750 1.67520e+04 6.02800e+03 -2751 1.68160e+04 6.02800e+03 -2752 1.69120e+04 6.02800e+03 -2753 1.70400e+04 6.02800e+03 -2754 1.71040e+04 6.02800e+03 -2755 1.71680e+04 6.02800e+03 -2756 1.73920e+04 6.02800e+03 -2757 1.75040e+04 6.02800e+03 -2758 1.76800e+04 6.45700e+03 -2759 1.76800e+04 7.76600e+03 -2760 1.76800e+04 9.60300e+03 -2761 1.76800e+04 1.06700e+04 -2762 3.31200e+03 1.06920e+04 -2763 3.34400e+03 3.11300e+03 -2764 3.34400e+03 6.86400e+03 -2765 3.34400e+03 1.01530e+04 -2766 1.45440e+04 2.53000e+03 -2767 1.45440e+04 5.36800e+03 -2768 1.45440e+04 6.79800e+03 -2769 1.45440e+04 8.64600e+03 -2770 1.45440e+04 9.87800e+03 -2771 1.45440e+04 1.15390e+04 -2772 6.73600e+03 6.38000e+02 -2773 6.73600e+03 1.51800e+03 -2774 6.73600e+03 2.57400e+03 -2775 6.73600e+03 4.04800e+03 -2776 6.73600e+03 8.64600e+03 -2777 6.73600e+03 9.43800e+03 -2778 6.83200e+03 1.14400e+04 -2779 7.02400e+03 1.14400e+04 -2780 7.20000e+03 1.14400e+04 -2781 7.44000e+03 1.14400e+04 -2782 7.53600e+03 1.14400e+04 -2783 7.60000e+03 1.14400e+04 -2784 7.69600e+03 1.14400e+04 -2785 7.82400e+03 1.14400e+04 -2786 7.88800e+03 1.14400e+04 -2787 8.09600e+03 1.14400e+04 -2788 8.17600e+03 1.14400e+04 -2789 8.27200e+03 1.14400e+04 -2790 8.36800e+03 1.14400e+04 -2791 8.43200e+03 1.14400e+04 -2792 8.72000e+03 1.14400e+04 -2793 8.84800e+03 1.14400e+04 -2794 9.10400e+03 1.14400e+04 -2795 9.72800e+03 1.14400e+04 -2796 1.00320e+04 1.14400e+04 -2797 1.02560e+04 1.14400e+04 -2798 1.03200e+04 1.14400e+04 -2799 1.04800e+04 1.14400e+04 -2800 1.05440e+04 1.15280e+04 -2801 1.17920e+04 9.02000e+02 -2802 1.17920e+04 4.48800e+03 -2803 1.17920e+04 6.07200e+03 -2804 1.17920e+04 7.39200e+03 -2805 1.18080e+04 8.22800e+03 -2806 1.18240e+04 1.11650e+04 -2807 8.72000e+03 1.18800e+03 -2808 8.72000e+03 5.96200e+03 -2809 8.84800e+03 7.70000e+03 -2810 9.10400e+03 7.70000e+03 -2811 9.23200e+03 7.70000e+03 -2812 6.06400e+03 3.19000e+02 -2813 6.06400e+03 2.02400e+03 -2814 6.06400e+03 4.04800e+03 -2815 6.06400e+03 5.33500e+03 -2816 6.10000e+03 5.58800e+03 -2817 6.19200e+03 5.58800e+03 -2818 6.25600e+03 5.58800e+03 -2819 6.41600e+03 5.58800e+03 -2820 6.56000e+03 5.58800e+03 -2821 6.67200e+03 5.58800e+03 -2822 6.77900e+03 5.58800e+03 -2823 6.80000e+03 7.12800e+03 -2824 6.80000e+03 8.64600e+03 -2825 6.80000e+03 9.43800e+03 -2826 6.86400e+03 6.55600e+03 -2827 6.99200e+03 6.55600e+03 -2828 7.08800e+03 6.55600e+03 -2829 7.18400e+03 6.55600e+03 -2830 7.32800e+03 6.55600e+03 -2831 7.61600e+03 6.55600e+03 -2832 7.74400e+03 6.55600e+03 -2833 7.82400e+03 6.55600e+03 -2834 7.88800e+03 6.55600e+03 -2835 8.04800e+03 6.55600e+03 -2836 8.17600e+03 6.55600e+03 -2837 8.43200e+03 6.55600e+03 -2838 8.51200e+03 6.55600e+03 -2839 8.83200e+03 6.55600e+03 -2840 8.94400e+03 1.18800e+03 -2841 8.94400e+03 5.96200e+03 -2842 8.94400e+03 6.89700e+03 -2843 8.94400e+03 9.87800e+03 -2844 5.96800e+03 3.19000e+02 -2845 5.96800e+03 2.02400e+03 -2846 5.96800e+03 4.04800e+03 -2847 5.96800e+03 5.32400e+03 -2848 6.09600e+03 7.70000e+03 -2849 6.19200e+03 7.70000e+03 -2850 6.41600e+03 7.70000e+03 -2851 6.54400e+03 7.70000e+03 -2852 6.67200e+03 7.70000e+03 -2853 6.86400e+03 7.70000e+03 -2854 6.92800e+03 7.70000e+03 -2855 7.04000e+03 7.70000e+03 -2856 7.15200e+03 8.53600e+03 -2857 7.15200e+03 1.08020e+04 -2858 7.20400e+03 9.50400e+03 -2859 7.53600e+03 9.50400e+03 -2860 7.60000e+03 9.50400e+03 -2861 7.69600e+03 9.50400e+03 -2862 7.82400e+03 9.50400e+03 -2863 7.90400e+03 9.50400e+03 -2864 8.09600e+03 9.50400e+03 -2865 8.17600e+03 9.50400e+03 -2866 8.27200e+03 9.50400e+03 -2867 8.36800e+03 9.50400e+03 -2868 8.43200e+03 9.50400e+03 -2869 8.72000e+03 9.50400e+03 -2870 8.86400e+03 9.50400e+03 -2871 9.10400e+03 9.50400e+03 -2872 9.72800e+03 9.50400e+03 -2873 9.96800e+03 2.31000e+02 -2874 9.96800e+03 1.01200e+03 -2875 9.96800e+03 1.76000e+03 -2876 1.19520e+04 1.11650e+04 -2877 1.19720e+04 8.22800e+03 -2878 1.21920e+04 8.22800e+03 -2879 1.22720e+04 8.22800e+03 -2880 1.23840e+04 8.22800e+03 -2881 1.25280e+04 8.22800e+03 -2882 1.26560e+04 8.22800e+03 -2883 1.28000e+04 8.22800e+03 -2884 1.28800e+04 8.22800e+03 -2885 1.29440e+04 8.22800e+03 -2886 1.30880e+04 8.22800e+03 -2887 1.32640e+04 8.22800e+03 -2888 1.33920e+04 8.22800e+03 -2889 1.35200e+04 8.22800e+03 -2890 1.36320e+04 8.22800e+03 -2891 1.37440e+04 8.22800e+03 -2892 1.39680e+04 8.22800e+03 -2893 1.41920e+04 8.22800e+03 -2894 1.42720e+04 8.22800e+03 -2895 1.43840e+04 8.22800e+03 -2896 1.44480e+04 8.22800e+03 -2897 1.45120e+04 8.22800e+03 -2898 1.47040e+04 8.22800e+03 -2899 1.47840e+04 8.22800e+03 -2900 1.51200e+04 8.22800e+03 -2901 1.53920e+04 8.22800e+03 -2902 1.54720e+04 8.22800e+03 -2903 1.55360e+04 4.84000e+02 -2904 1.55360e+04 6.71000e+02 -2905 1.55360e+04 2.53000e+03 -2906 1.55360e+04 5.36800e+03 -2907 1.55360e+04 6.79800e+03 -2908 1.56000e+04 5.72000e+02 -2909 1.57280e+04 5.72000e+02 -2910 1.57920e+04 5.72000e+02 -2911 1.58880e+04 5.72000e+02 -2912 1.59840e+04 5.72000e+02 -2913 1.61280e+04 5.72000e+02 -2914 1.62720e+04 5.72000e+02 -2915 1.64000e+04 5.72000e+02 -2916 1.65600e+04 5.72000e+02 -2917 1.66560e+04 5.72000e+02 -2918 1.67520e+04 5.72000e+02 -2919 1.69120e+04 5.72000e+02 -2920 1.70400e+04 5.72000e+02 -2921 1.71840e+04 5.72000e+02 -2922 1.73920e+04 5.72000e+02 -2923 1.75040e+04 5.72000e+02 -2924 1.78240e+04 5.72000e+02 -2925 1.79680e+04 5.72000e+02 -2926 1.80320e+04 5.72000e+02 -2927 1.81280e+04 3.52000e+02 -2928 7.56800e+03 8.75600e+03 -2929 7.60000e+03 6.11600e+03 -2930 7.63200e+03 1.18800e+03 -2931 7.63200e+03 4.81800e+03 -2932 1.17280e+04 9.02000e+02 -2933 1.17280e+04 4.48800e+03 -2934 1.17280e+04 6.07200e+03 -2935 1.17280e+04 7.39200e+03 -2936 1.17440e+04 8.22800e+03 -2937 1.17600e+04 1.11650e+04 -2938 1.90240e+04 1.15280e+04 -2939 1.22720e+04 9.02000e+02 -2940 1.22720e+04 4.48800e+03 -2941 1.22720e+04 5.96200e+03 -2942 1.23840e+04 6.77600e+03 -2943 1.24960e+04 7.39200e+03 -2944 1.24960e+04 1.14290e+04 -2945 1.06560e+04 8.22800e+03 -2946 1.07360e+04 2.31000e+02 -2947 1.07360e+04 9.02000e+02 -2948 1.07360e+04 1.76000e+03 -2949 1.07360e+04 7.39200e+03 -2950 7.50400e+03 8.75600e+03 -2951 7.56800e+03 6.38000e+02 -2952 7.56800e+03 1.51800e+03 -2953 7.56800e+03 3.94900e+03 -2954 7.56800e+03 4.14700e+03 -2955 7.56800e+03 4.93900e+03 -2956 7.66400e+03 4.04800e+03 -2957 7.76000e+03 4.04800e+03 -2958 7.82400e+03 4.04800e+03 -2959 7.88800e+03 4.04800e+03 -2960 7.95200e+03 4.04800e+03 -2961 8.04800e+03 4.04800e+03 -2962 8.20800e+03 4.04800e+03 -2963 8.33600e+03 4.04800e+03 -2964 8.43200e+03 4.04800e+03 -2965 8.49600e+03 4.04800e+03 -2966 8.68800e+03 4.04800e+03 -2967 8.76300e+03 4.04800e+03 -2968 8.78400e+03 1.18800e+03 -2969 8.78400e+03 3.94900e+03 -2970 8.78400e+03 8.86600e+03 -2971 7.88800e+03 9.06400e+03 -2972 7.92000e+03 1.18800e+03 -2973 7.92000e+03 4.81800e+03 -2974 7.92000e+03 8.76700e+03 -2975 7.94000e+03 4.26800e+03 -2976 8.04800e+03 4.26800e+03 -2977 8.20800e+03 4.26800e+03 -2978 8.33600e+03 4.26800e+03 -2979 8.43200e+03 4.26800e+03 -2980 8.49600e+03 4.26800e+03 -2981 8.68800e+03 4.26800e+03 -2982 8.75200e+03 4.26800e+03 -2983 8.84800e+03 4.26800e+03 -2984 8.91200e+03 4.26800e+03 -2985 8.99200e+03 4.26800e+03 -2986 9.44000e+03 4.26800e+03 -2987 9.55200e+03 4.26800e+03 -2988 9.68000e+03 4.26800e+03 -2989 9.82400e+03 4.26800e+03 -2990 9.93600e+03 4.26800e+03 -2991 1.00000e+04 4.26800e+03 -2992 1.02240e+04 4.26800e+03 -2993 1.02880e+04 4.26800e+03 -2994 1.03840e+04 4.26800e+03 -2995 1.05230e+04 4.26800e+03 -2996 1.05440e+04 2.31000e+02 -2997 1.05440e+04 1.01200e+03 -2998 1.05440e+04 1.76000e+03 -2999 1.05440e+04 7.39200e+03 -3000 1.06560e+04 1.11320e+04 -3001 1.07680e+04 1.11320e+04 -3002 1.09280e+04 1.11320e+04 -3003 1.09920e+04 1.15500e+04 -3004 1.09920e+04 1.13080e+04 -3005 8.20800e+03 7.01800e+03 -3006 8.20800e+03 8.75600e+03 -3007 8.33600e+03 4.70800e+03 -3008 8.43200e+03 4.70800e+03 -3009 8.49600e+03 4.70800e+03 -3010 8.75200e+03 4.70800e+03 -3011 8.84800e+03 4.70800e+03 -3012 8.99200e+03 4.70800e+03 -3013 9.44000e+03 4.70800e+03 -3014 9.55200e+03 4.70800e+03 -3015 9.68000e+03 4.70800e+03 -3016 9.82400e+03 4.70800e+03 -3017 9.93600e+03 4.70800e+03 -3018 1.00000e+04 4.70800e+03 -3019 1.02240e+04 4.70800e+03 -3020 1.02880e+04 4.70800e+03 -3021 1.03840e+04 4.70800e+03 -3022 1.05120e+04 4.70800e+03 -3023 1.05870e+04 4.70800e+03 -3024 1.06080e+04 2.31000e+02 -3025 1.06080e+04 9.02000e+02 -3026 1.06080e+04 1.76000e+03 -3027 1.19840e+04 9.02000e+02 -3028 1.19840e+04 4.48800e+03 -3029 1.19840e+04 6.07200e+03 -3030 1.20000e+04 6.77600e+03 -3031 1.20160e+04 7.39200e+03 -3032 1.20160e+04 1.11650e+04 -3033 8.56000e+03 5.96200e+03 -3034 8.56000e+03 7.01800e+03 -3035 8.56000e+03 8.86600e+03 -3036 8.62400e+03 2.28800e+03 -3037 8.75200e+03 2.28800e+03 -3038 8.84800e+03 2.28800e+03 -3039 8.97600e+03 2.28800e+03 -3040 9.04000e+03 2.28800e+03 -3041 9.26400e+03 2.28800e+03 -3042 9.36000e+03 6.71000e+02 -3043 9.36000e+03 1.76000e+03 -3044 1.13760e+04 1.13850e+04 -3045 1.14400e+04 2.31000e+02 -3046 1.14400e+04 9.02000e+02 -3047 1.14400e+04 4.48800e+03 -3048 1.14400e+04 6.07200e+03 -3049 1.14400e+04 7.39200e+03 -3050 1.02560e+04 8.22800e+03 -3051 1.03520e+04 2.31000e+02 -3052 1.03520e+04 1.01200e+03 -3053 1.03520e+04 1.76000e+03 -3054 1.03520e+04 7.39200e+03 -3055 1.14720e+04 7.39200e+03 -3056 1.14720e+04 1.12750e+04 -3057 1.14920e+04 6.33600e+03 -3058 1.15680e+04 2.31000e+02 -3059 1.15680e+04 9.02000e+02 -3060 1.15680e+04 4.48800e+03 -3061 1.15680e+04 6.08300e+03 -3062 1.11840e+04 1.13850e+04 -3063 1.12040e+04 9.06400e+03 -3064 1.13440e+04 9.06400e+03 -3065 1.15150e+04 9.06400e+03 -3066 1.15360e+04 2.31000e+02 -3067 1.15360e+04 9.02000e+02 -3068 1.15360e+04 4.48800e+03 -3069 1.15360e+04 5.96200e+03 -3070 1.15360e+04 7.39200e+03 -3071 6.56000e+02 3.57500e+03 -3072 6.56000e+02 9.92200e+03 -3073 1.58240e+04 5.36800e+03 -3074 1.58240e+04 6.79800e+03 -3075 1.58240e+04 8.42600e+03 -3076 1.58240e+04 9.87800e+03 -3077 1.58240e+04 1.06260e+04 -3078 1.58240e+04 1.14290e+04 -3079 1.58880e+04 4.48800e+03 -3080 1.59840e+04 4.48800e+03 -3081 1.61280e+04 4.48800e+03 -3082 1.62830e+04 4.48800e+03 -3083 1.63040e+04 2.22200e+03 -3084 1.63040e+04 3.86100e+03 -3085 6.60800e+03 4.29000e+02 -3086 6.60800e+03 1.51800e+03 -3087 6.60800e+03 2.57400e+03 -3088 6.60800e+03 4.04800e+03 -3089 6.66000e+03 5.06000e+03 -3090 6.78400e+03 5.06000e+03 -3091 6.89600e+03 7.12800e+03 -3092 6.89600e+03 8.64600e+03 -3093 6.89600e+03 1.08020e+04 -3094 1.20480e+04 7.39200e+03 -3095 1.20480e+04 1.11650e+04 -3096 1.21870e+04 6.77600e+03 -3097 1.22080e+04 9.02000e+02 -3098 1.22080e+04 4.48800e+03 -3099 1.22080e+04 5.96200e+03 -3100 1.55000e+02 1.11980e+04 -3101 8.91200e+03 5.96200e+03 -3102 8.91200e+03 7.01800e+03 -3103 8.91200e+03 9.87800e+03 -3104 8.99200e+03 4.48800e+03 -3105 9.44000e+03 4.48800e+03 -3106 9.55200e+03 4.48800e+03 -3107 9.68000e+03 4.48800e+03 -3108 9.82400e+03 4.48800e+03 -3109 9.93600e+03 4.48800e+03 -3110 1.00000e+04 4.48800e+03 -3111 1.02240e+04 4.48800e+03 -3112 1.02880e+04 4.48800e+03 -3113 1.03840e+04 4.48800e+03 -3114 1.05120e+04 4.48800e+03 -3115 1.05760e+04 4.48800e+03 -3116 1.06400e+04 4.48800e+03 -3117 1.07040e+04 4.48800e+03 -3118 1.08000e+04 4.48800e+03 -3119 1.08640e+04 2.31000e+02 -3120 1.08640e+04 9.02000e+02 -3121 1.08640e+04 1.76000e+03 -3122 1.08640e+04 4.38900e+03 -3123 1.08640e+04 4.58700e+03 -3124 1.09280e+04 5.89600e+03 -3125 1.10670e+04 5.89600e+03 -3126 1.10880e+04 7.39200e+03 -3127 1.10880e+04 1.13850e+04 -3128 9.26400e+03 6.90800e+03 -3129 9.26400e+03 9.87800e+03 -3130 9.44000e+03 3.16800e+03 -3131 9.52000e+03 2.31000e+02 -3132 9.52000e+03 1.01200e+03 -3133 9.52000e+03 1.76000e+03 -3134 1.22400e+04 9.02000e+02 -3135 1.22400e+04 4.48800e+03 -3136 1.22400e+04 5.96200e+03 -3137 1.22400e+04 7.39200e+03 -3138 1.22400e+04 1.11650e+04 -3139 7.31200e+03 8.75600e+03 -3140 7.31200e+03 1.08020e+04 -3141 7.53600e+03 6.38000e+02 -3142 7.53600e+03 1.51800e+03 -3143 7.53600e+03 4.04800e+03 -3144 7.53600e+03 4.81800e+03 -3145 3.28000e+03 3.11300e+03 -3146 3.28000e+03 6.86400e+03 -3147 3.30000e+03 9.37200e+03 -3148 3.50400e+03 9.37200e+03 -3149 3.56800e+03 9.37200e+03 -3150 3.63200e+03 1.01420e+04 -3151 1.13760e+04 2.31000e+02 -3152 1.13760e+04 9.02000e+02 -3153 1.13760e+04 4.48800e+03 -3154 1.13760e+04 6.07200e+03 -3155 1.13760e+04 7.39200e+03 -3156 1.15040e+04 8.22800e+03 -3157 1.15680e+04 1.12750e+04 -3158 1.12800e+04 1.13850e+04 -3159 1.13160e+04 1.04720e+04 -3160 1.14400e+04 1.04720e+04 -3161 1.15200e+04 1.04720e+04 -3162 1.16000e+04 1.04720e+04 -3163 1.17120e+04 1.04720e+04 -3164 1.17920e+04 1.04720e+04 -3165 1.19840e+04 1.04720e+04 -3166 1.20800e+04 1.04720e+04 -3167 1.22080e+04 1.04720e+04 -3168 1.23840e+04 1.04720e+04 -3169 1.25280e+04 1.04720e+04 -3170 1.26560e+04 1.04720e+04 -3171 1.28160e+04 1.04720e+04 -3172 1.29440e+04 1.04720e+04 -3173 1.30880e+04 1.04720e+04 -3174 1.32320e+04 1.04720e+04 -3175 1.33920e+04 1.04720e+04 -3176 1.35360e+04 1.04720e+04 -3177 1.36960e+04 1.04720e+04 -3178 1.39680e+04 1.04720e+04 -3179 1.41600e+04 2.53000e+03 -3180 1.41600e+04 5.25800e+03 -3181 1.41600e+04 7.17200e+03 -3182 1.41600e+04 8.86600e+03 -3183 1.41600e+04 9.87800e+03 -3184 3.15200e+03 3.11300e+03 -3185 3.15200e+03 6.86400e+03 -3186 3.18800e+03 7.92000e+03 -3187 3.31200e+03 7.92000e+03 -3188 3.40800e+03 1.01530e+04 -3189 3.40800e+03 1.05710e+04 -3190 3.50400e+03 1.04720e+04 -3191 3.58400e+03 1.04720e+04 -3192 3.71200e+03 1.04720e+04 -3193 3.88800e+03 1.04720e+04 -3194 4.04800e+03 1.04720e+04 -3195 4.12800e+03 1.04720e+04 -3196 4.27200e+03 1.04720e+04 -3197 4.40000e+03 1.04720e+04 -3198 4.52800e+03 1.04720e+04 -3199 4.62400e+03 1.04720e+04 -3200 4.68800e+03 1.04720e+04 -3201 4.78400e+03 1.04720e+04 -3202 4.95500e+03 1.04720e+04 -3203 4.97600e+03 1.03730e+04 -3204 4.99200e+03 9.81200e+03 -3205 4.97600e+03 1.14950e+04 -3206 5.00800e+03 2.17800e+03 -3207 5.00800e+03 4.04800e+03 -3208 5.00800e+03 6.40200e+03 -3209 5.28000e+02 3.57500e+03 -3210 5.28000e+02 9.81200e+03 -3211 1.60160e+04 2.22200e+03 -3212 1.60160e+04 3.74000e+03 -3213 1.60160e+04 5.36800e+03 -3214 1.60160e+04 6.79800e+03 -3215 1.60160e+04 7.76600e+03 -3216 1.60160e+04 8.62400e+03 -3217 1.60160e+04 9.83400e+03 -3218 1.60680e+04 9.92200e+03 -3219 1.62080e+04 9.92200e+03 -3220 1.64320e+04 9.92200e+03 -3221 1.64960e+04 9.92200e+03 -3222 1.65920e+04 9.92200e+03 -3223 1.66880e+04 9.92200e+03 -3224 1.67840e+04 9.92200e+03 -3225 1.69120e+04 9.92200e+03 -3226 1.70400e+04 9.92200e+03 -3227 1.71360e+04 9.92200e+03 -3228 1.72800e+04 9.92200e+03 -3229 1.73600e+04 1.06700e+04 -3230 1.73600e+04 1.15280e+04 -3231 5.87200e+03 8.38200e+03 -3232 5.87200e+03 1.08020e+04 -3233 5.88800e+03 5.06000e+03 -3234 5.90400e+03 2.09000e+02 -3235 5.90400e+03 2.02400e+03 -3236 5.90400e+03 4.04800e+03 -3237 9.76000e+02 1.10550e+04 -3238 1.10400e+03 1.09120e+04 -3239 1.23200e+03 1.09120e+04 -3240 1.58400e+03 1.09120e+04 -3241 1.71200e+03 1.09120e+04 -3242 1.77600e+03 1.09120e+04 -3243 1.90400e+03 1.09120e+04 -3244 2.06400e+03 1.09120e+04 -3245 2.24000e+03 1.09120e+04 -3246 2.46400e+03 1.09120e+04 -3247 2.73600e+03 1.09120e+04 -3248 3.01900e+03 1.09120e+04 -3249 3.05600e+03 3.11300e+03 -3250 3.05600e+03 6.86400e+03 -3251 3.05600e+03 1.01530e+04 -3252 3.16800e+03 1.09120e+04 -3253 3.34400e+03 1.09120e+04 -3254 3.50400e+03 1.09120e+04 -3255 3.58400e+03 1.09120e+04 -3256 3.71200e+03 1.09120e+04 -3257 3.88800e+03 1.09120e+04 -3258 4.04800e+03 1.09120e+04 -3259 4.12800e+03 1.09120e+04 -3260 4.27200e+03 1.09120e+04 -3261 4.40000e+03 1.09120e+04 -3262 4.46400e+03 1.09120e+04 -3263 4.52800e+03 1.09120e+04 -3264 4.62400e+03 1.09120e+04 -3265 4.68800e+03 1.14950e+04 -3266 1.34560e+04 8.53600e+03 -3267 1.34560e+04 9.17400e+03 -3268 1.34560e+04 1.14290e+04 -3269 1.35200e+04 7.78800e+03 -3270 1.36320e+04 7.78800e+03 -3271 1.37600e+04 7.78800e+03 -3272 1.39680e+04 7.78800e+03 -3273 1.41920e+04 7.78800e+03 -3274 1.42720e+04 7.78800e+03 -3275 1.43840e+04 7.78800e+03 -3276 1.44480e+04 2.53000e+03 -3277 1.44480e+04 5.36800e+03 -3278 1.44480e+04 6.79800e+03 -3279 1.45120e+04 7.78800e+03 -3280 1.47040e+04 7.78800e+03 -3281 1.48160e+04 7.78800e+03 -3282 1.49280e+04 7.88700e+03 -3283 1.49280e+04 8.64600e+03 -3284 1.49280e+04 9.87800e+03 -3285 1.49280e+04 1.14290e+04 -3286 1.60480e+04 2.22200e+03 -3287 1.60480e+04 3.74000e+03 -3288 1.60480e+04 5.36800e+03 -3289 1.60480e+04 6.79800e+03 -3290 1.60480e+04 7.76600e+03 -3291 1.61280e+04 8.40400e+03 -3292 1.63040e+04 8.40400e+03 -3293 1.64320e+04 8.40400e+03 -3294 1.65920e+04 8.40400e+03 -3295 1.66880e+04 8.40400e+03 -3296 1.67520e+04 8.40400e+03 -3297 1.68160e+04 8.40400e+03 -3298 1.69120e+04 8.40400e+03 -3299 1.70080e+04 1.05600e+04 -3300 1.70080e+04 1.15280e+04 -3301 5.60000e+02 9.80100e+03 -3302 7.52000e+02 8.40400e+03 -3303 9.12000e+02 8.40400e+03 -3304 9.76000e+02 8.40400e+03 -3305 1.10400e+03 8.40400e+03 -3306 1.23200e+03 8.40400e+03 -3307 1.32800e+03 8.40400e+03 -3308 1.53600e+03 8.40400e+03 -3309 1.61600e+03 8.40400e+03 -3310 1.69600e+03 8.40400e+03 -3311 1.77600e+03 8.40400e+03 -3312 1.87200e+03 8.40400e+03 -3313 1.93600e+03 8.40400e+03 -3314 2.11200e+03 8.40400e+03 -3315 2.19200e+03 8.40400e+03 -3316 2.28800e+03 8.40400e+03 -3317 2.46400e+03 8.40400e+03 -3318 2.63500e+03 8.40400e+03 -3319 2.70400e+03 3.11300e+03 -3320 2.70400e+03 6.86400e+03 -3321 2.80400e+03 8.14000e+03 -3322 2.96000e+03 8.14000e+03 -3323 3.02400e+03 8.14000e+03 -3324 3.16800e+03 8.14000e+03 -3325 3.31200e+03 8.14000e+03 -3326 3.50400e+03 8.14000e+03 -3327 3.63200e+03 8.14000e+03 -3328 3.69600e+03 8.14000e+03 -3329 3.82400e+03 8.14000e+03 -3330 3.95200e+03 8.14000e+03 -3331 4.09600e+03 8.14000e+03 -3332 4.27200e+03 8.14000e+03 -3333 4.33600e+03 8.14000e+03 -3334 2.70400e+03 8.25000e+03 -3335 4.43200e+03 1.14950e+04 -3336 1.40320e+04 2.53000e+03 -3337 1.40320e+04 5.25800e+03 -3338 1.40320e+04 7.29300e+03 -3339 1.40680e+04 7.56800e+03 -3340 1.41920e+04 7.56800e+03 -3341 1.42720e+04 7.56800e+03 -3342 1.43840e+04 7.56800e+03 -3343 1.45120e+04 7.56800e+03 -3344 1.47040e+04 7.56800e+03 -3345 1.48160e+04 7.56800e+03 -3346 1.49280e+04 7.56800e+03 -3347 1.51310e+04 7.56800e+03 -3348 1.52480e+04 7.77700e+03 -3349 1.52480e+04 8.64600e+03 -3350 1.52480e+04 9.87800e+03 -3351 1.52480e+04 1.06260e+04 -3352 1.52480e+04 1.14290e+04 -3353 1.35840e+04 2.53000e+03 -3354 1.35840e+04 3.94900e+03 -3355 1.36200e+04 4.04800e+03 -3356 1.38720e+04 4.04800e+03 -3357 1.40960e+04 4.04800e+03 -3358 1.42240e+04 4.04800e+03 -3359 1.44000e+04 4.04800e+03 -3360 1.45120e+04 4.04800e+03 -3361 1.47360e+04 4.04800e+03 -3362 1.48000e+04 4.04800e+03 -3363 1.48960e+04 4.25700e+03 -3364 1.48960e+04 5.47800e+03 -3365 1.48960e+04 6.79800e+03 -3366 1.48960e+04 8.64600e+03 -3367 1.48960e+04 9.87800e+03 -3368 1.48960e+04 1.14290e+04 -3369 1.46080e+04 2.53000e+03 -3370 1.46080e+04 5.36800e+03 -3371 1.46080e+04 6.79800e+03 -3372 1.46080e+04 8.64600e+03 -3373 1.46080e+04 9.87800e+03 -3374 1.46080e+04 1.15390e+04 -3375 1.33920e+04 1.60600e+03 -3376 1.33920e+04 2.79400e+03 -3377 1.33920e+04 3.93800e+03 -3378 1.33920e+04 4.92800e+03 -3379 1.34560e+04 6.24800e+03 -3380 1.35200e+04 6.24800e+03 -3381 1.36320e+04 6.24800e+03 -3382 1.37600e+04 6.24800e+03 -3383 1.39200e+04 6.24800e+03 -3384 1.40800e+04 6.24800e+03 -3385 1.41920e+04 6.24800e+03 -3386 1.42560e+04 6.24800e+03 -3387 1.44000e+04 6.24800e+03 -3388 1.45120e+04 6.24800e+03 -3389 1.47040e+04 6.24800e+03 -3390 1.48160e+04 6.24800e+03 -3391 1.49280e+04 6.24800e+03 -3392 1.51360e+04 6.24800e+03 -3393 1.53280e+04 6.24800e+03 -3394 1.54400e+04 6.24800e+03 -3395 1.56000e+04 6.24800e+03 -3396 1.57120e+04 6.24800e+03 -3397 1.57920e+04 6.24800e+03 -3398 1.58880e+04 6.24800e+03 -3399 1.59840e+04 6.24800e+03 -3400 1.61280e+04 6.24800e+03 -3401 1.62880e+04 6.24800e+03 -3402 1.65440e+04 6.24800e+03 -3403 1.66560e+04 6.67700e+03 -3404 1.66560e+04 7.87600e+03 -3405 1.66560e+04 1.08900e+04 -3406 1.66720e+04 6.24800e+03 -3407 1.66880e+04 1.01200e+03 -3408 1.66880e+04 2.22200e+03 -3409 1.66880e+04 3.85000e+03 -3410 1.66880e+04 5.47800e+03 -3411 1.27520e+04 1.60600e+03 -3412 1.27520e+04 2.43100e+03 -3413 1.28160e+04 2.64000e+03 -3414 1.29440e+04 2.64000e+03 -3415 1.31200e+04 2.64000e+03 -3416 1.33390e+04 2.64000e+03 -3417 1.33600e+04 3.00300e+03 -3418 1.33600e+04 3.93800e+03 -3419 1.33600e+04 4.92800e+03 -3420 1.33600e+04 6.40200e+03 -3421 1.33600e+04 7.39200e+03 -3422 1.33600e+04 8.53600e+03 -3423 1.33600e+04 9.17400e+03 -3424 1.33600e+04 1.14290e+04 -3425 1.62080e+04 2.22200e+03 -3426 1.62080e+04 3.74000e+03 -3427 1.62080e+04 5.36800e+03 -3428 1.62080e+04 6.79800e+03 -3429 1.62080e+04 7.76600e+03 -3430 1.62830e+04 8.62400e+03 -3431 1.63040e+04 1.04610e+04 -3432 1.63040e+04 1.14290e+04 -3433 1.39200e+03 8.77800e+03 -3434 1.39200e+03 1.00320e+04 -3435 1.45600e+03 6.33600e+03 -3436 1.55200e+03 6.33600e+03 -3437 1.64800e+03 6.33600e+03 -3438 1.76000e+03 6.33600e+03 -3439 1.87200e+03 6.33600e+03 -3440 2.00000e+03 6.33600e+03 -3441 2.11200e+03 6.33600e+03 -3442 2.19200e+03 6.33600e+03 -3443 2.28800e+03 6.33600e+03 -3444 2.48000e+03 6.33600e+03 -3445 2.60800e+03 6.33600e+03 -3446 2.73600e+03 6.33600e+03 -3447 2.88000e+03 6.33600e+03 -3448 3.02400e+03 6.33600e+03 -3449 3.20000e+03 6.33600e+03 -3450 3.31200e+03 6.33600e+03 -3451 3.40800e+03 3.05800e+03 -3452 3.40800e+03 6.16000e+03 -3453 3.80800e+03 6.33600e+03 -3454 3.88800e+03 6.33600e+03 -3455 3.95200e+03 6.33600e+03 -3456 4.09600e+03 6.33600e+03 -3457 4.17600e+03 6.33600e+03 -3458 4.25600e+03 6.33600e+03 -3459 4.43200e+03 6.33600e+03 -3460 4.49600e+03 6.33600e+03 -3461 4.56000e+03 7.81000e+03 -3462 4.56000e+03 8.86600e+03 -3463 4.56000e+03 1.14950e+04 -3464 3.69600e+03 3.11300e+03 -3465 3.69600e+03 7.02900e+03 -3466 3.80800e+03 7.26000e+03 -3467 3.88800e+03 7.26000e+03 -3468 3.95200e+03 7.26000e+03 -3469 4.09600e+03 7.26000e+03 -3470 4.17600e+03 7.26000e+03 -3471 4.25600e+03 7.26000e+03 -3472 4.33600e+03 7.26000e+03 -3473 4.43200e+03 7.26000e+03 -3474 4.49600e+03 7.26000e+03 -3475 4.64000e+03 7.26000e+03 -3476 4.76800e+03 7.26000e+03 -3477 4.84800e+03 7.26000e+03 -3478 4.91200e+03 7.26000e+03 -3479 5.04000e+03 1.14950e+04 -3480 4.91200e+03 1.14950e+04 -3481 5.10400e+03 2.17800e+03 -3482 5.10400e+03 4.04800e+03 -3483 5.10400e+03 6.40200e+03 -3484 5.10400e+03 7.31500e+03 -3485 1.43520e+04 2.53000e+03 -3486 1.43520e+04 5.36800e+03 -3487 1.43520e+04 6.90800e+03 -3488 1.43520e+04 8.86600e+03 -3489 1.43520e+04 9.87800e+03 -3490 1.43520e+04 1.15390e+04 -3491 5.32800e+03 6.39100e+03 -3492 5.32800e+03 7.19400e+03 -3493 5.32800e+03 1.05820e+04 -3494 5.39200e+03 2.17800e+03 -3495 5.39200e+03 4.04800e+03 -3496 5.74400e+03 1.08020e+04 -3497 5.76000e+03 8.62400e+03 -3498 5.77600e+03 2.02400e+03 -3499 5.77600e+03 4.04800e+03 -3500 5.77600e+03 8.39300e+03 -3501 1.48800e+03 3.11300e+03 -3502 1.48800e+03 6.90800e+03 -3503 1.48800e+03 8.77800e+03 -3504 1.48800e+03 1.00320e+04 -3505 4.01600e+03 2.95900e+03 -3506 4.01600e+03 6.90800e+03 -3507 4.12800e+03 9.15200e+03 -3508 4.27200e+03 9.15200e+03 -3509 7.98400e+03 1.18800e+03 -3510 7.98400e+03 4.81800e+03 -3511 7.98400e+03 8.75600e+03 -3512 6.16000e+03 4.29000e+02 -3513 6.16000e+03 2.02400e+03 -3514 6.16000e+03 4.04800e+03 -3515 6.16000e+03 8.38200e+03 -3516 6.16000e+03 1.08020e+04 -3517 6.16000e+03 1.14950e+04 -3518 5.26400e+03 2.17800e+03 -3519 5.26400e+03 4.04800e+03 -3520 5.26400e+03 6.40200e+03 -3521 5.26400e+03 7.19400e+03 -3522 5.55200e+03 9.81200e+03 -3523 5.63200e+03 9.81200e+03 -3524 5.80800e+03 9.81200e+03 -3525 5.96800e+03 9.81200e+03 -3526 6.03200e+03 9.81200e+03 -3527 6.11200e+03 9.81200e+03 -3528 6.19200e+03 9.81200e+03 -3529 6.35200e+03 9.81200e+03 -3530 6.44800e+03 9.81200e+03 -3531 6.67200e+03 9.81200e+03 -3532 6.84800e+03 9.81200e+03 -3533 6.92800e+03 9.81200e+03 -3534 7.02400e+03 9.81200e+03 -3535 7.21600e+03 9.81200e+03 -3536 7.53600e+03 9.81200e+03 -3537 7.60000e+03 9.81200e+03 -3538 7.69600e+03 9.81200e+03 -3539 7.82400e+03 9.81200e+03 -3540 7.90400e+03 9.81200e+03 -3541 8.09600e+03 9.81200e+03 -3542 8.17600e+03 9.81200e+03 -3543 8.27200e+03 9.81200e+03 -3544 8.36800e+03 9.81200e+03 -3545 8.43200e+03 9.81200e+03 -3546 8.72000e+03 9.81200e+03 -3547 8.85900e+03 9.81200e+03 -3548 8.88000e+03 9.91100e+03 -3549 9.20000e+03 7.01800e+03 -3550 9.20000e+03 8.07400e+03 -3551 9.20000e+03 9.87800e+03 -3552 9.29600e+03 6.71000e+02 -3553 9.29600e+03 1.76000e+03 -3554 9.29600e+03 2.83800e+03 -3555 6.51200e+03 4.29000e+02 -3556 6.51200e+03 2.02400e+03 -3557 6.51200e+03 4.04800e+03 -3558 6.51200e+03 8.65700e+03 -3559 6.52800e+03 8.84400e+03 -3560 6.54400e+03 9.43800e+03 -3561 6.54400e+03 1.14950e+04 -3562 9.90400e+03 2.31000e+02 -3563 9.90400e+03 1.01200e+03 -3564 9.90400e+03 1.76000e+03 -3565 6.92800e+03 6.38000e+02 -3566 6.92800e+03 1.51800e+03 -3567 6.92800e+03 2.57400e+03 -3568 6.92800e+03 4.04800e+03 -3569 6.92800e+03 7.13900e+03 -3570 6.94400e+03 7.26000e+03 -3571 6.96000e+03 8.64600e+03 -3572 6.96000e+03 1.08020e+04 -3573 1.08960e+04 1.03620e+04 -3574 1.08960e+04 1.14950e+04 -3575 1.09160e+04 9.50400e+03 -3576 1.10400e+04 9.50400e+03 -3577 1.12160e+04 9.50400e+03 -3578 1.12800e+04 2.31000e+02 -3579 1.12800e+04 9.02000e+02 -3580 1.12800e+04 4.48800e+03 -3581 1.12800e+04 7.39200e+03 -3582 7.40800e+03 1.09120e+04 -3583 7.44000e+03 6.38000e+02 -3584 7.44000e+03 1.51800e+03 -3585 7.44000e+03 4.04800e+03 -3586 7.44000e+03 4.92800e+03 -3587 7.44000e+03 8.75600e+03 -3588 1.25920e+04 4.70800e+03 -3589 1.25920e+04 6.07200e+03 -3590 1.25920e+04 7.39200e+03 -3591 1.25920e+04 1.14290e+04 -3592 1.26080e+04 3.60800e+03 -3593 1.26240e+04 1.60600e+03 -3594 1.26240e+04 2.57400e+03 -3595 1.26880e+04 3.60800e+03 -3596 1.27840e+04 3.60800e+03 -3597 1.29280e+04 3.60800e+03 -3598 1.31200e+04 3.60800e+03 -3599 1.33280e+04 3.60800e+03 -3600 1.34560e+04 3.60800e+03 -3601 1.35200e+04 3.60800e+03 -3602 1.36320e+04 3.60800e+03 -3603 1.38720e+04 3.60800e+03 -3604 1.40960e+04 3.60800e+03 -3605 1.42240e+04 3.60800e+03 -3606 1.44000e+04 3.60800e+03 -3607 1.45120e+04 3.60800e+03 -3608 1.47360e+04 3.60800e+03 -3609 1.48000e+04 3.60800e+03 -3610 1.49120e+04 3.60800e+03 -3611 1.51200e+04 3.60800e+03 -3612 1.53280e+04 3.60800e+03 -3613 1.54080e+04 3.60800e+03 -3614 1.54720e+04 3.60800e+03 -3615 1.56000e+04 3.60800e+03 -3616 1.57120e+04 3.60800e+03 -3617 1.57920e+04 3.60800e+03 -3618 1.58990e+04 3.60800e+03 -3619 1.59200e+04 3.92700e+03 -3620 1.59200e+04 5.36800e+03 -3621 1.59200e+04 6.79800e+03 -3622 1.59200e+04 7.76600e+03 -3623 1.59200e+04 8.62400e+03 -3624 1.59200e+04 9.87800e+03 -3625 1.59200e+04 1.06260e+04 -3626 1.59200e+04 1.14290e+04 -3627 1.23360e+04 7.39200e+03 -3628 1.23360e+04 1.11650e+04 -3629 1.23520e+04 6.11600e+03 -3630 1.23680e+04 9.02000e+02 -3631 1.23680e+04 1.60600e+03 -3632 1.23680e+04 4.48800e+03 -3633 1.23680e+04 5.97300e+03 -3634 1.76160e+04 6.57800e+03 -3635 1.76160e+04 7.76600e+03 -3636 1.76160e+04 9.60300e+03 -3637 1.76160e+04 1.06700e+04 -3638 1.78350e+04 5.50000e+03 -3639 1.78720e+04 2.31000e+02 -3640 1.78720e+04 1.62800e+03 -3641 1.78720e+04 4.21300e+03 -3642 1.16320e+04 9.02000e+02 -3643 1.16320e+04 4.48800e+03 -3644 1.16320e+04 6.08300e+03 -3645 1.16480e+04 6.33600e+03 -3646 1.16640e+04 7.39200e+03 -3647 1.16640e+04 1.12750e+04 -3648 1.44800e+04 2.53000e+03 -3649 1.44800e+04 5.36800e+03 -3650 1.44800e+04 6.79800e+03 -3651 1.44800e+04 8.86600e+03 -3652 1.44800e+04 9.87800e+03 -3653 1.44800e+04 1.15390e+04 -3654 1.76480e+04 2.31000e+02 -3655 1.76480e+04 1.78200e+03 -3656 1.76480e+04 4.24600e+03 -3657 1.76480e+04 6.57800e+03 -3658 1.76480e+04 7.76600e+03 -3659 1.76480e+04 9.60300e+03 -3660 1.76480e+04 1.06700e+04 -3661 6.24000e+02 3.57500e+03 -3662 6.24000e+02 9.92200e+03 -3663 1.24000e+04 9.02000e+02 -3664 1.24000e+04 1.60600e+03 -3665 1.24000e+04 4.48800e+03 -3666 1.24000e+04 5.97300e+03 -3667 1.24160e+04 6.11600e+03 -3668 1.24320e+04 7.39200e+03 -3669 1.24320e+04 1.14290e+04 -3670 1.20800e+04 9.02000e+02 -3671 1.20800e+04 4.48800e+03 -3672 1.20800e+04 5.96200e+03 -3673 1.20800e+04 7.39200e+03 -3674 1.20960e+04 9.50400e+03 -3675 1.21120e+04 1.11650e+04 -3676 1.77760e+04 2.31000e+02 -3677 1.77760e+04 1.62800e+03 -3678 1.77760e+04 4.09200e+03 -3679 1.77760e+04 6.20400e+03 -3680 1.77760e+04 7.76600e+03 -3681 1.77760e+04 8.73400e+03 -3682 1.77760e+04 9.60300e+03 -3683 1.77760e+04 1.06700e+04 -3684 1.24640e+04 9.02000e+02 -3685 1.24640e+04 1.60600e+03 -3686 1.25160e+04 4.26800e+03 -3687 1.26880e+04 4.26800e+03 -3688 1.28000e+04 4.26800e+03 -3689 1.29120e+04 4.26800e+03 -3690 1.31200e+04 4.26800e+03 -3691 1.33280e+04 4.26800e+03 -3692 1.34560e+04 4.26800e+03 -3693 1.35200e+04 4.26800e+03 -3694 1.36160e+04 4.26800e+03 -3695 1.38720e+04 4.26800e+03 -3696 1.40910e+04 4.26800e+03 -3697 1.41280e+04 5.25800e+03 -3698 1.41280e+04 7.17200e+03 -3699 1.41280e+04 8.86600e+03 -3700 1.41280e+04 9.87800e+03 -3701 1.41280e+04 1.15390e+04 -3702 1.77440e+04 2.31000e+02 -3703 1.77440e+04 1.74900e+03 -3704 1.78240e+04 2.68400e+03 -3705 1.79790e+04 2.68400e+03 -3706 1.80000e+04 4.67500e+03 -3707 1.80000e+04 7.76600e+03 -3708 1.80000e+04 1.06700e+04 -3709 1.66240e+04 1.01200e+03 -3710 1.66240e+04 2.22200e+03 -3711 1.66240e+04 3.85000e+03 -3712 1.66240e+04 5.47800e+03 -3713 1.66240e+04 6.79800e+03 -3714 1.66240e+04 7.87600e+03 -3715 1.66240e+04 1.08900e+04 -3716 1.32320e+04 1.60600e+03 -3717 1.32320e+04 2.31000e+03 -3718 1.32320e+04 3.12400e+03 -3719 1.32320e+04 3.93800e+03 -3720 1.32320e+04 4.92800e+03 -3721 1.32320e+04 7.28200e+03 -3722 1.32320e+04 8.53600e+03 -3723 1.32320e+04 9.18500e+03 -3724 1.32480e+04 9.28400e+03 -3725 1.32640e+04 1.14290e+04 -3726 1.01920e+04 2.31000e+02 -3727 1.01920e+04 1.01200e+03 -3728 1.01920e+04 1.76000e+03 -3729 1.84160e+04 1.06700e+04 -3730 1.85000e+04 9.43800e+03 -3731 1.86560e+04 9.43800e+03 -3732 1.87840e+04 9.43800e+03 -3733 1.89280e+04 9.43800e+03 -3734 1.90240e+04 9.43800e+03 -3735 9.12000e+02 3.41000e+03 -3736 9.12000e+02 6.86400e+03 -3737 9.28000e+02 7.04000e+03 -3738 9.44000e+02 9.92200e+03 -3739 1.43200e+04 2.53000e+03 -3740 1.43200e+04 5.36800e+03 -3741 1.43200e+04 6.90800e+03 -3742 1.43200e+04 8.86600e+03 -3743 1.43200e+04 9.87800e+03 -3744 1.43200e+04 1.15390e+04 -3745 7.69600e+03 1.18800e+03 -3746 7.69600e+03 4.81800e+03 -3747 7.69600e+03 6.90800e+03 -3748 7.76000e+03 7.70000e+03 -3749 7.82400e+03 7.70000e+03 -3750 7.88800e+03 7.70000e+03 -3751 8.01600e+03 8.75600e+03 -3752 1.88320e+04 1.07250e+04 -3753 1.88320e+04 1.15280e+04 -3754 1.89280e+04 1.04940e+04 -3755 1.90240e+04 1.04940e+04 -3756 1.47680e+04 2.53000e+03 -3757 1.47680e+04 5.47800e+03 -3758 1.47680e+04 6.79800e+03 -3759 1.48000e+04 8.00800e+03 -3760 1.48320e+04 8.64600e+03 -3761 1.48320e+04 9.87800e+03 -3762 1.48320e+04 1.14290e+04 -3763 6.64000e+03 2.20000e+02 -3764 6.67600e+03 3.08000e+02 -3765 6.79500e+03 3.08000e+02 -3766 6.83200e+03 2.20000e+02 -3767 6.83200e+03 5.17000e+02 -3768 6.83200e+03 1.51800e+03 -3769 6.83200e+03 2.57400e+03 -3770 6.83200e+03 4.04800e+03 -3771 6.83200e+03 5.43400e+03 -3772 6.83200e+03 7.12800e+03 -3773 6.83200e+03 8.64600e+03 -3774 6.85200e+03 9.28400e+03 -3775 6.92800e+03 9.28400e+03 -3776 7.02400e+03 9.28400e+03 -3777 7.21600e+03 9.28400e+03 -3778 7.53600e+03 9.28400e+03 -3779 7.60000e+03 9.28400e+03 -3780 7.69600e+03 9.28400e+03 -3781 7.82400e+03 9.28400e+03 -3782 7.90400e+03 9.28400e+03 -3783 8.09600e+03 9.28400e+03 -3784 8.17600e+03 9.28400e+03 -3785 8.27200e+03 9.28400e+03 -3786 8.36800e+03 9.28400e+03 -3787 8.43200e+03 9.28400e+03 -3788 8.72000e+03 9.28400e+03 -3789 8.86400e+03 9.28400e+03 -3790 9.10400e+03 9.28400e+03 -3791 9.72800e+03 9.28400e+03 -3792 1.00320e+04 9.28400e+03 -3793 1.02560e+04 9.28400e+03 -3794 1.04480e+04 9.28400e+03 -3795 1.06560e+04 9.28400e+03 -3796 1.07360e+04 9.28400e+03 -3797 1.08000e+04 9.28400e+03 -3798 1.09120e+04 9.28400e+03 -3799 1.10400e+04 9.28400e+03 -3800 1.12160e+04 9.28400e+03 -3801 1.13440e+04 9.28400e+03 -3802 1.15200e+04 9.28400e+03 -3803 1.16000e+04 9.28400e+03 -3804 1.17120e+04 9.28400e+03 -3805 1.17920e+04 9.28400e+03 -3806 1.19840e+04 9.28400e+03 -3807 1.21280e+04 9.28400e+03 -3808 1.22080e+04 9.28400e+03 -3809 1.23840e+04 9.28400e+03 -3810 1.25280e+04 9.28400e+03 -3811 1.26560e+04 9.28400e+03 -3812 1.28430e+04 9.28400e+03 -3813 1.28800e+04 1.14290e+04 -3814 7.34400e+03 8.75600e+03 -3815 7.34400e+03 1.08020e+04 -3816 7.60000e+03 7.26000e+03 -3817 7.76000e+03 7.26000e+03 -3818 7.82400e+03 7.26000e+03 -3819 7.88800e+03 7.26000e+03 -3820 8.04300e+03 7.26000e+03 -3821 8.08000e+03 1.18800e+03 -3822 8.08000e+03 4.81800e+03 -3823 8.08000e+03 7.02900e+03 -3824 1.01280e+04 2.31000e+02 -3825 1.01280e+04 1.01200e+03 -3826 1.01280e+04 1.76000e+03 -3827 1.01480e+04 5.89600e+03 -3828 1.02240e+04 5.89600e+03 -3829 1.03840e+04 5.89600e+03 -3830 1.05120e+04 5.89600e+03 -3831 1.05870e+04 5.89600e+03 -3832 1.06080e+04 7.39200e+03 -3833 1.06080e+04 1.14950e+04 -3834 1.64960e+04 2.22200e+03 -3835 1.64960e+04 3.85000e+03 -3836 1.64960e+04 5.47800e+03 -3837 1.64960e+04 6.79800e+03 -3838 1.64960e+04 7.76600e+03 -3839 1.65920e+04 9.28400e+03 -3840 1.66880e+04 9.28400e+03 -3841 1.67840e+04 9.28400e+03 -3842 1.69120e+04 9.28400e+03 -3843 1.70400e+04 9.28400e+03 -3844 1.71360e+04 9.28400e+03 -3845 1.72800e+04 9.28400e+03 -3846 1.73920e+04 9.59200e+03 -3847 1.73920e+04 1.06700e+04 -3848 1.73920e+04 1.15280e+04 -3849 4.59200e+03 2.68400e+03 -3850 4.59200e+03 5.43400e+03 -3851 4.59200e+03 7.81000e+03 -3852 4.59200e+03 8.86600e+03 -3853 4.59200e+03 1.14950e+04 -3854 1.05760e+04 7.39200e+03 -3855 1.05760e+04 1.14950e+04 -3856 1.06560e+04 6.33600e+03 -3857 1.08000e+04 6.33600e+03 -3858 1.08640e+04 6.33600e+03 -3859 1.09280e+04 6.33600e+03 -3860 1.10240e+04 2.31000e+02 -3861 1.10240e+04 9.02000e+02 -3862 1.10240e+04 1.76000e+03 -3863 1.10240e+04 4.48800e+03 -3864 2.38400e+03 3.11300e+03 -3865 2.38400e+03 6.64400e+03 -3866 2.38400e+03 1.00320e+04 -3867 2.92800e+03 1.00320e+04 -3868 2.94400e+03 6.95200e+03 -3869 2.96000e+03 3.11300e+03 -3870 2.96000e+03 6.87500e+03 -3871 5.16800e+03 2.17800e+03 -3872 5.16800e+03 4.04800e+03 -3873 5.16800e+03 6.40200e+03 -3874 5.16800e+03 7.45800e+03 -3875 5.16800e+03 1.05820e+04 -3876 2.54400e+03 3.11300e+03 -3877 2.54400e+03 6.75400e+03 -3878 2.54400e+03 1.00320e+04 -3879 9.64800e+03 2.31000e+02 -3880 9.64800e+03 1.01200e+03 -3881 9.64800e+03 1.76000e+03 -3882 9.64800e+03 7.12800e+03 -3883 9.66400e+03 7.78800e+03 -3884 1.80800e+03 8.05200e+03 -3885 1.80800e+03 1.00320e+04 -3886 1.87200e+03 7.17200e+03 -3887 1.98400e+03 7.17200e+03 -3888 2.11200e+03 7.17200e+03 -3889 2.19200e+03 7.17200e+03 -3890 2.28800e+03 7.17200e+03 -3891 2.46400e+03 7.17200e+03 -3892 2.62400e+03 7.17200e+03 -3893 2.73600e+03 7.17200e+03 -3894 2.86400e+03 7.17200e+03 -3895 2.96000e+03 7.17200e+03 -3896 3.02400e+03 7.17200e+03 -3897 3.20000e+03 7.17200e+03 -3898 3.31200e+03 7.17200e+03 -3899 3.40800e+03 7.17200e+03 -3900 3.47200e+03 3.11300e+03 -3901 3.47200e+03 6.98500e+03 -3902 9.48800e+03 2.31000e+02 -3903 9.48800e+03 1.01200e+03 -3904 9.48800e+03 1.76000e+03 -3905 9.48800e+03 7.12800e+03 -3906 2.00000e+03 8.04100e+03 -3907 2.00000e+03 8.77800e+03 -3908 2.00000e+03 1.00320e+04 -3909 2.11200e+03 7.92000e+03 -3910 2.19200e+03 7.92000e+03 -3911 2.28800e+03 7.92000e+03 -3912 2.46400e+03 7.92000e+03 -3913 2.62400e+03 7.92000e+03 -3914 2.81600e+03 7.92000e+03 -3915 2.96000e+03 7.92000e+03 -3916 3.02400e+03 7.92000e+03 -3917 3.12000e+03 3.11300e+03 -3918 3.12000e+03 6.86400e+03 -3919 8.75200e+03 8.86600e+03 -3920 8.81600e+03 1.18800e+03 -3921 8.81600e+03 3.93800e+03 -3922 8.81600e+03 5.97300e+03 -3923 1.00800e+03 3.57500e+03 -3924 1.00800e+03 9.65800e+03 -3925 1.29600e+03 7.82100e+03 -3926 1.29600e+03 9.65800e+03 -3927 1.31600e+03 7.70000e+03 -3928 1.53600e+03 7.70000e+03 -3929 1.64800e+03 7.70000e+03 -3930 1.76000e+03 7.70000e+03 -3931 1.87200e+03 7.70000e+03 -3932 1.98400e+03 7.70000e+03 -3933 2.11200e+03 7.70000e+03 -3934 2.19200e+03 7.70000e+03 -3935 2.28800e+03 7.70000e+03 -3936 2.46400e+03 7.70000e+03 -3937 2.62400e+03 7.70000e+03 -3938 2.74700e+03 7.70000e+03 -3939 2.76800e+03 3.11300e+03 -3940 2.76800e+03 6.86400e+03 -3941 1.36000e+03 3.22300e+03 -3942 1.36000e+03 8.77800e+03 -3943 1.36000e+03 1.00320e+04 -3944 2.03200e+03 8.77800e+03 -3945 2.03200e+03 1.00320e+04 -3946 2.11200e+03 6.95200e+03 -3947 2.19200e+03 6.95200e+03 -3948 2.28800e+03 6.95200e+03 -3949 2.41600e+03 3.11300e+03 -3950 2.41600e+03 6.76500e+03 -3951 5.60000e+02 3.41000e+03 -3952 5.60000e+02 6.86400e+03 -3953 5.76000e+02 7.04000e+03 -3954 5.92000e+02 9.92200e+03 -3955 1.71200e+03 3.11300e+03 -3956 1.71200e+03 7.01800e+03 -3957 1.71200e+03 8.06300e+03 -3958 1.72800e+03 8.18400e+03 -3959 1.74400e+03 1.00320e+04 -3960 5.10400e+03 1.05820e+04 -3961 5.10400e+03 1.14950e+04 -3962 5.12000e+03 7.92000e+03 -3963 5.13600e+03 2.17800e+03 -3964 5.13600e+03 4.04800e+03 -3965 5.13600e+03 6.40200e+03 -3966 5.13600e+03 7.46900e+03 -3967 2.06400e+03 3.11300e+03 -3968 2.06400e+03 6.64400e+03 -3969 2.06400e+03 8.78900e+03 -3970 2.08000e+03 8.93200e+03 -3971 2.09600e+03 1.00320e+04 -3972 3.07200e+03 1.12200e+04 -3973 3.08800e+03 3.11300e+03 -3974 3.08800e+03 6.86400e+03 -3975 3.08800e+03 1.00320e+04 -3976 3.24800e+03 3.11300e+03 -3977 3.24800e+03 6.86400e+03 -3978 3.24800e+03 1.00320e+04 -3979 1.09600e+04 2.31000e+02 -3980 1.09600e+04 9.02000e+02 -3981 1.09600e+04 1.76000e+03 -3982 1.09600e+04 4.48800e+03 -3983 1.09600e+04 7.39200e+03 -3984 1.09600e+04 1.03620e+04 -3985 1.09600e+04 1.14950e+04 -3986 2.97600e+03 1.06920e+04 -3987 2.99200e+03 3.11300e+03 -3988 2.99200e+03 6.86400e+03 -3989 2.99200e+03 1.00430e+04 -3990 1.08320e+04 1.03620e+04 -3991 1.08320e+04 1.14950e+04 -3992 1.08960e+04 2.31000e+02 -3993 1.08960e+04 9.02000e+02 -3994 1.08960e+04 1.76000e+03 -3995 1.08960e+04 4.48800e+03 -3996 1.08960e+04 7.39200e+03 -3997 1.08320e+04 2.31000e+02 -3998 1.08320e+04 9.02000e+02 -3999 1.08320e+04 1.76000e+03 -4000 1.08480e+04 6.77600e+03 -4001 1.08640e+04 7.39200e+03 -4002 1.08640e+04 1.03620e+04 -4003 1.08640e+04 1.14950e+04 -4004 1.79680e+04 1.06700e+04 -4005 1.83680e+04 9.79000e+03 -4006 1.85120e+04 9.79000e+03 -4007 1.86560e+04 9.79000e+03 -4008 1.87840e+04 9.79000e+03 -4009 1.89280e+04 9.79000e+03 -4010 1.90240e+04 9.79000e+03 -4011 3.37600e+03 3.11300e+03 -4012 3.37600e+03 6.86400e+03 -4013 3.50400e+03 9.59200e+03 -4014 3.56800e+03 9.59200e+03 -4015 3.66400e+03 1.01420e+04 -4016 2.22400e+03 3.11300e+03 -4017 2.22400e+03 6.64400e+03 -4018 2.27600e+03 8.71200e+03 -4019 2.46400e+03 8.71200e+03 -4020 2.73600e+03 8.71200e+03 -4021 2.96000e+03 8.71200e+03 -4022 3.02400e+03 8.71200e+03 -4023 3.16800e+03 8.71200e+03 -4024 3.31200e+03 8.71200e+03 -4025 3.50400e+03 8.71200e+03 -4026 3.63200e+03 8.71200e+03 -4027 3.69600e+03 8.71200e+03 -4028 3.82400e+03 8.71200e+03 -4029 3.95200e+03 8.71200e+03 -4030 8.84800e+03 9.06400e+03 -4031 8.88000e+03 1.18800e+03 -4032 8.88000e+03 3.93800e+03 -4033 8.88000e+03 5.96200e+03 -4034 8.88000e+03 7.01800e+03 -4035 1.60800e+04 2.22200e+03 -4036 1.60800e+04 3.74000e+03 -4037 1.60800e+04 5.36800e+03 -4038 1.60800e+04 6.79800e+03 -4039 1.60800e+04 7.76600e+03 -4040 1.60800e+04 8.74500e+03 -4041 1.61120e+04 8.84400e+03 -4042 1.61440e+04 1.06260e+04 -4043 1.61440e+04 1.14290e+04 -4044 1.32960e+04 1.60600e+03 -4045 1.32960e+04 2.31000e+03 -4046 1.32960e+04 3.12400e+03 -4047 1.32960e+04 3.93800e+03 -4048 1.32960e+04 4.92800e+03 -4049 1.34560e+04 5.80800e+03 -4050 1.35200e+04 5.80800e+03 -4051 1.36320e+04 5.80800e+03 -4052 1.37600e+04 5.80800e+03 -4053 1.39200e+04 5.80800e+03 -4054 1.40800e+04 5.80800e+03 -4055 1.42030e+04 5.80800e+03 -4056 1.42240e+04 7.17200e+03 -4057 1.42240e+04 8.86600e+03 -4058 1.42240e+04 9.87800e+03 -4059 1.42240e+04 1.15390e+04 -4060 1.41600e+04 1.15390e+04 -4061 1.41800e+04 1.07800e+04 -4062 1.42720e+04 1.07800e+04 -4063 1.43840e+04 1.07800e+04 -4064 1.44480e+04 1.07800e+04 -4065 1.47040e+04 1.07800e+04 -4066 1.47840e+04 1.07800e+04 -4067 1.49600e+04 2.53000e+03 -4068 1.49600e+04 4.15800e+03 -4069 1.49600e+04 5.47800e+03 -4070 1.49600e+04 6.79800e+03 -4071 1.49600e+04 7.89800e+03 -4072 1.49600e+04 8.64600e+03 -4073 1.49600e+04 9.87800e+03 -4074 1.49600e+04 1.06370e+04 -4075 1.71040e+04 1.05600e+04 -4076 1.71040e+04 1.15280e+04 -4077 1.71200e+04 8.40400e+03 -4078 1.71360e+04 1.78200e+03 -4079 1.71360e+04 4.35600e+03 -4080 1.71360e+04 6.68800e+03 -4081 1.71360e+04 7.72200e+03 -4082 1.54400e+04 8.64600e+03 -4083 1.54400e+04 9.87800e+03 -4084 1.54400e+04 1.06260e+04 -4085 1.54400e+04 1.14290e+04 -4086 1.54600e+04 7.78800e+03 -4087 1.56000e+04 7.78800e+03 -4088 1.57120e+04 7.78800e+03 -4089 1.57920e+04 7.78800e+03 -4090 1.58560e+04 2.53000e+03 -4091 1.58560e+04 4.04800e+03 -4092 1.58560e+04 5.36800e+03 -4093 1.58560e+04 6.79800e+03 -4094 1.58560e+04 7.68900e+03 -4095 1.53440e+04 8.64600e+03 -4096 1.53440e+04 9.87800e+03 -4097 1.53440e+04 1.06260e+04 -4098 1.53440e+04 1.14290e+04 -4099 1.53800e+04 8.00800e+03 -4100 1.54720e+04 8.00800e+03 -4101 1.55680e+04 2.53000e+03 -4102 1.55680e+04 5.36800e+03 -4103 1.55680e+04 6.79800e+03 -4104 4.20800e+03 2.36500e+03 -4105 4.20800e+03 5.43400e+03 -4106 4.20800e+03 6.90800e+03 -4107 1.83200e+04 3.61900e+03 -4108 1.83200e+04 7.87600e+03 -4109 1.83200e+04 9.42700e+03 -4110 1.83200e+04 1.06700e+04 -4111 1.21440e+04 9.02000e+02 -4112 1.21440e+04 4.48800e+03 -4113 1.21440e+04 5.96200e+03 -4114 1.21440e+04 7.39200e+03 -4115 1.21600e+04 9.06400e+03 -4116 1.21760e+04 1.11650e+04 -4117 1.49920e+04 4.32300e+03 -4118 1.49920e+04 5.47800e+03 -4119 1.49920e+04 6.79800e+03 -4120 1.49920e+04 7.89800e+03 -4121 1.49920e+04 8.64600e+03 -4122 1.49920e+04 9.87800e+03 -4123 1.49920e+04 1.06260e+04 -4124 1.49920e+04 1.14290e+04 -4125 1.51240e+04 4.18000e+03 -4126 1.53280e+04 4.18000e+03 -4127 1.54080e+04 4.18000e+03 -4128 1.54720e+04 4.18000e+03 -4129 1.56000e+04 4.18000e+03 -4130 1.57120e+04 4.18000e+03 -4131 1.58030e+04 4.18000e+03 -4132 1.58240e+04 2.53000e+03 -4133 1.58240e+04 4.01500e+03 -4134 1.63360e+04 1.04610e+04 -4135 1.63360e+04 1.14290e+04 -4136 1.64320e+04 8.62400e+03 -4137 1.65920e+04 8.62400e+03 -4138 1.66880e+04 8.62400e+03 -4139 1.67520e+04 8.62400e+03 -4140 1.68160e+04 8.62400e+03 -4141 1.69120e+04 8.62400e+03 -4142 1.70400e+04 8.62400e+03 -4143 1.71360e+04 8.62400e+03 -4144 1.72430e+04 8.62400e+03 -4145 1.72640e+04 1.78200e+03 -4146 1.72640e+04 4.09200e+03 -4147 1.72640e+04 6.68800e+03 -4148 1.72640e+04 7.72200e+03 -4149 1.72640e+04 8.48100e+03 -4150 9.71200e+03 2.31000e+02 -4151 9.71200e+03 1.01200e+03 -4152 9.71200e+03 1.76000e+03 -4153 9.71200e+03 7.12800e+03 -4154 1.70720e+04 1.01200e+03 -4155 1.70720e+04 2.22200e+03 -4156 1.70720e+04 4.35600e+03 -4157 1.70720e+04 6.68800e+03 -4158 1.70720e+04 7.72200e+03 -4159 1.70720e+04 1.05600e+04 -4160 1.70720e+04 1.15280e+04 -4161 1.35520e+04 1.14180e+04 -4162 1.36960e+04 1.12200e+04 -4163 1.39680e+04 1.12200e+04 -4164 1.41920e+04 1.12200e+04 -4165 1.42720e+04 1.12200e+04 -4166 1.43840e+04 1.12200e+04 -4167 1.44480e+04 1.12200e+04 -4168 1.45760e+04 1.12200e+04 -4169 1.46720e+04 2.53000e+03 -4170 1.46720e+04 5.36800e+03 -4171 1.46720e+04 6.79800e+03 -4172 1.46720e+04 8.64600e+03 -4173 1.46720e+04 9.87800e+03 -4174 1.46880e+04 1.12200e+04 -4175 1.47040e+04 1.14180e+04 -4176 1.64640e+04 2.22200e+03 -4177 1.64640e+04 3.85000e+03 -4178 1.64640e+04 5.47800e+03 -4179 1.64640e+04 6.79800e+03 -4180 1.64640e+04 7.76600e+03 -4181 1.64640e+04 1.04610e+04 -4182 1.64640e+04 1.14290e+04 -4183 1.44000e+02 1.15280e+04 -4184 3.20000e+02 1.14400e+04 -4185 4.96000e+02 1.14400e+04 -4186 7.52000e+02 1.14400e+04 -4187 9.12000e+02 1.14400e+04 -4188 1.10400e+03 1.14400e+04 -4189 1.23200e+03 1.14400e+04 -4190 1.58400e+03 1.14400e+04 -4191 1.71200e+03 1.14400e+04 -4192 1.77600e+03 1.14400e+04 -4193 1.90400e+03 1.14400e+04 -4194 2.06400e+03 1.14400e+04 -4195 2.25100e+03 1.14400e+04 -4196 2.35200e+03 3.11300e+03 -4197 2.35200e+03 6.64400e+03 -4198 2.35200e+03 1.00320e+04 -4199 2.35200e+03 1.12970e+04 -4200 2.46400e+03 1.14400e+04 -4201 2.73600e+03 1.14400e+04 -4202 3.00800e+03 1.14400e+04 -4203 3.15200e+03 1.14400e+04 -4204 3.34400e+03 1.14400e+04 -4205 3.50400e+03 1.14400e+04 -4206 3.58400e+03 1.14400e+04 -4207 3.71200e+03 1.14400e+04 -4208 3.88800e+03 1.14400e+04 -4209 4.04800e+03 1.14400e+04 -4210 4.12800e+03 1.14400e+04 -4211 4.27200e+03 1.14400e+04 -4212 4.36800e+03 1.15280e+04 -4213 1.31680e+04 7.28200e+03 -4214 1.31680e+04 8.53600e+03 -4215 1.31680e+04 9.17400e+03 -4216 1.31680e+04 1.14290e+04 -4217 1.32640e+04 1.60600e+03 -4218 1.32640e+04 2.31000e+03 -4219 1.32640e+04 3.12400e+03 -4220 1.32640e+04 3.93800e+03 -4221 1.32640e+04 4.92800e+03 -4222 1.32640e+04 6.41300e+03 -4223 7.79200e+03 8.89900e+03 -4224 7.82400e+03 8.75600e+03 -4225 7.85600e+03 1.18800e+03 -4226 7.85600e+03 4.81800e+03 -4227 7.85600e+03 8.61300e+03 -4228 1.67200e+04 1.01200e+03 -4229 1.67200e+04 2.22200e+03 -4230 1.67200e+04 3.85000e+03 -4231 1.67200e+04 5.47800e+03 -4232 1.67200e+04 6.68800e+03 -4233 1.67200e+04 7.87600e+03 -4234 1.67200e+04 1.05600e+04 -4235 1.67200e+04 1.15280e+04 -4236 1.90560e+04 1.15280e+04 -4237 1.29760e+04 3.93800e+03 -4238 1.29760e+04 4.70800e+03 -4239 1.29760e+04 6.07200e+03 -4240 1.29760e+04 7.28200e+03 -4241 1.29760e+04 8.53600e+03 -4242 1.29760e+04 9.17400e+03 -4243 1.29760e+04 1.14290e+04 -4244 1.30400e+04 4.73000e+02 -4245 1.30400e+04 1.60600e+03 -4246 1.30400e+04 2.31000e+03 -4247 1.59200e+04 2.49700e+03 -4248 1.59360e+04 3.30000e+03 -4249 1.59520e+04 3.77300e+03 -4250 1.59520e+04 5.36800e+03 -4251 1.59520e+04 6.79800e+03 -4252 1.59520e+04 7.76600e+03 -4253 1.59520e+04 8.62400e+03 -4254 1.59520e+04 9.87800e+03 -4255 1.59520e+04 1.06260e+04 -4256 1.59520e+04 1.14290e+04 -4257 5.29600e+03 6.40200e+03 -4258 5.29600e+03 7.19400e+03 -4259 5.29600e+03 1.05820e+04 -4260 5.31200e+03 5.58800e+03 -4261 5.32800e+03 2.17800e+03 -4262 5.32800e+03 4.04800e+03 -4263 1.18560e+04 9.02000e+02 -4264 1.18560e+04 4.48800e+03 -4265 1.18560e+04 5.92900e+03 -4266 1.18720e+04 6.02800e+03 -4267 1.18880e+04 6.17100e+03 -4268 1.18880e+04 7.39200e+03 -4269 1.18880e+04 1.11650e+04 -4270 1.55040e+04 5.83000e+02 -4271 1.55040e+04 2.53000e+03 -4272 1.55040e+04 5.36800e+03 -4273 1.55040e+04 6.79800e+03 -4274 1.55040e+04 8.64600e+03 -4275 1.55520e+04 9.28400e+03 -4276 1.56000e+04 9.87800e+03 -4277 1.56000e+04 1.06260e+04 -4278 1.56000e+04 1.14290e+04 -4279 5.84000e+03 2.09000e+02 -4280 5.84000e+03 2.02400e+03 -4281 5.84000e+03 4.04800e+03 -4282 5.84000e+03 8.38200e+03 -4283 5.84000e+03 1.08020e+04 -4284 4.36800e+03 2.36500e+03 -4285 4.36800e+03 5.43400e+03 -4286 4.36800e+03 7.81000e+03 -4287 4.38800e+03 1.11320e+04 -4288 4.46400e+03 1.11320e+04 -4289 4.52800e+03 1.11320e+04 -4290 4.62400e+03 1.11320e+04 -4291 4.78400e+03 1.11320e+04 -4292 4.94400e+03 1.11320e+04 -4293 5.13600e+03 1.11320e+04 -4294 5.20000e+03 1.11320e+04 -4295 5.36000e+03 1.11320e+04 -4296 5.55200e+03 1.11320e+04 -4297 5.61600e+03 1.11320e+04 -4298 5.80800e+03 1.11320e+04 -4299 5.96800e+03 1.11320e+04 -4300 6.03200e+03 1.11320e+04 -4301 6.11200e+03 1.11320e+04 -4302 6.20800e+03 1.11320e+04 -4303 6.35200e+03 1.11320e+04 -4304 6.46400e+03 1.11320e+04 -4305 6.67200e+03 1.11320e+04 -4306 6.83200e+03 1.11320e+04 -4307 7.02400e+03 1.11320e+04 -4308 7.20000e+03 1.11320e+04 -4309 7.44000e+03 1.11320e+04 -4310 7.53600e+03 1.11320e+04 -4311 7.60000e+03 1.11320e+04 -4312 7.69600e+03 1.11320e+04 -4313 7.82400e+03 1.11320e+04 -4314 7.88800e+03 1.11320e+04 -4315 6.28800e+03 4.29000e+02 -4316 6.28800e+03 2.02400e+03 -4317 6.28800e+03 4.04800e+03 -4318 6.41600e+03 8.22800e+03 -4319 6.54400e+03 8.22800e+03 -4320 6.67200e+03 8.22800e+03 -4321 6.86400e+03 8.22800e+03 -4322 6.92800e+03 8.22800e+03 -4323 7.04000e+03 8.22800e+03 -4324 7.18400e+03 8.22800e+03 -4325 7.53600e+03 8.22800e+03 -4326 7.60000e+03 8.22800e+03 -4327 7.69600e+03 8.22800e+03 -4328 7.76000e+03 8.22800e+03 -4329 7.82400e+03 8.22800e+03 -4330 7.88800e+03 8.22800e+03 -4331 8.09600e+03 8.22800e+03 -4332 8.17600e+03 8.22800e+03 -4333 8.25600e+03 8.22800e+03 -4334 8.44800e+03 8.22800e+03 -4335 8.72000e+03 8.22800e+03 -4336 8.84800e+03 8.22800e+03 -4337 9.11500e+03 8.22800e+03 -4338 9.13600e+03 9.87800e+03 -4339 4.62400e+03 2.68400e+03 -4340 4.62400e+03 5.44500e+03 -4341 4.64400e+03 5.80800e+03 -4342 4.75200e+03 5.80800e+03 -4343 4.84800e+03 5.80800e+03 -4344 4.91200e+03 5.80800e+03 -4345 5.04000e+03 5.80800e+03 -4346 5.32800e+03 5.80800e+03 -4347 5.66400e+03 5.80800e+03 -4348 6.09600e+03 5.80800e+03 -4349 6.19200e+03 5.80800e+03 -4350 6.25600e+03 5.80800e+03 -4351 6.41600e+03 5.80800e+03 -4352 6.56000e+03 5.80800e+03 -4353 6.67200e+03 5.80800e+03 -4354 6.76800e+03 5.80800e+03 -4355 6.86400e+03 5.80800e+03 -4356 6.99200e+03 5.80800e+03 -4357 7.08800e+03 5.80800e+03 -4358 7.18400e+03 5.80800e+03 -4359 7.32800e+03 5.80800e+03 -4360 7.58400e+03 5.80800e+03 -4361 7.66400e+03 5.80800e+03 -4362 7.76000e+03 5.80800e+03 -4363 7.82400e+03 5.80800e+03 -4364 7.88800e+03 5.80800e+03 -4365 7.95200e+03 5.80800e+03 -4366 8.04800e+03 5.80800e+03 -4367 8.17600e+03 5.80800e+03 -4368 8.33600e+03 6.90800e+03 -4369 8.33600e+03 8.64600e+03 -4370 9.00800e+03 1.18800e+03 -4371 9.44000e+03 3.82800e+03 -4372 9.55200e+03 3.82800e+03 -4373 9.68000e+03 3.82800e+03 -4374 9.82400e+03 3.82800e+03 -4375 9.93600e+03 3.82800e+03 -4376 1.00000e+04 3.82800e+03 -4377 1.02240e+04 3.82800e+03 -4378 1.02880e+04 3.82800e+03 -4379 1.03840e+04 3.82800e+03 -4380 1.05120e+04 3.82800e+03 -4381 1.05760e+04 3.82800e+03 -4382 1.06400e+04 3.82800e+03 -4383 1.07040e+04 3.82800e+03 -4384 1.08000e+04 3.82800e+03 -4385 1.09280e+04 3.82800e+03 -4386 1.10560e+04 3.82800e+03 -4387 1.11200e+04 3.82800e+03 -4388 1.12160e+04 3.82800e+03 -4389 1.13440e+04 3.82800e+03 -4390 1.14880e+04 3.82800e+03 -4391 1.16800e+04 3.82800e+03 -4392 1.17600e+04 3.82800e+03 -4393 1.19040e+04 3.82800e+03 -4394 1.20480e+04 3.82800e+03 -4395 1.21760e+04 3.82800e+03 -4396 1.23360e+04 3.82800e+03 -4397 1.24320e+04 3.82800e+03 -4398 1.25280e+04 3.82800e+03 -4399 1.26240e+04 3.82800e+03 -4400 1.26880e+04 3.82800e+03 -4401 1.27520e+04 4.70800e+03 -4402 1.27520e+04 6.07200e+03 -4403 1.27520e+04 7.39200e+03 -4404 1.27520e+04 8.64600e+03 -4405 1.27520e+04 1.14290e+04 -4406 1.45120e+04 9.16300e+03 -4407 1.45120e+04 9.87800e+03 -4408 1.45120e+04 1.15390e+04 -4409 1.47040e+04 9.06400e+03 -4410 1.47840e+04 9.06400e+03 -4411 1.51200e+04 9.06400e+03 -4412 1.53920e+04 9.06400e+03 -4413 1.54720e+04 9.06400e+03 -4414 1.55680e+04 9.06400e+03 -4415 1.57120e+04 9.06400e+03 -4416 1.57920e+04 9.06400e+03 -4417 1.58560e+04 9.06400e+03 -4418 1.59840e+04 9.06400e+03 -4419 1.60800e+04 9.06400e+03 -4420 1.62080e+04 9.06400e+03 -4421 1.64320e+04 9.06400e+03 -4422 1.65920e+04 9.06400e+03 -4423 1.66880e+04 9.06400e+03 -4424 1.67840e+04 9.06400e+03 -4425 1.69120e+04 9.06400e+03 -4426 1.70400e+04 9.06400e+03 -4427 1.71360e+04 9.06400e+03 -4428 1.72800e+04 9.06400e+03 -4429 1.73920e+04 9.06400e+03 -4430 1.74720e+04 9.06400e+03 -4431 1.75520e+04 9.06400e+03 -4432 1.79520e+04 9.06400e+03 -4433 1.82240e+04 9.06400e+03 -4434 1.84270e+04 9.06400e+03 -4435 1.85120e+04 4.03700e+03 -4436 1.85120e+04 8.85500e+03 -4437 6.48000e+03 4.29000e+02 -4438 6.48000e+03 2.02400e+03 -4439 6.48000e+03 4.04800e+03 -4440 6.48000e+03 8.64600e+03 -4441 6.67200e+03 1.02520e+04 -4442 6.84800e+03 1.02520e+04 -4443 7.02400e+03 1.02520e+04 -4444 7.20000e+03 1.02520e+04 -4445 7.37600e+03 1.02520e+04 -4446 7.53600e+03 1.02520e+04 -4447 7.60000e+03 1.02520e+04 -4448 7.69600e+03 1.02520e+04 -4449 7.82400e+03 1.02520e+04 -4450 7.88800e+03 1.02520e+04 -4451 7.98400e+03 1.02520e+04 -4452 8.09600e+03 1.02520e+04 -4453 8.17600e+03 1.02520e+04 -4454 8.27200e+03 1.02520e+04 -4455 8.36800e+03 1.02520e+04 -4456 8.43200e+03 1.02520e+04 -4457 8.72000e+03 1.02520e+04 -4458 8.84800e+03 1.02520e+04 -4459 9.10400e+03 1.02520e+04 -4460 9.72800e+03 1.02520e+04 -4461 1.00320e+04 1.02520e+04 -4462 1.02560e+04 1.02520e+04 -4463 1.03200e+04 1.02520e+04 -4464 7.47200e+03 6.38000e+02 -4465 7.47200e+03 1.51800e+03 -4466 7.47200e+03 4.04800e+03 -4467 7.47200e+03 4.92800e+03 -4468 7.47200e+03 8.75600e+03 -4469 7.53600e+03 1.09120e+04 -4470 7.60000e+03 1.09120e+04 -4471 7.69600e+03 1.09120e+04 -4472 7.82400e+03 1.09120e+04 -4473 7.88800e+03 1.09120e+04 -4474 7.98400e+03 1.09120e+04 -4475 8.09600e+03 1.09120e+04 -4476 8.17600e+03 1.09120e+04 -4477 8.27200e+03 1.09120e+04 -4478 8.36800e+03 1.09120e+04 -4479 8.43200e+03 1.09120e+04 -4480 8.72000e+03 1.09120e+04 -4481 8.84800e+03 1.09120e+04 -4482 9.10400e+03 1.09120e+04 -4483 9.72800e+03 1.09120e+04 -4484 1.00320e+04 1.09120e+04 -4485 1.02560e+04 1.09120e+04 -4486 1.03200e+04 1.09120e+04 -4487 1.04800e+04 1.09120e+04 -4488 1.06560e+04 1.09120e+04 -4489 1.07680e+04 1.09120e+04 -4490 1.09280e+04 1.09120e+04 -4491 1.10240e+04 1.09120e+04 -4492 1.12160e+04 1.09120e+04 -4493 1.13280e+04 1.09120e+04 -4494 1.14400e+04 1.14400e+04 -4495 1.14400e+04 1.10880e+04 -4496 4.84800e+03 7.75500e+03 -4497 4.84800e+03 1.14950e+04 -4498 4.86400e+03 7.61200e+03 -4499 4.88000e+03 2.61800e+03 -4500 4.88000e+03 6.40200e+03 -4501 8.91200e+03 1.18800e+03 -4502 8.91200e+03 3.94900e+03 -4503 8.99200e+03 4.04800e+03 -4504 9.44000e+03 4.04800e+03 -4505 9.55200e+03 4.04800e+03 -4506 9.68000e+03 4.04800e+03 -4507 9.82400e+03 4.04800e+03 -4508 9.93600e+03 4.04800e+03 -4509 1.00000e+04 4.04800e+03 -4510 1.02240e+04 4.04800e+03 -4511 1.02880e+04 4.04800e+03 -4512 1.03840e+04 4.04800e+03 -4513 1.05120e+04 4.04800e+03 -4514 1.05760e+04 4.04800e+03 -4515 1.06400e+04 4.04800e+03 -4516 1.07040e+04 4.04800e+03 -4517 1.08000e+04 4.04800e+03 -4518 1.09280e+04 4.04800e+03 -4519 1.10560e+04 4.04800e+03 -4520 1.11200e+04 4.04800e+03 -4521 1.12160e+04 4.04800e+03 -4522 1.13440e+04 4.04800e+03 -4523 1.14880e+04 4.04800e+03 -4524 1.16800e+04 4.04800e+03 -4525 1.17600e+04 4.04800e+03 -4526 1.19040e+04 4.04800e+03 -4527 1.20480e+04 4.04800e+03 -4528 1.21760e+04 4.04800e+03 -4529 1.23360e+04 4.04800e+03 -4530 1.24320e+04 4.04800e+03 -4531 1.25280e+04 4.04800e+03 -4532 1.26240e+04 4.70800e+03 -4533 1.26240e+04 6.07200e+03 -4534 1.26240e+04 7.39200e+03 -4535 1.26240e+04 1.14290e+04 -4536 1.26880e+04 4.04800e+03 -4537 1.28000e+04 4.04800e+03 -4538 1.28800e+04 1.60600e+03 -4539 1.28800e+04 2.31000e+03 -4540 1.28800e+04 3.94900e+03 -4541 4.65600e+03 2.62900e+03 -4542 4.72000e+03 4.48800e+03 -4543 4.78400e+03 4.48800e+03 -4544 4.84800e+03 4.48800e+03 -4545 4.91200e+03 4.48800e+03 -4546 5.04000e+03 4.48800e+03 -4547 5.29600e+03 4.48800e+03 -4548 5.66400e+03 4.48800e+03 -4549 5.87200e+03 4.48800e+03 -4550 6.12800e+03 4.48800e+03 -4551 6.19200e+03 4.48800e+03 -4552 6.25600e+03 4.48800e+03 -4553 6.41600e+03 4.48800e+03 -4554 6.56000e+03 4.48800e+03 -4555 6.67200e+03 4.48800e+03 -4556 6.78400e+03 4.48800e+03 -4557 6.89600e+03 4.48800e+03 -4558 7.00800e+03 4.48800e+03 -4559 7.08800e+03 4.48800e+03 -4560 7.18400e+03 4.48800e+03 -4561 7.31200e+03 4.48800e+03 -4562 7.50400e+03 4.48800e+03 -4563 7.66400e+03 4.48800e+03 -4564 7.76000e+03 4.48800e+03 -4565 7.82400e+03 4.48800e+03 -4566 7.88800e+03 4.48800e+03 -4567 7.95200e+03 4.48800e+03 -4568 8.04800e+03 4.48800e+03 -4569 8.20800e+03 4.48800e+03 -4570 8.33600e+03 4.48800e+03 -4571 8.43200e+03 4.48800e+03 -4572 8.49600e+03 4.48800e+03 -4573 8.68800e+03 5.96200e+03 -4574 8.68800e+03 8.86600e+03 -4575 1.20160e+04 9.02000e+02 -4576 1.20160e+04 4.48800e+03 -4577 1.20160e+04 6.08300e+03 -4578 1.20360e+04 6.33600e+03 -4579 1.21760e+04 6.33600e+03 -4580 1.23840e+04 6.33600e+03 -4581 1.25230e+04 6.33600e+03 -4582 1.25600e+04 7.39200e+03 -4583 1.25600e+04 1.14290e+04 -4584 1.74560e+04 1.15280e+04 -4585 1.74760e+04 1.14400e+04 -4586 1.75520e+04 1.14400e+04 -4587 1.79200e+04 1.14400e+04 -4588 1.83680e+04 1.14400e+04 -4589 1.85230e+04 1.14400e+04 -4590 1.86080e+04 4.03700e+03 -4591 1.86080e+04 8.52500e+03 -4592 1.86080e+04 1.06700e+04 -4593 1.86080e+04 1.15280e+04 -4594 1.44160e+04 8.86600e+03 -4595 1.44160e+04 9.87800e+03 -4596 1.44160e+04 1.15390e+04 -4597 1.45120e+04 7.34800e+03 -4598 1.47040e+04 7.34800e+03 -4599 1.48160e+04 7.34800e+03 -4600 1.49280e+04 7.34800e+03 -4601 1.51360e+04 7.34800e+03 -4602 1.53280e+04 7.34800e+03 -4603 1.54400e+04 7.34800e+03 -4604 1.56000e+04 7.34800e+03 -4605 1.57120e+04 7.34800e+03 -4606 1.57920e+04 7.34800e+03 -4607 1.58880e+04 7.34800e+03 -4608 1.59840e+04 7.34800e+03 -4609 1.61280e+04 7.34800e+03 -4610 1.62880e+04 7.34800e+03 -4611 1.65440e+04 7.34800e+03 -4612 1.66880e+04 7.34800e+03 -4613 1.67520e+04 7.34800e+03 -4614 1.68160e+04 7.34800e+03 -4615 1.69120e+04 7.34800e+03 -4616 1.70400e+04 7.34800e+03 -4617 1.71040e+04 7.34800e+03 -4618 1.71680e+04 7.34800e+03 -4619 1.74080e+04 7.34800e+03 -4620 1.75040e+04 7.34800e+03 -4621 1.77120e+04 7.34800e+03 -4622 1.78560e+04 7.34800e+03 -4623 1.79680e+04 7.34800e+03 -4624 1.81920e+04 7.34800e+03 -4625 1.82560e+04 7.34800e+03 -4626 1.83840e+04 7.34800e+03 -4627 1.84480e+04 3.56400e+03 -4628 1.84480e+04 7.17200e+03 -4629 8.59200e+03 1.18800e+03 -4630 8.59200e+03 5.96200e+03 -4631 8.59200e+03 6.87500e+03 -4632 8.81600e+03 7.09500e+03 -4633 8.83600e+03 8.75600e+03 -4634 9.10400e+03 8.75600e+03 -4635 9.72800e+03 8.75600e+03 -4636 1.00000e+04 8.75600e+03 -4637 1.02560e+04 8.75600e+03 -4638 1.03520e+04 8.75600e+03 -4639 1.04640e+04 8.75600e+03 -4640 1.06560e+04 8.75600e+03 -4641 1.07360e+04 8.75600e+03 -4642 1.08000e+04 8.75600e+03 -4643 1.09120e+04 8.75600e+03 -4644 1.10400e+04 8.75600e+03 -4645 1.12000e+04 8.75600e+03 -4646 1.13440e+04 8.75600e+03 -4647 1.15040e+04 8.75600e+03 -4648 1.16000e+04 8.75600e+03 -4649 1.17120e+04 8.75600e+03 -4650 1.17920e+04 8.75600e+03 -4651 1.19840e+04 8.75600e+03 -4652 1.21920e+04 8.75600e+03 -4653 1.22720e+04 8.75600e+03 -4654 1.23840e+04 8.75600e+03 -4655 1.25280e+04 8.75600e+03 -4656 1.26560e+04 8.75600e+03 -4657 1.27200e+04 1.14290e+04 -4658 4.91200e+03 2.29900e+03 -4659 5.04000e+03 3.60800e+03 -4660 5.29600e+03 3.60800e+03 -4661 5.66400e+03 3.60800e+03 -4662 5.87200e+03 3.60800e+03 -4663 6.12800e+03 3.60800e+03 -4664 6.19200e+03 3.60800e+03 -4665 6.25600e+03 3.60800e+03 -4666 6.41600e+03 3.60800e+03 -4667 6.56000e+03 3.60800e+03 -4668 6.67200e+03 3.60800e+03 -4669 6.78400e+03 3.60800e+03 -4670 6.89600e+03 3.60800e+03 -4671 7.00800e+03 3.60800e+03 -4672 7.08800e+03 3.60800e+03 -4673 7.18400e+03 3.60800e+03 -4674 7.31200e+03 3.60800e+03 -4675 7.50400e+03 3.60800e+03 -4676 7.66400e+03 3.60800e+03 -4677 7.76000e+03 3.60800e+03 -4678 7.82400e+03 3.60800e+03 -4679 7.88800e+03 3.60800e+03 -4680 7.95200e+03 3.60800e+03 -4681 8.04800e+03 3.60800e+03 -4682 8.20800e+03 3.60800e+03 -4683 8.33600e+03 3.60800e+03 -4684 8.43200e+03 3.60800e+03 -4685 8.49600e+03 3.60800e+03 -4686 8.62400e+03 3.60800e+03 -4687 8.75200e+03 3.60800e+03 -4688 8.84800e+03 3.60800e+03 -4689 8.97600e+03 3.60800e+03 -4690 9.04000e+03 5.96200e+03 -4691 9.04000e+03 6.90800e+03 -4692 9.04000e+03 9.87800e+03 -4693 9.32800e+03 6.71000e+02 -4694 9.32800e+03 1.76000e+03 -4695 9.32800e+03 2.83800e+03 -4696 9.72800e+03 9.72400e+03 -4697 1.00320e+04 9.72400e+03 -4698 1.02560e+04 9.72400e+03 -4699 1.03200e+04 9.72400e+03 -4700 1.04160e+04 9.72400e+03 -4701 1.04800e+04 9.72400e+03 -4702 1.06560e+04 9.72400e+03 -4703 1.07360e+04 9.72400e+03 -4704 1.08000e+04 9.72400e+03 -4705 1.09280e+04 9.72400e+03 -4706 1.10400e+04 9.72400e+03 -4707 1.12160e+04 9.72400e+03 -4708 1.13120e+04 9.72400e+03 -4709 1.14400e+04 9.72400e+03 -4710 1.15200e+04 9.72400e+03 -4711 1.16000e+04 9.72400e+03 -4712 1.17120e+04 9.72400e+03 -4713 1.17920e+04 9.72400e+03 -4714 1.19840e+04 9.72400e+03 -4715 1.20800e+04 9.72400e+03 -4716 1.22080e+04 9.72400e+03 -4717 1.23840e+04 9.72400e+03 -4718 1.25280e+04 9.72400e+03 -4719 1.26560e+04 9.72400e+03 -4720 1.28270e+04 9.72400e+03 -4721 1.28480e+04 1.14290e+04 -4722 1.29440e+04 9.72400e+03 -4723 1.30880e+04 9.72400e+03 -4724 1.32320e+04 9.72400e+03 -4725 1.34030e+04 9.72400e+03 -4726 1.34240e+04 1.60600e+03 -4727 1.34240e+04 2.79400e+03 -4728 1.34240e+04 3.93800e+03 -4729 1.34240e+04 4.92800e+03 -4730 1.34240e+04 7.39200e+03 -4731 1.34240e+04 8.53600e+03 -4732 1.34240e+04 9.17400e+03 -4733 1.68800e+04 1.01200e+03 -4734 1.68800e+04 2.22200e+03 -4735 1.68800e+04 3.85000e+03 -4736 1.68800e+04 5.36800e+03 -4737 1.68800e+04 6.68800e+03 -4738 1.68800e+04 7.87600e+03 -4739 1.68800e+04 1.05600e+04 -4740 1.68800e+04 1.15280e+04 -4741 1.85760e+04 4.03700e+03 -4742 1.85760e+04 8.64600e+03 -4743 1.86560e+04 8.86600e+03 -4744 1.88590e+04 8.86600e+03 -4745 1.89920e+04 1.08460e+04 -4746 1.89920e+04 1.15280e+04 -4747 8.17600e+03 1.18800e+03 -4748 8.17600e+03 4.82900e+03 -4749 8.33600e+03 4.92800e+03 -4750 8.43200e+03 4.92800e+03 -4751 8.49600e+03 4.92800e+03 -4752 8.75200e+03 4.92800e+03 -4753 8.84800e+03 4.92800e+03 -4754 8.99200e+03 4.92800e+03 -4755 9.44000e+03 4.92800e+03 -4756 9.55200e+03 4.92800e+03 -4757 9.68000e+03 4.92800e+03 -4758 9.82400e+03 4.92800e+03 -4759 9.93600e+03 4.92800e+03 -4760 1.00000e+04 4.92800e+03 -4761 1.02240e+04 4.92800e+03 -4762 1.02880e+04 4.92800e+03 -4763 1.03840e+04 4.92800e+03 -4764 1.05120e+04 4.92800e+03 -4765 1.06080e+04 4.92800e+03 -4766 1.07040e+04 4.92800e+03 -4767 1.08000e+04 4.92800e+03 -4768 1.09280e+04 4.92800e+03 -4769 1.10560e+04 4.92800e+03 -4770 1.11200e+04 4.92800e+03 -4771 1.12160e+04 4.92800e+03 -4772 1.13440e+04 4.92800e+03 -4773 1.14880e+04 4.92800e+03 -4774 1.16800e+04 4.92800e+03 -4775 1.17600e+04 4.92800e+03 -4776 1.19040e+04 4.92800e+03 -4777 1.20480e+04 4.92800e+03 -4778 1.21760e+04 4.92800e+03 -4779 1.23360e+04 4.92800e+03 -4780 1.24430e+04 4.92800e+03 -4781 1.24640e+04 5.96200e+03 -4782 1.24640e+04 7.39200e+03 -4783 1.24640e+04 1.14290e+04 -4784 6.00000e+03 1.08020e+04 -4785 6.00000e+03 1.14950e+04 -4786 6.01600e+03 8.62400e+03 -4787 6.03200e+03 3.19000e+02 -4788 6.03200e+03 2.02400e+03 -4789 6.03200e+03 4.04800e+03 -4790 6.03200e+03 5.32400e+03 -4791 7.08800e+03 6.38000e+02 -4792 7.08800e+03 1.51800e+03 -4793 7.08800e+03 2.40900e+03 -4794 7.18400e+03 2.50800e+03 -4795 7.31200e+03 2.50800e+03 -4796 7.50400e+03 2.50800e+03 -4797 7.66400e+03 2.50800e+03 -4798 7.76000e+03 2.50800e+03 -4799 7.82400e+03 2.50800e+03 -4800 7.88800e+03 2.50800e+03 -4801 7.95200e+03 2.50800e+03 -4802 8.04800e+03 2.50800e+03 -4803 8.20800e+03 2.50800e+03 -4804 8.33600e+03 2.50800e+03 -4805 8.43200e+03 2.50800e+03 -4806 8.49600e+03 2.50800e+03 -4807 8.62400e+03 2.50800e+03 -4808 8.75200e+03 2.50800e+03 -4809 8.84800e+03 2.50800e+03 -4810 8.97600e+03 2.50800e+03 -4811 9.04000e+03 2.50800e+03 -4812 9.26400e+03 2.50800e+03 -4813 9.40800e+03 2.50800e+03 -4814 9.68000e+03 2.50800e+03 -4815 9.80800e+03 2.50800e+03 -4816 9.87200e+03 2.50800e+03 -4817 1.00000e+04 2.50800e+03 -4818 1.00960e+04 2.50800e+03 -4819 1.02240e+04 2.50800e+03 -4820 1.02880e+04 2.50800e+03 -4821 1.03840e+04 2.50800e+03 -4822 1.05120e+04 2.50800e+03 -4823 1.05760e+04 2.50800e+03 -4824 1.06400e+04 2.50800e+03 -4825 1.07040e+04 2.50800e+03 -4826 1.08000e+04 2.50800e+03 -4827 1.09280e+04 2.50800e+03 -4828 1.10560e+04 2.50800e+03 -4829 1.11200e+04 2.50800e+03 -4830 1.12160e+04 2.50800e+03 -4831 1.13440e+04 2.50800e+03 -4832 1.14080e+04 4.48800e+03 -4833 1.14080e+04 6.07200e+03 -4834 1.14080e+04 7.39200e+03 -4835 1.14080e+04 1.13850e+04 -4836 1.57600e+04 2.53000e+03 -4837 1.57600e+04 5.36800e+03 -4838 1.57600e+04 6.79800e+03 -4839 1.57600e+04 8.42600e+03 -4840 1.57600e+04 9.87800e+03 -4841 1.57600e+04 1.06260e+04 -4842 1.57600e+04 1.14290e+04 -4843 1.12000e+02 9.21800e+03 -4844 1.12000e+02 1.15280e+04 -4845 2.60000e+02 7.48000e+03 -4846 4.80000e+02 7.48000e+03 -4847 5.60000e+02 7.48000e+03 -4848 7.36000e+02 7.48000e+03 -4849 8.48000e+02 7.48000e+03 -4850 9.12000e+02 7.48000e+03 -4851 9.76000e+02 7.48000e+03 -4852 1.07200e+03 7.48000e+03 -4853 1.15200e+03 7.48000e+03 -4854 1.31200e+03 7.48000e+03 -4855 1.53600e+03 7.48000e+03 -4856 1.64800e+03 7.48000e+03 -4857 1.76000e+03 7.48000e+03 -4858 1.87200e+03 7.48000e+03 -4859 1.98400e+03 7.48000e+03 -4860 2.11200e+03 7.48000e+03 -4861 2.19200e+03 7.48000e+03 -4862 2.28800e+03 7.48000e+03 -4863 2.46400e+03 7.48000e+03 -4864 2.62400e+03 7.48000e+03 -4865 2.73600e+03 7.48000e+03 -4866 2.86400e+03 7.48000e+03 -4867 2.96000e+03 7.48000e+03 -4868 3.02400e+03 7.48000e+03 -4869 3.20000e+03 7.48000e+03 -4870 3.31200e+03 7.48000e+03 -4871 3.41900e+03 7.48000e+03 -4872 3.44000e+03 3.11300e+03 -4873 3.44000e+03 6.86400e+03 -4874 5.61600e+03 1.91400e+03 -4875 5.61600e+03 4.04800e+03 -4876 5.65200e+03 6.33600e+03 -4877 6.09600e+03 6.33600e+03 -4878 6.19200e+03 6.33600e+03 -4879 6.25600e+03 6.33600e+03 -4880 6.41600e+03 6.33600e+03 -4881 6.54400e+03 6.33600e+03 -4882 6.67200e+03 6.33600e+03 -4883 6.76800e+03 6.33600e+03 -4884 6.86400e+03 6.33600e+03 -4885 6.99200e+03 6.33600e+03 -4886 7.08800e+03 6.33600e+03 -4887 7.18400e+03 6.33600e+03 -4888 7.32800e+03 6.33600e+03 -4889 7.61600e+03 6.33600e+03 -4890 7.74400e+03 6.33600e+03 -4891 7.82400e+03 6.33600e+03 -4892 7.88800e+03 6.33600e+03 -4893 8.04800e+03 6.33600e+03 -4894 8.17600e+03 6.33600e+03 -4895 8.43200e+03 6.33600e+03 -4896 8.51200e+03 6.33600e+03 -4897 8.83200e+03 6.33600e+03 -4898 8.99200e+03 6.33600e+03 -4899 9.29600e+03 6.33600e+03 -4900 9.45600e+03 6.33600e+03 -4901 9.55200e+03 6.33600e+03 -4902 9.68000e+03 6.33600e+03 -4903 9.80800e+03 6.33600e+03 -4904 1.00160e+04 6.33600e+03 -4905 1.01390e+04 6.33600e+03 -4906 1.69440e+04 1.01200e+03 -4907 1.69440e+04 2.22200e+03 -4908 1.69440e+04 3.85000e+03 -4909 1.69440e+04 5.36800e+03 -4910 1.69440e+04 6.68800e+03 -4911 1.69440e+04 7.87600e+03 -4912 1.69440e+04 1.05600e+04 -4913 1.69440e+04 1.15280e+04 -4914 9.74400e+03 2.31000e+02 -4915 9.74400e+03 1.01200e+03 -4916 9.74400e+03 1.76000e+03 -4917 9.76400e+03 6.99600e+03 -4918 1.00160e+04 6.99600e+03 -4919 1.01280e+04 6.99600e+03 -4920 1.02240e+04 6.99600e+03 -4921 1.03840e+04 6.99600e+03 -4922 1.04960e+04 6.99600e+03 -4923 1.06560e+04 6.99600e+03 -4924 1.08160e+04 6.99600e+03 -4925 1.09280e+04 6.99600e+03 -4926 1.10400e+04 6.99600e+03 -4927 1.11200e+04 6.99600e+03 -4928 1.12160e+04 6.99600e+03 -4929 1.13280e+04 6.99600e+03 -4930 1.15040e+04 6.99600e+03 -4931 1.15680e+04 6.99600e+03 -4932 1.16320e+04 6.99600e+03 -4933 1.16960e+04 6.99600e+03 -4934 1.17600e+04 6.99600e+03 -4935 1.18240e+04 6.99600e+03 -4936 1.19680e+04 6.99600e+03 -4937 1.21920e+04 6.99600e+03 -4938 1.22720e+04 6.99600e+03 -4939 1.23840e+04 6.99600e+03 -4940 1.25280e+04 6.99600e+03 -4941 1.26560e+04 6.99600e+03 -4942 1.28000e+04 6.99600e+03 -4943 1.28910e+04 6.99600e+03 -4944 1.29120e+04 7.27100e+03 -4945 1.29120e+04 8.53600e+03 -4946 1.29120e+04 9.17400e+03 -4947 1.29120e+04 1.14290e+04 -4948 1.29330e+04 6.77600e+03 -4949 1.30880e+04 6.77600e+03 -4950 1.32800e+04 6.77600e+03 -4951 1.33920e+04 6.77600e+03 -4952 1.34560e+04 6.77600e+03 -4953 1.35200e+04 6.77600e+03 -4954 1.36320e+04 6.77600e+03 -4955 1.37600e+04 6.77600e+03 -4956 1.39200e+04 6.77600e+03 -4957 1.40800e+04 6.77600e+03 -4958 1.41920e+04 6.77600e+03 -4959 1.42670e+04 6.77600e+03 -4960 1.29120e+04 6.90800e+03 -4961 1.42880e+04 2.53000e+03 -4962 1.42880e+04 5.36800e+03 -4963 1.42880e+04 6.63300e+03 -4964 1.39040e+04 1.15280e+04 -4965 1.39200e+04 1.14400e+04 -4966 1.39360e+04 1.15280e+04 -4967 1.39520e+04 1.14400e+04 -4968 1.39680e+04 1.15280e+04 -4969 6.57600e+03 4.29000e+02 -4970 6.57600e+03 1.63900e+03 -4971 6.67200e+03 2.06800e+03 -4972 6.78400e+03 2.06800e+03 -4973 6.89600e+03 2.06800e+03 -4974 7.00800e+03 2.06800e+03 -4975 7.18400e+03 2.06800e+03 -4976 7.31200e+03 2.06800e+03 -4977 7.50400e+03 2.06800e+03 -4978 7.66400e+03 2.06800e+03 -4979 7.76000e+03 2.06800e+03 -4980 7.82400e+03 2.06800e+03 -4981 7.88800e+03 2.06800e+03 -4982 7.95200e+03 2.06800e+03 -4983 8.04800e+03 2.06800e+03 -4984 8.20800e+03 2.06800e+03 -4985 8.33600e+03 2.06800e+03 -4986 8.43200e+03 2.06800e+03 -4987 8.49600e+03 2.06800e+03 -4988 8.56000e+03 2.06800e+03 -4989 8.62400e+03 2.06800e+03 -4990 8.75200e+03 2.06800e+03 -4991 8.84800e+03 2.06800e+03 -4992 8.97600e+03 2.06800e+03 -4993 9.04000e+03 2.06800e+03 -4994 9.26400e+03 2.06800e+03 -4995 9.42400e+03 2.06800e+03 -4996 9.58400e+03 2.06800e+03 -4997 9.68000e+03 2.06800e+03 -4998 9.80800e+03 2.06800e+03 -4999 9.87200e+03 2.06800e+03 -5000 1.00000e+04 2.06800e+03 -5001 1.00960e+04 2.06800e+03 -5002 1.02240e+04 2.06800e+03 -5003 1.02880e+04 2.06800e+03 -5004 1.03840e+04 2.06800e+03 -5005 1.05120e+04 2.06800e+03 -5006 1.05760e+04 2.06800e+03 -5007 1.06400e+04 2.06800e+03 -5008 1.07040e+04 2.06800e+03 -5009 1.08000e+04 2.06800e+03 -5010 1.09280e+04 2.06800e+03 -5011 1.10560e+04 2.06800e+03 -5012 1.11200e+04 2.06800e+03 -5013 1.12270e+04 2.06800e+03 -5014 1.12480e+04 4.48800e+03 -5015 1.12480e+04 7.39200e+03 -5016 1.12480e+04 1.13850e+04 -5017 5.55200e+03 2.17800e+03 -5018 5.55200e+03 4.04800e+03 -5019 5.55200e+03 6.40200e+03 -5020 5.55200e+03 7.40300e+03 -5021 5.64800e+03 7.48000e+03 -5022 5.93600e+03 7.48000e+03 -5023 6.09600e+03 7.48000e+03 -5024 6.19200e+03 7.48000e+03 -5025 6.41600e+03 7.48000e+03 -5026 6.54400e+03 7.48000e+03 -5027 6.67200e+03 7.48000e+03 -5028 6.86400e+03 7.48000e+03 -5029 6.92800e+03 7.48000e+03 -5030 7.04000e+03 7.48000e+03 -5031 7.16800e+03 7.48000e+03 -5032 7.31200e+03 7.48000e+03 -5033 7.60000e+03 7.48000e+03 -5034 7.76000e+03 7.48000e+03 -5035 7.82400e+03 7.48000e+03 -5036 7.88800e+03 7.48000e+03 -5037 8.04800e+03 7.48000e+03 -5038 8.17600e+03 7.48000e+03 -5039 8.27200e+03 7.48000e+03 -5040 8.41600e+03 7.48000e+03 -5041 8.65600e+03 7.48000e+03 -5042 8.84800e+03 7.48000e+03 -5043 9.10400e+03 7.48000e+03 -5044 9.23200e+03 7.48000e+03 -5045 9.61600e+03 7.48000e+03 -5046 9.68000e+03 7.48000e+03 -5047 9.76000e+03 7.48000e+03 -5048 1.00160e+04 7.48000e+03 -5049 1.01280e+04 7.48000e+03 -5050 1.02240e+04 7.62300e+03 -5051 1.01600e+04 2.31000e+02 -5052 1.01600e+04 1.01200e+03 -5053 1.01600e+04 1.76000e+03 -5054 1.02240e+04 5.14800e+03 -5055 1.02880e+04 5.14800e+03 -5056 1.03840e+04 5.14800e+03 -5057 1.05120e+04 5.14800e+03 -5058 1.06080e+04 5.14800e+03 -5059 1.07040e+04 5.14800e+03 -5060 1.08000e+04 5.14800e+03 -5061 1.09280e+04 5.14800e+03 -5062 1.10560e+04 5.14800e+03 -5063 1.11200e+04 5.14800e+03 -5064 1.12160e+04 5.14800e+03 -5065 1.13440e+04 5.14800e+03 -5066 1.14880e+04 5.14800e+03 -5067 1.16800e+04 5.14800e+03 -5068 1.17600e+04 5.14800e+03 -5069 1.19040e+04 5.14800e+03 -5070 1.20480e+04 5.14800e+03 -5071 1.21760e+04 5.14800e+03 -5072 1.23360e+04 5.14800e+03 -5073 1.24320e+04 5.14800e+03 -5074 1.25280e+04 5.14800e+03 -5075 1.26880e+04 5.14800e+03 -5076 1.28000e+04 5.14800e+03 -5077 1.29120e+04 5.14800e+03 -5078 1.31150e+04 5.14800e+03 -5079 1.31360e+04 6.18200e+03 -5080 1.31360e+04 7.28200e+03 -5081 1.31360e+04 8.53600e+03 -5082 1.31360e+04 9.17400e+03 -5083 1.31360e+04 1.14290e+04 -5084 1.33280e+04 4.48800e+03 -5085 1.34560e+04 4.48800e+03 -5086 1.35200e+04 4.48800e+03 -5087 1.36160e+04 4.48800e+03 -5088 1.38720e+04 4.48800e+03 -5089 1.40800e+04 4.48800e+03 -5090 1.42240e+04 4.48800e+03 -5091 1.44000e+04 4.48800e+03 -5092 1.45120e+04 4.48800e+03 -5093 1.47360e+04 4.48800e+03 -5094 1.48110e+04 4.48800e+03 -5095 1.31360e+04 4.84000e+03 -5096 1.48320e+04 2.53000e+03 -5097 1.48320e+04 4.38900e+03 -5098 6.00000e+03 3.19000e+02 -5099 6.00000e+03 2.02400e+03 -5100 6.00000e+03 4.04800e+03 -5101 6.00000e+03 5.32400e+03 -5102 6.00000e+03 8.23900e+03 -5103 6.06400e+03 8.45900e+03 -5104 6.06400e+03 1.08020e+04 -5105 6.06400e+03 1.14950e+04 -5106 1.71680e+04 1.05600e+04 -5107 1.71680e+04 1.15280e+04 -5108 1.72320e+04 1.78200e+03 -5109 1.72320e+04 4.09200e+03 -5110 1.72320e+04 6.68800e+03 -5111 1.72320e+04 7.72200e+03 -5112 4.68800e+03 2.50800e+03 -5113 4.68800e+03 5.32400e+03 -5114 4.68800e+03 7.71100e+03 -5115 4.75200e+03 8.86600e+03 -5116 4.75200e+03 1.14950e+04 -5117 1.72320e+04 1.05600e+04 -5118 1.72320e+04 1.15280e+04 -5119 1.72640e+04 8.84400e+03 -5120 1.72960e+04 1.78200e+03 -5121 1.72960e+04 4.09200e+03 -5122 1.72960e+04 6.68800e+03 -5123 1.72960e+04 7.72200e+03 -5124 1.72960e+04 8.59100e+03 -5125 1.04160e+04 2.31000e+02 -5126 1.04160e+04 1.01200e+03 -5127 1.04160e+04 1.76000e+03 -5128 1.04160e+04 7.39200e+03 -5129 3.63200e+03 3.11300e+03 -5130 3.63200e+03 7.13900e+03 -5131 3.69600e+03 7.48000e+03 -5132 3.80800e+03 7.48000e+03 -5133 3.88800e+03 7.48000e+03 -5134 3.95200e+03 7.48000e+03 -5135 4.09600e+03 7.48000e+03 -5136 4.17600e+03 7.48000e+03 -5137 4.25600e+03 7.48000e+03 -5138 4.33600e+03 7.48000e+03 -5139 4.43200e+03 7.48000e+03 -5140 4.49600e+03 7.48000e+03 -5141 4.63500e+03 7.48000e+03 -5142 4.65600e+03 7.68900e+03 -5143 4.65600e+03 8.86600e+03 -5144 4.65600e+03 1.14950e+04 -5145 1.05760e+04 2.31000e+02 -5146 1.05760e+04 1.02300e+03 -5147 1.06400e+04 1.23200e+03 -5148 1.07040e+04 1.23200e+03 -5149 1.08000e+04 1.23200e+03 -5150 1.09280e+04 1.23200e+03 -5151 1.10560e+04 1.23200e+03 -5152 1.11200e+04 1.23200e+03 -5153 1.12160e+04 1.23200e+03 -5154 1.13440e+04 1.23200e+03 -5155 1.14880e+04 1.23200e+03 -5156 1.16960e+04 1.23200e+03 -5157 1.17600e+04 1.23200e+03 -5158 1.19040e+04 1.23200e+03 -5159 1.20480e+04 1.23200e+03 -5160 1.21760e+04 1.23200e+03 -5161 1.23360e+04 1.23200e+03 -5162 1.24320e+04 1.23200e+03 -5163 1.25280e+04 1.23200e+03 -5164 1.26880e+04 1.23200e+03 -5165 1.28160e+04 1.23200e+03 -5166 1.29440e+04 1.23200e+03 -5167 1.31200e+04 1.23200e+03 -5168 1.32000e+04 1.48500e+03 -5169 1.32000e+04 2.31000e+03 -5170 1.32000e+04 3.12400e+03 -5171 1.32000e+04 3.93800e+03 -5172 1.32000e+04 4.92800e+03 -5173 1.32000e+04 7.28200e+03 -5174 1.32000e+04 8.53600e+03 -5175 1.32000e+04 9.17400e+03 -5176 1.32000e+04 1.14290e+04 -5177 1.33440e+04 1.23200e+03 -5178 1.34880e+04 1.23200e+03 -5179 1.36320e+04 1.23200e+03 -5180 1.38720e+04 1.23200e+03 -5181 1.40960e+04 1.23200e+03 -5182 1.42240e+04 1.23200e+03 -5183 1.44000e+04 1.23200e+03 -5184 1.45120e+04 1.23200e+03 -5185 1.47360e+04 1.23200e+03 -5186 1.48000e+04 1.23200e+03 -5187 1.49120e+04 1.23200e+03 -5188 1.51200e+04 1.23200e+03 -5189 1.53280e+04 1.23200e+03 -5190 1.54080e+04 1.23200e+03 -5191 1.54720e+04 1.23200e+03 -5192 1.56000e+04 1.23200e+03 -5193 1.21440e+04 1.11650e+04 -5194 1.22080e+04 9.50400e+03 -5195 1.23840e+04 9.50400e+03 -5196 1.25280e+04 9.50400e+03 -5197 1.26560e+04 9.50400e+03 -5198 1.28320e+04 9.50400e+03 -5199 1.29440e+04 9.50400e+03 -5200 1.30880e+04 9.50400e+03 -5201 1.32320e+04 9.50400e+03 -5202 1.33920e+04 9.50400e+03 -5203 1.35360e+04 9.50400e+03 -5204 1.36320e+04 9.50400e+03 -5205 1.37440e+04 9.50400e+03 -5206 1.39680e+04 9.50400e+03 -5207 1.41920e+04 9.50400e+03 -5208 1.42720e+04 9.50400e+03 -5209 1.43840e+04 9.50400e+03 -5210 1.44480e+04 9.50400e+03 -5211 1.47040e+04 9.50400e+03 -5212 1.47840e+04 9.50400e+03 -5213 1.51200e+04 9.50400e+03 -5214 1.53920e+04 9.50400e+03 -5215 1.55200e+04 9.50400e+03 -5216 1.57120e+04 9.50400e+03 -5217 1.57920e+04 9.50400e+03 -5218 1.58560e+04 9.50400e+03 -5219 1.59840e+04 9.50400e+03 -5220 1.60800e+04 9.50400e+03 -5221 1.62080e+04 9.50400e+03 -5222 1.64320e+04 9.50400e+03 -5223 1.64960e+04 9.50400e+03 -5224 1.65920e+04 9.50400e+03 -5225 1.66880e+04 9.50400e+03 -5226 1.67840e+04 9.50400e+03 -5227 1.69120e+04 9.50400e+03 -5228 1.70400e+04 9.50400e+03 -5229 1.71360e+04 9.50400e+03 -5230 1.72800e+04 9.50400e+03 -5231 1.73600e+04 1.78200e+03 -5232 1.73600e+04 4.09200e+03 -5233 1.73600e+04 6.68800e+03 -5234 1.73600e+04 7.72200e+03 -5235 1.73600e+04 8.58000e+03 -5236 1.09920e+04 2.31000e+02 -5237 1.09920e+04 9.02000e+02 -5238 1.09920e+04 1.76000e+03 -5239 1.09920e+04 4.48800e+03 -5240 1.09920e+04 7.39200e+03 -5241 1.10280e+04 1.02520e+04 -5242 1.12160e+04 1.02520e+04 -5243 1.13120e+04 1.02520e+04 -5244 1.14400e+04 1.02520e+04 -5245 1.15200e+04 1.02520e+04 -5246 1.16000e+04 1.02520e+04 -5247 1.17120e+04 1.02520e+04 -5248 1.17920e+04 1.02520e+04 -5249 1.19840e+04 1.02520e+04 -5250 1.20800e+04 1.02520e+04 -5251 1.22080e+04 1.02520e+04 -5252 1.23840e+04 1.02520e+04 -5253 1.25280e+04 1.02520e+04 -5254 1.26560e+04 1.02520e+04 -5255 1.28160e+04 1.02520e+04 -5256 1.29440e+04 1.02520e+04 -5257 1.30880e+04 1.02520e+04 -5258 1.32320e+04 1.02520e+04 -5259 1.34030e+04 1.02520e+04 -5260 1.34240e+04 1.14290e+04 -5261 1.35360e+04 1.02520e+04 -5262 1.36960e+04 1.02520e+04 -5263 1.39680e+04 1.02520e+04 -5264 1.41920e+04 1.02520e+04 -5265 1.42720e+04 1.02520e+04 -5266 1.43840e+04 1.02520e+04 -5267 1.44480e+04 1.02520e+04 -5268 1.47040e+04 1.02520e+04 -5269 1.47840e+04 1.02520e+04 -5270 1.51200e+04 1.02520e+04 -5271 1.53920e+04 1.02520e+04 -5272 1.55200e+04 1.02520e+04 -5273 1.57120e+04 1.02520e+04 -5274 1.57920e+04 1.02520e+04 -5275 1.58560e+04 1.02520e+04 -5276 1.60480e+04 1.02520e+04 -5277 1.62190e+04 1.02520e+04 -5278 1.62400e+04 2.22200e+03 -5279 1.62400e+04 3.74000e+03 -5280 1.62400e+04 5.36800e+03 -5281 1.62400e+04 6.79800e+03 -5282 1.62400e+04 7.76600e+03 -5283 1.04480e+04 2.31000e+02 -5284 1.04480e+04 1.01200e+03 -5285 1.04480e+04 1.76000e+03 -5286 1.04480e+04 7.39200e+03 -5287 5.71200e+03 8.45900e+03 -5288 5.71200e+03 1.08020e+04 -5289 5.72800e+03 8.31600e+03 -5290 5.74400e+03 2.02400e+03 -5291 5.74400e+03 4.04800e+03 -5292 5.74400e+03 8.23900e+03 -5293 1.74240e+04 1.78200e+03 -5294 1.74240e+04 4.09200e+03 -5295 1.74240e+04 6.69900e+03 -5296 1.75040e+04 7.12800e+03 -5297 1.77120e+04 7.12800e+03 -5298 1.78080e+04 7.76600e+03 -5299 1.78080e+04 8.73400e+03 -5300 1.78080e+04 9.60300e+03 -5301 1.78080e+04 1.06700e+04 -5302 9.52000e+03 7.12800e+03 -5303 9.53600e+03 3.60800e+03 -5304 9.55200e+03 2.31000e+02 -5305 9.55200e+03 1.01200e+03 -5306 9.55200e+03 1.76000e+03 -5307 1.73280e+04 1.78200e+03 -5308 1.73280e+04 4.09200e+03 -5309 1.73280e+04 6.68800e+03 -5310 1.73280e+04 7.72200e+03 -5311 1.73280e+04 8.58000e+03 -5312 1.73280e+04 1.06700e+04 -5313 1.73280e+04 1.15280e+04 -5314 1.90880e+04 1.15280e+04 -5315 1.14080e+04 2.31000e+02 -5316 1.14080e+04 9.02000e+02 -5317 1.14880e+04 1.98000e+03 -5318 1.16960e+04 1.98000e+03 -5319 1.17600e+04 1.98000e+03 -5320 1.19040e+04 1.98000e+03 -5321 1.20480e+04 1.98000e+03 -5322 1.21760e+04 1.98000e+03 -5323 1.23360e+04 1.98000e+03 -5324 1.24320e+04 1.98000e+03 -5325 1.25280e+04 1.98000e+03 -5326 1.26880e+04 1.98000e+03 -5327 1.28160e+04 1.98000e+03 -5328 1.29440e+04 1.98000e+03 -5329 1.31200e+04 1.98000e+03 -5330 1.33440e+04 1.98000e+03 -5331 1.34670e+04 1.98000e+03 -5332 1.34880e+04 2.67300e+03 -5333 1.34880e+04 3.93800e+03 -5334 1.34880e+04 4.92800e+03 -5335 1.34880e+04 7.28200e+03 -5336 1.34880e+04 8.53600e+03 -5337 1.34880e+04 9.17400e+03 -5338 1.34880e+04 1.14290e+04 -5339 1.35090e+04 1.45200e+03 -5340 1.36320e+04 1.45200e+03 -5341 1.38720e+04 1.45200e+03 -5342 1.40960e+04 1.45200e+03 -5343 1.42240e+04 1.45200e+03 -5344 1.44000e+04 1.45200e+03 -5345 1.45120e+04 1.45200e+03 -5346 1.47360e+04 1.45200e+03 -5347 1.48000e+04 1.45200e+03 -5348 1.49120e+04 1.45200e+03 -5349 1.51200e+04 1.45200e+03 -5350 1.53280e+04 1.45200e+03 -5351 1.54080e+04 1.45200e+03 -5352 1.54720e+04 1.45200e+03 -5353 1.56000e+04 1.45200e+03 -5354 1.57120e+04 1.45200e+03 -5355 1.57920e+04 1.45200e+03 -5356 1.58880e+04 1.45200e+03 -5357 1.59840e+04 1.45200e+03 -5358 1.61280e+04 1.45200e+03 -5359 1.62720e+04 1.45200e+03 -5360 1.64000e+04 1.45200e+03 -5361 1.65440e+04 1.45200e+03 -5362 1.66560e+04 1.45200e+03 -5363 1.67520e+04 1.45200e+03 -5364 1.69120e+04 1.45200e+03 -5365 1.70400e+04 1.45200e+03 -5366 1.34880e+04 1.73800e+03 -5367 1.71040e+04 1.13300e+03 -5368 1.11200e+04 1.13850e+04 -5369 1.11840e+04 2.31000e+02 -5370 1.11840e+04 9.02000e+02 -5371 1.11840e+04 1.76000e+03 -5372 1.11840e+04 4.48800e+03 -5373 1.11840e+04 7.39200e+03 -5374 5.68000e+03 8.38200e+03 -5375 5.68000e+03 1.08020e+04 -5376 5.69600e+03 7.70000e+03 -5377 5.71200e+03 2.02400e+03 -5378 5.71200e+03 4.04800e+03 -5379 4.30400e+03 2.36500e+03 -5380 4.30400e+03 5.43400e+03 -5381 4.30400e+03 6.90800e+03 -5382 4.30400e+03 7.81000e+03 -5383 2.12800e+03 1.00320e+04 -5384 2.14400e+03 8.93200e+03 -5385 2.16000e+03 3.11300e+03 -5386 2.16000e+03 6.64400e+03 -5387 2.16000e+03 8.78900e+03 -5388 5.42400e+03 7.18300e+03 -5389 5.42400e+03 1.06920e+04 -5390 5.44000e+03 6.99600e+03 -5391 5.45600e+03 2.17800e+03 -5392 5.45600e+03 4.04800e+03 -5393 5.45600e+03 6.40200e+03 -5394 1.11520e+04 2.31000e+02 -5395 1.11520e+04 9.02000e+02 -5396 1.11520e+04 1.76000e+03 -5397 1.11520e+04 4.48800e+03 -5398 1.11520e+04 7.39200e+03 -5399 1.11520e+04 1.13850e+04 -5400 1.56320e+04 2.53000e+03 -5401 1.56320e+04 5.36800e+03 -5402 1.56320e+04 6.79800e+03 -5403 1.56320e+04 8.42600e+03 -5404 1.56320e+04 9.87800e+03 -5405 1.56320e+04 1.06260e+04 -5406 1.56320e+04 1.14290e+04 -5407 1.61760e+04 2.22200e+03 -5408 1.61760e+04 3.74000e+03 -5409 1.61760e+04 5.36800e+03 -5410 1.61760e+04 6.79800e+03 -5411 1.61760e+04 7.76600e+03 -5412 1.61760e+04 8.73400e+03 -5413 1.61760e+04 1.06260e+04 -5414 1.61760e+04 1.14290e+04 -5415 5.39200e+03 7.19400e+03 -5416 5.39200e+03 1.06920e+04 -5417 5.40800e+03 6.55600e+03 -5418 5.42400e+03 2.17800e+03 -5419 5.42400e+03 4.04800e+03 -5420 5.42400e+03 6.41300e+03 -5421 4.46400e+03 2.57400e+03 -5422 4.46400e+03 5.43400e+03 -5423 4.46400e+03 7.92000e+03 -5424 4.52800e+03 1.06920e+04 -5425 4.62400e+03 1.06920e+04 -5426 4.68800e+03 1.06920e+04 -5427 4.78400e+03 1.06920e+04 -5428 4.94400e+03 1.06920e+04 -5429 5.07200e+03 1.07910e+04 -5430 5.07200e+03 1.14950e+04 -5431 1.83520e+04 3.61900e+03 -5432 1.83520e+04 7.88700e+03 -5433 1.83720e+04 8.18400e+03 -5434 1.84640e+04 8.18400e+03 -5435 1.86670e+04 8.18400e+03 -5436 1.87040e+04 8.40400e+03 -5437 1.87040e+04 1.06700e+04 -5438 1.87040e+04 1.15280e+04 -5439 4.52800e+03 2.57400e+03 -5440 4.52800e+03 5.43400e+03 -5441 4.52800e+03 7.93100e+03 -5442 4.62400e+03 8.14000e+03 -5443 4.68800e+03 8.14000e+03 -5444 4.78400e+03 8.14000e+03 -5445 4.94400e+03 8.14000e+03 -5446 5.13600e+03 8.14000e+03 -5447 5.48800e+03 8.37100e+03 -5448 5.48800e+03 1.06920e+04 -5449 1.68000e+03 1.00320e+04 -5450 1.70000e+03 8.93200e+03 -5451 1.77600e+03 8.93200e+03 -5452 1.88300e+03 8.93200e+03 -5453 1.90400e+03 3.11300e+03 -5454 1.90400e+03 6.75400e+03 -5455 1.90400e+03 8.05200e+03 -5456 1.90400e+03 8.78900e+03 -5457 1.91200e+04 1.15280e+04 -5458 1.91220e+04 8.03000e+03 -5459 1.82560e+04 3.45400e+03 -5460 1.82560e+04 6.95200e+03 -5461 1.82720e+04 7.12800e+03 -5462 1.82880e+04 7.87600e+03 -5463 1.82880e+04 9.42700e+03 -5464 1.82880e+04 1.06700e+04 -5465 4.75200e+03 2.61800e+03 -5466 4.75200e+03 5.22500e+03 -5467 4.77200e+03 5.36800e+03 -5468 4.84800e+03 5.36800e+03 -5469 4.91200e+03 5.36800e+03 -5470 5.04000e+03 5.36800e+03 -5471 5.29600e+03 5.36800e+03 -5472 5.66400e+03 5.36800e+03 -5473 5.90400e+03 5.46700e+03 -5474 5.90400e+03 8.38200e+03 -5475 5.90400e+03 1.08020e+04 -5476 1.26400e+03 6.78700e+03 -5477 1.26400e+03 7.83200e+03 -5478 1.26400e+03 9.65800e+03 -5479 1.28400e+03 6.55600e+03 -5480 1.45600e+03 6.55600e+03 -5481 1.55200e+03 6.55600e+03 -5482 1.64800e+03 6.55600e+03 -5483 1.76000e+03 6.55600e+03 -5484 1.84000e+03 3.11300e+03 -5485 1.78720e+04 9.60300e+03 -5486 1.78720e+04 1.06700e+04 -5487 1.79520e+04 8.84400e+03 -5488 1.82240e+04 3.61900e+03 -5489 1.82240e+04 7.76600e+03 -5490 4.81600e+03 2.61800e+03 -5491 4.81600e+03 6.40200e+03 -5492 4.81600e+03 7.70000e+03 -5493 4.81600e+03 8.72300e+03 -5494 4.94400e+03 8.84400e+03 -5495 5.13600e+03 8.84400e+03 -5496 5.55200e+03 8.84400e+03 -5497 5.63200e+03 8.84400e+03 -5498 5.79200e+03 8.84400e+03 -5499 5.96800e+03 8.84400e+03 -5500 6.03200e+03 8.84400e+03 -5501 6.11200e+03 8.84400e+03 -5502 6.19200e+03 8.84400e+03 -5503 6.32000e+03 1.14950e+04 -5504 8.48000e+02 9.92200e+03 -5505 9.12000e+02 8.18400e+03 -5506 9.76000e+02 8.18400e+03 -5507 1.10400e+03 8.18400e+03 -5508 1.23200e+03 8.18400e+03 -5509 1.32800e+03 8.18400e+03 -5510 1.53600e+03 8.18400e+03 -5511 1.61600e+03 3.11300e+03 -5512 1.61600e+03 7.01800e+03 -5513 1.61600e+03 8.06300e+03 -5514 1.78400e+04 8.72300e+03 -5515 1.78400e+04 9.60300e+03 -5516 1.78400e+04 1.06700e+04 -5517 1.78600e+04 8.62400e+03 -5518 1.79360e+04 2.31000e+02 -5519 1.79360e+04 1.62800e+03 -5520 1.79360e+04 4.79600e+03 -5521 1.79360e+04 7.76600e+03 -5522 1.80000e+04 2.31000e+02 -5523 1.80000e+04 1.59500e+03 -5524 1.80160e+04 2.37600e+03 -5525 1.80320e+04 4.52100e+03 -5526 1.80320e+04 7.76600e+03 -5527 1.80320e+04 1.06700e+04 -5528 1.74240e+04 8.61300e+03 -5529 1.74240e+04 9.60300e+03 -5530 1.74240e+04 1.06700e+04 -5531 1.74240e+04 1.15280e+04 -5532 1.74880e+04 8.40400e+03 -5533 1.75520e+04 8.40400e+03 -5534 1.77120e+04 8.40400e+03 -5535 1.78560e+04 8.40400e+03 -5536 1.79680e+04 8.40400e+03 -5537 1.81920e+04 8.40400e+03 -5538 1.83680e+04 8.40400e+03 -5539 1.84640e+04 8.40400e+03 -5540 1.85440e+04 4.03700e+03 -5541 4.32000e+02 9.70200e+03 -5542 4.68000e+02 7.26000e+03 -5543 5.60000e+02 7.26000e+03 -5544 7.36000e+02 7.26000e+03 -5545 8.48000e+02 7.26000e+03 -5546 9.12000e+02 7.26000e+03 -5547 9.76000e+02 7.26000e+03 -5548 1.07200e+03 7.26000e+03 -5549 1.15200e+03 7.26000e+03 -5550 1.31200e+03 7.26000e+03 -5551 1.52000e+03 3.11300e+03 -5552 1.52000e+03 7.02900e+03 -5553 1.12480e+04 2.31000e+02 -5554 1.12480e+04 9.02000e+02 -5555 1.13440e+04 1.76000e+03 -5556 1.14880e+04 1.76000e+03 -5557 1.16960e+04 1.76000e+03 -5558 1.17600e+04 1.76000e+03 -5559 1.19040e+04 1.76000e+03 -5560 1.20480e+04 1.76000e+03 -5561 1.21760e+04 1.76000e+03 -5562 1.23040e+04 4.48800e+03 -5563 1.23040e+04 5.96200e+03 -5564 1.23040e+04 7.39200e+03 -5565 1.23040e+04 1.11650e+04 -5566 1.81600e+04 3.61900e+03 -5567 1.81600e+04 7.76600e+03 -5568 1.81600e+04 1.06700e+04 -5569 1.80960e+04 2.31000e+02 -5570 1.80960e+04 3.74000e+03 -5571 1.80960e+04 7.76600e+03 -5572 1.80960e+04 1.06700e+04 -5573 1.10880e+04 2.31000e+02 -5574 1.10880e+04 9.02000e+02 -5575 1.10880e+04 1.76000e+03 -5576 1.10880e+04 4.48800e+03 -5577 1.11080e+04 5.36800e+03 -5578 1.12160e+04 5.36800e+03 -5579 1.13440e+04 5.36800e+03 -5580 1.14880e+04 5.36800e+03 -5581 1.16800e+04 5.36800e+03 -5582 1.17600e+04 5.36800e+03 -5583 1.19040e+04 5.36800e+03 -5584 1.20480e+04 5.36800e+03 -5585 1.21760e+04 5.36800e+03 -5586 1.23360e+04 5.36800e+03 -5587 1.24320e+04 5.36800e+03 -5588 1.25280e+04 5.36800e+03 -5589 1.26880e+04 5.36800e+03 -5590 1.28000e+04 5.36800e+03 -5591 1.29120e+04 5.36800e+03 -5592 1.31040e+04 5.36800e+03 -5593 1.33280e+04 5.36800e+03 -5594 1.34560e+04 5.36800e+03 -5595 1.35200e+04 5.36800e+03 -5596 1.35840e+04 5.46700e+03 -5597 1.35840e+04 7.28200e+03 -5598 1.35840e+04 8.86600e+03 -5599 1.35840e+04 1.15390e+04 -5600 1.06720e+04 2.31000e+02 -5601 1.06720e+04 9.02000e+02 -5602 1.06720e+04 1.76000e+03 -5603 1.08000e+04 5.58800e+03 -5604 1.09280e+04 5.58800e+03 -5605 1.10880e+04 5.58800e+03 -5606 1.12160e+04 5.58800e+03 -5607 1.13440e+04 5.58800e+03 -5608 1.14880e+04 5.58800e+03 -5609 1.16800e+04 5.58800e+03 -5610 1.17600e+04 5.58800e+03 -5611 1.19040e+04 5.58800e+03 -5612 1.20480e+04 5.58800e+03 -5613 1.21760e+04 5.58800e+03 -5614 1.23360e+04 5.58800e+03 -5615 1.24320e+04 5.58800e+03 -5616 1.25280e+04 5.58800e+03 -5617 1.26880e+04 5.58800e+03 -5618 1.28000e+04 5.58800e+03 -5619 1.29120e+04 5.58800e+03 -5620 1.31040e+04 5.58800e+03 -5621 1.33280e+04 6.40200e+03 -5622 1.33280e+04 7.39200e+03 -5623 1.33280e+04 8.53600e+03 -5624 1.33280e+04 9.17400e+03 -5625 1.33280e+04 1.14290e+04 -5626 3.79200e+03 2.90400e+03 -5627 3.79200e+03 5.85200e+03 -5628 3.81300e+03 6.02800e+03 -5629 3.88800e+03 6.02800e+03 -5630 3.95200e+03 6.02800e+03 -5631 4.09600e+03 6.02800e+03 -5632 4.17600e+03 6.02800e+03 -5633 4.25600e+03 6.02800e+03 -5634 4.43200e+03 6.02800e+03 -5635 4.49600e+03 6.02800e+03 -5636 4.56000e+03 6.02800e+03 -5637 4.64000e+03 6.02800e+03 -5638 4.75200e+03 6.02800e+03 -5639 4.84800e+03 6.02800e+03 -5640 4.91200e+03 6.02800e+03 -5641 5.04000e+03 6.02800e+03 -5642 5.32800e+03 6.02800e+03 -5643 5.66400e+03 6.02800e+03 -5644 6.09600e+03 6.02800e+03 -5645 6.19200e+03 6.02800e+03 -5646 6.25600e+03 6.02800e+03 -5647 6.41600e+03 6.02800e+03 -5648 6.55500e+03 6.02800e+03 -5649 6.57600e+03 8.64600e+03 -5650 6.57600e+03 9.43800e+03 -5651 6.57600e+03 1.14950e+04 -5652 4.04800e+03 2.95900e+03 -5653 4.04800e+03 6.90800e+03 -5654 4.12800e+03 1.00320e+04 -5655 4.27200e+03 1.00320e+04 -5656 4.40000e+03 1.00320e+04 -5657 4.52800e+03 1.00320e+04 -5658 4.62400e+03 1.00320e+04 -5659 4.68800e+03 1.00320e+04 -5660 4.78400e+03 1.00320e+04 -5661 4.94400e+03 1.00320e+04 -5662 5.00800e+03 1.00320e+04 -5663 5.13600e+03 1.00320e+04 -5664 5.26400e+03 1.00320e+04 -5665 5.55200e+03 1.00320e+04 -5666 5.63200e+03 1.00320e+04 -5667 5.80800e+03 1.00320e+04 -5668 5.96800e+03 1.00320e+04 -5669 6.03200e+03 1.00320e+04 -5670 6.11200e+03 1.00320e+04 -5671 6.19200e+03 1.00320e+04 -5672 6.35200e+03 1.00320e+04 -5673 6.44800e+03 1.00320e+04 -5674 6.67200e+03 1.00320e+04 -5675 6.84800e+03 1.00320e+04 -5676 6.92800e+03 1.08020e+04 -5677 4.40000e+03 2.36500e+03 -5678 4.40000e+03 5.43400e+03 -5679 4.40000e+03 7.81000e+03 -5680 4.52800e+03 9.59200e+03 -5681 4.62400e+03 9.59200e+03 -5682 4.68800e+03 9.59200e+03 -5683 4.78400e+03 9.59200e+03 -5684 4.96000e+03 9.59200e+03 -5685 5.13600e+03 9.59200e+03 -5686 5.55200e+03 9.59200e+03 -5687 5.63200e+03 9.59200e+03 -5688 5.80800e+03 9.59200e+03 -5689 5.96800e+03 9.59200e+03 -5690 6.03200e+03 9.59200e+03 -5691 6.11200e+03 9.59200e+03 -5692 6.19200e+03 9.59200e+03 -5693 6.35200e+03 9.59200e+03 -5694 6.41600e+03 1.14950e+04 -5695 1.02560e+04 2.31000e+02 -5696 1.02560e+04 1.01200e+03 -5697 1.02560e+04 1.76000e+03 -5698 1.02560e+04 7.51300e+03 -5699 1.03840e+04 7.78800e+03 -5700 1.04960e+04 7.78800e+03 -5701 1.06560e+04 7.78800e+03 -5702 1.08160e+04 7.78800e+03 -5703 1.09280e+04 7.78800e+03 -5704 1.10400e+04 7.78800e+03 -5705 1.11200e+04 7.78800e+03 -5706 1.12160e+04 7.78800e+03 -5707 1.13280e+04 7.78800e+03 -5708 1.15040e+04 7.78800e+03 -5709 1.15680e+04 7.78800e+03 -5710 1.16320e+04 7.78800e+03 -5711 1.16960e+04 7.78800e+03 -5712 1.17600e+04 7.78800e+03 -5713 1.18240e+04 7.78800e+03 -5714 1.19680e+04 7.78800e+03 -5715 1.21920e+04 7.78800e+03 -5716 1.22720e+04 7.78800e+03 -5717 1.23840e+04 7.78800e+03 -5718 1.25280e+04 7.78800e+03 -5719 1.26560e+04 7.78800e+03 -5720 1.28000e+04 7.78800e+03 -5721 1.28800e+04 7.78800e+03 -5722 1.29440e+04 7.78800e+03 -5723 1.30880e+04 7.78800e+03 -5724 1.32750e+04 7.78800e+03 -5725 1.32960e+04 8.53600e+03 -5726 1.32960e+04 9.17400e+03 -5727 1.32960e+04 1.14290e+04 -5728 9.84000e+03 2.31000e+02 -5729 9.84000e+03 1.01200e+03 -5730 9.84000e+03 1.76000e+03 -5731 9.86000e+03 3.16800e+03 -5732 1.00000e+04 3.16800e+03 -5733 1.00960e+04 3.16800e+03 -5734 1.02240e+04 3.16800e+03 -5735 1.02880e+04 3.16800e+03 -5736 1.03840e+04 3.16800e+03 -5737 1.05120e+04 3.16800e+03 -5738 1.05760e+04 3.16800e+03 -5739 1.06400e+04 3.16800e+03 -5740 1.07040e+04 3.16800e+03 -5741 1.08000e+04 3.16800e+03 -5742 1.09280e+04 3.16800e+03 -5743 1.10560e+04 3.16800e+03 -5744 1.11200e+04 3.16800e+03 -5745 1.12160e+04 3.16800e+03 -5746 1.13440e+04 3.16800e+03 -5747 1.14880e+04 3.16800e+03 -5748 1.16960e+04 3.16800e+03 -5749 1.17600e+04 3.16800e+03 -5750 1.19040e+04 3.16800e+03 -5751 1.20480e+04 3.16800e+03 -5752 1.21760e+04 3.16800e+03 -5753 1.23360e+04 3.16800e+03 -5754 1.24320e+04 3.16800e+03 -5755 1.25440e+04 3.16800e+03 -5756 1.26880e+04 3.16800e+03 -5757 1.27520e+04 3.16800e+03 -5758 1.28160e+04 3.16800e+03 -5759 1.29280e+04 3.16800e+03 -5760 1.30400e+04 3.26700e+03 -5761 1.30400e+04 3.93800e+03 -5762 1.30400e+04 4.70800e+03 -5763 1.30400e+04 6.07200e+03 -5764 1.30400e+04 7.28200e+03 -5765 1.30400e+04 8.53600e+03 -5766 1.30400e+04 9.17400e+03 -5767 1.30400e+04 1.14290e+04 -5768 4.08000e+03 2.31000e+03 -5769 4.08000e+03 4.66400e+03 -5770 4.10100e+03 4.84000e+03 -5771 4.17600e+03 4.84000e+03 -5772 4.25600e+03 4.84000e+03 -5773 4.43200e+03 4.84000e+03 -5774 4.49600e+03 4.84000e+03 -5775 4.56000e+03 4.84000e+03 -5776 4.65600e+03 4.84000e+03 -5777 4.72000e+03 4.84000e+03 -5778 4.78400e+03 4.84000e+03 -5779 4.84800e+03 4.84000e+03 -5780 4.91200e+03 4.84000e+03 -5781 5.04000e+03 4.84000e+03 -5782 5.29600e+03 4.84000e+03 -5783 5.66400e+03 4.84000e+03 -5784 5.87200e+03 4.84000e+03 -5785 6.12800e+03 4.84000e+03 -5786 6.19200e+03 4.84000e+03 -5787 6.25600e+03 4.84000e+03 -5788 6.41600e+03 4.84000e+03 -5789 6.56000e+03 4.84000e+03 -5790 6.67200e+03 4.84000e+03 -5791 6.78400e+03 4.84000e+03 -5792 6.89600e+03 4.84000e+03 -5793 7.00800e+03 4.84000e+03 -5794 7.08800e+03 4.84000e+03 -5795 7.18400e+03 4.84000e+03 -5796 7.28000e+03 4.98300e+03 -5797 7.28000e+03 7.12800e+03 -5798 7.28000e+03 8.75600e+03 -5799 7.28000e+03 1.08020e+04 -5800 4.33600e+03 2.36500e+03 -5801 4.33600e+03 5.43400e+03 -5802 4.43200e+03 6.77600e+03 -5803 4.49600e+03 6.77600e+03 -5804 4.64000e+03 6.77600e+03 -5805 4.76800e+03 6.77600e+03 -5806 4.84800e+03 6.77600e+03 -5807 4.91200e+03 6.77600e+03 -5808 5.04000e+03 6.77600e+03 -5809 5.42400e+03 6.77600e+03 -5810 5.64800e+03 6.77600e+03 -5811 5.93600e+03 6.77600e+03 -5812 6.09600e+03 6.77600e+03 -5813 6.19200e+03 6.77600e+03 -5814 6.41600e+03 6.77600e+03 -5815 6.54400e+03 6.77600e+03 -5816 6.67200e+03 6.77600e+03 -5817 6.76800e+03 6.77600e+03 -5818 6.86400e+03 6.77600e+03 -5819 6.99200e+03 6.77600e+03 -5820 7.08800e+03 6.77600e+03 -5821 7.18400e+03 6.77600e+03 -5822 7.32800e+03 6.77600e+03 -5823 7.61100e+03 6.77600e+03 -5824 7.63200e+03 6.89700e+03 -5825 7.63200e+03 8.75600e+03 -5826 1.80640e+04 2.31000e+02 -5827 1.80640e+04 3.74000e+03 -5828 1.80640e+04 7.76600e+03 -5829 1.80640e+04 1.06700e+04 -5830 6.96000e+03 6.38000e+02 -5831 6.96000e+03 1.51800e+03 -5832 6.96000e+03 2.57400e+03 -5833 6.96000e+03 4.04800e+03 -5834 6.99600e+03 5.58800e+03 -5835 7.08800e+03 5.58800e+03 -5836 7.18400e+03 5.58800e+03 -5837 7.32800e+03 5.58800e+03 -5838 7.58400e+03 5.58800e+03 -5839 7.66400e+03 5.58800e+03 -5840 7.76000e+03 5.58800e+03 -5841 7.82400e+03 5.58800e+03 -5842 7.88800e+03 5.58800e+03 -5843 7.95200e+03 5.58800e+03 -5844 8.04800e+03 5.58800e+03 -5845 8.17600e+03 5.58800e+03 -5846 8.33600e+03 5.58800e+03 -5847 8.43200e+03 5.58800e+03 -5848 8.49600e+03 5.58800e+03 -5849 8.75200e+03 5.58800e+03 -5850 8.84800e+03 5.58800e+03 -5851 8.99200e+03 5.58800e+03 -5852 9.44000e+03 5.58800e+03 -5853 9.55200e+03 5.58800e+03 -5854 9.68000e+03 5.58800e+03 -5855 9.82400e+03 5.58800e+03 -5856 1.00160e+04 5.58800e+03 -5857 1.01600e+04 5.58800e+03 -5858 1.02240e+04 5.58800e+03 -5859 1.02880e+04 7.39200e+03 -5860 9.20000e+03 8.80000e+02 -5861 9.20000e+03 1.76000e+03 -5862 9.20000e+03 2.94800e+03 -5863 9.44000e+03 5.80800e+03 -5864 9.55200e+03 5.80800e+03 -5865 9.68000e+03 5.80800e+03 -5866 9.81900e+03 5.80800e+03 -5867 1.32800e+03 9.91100e+03 -5868 1.58400e+03 9.15200e+03 -5869 1.71200e+03 9.15200e+03 -5870 1.77600e+03 9.15200e+03 -5871 1.90400e+03 9.15200e+03 -5872 2.06400e+03 9.15200e+03 -5873 2.24000e+03 9.15200e+03 -5874 2.46400e+03 9.15200e+03 -5875 2.73600e+03 9.15200e+03 -5876 2.96000e+03 9.15200e+03 -5877 3.02400e+03 9.15200e+03 -5878 3.16800e+03 9.15200e+03 -5879 3.31200e+03 9.15200e+03 -5880 3.50400e+03 9.15200e+03 -5881 3.56800e+03 3.11300e+03 -5882 3.56800e+03 7.12800e+03 -5883 3.56800e+03 9.05300e+03 -5884 9.42400e+03 3.52000e+02 -5885 9.44400e+03 5.72000e+02 -5886 9.58400e+03 5.72000e+02 -5887 9.68000e+03 5.72000e+02 -5888 9.80800e+03 5.72000e+02 -5889 9.87200e+03 5.72000e+02 -5890 1.00000e+04 5.72000e+02 -5891 1.00960e+04 5.72000e+02 -5892 1.02240e+04 5.72000e+02 -5893 1.02880e+04 5.72000e+02 -5894 1.03840e+04 5.72000e+02 -5895 1.05120e+04 5.72000e+02 -5896 1.06400e+04 5.72000e+02 -5897 1.07040e+04 5.72000e+02 -5898 1.08000e+04 5.72000e+02 -5899 1.09280e+04 5.72000e+02 -5900 1.10560e+04 5.72000e+02 -5901 1.11200e+04 5.72000e+02 -5902 1.12160e+04 5.72000e+02 -5903 1.13440e+04 5.72000e+02 -5904 1.14880e+04 5.72000e+02 -5905 1.16960e+04 5.72000e+02 -5906 1.17600e+04 5.72000e+02 -5907 1.19040e+04 5.72000e+02 -5908 1.20480e+04 5.72000e+02 -5909 1.21760e+04 5.72000e+02 -5910 1.23360e+04 5.72000e+02 -5911 1.24320e+04 5.72000e+02 -5912 1.25280e+04 5.72000e+02 -5913 1.26880e+04 5.72000e+02 -5914 1.28160e+04 5.72000e+02 -5915 1.29550e+04 5.72000e+02 -EOF diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/usa13509.tsp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/usa13509.tsp deleted file mode 100644 index a03eef901..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/benchs/usa13509.tsp +++ /dev/null @@ -1,13519 +0,0 @@ -NAME: usa13509 -TYPE: TSP -COMMENT: Cities with population at least 500 in the continental US. -COMMENT: Contributed by David Applegate and Andre Rohe, based on the -COMMENT: data set "US.lat-long" from the ftp site ftp.cs.toronto.edu. -COMMENT: The file US.lat-long.Z can be found in the directory /doc/geography. -DIMENSION: 13509 -EDGE_WEIGHT_TYPE: EUC_2D -NODE_COORD_SECTION -1 245552.778 817827.778 -2 247133.333 810905.556 -3 247205.556 810188.889 -4 249238.889 806280.556 -5 250111.111 805152.778 -6 254475.000 804794.444 -7 254683.333 804777.778 -8 254950.000 804294.444 -9 255622.222 803825.000 -10 255802.778 803469.444 -11 255972.222 803808.333 -12 256047.222 803538.889 -13 256147.222 803108.333 -14 256311.111 803691.667 -15 256788.889 803175.000 -16 256933.333 801630.556 -17 257072.222 802936.111 -18 257072.222 803258.333 -19 257211.111 802686.111 -20 257263.889 803555.556 -21 257544.444 803275.000 -22 257630.556 802963.889 -23 257738.889 801938.889 -24 257902.778 801302.778 -25 258100.000 803025.000 -26 258219.444 802897.222 -27 258402.778 803266.667 -28 258458.333 801541.667 -29 258550.000 801933.333 -30 258572.222 802783.333 -31 258627.778 801930.556 -32 258647.222 803247.222 -33 258702.778 802991.667 -34 258780.556 801258.333 -35 258822.222 801808.333 -36 258872.222 801313.889 -37 258897.222 801869.444 -38 258913.889 801272.222 -39 259013.889 974972.222 -40 259019.444 802505.556 -41 259305.556 803286.111 -42 259327.778 801627.778 -43 259402.778 802458.333 -44 259480.556 801508.333 -45 259502.778 801230.556 -46 259619.444 801769.444 -47 259647.222 801225.000 -48 259647.222 802416.667 -49 259722.222 817291.667 -50 259808.333 801486.111 -51 259869.444 802325.000 -52 259875.000 801750.000 -53 260027.778 802241.667 -54 260108.333 801497.222 -55 260519.444 801441.667 -56 260569.444 802719.444 -57 260644.444 802322.222 -58 260713.889 974761.111 -59 260730.556 972083.333 -60 260883.333 817263.889 -61 260919.444 979569.444 -62 261000.000 982627.778 -63 261005.556 972900.000 -64 261033.333 971644.444 -65 261219.444 801436.111 -66 261272.222 802333.333 -67 261322.222 976308.333 -68 261400.000 802136.111 -69 261416.667 817950.000 -70 261494.444 979133.333 -71 261586.111 978236.111 -72 261591.667 979905.556 -73 261600.000 801391.667 -74 261661.111 802086.111 -75 261700.000 980516.667 -76 261833.333 981227.778 -77 261902.778 976958.333 -78 261916.667 800966.667 -79 261944.444 981833.333 -80 262022.222 800941.667 -81 262030.556 982297.222 -82 262155.556 983250.000 -83 262188.889 817919.444 -84 262255.556 977577.778 -85 262350.000 975816.667 -86 262375.000 801250.000 -87 262441.667 802066.667 -88 262466.667 984811.111 -89 262483.333 977336.111 -90 262563.889 978247.222 -91 262613.889 818094.444 -92 262825.000 801072.222 -93 262869.444 983130.556 -94 262930.556 979927.778 -95 262936.111 800791.667 -96 262936.111 979602.778 -97 262983.333 979283.333 -98 263013.889 981630.556 -99 263180.556 801000.000 -100 263305.556 818269.444 -101 263394.444 817788.889 -102 263583.333 800833.333 -103 263727.778 979713.889 -104 263794.444 988200.000 -105 263991.667 800658.333 -106 264047.222 990155.556 -107 264119.444 977894.444 -108 264183.333 814175.000 -109 264422.222 980136.111 -110 264486.111 820225.000 -111 264516.667 819483.333 -112 264611.111 800730.556 -113 264669.444 818016.667 -114 265250.000 800666.667 -115 265266.667 800486.111 -116 265625.000 819497.222 -117 265661.111 800536.111 -118 265863.889 800522.222 -119 265886.111 800388.889 -120 266155.556 800572.222 -121 266233.333 801255.556 -122 266250.000 816250.000 -123 266402.778 818725.000 -124 266450.000 800761.111 -125 266636.111 807163.889 -126 266669.444 818802.778 -127 266744.444 818152.778 -128 266841.667 806677.778 -129 266908.333 801202.778 -130 267052.778 800366.667 -131 267088.889 817461.111 -132 267150.000 800536.111 -133 267372.222 809511.111 -134 267538.889 809338.889 -135 267600.000 800738.889 -136 267613.889 814386.111 -137 267750.000 800583.333 -138 267777.778 800358.333 -139 268000.000 800666.667 -140 268172.222 800822.222 -141 268197.222 806655.556 -142 268327.778 810933.333 -143 268416.667 810963.889 -144 268794.444 800536.111 -145 268833.333 822902.778 -146 269069.444 992711.111 -147 269097.222 820541.667 -148 269138.889 823272.222 -149 269294.444 820455.556 -150 269338.889 800944.444 -151 269466.667 820261.111 -152 269580.556 820672.222 -153 269613.889 819841.667 -154 269758.333 820908.333 -155 270269.444 804858.333 -156 270500.000 822500.000 -157 270527.778 824244.444 -158 270566.667 823786.111 -159 270591.667 801366.667 -160 270727.778 824077.778 -161 270994.444 824544.444 -162 271188.889 824444.444 -163 271300.000 824533.333 -164 271438.889 802008.333 -165 271675.000 802663.889 -166 271958.333 824905.556 -167 271972.222 802530.556 -168 272155.556 818586.111 -169 272172.222 802700.000 -170 272191.667 802394.444 -171 272216.667 824980.556 -172 272266.667 981438.889 -173 272436.111 808300.000 -174 272516.667 808141.667 -175 272541.667 802300.000 -176 272836.111 824808.333 -177 272927.778 813630.556 -178 273063.889 986780.556 -179 273294.444 824577.778 -180 273361.111 825308.333 -181 273602.778 981233.333 -182 274097.222 825694.444 -183 274122.222 826591.667 -184 274241.667 825802.778 -185 274250.000 825905.556 -186 274463.889 803258.333 -187 274472.222 825463.889 -188 274666.667 827041.667 -189 274688.889 826863.889 -190 274691.667 825416.667 -191 274930.556 817961.111 -192 274952.778 814411.111 -193 274972.222 827091.667 -194 274986.111 825750.000 -195 275061.111 995072.222 -196 275119.444 826322.222 -197 275155.556 978558.333 -198 275211.111 825725.000 -199 275213.889 825277.778 -200 275308.333 827336.111 -201 275355.556 825613.889 -202 275427.778 804025.000 -203 275469.444 818116.667 -204 275858.333 977988.889 -205 275955.556 815063.889 -206 275986.111 984077.778 -207 276380.556 818241.667 -208 276383.333 803975.000 -209 276741.667 977483.333 -210 276750.000 804094.444 -211 277122.222 822991.667 -212 277163.889 803844.444 -213 277205.556 824333.333 -214 277455.556 815308.333 -215 277480.556 804363.889 -216 277480.556 827036.111 -217 277519.444 818019.444 -218 277519.444 980694.444 -219 277547.222 827377.778 -220 277636.111 982386.111 -221 277675.000 806016.667 -222 277688.889 827691.667 -223 277813.889 979083.333 -224 277900.000 976686.111 -225 277950.000 819805.556 -226 277977.778 827975.000 -227 278002.778 973961.111 -228 278083.333 828113.889 -229 278138.889 827783.333 -230 278158.333 828208.333 -231 278258.333 828291.667 -232 278336.111 970608.333 -233 278355.556 804933.333 -234 278425.000 826997.222 -235 278625.000 828486.111 -236 278750.000 828513.889 -237 278769.444 973236.111 -238 278775.000 972113.889 -239 278802.778 805005.556 -240 278825.000 986175.000 -241 278950.000 819736.111 -242 278961.111 818433.333 -243 279011.111 815861.111 -244 279091.667 827875.000 -245 279091.667 971497.222 -246 279141.667 827055.556 -247 279211.111 828172.222 -248 279219.444 972897.222 -249 279227.778 828433.333 -250 279355.556 828063.889 -251 279375.000 822861.111 -252 279455.556 818005.556 -253 279472.222 824586.111 -254 279502.778 975819.444 -255 279525.000 817272.222 -256 279563.889 979366.667 -257 279650.000 818780.556 -258 279655.556 828002.778 -259 279675.000 819736.111 -260 279780.556 817566.667 -261 279786.111 816141.667 -262 279786.111 973983.333 -263 279905.556 826933.333 -264 279936.111 816902.778 -265 279938.889 822197.222 -266 279944.444 817383.333 -267 280033.333 805658.333 -268 280083.333 819077.778 -269 280183.333 821130.556 -270 280194.444 827719.444 -271 280202.778 970541.667 -272 280219.444 817330.556 -273 280222.222 816194.444 -274 280313.889 820150.000 -275 280338.889 826652.778 -276 280341.667 805888.889 -277 280350.000 823894.444 -278 280363.889 975088.889 -279 280408.333 993541.667 -280 280441.667 816280.556 -281 280611.111 970408.333 -282 280650.000 817888.889 -283 280680.556 805605.556 -284 280713.889 806536.111 -285 280719.444 806802.778 -286 280777.778 827638.889 -287 280786.111 806027.778 -288 280850.000 806666.667 -289 280891.667 805658.333 -290 280916.667 817236.111 -291 280941.667 978277.778 -292 281138.889 816180.556 -293 281144.444 819738.889 -294 281205.556 820233.333 -295 281355.556 806719.444 -296 281458.333 827569.444 -297 281486.111 805886.111 -298 281508.333 824616.667 -299 281611.111 816019.444 -300 281758.333 805902.778 -301 281822.222 818241.667 -302 281875.000 827397.222 -303 282163.889 827225.000 -304 282333.333 821813.889 -305 282380.556 973197.222 -306 282438.889 827194.444 -307 282586.111 814566.667 -308 282713.889 827197.222 -309 282916.667 814077.778 -310 283050.000 972750.000 -311 283197.222 806077.778 -312 283322.222 981172.222 -313 283358.333 822747.222 -314 283505.556 807255.556 -315 283644.444 821961.111 -316 283858.333 807422.222 -317 284005.556 977480.556 -318 284055.556 806050.000 -319 284150.000 967133.333 -320 284319.444 807602.778 -321 284366.667 992347.222 -322 284569.444 813916.667 -323 284580.556 813594.444 -324 284600.000 981822.222 -325 284655.556 821722.222 -326 284716.667 813680.556 -327 284858.333 813725.000 -328 284952.778 815350.000 -329 285025.000 813308.333 -330 285072.222 821705.556 -331 285216.667 998602.778 -332 285380.556 813794.444 -333 285380.556 814605.556 -334 285408.333 813008.333 -335 285491.667 817730.556 -336 285544.444 811066.667 -337 285547.222 816333.333 -338 285550.000 823880.556 -339 285577.778 818513.889 -340 285650.000 815863.889 -341 285688.889 815441.667 -342 285730.556 995683.333 -343 285741.667 817463.889 -344 285780.556 818869.444 -345 285908.333 813944.444 -346 285997.222 813394.444 -347 286097.222 820552.778 -348 286119.444 808077.778 -349 286144.444 813808.333 -350 286147.222 966258.333 -351 286191.667 814427.778 -352 286416.667 811236.111 -353 286475.000 968922.222 -354 286488.889 813513.889 -355 286497.222 819927.778 -356 286608.333 813658.333 -357 286613.889 814191.667 -358 286616.667 815097.222 -359 286647.222 821130.556 -360 286650.000 808450.000 -361 286672.222 991702.778 -362 286680.556 973880.556 -363 286697.222 812083.333 -364 286772.222 998277.778 -365 286775.000 813280.556 -366 286794.444 965600.000 -367 286802.778 815097.222 -368 286986.111 813083.333 -369 287077.778 962172.222 -370 287088.889 1004991.667 -371 287094.444 817330.556 -372 287308.333 816013.889 -373 287394.444 811152.778 -374 287500.000 822969.444 -375 287555.556 820950.000 -376 287586.111 813180.556 -377 287811.111 826152.778 -378 287994.444 820702.778 -379 288002.778 812733.333 -380 288022.222 816447.222 -381 288038.889 817258.333 -382 288105.556 818780.556 -383 288188.889 978483.333 -384 288355.556 823305.556 -385 288402.778 817688.889 -386 288525.000 816855.556 -387 288611.111 819066.667 -388 288616.667 987061.111 -389 288650.000 820391.667 -390 288830.556 977127.778 -391 288847.222 979005.556 -392 288919.444 990947.222 -393 289002.778 812638.889 -394 289005.556 823747.222 -395 289022.222 825927.778 -396 289172.222 819230.556 -397 289177.778 985461.111 -398 289291.667 816658.333 -399 289408.333 998494.444 -400 289441.667 952886.111 -401 289486.111 812988.889 -402 289538.889 953594.444 -403 289600.000 960650.000 -404 289669.444 984783.333 -405 289783.333 966458.333 -406 289805.556 812336.111 -407 289808.333 975025.000 -408 289825.000 959691.667 -409 289825.000 980172.222 -410 289886.111 809025.000 -411 290027.778 953316.667 -412 290175.000 958891.667 -413 290244.444 953986.111 -414 290255.556 809272.222 -415 290255.556 809722.222 -416 290297.222 827161.111 -417 290300.000 826688.889 -418 290336.111 954341.667 -419 290386.111 956983.333 -420 290402.778 965133.333 -421 290402.778 985677.778 -422 290441.667 955688.889 -423 290488.889 824611.111 -424 290550.000 820625.000 -425 290558.333 954097.222 -426 290694.444 980816.667 -427 290936.111 972888.889 -428 290961.111 809372.222 -429 291191.667 813516.667 -430 291333.333 981558.333 -431 291383.333 830352.778 -432 291397.222 989050.000 -433 291436.111 956450.000 -434 291655.556 810047.222 -435 291691.667 954316.667 -436 291758.333 809830.556 -437 291869.444 821402.778 -438 291894.444 988622.222 -439 291963.889 962694.444 -440 292094.444 997858.333 -441 292105.556 810230.556 -442 292261.111 986575.000 -443 292280.556 953447.222 -444 292366.667 979597.222 -445 292391.667 814658.333 -446 292433.333 810377.778 -447 292672.222 977641.667 -448 292855.556 810561.111 -449 292875.000 971516.667 -450 292947.222 952786.111 -451 293102.778 1004175.000 -452 293105.556 988097.222 -453 293113.889 961025.000 -454 293172.222 994661.111 -455 293472.222 991411.111 -456 293480.556 950158.333 -457 293488.889 810666.667 -458 293555.556 988783.333 -459 293561.111 981152.778 -460 293625.000 1008963.889 -461 293663.889 821975.000 -462 293788.889 902600.000 -463 293836.111 949025.000 -464 293872.222 824469.444 -465 293991.667 958375.000 -466 294236.111 952438.889 -467 294238.889 984933.333 -468 294288.889 971702.778 -469 294300.000 815108.333 -470 294383.333 905952.778 -471 294419.444 902991.667 -472 294436.111 969408.333 -473 294475.000 826425.000 -474 294505.556 959944.444 -475 294569.444 946394.444 -476 294605.556 950511.111 -477 294625.000 953577.778 -478 294630.556 983852.778 -479 294658.333 812580.556 -480 294747.222 811272.222 -481 294747.222 984505.556 -482 294786.111 984872.222 -483 294802.778 896938.889 -484 294822.222 954152.778 -485 294830.556 949219.444 -486 294847.222 984655.556 -487 294877.778 985513.889 -488 294950.000 986183.333 -489 295000.000 815916.667 -490 295013.889 974522.222 -491 295044.444 822800.000 -492 295066.667 949922.222 -493 295072.222 950947.222 -494 295152.778 983800.000 -495 295177.778 983158.333 -496 295230.556 985161.111 -497 295291.667 952008.333 -498 295297.222 825191.667 -499 295308.333 960708.333 -500 295375.000 907200.000 -501 295425.000 903380.556 -502 295425.000 950202.778 -503 295472.222 950319.444 -504 295477.778 982908.333 -505 295519.444 982694.444 -506 295533.333 906022.222 -507 295569.444 958083.333 -508 295605.556 1043716.667 -509 295613.889 982266.667 -510 295633.333 952858.333 -511 295638.889 950252.778 -512 295686.111 979644.444 -513 295711.111 981400.000 -514 295722.222 903816.667 -515 295747.222 971425.000 -516 295819.444 957605.556 -517 295822.222 984905.556 -518 295847.222 985522.222 -519 295894.444 963333.333 -520 295916.667 820875.000 -521 295919.444 980330.556 -522 295955.556 907194.444 -523 296002.778 984869.444 -524 296130.556 828177.778 -525 296158.333 955575.000 -526 296183.333 955375.000 -527 296194.444 956347.222 -528 296200.000 950097.222 -529 296236.111 818905.556 -530 296311.111 960650.000 -531 296341.667 831252.778 -532 296458.333 905391.667 -533 296461.111 826066.667 -534 296483.333 816377.778 -535 296513.889 823250.000 -536 296580.556 815986.111 -537 296622.222 948900.000 -538 296627.778 952352.778 -539 296655.556 950191.667 -540 296661.111 911019.444 -541 296666.667 901083.333 -542 296691.667 1000119.444 -543 296791.667 959769.444 -544 296802.778 976472.222 -545 296816.667 969027.778 -546 296875.000 971083.333 -547 296894.444 912708.333 -548 296897.222 958994.444 -549 296908.333 952088.889 -550 296930.556 913019.444 -551 296944.444 912188.889 -552 296991.667 912066.667 -553 297027.778 967802.778 -554 297027.778 981241.667 -555 297050.000 951236.111 -556 297055.556 954586.111 -557 297058.333 954366.667 -558 297063.889 965394.444 -559 297177.778 815083.333 -560 297177.778 954336.111 -561 297230.556 901236.111 -562 297255.556 849833.333 -563 297263.889 990733.333 -564 297272.222 905988.889 -565 297352.778 949772.222 -566 297363.889 848786.111 -567 297486.111 966008.333 -568 297597.222 955169.444 -569 297630.556 953630.556 -570 297672.222 952336.111 -571 297672.222 955297.222 -572 297702.778 954952.778 -573 297727.778 946825.000 -574 297758.333 951144.444 -575 297772.222 955169.444 -576 297780.556 951716.667 -577 297805.556 961569.444 -578 297855.556 958241.667 -579 297858.333 820316.667 -580 297858.333 959508.333 -581 297894.444 821675.000 -582 297897.222 943830.556 -583 297927.778 961005.556 -584 297944.444 987316.667 -585 297955.556 824944.444 -586 297955.556 908227.778 -587 297958.333 915013.889 -588 297975.000 933250.000 -589 298186.111 950558.333 -590 298200.000 943838.889 -591 298236.111 904750.000 -592 298266.667 825969.444 -593 298372.222 909561.111 -594 298377.778 915441.667 -595 298475.000 948905.556 -596 298530.556 846644.444 -597 298547.222 899905.556 -598 298677.778 951280.556 -599 298797.222 950627.778 -600 298830.556 979411.111 -601 298847.222 976697.222 -602 298875.000 955627.778 -603 298955.556 898977.778 -604 298986.111 939286.111 -605 298991.667 901002.778 -606 299022.222 955022.222 -607 299033.333 900772.222 -608 299052.778 968763.889 -609 299058.333 901422.222 -610 299061.111 903561.111 -611 299100.000 900325.000 -612 299108.333 916633.333 -613 299116.667 950619.444 -614 299144.444 900538.889 -615 299175.000 939241.667 -616 299183.333 902108.333 -617 299319.444 903663.889 -618 299322.222 953800.000 -619 299361.111 906786.111 -620 299402.778 902030.556 -621 299402.778 910247.222 -622 299425.000 899633.333 -623 299427.778 903516.667 -624 299438.889 821100.000 -625 299477.778 854180.556 -626 299480.556 919886.111 -627 299480.556 939169.444 -628 299500.000 962569.444 -629 299541.667 900052.778 -630 299544.444 900750.000 -631 299580.556 920358.333 -632 299588.889 829283.333 -633 299650.000 912030.556 -634 299675.000 989047.222 -635 299741.667 939922.222 -636 299763.889 904088.889 -637 299777.778 903877.778 -638 299794.444 818105.556 -639 299838.889 901527.778 -640 299888.889 978769.444 -641 299911.111 939583.333 -642 299916.667 816783.333 -643 299938.889 902416.667 -644 299977.778 922847.222 -645 299988.889 904122.222 -646 300033.333 918186.111 -647 300108.333 907194.444 -648 300155.556 1002050.000 -649 300205.556 938455.556 -650 300225.000 823397.222 -651 300258.333 925083.333 -652 300272.222 945913.889 -653 300355.556 944241.667 -654 300402.778 906988.889 -655 300438.889 820719.444 -656 300463.889 948850.000 -657 300472.222 906897.222 -658 300472.222 991400.000 -659 300477.778 943355.556 -660 300527.778 831750.000 -661 300536.111 905516.667 -662 300558.333 906191.667 -663 300563.889 917369.444 -664 300563.889 959266.667 -665 300663.889 904800.000 -666 300772.222 992400.000 -667 300805.556 926713.889 -668 300819.444 937580.556 -669 300850.000 978400.000 -670 300858.333 941016.667 -671 300927.778 937363.889 -672 300930.556 959875.000 -673 300972.222 960780.556 -674 300977.778 984211.111 -675 300994.444 919900.000 -676 301008.333 909927.778 -677 301025.000 940516.667 -678 301088.889 948580.556 -679 301102.778 973150.000 -680 301125.000 852005.556 -681 301130.556 946427.778 -682 301172.222 835819.444 -683 301216.667 924980.556 -684 301308.333 856033.333 -685 301313.889 940152.778 -686 301400.000 944108.333 -687 301422.222 1023936.111 -688 301469.444 919611.111 -689 301522.222 947388.889 -690 301527.778 855700.000 -691 301586.111 856602.778 -692 301658.333 817066.667 -693 301666.667 963975.000 -694 301686.111 933758.333 -695 301697.222 911469.444 -696 301708.333 856252.778 -697 301758.333 843752.778 -698 301763.889 858055.556 -699 301805.556 924641.667 -700 301816.667 932736.111 -701 301825.000 969361.111 -702 301841.667 908591.667 -703 301894.444 826394.444 -704 301897.222 925825.000 -705 301905.556 935811.111 -706 301922.222 826147.222 -707 302008.333 856269.444 -708 302138.889 923744.444 -709 302141.667 918319.444 -710 302172.222 910961.111 -711 302222.222 926569.444 -712 302238.889 920197.222 -713 302255.556 978033.333 -714 302263.889 932172.222 -715 302327.778 951608.333 -716 302347.222 922683.333 -717 302355.556 920944.444 -718 302355.556 921852.778 -719 302358.333 928225.000 -720 302363.889 933772.222 -721 302366.667 930136.111 -722 302383.333 909200.000 -723 302419.444 932505.556 -724 302452.778 856483.333 -725 302458.333 877008.333 -726 302500.000 1032500.000 -727 302530.556 941897.222 -728 302669.444 977427.778 -729 302733.333 918991.667 -730 302750.000 897811.111 -731 302750.000 988716.667 -732 302766.667 977908.333 -733 302766.667 984116.667 -734 302772.222 912236.111 -735 302819.444 821222.222 -736 302866.667 893761.111 -737 302888.889 912341.667 -738 302891.667 856405.556 -739 302944.444 813933.333 -740 302950.000 907950.000 -741 302975.000 937433.333 -742 302977.778 978016.667 -743 303025.000 819755.556 -744 303025.000 931905.556 -745 303077.778 1040186.111 -746 303086.111 892869.444 -747 303116.667 813966.667 -748 303116.667 954558.333 -749 303130.556 917902.778 -750 303133.333 899430.556 -751 303138.889 842475.000 -752 303155.556 892475.000 -753 303169.444 920488.889 -754 303294.444 827591.667 -755 303311.111 924955.556 -756 303319.444 816558.333 -757 303341.667 813988.889 -758 303405.556 975566.667 -759 303458.333 965280.556 -760 303488.889 941777.778 -761 303494.444 973700.000 -762 303502.778 891527.778 -763 303536.111 912652.778 -764 303547.222 940725.000 -765 303569.444 871638.889 -766 303580.556 900655.556 -767 303583.333 1036605.556 -768 303586.111 905861.111 -769 303655.556 885561.111 -770 303672.222 890927.778 -771 303677.778 979913.889 -772 303713.889 943122.222 -773 303758.333 843008.333 -774 303758.333 897483.333 -775 303838.889 872750.000 -776 303855.556 886116.667 -777 303877.778 960875.000 -778 303933.333 864958.333 -779 303941.667 912536.111 -780 303958.333 888852.778 -781 303975.000 919313.889 -782 304027.778 922150.000 -783 304030.556 882483.333 -784 304041.667 901569.444 -785 304055.556 866188.889 -786 304063.889 876836.111 -787 304097.222 866630.556 -788 304108.333 817080.556 -789 304108.333 914336.111 -790 304111.111 888277.778 -791 304111.111 920683.333 -792 304113.889 885344.444 -793 304188.889 970113.889 -794 304208.333 873075.000 -795 304211.111 872169.444 -796 304247.222 954797.222 -797 304250.000 872519.444 -798 304261.111 888908.333 -799 304263.889 872797.222 -800 304302.778 888422.222 -801 304319.444 849758.333 -802 304380.556 842808.333 -803 304386.111 904413.889 -804 304391.667 976197.222 -805 304402.778 885436.111 -806 304408.333 866136.111 -807 304427.778 872225.000 -808 304433.333 850452.778 -809 304438.889 856886.111 -810 304502.778 934330.556 -811 304505.556 911544.444 -812 304519.444 912100.000 -813 304555.556 866383.333 -814 304613.889 873150.000 -815 304686.111 872361.111 -816 304691.667 834130.556 -817 304691.667 836302.778 -818 304702.778 919783.333 -819 304738.889 879191.667 -820 304752.778 901008.333 -821 304761.111 883422.222 -822 304783.333 900375.000 -823 304811.111 926955.556 -824 304850.000 925958.333 -825 304852.778 928505.556 -826 304866.667 909561.111 -827 304875.000 876997.222 -828 304891.667 997716.667 -829 304911.111 915194.444 -830 304941.667 924175.000 -831 304977.778 949963.889 -832 304980.556 861361.111 -833 305019.444 907477.778 -834 305041.667 904611.111 -835 305041.667 905822.222 -836 305050.000 978200.000 -837 305080.556 976786.111 -838 305100.000 872125.000 -839 305180.556 829483.333 -840 305183.333 921847.222 -841 305186.111 872727.778 -842 305227.778 879033.333 -843 305252.778 896794.444 -844 305333.333 920813.889 -845 305366.667 917527.778 -846 305375.000 954830.556 -847 305425.000 975463.889 -848 305450.000 838702.778 -849 305452.778 877516.667 -850 305475.000 881752.778 -851 305536.111 877119.444 -852 305588.889 915558.333 -853 305600.000 919538.889 -854 305619.444 818308.333 -855 305666.667 1006430.556 -856 305691.667 847433.333 -857 305705.556 974091.667 -858 305772.222 904830.556 -859 305780.556 982725.000 -860 305786.111 978527.778 -861 305813.889 872913.889 -862 305869.444 845833.333 -863 305880.556 911680.556 -864 305900.000 881708.333 -865 305902.778 972966.667 -866 305922.222 951291.667 -867 305958.333 916163.889 -868 305986.111 870311.111 -869 305991.667 871611.111 -870 306033.333 879036.111 -871 306038.889 830980.556 -872 306136.111 972052.778 -873 306161.111 920569.444 -874 306169.444 846600.000 -875 306180.556 877530.556 -876 306200.000 927625.000 -877 306227.778 857122.222 -878 306236.111 844147.222 -879 306277.778 963341.667 -880 306316.667 816066.667 -881 306322.222 870397.222 -882 306325.000 976769.444 -883 306336.111 924191.667 -884 306352.778 905008.333 -885 306483.333 911563.889 -886 306580.556 984402.778 -887 306602.778 938925.000 -888 306694.444 814627.778 -889 306877.778 922713.889 -890 306908.333 819175.000 -891 306927.778 917438.889 -892 306936.111 853922.222 -893 306941.667 880430.556 -894 307013.889 914361.111 -895 307050.000 848430.556 -896 307075.000 849244.444 -897 307100.000 1012002.778 -898 307108.333 949327.778 -899 307122.222 850202.778 -900 307172.222 911413.889 -901 307175.000 974425.000 -902 307213.889 861155.556 -903 307233.333 955505.556 -904 307238.889 873141.667 -905 307383.333 915941.667 -906 307386.111 880788.889 -907 307436.111 980552.778 -908 307472.222 832208.333 -909 307488.889 844838.889 -910 307541.667 935402.778 -911 307580.556 982280.556 -912 307591.667 986747.222 -913 307619.444 865705.556 -914 307636.111 880747.222 -915 307647.222 905116.667 -916 307730.556 858141.667 -917 307741.667 852269.444 -918 307750.000 944152.778 -919 307816.667 855386.111 -920 307836.111 924252.778 -921 307847.222 835600.000 -922 307908.333 898486.111 -923 307916.667 837900.000 -924 307916.667 856797.222 -925 307947.222 974252.778 -926 307969.444 853766.667 -927 307997.222 816900.000 -928 308158.333 926602.778 -929 308205.556 880705.556 -930 308230.556 883613.889 -931 308302.778 820100.000 -932 308305.556 906716.667 -933 308325.000 832786.111 -934 308372.222 912175.000 -935 308400.000 895341.667 -936 308411.111 977933.333 -937 308461.111 932888.889 -938 308469.444 901530.556 -939 308483.333 937572.222 -940 308530.556 880561.111 -941 308530.556 969766.667 -942 308558.333 820211.111 -943 308600.000 1006005.556 -944 308655.556 910155.556 -945 308700.000 851619.444 -946 308772.222 842013.889 -947 308780.556 974013.889 -948 308783.333 965927.778 -949 308827.778 843238.889 -950 308827.778 877730.556 -951 308916.667 880397.222 -952 308938.889 1028788.889 -953 309036.111 845755.556 -954 309077.778 944219.444 -955 309138.889 1018975.000 -956 309175.000 997861.111 -957 309197.222 932822.222 -958 309200.000 911155.556 -959 309200.000 939963.889 -960 309250.000 885900.000 -961 309380.556 905088.889 -962 309450.000 953752.778 -963 309469.444 975383.333 -964 309497.222 959113.889 -965 309527.778 871513.889 -966 309530.556 921825.000 -967 309566.667 855166.667 -968 309575.000 851622.222 -969 309597.222 837380.556 -970 309636.111 817227.778 -971 309655.556 864597.222 -972 309736.111 840530.556 -973 309763.889 925850.000 -974 309777.778 966736.111 -975 309813.889 863075.000 -976 309833.333 918000.000 -977 309838.889 920533.333 -978 309841.667 1037441.667 -979 309911.111 833727.778 -980 309966.667 948269.444 -981 310000.000 872608.333 -982 310011.111 894522.222 -983 310050.000 863280.556 -984 310066.667 904722.222 -985 310102.778 863497.222 -986 310111.111 838663.889 -987 310147.222 922872.222 -988 310236.111 874938.889 -989 310258.333 964850.000 -990 310294.444 961144.444 -991 310327.778 858638.889 -992 310344.444 919755.556 -993 310363.889 827472.222 -994 310397.222 1048302.778 -995 310402.778 848791.667 -996 310408.333 830752.778 -997 310486.111 853050.000 -998 310547.222 951255.556 -999 310558.333 974641.667 -1000 310577.778 920488.889 -1001 310594.444 921211.111 -1002 310636.111 981813.889 -1003 310680.556 836238.889 -1004 310722.222 840891.667 -1005 310727.778 969783.333 -1006 310744.444 831994.444 -1007 310786.111 976052.778 -1008 310894.444 910683.333 -1009 310905.556 882280.556 -1010 310930.556 870627.778 -1011 310944.444 924002.778 -1012 310980.556 973425.000 -1013 311022.222 856969.444 -1014 311044.444 912994.444 -1015 311050.000 870722.222 -1016 311080.556 855944.444 -1017 311086.111 888272.222 -1018 311127.778 860461.111 -1019 311147.222 932713.889 -1020 311158.333 901419.444 -1021 311169.444 977275.000 -1022 311238.889 979027.778 -1023 311266.667 954452.778 -1024 311275.000 841519.444 -1025 311277.778 920661.111 -1026 311358.333 1022238.889 -1027 311369.444 834236.111 -1028 311391.667 855191.667 -1029 311430.556 894097.222 -1030 311430.556 904586.111 -1031 311433.333 932608.333 -1032 311497.222 814916.667 -1033 311555.556 885577.778 -1034 311583.333 944261.111 -1035 311650.000 966766.667 -1036 311691.667 889200.000 -1037 311711.111 847333.333 -1038 311797.222 837891.667 -1039 311808.333 821350.000 -1040 311827.778 852363.889 -1041 311869.444 947808.333 -1042 311913.889 1014600.000 -1043 311955.556 987177.778 -1044 311972.222 910216.667 -1045 312022.222 890347.222 -1046 312033.333 970363.889 -1047 312041.667 819813.889 -1048 312066.667 973025.000 -1049 312072.222 832502.778 -1050 312133.333 823541.667 -1051 312158.333 861711.111 -1052 312161.111 998452.778 -1053 312169.444 983930.556 -1054 312227.778 904602.778 -1055 312230.556 853905.556 -1056 312311.111 842105.556 -1057 312355.556 857227.778 -1058 312436.111 904530.556 -1059 312477.778 939741.667 -1060 312516.667 898375.000 -1061 312616.667 1008169.444 -1062 312688.889 836872.222 -1063 312713.889 834650.000 -1064 312775.000 945763.889 -1065 312794.444 863255.556 -1066 312822.222 892755.556 -1067 312825.000 862555.556 -1068 312836.111 904683.333 -1069 312925.000 851116.667 -1070 312975.000 828525.000 -1071 312988.889 853444.444 -1072 312988.889 870225.000 -1073 313058.333 822422.222 -1074 313061.111 968977.778 -1075 313080.556 973611.111 -1076 313100.000 857130.556 -1077 313111.111 924450.000 -1078 313113.889 855530.556 -1079 313127.778 843358.333 -1080 313180.556 954563.889 -1081 313188.889 854938.889 -1082 313194.444 839172.222 -1083 313222.222 924341.667 -1084 313269.444 892902.778 -1085 313380.556 947288.889 -1086 313391.667 1028513.889 -1087 313402.778 1109336.111 -1088 313405.556 830461.111 -1089 313405.556 938466.667 -1090 313408.333 835936.111 -1091 313444.444 1095447.222 -1092 313463.889 892600.000 -1093 313511.111 853422.222 -1094 313527.778 865391.667 -1095 313569.444 1095611.111 -1096 313613.889 961438.889 -1097 313644.444 893061.111 -1098 313700.000 814341.667 -1099 313775.000 849341.667 -1100 313794.444 841611.111 -1101 313850.000 832230.556 -1102 313855.556 859294.444 -1103 313863.889 972152.778 -1104 313902.778 926691.667 -1105 313902.778 976841.667 -1106 313972.222 1023497.222 -1107 314127.778 833291.667 -1108 314144.444 860677.778 -1109 314152.778 924116.667 -1110 314172.222 895422.222 -1111 314216.667 853377.778 -1112 314227.778 1034927.778 -1113 314333.333 874013.889 -1114 314350.000 977436.111 -1115 314394.444 835194.444 -1116 314397.222 847250.000 -1117 314436.111 934572.222 -1118 314438.889 974088.889 -1119 314480.556 1099277.778 -1120 314497.222 985705.556 -1121 314502.778 835086.111 -1122 314588.889 856405.556 -1123 314611.111 1033933.333 -1124 314622.222 971955.556 -1125 314627.778 908500.000 -1126 314636.111 1004366.667 -1127 314650.000 882544.444 -1128 314675.000 971144.444 -1129 314716.667 836469.444 -1130 314722.222 908966.667 -1131 314747.222 969230.556 -1132 314855.556 845138.889 -1133 314861.111 820172.222 -1134 314916.667 954783.333 -1135 315022.222 1061580.556 -1136 315044.444 910688.889 -1137 315086.111 828500.000 -1138 315088.889 878944.444 -1139 315127.778 837877.778 -1140 315172.222 826350.000 -1141 315188.889 927066.667 -1142 315213.889 971536.111 -1143 315241.667 965336.111 -1144 315277.778 873247.222 -1145 315297.222 941058.333 -1146 315305.556 838355.556 -1147 315341.667 974427.778 -1148 315391.667 824625.000 -1149 315394.444 1107555.556 -1150 315422.222 867150.000 -1151 315422.222 968333.333 -1152 315491.667 971463.889 -1153 315536.111 901072.222 -1154 315544.444 1103030.556 -1155 315580.556 847383.333 -1156 315602.778 914030.556 -1157 315652.778 914258.333 -1158 315686.111 934838.889 -1159 315700.000 1030005.556 -1160 315716.667 852505.556 -1161 315783.333 841558.333 -1162 315788.889 904405.556 -1163 315811.111 925327.778 -1164 315827.778 1029202.778 -1165 315847.222 958488.889 -1166 315850.000 1062722.222 -1167 315922.222 1062236.111 -1168 315938.889 971086.111 -1169 315941.667 832505.556 -1170 315941.667 1028922.222 -1171 315972.222 1001819.444 -1172 315983.333 898669.444 -1173 316000.000 857188.889 -1174 316033.333 946552.778 -1175 316038.889 891955.556 -1176 316072.222 818855.556 -1177 316088.889 850472.222 -1178 316250.000 828869.444 -1179 316250.000 955791.667 -1180 316263.889 918180.556 -1181 316269.444 962836.111 -1182 316277.778 1103333.333 -1183 316291.667 971025.000 -1184 316300.000 915544.444 -1185 316313.889 936438.889 -1186 316338.889 883133.333 -1187 316369.444 867419.444 -1188 316452.778 895552.778 -1189 316502.778 950725.000 -1190 316527.778 932019.444 -1191 316591.667 974719.444 -1192 316672.222 928905.556 -1193 316747.222 886461.111 -1194 316752.778 930444.444 -1195 316797.222 964819.444 -1196 316830.556 921336.111 -1197 316925.000 1062069.444 -1198 316938.889 891305.556 -1199 317011.111 903975.000 -1200 317036.111 981236.111 -1201 317058.333 836533.333 -1202 317077.778 817425.000 -1203 317086.111 856105.556 -1204 317086.111 877772.222 -1205 317113.889 910605.556 -1206 317127.778 1100669.444 -1207 317147.222 832527.778 -1208 317163.889 862638.889 -1209 317169.444 991322.222 -1210 317200.000 858161.111 -1211 317225.000 915430.556 -1212 317244.444 961650.000 -1213 317319.444 841708.333 -1214 317333.333 872047.222 -1215 317380.556 999469.444 -1216 317419.444 989452.778 -1217 317511.111 1031594.444 -1218 317538.889 966497.222 -1219 317561.111 846152.778 -1220 317586.111 1064863.889 -1221 317605.556 930861.111 -1222 317711.111 847894.444 -1223 317719.444 918213.889 -1224 317733.333 844466.667 -1225 317738.889 816327.778 -1226 317780.556 823486.111 -1227 317822.222 975763.889 -1228 317833.333 855558.333 -1229 317838.889 816077.778 -1230 317863.889 890322.222 -1231 317877.778 964622.222 -1232 317883.333 877272.222 -1233 317958.333 951500.000 -1234 318022.222 970913.889 -1235 318086.111 859700.000 -1236 318144.444 948402.778 -1237 318191.667 923297.222 -1238 318197.222 935141.667 -1239 318213.889 930294.444 -1240 318241.667 944908.333 -1241 318272.222 994261.111 -1242 318294.444 866177.778 -1243 318308.333 843644.444 -1244 318361.111 1009844.444 -1245 318455.556 1023672.222 -1246 318463.889 916561.111 -1247 318466.667 815961.111 -1248 318575.000 1030922.222 -1249 318600.000 886994.444 -1250 318602.778 903958.333 -1251 318636.111 922958.333 -1252 318736.111 897336.111 -1253 318780.556 854497.222 -1254 318866.667 889838.889 -1255 318872.222 1002913.889 -1256 318911.111 851455.556 -1257 318922.222 1004844.444 -1258 318933.333 931180.556 -1259 318938.889 967144.444 -1260 318972.222 986033.333 -1261 319002.778 842519.444 -1262 319027.778 922430.556 -1263 319036.111 943950.000 -1264 319119.444 1118805.556 -1265 319133.333 877358.333 -1266 319230.556 976563.889 -1267 319252.778 926394.444 -1268 319291.667 826797.222 -1269 319363.889 819286.111 -1270 319380.556 813036.111 -1271 319436.111 942438.889 -1272 319508.333 834563.889 -1273 319563.889 999619.444 -1274 319608.333 909838.889 -1275 319616.667 898700.000 -1276 319633.333 837825.000 -1277 319636.111 952702.778 -1278 319655.556 940536.111 -1279 319677.778 1102938.889 -1280 319752.778 939977.778 -1281 319788.889 892872.222 -1282 319808.333 916555.556 -1283 319827.778 980333.333 -1284 319844.444 865786.111 -1285 319872.222 903569.444 -1286 319894.444 832002.778 -1287 319908.333 872905.556 -1288 319919.444 833069.444 -1289 319972.222 1020775.000 -1290 320000.000 808458.333 -1291 320038.889 1066052.778 -1292 320108.333 971297.222 -1293 320147.222 933419.444 -1294 320166.667 929091.667 -1295 320172.222 830627.778 -1296 320216.667 937141.667 -1297 320263.889 921388.889 -1298 320333.333 810500.000 -1299 320333.333 895222.222 -1300 320338.889 843927.778 -1301 320355.556 825083.333 -1302 320375.000 937000.000 -1303 320400.000 887280.556 -1304 320491.667 916580.556 -1305 320497.222 921091.667 -1306 320525.000 955061.111 -1307 320677.778 829008.333 -1308 320722.222 842327.778 -1309 320725.000 912408.333 -1310 320736.111 829147.222 -1311 320800.000 968063.889 -1312 320833.333 811000.000 -1313 320850.000 983416.667 -1314 320852.778 932200.000 -1315 320866.667 821180.556 -1316 320877.778 846675.000 -1317 320883.333 954716.667 -1318 320894.444 882219.444 -1319 320913.889 837955.556 -1320 320919.444 967155.556 -1321 320952.778 964686.111 -1322 320958.333 989633.333 -1323 320961.111 902941.667 -1324 321094.444 906233.333 -1325 321100.000 835011.111 -1326 321141.667 811541.667 -1327 321152.778 812472.222 -1328 321244.444 969450.000 -1329 321261.111 991650.000 -1330 321291.667 1017880.556 -1331 321322.222 812991.667 -1332 321330.556 962275.000 -1333 321358.333 816222.222 -1334 321397.222 953200.000 -1335 321438.889 960908.333 -1336 321441.667 857150.000 -1337 321444.444 951202.778 -1338 321469.444 827780.556 -1339 321488.889 811633.333 -1340 321530.556 947991.667 -1341 321533.333 901311.111 -1342 321558.333 819338.889 -1343 321572.222 943372.222 -1344 321594.444 971497.222 -1345 321613.889 819041.667 -1346 321630.556 917205.556 -1347 321686.111 882825.000 -1348 321694.444 960122.222 -1349 321811.111 821091.667 -1350 321838.889 865802.778 -1351 321838.889 968844.444 -1352 321872.222 825658.333 -1353 321975.000 831777.778 -1354 321994.444 1109677.778 -1355 322019.444 839086.111 -1356 322041.667 823219.444 -1357 322047.222 958552.778 -1358 322094.444 997963.889 -1359 322136.111 986702.778 -1360 322161.111 807527.778 -1361 322175.000 824136.111 -1362 322205.556 982019.444 -1363 322216.667 1109258.333 -1364 322252.778 950575.000 -1365 322266.667 952252.778 -1366 322333.333 973741.667 -1367 322344.444 977550.000 -1368 322369.444 808605.556 -1369 322380.556 843091.667 -1370 322386.111 949402.778 -1371 322411.111 927158.333 -1372 322416.667 854163.889 -1373 322427.778 944552.778 -1374 322502.778 1014783.333 -1375 322527.778 1098313.889 -1376 322591.667 904225.000 -1377 322613.889 837366.667 -1378 322663.889 876252.778 -1379 322686.111 1077580.556 -1380 322700.000 1068002.778 -1381 322730.556 899858.333 -1382 322744.444 949783.333 -1383 322766.667 927233.333 -1384 322783.333 957494.444 -1385 322816.667 938238.889 -1386 322836.111 834722.222 -1387 322861.111 1040952.778 -1388 322869.444 810808.333 -1389 322936.111 840611.111 -1390 322958.333 812355.556 -1391 322963.889 1013058.333 -1392 322986.111 901847.222 -1393 323050.000 840275.000 -1394 323052.778 847727.778 -1395 323061.111 877980.556 -1396 323061.111 924502.778 -1397 323069.444 960063.889 -1398 323077.778 954797.222 -1399 323088.889 917747.222 -1400 323094.444 901388.889 -1401 323122.222 1067777.778 -1402 323127.778 897983.333 -1403 323130.556 970113.889 -1404 323158.333 945163.889 -1405 323175.000 890255.556 -1406 323186.111 1025452.778 -1407 323188.889 845172.222 -1408 323202.778 962127.778 -1409 323211.111 891633.333 -1410 323283.333 932797.222 -1411 323291.667 966250.000 -1412 323300.000 906055.556 -1413 323344.444 961511.111 -1414 323361.111 813916.667 -1415 323413.889 903216.667 -1416 323430.556 893286.111 -1417 323475.000 973863.889 -1418 323491.667 904600.000 -1419 323502.778 1087080.556 -1420 323511.111 953008.333 -1421 323525.000 908777.778 -1422 323536.111 896544.444 -1423 323641.667 887036.111 -1424 323644.444 894741.667 -1425 323663.889 961005.556 -1426 323666.667 863000.000 -1427 323694.444 841880.556 -1428 323716.667 1128600.000 -1429 323769.444 825925.000 -1430 323788.889 806927.778 -1431 323794.444 816633.333 -1432 323808.333 1064788.889 -1433 323863.889 968480.556 -1434 323866.667 833547.222 -1435 323880.556 989788.889 -1436 323880.556 1008641.667 -1437 323938.889 993938.889 -1438 323966.667 973236.111 -1439 323969.444 820602.778 -1440 323969.444 908563.889 -1441 324013.889 988172.222 -1442 324058.333 994933.333 -1443 324063.889 972113.889 -1444 324066.667 887772.222 -1445 324072.222 870211.111 -1446 324083.333 911866.667 -1447 324111.111 1007119.444 -1448 324172.222 886477.778 -1449 324205.556 1042283.333 -1450 324238.889 856916.667 -1451 324283.333 901322.222 -1452 324311.111 966675.000 -1453 324313.889 806700.000 -1454 324322.222 830613.889 -1455 324333.333 971022.222 -1456 324338.889 866547.222 -1457 324355.556 807241.667 -1458 324366.667 1112247.222 -1459 324372.222 1031586.111 -1460 324388.889 891083.333 -1461 324419.444 822152.778 -1462 324419.444 977938.889 -1463 324425.000 962297.222 -1464 324452.778 949483.333 -1465 324458.333 1005383.333 -1466 324486.111 817833.333 -1467 324486.111 997327.778 -1468 324488.889 975263.889 -1469 324494.444 875141.667 -1470 324561.111 839402.778 -1471 324575.000 914930.556 -1472 324575.000 998711.111 -1473 324580.556 837316.667 -1474 324608.333 849877.778 -1475 324613.889 973877.778 -1476 324616.667 901152.778 -1477 324638.889 864597.222 -1478 324697.222 986786.111 -1479 324705.556 1000125.000 -1480 324708.333 850008.333 -1481 324708.333 1004055.556 -1482 324772.222 917547.222 -1483 324786.111 940594.444 -1484 324797.222 863619.444 -1485 324805.556 809805.556 -1486 324822.222 969941.667 -1487 324861.111 882963.889 -1488 324955.556 849919.444 -1489 325005.556 947402.778 -1490 325041.667 945738.889 -1491 325091.667 921191.667 -1492 325116.667 863766.667 -1493 325155.556 954091.667 -1494 325158.333 921916.667 -1495 325158.333 937319.444 -1496 325175.000 878363.889 -1497 325175.000 968041.667 -1498 325183.333 921475.000 -1499 325230.556 926377.778 -1500 325247.222 956369.444 -1501 325250.000 937500.000 -1502 325263.889 968861.111 -1503 325275.000 927138.889 -1504 325294.444 949027.778 -1505 325300.000 925141.667 -1506 325305.556 825894.444 -1507 325325.000 935038.889 -1508 325338.889 966652.778 -1509 325344.444 927883.333 -1510 325355.556 934108.333 -1511 325358.333 858933.333 -1512 325380.556 819325.000 -1513 325402.778 829038.889 -1514 325419.444 973205.556 -1515 325430.556 903091.667 -1516 325436.111 862119.444 -1517 325438.889 930527.778 -1518 325447.222 943672.222 -1519 325480.556 828719.444 -1520 325488.889 929200.000 -1521 325497.222 858700.000 -1522 325519.444 984977.778 -1523 325536.111 838875.000 -1524 325563.889 958630.556 -1525 325569.444 842383.333 -1526 325597.222 840963.889 -1527 325605.556 856725.000 -1528 325630.556 971413.889 -1529 325788.889 973622.222 -1530 325808.333 938925.000 -1531 325827.778 821552.778 -1532 325836.111 951086.111 -1533 325838.889 1171122.222 -1534 325841.667 881872.222 -1535 325883.333 952038.889 -1536 325883.333 965083.333 -1537 325888.889 963086.111 -1538 325888.889 966850.000 -1539 325897.222 968566.667 -1540 325908.333 926477.778 -1541 325919.444 967558.333 -1542 325936.111 948552.778 -1543 325963.889 1147088.889 -1544 325972.222 823338.889 -1545 325997.222 1106302.778 -1546 326038.889 914777.778 -1547 326055.556 832455.556 -1548 326097.222 854808.333 -1549 326108.333 1107702.778 -1550 326119.444 998138.889 -1551 326125.000 900366.667 -1552 326152.778 932866.667 -1553 326208.333 836000.000 -1554 326277.778 964555.556 -1555 326308.333 972888.889 -1556 326322.222 873191.667 -1557 326352.778 860344.444 -1558 326394.444 965380.556 -1559 326400.000 1170833.333 -1560 326408.333 903647.222 -1561 326452.778 853783.333 -1562 326466.667 972255.556 -1563 326491.667 967127.778 -1564 326516.667 969080.556 -1565 326536.111 837597.222 -1566 326550.000 799405.556 -1567 326591.667 836188.889 -1568 326630.556 954880.556 -1569 326652.778 1071525.000 -1570 326727.778 1141461.111 -1571 326730.556 974602.778 -1572 326733.333 957091.667 -1573 326775.000 845394.444 -1574 326780.556 1170983.333 -1575 326788.889 1154980.556 -1576 326833.333 847383.333 -1577 326858.333 1171822.222 -1578 326875.000 833466.667 -1579 326875.000 939608.333 -1580 326900.000 808508.333 -1581 326947.222 937416.667 -1582 326958.333 976019.444 -1583 326961.111 920858.333 -1584 326980.556 958850.000 -1585 326988.889 926566.667 -1586 326991.667 1081313.889 -1587 327025.000 1031355.556 -1588 327027.778 971550.000 -1589 327044.444 875958.333 -1590 327091.667 960080.556 -1591 327141.667 971561.111 -1592 327152.778 1171563.889 -1593 327169.444 1168752.778 -1594 327188.889 1026444.444 -1595 327213.889 1091047.222 -1596 327216.667 840133.333 -1597 327225.000 1106400.000 -1598 327233.333 992969.444 -1599 327252.778 973205.556 -1600 327252.778 1146236.111 -1601 327286.111 949422.222 -1602 327286.111 966225.000 -1603 327291.667 827200.000 -1604 327308.333 1155288.889 -1605 327341.667 802419.444 -1606 327358.333 962750.000 -1607 327361.111 968866.667 -1608 327375.000 1019505.556 -1609 327425.000 1170305.556 -1610 327438.889 939713.889 -1611 327447.222 974133.333 -1612 327458.333 969975.000 -1613 327480.556 964716.667 -1614 327502.778 816369.444 -1615 327547.222 812422.222 -1616 327555.556 989019.444 -1617 327558.333 1115541.667 -1618 327563.889 998958.333 -1619 327572.222 943450.000 -1620 327572.222 974105.556 -1621 327577.778 848750.000 -1622 327591.667 977969.444 -1623 327594.444 974580.556 -1624 327616.667 1081300.000 -1625 327630.556 802502.778 -1626 327675.000 886508.333 -1627 327677.778 1170222.222 -1628 327700.000 1082797.222 -1629 327713.889 891166.667 -1630 327733.333 924055.556 -1631 327750.000 917925.000 -1632 327763.889 799311.111 -1633 327786.111 919141.667 -1634 327794.444 1081497.222 -1635 327833.333 968000.000 -1636 327852.778 800352.778 -1637 327872.222 845619.444 -1638 327883.333 868716.667 -1639 327888.889 851450.000 -1640 327916.667 930555.556 -1641 327919.444 1155622.222 -1642 327927.778 956341.667 -1643 327930.556 1156902.778 -1644 327938.889 798627.778 -1645 327947.222 1169616.667 -1646 327958.333 954508.333 -1647 327961.111 851838.889 -1648 327963.889 965605.556 -1649 327994.444 972688.889 -1650 328000.000 947205.556 -1651 328002.778 856536.111 -1652 328038.889 819494.444 -1653 328041.667 911700.000 -1654 328047.222 974447.222 -1655 328058.333 974027.778 -1656 328083.333 981125.000 -1657 328111.111 831727.778 -1658 328111.111 1153794.444 -1659 328138.889 969486.111 -1660 328158.333 972277.778 -1661 328188.889 822350.000 -1662 328191.667 934175.000 -1663 328202.778 851722.222 -1664 328219.444 926577.778 -1665 328233.333 971702.778 -1666 328266.667 830794.444 -1667 328280.556 884763.889 -1668 328311.111 857636.111 -1669 328338.889 1097069.444 -1670 328341.667 972286.111 -1671 328344.444 852297.222 -1672 328363.889 964747.222 -1673 328383.333 1169730.556 -1674 328386.111 866294.444 -1675 328402.778 851833.333 -1676 328405.556 836325.000 -1677 328405.556 878875.000 -1678 328422.222 1044027.778 -1679 328438.889 971427.778 -1680 328466.667 852100.000 -1681 328475.000 1155686.111 -1682 328491.667 1097586.111 -1683 328502.778 810794.444 -1684 328516.667 800366.667 -1685 328519.444 1004652.778 -1686 328544.444 799750.000 -1687 328550.000 904055.556 -1688 328563.889 973386.111 -1689 328572.222 1169213.889 -1690 328577.778 972544.444 -1691 328597.222 846200.000 -1692 328600.000 973636.111 -1693 328666.667 824041.667 -1694 328677.778 843305.556 -1695 328686.111 851905.556 -1696 328708.333 811097.222 -1697 328713.889 939872.222 -1698 328744.444 957652.778 -1699 328763.889 877425.000 -1700 328777.778 851833.333 -1701 328794.444 1117566.667 -1702 328808.333 971547.222 -1703 328819.444 833325.000 -1704 328833.333 816583.333 -1705 328836.111 899713.889 -1706 328847.222 1001261.111 -1707 328880.556 843266.667 -1708 328927.778 934483.333 -1709 328936.111 960291.667 -1710 328950.000 975455.556 -1711 328961.111 1098269.444 -1712 328997.222 854011.111 -1713 328997.222 945561.111 -1714 329013.889 922419.444 -1715 329027.778 965636.111 -1716 329050.000 806669.444 -1717 329050.000 936966.667 -1718 329063.889 908780.556 -1719 329102.778 961352.778 -1720 329155.556 867158.333 -1721 329183.333 800222.222 -1722 329191.667 916769.444 -1723 329252.778 811875.000 -1724 329263.889 968958.333 -1725 329311.111 964594.444 -1726 329327.778 843494.444 -1727 329341.667 970777.778 -1728 329344.444 972513.889 -1729 329358.333 828116.667 -1730 329372.222 871647.222 -1731 329411.111 971338.889 -1732 329438.889 859538.889 -1733 329438.889 1033480.556 -1734 329441.667 1025644.444 -1735 329444.444 871386.111 -1736 329452.778 998025.000 -1737 329477.778 1127161.111 -1738 329480.556 967294.444 -1739 329536.111 968900.000 -1740 329544.444 970147.222 -1741 329572.222 952900.000 -1742 329572.222 1057419.444 -1743 329588.889 812366.667 -1744 329594.444 1172644.444 -1745 329597.222 867466.667 -1746 329616.667 968288.889 -1747 329619.444 931400.000 -1748 329627.778 1170350.000 -1749 329636.111 1018322.222 -1750 329644.444 1028286.111 -1751 329688.889 934505.556 -1752 329700.000 899122.222 -1753 329719.444 1107758.333 -1754 329738.889 908244.444 -1755 329750.000 817577.778 -1756 329750.000 963322.222 -1757 329761.111 965950.000 -1758 329777.778 1059413.889 -1759 329777.778 1115169.444 -1760 329783.333 885700.000 -1761 329786.111 1155294.444 -1762 329808.333 800327.778 -1763 329813.889 828102.778 -1764 329836.111 845827.778 -1765 329855.556 801100.000 -1766 329875.000 1107702.778 -1767 329911.111 1172702.778 -1768 329922.222 890661.111 -1769 329950.000 975425.000 -1770 329952.778 949655.556 -1771 329975.000 876300.000 -1772 329983.333 946305.556 -1773 330013.889 824113.889 -1774 330038.889 972255.556 -1775 330047.222 1107847.222 -1776 330066.667 801555.556 -1777 330077.778 813086.111 -1778 330122.222 943652.778 -1779 330136.111 927250.000 -1780 330144.444 970966.667 -1781 330150.000 966127.778 -1782 330161.111 927241.667 -1783 330183.333 801758.333 -1784 330197.222 966986.111 -1785 330202.778 1172019.444 -1786 330308.333 850611.111 -1787 330313.889 1113866.667 -1788 330316.667 947216.667 -1789 330341.667 839383.333 -1790 330369.444 1172911.111 -1791 330372.222 1156205.556 -1792 330391.667 850313.889 -1793 330394.444 921825.000 -1794 330483.333 1166300.000 -1795 330508.333 1092955.556 -1796 330544.444 841558.333 -1797 330569.444 1109100.000 -1798 330572.222 915733.333 -1799 330575.000 895875.000 -1800 330605.556 954719.444 -1801 330655.556 860533.333 -1802 330655.556 962275.000 -1803 330677.778 1093594.444 -1804 330680.556 1173025.000 -1805 330738.889 1060180.556 -1806 330750.000 898544.444 -1807 330766.667 1117386.111 -1808 330786.111 868816.667 -1809 330786.111 1093647.222 -1810 330786.111 1166011.111 -1811 330800.000 832322.222 -1812 330847.222 972958.333 -1813 330897.222 820158.333 -1814 330916.667 970463.889 -1815 330955.556 803155.556 -1816 330980.556 936547.222 -1817 331002.778 934608.333 -1818 331005.556 868641.667 -1819 331027.778 867536.111 -1820 331030.556 966702.778 -1821 331052.778 885608.333 -1822 331075.000 923347.222 -1823 331094.444 912619.444 -1824 331130.556 900530.556 -1825 331136.111 941641.667 -1826 331150.000 1043263.889 -1827 331180.556 871250.000 -1828 331191.667 970252.778 -1829 331191.667 1170855.556 -1830 331211.111 971830.556 -1831 331213.889 855663.889 -1832 331236.111 890550.000 -1833 331255.556 1155133.333 -1834 331280.556 919611.111 -1835 331283.333 1072522.222 -1836 331294.444 881513.889 -1837 331333.333 1002269.444 -1838 331372.222 958391.667 -1839 331386.111 1101244.444 -1840 331408.333 919938.889 -1841 331433.333 1171652.778 -1842 331480.556 959511.111 -1843 331486.111 941500.000 -1844 331505.556 968233.333 -1845 331511.111 853722.222 -1846 331575.000 997333.333 -1847 331575.000 1057736.111 -1848 331580.556 1173497.222 -1849 331611.111 983852.778 -1850 331633.333 963597.222 -1851 331650.000 970291.667 -1852 331655.556 919413.889 -1853 331666.667 1017933.333 -1854 331688.889 908538.889 -1855 331730.556 849150.000 -1856 331730.556 862516.667 -1857 331780.556 866072.222 -1858 331786.111 991772.222 -1859 331800.000 964977.778 -1860 331805.556 947438.889 -1861 331811.111 1022738.889 -1862 331827.778 902227.778 -1863 331841.667 904891.667 -1864 331844.444 998933.333 -1865 331886.111 952211.111 -1866 331908.333 1013777.778 -1867 331938.889 987383.333 -1868 331958.333 800133.333 -1869 331958.333 1173786.111 -1870 331972.222 1043725.000 -1871 331975.000 966150.000 -1872 332000.000 1172416.667 -1873 332030.556 946800.000 -1874 332075.000 823919.444 -1875 332075.000 926661.111 -1876 332097.222 875691.667 -1877 332100.000 847444.444 -1878 332100.000 977544.444 -1879 332144.444 804480.556 -1880 332183.333 981583.333 -1881 332183.333 1170333.333 -1882 332280.556 917975.000 -1883 332288.889 875772.222 -1884 332333.333 825955.556 -1885 332341.667 864836.111 -1886 332341.667 975858.333 -1887 332344.444 885822.222 -1888 332347.222 848358.333 -1889 332361.111 968008.333 -1890 332377.778 915113.889 -1891 332400.000 1155180.556 -1892 332436.111 842288.889 -1893 332441.667 868163.889 -1894 332447.222 813588.889 -1895 332466.667 842641.667 -1896 332469.444 958997.222 -1897 332480.556 1005733.333 -1898 332511.111 808158.333 -1899 332558.333 1163741.667 -1900 332569.444 1033172.222 -1901 332611.111 938852.778 -1902 332613.889 972377.778 -1903 332619.444 905922.222 -1904 332652.778 842816.667 -1905 332666.667 892908.333 -1906 332669.444 932391.667 -1907 332697.222 908797.222 -1908 332736.111 858361.111 -1909 332755.556 829763.889 -1910 332775.000 850980.556 -1911 332780.556 863550.000 -1912 332858.333 965725.000 -1913 332938.889 1110955.556 -1914 332941.667 961944.444 -1915 332944.444 839661.111 -1916 332958.333 977986.111 -1917 332961.111 868436.111 -1918 332969.444 810350.000 -1919 332975.000 914936.111 -1920 333022.222 845538.889 -1921 333041.667 969858.333 -1922 333047.222 836833.333 -1923 333061.111 1118405.556 -1924 333088.889 854847.222 -1925 333100.000 891727.778 -1926 333105.556 857544.444 -1927 333138.889 820969.444 -1928 333158.333 926627.778 -1929 333200.000 879027.778 -1930 333208.333 902322.222 -1931 333225.000 804138.889 -1932 333225.000 811425.000 -1933 333244.444 967841.667 -1934 333266.667 833886.111 -1935 333286.111 912816.667 -1936 333288.889 925383.333 -1937 333288.889 1056038.889 -1938 333316.667 1056725.000 -1939 333319.444 897411.111 -1940 333327.778 943425.000 -1941 333369.444 1022061.111 -1942 333427.778 1183269.444 -1943 333438.889 864380.556 -1944 333452.778 1104525.000 -1945 333458.333 841091.667 -1946 333477.778 932097.222 -1947 333486.111 806830.556 -1948 333488.889 965483.333 -1949 333505.556 847766.667 -1950 333513.889 932955.556 -1951 333527.778 1117883.333 -1952 333536.111 905925.000 -1953 333577.778 812708.333 -1954 333583.333 935775.000 -1955 333583.333 976944.444 -1956 333625.000 951044.444 -1957 333630.556 971736.111 -1958 333647.222 927247.222 -1959 333652.778 934950.000 -1960 333702.778 1125830.556 -1961 333705.556 960686.111 -1962 333705.556 987525.000 -1963 333708.333 1119622.222 -1964 333733.333 956880.556 -1965 333763.889 1172502.778 -1966 333766.667 792947.222 -1967 333783.333 880152.778 -1968 333794.444 962472.222 -1969 333805.556 847997.222 -1970 333869.444 842830.556 -1971 333941.667 1045225.000 -1972 333941.667 1107858.333 -1973 333944.444 803475.000 -1974 333963.889 969602.778 -1975 333966.667 845958.333 -1976 333991.667 1108680.556 -1977 334016.667 869544.444 -1978 334025.000 814202.778 -1979 334052.778 908975.000 -1980 334069.444 826622.222 -1981 334100.000 910616.667 -1982 334111.111 930694.444 -1983 334111.111 1108419.444 -1984 334130.556 823852.778 -1985 334144.444 823127.778 -1986 334147.222 1119086.111 -1987 334150.000 1115488.889 -1988 334152.778 886438.889 -1989 334180.556 998186.111 -1990 334208.333 821622.222 -1991 334213.889 816858.333 -1992 334213.889 965769.444 -1993 334222.222 1118219.444 -1994 334247.222 959461.111 -1995 334250.000 940475.000 -1996 334255.556 869266.667 -1997 334266.667 941061.111 -1998 334269.444 1176111.111 -1999 334305.556 963383.333 -2000 334336.111 841488.889 -2001 334341.667 869472.222 -2002 334352.778 1122972.222 -2003 334352.778 1123575.000 -2004 334355.556 1123488.889 -2005 334358.333 861058.333 -2006 334372.222 1016430.556 -2007 334416.667 940375.000 -2008 334433.333 895716.667 -2009 334472.222 841469.444 -2010 334483.333 1120733.333 -2011 334486.111 844550.000 -2012 334486.111 867877.778 -2013 334491.667 996225.000 -2014 334500.000 905055.556 -2015 334500.000 1122586.111 -2016 334502.778 821983.333 -2017 334502.778 888183.333 -2018 334508.333 906550.000 -2019 334511.111 795611.111 -2020 334511.111 869966.667 -2021 334516.667 811255.556 -2022 334538.889 910072.222 -2023 334561.111 1024888.889 -2024 334597.222 944152.778 -2025 334613.889 869088.889 -2026 334636.111 1176783.333 -2027 334661.111 942883.333 -2028 334666.667 820166.667 -2029 334666.667 969180.556 -2030 334669.444 1176972.222 -2031 334672.222 995241.667 -2032 334705.556 825047.222 -2033 334705.556 952136.111 -2034 334750.000 804866.667 -2035 334763.889 1008552.778 -2036 334819.444 897280.556 -2037 334916.667 808558.333 -2038 334933.333 1123572.222 -2039 334936.111 1171475.000 -2040 334938.889 849138.889 -2041 334950.000 903197.222 -2042 334955.556 884272.222 -2043 334966.667 812794.444 -2044 334966.667 818922.222 -2045 335005.556 1177422.222 -2046 335016.667 819652.778 -2047 335016.667 1176616.667 -2048 335044.444 818691.667 -2049 335058.333 1020086.111 -2050 335086.111 946161.111 -2051 335086.111 966119.444 -2052 335091.667 1118983.333 -2053 335127.778 963922.222 -2054 335172.222 820758.333 -2055 335177.778 818441.667 -2056 335180.556 899205.556 -2057 335200.000 964836.111 -2058 335205.556 868025.000 -2059 335213.889 798788.889 -2060 335213.889 843538.889 -2061 335225.000 1177066.667 -2062 335252.778 914358.333 -2063 335261.111 953155.556 -2064 335308.333 805722.222 -2065 335308.333 819450.000 -2066 335311.111 1119419.444 -2067 335316.667 811233.333 -2068 335358.333 869972.222 -2069 335377.778 852533.333 -2070 335377.778 924697.222 -2071 335380.556 867072.222 -2072 335386.111 1121852.778 -2073 335400.000 891241.667 -2074 335405.556 892669.444 -2075 335422.222 1177822.222 -2076 335441.667 842338.889 -2077 335452.778 1055716.667 -2078 335461.111 957255.556 -2079 335480.556 865444.444 -2080 335508.333 790416.667 -2081 335508.333 818041.667 -2082 335519.444 947808.333 -2083 335538.889 828961.111 -2084 335552.778 890847.222 -2085 335575.000 807147.222 -2086 335588.889 978483.333 -2087 335602.778 817197.222 -2088 335605.556 1171572.222 -2089 335613.889 969108.333 -2090 335633.333 880813.889 -2091 335636.111 818080.556 -2092 335655.556 813036.111 -2093 335669.444 845811.111 -2094 335700.000 868963.889 -2095 335716.667 1160763.889 -2096 335725.000 844133.333 -2097 335750.000 838938.889 -2098 335755.556 831825.000 -2099 335772.222 961780.556 -2100 335772.222 962730.556 -2101 335777.778 1018547.222 -2102 335805.556 1122366.667 -2103 335808.333 799891.667 -2104 335830.556 843394.444 -2105 335833.333 867727.778 -2106 335833.333 959097.222 -2107 335844.444 928341.667 -2108 335861.111 862861.111 -2109 335869.444 845425.000 -2110 335869.444 879844.444 -2111 335872.222 1023775.000 -2112 335908.333 864908.333 -2113 335938.889 1123022.222 -2114 335941.667 992600.000 -2115 335955.556 834680.556 -2116 335955.556 986252.778 -2117 335966.667 838602.778 -2118 335975.000 1122711.111 -2119 335991.667 797444.444 -2120 335991.667 963663.889 -2121 336000.000 1176711.111 -2122 336008.333 869561.111 -2123 336016.667 907736.111 -2124 336047.222 867938.889 -2125 336058.333 789733.333 -2126 336063.889 843352.778 -2127 336075.000 886502.778 -2128 336077.778 927400.000 -2129 336080.556 803513.889 -2130 336086.111 912066.667 -2131 336102.778 964105.556 -2132 336102.778 1145955.556 -2133 336105.556 950525.000 -2134 336105.556 1145730.556 -2135 336125.000 920644.444 -2136 336125.000 1177119.444 -2137 336130.556 859611.111 -2138 336130.556 1123238.889 -2139 336141.667 858350.000 -2140 336155.556 811022.222 -2141 336188.889 838675.000 -2142 336188.889 1179280.556 -2143 336197.222 866088.889 -2144 336205.556 869713.889 -2145 336213.889 858441.667 -2146 336219.444 843691.667 -2147 336258.333 836125.000 -2148 336258.333 1176927.778 -2149 336261.111 859188.889 -2150 336288.889 913994.444 -2151 336288.889 917908.333 -2152 336288.889 919313.889 -2153 336305.556 1123325.000 -2154 336330.556 897111.111 -2155 336355.556 966086.111 -2156 336358.333 972225.000 -2157 336386.111 1173430.556 -2158 336411.111 1179177.778 -2159 336416.667 1058766.667 -2160 336416.667 1172900.000 -2161 336447.222 843258.333 -2162 336455.556 859125.000 -2163 336488.889 855875.000 -2164 336516.667 973761.111 -2165 336522.222 813613.889 -2166 336533.333 844494.444 -2167 336561.111 837183.333 -2168 336561.111 969066.667 -2169 336597.222 858316.667 -2170 336597.222 876000.000 -2171 336600.000 844102.778 -2172 336600.000 868127.778 -2173 336600.000 1012375.000 -2174 336602.778 1179983.333 -2175 336608.333 955552.778 -2176 336613.889 952663.889 -2177 336613.889 953855.556 -2178 336647.222 791027.778 -2179 336663.889 1016825.000 -2180 336669.444 935913.889 -2181 336675.000 798308.333 -2182 336675.000 840177.778 -2183 336694.444 1178222.222 -2184 336705.556 1015347.222 -2185 336741.667 941311.111 -2186 336741.667 1013872.222 -2187 336772.222 863966.667 -2188 336794.444 844394.444 -2189 336802.778 1161730.556 -2190 336833.333 789986.111 -2191 336844.444 878308.333 -2192 336861.111 864750.000 -2193 336888.889 788869.444 -2194 336888.889 1019977.778 -2195 336938.889 817672.222 -2196 336950.000 802111.111 -2197 336986.111 858397.222 -2198 337038.889 907263.889 -2199 337066.667 840316.667 -2200 337072.222 842719.444 -2201 337091.667 1171963.889 -2202 337091.667 1179527.778 -2203 337122.222 841052.778 -2204 337133.333 873886.111 -2205 337205.556 1162147.222 -2206 337211.111 851455.556 -2207 337213.889 1163875.000 -2208 337244.444 926155.556 -2209 337258.333 905513.889 -2210 337286.111 870902.778 -2211 337305.556 872844.444 -2212 337319.444 849191.667 -2213 337366.667 827394.444 -2214 337369.444 850325.000 -2215 337372.222 1018361.111 -2216 337380.556 810980.556 -2217 337397.222 1164119.444 -2218 337413.889 1181038.889 -2219 337430.556 1171083.333 -2220 337444.444 852880.556 -2221 337444.444 861558.333 -2222 337455.556 1178669.444 -2223 337458.333 1171741.667 -2224 337458.333 1178252.778 -2225 337475.000 1169711.111 -2226 337480.556 868086.111 -2227 337488.889 843880.556 -2228 337519.444 858113.889 -2229 337536.111 794477.778 -2230 337547.222 842675.000 -2231 337555.556 965363.889 -2232 337569.444 881088.889 -2233 337569.444 1183530.556 -2234 337591.667 966691.667 -2235 337591.667 1180058.333 -2236 337597.222 871833.333 -2237 337669.444 1181883.333 -2238 337688.889 898083.333 -2239 337713.889 842672.222 -2240 337733.333 868138.889 -2241 337738.889 1179405.556 -2242 337747.222 842963.889 -2243 337750.000 864716.667 -2244 337786.111 907213.889 -2245 337788.889 924916.667 -2246 337797.222 1164644.444 -2247 337802.778 843361.111 -2248 337825.000 1172277.778 -2249 337833.333 860025.000 -2250 337838.889 1169577.778 -2251 337855.556 1180841.667 -2252 337866.667 977255.556 -2253 337877.778 1178522.222 -2254 337877.778 1183572.222 -2255 337894.444 819297.222 -2256 337897.222 842641.667 -2257 337902.778 843061.111 -2258 337913.889 908569.444 -2259 337922.222 824791.667 -2260 337922.222 1183141.667 -2261 337936.111 842061.111 -2262 337938.889 846605.556 -2263 337947.222 837133.333 -2264 338005.556 1183891.667 -2265 338013.889 1171450.000 -2266 338025.000 851886.111 -2267 338025.000 933808.333 -2268 338025.000 1179922.222 -2269 338030.556 1180716.667 -2270 338080.556 841702.778 -2271 338094.444 842397.222 -2272 338094.444 905263.889 -2273 338111.111 1021633.333 -2274 338125.000 846344.444 -2275 338136.111 857613.889 -2276 338136.111 924127.778 -2277 338141.667 868094.444 -2278 338144.444 1178122.222 -2279 338161.111 986947.222 -2280 338169.444 811011.111 -2281 338169.444 1180363.889 -2282 338172.222 981950.000 -2283 338177.778 794494.444 -2284 338180.556 867427.778 -2285 338186.111 845825.000 -2286 338200.000 1163894.444 -2287 338247.222 870861.111 -2288 338250.000 885436.111 -2289 338302.778 1165444.444 -2290 338311.111 872775.000 -2291 338313.889 1180719.444 -2292 338313.889 1182811.111 -2293 338319.444 818011.111 -2294 338322.222 1018425.000 -2295 338333.333 1119500.000 -2296 338352.778 1179136.111 -2297 338358.333 790480.556 -2298 338358.333 1183397.222 -2299 338369.444 1099636.111 -2300 338388.889 839008.333 -2301 338388.889 907261.111 -2302 338452.778 816619.444 -2303 338463.889 1180458.333 -2304 338491.667 1183875.000 -2305 338530.556 965022.222 -2306 338533.333 910277.778 -2307 338536.111 1181330.556 -2308 338544.444 842172.222 -2309 338552.778 893113.889 -2310 338555.556 892844.444 -2311 338572.222 840200.000 -2312 338575.000 1154863.889 -2313 338594.444 846838.889 -2314 338622.222 1183986.111 -2315 338627.778 834088.889 -2316 338650.000 843366.667 -2317 338658.333 1180822.222 -2318 338675.000 827413.889 -2319 338675.000 1179972.222 -2320 338694.444 1015969.444 -2321 338702.778 1179244.444 -2322 338708.333 797555.556 -2323 338722.222 1178694.444 -2324 338752.778 1175655.556 -2325 338755.556 847622.222 -2326 338755.556 891772.222 -2327 338766.667 806930.556 -2328 338780.556 907272.222 -2329 338780.556 1175200.000 -2330 338816.667 1181161.111 -2331 338838.889 845144.444 -2332 338847.222 1184100.000 -2333 338869.444 914916.667 -2334 338883.333 1183080.556 -2335 338886.111 1178122.222 -2336 338894.444 1181588.889 -2337 338900.000 841430.556 -2338 338905.556 800186.111 -2339 338916.667 875261.111 -2340 338919.444 842988.889 -2341 338955.556 948261.111 -2342 338958.333 1182191.667 -2343 338966.667 979361.111 -2344 338980.556 842833.333 -2345 338983.333 889991.667 -2346 339016.667 881344.444 -2347 339022.222 1180808.333 -2348 339055.556 914988.889 -2349 339077.778 815475.000 -2350 339102.778 811047.222 -2351 339108.333 811358.333 -2352 339133.333 822936.111 -2353 339136.111 984930.556 -2354 339163.889 815136.111 -2355 339163.889 845447.222 -2356 339163.889 1183516.667 -2357 339166.667 928480.556 -2358 339166.667 1178991.667 -2359 339172.222 1023244.444 -2360 339172.222 1180111.111 -2361 339175.000 797441.667 -2362 339191.667 1184155.556 -2363 339202.778 803416.667 -2364 339202.778 1172777.778 -2365 339208.333 931538.889 -2366 339213.889 780205.556 -2367 339236.111 848408.333 -2368 339241.667 843786.111 -2369 339244.444 860225.000 -2370 339255.556 1168755.556 -2371 339288.889 878172.222 -2372 339294.444 1169763.889 -2373 339302.778 1182105.556 -2374 339319.444 1179452.778 -2375 339344.444 964283.333 -2376 339352.778 799327.778 -2377 339369.444 971163.889 -2378 339380.556 1183516.667 -2379 339383.333 943569.444 -2380 339397.222 862016.667 -2381 339400.000 1172427.778 -2382 339400.000 1181316.667 -2383 339411.111 842136.111 -2384 339427.778 918433.333 -2385 339441.667 909450.000 -2386 339455.556 938469.444 -2387 339461.111 843347.222 -2388 339472.222 903441.667 -2389 339472.222 1180844.444 -2390 339480.556 864727.778 -2391 339491.667 835347.222 -2392 339508.333 907677.778 -2393 339513.889 986683.333 -2394 339533.333 1173952.778 -2395 339547.222 860419.444 -2396 339561.111 839880.556 -2397 339583.333 921900.000 -2398 339605.556 1181844.444 -2399 339608.333 833780.556 -2400 339608.333 1179497.222 -2401 339608.333 1180408.333 -2402 339611.111 1165008.333 -2403 339616.667 1183522.222 -2404 339650.000 835966.667 -2405 339652.778 1181505.556 -2406 339655.556 810741.667 -2407 339655.556 879147.222 -2408 339669.444 832783.333 -2409 339672.222 941683.333 -2410 339680.556 1182241.667 -2411 339686.111 1127288.889 -2412 339725.000 1169763.889 -2413 339730.556 783861.111 -2414 339761.111 1179044.444 -2415 339766.667 896755.556 -2416 339775.000 1181861.111 -2417 339791.667 1180319.444 -2418 339813.889 812363.889 -2419 339816.667 1182241.667 -2420 339830.556 1180958.333 -2421 339838.889 997244.444 -2422 339841.667 884880.556 -2423 339844.444 1013372.222 -2424 339850.000 915608.333 -2425 339866.667 1181844.444 -2426 339875.000 802083.333 -2427 339875.000 822980.556 -2428 339886.111 838980.556 -2429 339897.222 834258.333 -2430 339911.111 963738.889 -2431 339919.444 893488.889 -2432 339925.000 837202.778 -2433 339925.000 1175155.556 -2434 339933.333 810741.667 -2435 339958.333 795702.778 -2436 339961.111 1174047.222 -2437 339966.667 779075.000 -2438 339980.556 858663.889 -2439 339986.111 967194.444 -2440 339997.222 791997.222 -2441 340005.556 810350.000 -2442 340013.889 817722.222 -2443 340016.667 887552.778 -2444 340022.222 950936.111 -2445 340025.000 850416.667 -2446 340027.778 841447.222 -2447 340066.667 900566.667 -2448 340094.444 1181044.444 -2449 340105.556 955094.444 -2450 340116.667 1174838.889 -2451 340119.444 1008216.667 -2452 340122.222 1003016.667 -2453 340122.222 1176880.556 -2454 340130.556 982319.444 -2455 340136.111 838277.778 -2456 340141.667 860066.667 -2457 340144.444 867469.444 -2458 340147.222 904316.667 -2459 340172.222 961425.000 -2460 340186.111 952661.111 -2461 340191.667 809900.000 -2462 340194.444 1184902.778 -2463 340200.000 979572.222 -2464 340200.000 1179486.111 -2465 340202.778 1178644.444 -2466 340211.111 1183955.556 -2467 340216.667 860886.111 -2468 340230.556 843616.667 -2469 340233.333 846155.556 -2470 340238.889 1181711.111 -2471 340252.778 877583.333 -2472 340261.111 863261.111 -2473 340272.222 958688.889 -2474 340291.667 947388.889 -2475 340291.667 989186.111 -2476 340336.111 1170422.222 -2477 340338.889 1173127.778 -2478 340350.000 778938.889 -2479 340377.778 943411.111 -2480 340444.444 907447.222 -2481 340452.778 1179427.778 -2482 340455.556 850561.111 -2483 340469.444 875497.222 -2484 340469.444 1165800.000 -2485 340483.333 1172602.778 -2486 340513.889 840713.889 -2487 340519.444 1180458.333 -2488 340522.222 1182427.778 -2489 340536.111 809613.889 -2490 340536.111 852550.000 -2491 340552.778 1177513.889 -2492 340561.111 788905.556 -2493 340583.333 1068908.333 -2494 340600.000 800716.667 -2495 340600.000 950030.556 -2496 340605.556 867675.000 -2497 340622.222 936897.222 -2498 340625.000 1180894.444 -2499 340625.000 1181219.444 -2500 340633.333 1176500.000 -2501 340636.111 831255.556 -2502 340638.889 809583.333 -2503 340641.667 1018433.333 -2504 340658.333 846769.444 -2505 340677.778 1025238.889 -2506 340680.556 981902.778 -2507 340686.111 1179380.556 -2508 340686.111 1180266.667 -2509 340700.000 883911.111 -2510 340702.778 1173950.000 -2511 340722.222 860333.333 -2512 340736.111 1098563.889 -2513 340736.111 1183994.444 -2514 340738.889 1173127.778 -2515 340750.000 925552.778 -2516 340752.778 842941.667 -2517 340805.556 1180719.444 -2518 340808.333 844113.889 -2519 340813.889 865911.111 -2520 340852.778 1179600.000 -2521 340858.333 811833.333 -2522 340888.889 886222.222 -2523 340900.000 1178894.444 -2524 340900.000 1183608.333 -2525 340902.778 967713.889 -2526 340922.222 825958.333 -2527 340922.222 1174341.667 -2528 340952.778 1181261.111 -2529 340961.111 1181050.000 -2530 340966.667 1177188.889 -2531 340975.000 1176475.000 -2532 340977.778 985702.778 -2533 341008.333 1177669.444 -2534 341013.889 845194.444 -2535 341030.556 1178450.000 -2536 341066.667 1178058.333 -2537 341069.444 1179344.444 -2538 341072.222 1180569.444 -2539 341111.111 828672.222 -2540 341111.111 1092908.333 -2541 341161.111 887116.667 -2542 341161.111 1181494.444 -2543 341166.667 1072433.333 -2544 341172.222 913763.889 -2545 341191.667 940163.889 -2546 341191.667 1164450.000 -2547 341205.556 840044.444 -2548 341208.333 930536.111 -2549 341213.889 1173022.222 -2550 341213.889 1181055.556 -2551 341244.444 1014411.111 -2552 341258.333 1099369.444 -2553 341266.667 962630.556 -2554 341283.333 1172077.778 -2555 341333.333 1092852.778 -2556 341336.111 1179066.667 -2557 341344.444 778819.444 -2558 341347.222 799400.000 -2559 341347.222 1163122.222 -2560 341355.556 1160533.333 -2561 341361.111 1178644.444 -2562 341394.444 1179763.889 -2563 341397.222 1180344.444 -2564 341422.222 879886.111 -2565 341463.889 874022.222 -2566 341469.444 1179700.000 -2567 341477.778 1181436.111 -2568 341477.778 1191941.667 -2569 341480.556 1179980.556 -2570 341486.111 788769.444 -2571 341500.000 1142883.333 -2572 341513.889 896313.889 -2573 341519.444 856788.889 -2574 341541.667 1173433.333 -2575 341544.444 992647.222 -2576 341544.444 1099727.778 -2577 341602.778 1186513.889 -2578 341616.667 1180519.444 -2579 341650.000 848000.000 -2580 341669.444 979972.222 -2581 341686.111 800627.778 -2582 341705.556 1188366.667 -2583 341733.333 901375.000 -2584 341738.889 845013.889 -2585 341741.667 971433.333 -2586 341747.222 868436.111 -2587 341750.000 820241.667 -2588 341752.778 972625.000 -2589 341780.556 794008.333 -2590 341780.556 823791.667 -2591 341783.333 975922.222 -2592 341791.667 778477.778 -2593 341833.333 1021341.667 -2594 341850.000 839252.778 -2595 341858.333 968802.778 -2596 341861.111 1033338.889 -2597 341866.667 851747.222 -2598 341872.222 969841.667 -2599 341897.222 1181302.778 -2600 341941.667 887197.222 -2601 341952.778 797627.778 -2602 341952.778 821619.444 -2603 341975.000 1191761.111 -2604 342000.000 905708.333 -2605 342005.556 861663.889 -2606 342016.667 902833.333 -2607 342022.222 871813.889 -2608 342038.889 834572.222 -2609 342047.222 830308.333 -2610 342055.556 792547.222 -2611 342072.222 841402.778 -2612 342083.333 777966.667 -2613 342091.667 778438.889 -2614 342091.667 815333.333 -2615 342102.778 778869.444 -2616 342116.667 1016897.222 -2617 342133.333 886644.444 -2618 342163.889 1190366.667 -2619 342177.778 905419.444 -2620 342180.556 802486.111 -2621 342200.000 856077.778 -2622 342255.556 779450.000 -2623 342263.889 876213.889 -2624 342263.889 1027233.333 -2625 342272.222 806894.444 -2626 342275.000 838844.444 -2627 342283.333 920030.556 -2628 342283.333 986841.667 -2629 342308.333 1113244.444 -2630 342311.111 956200.000 -2631 342322.222 1191716.667 -2632 342330.556 974875.000 -2633 342330.556 1024102.778 -2634 342336.111 791488.889 -2635 342361.111 966783.333 -2636 342366.667 844908.333 -2637 342369.444 849441.667 -2638 342408.333 990752.778 -2639 342419.444 853358.333 -2640 342419.444 1172847.222 -2641 342463.889 806072.222 -2642 342477.778 889986.111 -2643 342483.333 1171883.333 -2644 342527.778 835616.667 -2645 342541.667 1100291.667 -2646 342563.889 902719.444 -2647 342563.889 995163.889 -2648 342569.444 851647.222 -2649 342575.000 887033.333 -2650 342638.889 858605.556 -2651 342647.222 934608.333 -2652 342675.000 862088.889 -2653 342719.444 982355.556 -2654 342722.222 778188.889 -2655 342738.889 884091.667 -2656 342738.889 920908.333 -2657 342744.444 816188.889 -2658 342772.222 878286.111 -2659 342819.444 1184380.556 -2660 342827.778 847452.778 -2661 342847.222 831444.444 -2662 342855.556 1188811.111 -2663 342869.444 831102.778 -2664 342883.333 779213.889 -2665 342927.778 913377.778 -2666 342977.778 838241.667 -2667 342977.778 997400.000 -2668 342997.222 798763.889 -2669 343047.222 819830.556 -2670 343063.889 826638.889 -2671 343069.444 924011.111 -2672 343083.333 908519.444 -2673 343113.889 899441.667 -2674 343133.333 790375.000 -2675 343144.444 971425.000 -2676 343180.556 864958.333 -2677 343188.889 785002.778 -2678 343191.667 918472.222 -2679 343205.556 784022.222 -2680 343219.444 788272.222 -2681 343241.667 884911.111 -2682 343266.667 935505.556 -2683 343333.333 823880.556 -2684 343336.111 834991.667 -2685 343366.667 850713.889 -2686 343369.444 794313.889 -2687 343380.556 843766.667 -2688 343386.111 787033.333 -2689 343455.556 791658.333 -2690 343461.111 831100.000 -2691 343508.333 877063.889 -2692 343513.889 860008.333 -2693 343527.778 829322.222 -2694 343530.556 890230.556 -2695 343541.667 1190583.333 -2696 343555.556 779002.778 -2697 343580.556 862947.222 -2698 343597.222 983075.000 -2699 343608.333 1176325.000 -2700 343616.667 810855.556 -2701 343622.222 928127.778 -2702 343661.111 1010566.667 -2703 343663.889 1017480.556 -2704 343683.333 869086.111 -2705 343686.111 849341.667 -2706 343688.889 979636.111 -2707 343694.444 906388.889 -2708 343713.889 1193055.556 -2709 343738.889 800736.111 -2710 343763.889 886816.667 -2711 343805.556 810866.667 -2712 343819.444 843711.111 -2713 343847.222 1185300.000 -2714 343850.000 1021152.778 -2715 343858.333 961280.556 -2716 343875.000 836663.889 -2717 343886.111 1030508.333 -2718 343919.444 990180.556 -2719 343925.000 1008972.222 -2720 343936.111 800697.222 -2721 343983.333 822469.444 -2722 343988.889 1195175.000 -2723 343991.667 1189172.222 -2724 344000.000 1192991.667 -2725 344047.222 1032047.222 -2726 344147.222 818113.889 -2727 344152.778 1187930.556 -2728 344163.889 793713.889 -2729 344219.444 917061.111 -2730 344233.333 1197033.333 -2731 344244.444 930950.000 -2732 344263.889 1002036.111 -2733 344263.889 1173000.000 -2734 344302.778 1036319.444 -2735 344319.444 902208.333 -2736 344358.333 831069.444 -2737 344361.111 847000.000 -2738 344397.222 881408.333 -2739 344433.333 869352.778 -2740 344436.111 1186086.111 -2741 344441.667 857197.222 -2742 344450.000 921830.556 -2743 344463.889 823916.667 -2744 344466.667 859041.667 -2745 344480.556 1192419.444 -2746 344550.000 936800.000 -2747 344600.000 976736.111 -2748 344650.000 1100905.556 -2749 344666.667 960530.556 -2750 344672.222 835738.889 -2751 344677.778 844291.667 -2752 344688.889 802561.111 -2753 344705.556 826708.333 -2754 344716.667 1042450.000 -2755 344719.444 996477.778 -2756 344725.000 818808.333 -2757 344741.667 1013041.667 -2758 344750.000 782025.000 -2759 344805.556 853477.778 -2760 344811.111 872933.333 -2761 344811.111 983827.778 -2762 344838.889 1143216.667 -2763 344847.222 854763.889 -2764 344872.222 786563.889 -2765 344916.667 835375.000 -2766 344941.667 858477.778 -2767 344941.667 890077.778 -2768 344966.667 791144.444 -2769 344988.889 820144.444 -2770 345002.778 915525.000 -2771 345008.333 1171850.000 -2772 345013.889 926363.889 -2773 345022.222 979575.000 -2774 345025.000 849511.111 -2775 345025.000 901986.111 -2776 345027.778 816116.667 -2777 345027.778 991405.556 -2778 345033.333 826502.778 -2779 345036.111 930550.000 -2780 345044.444 971191.667 -2781 345077.778 877286.111 -2782 345077.778 969680.556 -2783 345094.444 886352.778 -2784 345105.556 899397.222 -2785 345113.889 835272.222 -2786 345125.000 798511.111 -2787 345133.333 1100777.778 -2788 345136.111 1028825.000 -2789 345186.111 835008.333 -2790 345202.778 1062405.556 -2791 345227.778 824944.444 -2792 345230.556 869702.778 -2793 345250.000 868947.222 -2794 345286.111 862533.333 -2795 345325.000 839850.000 -2796 345358.333 1017580.556 -2797 345361.111 1172902.778 -2798 345363.889 792916.667 -2799 345380.556 962183.333 -2800 345386.111 787877.778 -2801 345400.000 1124677.778 -2802 345438.889 853105.556 -2803 345441.667 919688.889 -2804 345486.111 994219.444 -2805 345505.556 906416.667 -2806 345508.333 1023113.889 -2807 345516.667 805838.889 -2808 345519.444 779263.889 -2809 345555.556 909127.778 -2810 345566.667 936338.889 -2811 345622.222 858125.000 -2812 345636.111 1118536.111 -2813 345644.444 925866.667 -2814 345650.000 835452.778 -2815 345688.889 856150.000 -2816 345719.444 931730.556 -2817 345750.000 809022.222 -2818 345772.222 833325.000 -2819 345794.444 795466.667 -2820 345794.444 1181155.556 -2821 345811.111 1132038.889 -2822 345827.778 1174083.333 -2823 345861.111 942394.444 -2824 345894.444 953525.000 -2825 345930.556 806755.556 -2826 345958.333 911997.222 -2827 345958.333 1201366.667 -2828 345969.444 837633.333 -2829 346016.667 1052077.778 -2830 346047.222 964238.889 -2831 346058.333 869833.333 -2832 346080.556 821136.111 -2833 346086.111 983900.000 -2834 346100.000 1123150.000 -2835 346125.000 835250.000 -2836 346136.111 1201916.667 -2837 346144.444 1200788.889 -2838 346172.222 796850.000 -2839 346175.000 899686.111 -2840 346180.556 790088.889 -2841 346183.333 824780.556 -2842 346200.000 923952.778 -2843 346227.778 973961.111 -2844 346275.000 968405.556 -2845 346277.778 862744.444 -2846 346291.667 786055.556 -2847 346294.444 986283.333 -2848 346350.000 857672.222 -2849 346377.778 978172.222 -2850 346380.556 993336.111 -2851 346391.667 1204569.444 -2852 346402.778 784841.667 -2853 346416.667 1027236.111 -2854 346433.333 971641.667 -2855 346447.222 824702.778 -2856 346452.778 1182172.222 -2857 346461.111 893052.778 -2858 346480.556 979577.778 -2859 346500.000 803891.667 -2860 346516.667 827838.889 -2861 346525.000 965258.333 -2862 346563.889 819652.778 -2863 346580.556 885666.667 -2864 346588.889 989513.889 -2865 346627.778 1067758.333 -2866 346647.222 830966.667 -2867 346686.111 795455.556 -2868 346708.333 890263.889 -2869 346719.444 929986.111 -2870 346722.222 860341.667 -2871 346777.778 769511.111 -2872 346780.556 829316.667 -2873 346800.000 791952.778 -2874 346811.111 874061.111 -2875 346833.333 828375.000 -2876 346844.444 903827.778 -2877 346855.556 829533.333 -2878 346875.000 771194.444 -2879 346883.333 999116.667 -2880 346888.889 821958.333 -2881 346930.556 913136.111 -2882 346950.000 765597.222 -2883 346972.222 989491.667 -2884 346975.000 798836.111 -2885 346980.556 1181358.333 -2886 346988.889 767405.556 -2887 347008.333 875288.889 -2888 347016.667 863758.333 -2889 347022.222 824647.222 -2890 347047.222 812144.444 -2891 347047.222 852819.444 -2892 347141.667 856808.333 -2893 347180.556 766641.667 -2894 347202.778 807711.111 -2895 347205.556 958988.889 -2896 347227.778 767263.889 -2897 347241.667 827813.889 -2898 347247.222 1005336.111 -2899 347297.222 889505.556 -2900 347302.778 865861.111 -2901 347311.111 877025.000 -2902 347338.889 824438.889 -2903 347350.000 793491.667 -2904 347355.556 779955.556 -2905 347358.333 800883.333 -2906 347369.444 822544.444 -2907 347394.444 820372.222 -2908 347400.000 972219.444 -2909 347436.111 1018541.667 -2910 347447.222 876675.000 -2911 347463.889 922894.444 -2912 347502.778 981713.889 -2913 347513.889 950477.778 -2914 347538.889 774305.556 -2915 347569.444 879727.778 -2916 347575.000 1124530.556 -2917 347583.333 1060552.778 -2918 347588.889 796108.333 -2919 347600.000 827538.889 -2920 347647.222 830641.667 -2921 347650.000 876986.111 -2922 347658.333 847700.000 -2923 347694.444 922669.444 -2924 347697.222 849702.778 -2925 347711.111 794438.889 -2926 347711.111 1120572.222 -2927 347730.556 803919.444 -2928 347736.111 907575.000 -2929 347738.889 794630.556 -2930 347744.444 966780.556 -2931 347780.556 923488.889 -2932 347786.111 823102.778 -2933 347794.444 993350.000 -2934 347802.778 982919.444 -2935 347808.333 915808.333 -2936 347825.000 979566.667 -2937 347830.556 917463.889 -2938 347838.889 918997.222 -2939 347861.111 783944.444 -2940 347863.889 768594.444 -2941 347877.778 826925.000 -2942 347966.667 969591.667 -2943 347997.222 876772.222 -2944 348000.000 824244.444 -2945 348027.778 869716.667 -2946 348061.111 1067327.778 -2947 348116.667 881900.000 -2948 348150.000 791833.333 -2949 348150.000 922241.667 -2950 348150.000 1023972.222 -2951 348172.222 974055.556 -2952 348227.778 1189438.889 -2953 348230.556 982438.889 -2954 348238.889 899936.111 -2955 348247.222 824194.444 -2956 348252.778 1068380.556 -2957 348255.556 872947.222 -2958 348258.333 774597.222 -2959 348266.667 972588.889 -2960 348288.889 958436.111 -2961 348297.222 826016.667 -2962 348347.222 976022.222 -2963 348405.556 850427.778 -2964 348405.556 883147.222 -2965 348422.222 826447.222 -2966 348450.000 955572.222 -2967 348480.556 1146133.333 -2968 348513.889 865722.222 -2969 348525.000 823941.667 -2970 348544.444 955819.444 -2971 348561.111 1002133.333 -2972 348611.111 966652.778 -2973 348613.889 824316.667 -2974 348627.778 875375.000 -2975 348638.889 800013.889 -2976 348638.889 843241.667 -2977 348641.667 1181625.000 -2978 348661.111 921100.000 -2979 348686.111 858394.444 -2980 348697.222 1117602.778 -2981 348711.111 852908.333 -2982 348719.444 855091.667 -2983 348719.444 995038.889 -2984 348722.222 896905.556 -2985 348761.111 839583.333 -2986 348766.667 1171030.556 -2987 348777.778 824241.667 -2988 348780.556 834011.111 -2989 348788.889 769016.667 -2990 348788.889 964122.222 -2991 348794.444 819663.889 -2992 348833.333 827075.000 -2993 348847.222 796944.444 -2994 348852.778 824561.111 -2995 348877.778 793663.889 -2996 348877.778 911944.444 -2997 348891.667 946005.556 -2998 348905.556 809566.667 -2999 348936.111 983655.556 -3000 348963.889 982002.778 -3001 348983.333 940905.556 -3002 348988.889 817619.444 -3003 349022.222 1101575.000 -3004 349025.000 790119.444 -3005 349047.222 772316.667 -3006 349050.000 1168194.444 -3007 349069.444 1066802.778 -3008 349105.556 818530.556 -3009 349127.778 911100.000 -3010 349147.222 977783.333 -3011 349158.333 851091.667 -3012 349180.556 797627.778 -3013 349180.556 833855.556 -3014 349180.556 973141.667 -3015 349186.111 953088.889 -3016 349202.778 822963.889 -3017 349225.000 817427.778 -3018 349236.111 777741.667 -3019 349238.889 819330.556 -3020 349244.444 807436.111 -3021 349277.778 957155.556 -3022 349283.333 820991.667 -3023 349319.444 981400.000 -3024 349322.222 865719.444 -3025 349330.556 837772.222 -3026 349330.556 838472.222 -3027 349333.333 957694.444 -3028 349363.889 818794.444 -3029 349377.778 821452.778 -3030 349377.778 1008877.778 -3031 349386.111 822272.222 -3032 349386.111 1046819.444 -3033 349391.667 797741.667 -3034 349430.556 797872.222 -3035 349447.222 818377.778 -3036 349475.000 857144.444 -3037 349480.556 821275.000 -3038 349491.667 904713.889 -3039 349494.444 819322.222 -3040 349508.333 821061.111 -3041 349508.333 950800.000 -3042 349511.111 946369.444 -3043 349527.778 785088.889 -3044 349530.556 1204347.222 -3045 349569.444 924272.222 -3046 349580.556 819908.333 -3047 349580.556 852233.333 -3048 349594.444 967525.000 -3049 349611.111 819675.000 -3050 349616.667 898294.444 -3051 349622.222 779625.000 -3052 349622.222 993802.778 -3053 349672.222 947244.444 -3054 349675.000 799847.222 -3055 349675.000 824436.111 -3056 349680.556 800769.444 -3057 349691.667 873711.111 -3058 349702.778 789455.556 -3059 349716.667 1205708.333 -3060 349722.222 909025.000 -3061 349744.444 920163.889 -3062 349769.444 914950.000 -3063 349775.000 853577.778 -3064 349808.333 792244.444 -3065 349830.556 852861.111 -3066 349841.667 804494.444 -3067 349841.667 819266.667 -3068 349852.778 805497.222 -3069 349861.111 843713.889 -3070 349883.333 803672.222 -3071 349894.444 969233.333 -3072 349894.444 992491.667 -3073 349900.000 1060486.111 -3074 349919.444 818350.000 -3075 349919.444 868466.667 -3076 349919.444 868469.444 -3077 349936.111 802647.222 -3078 349941.667 812422.222 -3079 349941.667 853494.444 -3080 349958.333 792263.889 -3081 349977.778 783236.111 -3082 349991.667 780913.889 -3083 349994.444 1176488.889 -3084 350025.000 809800.000 -3085 350047.222 928025.000 -3086 350072.222 809452.778 -3087 350075.000 802011.111 -3088 350080.556 907897.222 -3089 350080.556 912511.111 -3090 350122.222 857044.444 -3091 350130.556 907225.000 -3092 350133.333 786941.667 -3093 350136.111 973608.333 -3094 350141.667 852519.444 -3095 350147.222 973352.778 -3096 350152.778 785033.333 -3097 350158.333 819750.000 -3098 350166.667 818041.667 -3099 350169.444 1178347.222 -3100 350227.778 943811.111 -3101 350241.667 810280.556 -3102 350241.667 1106966.667 -3103 350294.444 990927.778 -3104 350308.333 766933.333 -3105 350319.444 787950.000 -3106 350322.222 932230.556 -3107 350413.889 821044.444 -3108 350419.444 896644.444 -3109 350427.778 1204750.000 -3110 350450.000 896216.667 -3111 350455.556 853097.222 -3112 350469.444 820902.778 -3113 350477.778 856719.444 -3114 350511.111 862697.222 -3115 350522.222 868886.111 -3116 350525.000 788786.111 -3117 350525.000 831969.444 -3118 350525.000 979361.111 -3119 350525.000 1181730.556 -3120 350530.556 850502.778 -3121 350536.111 946233.333 -3122 350538.889 933933.333 -3123 350550.000 777466.667 -3124 350552.778 871575.000 -3125 350561.111 884352.778 -3126 350588.889 1194000.000 -3127 350594.444 942525.000 -3128 350644.444 888908.333 -3129 350705.556 918794.444 -3130 350711.111 797616.667 -3131 350716.667 816500.000 -3132 350725.000 982433.333 -3133 350741.667 856261.111 -3134 350766.667 806694.444 -3135 350777.778 874397.222 -3136 350800.000 816330.556 -3137 350802.778 963988.889 -3138 350822.222 942630.556 -3139 350830.556 808925.000 -3140 350833.333 980875.000 -3141 350838.889 922077.778 -3142 350844.444 1066505.556 -3143 350872.222 973347.222 -3144 350875.000 840347.222 -3145 350886.111 770352.778 -3146 350886.111 924419.444 -3147 350905.556 806863.889 -3148 350930.556 934483.333 -3149 350950.000 789558.333 -3150 350963.889 787841.667 -3151 350975.000 987461.111 -3152 350977.778 984352.778 -3153 350988.889 1206113.889 -3154 351036.111 986033.333 -3155 351044.444 801094.444 -3156 351055.556 830966.667 -3157 351083.333 770444.444 -3158 351097.222 794725.000 -3159 351111.111 812266.667 -3160 351116.667 1013627.778 -3161 351127.778 918222.222 -3162 351136.111 851380.556 -3163 351161.111 781363.889 -3164 351166.667 807238.889 -3165 351186.111 1205897.222 -3166 351211.111 815161.111 -3167 351216.667 1206202.778 -3168 351225.000 853438.889 -3169 351227.778 953708.333 -3170 351258.333 1179850.000 -3171 351302.778 967755.556 -3172 351313.889 794297.222 -3173 351322.222 1184480.556 -3174 351347.222 1194552.778 -3175 351347.222 1194716.667 -3176 351377.778 976577.778 -3177 351391.667 973944.444 -3178 351400.000 939213.889 -3179 351411.111 848722.222 -3180 351425.000 1194555.556 -3181 351427.778 767705.556 -3182 351427.778 1206402.778 -3183 351436.111 828213.889 -3184 351447.222 768025.000 -3185 351461.111 966697.222 -3186 351463.889 901844.444 -3187 351483.333 818611.111 -3188 351494.444 900488.889 -3189 351497.222 949705.556 -3190 351508.333 927438.889 -3191 351508.333 938066.667 -3192 351519.444 865705.556 -3193 351522.222 1078425.000 -3194 351536.111 781055.556 -3195 351544.444 1194552.778 -3196 351577.778 991750.000 -3197 351586.111 964930.556 -3198 351594.444 848766.667 -3199 351600.000 926405.556 -3200 351608.333 848577.778 -3201 351619.444 1066422.222 -3202 351644.444 860105.556 -3203 351647.222 853013.889 -3204 351672.222 946722.222 -3205 351677.778 789730.556 -3206 351697.222 1078902.778 -3207 351700.000 885922.222 -3208 351716.667 1037244.444 -3209 351738.889 793925.000 -3210 351741.667 846536.111 -3211 351741.667 877377.778 -3212 351744.444 814500.000 -3213 351750.000 821894.444 -3214 351794.444 806475.000 -3215 351858.333 861122.222 -3216 351863.889 947855.556 -3217 351872.222 773211.111 -3218 351883.333 982602.778 -3219 351894.444 854858.333 -3220 351894.444 1140522.222 -3221 351902.778 944108.333 -3222 351958.333 851847.222 -3223 351980.556 1116505.556 -3224 351997.222 870308.333 -3225 352005.556 1067005.556 -3226 352013.889 855191.667 -3227 352016.667 838241.667 -3228 352030.556 859211.111 -3229 352036.111 1011063.889 -3230 352044.444 898738.889 -3231 352086.111 851269.444 -3232 352091.667 1188275.000 -3233 352097.222 860794.444 -3234 352144.444 901963.889 -3235 352152.778 998661.111 -3236 352191.667 812058.333 -3237 352219.444 1018308.333 -3238 352225.000 974391.667 -3239 352230.556 931577.778 -3240 352244.444 907866.667 -3241 352244.444 966702.778 -3242 352247.222 882491.667 -3243 352250.000 903250.000 -3244 352255.556 803291.667 -3245 352269.444 808433.333 -3246 352302.778 810427.778 -3247 352311.111 944777.778 -3248 352316.667 916675.000 -3249 352325.000 1005994.444 -3250 352333.333 827344.444 -3251 352336.111 886063.889 -3252 352338.889 923875.000 -3253 352352.778 815147.222 -3254 352358.333 883905.556 -3255 352361.111 823494.444 -3256 352361.111 851986.111 -3257 352369.444 974061.111 -3258 352375.000 962413.889 -3259 352377.778 1066061.111 -3260 352380.556 1189141.667 -3261 352386.111 810752.778 -3262 352386.111 1066666.667 -3263 352391.667 944258.333 -3264 352400.000 858397.222 -3265 352411.111 946197.222 -3266 352422.222 873347.222 -3267 352427.778 1024277.778 -3268 352436.111 893500.000 -3269 352450.000 813413.889 -3270 352463.889 929363.889 -3271 352472.222 975994.444 -3272 352480.556 930488.889 -3273 352494.444 1121902.778 -3274 352505.556 917361.111 -3275 352530.556 821972.222 -3276 352536.111 951227.778 -3277 352541.667 827002.778 -3278 352555.556 793725.000 -3279 352555.556 949213.889 -3280 352561.111 792825.000 -3281 352561.111 889877.778 -3282 352561.111 912000.000 -3283 352569.444 783525.000 -3284 352577.778 969363.889 -3285 352591.667 810755.556 -3286 352597.222 804255.556 -3287 352597.222 1189133.333 -3288 352602.778 857361.111 -3289 352605.556 971194.444 -3290 352619.444 811875.000 -3291 352625.000 775819.444 -3292 352633.333 905711.111 -3293 352677.778 811030.556 -3294 352700.000 916397.222 -3295 352705.556 861280.556 -3296 352722.222 810483.333 -3297 352747.222 812102.778 -3298 352750.000 904666.667 -3299 352766.667 991347.222 -3300 352783.333 931336.111 -3301 352800.000 824222.222 -3302 352822.222 913652.778 -3303 352827.778 1206586.111 -3304 352830.556 863741.667 -3305 352847.222 812841.667 -3306 352861.111 811305.556 -3307 352872.222 955822.222 -3308 352888.889 811450.000 -3309 352908.333 978119.444 -3310 352911.111 996397.222 -3311 352919.444 937297.222 -3312 352922.222 815358.333 -3313 352927.778 936344.444 -3314 352950.000 797455.556 -3315 352963.889 847480.556 -3316 352969.444 940361.111 -3317 352980.556 810161.111 -3318 352983.333 824833.333 -3319 353000.000 1065505.556 -3320 353052.778 767888.889 -3321 353061.111 786091.667 -3322 353066.667 777883.333 -3323 353083.333 771544.444 -3324 353088.889 983416.667 -3325 353097.222 915677.778 -3326 353105.556 818588.889 -3327 353111.111 824441.667 -3328 353127.778 979441.667 -3329 353163.889 811763.889 -3330 353186.111 824611.111 -3331 353194.444 877622.222 -3332 353227.778 838075.000 -3333 353233.333 845250.000 -3334 353236.111 806561.111 -3335 353236.111 873036.111 -3336 353255.556 943013.889 -3337 353258.333 896161.111 -3338 353263.889 891494.444 -3339 353266.667 786763.889 -3340 353272.222 969250.000 -3341 353288.889 817588.889 -3342 353288.889 932527.778 -3343 353338.889 818652.778 -3344 353355.556 961361.111 -3345 353361.111 941730.556 -3346 353375.000 857041.667 -3347 353394.444 974863.889 -3348 353413.889 898972.222 -3349 353425.000 779088.889 -3350 353458.333 794172.222 -3351 353463.889 824722.222 -3352 353488.889 991700.000 -3353 353500.000 802002.778 -3354 353511.111 855677.778 -3355 353544.444 944338.889 -3356 353561.111 952652.778 -3357 353575.000 780061.111 -3358 353583.333 798947.222 -3359 353588.889 810972.222 -3360 353597.222 797800.000 -3361 353600.000 819294.444 -3362 353613.889 868397.222 -3363 353619.444 862094.444 -3364 353627.778 842941.667 -3365 353652.778 1034102.778 -3366 353658.333 1208488.889 -3367 353691.667 819569.444 -3368 353694.444 824930.556 -3369 353713.889 853905.556 -3370 353725.000 774377.778 -3371 353733.333 1190177.778 -3372 353736.111 832261.111 -3373 353780.556 987816.667 -3374 353786.111 813791.667 -3375 353797.222 902577.778 -3376 353819.444 785488.889 -3377 353833.333 1191088.889 -3378 353841.667 922155.556 -3379 353841.667 977241.667 -3380 353847.222 779930.556 -3381 353858.333 943983.333 -3382 353869.444 879952.778 -3383 353877.778 805958.333 -3384 353916.667 979411.111 -3385 353991.667 788161.111 -3386 354005.556 1194686.111 -3387 354013.889 931141.667 -3388 354019.444 797844.444 -3389 354019.444 907530.556 -3390 354019.444 974811.111 -3391 354025.000 812025.000 -3392 354025.000 1082227.778 -3393 354058.333 801169.444 -3394 354061.111 945986.111 -3395 354077.778 786722.222 -3396 354105.556 808430.556 -3397 354116.667 902783.333 -3398 354119.444 994038.889 -3399 354130.556 787358.333 -3400 354133.333 780711.111 -3401 354175.000 816430.556 -3402 354197.222 1190202.778 -3403 354211.111 945144.444 -3404 354219.444 992791.667 -3405 354230.556 914558.333 -3406 354244.444 844875.000 -3407 354266.667 918366.667 -3408 354286.111 794933.333 -3409 354288.889 815016.667 -3410 354294.444 857230.556 -3411 354302.778 942313.889 -3412 354308.333 834475.000 -3413 354325.000 936152.778 -3414 354325.000 963047.222 -3415 354338.889 795872.222 -3416 354338.889 1064461.111 -3417 354341.667 806208.333 -3418 354352.778 1011725.000 -3419 354358.333 970911.111 -3420 354363.889 1008052.778 -3421 354366.667 943480.556 -3422 354372.222 936727.778 -3423 354391.667 886413.889 -3424 354397.222 959816.667 -3425 354405.556 933877.778 -3426 354411.111 897780.556 -3427 354419.444 974405.556 -3428 354427.778 845930.556 -3429 354427.778 1208911.111 -3430 354447.222 784272.222 -3431 354452.778 1002705.556 -3432 354469.444 850844.444 -3433 354491.667 867888.889 -3434 354491.667 898150.000 -3435 354494.444 973963.889 -3436 354580.556 959411.111 -3437 354602.778 947872.222 -3438 354622.222 894019.444 -3439 354638.889 815219.444 -3440 354658.333 781608.333 -3441 354666.667 856541.667 -3442 354675.000 975161.111 -3443 354686.111 830041.667 -3444 354700.000 955227.778 -3445 354713.889 934663.889 -3446 354713.889 983552.778 -3447 354725.000 774158.333 -3448 354736.111 812547.222 -3449 354777.778 942216.667 -3450 354797.222 791805.556 -3451 354816.667 860886.111 -3452 354833.333 864602.778 -3453 354866.667 808602.778 -3454 354866.667 966847.222 -3455 354869.444 938275.000 -3456 354872.222 806219.444 -3457 354886.111 829888.889 -3458 354894.444 971633.333 -3459 354894.444 1206697.222 -3460 354900.000 903586.111 -3461 354911.111 973227.778 -3462 354913.889 920311.111 -3463 354922.222 941375.000 -3464 354938.889 850125.000 -3465 354941.667 953052.778 -3466 354969.444 779822.222 -3467 354975.000 972686.111 -3468 354983.333 949694.444 -3469 354991.667 808488.889 -3470 355005.556 940513.889 -3471 355033.333 969025.000 -3472 355041.667 974458.333 -3473 355066.667 977622.222 -3474 355069.444 787394.444 -3475 355077.778 901469.444 -3476 355083.333 783397.222 -3477 355125.000 771008.333 -3478 355133.333 845452.778 -3479 355147.222 847902.778 -3480 355147.222 1063652.778 -3481 355150.000 882452.778 -3482 355155.556 989669.444 -3483 355186.111 976319.444 -3484 355197.222 843636.111 -3485 355225.000 976186.111 -3486 355227.778 973769.444 -3487 355261.111 987072.222 -3488 355272.222 863336.111 -3489 355280.556 1087419.444 -3490 355288.889 774013.889 -3491 355297.222 806683.333 -3492 355322.222 979547.222 -3493 355325.000 770327.778 -3494 355327.778 828375.000 -3495 355327.778 904205.556 -3496 355333.333 829108.333 -3497 355336.111 825286.111 -3498 355361.111 1009594.444 -3499 355363.889 782847.222 -3500 355400.000 766233.333 -3501 355452.778 779750.000 -3502 355455.556 806111.111 -3503 355463.889 770525.000 -3504 355477.778 875519.444 -3505 355494.444 985777.778 -3506 355497.222 826502.778 -3507 355508.333 975486.111 -3508 355511.111 804066.667 -3509 355608.333 975511.111 -3510 355641.667 896463.889 -3511 355641.667 907166.667 -3512 355641.667 1210797.222 -3513 355658.333 972866.667 -3514 355691.667 805819.444 -3515 355741.667 1056744.444 -3516 355752.778 1011838.889 -3517 355755.556 812119.444 -3518 355777.778 989641.667 -3519 355841.667 788002.778 -3520 355841.667 881194.444 -3521 355847.222 808102.778 -3522 355869.444 804630.556 -3523 355880.556 1184911.111 -3524 355900.000 842419.444 -3525 355913.889 924602.778 -3526 355941.667 1193400.000 -3527 355961.111 781244.444 -3528 355977.778 824000.000 -3529 356008.333 825541.667 -3530 356013.889 844611.111 -3531 356027.778 859197.222 -3532 356055.556 851888.889 -3533 356066.667 778236.111 -3534 356075.000 958600.000 -3535 356080.556 968208.333 -3536 356091.667 1184827.778 -3537 356111.111 773730.556 -3538 356111.111 903297.222 -3539 356122.222 804469.444 -3540 356138.889 996711.111 -3541 356138.889 1067252.778 -3542 356144.444 888138.889 -3543 356150.000 870352.778 -3544 356172.222 878394.444 -3545 356177.778 823213.889 -3546 356202.778 908983.333 -3547 356225.000 1176700.000 -3548 356233.333 959602.778 -3549 356288.889 821808.333 -3550 356311.111 983169.444 -3551 356327.778 993813.889 -3552 356333.333 801161.111 -3553 356333.333 825822.222 -3554 356350.000 779333.333 -3555 356355.556 941672.222 -3556 356361.111 833777.778 -3557 356383.333 912650.000 -3558 356397.222 1016027.778 -3559 356419.444 977461.111 -3560 356441.667 823030.556 -3561 356452.778 780100.000 -3562 356486.111 956558.333 -3563 356497.222 881266.667 -3564 356497.222 910738.889 -3565 356505.556 784566.667 -3566 356508.333 883933.333 -3567 356508.333 1176608.333 -3568 356527.778 974777.778 -3569 356577.778 820255.556 -3570 356611.111 841722.222 -3571 356616.667 971952.778 -3572 356650.000 988827.778 -3573 356677.778 1013969.444 -3574 356697.222 812216.667 -3575 356708.333 804744.444 -3576 356727.778 895733.333 -3577 356736.111 905072.222 -3578 356744.444 900997.222 -3579 356780.556 1081505.556 -3580 356780.556 1192283.333 -3581 356805.556 1090519.444 -3582 356816.667 804325.000 -3583 356838.889 820094.444 -3584 356841.667 819919.444 -3585 356869.444 1059372.222 -3586 356913.889 1006377.778 -3587 356919.444 848608.333 -3588 356922.222 804350.000 -3589 356941.667 970630.556 -3590 356969.444 825608.333 -3591 357005.556 808883.333 -3592 357016.667 914413.889 -3593 357016.667 968805.556 -3594 357044.444 820361.111 -3595 357047.222 967650.000 -3596 357050.000 899694.444 -3597 357063.889 812188.889 -3598 357069.444 1184552.778 -3599 357072.222 810758.333 -3600 357077.778 798138.889 -3601 357111.111 786144.444 -3602 357111.111 890875.000 -3603 357138.889 814222.222 -3604 357141.667 835102.778 -3605 357144.444 811463.889 -3606 357200.000 791775.000 -3607 357233.333 794625.000 -3608 357258.333 979761.111 -3609 357272.222 814708.333 -3610 357288.889 814000.000 -3611 357288.889 817794.444 -3612 357291.667 1185486.111 -3613 357305.556 911983.333 -3614 357319.444 1051511.111 -3615 357325.000 788505.556 -3616 357327.778 843338.889 -3617 357330.556 806772.222 -3618 357333.333 796527.778 -3619 357405.556 815633.333 -3620 357422.222 905622.222 -3621 357425.000 960700.000 -3622 357436.111 796925.000 -3623 357441.667 987472.222 -3624 357444.444 1090758.333 -3625 357452.778 816850.000 -3626 357452.778 895297.222 -3627 357472.222 854666.667 -3628 357477.778 953694.444 -3629 357486.111 966577.778 -3630 357519.444 776702.778 -3631 357547.222 1184244.444 -3632 357561.111 899280.556 -3633 357563.889 839705.556 -3634 357577.778 816044.444 -3635 357580.556 903222.222 -3636 357602.778 841358.333 -3637 357636.111 1059319.444 -3638 357688.889 1192461.111 -3639 357697.222 916408.333 -3640 357719.444 786388.889 -3641 357719.444 877838.889 -3642 357738.889 814313.889 -3643 357758.333 889900.000 -3644 357808.333 783700.000 -3645 357825.000 808875.000 -3646 357847.222 891172.222 -3647 357875.000 784808.333 -3648 357883.333 776380.556 -3649 357883.333 835544.444 -3650 357894.444 839738.889 -3651 357900.000 782041.667 -3652 357913.889 787813.889 -3653 357950.000 839319.444 -3654 357963.889 814308.333 -3655 357966.667 1191069.444 -3656 357972.222 826841.667 -3657 357972.222 842561.111 -3658 357975.000 952502.778 -3659 357980.556 976783.333 -3660 358027.778 887747.222 -3661 358027.778 965058.333 -3662 358063.889 778636.111 -3663 358083.333 970125.000 -3664 358102.778 805561.111 -3665 358111.111 768969.444 -3666 358144.444 946283.333 -3667 358147.222 892255.556 -3668 358161.111 904341.667 -3669 358177.778 798033.333 -3670 358197.222 889158.333 -3671 358202.778 956738.889 -3672 358216.667 911283.333 -3673 358238.889 772555.556 -3674 358238.889 802536.111 -3675 358241.667 783150.000 -3676 358263.889 825494.444 -3677 358269.444 1014425.000 -3678 358275.000 839408.333 -3679 358275.000 860716.667 -3680 358302.778 925577.778 -3681 358305.556 963908.333 -3682 358383.333 894061.111 -3683 358422.222 907041.667 -3684 358425.000 756388.889 -3685 358447.222 984127.778 -3686 358455.556 863902.778 -3687 358483.333 814961.111 -3688 358505.556 953180.556 -3689 358544.444 770558.333 -3690 358588.889 1087608.333 -3691 358613.889 979313.889 -3692 358655.556 846850.000 -3693 358655.556 1019727.778 -3694 358666.667 767488.889 -3695 358669.444 778294.444 -3696 358680.556 835619.444 -3697 358683.333 921175.000 -3698 358708.333 955222.222 -3699 358727.778 917538.889 -3700 358755.556 893961.111 -3701 358763.889 960608.333 -3702 358777.778 766155.556 -3703 358788.889 974250.000 -3704 358800.000 901669.444 -3705 358808.333 845086.111 -3706 358825.000 800822.222 -3707 358841.667 1192713.889 -3708 358894.444 775325.000 -3709 358905.556 903441.667 -3710 358922.222 828291.667 -3711 358922.222 904525.000 -3712 358938.889 805616.667 -3713 358966.667 775361.111 -3714 359000.000 905819.444 -3715 359027.778 802572.222 -3716 359080.556 756761.111 -3717 359088.889 926311.111 -3718 359091.667 848780.556 -3719 359100.000 790755.556 -3720 359127.778 1003816.667 -3721 359138.889 815391.667 -3722 359152.778 820647.222 -3723 359152.778 949697.222 -3724 359175.000 762525.000 -3725 359197.222 887588.889 -3726 359216.667 811766.667 -3727 359241.667 941883.333 -3728 359250.000 868688.889 -3729 359258.333 854641.667 -3730 359272.222 899188.889 -3731 359325.000 951411.111 -3732 359338.889 845525.000 -3733 359358.333 902577.778 -3734 359380.556 777908.333 -3735 359416.667 915483.333 -3736 359419.444 958830.556 -3737 359444.444 772100.000 -3738 359447.222 960650.000 -3739 359488.889 850269.444 -3740 359494.444 944233.333 -3741 359516.667 956505.556 -3742 359525.000 975944.444 -3743 359552.778 960086.111 -3744 359555.556 800055.556 -3745 359572.222 756244.444 -3746 359594.444 953691.667 -3747 359597.222 899719.444 -3748 359605.556 839208.333 -3749 359605.556 858141.667 -3750 359608.333 782538.889 -3751 359619.444 797625.000 -3752 359625.000 1190433.333 -3753 359669.444 831877.778 -3754 359686.111 1192908.333 -3755 359730.556 886780.556 -3756 359738.889 970333.333 -3757 359744.444 779658.333 -3758 359758.333 943175.000 -3759 359786.111 1148316.667 -3760 359797.222 785100.000 -3761 359805.556 889413.889 -3762 359813.889 979108.333 -3763 359819.444 841138.889 -3764 359850.000 967666.667 -3765 359883.333 966008.333 -3766 359911.111 1060800.000 -3767 359925.000 945677.778 -3768 359938.889 788988.889 -3769 359941.667 799355.556 -3770 359941.667 941750.000 -3771 359983.333 769463.889 -3772 359986.111 961138.889 -3773 360005.556 884280.556 -3774 360013.889 940080.556 -3775 360025.000 1059297.222 -3776 360041.667 1201280.556 -3777 360080.556 931863.889 -3778 360083.333 1199608.333 -3779 360102.778 842697.222 -3780 360111.111 778577.778 -3781 360113.889 886227.778 -3782 360152.778 834150.000 -3783 360155.556 865819.444 -3784 360166.667 1018241.667 -3785 360211.111 879669.444 -3786 360213.889 803822.222 -3787 360222.222 1069577.778 -3788 360227.778 959680.556 -3789 360316.667 840280.556 -3790 360344.444 893855.556 -3791 360358.333 894797.222 -3792 360363.889 788236.111 -3793 360380.556 882444.444 -3794 360380.556 882736.111 -3795 360397.222 1149811.111 -3796 360416.667 901138.889 -3797 360419.444 942469.444 -3798 360444.444 843444.444 -3799 360469.444 902927.778 -3800 360488.889 777494.444 -3801 360502.778 909750.000 -3802 360508.333 902386.111 -3803 360525.000 957905.556 -3804 360533.333 873125.000 -3805 360536.111 985880.556 -3806 360583.333 905000.000 -3807 360588.889 880977.778 -3808 360594.444 919083.333 -3809 360594.444 1025127.778 -3810 360594.444 1193111.111 -3811 360605.556 766094.444 -3812 360625.000 941572.222 -3813 360652.778 1190158.333 -3814 360666.667 889938.889 -3815 360688.889 794008.333 -3816 360719.444 841333.333 -3817 360725.000 797922.222 -3818 360752.778 791000.000 -3819 360763.889 888100.000 -3820 360769.444 873877.778 -3821 360775.000 860333.333 -3822 360838.889 877947.222 -3823 360838.889 898291.667 -3824 360844.444 965833.333 -3825 360861.111 937411.111 -3826 360872.222 819275.000 -3827 360913.889 793644.444 -3828 360944.444 1150411.111 -3829 360955.556 794380.556 -3830 360958.333 792672.222 -3831 360958.333 844425.000 -3832 360966.667 811825.000 -3833 360969.444 804194.444 -3834 360980.556 1195594.444 -3835 360988.889 783013.889 -3836 360997.222 802444.444 -3837 361005.556 870511.111 -3838 361016.667 784583.333 -3839 361019.444 871150.000 -3840 361027.778 795069.444 -3841 361033.333 841319.444 -3842 361038.889 835527.778 -3843 361047.222 845972.222 -3844 361052.778 777130.556 -3845 361055.556 795425.000 -3846 361072.222 796588.889 -3847 361075.000 832869.444 -3848 361075.000 872208.333 -3849 361077.778 876330.556 -3850 361083.333 910972.222 -3851 361091.667 978983.333 -3852 361127.778 892616.667 -3853 361130.556 794766.667 -3854 361141.667 966988.889 -3855 361155.556 970580.556 -3856 361161.111 983166.667 -3857 361169.444 867663.889 -3858 361194.444 921358.333 -3859 361197.222 800738.889 -3860 361219.444 794291.667 -3861 361222.222 786863.889 -3862 361222.222 834925.000 -3863 361275.000 889858.333 -3864 361294.444 774205.556 -3865 361305.556 824247.222 -3866 361319.444 787569.444 -3867 361325.000 885186.111 -3868 361341.667 901597.222 -3869 361344.444 806597.222 -3870 361350.000 816777.778 -3871 361350.000 1112391.667 -3872 361397.222 961086.111 -3873 361397.222 1203591.667 -3874 361450.000 824169.444 -3875 361455.556 1190597.222 -3876 361458.333 811608.333 -3877 361475.000 852683.333 -3878 361480.556 989238.889 -3879 361497.222 992977.778 -3880 361511.111 955091.667 -3881 361533.333 888005.556 -3882 361536.111 856436.111 -3883 361538.889 959925.000 -3884 361541.667 837041.667 -3885 361544.444 1095519.444 -3886 361572.222 819783.333 -3887 361583.333 811477.778 -3888 361627.778 855016.667 -3889 361630.556 818716.667 -3890 361630.556 828311.111 -3891 361661.111 948544.444 -3892 361713.889 811941.667 -3893 361725.000 859297.222 -3894 361750.000 1151363.889 -3895 361772.222 873397.222 -3896 361777.778 942333.333 -3897 361808.333 776669.444 -3898 361858.333 953427.778 -3899 361866.667 941286.111 -3900 361869.444 903830.556 -3901 361880.556 945402.778 -3902 361888.889 957455.556 -3903 361894.444 829586.111 -3904 361900.000 764663.889 -3905 361930.556 896555.556 -3906 361955.556 840680.556 -3907 361958.333 854486.111 -3908 361961.111 820705.556 -3909 361983.333 811530.556 -3910 361983.333 1011919.444 -3911 361988.889 1151166.667 -3912 362000.000 865186.111 -3913 362000.000 951675.000 -3914 362022.222 802811.111 -3915 362022.222 890122.222 -3916 362025.000 911744.444 -3917 362027.778 1201019.444 -3918 362030.556 891908.333 -3919 362030.556 1190872.222 -3920 362061.111 942341.667 -3921 362077.778 1193463.889 -3922 362086.111 799050.000 -3923 362127.778 1211250.000 -3924 362136.111 886125.000 -3925 362138.889 832950.000 -3926 362163.889 805127.778 -3927 362166.667 816747.222 -3928 362177.778 841547.222 -3929 362188.889 764641.667 -3930 362211.111 919291.667 -3931 362238.889 916083.333 -3932 362261.111 926847.222 -3933 362272.222 808336.111 -3934 362294.444 771144.444 -3935 362297.222 931075.000 -3936 362325.000 807083.333 -3937 362333.333 888244.444 -3938 362336.111 897494.444 -3939 362338.889 897694.444 -3940 362361.111 900555.556 -3941 362369.444 799797.222 -3942 362380.556 963163.889 -3943 362391.667 808447.222 -3944 362402.778 802936.111 -3945 362419.444 859519.444 -3946 362419.444 959755.556 -3947 362441.667 808486.111 -3948 362505.556 837975.000 -3949 362522.222 859516.667 -3950 362552.778 941305.556 -3951 362569.444 830861.111 -3952 362586.111 831952.778 -3953 362588.889 891916.667 -3954 362613.889 909711.111 -3955 362630.556 902925.000 -3956 362633.333 894877.778 -3957 362641.667 946927.778 -3958 362650.000 1014058.333 -3959 362675.000 944844.444 -3960 362688.889 984794.444 -3961 362694.444 958544.444 -3962 362711.111 925352.778 -3963 362738.889 772847.222 -3964 362741.667 870641.667 -3965 362758.333 998808.333 -3966 362788.889 925969.444 -3967 362802.778 978977.778 -3968 362805.556 803594.444 -3969 362808.333 835150.000 -3970 362830.556 924938.889 -3971 362841.667 821727.778 -3972 362866.667 769850.000 -3973 362894.444 972877.778 -3974 362913.889 887080.556 -3975 362927.778 951530.556 -3976 362941.667 824736.111 -3977 362952.778 801419.444 -3978 362961.111 1191411.111 -3979 362972.222 959911.111 -3980 362972.222 970077.778 -3981 362977.778 1192058.333 -3982 362988.889 842233.333 -3983 363008.333 1197819.444 -3984 363019.444 762236.111 -3985 363019.444 883266.667 -3986 363047.222 866200.000 -3987 363063.889 821933.333 -3988 363075.000 975861.111 -3989 363080.556 784069.444 -3990 363100.000 964638.889 -3991 363105.556 785911.111 -3992 363119.444 877733.333 -3993 363125.000 956158.333 -3994 363133.333 823536.111 -3995 363155.556 997572.222 -3996 363158.333 914825.000 -3997 363158.333 1197075.000 -3998 363183.333 876947.222 -3999 363200.000 906019.444 -4000 363208.333 1212427.778 -4001 363230.556 867133.333 -4002 363275.000 1196447.222 -4003 363294.444 783994.444 -4004 363300.000 841838.889 -4005 363302.778 1192911.111 -4006 363313.889 772130.556 -4007 363319.444 941183.333 -4008 363352.778 934358.333 -4009 363358.333 944605.556 -4010 363361.111 1020716.667 -4011 363377.778 968036.111 -4012 363386.111 891638.889 -4013 363416.667 783902.778 -4014 363433.333 888502.778 -4015 363486.111 822108.333 -4016 363511.111 1194191.667 -4017 363527.778 1096172.222 -4018 363547.222 796647.222 -4019 363555.556 856588.889 -4020 363586.111 1056088.889 -4021 363611.111 1045947.222 -4022 363627.778 907536.111 -4023 363644.444 958386.111 -4024 363647.222 935677.778 -4025 363683.333 960011.111 -4026 363722.222 822258.333 -4027 363727.778 942086.111 -4028 363783.333 894719.444 -4029 363808.333 848844.444 -4030 363827.778 841200.000 -4031 363827.778 901905.556 -4032 363833.333 853230.556 -4033 363838.889 925813.889 -4034 363852.778 799597.222 -4035 363863.889 804697.222 -4036 363872.222 1192169.444 -4037 363875.000 980894.444 -4038 363883.333 864466.667 -4039 363908.333 861672.222 -4040 363911.111 950463.889 -4041 363922.222 824116.667 -4042 363936.111 789830.556 -4043 363950.000 867794.444 -4044 363955.556 769322.222 -4045 363955.556 807227.778 -4046 363955.556 978780.556 -4047 363983.333 781555.556 -4048 363991.667 900236.111 -4049 364000.000 1008022.222 -4050 364011.111 937377.778 -4051 364036.111 814930.556 -4052 364038.889 793363.889 -4053 364052.778 984402.778 -4054 364072.222 830055.556 -4055 364072.222 1055725.000 -4056 364077.778 905797.222 -4057 364122.222 799672.222 -4058 364141.667 963950.000 -4059 364158.333 776033.333 -4060 364169.444 1092280.556 -4061 364180.556 826238.889 -4062 364197.222 824766.667 -4063 364202.778 814736.111 -4064 364211.111 947966.667 -4065 364219.444 944533.333 -4066 364241.667 890569.444 -4067 364247.222 1213252.778 -4068 364252.778 896994.444 -4069 364269.444 775958.333 -4070 364333.333 1196858.333 -4071 364336.111 993900.000 -4072 364338.889 1001411.111 -4073 364344.444 779122.222 -4074 364355.556 978686.111 -4075 364366.667 952711.111 -4076 364369.444 772291.667 -4077 364369.444 975852.778 -4078 364391.667 992044.444 -4079 364394.444 824558.333 -4080 364422.222 770988.889 -4081 364425.000 835997.222 -4082 364441.667 883344.444 -4083 364455.556 781986.111 -4084 364508.333 775591.667 -4085 364511.111 776797.222 -4086 364516.667 899669.444 -4087 364516.667 1031836.111 -4088 364519.444 899191.667 -4089 364533.333 1005369.444 -4090 364541.667 835694.444 -4091 364613.889 776544.444 -4092 364638.889 950475.000 -4093 364644.444 929200.000 -4094 364663.889 799072.222 -4095 364702.778 866513.889 -4096 364708.333 828519.444 -4097 364741.667 822611.111 -4098 364744.444 818050.000 -4099 364761.111 1194422.222 -4100 364777.778 825933.333 -4101 364797.222 1217313.889 -4102 364850.000 825033.333 -4103 364877.778 878383.333 -4104 364883.333 797669.444 -4105 364900.000 774416.667 -4106 364933.333 900750.000 -4107 364955.556 915405.556 -4108 364980.556 845127.778 -4109 364991.667 806075.000 -4110 365002.778 776452.778 -4111 365002.778 806266.667 -4112 365008.333 888752.778 -4113 365041.667 888741.667 -4114 365050.000 1017825.000 -4115 365052.778 811211.111 -4116 365066.667 1214433.333 -4117 365091.667 868850.000 -4118 365108.333 1049152.778 -4119 365138.889 1195530.556 -4120 365147.222 946111.111 -4121 365188.889 896125.000 -4122 365211.111 860263.889 -4123 365222.222 827136.111 -4124 365225.000 939394.444 -4125 365233.333 1192858.333 -4126 365244.444 915380.556 -4127 365288.889 974436.111 -4128 365297.222 832175.000 -4129 365297.222 873594.444 -4130 365302.778 959233.333 -4131 365330.556 823269.444 -4132 365333.333 858500.000 -4133 365355.556 954322.222 -4134 365427.778 1198322.222 -4135 365433.333 1144461.111 -4136 365433.333 1193861.111 -4137 365450.000 1192863.889 -4138 365455.556 944850.000 -4139 365461.111 963269.444 -4140 365461.111 982697.222 -4141 365483.333 824558.333 -4142 365483.333 825619.444 -4143 365486.111 866961.111 -4144 365500.000 855052.778 -4145 365555.556 824680.556 -4146 365569.444 899663.889 -4147 365619.444 862480.556 -4148 365619.444 961613.889 -4149 365680.556 896005.556 -4150 365708.333 1196111.111 -4151 365711.111 891861.111 -4152 365736.111 967038.889 -4153 365736.111 995719.444 -4154 365744.444 851288.889 -4155 365752.778 906038.889 -4156 365769.444 825677.778 -4157 365788.889 984619.444 -4158 365816.667 865163.889 -4159 365822.222 870655.556 -4160 365822.222 988794.444 -4161 365830.556 772002.778 -4162 365844.444 824894.444 -4163 365858.333 793952.778 -4164 365863.889 895277.778 -4165 365877.778 841269.444 -4166 365886.111 793663.889 -4167 365913.889 825736.111 -4168 365922.222 896152.778 -4169 365933.333 1218338.889 -4170 365936.111 947688.889 -4171 365944.444 943838.889 -4172 365950.000 821888.889 -4173 365952.778 1016361.111 -4174 365958.333 902472.222 -4175 365963.889 821886.111 -4176 365963.889 1194494.444 -4177 366002.778 1218936.111 -4178 366030.556 924280.556 -4179 366061.111 1180619.444 -4180 366066.667 1201880.556 -4181 366102.778 883147.222 -4182 366111.111 1218505.556 -4183 366116.667 1195261.111 -4184 366136.111 898163.889 -4185 366208.333 908233.333 -4186 366211.111 932152.778 -4187 366222.222 811511.111 -4188 366244.444 1193127.778 -4189 366283.333 799511.111 -4190 366305.556 1196775.000 -4191 366336.111 817838.889 -4192 366377.778 825811.111 -4193 366386.111 951538.889 -4194 366408.333 802658.333 -4195 366422.222 887388.889 -4196 366436.111 932183.333 -4197 366483.333 871663.889 -4198 366502.778 1197897.222 -4199 366505.556 944433.333 -4200 366508.333 844386.111 -4201 366591.667 1195927.778 -4202 366611.111 809241.667 -4203 366672.222 889933.333 -4204 366675.000 868519.444 -4205 366677.778 963369.444 -4206 366688.889 899686.111 -4207 366691.667 978008.333 -4208 366722.222 939408.333 -4209 366769.444 938686.111 -4210 366775.000 769227.778 -4211 366777.778 1216544.444 -4212 366783.333 973097.222 -4213 366827.778 1014811.111 -4214 366844.444 1218011.111 -4215 366850.000 931197.222 -4216 366858.333 775427.778 -4217 366888.889 831111.111 -4218 366905.556 975561.111 -4219 366908.333 851347.222 -4220 366913.889 798727.778 -4221 366936.111 949627.778 -4222 366941.667 913991.667 -4223 366986.111 789016.667 -4224 366988.889 844775.000 -4225 367000.000 781000.000 -4226 367000.000 799388.889 -4227 367005.556 956377.778 -4228 367022.222 856916.667 -4229 367038.889 1055944.444 -4230 367069.444 970852.778 -4231 367080.556 1195550.000 -4232 367097.222 819775.000 -4233 367097.222 998930.556 -4234 367105.556 1197575.000 -4235 367111.111 1079838.889 -4236 367133.333 788288.889 -4237 367150.000 799155.556 -4238 367161.111 770683.333 -4239 367161.111 809788.889 -4240 367222.222 865772.222 -4241 367233.333 844705.556 -4242 367236.111 1200588.889 -4243 367263.889 781291.667 -4244 367277.778 1102538.889 -4245 367280.556 765838.889 -4246 367280.556 918522.222 -4247 367280.556 1082180.556 -4248 367286.111 809991.667 -4249 367294.444 1025127.778 -4250 367341.667 1083591.667 -4251 367416.667 886366.667 -4252 367416.667 943988.889 -4253 367433.333 841597.222 -4254 367472.222 959805.556 -4255 367477.778 1197713.889 -4256 367511.111 948472.222 -4257 367533.333 861905.556 -4258 367536.111 1203805.556 -4259 367544.444 983563.889 -4260 367569.444 903927.778 -4261 367575.000 778472.222 -4262 367583.333 830272.222 -4263 367591.667 799905.556 -4264 367591.667 895866.667 -4265 367619.444 836950.000 -4266 367625.000 807350.000 -4267 367627.778 940558.333 -4268 367647.222 882952.778 -4269 367658.333 789286.111 -4270 367658.333 1217569.444 -4271 367758.333 873555.556 -4272 367786.111 956391.667 -4273 367797.222 893855.556 -4274 367819.444 966608.333 -4275 367855.556 1086863.889 -4276 367891.667 815822.222 -4277 367902.778 853705.556 -4278 367911.111 817713.889 -4279 367958.333 899577.778 -4280 367958.333 959352.778 -4281 367983.333 816825.000 -4282 367991.667 784586.111 -4283 368044.444 972825.000 -4284 368050.000 986661.111 -4285 368069.444 977333.333 -4286 368083.333 767444.444 -4287 368097.222 1022550.000 -4288 368100.000 871541.667 -4289 368125.000 898613.889 -4290 368141.667 774686.111 -4291 368161.111 1005194.444 -4292 368172.222 939205.556 -4293 368222.222 1079922.222 -4294 368252.778 1197019.444 -4295 368255.556 793983.333 -4296 368347.222 815150.000 -4297 368352.778 762986.111 -4298 368355.556 996300.000 -4299 368405.556 763105.556 -4300 368413.889 946108.333 -4301 368430.556 833219.444 -4302 368452.778 868872.222 -4303 368455.556 1215369.444 -4304 368466.667 762855.556 -4305 368472.222 896852.778 -4306 368486.111 832191.667 -4307 368519.444 833541.667 -4308 368525.000 1214005.556 -4309 368527.778 759783.333 -4310 368572.222 883502.778 -4311 368588.889 1204550.000 -4312 368600.000 1012130.556 -4313 368641.667 867102.778 -4314 368650.000 878352.778 -4315 368655.556 874886.111 -4316 368658.333 831905.556 -4317 368663.889 838888.889 -4318 368672.222 814236.111 -4319 368688.889 943677.778 -4320 368705.556 890097.222 -4321 368736.111 950955.556 -4322 368744.444 948772.222 -4323 368766.667 895877.778 -4324 368816.667 827472.222 -4325 368822.222 970530.556 -4326 368833.333 979216.667 -4327 368858.333 899291.667 -4328 368900.000 822797.222 -4329 368913.889 895383.333 -4330 368936.111 812761.111 -4331 368941.667 817769.444 -4332 368975.000 959258.333 -4333 369008.333 820802.778 -4334 369030.556 1065788.889 -4335 369033.333 1044386.111 -4336 369041.667 1217475.000 -4337 369052.778 935713.889 -4338 369066.667 827819.444 -4339 369069.444 1005388.889 -4340 369086.111 1114727.778 -4341 369094.444 894525.000 -4342 369102.778 1217558.333 -4343 369172.222 948794.444 -4344 369191.667 942550.000 -4345 369208.333 893505.556 -4346 369288.889 939275.000 -4347 369333.333 826291.667 -4348 369333.333 948727.778 -4349 369336.111 1069983.333 -4350 369352.778 1217719.444 -4351 369366.667 1218636.111 -4352 369438.889 824641.667 -4353 369444.444 940041.667 -4354 369455.556 1125258.333 -4355 369483.333 810850.000 -4356 369486.111 840969.444 -4357 369497.222 901583.333 -4358 369519.444 926602.778 -4359 369536.111 793591.667 -4360 369541.667 1010650.000 -4361 369544.444 947877.778 -4362 369605.556 840933.333 -4363 369608.333 1219630.556 -4364 369613.889 1200597.222 -4365 369619.444 781252.778 -4366 369638.889 937955.556 -4367 369647.222 829486.111 -4368 369647.222 890891.667 -4369 369661.111 829225.000 -4370 369683.333 1218991.667 -4371 369708.333 937177.778 -4372 369741.667 1220297.222 -4373 369752.778 1219522.222 -4374 369758.333 825758.333 -4375 369772.222 1218983.333 -4376 369780.556 829886.111 -4377 369783.333 822977.778 -4378 369786.111 764283.333 -4379 369800.000 856122.222 -4380 369847.222 850630.556 -4381 369861.111 1206255.556 -4382 369869.444 948305.556 -4383 369880.556 1219555.556 -4384 369888.889 846000.000 -4385 369902.778 864436.111 -4386 369911.111 914925.000 -4387 369922.222 919697.222 -4388 369927.778 786013.889 -4389 369944.444 956200.000 -4390 369947.222 782275.000 -4391 369952.778 917036.111 -4392 369952.778 943158.333 -4393 369955.556 910144.444 -4394 369958.333 859119.444 -4395 369975.000 798922.222 -4396 370011.111 930813.889 -4397 370030.556 936372.222 -4398 370052.778 891763.889 -4399 370058.333 1215672.222 -4400 370080.556 1018897.222 -4401 370097.222 913233.333 -4402 370113.889 959350.000 -4403 370161.111 819744.444 -4404 370172.222 984850.000 -4405 370175.000 885313.889 -4406 370208.333 932058.333 -4407 370236.111 898197.222 -4408 370297.222 763455.556 -4409 370302.778 934727.778 -4410 370322.222 976066.667 -4411 370333.333 883500.000 -4412 370358.333 770955.556 -4413 370369.444 944966.667 -4414 370372.222 950897.222 -4415 370372.222 956161.111 -4416 370402.778 784836.111 -4417 370405.556 944725.000 -4418 370430.556 1009205.556 -4419 370433.333 932941.667 -4420 370436.111 896102.778 -4421 370475.000 1125255.556 -4422 370477.778 807800.000 -4423 370477.778 874850.000 -4424 370500.000 789444.444 -4425 370511.111 1220136.111 -4426 370513.889 1220722.222 -4427 370516.667 890466.667 -4428 370525.000 862077.778 -4429 370561.111 850886.111 -4430 370563.889 786386.111 -4431 370583.333 1208488.889 -4432 370588.889 881325.000 -4433 370597.222 953591.667 -4434 370619.444 970380.556 -4435 370625.000 817519.444 -4436 370666.667 766766.667 -4437 370675.000 935519.444 -4438 370691.667 941163.889 -4439 370758.333 946394.444 -4440 370766.667 889736.111 -4441 370766.667 944591.667 -4442 370802.778 779975.000 -4443 370833.333 886000.000 -4444 370836.111 944133.333 -4445 370841.667 945130.556 -4446 370850.000 896552.778 -4447 370850.000 1216091.667 -4448 370852.778 891625.000 -4449 370869.444 818552.778 -4450 370891.667 1220852.778 -4451 370919.444 846041.667 -4452 370925.000 792966.667 -4453 370930.556 817938.889 -4454 370938.889 860463.889 -4455 370944.444 880802.778 -4456 371027.778 853063.889 -4457 371036.111 938183.333 -4458 371041.667 965000.000 -4459 371041.667 1135833.333 -4460 371044.444 899105.556 -4461 371055.556 806855.556 -4462 371066.667 925805.556 -4463 371091.667 878819.444 -4464 371116.667 792858.333 -4465 371141.667 891977.778 -4466 371147.222 815197.222 -4467 371150.000 1076325.000 -4468 371155.556 933700.000 -4469 371169.444 930555.556 -4470 371183.333 828269.444 -4471 371200.000 934800.000 -4472 371222.222 763461.111 -4473 371230.556 1202591.667 -4474 371236.111 826013.889 -4475 371236.111 886302.778 -4476 371238.889 921011.111 -4477 371261.111 1221211.111 -4478 371266.667 961866.667 -4479 371288.889 840833.333 -4480 371297.222 804091.667 -4481 371305.556 922633.333 -4482 371305.556 1135075.000 -4483 371305.556 1216533.333 -4484 371330.556 1136533.333 -4485 371366.667 859569.444 -4486 371388.889 884033.333 -4487 371425.000 945105.556 -4488 371463.889 927686.111 -4489 371463.889 944627.778 -4490 371491.667 944427.778 -4491 371500.000 824561.111 -4492 371505.556 913575.000 -4493 371511.111 887319.444 -4494 371533.333 980308.333 -4495 371536.111 837619.444 -4496 371544.444 906955.556 -4497 371575.000 929405.556 -4498 371658.333 872475.000 -4499 371672.222 876925.000 -4500 371675.000 951097.222 -4501 371686.111 1136786.111 -4502 371691.667 948438.889 -4503 371694.444 1045000.000 -4504 371730.556 781236.111 -4505 371733.333 826311.111 -4506 371741.667 1059369.444 -4507 371752.778 1013491.667 -4508 371752.778 1132891.667 -4509 371763.889 943100.000 -4510 371766.667 945652.778 -4511 371769.444 846358.333 -4512 371791.667 916566.667 -4513 371794.444 859069.444 -4514 371800.000 896550.000 -4515 371836.111 873836.111 -4516 371875.000 782016.667 -4517 371883.333 944700.000 -4518 371886.111 997652.778 -4519 371902.778 952969.444 -4520 371908.333 874527.778 -4521 371966.667 897361.111 -4522 372008.333 1054233.333 -4523 372011.111 871788.889 -4524 372011.111 1132688.889 -4525 372013.889 994836.111 -4526 372063.889 888447.222 -4527 372075.000 826719.444 -4528 372080.556 880566.667 -4529 372147.222 938397.222 -4530 372152.778 932980.556 -4531 372166.667 895244.444 -4532 372175.000 870488.889 -4533 372197.222 895088.889 -4534 372241.667 957080.556 -4535 372255.556 866836.111 -4536 372255.556 1075975.000 -4537 372266.667 1219736.111 -4538 372275.000 800130.556 -4539 372277.778 774022.222 -4540 372302.778 774777.778 -4541 372322.222 820991.667 -4542 372350.000 892700.000 -4543 372363.889 1219913.889 -4544 372366.667 874752.778 -4545 372369.444 871591.667 -4546 372397.222 969952.778 -4547 372400.000 774302.778 -4548 372413.889 982263.889 -4549 372416.667 909686.111 -4550 372422.222 784600.000 -4551 372494.444 831933.333 -4552 372508.333 925102.778 -4553 372525.000 812713.889 -4554 372538.889 764972.222 -4555 372577.778 1209977.778 -4556 372583.333 1059041.667 -4557 372608.333 854988.889 -4558 372638.889 1220219.444 -4559 372652.778 973713.889 -4560 372658.333 977652.778 -4561 372677.778 760177.778 -4562 372683.333 931169.444 -4563 372688.889 993263.889 -4564 372694.444 1070091.667 -4565 372697.222 812225.000 -4566 372702.778 955522.222 -4567 372705.556 767077.778 -4568 372708.333 799416.667 -4569 372722.222 858911.111 -4570 372741.667 875119.444 -4571 372741.667 971686.111 -4572 372750.000 1059597.222 -4573 372752.778 1078794.444 -4574 372769.444 891833.333 -4575 372775.000 948247.222 -4576 372777.778 820991.667 -4577 372808.333 798972.222 -4578 372811.111 985800.000 -4579 372855.556 1003397.222 -4580 372866.667 980255.556 -4581 372872.222 1219488.889 -4582 372894.444 759716.667 -4583 372908.333 1203175.000 -4584 372936.111 889752.778 -4585 372938.889 871233.333 -4586 372991.667 862286.111 -4587 373002.778 899811.111 -4588 373011.111 816911.111 -4589 373019.444 783922.222 -4590 373022.222 1204819.444 -4591 373038.889 823511.111 -4592 373050.000 934283.333 -4593 373058.333 895180.556 -4594 373058.333 899702.778 -4595 373100.000 947716.667 -4596 373125.000 812600.000 -4597 373127.778 967538.889 -4598 373138.889 1210197.222 -4599 373152.778 935850.000 -4600 373194.444 806391.667 -4601 373205.556 792577.778 -4602 373230.556 1220311.111 -4603 373250.000 813119.444 -4604 373261.111 919558.333 -4605 373263.889 807352.778 -4606 373280.556 874988.889 -4607 373280.556 1196483.333 -4608 373313.889 808113.889 -4609 373325.000 827211.111 -4610 373327.778 880811.111 -4611 373338.889 869961.111 -4612 373341.667 795233.333 -4613 373352.778 1218938.889 -4614 373358.333 814366.667 -4615 373358.333 829805.556 -4616 373361.111 943011.111 -4617 373386.111 929069.444 -4618 373402.778 952608.333 -4619 373411.111 799433.333 -4620 373433.333 853419.444 -4621 373441.667 867547.222 -4622 373450.000 1082886.111 -4623 373458.333 948086.111 -4624 373475.000 1212675.000 -4625 373488.889 1085852.778 -4626 373538.889 812527.778 -4627 373566.667 774419.444 -4628 373569.444 788255.556 -4629 373602.778 963036.111 -4630 373611.111 891658.333 -4631 373636.111 815502.778 -4632 373636.111 1183941.667 -4633 373661.111 811027.778 -4634 373661.111 1218261.111 -4635 373672.222 884863.889 -4636 373688.889 1220352.778 -4637 373783.333 798072.222 -4638 373797.222 1221363.889 -4639 373819.444 869225.000 -4640 373822.222 808227.778 -4641 373822.222 896661.111 -4642 373838.889 931511.111 -4643 373841.667 1222341.667 -4644 373855.556 939530.556 -4645 373855.556 1001952.778 -4646 373861.111 1022777.778 -4647 373869.444 1207225.000 -4648 373875.000 971138.889 -4649 373894.444 1206122.222 -4650 373902.778 976419.444 -4651 373930.556 940936.111 -4652 373938.889 972808.333 -4653 373972.222 807994.444 -4654 374019.444 868758.333 -4655 374027.778 1046527.778 -4656 374041.667 844138.889 -4657 374083.333 1026138.889 -4658 374108.333 947047.222 -4659 374111.111 935494.444 -4660 374136.111 791425.000 -4661 374152.778 888977.778 -4662 374152.778 938408.333 -4663 374158.333 872655.556 -4664 374183.333 956800.000 -4665 374200.000 812433.333 -4666 374208.333 814402.778 -4667 374216.667 774377.778 -4668 374222.222 810163.889 -4669 374236.111 883461.111 -4670 374241.667 864883.333 -4671 374255.556 815069.444 -4672 374283.333 1219055.556 -4673 374300.000 1222527.778 -4674 374302.778 839980.556 -4675 374308.333 791233.333 -4676 374322.222 1207775.000 -4677 374327.778 815847.222 -4678 374372.222 1019716.667 -4679 374419.444 1221419.444 -4680 374433.333 1000147.222 -4681 374450.000 828052.778 -4682 374450.000 871438.889 -4683 374511.111 869091.667 -4684 374516.667 892680.556 -4685 374538.889 1221811.111 -4686 374555.556 912094.444 -4687 374555.556 946888.889 -4688 374602.778 892469.444 -4689 374613.889 1221966.667 -4690 374636.111 1224275.000 -4691 374644.444 818138.889 -4692 374644.444 845066.667 -4693 374650.000 858933.333 -4694 374688.889 1221400.000 -4695 374694.444 1058694.444 -4696 374702.778 962633.333 -4697 374716.667 1211286.111 -4698 374738.889 1085038.889 -4699 374744.444 972436.111 -4700 374747.222 758586.111 -4701 374766.667 878200.000 -4702 374783.333 816536.111 -4703 374791.667 825188.889 -4704 374800.000 862938.889 -4705 374816.667 1008433.333 -4706 374850.000 1199652.778 -4707 374861.111 1222333.333 -4708 374930.556 871319.444 -4709 374930.556 954700.000 -4710 374947.222 1208455.556 -4711 374950.000 942763.889 -4712 374952.778 862213.889 -4713 374994.444 918569.444 -4714 375019.444 928208.333 -4715 375027.778 975041.667 -4716 375027.778 1224683.333 -4717 375050.000 1050072.222 -4718 375111.111 948377.778 -4719 375177.778 876902.778 -4720 375202.778 1222747.222 -4721 375238.889 956611.111 -4722 375263.889 1207958.333 -4723 375272.222 796800.000 -4724 375275.000 1225122.222 -4725 375297.222 1220391.667 -4726 375311.111 846619.444 -4727 375313.889 767966.667 -4728 375313.889 892533.333 -4729 375316.667 758233.333 -4730 375338.889 958263.889 -4731 375388.889 872583.333 -4732 375422.222 1225150.000 -4733 375427.778 784575.000 -4734 375438.889 947000.000 -4735 375455.556 972686.111 -4736 375458.333 773280.556 -4737 375466.667 879838.889 -4738 375472.222 996338.889 -4739 375536.111 774605.556 -4740 375544.444 889722.222 -4741 375547.222 763372.222 -4742 375569.444 946216.667 -4743 375580.556 945197.222 -4744 375583.333 971347.222 -4745 375586.111 1222700.000 -4746 375597.222 902938.889 -4747 375630.556 1223244.444 -4748 375658.333 973538.889 -4749 375686.111 842963.889 -4750 375697.222 852527.778 -4751 375716.667 837069.444 -4752 375727.778 827527.778 -4753 375738.889 857400.000 -4754 375741.667 1223783.333 -4755 375791.667 1061475.000 -4756 375808.333 774072.222 -4757 375813.889 1013547.222 -4758 375830.556 813805.556 -4759 375830.556 815372.222 -4760 375841.667 1223650.000 -4761 375850.000 790516.667 -4762 375866.667 847938.889 -4763 375880.556 906288.889 -4764 375900.000 775566.667 -4765 375913.889 805438.889 -4766 375950.000 1209566.667 -4767 375958.333 816361.111 -4768 375958.333 1004427.778 -4769 375969.444 1208650.000 -4770 375972.222 906272.222 -4771 375986.111 1223861.111 -4772 376027.778 992922.222 -4773 376036.111 774916.667 -4774 376069.444 875286.111 -4775 376075.000 774772.222 -4776 376133.333 779050.000 -4777 376141.667 818666.667 -4778 376144.444 934102.778 -4779 376150.000 1145111.111 -4780 376194.444 845780.556 -4781 376194.444 888366.667 -4782 376194.444 991061.111 -4783 376211.111 906402.778 -4784 376219.444 821633.333 -4785 376241.667 1047797.222 -4786 376241.667 1094775.000 -4787 376263.889 894977.778 -4788 376300.000 977822.222 -4789 376305.556 1224100.000 -4790 376338.889 794505.556 -4791 376352.778 854008.333 -4792 376361.111 867175.000 -4793 376375.000 765747.222 -4794 376413.889 1207594.444 -4795 376438.889 930922.222 -4796 376438.889 984308.333 -4797 376438.889 987372.222 -4798 376452.778 836488.889 -4799 376455.556 847722.222 -4800 376455.556 915358.333 -4801 376458.333 981133.333 -4802 376486.111 1189711.111 -4803 376547.222 1224066.667 -4804 376577.778 855911.111 -4805 376583.333 976833.333 -4806 376597.222 975750.000 -4807 376613.889 764194.444 -4808 376625.000 1218736.111 -4809 376655.556 827716.667 -4810 376658.333 775066.667 -4811 376719.444 822841.667 -4812 376738.889 808894.444 -4813 376741.667 822775.000 -4814 376775.000 1130611.111 -4815 376788.889 812105.556 -4816 376788.889 1063527.778 -4817 376791.667 954569.444 -4818 376805.556 926636.111 -4819 376808.333 1223988.889 -4820 376811.111 1221233.333 -4821 376819.444 1217669.444 -4822 376830.556 868713.889 -4823 376833.333 879166.667 -4824 376844.444 839530.556 -4825 376852.778 852222.222 -4826 376866.667 979763.889 -4827 376880.556 972633.333 -4828 376902.778 967819.444 -4829 376908.333 757163.889 -4830 376919.444 816241.667 -4831 376922.222 973372.222 -4832 376938.889 858591.667 -4833 376941.667 1220852.778 -4834 376947.222 1221127.778 -4835 376988.889 937958.333 -4836 377005.556 839738.889 -4837 377022.222 1219347.222 -4838 377033.333 822811.111 -4839 377075.000 812508.333 -4840 377102.778 763800.000 -4841 377105.556 821841.667 -4842 377116.667 757494.444 -4843 377130.556 881866.667 -4844 377138.889 971361.111 -4845 377152.778 911350.000 -4846 377194.444 756658.333 -4847 377202.778 1225258.333 -4848 377241.667 898611.111 -4849 377250.000 1221550.000 -4850 377258.333 806422.222 -4851 377272.222 892166.667 -4852 377305.556 818380.556 -4853 377305.556 889330.556 -4854 377338.889 883433.333 -4855 377341.667 793541.667 -4856 377347.222 812997.222 -4857 377361.111 1209344.444 -4858 377383.333 885405.556 -4859 377397.222 818777.778 -4860 377397.222 1214241.667 -4861 377405.556 812308.333 -4862 377416.667 1211233.333 -4863 377430.556 811230.556 -4864 377433.333 877038.889 -4865 377477.778 842947.222 -4866 377497.222 804630.556 -4867 377519.444 890677.778 -4868 377525.000 830688.889 -4869 377527.778 1000166.667 -4870 377530.556 1061080.556 -4871 377533.333 847666.667 -4872 377583.333 812127.778 -4873 377588.889 774802.778 -4874 377600.000 890772.222 -4875 377622.222 848433.333 -4876 377644.444 893350.000 -4877 377661.111 1089052.778 -4878 377666.667 1208461.111 -4879 377691.667 906247.222 -4880 377702.778 1116013.889 -4881 377708.333 812086.111 -4882 377733.333 1130236.111 -4883 377738.889 890263.889 -4884 377741.667 871133.333 -4885 377750.000 1224183.333 -4886 377752.778 879305.556 -4887 377780.556 811883.333 -4888 377791.667 964669.444 -4889 377791.667 975361.111 -4890 377800.000 864605.556 -4891 377800.000 980194.444 -4892 377800.000 1219769.444 -4893 377805.556 804572.222 -4894 377808.333 904216.667 -4895 377813.889 891191.667 -4896 377819.444 756538.889 -4897 377830.556 812661.111 -4898 377838.889 794430.556 -4899 377888.889 971083.333 -4900 377905.556 976291.667 -4901 377930.556 819877.778 -4902 377933.333 799941.667 -4903 377944.444 935777.778 -4904 377963.889 802977.778 -4905 377975.000 797913.889 -4906 377975.000 969994.444 -4907 377975.000 1209955.556 -4908 377975.000 1212150.000 -4909 377991.667 882611.111 -4910 378000.000 973180.556 -4911 378016.667 804458.333 -4912 378030.556 890275.000 -4913 378044.444 1222697.222 -4914 378066.667 1003477.778 -4915 378091.667 854669.444 -4916 378100.000 859813.889 -4917 378105.556 954366.667 -4918 378119.444 1076638.889 -4919 378133.333 820247.222 -4920 378136.111 884380.556 -4921 378144.444 828072.222 -4922 378158.333 811525.000 -4923 378161.111 798247.222 -4924 378172.222 968619.444 -4925 378175.000 892277.778 -4926 378205.556 889275.000 -4927 378216.667 1219988.889 -4928 378227.778 1124350.000 -4929 378227.778 1212755.556 -4930 378238.889 962888.889 -4931 378241.667 820597.222 -4932 378244.444 1222305.556 -4933 378261.111 759919.444 -4934 378286.111 922005.556 -4935 378313.889 1222841.667 -4936 378330.556 891427.778 -4937 378333.333 866327.778 -4938 378344.444 857319.444 -4939 378347.222 973730.556 -4940 378361.111 811350.000 -4941 378361.111 875900.000 -4942 378363.889 812019.444 -4943 378366.667 905327.778 -4944 378391.667 943544.444 -4945 378397.222 947080.556 -4946 378402.778 859491.667 -4947 378405.556 886091.667 -4948 378422.222 1128272.222 -4949 378436.111 824094.444 -4950 378455.556 838583.333 -4951 378486.111 819936.111 -4952 378491.667 1069258.333 -4953 378500.000 997563.889 -4954 378502.778 904986.111 -4955 378502.778 1220311.111 -4956 378511.111 905205.556 -4957 378566.667 924050.000 -4958 378588.889 808544.444 -4959 378591.667 839186.111 -4960 378591.667 1224841.667 -4961 378619.444 846616.667 -4962 378666.667 819866.667 -4963 378672.222 905930.556 -4964 378686.111 976647.222 -4965 378713.889 1093422.222 -4966 378716.667 1222716.667 -4967 378727.778 905277.778 -4968 378736.111 1224555.556 -4969 378769.444 891144.444 -4970 378772.222 1221786.111 -4971 378802.778 862838.889 -4972 378805.556 845730.556 -4973 378811.111 957330.556 -4974 378830.556 870494.444 -4975 378858.333 1221169.444 -4976 378869.444 1222966.667 -4977 378883.333 894947.222 -4978 378966.667 981783.333 -4979 378977.778 889313.889 -4980 378988.889 977825.000 -4981 378994.444 890519.444 -4982 379000.000 867550.000 -4983 379061.111 1225438.889 -4984 379063.889 1220638.889 -4985 379086.111 881291.667 -4986 379094.444 1226852.778 -4987 379100.000 892358.333 -4988 379102.778 853166.667 -4989 379105.556 1222791.667 -4990 379113.889 867444.444 -4991 379136.111 898219.444 -4992 379141.667 919025.000 -4993 379161.111 951700.000 -4994 379166.667 974222.222 -4995 379169.444 952988.889 -4996 379175.000 887622.222 -4997 379213.889 832597.222 -4998 379230.556 905552.778 -4999 379230.556 994094.444 -5000 379236.111 953458.333 -5001 379244.444 953997.222 -5002 379252.778 768594.444 -5003 379255.556 1225263.889 -5004 379330.556 753791.667 -5005 379358.333 1223466.667 -5006 379361.111 992522.222 -5007 379363.889 907877.778 -5008 379369.444 859916.667 -5009 379369.444 869022.222 -5010 379375.000 1078116.667 -5011 379388.889 970194.444 -5012 379402.778 918808.333 -5013 379405.556 1012544.444 -5014 379444.444 874052.778 -5015 379480.556 1220597.222 -5016 379488.889 922636.111 -5017 379508.333 836258.333 -5018 379513.889 867677.778 -5019 379513.889 917711.111 -5020 379533.333 1204216.667 -5021 379577.778 1212897.222 -5022 379586.111 767583.333 -5023 379622.222 986002.778 -5024 379622.222 1223444.444 -5025 379630.556 806897.222 -5026 379647.222 971472.222 -5027 379680.556 913547.222 -5028 379686.111 807672.222 -5029 379716.667 1008722.222 -5030 379725.000 890533.333 -5031 379736.111 820175.000 -5032 379736.111 838419.444 -5033 379736.111 1216944.444 -5034 379736.111 1225300.000 -5035 379747.222 758341.667 -5036 379747.222 815291.667 -5037 379747.222 875558.333 -5038 379747.222 1225605.556 -5039 379772.222 1222941.667 -5040 379780.556 1220300.000 -5041 379797.222 1011327.778 -5042 379805.556 1017522.222 -5043 379811.111 883291.667 -5044 379830.556 890161.111 -5045 379833.333 758541.667 -5046 379838.889 895894.444 -5047 379841.667 1203811.111 -5048 379850.000 1035433.333 -5049 379861.111 1009888.889 -5050 379872.222 1225877.778 -5051 379883.333 857158.333 -5052 379900.000 841797.222 -5053 379916.667 920936.111 -5054 379941.667 838877.778 -5055 379952.778 867977.778 -5056 379966.667 889200.000 -5057 379969.444 1035313.889 -5058 379975.000 1217113.889 -5059 379977.778 1202688.889 -5060 379988.889 861694.444 -5061 379994.444 859436.111 -5062 380013.889 975083.333 -5063 380044.444 1222977.778 -5064 380050.000 1218047.222 -5065 380072.222 896583.333 -5066 380080.556 927444.444 -5067 380127.778 1226441.667 -5068 380144.444 1036277.778 -5069 380147.222 870363.889 -5070 380150.000 1216394.444 -5071 380152.778 890425.000 -5072 380163.889 896186.111 -5073 380172.222 1222875.000 -5074 380227.778 1076708.333 -5075 380238.889 976694.444 -5076 380250.000 780044.444 -5077 380269.444 1219361.111 -5078 380280.556 979400.000 -5079 380280.556 1218836.111 -5080 380291.667 784769.444 -5081 380300.000 790338.889 -5082 380316.667 853425.000 -5083 380330.556 1222658.333 -5084 380372.222 848966.667 -5085 380397.222 1202316.667 -5086 380466.667 937041.667 -5087 380466.667 973447.222 -5088 380491.667 872741.667 -5089 380494.444 773469.444 -5090 380494.444 1221575.000 -5091 380500.000 855458.333 -5092 380522.222 1021222.222 -5093 380525.000 847300.000 -5094 380527.778 811041.667 -5095 380563.889 839433.333 -5096 380608.333 979294.444 -5097 380627.778 914033.333 -5098 380633.333 785027.778 -5099 380638.889 1023100.000 -5100 380666.667 1032222.222 -5101 380669.444 818194.444 -5102 380672.222 1172291.667 -5103 380683.333 788897.222 -5104 380694.444 787008.333 -5105 380722.222 973452.778 -5106 380755.556 755683.333 -5107 380786.111 793833.333 -5108 380802.778 893819.444 -5109 380808.333 818341.667 -5110 380830.556 900958.333 -5111 380838.889 956341.667 -5112 380844.444 998930.556 -5113 380863.889 831263.889 -5114 380872.222 1026202.778 -5115 380875.000 1060944.444 -5116 380902.778 899383.333 -5117 380902.778 922925.000 -5118 380908.333 881586.111 -5119 380916.667 890502.778 -5120 380933.333 885355.556 -5121 380988.889 813241.667 -5122 380991.667 875788.889 -5123 380994.444 883375.000 -5124 381041.667 1222555.556 -5125 381050.000 857588.889 -5126 381075.000 1225686.111 -5127 381088.889 788577.778 -5128 381111.111 858702.778 -5129 381141.667 826033.333 -5130 381161.111 825958.333 -5131 381169.444 784419.444 -5132 381200.000 869141.667 -5133 381230.556 897016.667 -5134 381236.111 857197.222 -5135 381291.667 1040227.778 -5136 381297.222 879350.000 -5137 381302.778 1212713.889 -5138 381344.444 977697.222 -5139 381355.556 961355.556 -5140 381361.111 810997.222 -5141 381372.222 781880.556 -5142 381375.000 1204586.111 -5143 381377.778 892300.000 -5144 381383.333 974311.111 -5145 381400.000 937266.667 -5146 381411.111 856877.778 -5147 381427.778 948133.333 -5148 381450.000 841113.889 -5149 381472.222 980833.333 -5150 381494.444 790719.444 -5151 381502.778 926177.778 -5152 381505.556 812875.000 -5153 381522.222 1212422.222 -5154 381541.667 1213002.778 -5155 381547.222 912438.889 -5156 381558.333 1216902.778 -5157 381597.222 855877.778 -5158 381597.222 874483.333 -5159 381600.000 856597.222 -5160 381616.667 880652.778 -5161 381619.444 834288.889 -5162 381619.444 1216105.556 -5163 381636.111 1211488.889 -5164 381683.333 811950.000 -5165 381688.889 869900.000 -5166 381694.444 971063.889 -5167 381700.000 877830.556 -5168 381769.444 753930.556 -5169 381777.778 947111.111 -5170 381783.333 857097.222 -5171 381802.778 813286.111 -5172 381805.556 990983.333 -5173 381811.111 813072.222 -5174 381863.889 896055.556 -5175 381866.667 919469.444 -5176 381869.444 813655.556 -5177 381875.000 877102.778 -5178 381905.556 940291.667 -5179 381941.667 855644.444 -5180 381944.444 957425.000 -5181 381950.000 856519.444 -5182 381961.111 872966.667 -5183 381961.111 1206794.444 -5184 381969.444 856633.333 -5185 381980.556 886844.444 -5186 382000.000 858227.778 -5187 382008.333 848733.333 -5188 382019.444 790086.111 -5189 382027.778 756927.778 -5190 382030.556 975188.889 -5191 382038.889 857252.778 -5192 382050.000 875741.667 -5193 382080.556 911602.778 -5194 382097.222 842530.556 -5195 382100.000 813841.667 -5196 382100.000 982066.667 -5197 382116.667 899941.667 -5198 382119.444 852236.111 -5199 382119.444 861219.444 -5200 382119.444 896825.000 -5201 382125.000 857402.778 -5202 382141.667 856138.889 -5203 382141.667 1129227.778 -5204 382152.778 814247.222 -5205 382180.556 814430.556 -5206 382180.556 1037555.556 -5207 382183.333 1085680.556 -5208 382205.556 903958.333 -5209 382211.111 903788.889 -5210 382213.889 824425.000 -5211 382225.000 853552.778 -5212 382233.333 800947.222 -5213 382238.889 868622.222 -5214 382247.222 805333.333 -5215 382288.889 856775.000 -5216 382319.444 815377.778 -5217 382319.444 977730.556 -5218 382322.222 905627.778 -5219 382325.000 1226355.556 -5220 382369.444 859858.333 -5221 382383.333 1220391.667 -5222 382402.778 855241.667 -5223 382430.556 933816.667 -5224 382444.444 969277.778 -5225 382452.778 781111.111 -5226 382452.778 815672.222 -5227 382455.556 870361.111 -5228 382494.444 1220388.889 -5229 382500.000 897500.000 -5230 382511.111 875811.111 -5231 382522.222 855922.222 -5232 382541.667 857594.444 -5233 382544.444 769638.889 -5234 382544.444 1046086.111 -5235 382547.222 856313.889 -5236 382547.222 1212988.889 -5237 382566.667 856016.667 -5238 382575.000 879936.111 -5239 382586.111 943302.778 -5240 382613.889 856291.667 -5241 382666.667 764541.667 -5242 382666.667 855330.556 -5243 382672.222 788261.111 -5244 382677.778 856716.667 -5245 382683.333 903800.000 -5246 382694.444 1085472.222 -5247 382716.667 846863.889 -5248 382719.444 876877.778 -5249 382722.222 855836.111 -5250 382730.556 856230.556 -5251 382738.889 856344.444 -5252 382750.000 856150.000 -5253 382769.444 1126402.778 -5254 382786.111 821030.556 -5255 382794.444 856500.000 -5256 382805.556 952416.667 -5257 382811.111 808527.778 -5258 382825.000 855744.444 -5259 382833.333 855911.111 -5260 382833.333 903950.000 -5261 382855.556 821958.333 -5262 382855.556 858241.667 -5263 382858.333 917202.778 -5264 382911.111 766361.111 -5265 382919.444 1224569.444 -5266 382944.444 903158.333 -5267 382972.222 856033.333 -5268 382972.222 1222844.444 -5269 382977.778 1224905.556 -5270 382988.889 869550.000 -5271 383000.000 831741.667 -5272 383002.778 765077.778 -5273 383016.667 916327.778 -5274 383019.444 841475.000 -5275 383027.778 855961.111 -5276 383050.000 899941.667 -5277 383055.556 856963.889 -5278 383083.333 959555.556 -5279 383105.556 854875.000 -5280 383119.444 840275.000 -5281 383138.889 1224808.333 -5282 383150.000 919225.000 -5283 383166.667 866958.333 -5284 383172.222 889030.556 -5285 383175.000 815211.111 -5286 383219.444 756205.556 -5287 383225.000 752180.556 -5288 383238.889 774686.111 -5289 383238.889 1218211.111 -5290 383263.889 898769.444 -5291 383269.444 1227061.111 -5292 383294.444 891908.333 -5293 383305.556 806533.333 -5294 383308.333 887258.333 -5295 383322.222 874452.778 -5296 383325.000 829486.111 -5297 383336.111 856536.111 -5298 383344.444 864641.667 -5299 383358.333 901497.222 -5300 383363.889 750852.778 -5301 383386.111 873450.000 -5302 383397.222 1227000.000 -5303 383422.222 862761.111 -5304 383436.111 893805.556 -5305 383450.000 856155.556 -5306 383450.000 982013.889 -5307 383452.778 885877.778 -5308 383455.556 915013.889 -5309 383483.333 925813.889 -5310 383483.333 970169.444 -5311 383488.889 1207730.556 -5312 383497.222 816327.778 -5313 383500.000 947611.111 -5314 383516.667 859416.667 -5315 383519.444 972041.667 -5316 383527.778 1209316.667 -5317 383550.000 983491.667 -5318 383552.778 875675.000 -5319 383555.556 985805.556 -5320 383566.667 1219866.667 -5321 383605.556 755997.222 -5322 383605.556 817375.000 -5323 383641.667 1225230.556 -5324 383644.444 987644.444 -5325 383683.333 816997.222 -5326 383700.000 851805.556 -5327 383708.333 976638.889 -5328 383722.222 965425.000 -5329 383755.556 863447.222 -5330 383775.000 880561.111 -5331 383819.444 789769.444 -5332 383819.444 975372.222 -5333 383822.222 872127.778 -5334 383861.111 974277.778 -5335 383902.778 842941.667 -5336 383902.778 1051180.556 -5337 383908.333 933344.444 -5338 383911.111 753488.889 -5339 383913.889 869311.111 -5340 383930.556 1208013.889 -5341 383938.889 956027.778 -5342 383952.778 754133.333 -5343 383963.889 825588.889 -5344 383969.444 1130100.000 -5345 383975.000 943513.889 -5346 383980.556 857550.000 -5347 383980.556 980116.667 -5348 383988.889 825783.333 -5349 383997.222 913305.556 -5350 384000.000 1052166.667 -5351 384016.667 1223597.222 -5352 384027.778 942536.111 -5353 384038.889 961813.889 -5354 384047.222 826005.556 -5355 384069.444 875855.556 -5356 384075.000 853788.889 -5357 384077.778 786238.889 -5358 384077.778 861100.000 -5359 384086.111 899919.444 -5360 384088.889 1213705.556 -5361 384094.444 805580.556 -5362 384094.444 822947.222 -5363 384108.333 877613.889 -5364 384147.222 789388.889 -5365 384147.222 818441.667 -5366 384166.667 958527.778 -5367 384177.778 825863.889 -5368 384191.667 824452.778 -5369 384200.000 756880.556 -5370 384200.000 820555.556 -5371 384222.222 837338.889 -5372 384275.000 899136.111 -5373 384277.778 824572.222 -5374 384291.667 1052194.444 -5375 384313.889 928408.333 -5376 384325.000 820202.778 -5377 384327.778 903775.000 -5378 384333.333 851697.222 -5379 384341.667 895502.778 -5380 384344.444 821325.000 -5381 384363.889 1228686.111 -5382 384369.444 823772.222 -5383 384391.667 891627.778 -5384 384405.556 1227133.333 -5385 384408.333 929916.667 -5386 384416.667 892741.667 -5387 384427.778 814805.556 -5388 384436.111 902011.111 -5389 384455.556 910055.556 -5390 384494.444 788691.667 -5391 384527.778 999061.111 -5392 384530.556 856702.778 -5393 384558.333 755777.778 -5394 384563.889 755775.000 -5395 384597.222 940005.556 -5396 384600.000 932025.000 -5397 384602.778 752211.111 -5398 384602.778 810852.778 -5399 384613.889 900916.667 -5400 384655.556 1230077.778 -5401 384697.222 1017522.222 -5402 384722.222 818144.444 -5403 384730.556 779969.444 -5404 384783.333 826380.556 -5405 384783.333 1078755.556 -5406 384794.444 946083.333 -5407 384797.222 1013583.333 -5408 384805.556 1027813.889 -5409 384808.333 767783.333 -5410 384816.667 943541.667 -5411 384819.444 907413.889 -5412 384819.444 1004666.667 -5413 384819.444 1208436.111 -5414 384825.000 1009066.667 -5415 384850.000 786252.778 -5416 384858.333 918502.778 -5417 384886.111 813483.333 -5418 384888.889 921741.667 -5419 384897.222 766825.000 -5420 384902.778 816475.000 -5421 384902.778 897930.556 -5422 384902.778 904869.444 -5423 384919.444 872786.111 -5424 384925.000 826902.778 -5425 384961.111 1214077.778 -5426 384972.222 949502.778 -5427 385019.444 1229950.000 -5428 385025.000 906277.778 -5429 385033.333 826472.222 -5430 385069.444 962616.667 -5431 385086.111 906025.000 -5432 385088.889 891405.556 -5433 385094.444 818400.000 -5434 385130.556 904358.333 -5435 385158.333 884375.000 -5436 385161.111 902102.778 -5437 385172.222 752352.778 -5438 385172.222 826977.778 -5439 385180.556 987777.778 -5440 385200.000 899838.889 -5441 385208.333 880047.222 -5442 385222.222 772938.889 -5443 385225.000 827172.222 -5444 385247.222 1186236.111 -5445 385250.000 891333.333 -5446 385250.000 985333.333 -5447 385250.000 1219697.222 -5448 385266.667 877097.222 -5449 385313.889 993083.333 -5450 385322.222 935219.444 -5451 385325.000 767841.667 -5452 385333.333 902869.444 -5453 385338.889 899888.889 -5454 385347.222 1059983.333 -5455 385363.889 848419.444 -5456 385363.889 859286.111 -5457 385366.667 826830.556 -5458 385369.444 903797.222 -5459 385375.000 819325.000 -5460 385386.111 903350.000 -5461 385388.889 904072.222 -5462 385400.000 827286.111 -5463 385402.778 765847.222 -5464 385411.111 902800.000 -5465 385416.667 857677.778 -5466 385419.444 902327.778 -5467 385425.000 757197.222 -5468 385433.333 896122.222 -5469 385450.000 1217394.444 -5470 385458.333 1069247.222 -5471 385466.667 773369.444 -5472 385488.889 866200.000 -5473 385491.667 904925.000 -5474 385502.778 827780.556 -5475 385505.556 903330.556 -5476 385530.556 903094.444 -5477 385536.111 895383.333 -5478 385541.667 903450.000 -5479 385555.556 978333.333 -5480 385561.111 864683.333 -5481 385563.889 755716.667 -5482 385569.444 903816.667 -5483 385580.556 910119.444 -5484 385594.444 835761.111 -5485 385611.111 941911.111 -5486 385613.889 898972.222 -5487 385630.556 760791.667 -5488 385672.222 866283.333 -5489 385675.000 773283.333 -5490 385708.333 901900.000 -5491 385722.222 948788.889 -5492 385730.556 828302.778 -5493 385733.333 1095491.667 -5494 385736.111 976741.667 -5495 385752.778 771558.333 -5496 385752.778 785027.778 -5497 385758.333 1224488.889 -5498 385766.667 921733.333 -5499 385788.889 1225786.111 -5500 385805.556 1215291.667 -5501 385816.667 1214933.333 -5502 385830.556 936944.444 -5503 385833.333 901250.000 -5504 385833.333 904066.667 -5505 385869.444 984108.333 -5506 385891.667 1213016.667 -5507 385897.222 901200.000 -5508 385902.778 769405.556 -5509 385902.778 903366.667 -5510 385908.333 822830.556 -5511 385913.889 752916.667 -5512 385922.222 899111.111 -5513 385925.000 853177.778 -5514 385925.000 903572.222 -5515 385925.000 905869.444 -5516 385950.000 905461.111 -5517 385969.444 905091.667 -5518 385991.667 833188.889 -5519 386000.000 771625.000 -5520 386008.333 904327.778 -5521 386038.889 898072.222 -5522 386050.000 1079816.667 -5523 386055.556 894358.333 -5524 386055.556 896819.444 -5525 386066.667 896075.000 -5526 386066.667 1212655.556 -5527 386072.222 903833.333 -5528 386075.000 903783.333 -5529 386083.333 912188.889 -5530 386086.111 771408.333 -5531 386102.778 893725.000 -5532 386105.556 895269.444 -5533 386105.556 1228680.556 -5534 386122.222 904633.333 -5535 386125.000 903244.444 -5536 386130.556 787991.667 -5537 386152.778 873544.444 -5538 386155.556 891141.667 -5539 386155.556 952675.000 -5540 386158.333 838086.111 -5541 386172.222 890522.222 -5542 386172.222 1213272.222 -5543 386175.000 819819.444 -5544 386175.000 903491.667 -5545 386183.333 905891.667 -5546 386194.444 946805.556 -5547 386241.667 758547.222 -5548 386244.444 769394.444 -5549 386269.444 770733.333 -5550 386269.444 889455.556 -5551 386275.000 925663.889 -5552 386283.333 910575.000 -5553 386286.111 903194.444 -5554 386300.000 1121200.000 -5555 386338.889 958255.556 -5556 386350.000 900927.778 -5557 386355.556 756102.778 -5558 386355.556 904150.000 -5559 386366.667 900255.556 -5560 386369.444 773113.889 -5561 386380.556 845605.556 -5562 386388.889 787741.667 -5563 386402.778 921222.222 -5564 386411.111 756113.889 -5565 386411.111 837444.444 -5566 386425.000 903236.111 -5567 386450.000 828488.889 -5568 386477.778 786716.667 -5569 386497.222 900930.556 -5570 386497.222 903805.556 -5571 386513.889 862611.111 -5572 386533.333 943486.111 -5573 386555.556 837611.111 -5574 386555.556 927797.222 -5575 386580.556 772500.000 -5576 386591.667 871727.778 -5577 386608.333 904225.000 -5578 386611.111 964916.667 -5579 386616.667 864263.889 -5580 386636.111 873094.444 -5581 386644.444 807100.000 -5582 386652.778 784597.222 -5583 386652.778 903758.333 -5584 386658.333 1209250.000 -5585 386663.889 867911.111 -5586 386675.000 770286.111 -5587 386688.889 884855.556 -5588 386702.778 899844.444 -5589 386711.111 969422.222 -5590 386722.222 901697.222 -5591 386727.778 902991.667 -5592 386730.556 807750.000 -5593 386752.778 917694.444 -5594 386763.889 1213352.778 -5595 386766.667 843302.778 -5596 386769.444 869141.667 -5597 386772.222 875286.111 -5598 386772.222 1231341.667 -5599 386780.556 1211750.000 -5600 386786.111 1212247.222 -5601 386800.000 930927.778 -5602 386808.333 851794.444 -5603 386819.444 845900.000 -5604 386822.222 1047002.778 -5605 386825.000 840658.333 -5606 386825.000 901569.444 -5607 386827.778 1121475.000 -5608 386833.333 902838.889 -5609 386833.333 903077.778 -5610 386858.333 903238.889 -5611 386858.333 1213711.111 -5612 386861.111 765350.000 -5613 386863.889 761719.444 -5614 386886.111 883541.667 -5615 386900.000 753858.333 -5616 386900.000 903425.000 -5617 386905.556 902872.222 -5618 386911.111 1214475.000 -5619 386922.222 1220161.111 -5620 386930.556 902822.222 -5621 386941.667 757738.889 -5622 386947.222 902783.333 -5623 386947.222 1208138.889 -5624 386952.778 903138.889 -5625 386966.667 768480.556 -5626 386975.000 882236.111 -5627 387000.000 902922.222 -5628 387008.333 903497.222 -5629 387011.111 903622.222 -5630 387013.889 901486.111 -5631 387019.444 903169.444 -5632 387025.000 903433.333 -5633 387041.667 772280.556 -5634 387041.667 902816.667 -5635 387041.667 914372.222 -5636 387044.444 932280.556 -5637 387058.333 877600.000 -5638 387072.222 765313.889 -5639 387072.222 1212800.000 -5640 387077.778 770863.889 -5641 387083.333 902927.778 -5642 387105.556 902980.556 -5643 387111.111 981569.444 -5644 387130.556 904297.222 -5645 387133.333 777955.556 -5646 387141.667 854736.111 -5647 387141.667 939911.111 -5648 387144.444 903672.222 -5649 387169.444 878613.889 -5650 387175.000 902655.556 -5651 387183.333 902922.222 -5652 387183.333 950813.889 -5653 387191.667 902602.778 -5654 387191.667 944583.333 -5655 387202.778 920911.111 -5656 387208.333 750763.889 -5657 387208.333 829583.333 -5658 387208.333 902747.222 -5659 387236.111 853694.444 -5660 387236.111 899558.333 -5661 387238.889 770100.000 -5662 387252.778 902966.667 -5663 387263.889 903586.111 -5664 387275.000 903108.333 -5665 387291.667 876816.667 -5666 387291.667 898830.556 -5667 387297.222 1207975.000 -5668 387302.778 828555.556 -5669 387305.556 982277.778 -5670 387308.333 880852.778 -5671 387313.889 799702.778 -5672 387316.667 829977.778 -5673 387316.667 900802.778 -5674 387327.778 763938.889 -5675 387358.333 853800.000 -5676 387358.333 903638.889 -5677 387383.333 771852.778 -5678 387394.444 896711.111 -5679 387400.000 903263.889 -5680 387402.778 902263.889 -5681 387422.222 1080683.333 -5682 387425.000 756047.222 -5683 387430.556 948252.778 -5684 387441.667 903061.111 -5685 387455.556 838450.000 -5686 387458.333 786425.000 -5687 387466.667 1051777.778 -5688 387469.444 902400.000 -5689 387475.000 770833.333 -5690 387477.778 850672.222 -5691 387483.333 899830.556 -5692 387494.444 902855.556 -5693 387508.333 774755.556 -5694 387516.667 769788.889 -5695 387522.222 829369.444 -5696 387544.444 903311.111 -5697 387547.222 828688.889 -5698 387552.778 890952.778 -5699 387552.778 950022.222 -5700 387583.333 830291.667 -5701 387583.333 858080.556 -5702 387594.444 874155.556 -5703 387613.889 1205855.556 -5704 387627.778 937358.333 -5705 387647.222 903136.111 -5706 387647.222 950077.778 -5707 387650.000 768986.111 -5708 387650.000 935563.889 -5709 387713.889 903708.333 -5710 387716.667 840058.333 -5711 387722.222 885025.000 -5712 387725.000 772213.889 -5713 387725.000 1120833.333 -5714 387733.333 888466.667 -5715 387741.667 760766.667 -5716 387741.667 873077.778 -5717 387744.444 751397.222 -5718 387744.444 922569.444 -5719 387750.000 951861.111 -5720 387763.889 765555.556 -5721 387775.000 753102.778 -5722 387800.000 895980.556 -5723 387805.556 955569.444 -5724 387816.667 957383.333 -5725 387819.444 771466.667 -5726 387827.778 846052.778 -5727 387833.333 849016.667 -5728 387838.889 774700.000 -5729 387861.111 829791.667 -5730 387863.889 843697.222 -5731 387863.889 897775.000 -5732 387875.000 942691.667 -5733 387877.778 902158.333 -5734 387891.667 903225.000 -5735 387908.333 1212347.222 -5736 387930.556 774480.556 -5737 387933.333 772719.444 -5738 387933.333 902672.222 -5739 387944.444 835452.778 -5740 387955.556 967355.556 -5741 387997.222 1077188.889 -5742 388005.556 858416.667 -5743 388019.444 813511.111 -5744 388019.444 944525.000 -5745 388033.333 769900.000 -5746 388038.889 769069.444 -5747 388041.667 772050.000 -5748 388047.222 770472.222 -5749 388061.111 871522.222 -5750 388069.444 755916.667 -5751 388072.222 753972.222 -5752 388094.444 769983.333 -5753 388097.222 822025.000 -5754 388105.556 906997.222 -5755 388108.333 949269.444 -5756 388113.889 899530.556 -5757 388113.889 908527.778 -5758 388113.889 911413.889 -5759 388119.444 945316.667 -5760 388133.333 827269.444 -5761 388138.889 769458.333 -5762 388158.333 767500.000 -5763 388183.333 771436.111 -5764 388186.111 817108.333 -5765 388186.111 956888.889 -5766 388188.889 769988.889 -5767 388208.333 785661.111 -5768 388213.889 1023527.778 -5769 388213.889 1211919.444 -5770 388250.000 861700.000 -5771 388250.000 984750.000 -5772 388275.000 910200.000 -5773 388277.778 895400.000 -5774 388283.333 1079702.778 -5775 388294.444 900627.778 -5776 388300.000 768916.667 -5777 388302.778 771966.667 -5778 388327.778 769597.222 -5779 388333.333 769519.444 -5780 388336.111 821383.333 -5781 388338.889 1048208.333 -5782 388341.667 887722.222 -5783 388388.889 774277.778 -5784 388388.889 840963.889 -5785 388402.778 976111.111 -5786 388416.667 765125.000 -5787 388422.222 1061305.556 -5788 388427.778 869913.889 -5789 388444.444 821372.222 -5790 388450.000 768752.778 -5791 388461.111 773066.667 -5792 388466.667 919477.778 -5793 388483.333 900761.111 -5794 388516.667 943436.111 -5795 388527.778 991472.222 -5796 388533.333 913058.333 -5797 388536.111 772597.222 -5798 388561.111 806550.000 -5799 388575.000 768897.222 -5800 388588.889 961088.889 -5801 388597.222 1049166.667 -5802 388611.111 864872.222 -5803 388611.111 900975.000 -5804 388683.333 1075913.889 -5805 388688.889 1179211.111 -5806 388697.222 1069872.222 -5807 388702.778 769213.889 -5808 388711.111 874413.889 -5809 388719.444 771555.556 -5810 388747.222 929113.889 -5811 388783.333 870858.333 -5812 388788.889 860419.444 -5813 388791.667 993263.889 -5814 388794.444 823805.556 -5815 388794.444 829969.444 -5816 388802.778 901111.111 -5817 388808.333 773011.111 -5818 388813.889 948188.889 -5819 388844.444 758275.000 -5820 388850.000 769161.111 -5821 388858.333 945327.778 -5822 388875.000 765122.222 -5823 388877.778 900847.222 -5824 388883.333 897313.889 -5825 388888.889 898452.778 -5826 388905.556 901841.667 -5827 388916.667 1212919.444 -5828 388922.222 894130.556 -5829 388933.333 772219.444 -5830 388941.667 774313.889 -5831 388950.000 770366.667 -5832 388950.000 772119.444 -5833 388952.778 988594.444 -5834 388961.111 769069.444 -5835 388963.889 871866.667 -5836 388966.667 1210758.333 -5837 388975.000 768305.556 -5838 388977.778 1017516.667 -5839 388983.333 900066.667 -5840 389008.333 769158.333 -5841 389008.333 865252.778 -5842 389011.111 772655.556 -5843 389016.667 1079258.333 -5844 389027.778 971166.667 -5845 389061.111 958158.333 -5846 389091.667 900405.556 -5847 389102.778 914480.556 -5848 389105.556 1226091.667 -5849 389125.000 754283.333 -5850 389127.778 772011.111 -5851 389144.444 900858.333 -5852 389172.222 972136.111 -5853 389177.778 839833.333 -5854 389180.556 781947.222 -5855 389186.111 772313.889 -5856 389194.444 973708.333 -5857 389205.556 886613.889 -5858 389208.333 768719.444 -5859 389222.222 1119333.333 -5860 389230.556 942438.889 -5861 389233.333 810961.111 -5862 389236.111 755780.556 -5863 389236.111 768802.778 -5864 389250.000 892688.889 -5865 389258.333 798469.444 -5866 389280.556 769161.111 -5867 389291.667 768619.444 -5868 389313.889 898388.889 -5869 389330.556 769461.111 -5870 389338.889 768969.444 -5871 389341.667 771777.778 -5872 389341.667 808377.778 -5873 389350.000 749063.889 -5874 389350.000 1050163.889 -5875 389377.778 764602.778 -5876 389380.556 769486.111 -5877 389380.556 995602.778 -5878 389386.111 749422.222 -5879 389391.667 769341.667 -5880 389400.000 764952.778 -5881 389413.889 769652.778 -5882 389419.444 835725.000 -5883 389430.556 768925.000 -5884 389430.556 769569.444 -5885 389430.556 845441.667 -5886 389433.333 950983.333 -5887 389452.778 769519.444 -5888 389458.333 846805.556 -5889 389458.333 1199702.778 -5890 389466.667 769313.889 -5891 389477.778 758847.222 -5892 389480.556 817611.111 -5893 389486.111 842800.000 -5894 389488.889 834058.333 -5895 389494.444 848538.889 -5896 389516.667 923338.889 -5897 389519.444 765783.333 -5898 389536.111 947333.333 -5899 389558.333 769458.333 -5900 389561.111 903597.222 -5901 389577.778 1118591.667 -5902 389580.556 762105.556 -5903 389591.667 858902.778 -5904 389591.667 989683.333 -5905 389605.556 890936.111 -5906 389636.111 769911.111 -5907 389636.111 934147.222 -5908 389658.333 770963.889 -5909 389666.667 946166.667 -5910 389683.333 874055.556 -5911 389686.111 773413.889 -5912 389686.111 777358.333 -5913 389688.889 1123227.778 -5914 389694.444 773863.889 -5915 389697.222 768802.778 -5916 389700.000 904313.889 -5917 389702.778 769422.222 -5918 389711.111 770766.667 -5919 389711.111 819144.444 -5920 389716.667 952350.000 -5921 389722.222 970222.222 -5922 389736.111 758052.778 -5923 389736.111 927430.556 -5924 389747.222 748338.889 -5925 389775.000 915047.222 -5926 389777.778 770077.778 -5927 389780.556 1228383.333 -5928 389783.333 764925.000 -5929 389786.111 799497.222 -5930 389791.667 949683.333 -5931 389794.444 765308.333 -5932 389794.444 909805.556 -5933 389805.556 749083.333 -5934 389805.556 769372.222 -5935 389805.556 771005.556 -5936 389819.444 749583.333 -5937 389822.222 946705.556 -5938 389833.333 935683.333 -5939 389858.333 1191619.444 -5940 389863.889 819736.111 -5941 389886.111 769816.667 -5942 389886.111 783588.889 -5943 389891.667 870822.222 -5944 389905.556 770263.889 -5945 389908.333 881625.000 -5946 389916.667 748152.778 -5947 389925.000 791241.667 -5948 389938.889 769108.333 -5949 389938.889 802322.222 -5950 389938.889 1050563.889 -5951 389952.778 1101611.111 -5952 389958.333 889527.778 -5953 389972.222 907383.333 -5954 389975.000 819741.667 -5955 389975.000 844963.889 -5956 389980.556 772886.111 -5957 389988.889 846266.667 -5958 389988.889 895736.111 -5959 389991.667 939533.333 -5960 390005.556 747997.222 -5961 390011.111 1210208.333 -5962 390016.667 766877.778 -5963 390016.667 820488.889 -5964 390019.444 879088.889 -5965 390030.556 769722.222 -5966 390036.111 774008.333 -5967 390036.111 876127.778 -5968 390038.889 819891.667 -5969 390044.444 768758.333 -5970 390052.778 877391.667 -5971 390061.111 856236.111 -5972 390061.111 1118611.111 -5973 390066.667 767794.444 -5974 390077.778 838086.111 -5975 390086.111 944633.333 -5976 390088.889 754661.111 -5977 390100.000 1214219.444 -5978 390122.222 897911.111 -5979 390125.000 846047.222 -5980 390130.556 1047002.778 -5981 390144.444 748819.444 -5982 390150.000 941983.333 -5983 390166.667 846008.333 -5984 390166.667 962888.889 -5985 390169.444 942813.889 -5986 390172.222 927372.222 -5987 390175.000 1220566.667 -5988 390177.778 850588.889 -5989 390177.778 946166.667 -5990 390180.556 918969.444 -5991 390202.778 1208169.444 -5992 390216.667 820291.667 -5993 390216.667 844400.000 -5994 390222.222 946316.667 -5995 390236.111 946933.333 -5996 390241.667 1226738.889 -5997 390250.000 799358.333 -5998 390250.000 998791.667 -5999 390252.778 844175.000 -6000 390252.778 885697.222 -6001 390255.556 770766.667 -6002 390263.889 769744.444 -6003 390272.222 845850.000 -6004 390275.000 820338.889 -6005 390275.000 839197.222 -6006 390277.778 946555.556 -6007 390283.333 842177.778 -6008 390286.111 749388.889 -6009 390286.111 968311.111 -6010 390294.444 895241.667 -6011 390297.222 843663.889 -6012 390302.778 770727.778 -6013 390305.556 975938.889 -6014 390319.444 765030.556 -6015 390330.556 844519.444 -6016 390344.444 843902.778 -6017 390347.222 769077.778 -6018 390347.222 871658.333 -6019 390355.556 845691.667 -6020 390355.556 1042966.667 -6021 390375.000 946319.444 -6022 390380.556 770933.333 -6023 390383.333 804675.000 -6024 390397.222 769933.333 -6025 390397.222 901405.556 -6026 390405.556 946166.667 -6027 390416.667 760666.667 -6028 390427.778 899516.667 -6029 390430.556 1085516.667 -6030 390430.556 1229147.222 -6031 390444.444 953944.444 -6032 390452.778 821305.556 -6033 390483.333 956777.778 -6034 390508.333 747583.333 -6035 390513.889 845816.667 -6036 390516.667 845341.667 -6037 390536.111 765694.444 -6038 390541.667 840530.556 -6039 390561.111 985361.111 -6040 390569.444 849013.889 -6041 390575.000 769361.111 -6042 390594.444 845475.000 -6043 390597.222 948833.333 -6044 390611.111 948194.444 -6045 390619.444 883797.222 -6046 390619.444 887480.556 -6047 390622.222 789697.222 -6048 390633.333 813952.778 -6049 390638.889 1085500.000 -6050 390644.444 1091808.333 -6051 390680.556 830144.444 -6052 390694.444 872600.000 -6053 390694.444 1002319.444 -6054 390702.778 765455.556 -6055 390708.333 898561.111 -6056 390713.889 845322.222 -6057 390719.444 844727.778 -6058 390719.444 852519.444 -6059 390719.444 915700.000 -6060 390722.222 897272.222 -6061 390725.000 937169.444 -6062 390750.000 844472.222 -6063 390755.556 770022.222 -6064 390758.333 953930.556 -6065 390761.111 769580.556 -6066 390769.444 841769.444 -6067 390775.000 846030.556 -6068 390794.444 770733.333 -6069 390825.000 748241.667 -6070 390833.333 782183.333 -6071 390836.111 845086.111 -6072 390838.889 767005.556 -6073 390838.889 771530.556 -6074 390891.667 893905.556 -6075 390908.333 848500.000 -6076 390911.111 944152.778 -6077 390913.889 844958.333 -6078 390916.667 1048722.222 -6079 390919.444 768180.556 -6080 390919.444 1084483.333 -6081 390925.000 845475.000 -6082 390927.778 846127.778 -6083 390927.778 898038.889 -6084 390936.111 1111325.000 -6085 390952.778 874058.333 -6086 390955.556 1215511.111 -6087 390963.889 796811.111 -6088 390991.667 768486.111 -6089 390997.222 945783.333 -6090 391008.333 1209522.222 -6091 391011.111 747180.556 -6092 391041.667 958583.333 -6093 391063.889 844788.889 -6094 391069.444 764852.778 -6095 391072.222 765713.889 -6096 391080.556 769980.556 -6097 391094.444 876563.889 -6098 391097.222 944444.444 -6099 391097.222 950875.000 -6100 391102.778 1083502.778 -6101 391111.111 769327.778 -6102 391111.111 967058.333 -6103 391127.778 844727.778 -6104 391133.333 755422.222 -6105 391133.333 850880.556 -6106 391136.111 826113.889 -6107 391141.667 946272.222 -6108 391155.556 775638.889 -6109 391175.000 900441.667 -6110 391177.778 772527.778 -6111 391180.556 755591.667 -6112 391200.000 885433.333 -6113 391200.000 903283.333 -6114 391211.111 846063.889 -6115 391211.111 851313.889 -6116 391219.444 977063.889 -6117 391222.222 1049166.667 -6118 391230.556 931966.667 -6119 391233.333 825330.556 -6120 391244.444 843616.667 -6121 391247.222 852891.667 -6122 391250.000 869794.444 -6123 391252.778 1118183.333 -6124 391277.778 1215497.222 -6125 391297.222 898194.444 -6126 391300.000 945619.444 -6127 391308.333 894919.444 -6128 391308.333 1231650.000 -6129 391316.667 755252.778 -6130 391319.444 755327.778 -6131 391325.000 941983.333 -6132 391330.556 884719.444 -6133 391333.333 1008633.333 -6134 391341.667 939825.000 -6135 391350.000 858133.333 -6136 391361.111 959513.889 -6137 391361.111 1034694.444 -6138 391366.667 777150.000 -6139 391366.667 847091.667 -6140 391369.444 766986.111 -6141 391394.444 765480.556 -6142 391397.222 771755.556 -6143 391405.556 1216158.333 -6144 391416.667 949383.333 -6145 391433.333 772016.667 -6146 391444.444 891086.111 -6147 391450.000 843744.444 -6148 391452.778 771444.444 -6149 391458.333 774172.222 -6150 391458.333 926836.111 -6151 391458.333 1215902.778 -6152 391488.889 794983.333 -6153 391488.889 1216658.333 -6154 391491.667 767755.556 -6155 391502.778 1232066.667 -6156 391516.667 779825.000 -6157 391522.222 800405.556 -6158 391525.000 847480.556 -6159 391530.556 770672.222 -6160 391530.556 846372.222 -6161 391533.333 746933.333 -6162 391541.667 945466.667 -6163 391547.222 1221483.333 -6164 391552.778 1118175.000 -6165 391566.667 906177.778 -6166 391569.444 846133.333 -6167 391580.556 755247.222 -6168 391588.889 1087283.333 -6169 391591.667 843072.222 -6170 391597.222 825269.444 -6171 391597.222 1217477.778 -6172 391611.111 803522.222 -6173 391611.111 894936.111 -6174 391616.667 847491.667 -6175 391619.444 844569.444 -6176 391625.000 766250.000 -6177 391630.556 871991.667 -6178 391638.889 1197663.889 -6179 391641.667 894636.111 -6180 391652.778 865263.889 -6181 391666.667 765083.333 -6182 391666.667 907808.333 -6183 391697.222 918827.778 -6184 391744.444 901430.556 -6185 391752.778 842944.444 -6186 391758.333 855730.556 -6187 391772.222 767433.333 -6188 391783.333 873936.111 -6189 391791.667 987888.889 -6190 391830.556 766405.556 -6191 391830.556 945925.000 -6192 391836.111 965713.889 -6193 391847.222 938797.222 -6194 391855.556 781636.111 -6195 391863.889 873016.667 -6196 391872.222 844463.889 -6197 391872.222 844880.556 -6198 391888.889 955694.444 -6199 391908.333 843636.111 -6200 391908.333 990283.333 -6201 391911.111 1068169.444 -6202 391927.778 844005.556 -6203 391950.000 946819.444 -6204 391958.333 952080.556 -6205 391963.889 755491.667 -6206 392008.333 804044.444 -6207 392013.889 859213.889 -6208 392019.444 963047.222 -6209 392022.222 836116.667 -6210 392025.000 944922.222 -6211 392038.889 945544.444 -6212 392047.222 760516.667 -6213 392047.222 844280.556 -6214 392052.778 843947.222 -6215 392058.333 894044.444 -6216 392088.889 760669.444 -6217 392094.444 810519.444 -6218 392094.444 935175.000 -6219 392102.778 921377.778 -6220 392105.556 843672.222 -6221 392122.222 1110188.889 -6222 392127.778 941225.000 -6223 392133.333 970052.778 -6224 392144.444 1220083.333 -6225 392150.000 844555.556 -6226 392152.778 953125.000 -6227 392172.222 766375.000 -6228 392180.556 930688.889 -6229 392183.333 845508.333 -6230 392191.667 1210600.000 -6231 392213.889 944511.111 -6232 392216.667 817975.000 -6233 392230.556 845869.444 -6234 392272.222 928463.889 -6235 392272.222 1110527.778 -6236 392275.000 822025.000 -6237 392280.556 843541.667 -6238 392283.333 766166.667 -6239 392300.000 1210755.556 -6240 392311.111 844658.333 -6241 392319.444 843783.333 -6242 392336.111 845458.333 -6243 392338.889 866250.000 -6244 392341.667 922805.556 -6245 392347.222 992977.778 -6246 392352.778 816313.889 -6247 392369.444 850947.222 -6248 392377.778 946958.333 -6249 392377.778 1200255.556 -6250 392402.778 768397.222 -6251 392416.667 748155.556 -6252 392419.444 764483.333 -6253 392425.000 916452.778 -6254 392458.333 750355.556 -6255 392463.889 824786.111 -6256 392463.889 845836.111 -6257 392475.000 1148877.778 -6258 392477.778 881633.333 -6259 392477.778 957061.111 -6260 392483.333 888622.222 -6261 392486.111 873819.444 -6262 392486.111 949000.000 -6263 392505.556 765208.333 -6264 392508.333 803125.000 -6265 392508.333 1062919.444 -6266 392519.444 844702.778 -6267 392544.444 767002.778 -6268 392561.111 844180.556 -6269 392563.889 893480.556 -6270 392566.667 802925.000 -6271 392580.556 758375.000 -6272 392616.667 1210150.000 -6273 392619.444 848200.000 -6274 392630.556 886297.222 -6275 392633.333 803200.000 -6276 392636.111 816294.444 -6277 392638.889 1036916.667 -6278 392666.667 815616.667 -6279 392672.222 767986.111 -6280 392680.556 844133.333 -6281 392680.556 845230.556 -6282 392683.333 1116361.111 -6283 392691.667 803125.000 -6284 392708.333 938341.667 -6285 392719.444 767322.222 -6286 392725.000 776369.444 -6287 392725.000 915744.444 -6288 392727.778 793647.222 -6289 392736.111 882436.111 -6290 392738.889 815730.556 -6291 392738.889 977716.667 -6292 392775.000 745750.000 -6293 392786.111 939766.667 -6294 392797.222 898816.667 -6295 392805.556 803447.222 -6296 392850.000 809686.111 -6297 392863.889 802563.889 -6298 392866.667 867625.000 -6299 392869.444 844852.778 -6300 392883.333 772041.667 -6301 392886.111 803061.111 -6302 392888.889 778600.000 -6303 392902.778 766125.000 -6304 392905.556 756347.222 -6305 392930.556 839888.889 -6306 392930.556 1030666.667 -6307 392950.000 778608.333 -6308 392958.333 859508.333 -6309 392963.889 807772.222 -6310 392963.889 1197747.222 -6311 392988.889 968305.556 -6312 392991.667 879925.000 -6313 392997.222 756050.000 -6314 392997.222 842633.333 -6315 393000.000 852222.222 -6316 393011.111 892850.000 -6317 393022.222 904069.444 -6318 393025.000 936772.222 -6319 393038.889 857713.889 -6320 393047.222 925125.000 -6321 393061.111 1022688.889 -6322 393077.778 1237983.333 -6323 393091.667 764752.778 -6324 393091.667 772975.000 -6325 393108.333 914883.333 -6326 393111.111 949222.222 -6327 393122.222 846505.556 -6328 393141.667 745252.778 -6329 393141.667 776280.556 -6330 393175.000 745950.000 -6331 393183.333 843688.889 -6332 393194.444 884527.778 -6333 393194.444 895719.444 -6334 393200.000 765158.333 -6335 393222.222 952666.667 -6336 393233.333 777530.556 -6337 393236.111 836911.111 -6338 393266.667 1109638.889 -6339 393269.444 815486.111 -6340 393277.778 745038.889 -6341 393280.556 1201822.222 -6342 393291.667 821013.889 -6343 393330.556 829825.000 -6344 393341.667 764397.222 -6345 393355.556 878819.444 -6346 393372.222 854836.111 -6347 393383.333 764800.000 -6348 393391.667 942258.333 -6349 393397.222 852044.444 -6350 393402.778 744777.778 -6351 393405.556 767225.000 -6352 393408.333 800191.667 -6353 393419.444 787569.444 -6354 393419.444 911950.000 -6355 393433.333 954600.000 -6356 393436.111 902125.000 -6357 393450.000 835530.556 -6358 393483.333 796711.111 -6359 393483.333 974458.333 -6360 393488.889 1108508.333 -6361 393508.333 866669.444 -6362 393508.333 1017097.222 -6363 393519.444 833827.778 -6364 393522.222 1125763.889 -6365 393544.444 841272.222 -6366 393566.667 978408.333 -6367 393575.000 1004413.889 -6368 393577.778 780402.778 -6369 393583.333 934955.556 -6370 393597.222 1115855.556 -6371 393600.000 843100.000 -6372 393602.778 1045963.889 -6373 393633.333 765208.333 -6374 393638.889 1216925.000 -6375 393641.667 744233.333 -6376 393647.222 998416.667 -6377 393672.222 767955.556 -6378 393677.778 943619.444 -6379 393688.889 821325.000 -6380 393688.889 1070322.222 -6381 393702.778 947822.222 -6382 393705.556 909050.000 -6383 393708.333 842133.333 -6384 393713.889 862611.111 -6385 393722.222 1048555.556 -6386 393736.111 769680.556 -6387 393738.889 803486.111 -6388 393741.667 767227.778 -6389 393761.111 771550.000 -6390 393772.222 765400.000 -6391 393794.444 812586.111 -6392 393816.667 752202.778 -6393 393869.444 945808.333 -6394 393877.778 889605.556 -6395 393888.889 890800.000 -6396 393913.889 876936.111 -6397 393916.667 797486.111 -6398 393930.556 793733.333 -6399 393938.889 964133.333 -6400 393941.667 765238.889 -6401 393950.000 865625.000 -6402 393955.556 803002.778 -6403 393958.333 1010519.444 -6404 393977.778 821294.444 -6405 393983.333 793819.444 -6406 394013.889 766022.222 -6407 394022.222 1072105.556 -6408 394036.111 769505.556 -6409 394038.889 758677.778 -6410 394050.000 1147777.778 -6411 394063.889 887900.000 -6412 394097.222 1233544.444 -6413 394100.000 743650.000 -6414 394111.111 949013.889 -6415 394119.444 747427.778 -6416 394125.000 764638.889 -6417 394125.000 1217116.667 -6418 394141.667 774108.333 -6419 394152.778 814550.000 -6420 394166.667 953333.333 -6421 394175.000 766213.889 -6422 394183.333 924380.556 -6423 394186.111 775038.889 -6424 394194.444 767805.556 -6425 394200.000 894555.556 -6426 394227.778 765850.000 -6427 394230.556 850127.778 -6428 394233.333 931302.778 -6429 394238.889 928013.889 -6430 394272.222 752344.444 -6431 394277.778 864283.333 -6432 394283.333 744961.111 -6433 394300.000 778044.444 -6434 394311.111 916750.000 -6435 394344.444 929380.556 -6436 394347.222 845369.444 -6437 394355.556 1215369.444 -6438 394369.444 904030.556 -6439 394380.556 992647.222 -6440 394383.333 942038.889 -6441 394388.889 986944.444 -6442 394405.556 925450.000 -6443 394408.333 789741.667 -6444 394408.333 885947.222 -6445 394433.333 896516.667 -6446 394452.778 838286.111 -6447 394455.556 795466.667 -6448 394458.333 1238041.667 -6449 394463.889 897808.333 -6450 394486.111 764180.556 -6451 394488.889 910513.889 -6452 394494.444 757166.667 -6453 394522.222 747280.556 -6454 394561.111 779641.667 -6455 394561.111 981058.333 -6456 394563.889 879961.111 -6457 394575.000 777491.667 -6458 394586.111 822319.444 -6459 394619.444 821819.444 -6460 394625.000 802183.333 -6461 394650.000 874500.000 -6462 394652.778 957361.111 -6463 394666.667 874138.889 -6464 394694.444 762047.222 -6465 394694.444 768297.222 -6466 394716.667 796836.111 -6467 394727.778 765233.333 -6468 394733.333 827394.444 -6469 394736.111 814791.667 -6470 394736.111 922097.222 -6471 394736.111 1187763.889 -6472 394738.889 829108.333 -6473 394783.333 745755.556 -6474 394800.000 845519.444 -6475 394808.333 844577.778 -6476 394808.333 920011.111 -6477 394811.111 766441.667 -6478 394816.667 1060377.778 -6479 394825.000 1114952.778 -6480 394830.556 883727.778 -6481 394838.889 903713.889 -6482 394847.222 820791.667 -6483 394850.000 801427.778 -6484 394852.778 790450.000 -6485 394861.111 750261.111 -6486 394861.111 773522.222 -6487 394886.111 836369.444 -6488 394888.889 961697.222 -6489 394919.444 872672.222 -6490 394922.222 809038.889 -6491 394950.000 798152.778 -6492 394961.111 881761.111 -6493 394966.667 1215511.111 -6494 395008.333 851863.889 -6495 395008.333 897677.778 -6496 395022.222 985463.889 -6497 395030.556 787688.889 -6498 395030.556 820847.222 -6499 395036.111 801669.444 -6500 395050.000 946330.556 -6501 395069.444 847452.778 -6502 395080.556 915286.111 -6503 395105.556 797986.111 -6504 395113.889 821636.111 -6505 395125.000 984333.333 -6506 395127.778 802491.667 -6507 395136.111 749250.000 -6508 395138.889 1215552.778 -6509 395144.444 764113.889 -6510 395147.222 867938.889 -6511 395161.111 843763.889 -6512 395202.778 890488.889 -6513 395205.556 744861.111 -6514 395208.333 861677.778 -6515 395213.889 857769.444 -6516 395219.444 947697.222 -6517 395222.222 954005.556 -6518 395225.000 887536.111 -6519 395236.111 871250.000 -6520 395244.444 1221925.000 -6521 395250.000 1115897.222 -6522 395258.333 871125.000 -6523 395286.111 746483.333 -6524 395297.222 801169.444 -6525 395297.222 840866.667 -6526 395297.222 1198127.778 -6527 395305.556 790177.778 -6528 395308.333 758077.778 -6529 395308.333 803436.111 -6530 395330.556 773150.000 -6531 395330.556 880222.222 -6532 395347.222 1077825.000 -6533 395350.000 1197516.667 -6534 395358.333 763486.111 -6535 395366.667 871058.333 -6536 395380.556 897630.556 -6537 395391.667 863691.667 -6538 395400.000 824072.222 -6539 395419.444 771083.333 -6540 395425.000 1107347.222 -6541 395463.889 750252.778 -6542 395469.444 1114547.222 -6543 395477.778 816397.222 -6544 395483.333 817930.556 -6545 395483.333 943297.222 -6546 395486.111 1076555.556 -6547 395488.889 892944.444 -6548 395491.667 760919.444 -6549 395500.000 860797.222 -6550 395505.556 1073241.667 -6551 395513.889 1103872.222 -6552 395522.222 797980.556 -6553 395522.222 842333.333 -6554 395522.222 940405.556 -6555 395527.778 879394.444 -6556 395538.889 832569.444 -6557 395580.556 801819.444 -6558 395580.556 860952.778 -6559 395588.889 843041.667 -6560 395591.667 742436.111 -6561 395600.000 760716.667 -6562 395608.333 753627.778 -6563 395630.556 951213.889 -6564 395641.667 809961.111 -6565 395655.556 896572.222 -6566 395655.556 944477.778 -6567 395658.333 789805.556 -6568 395672.222 972783.333 -6569 395675.000 848161.111 -6570 395688.889 771772.222 -6571 395708.333 976622.222 -6572 395716.667 754675.000 -6573 395727.778 1075358.333 -6574 395730.556 742319.444 -6575 395744.444 1060969.444 -6576 395752.778 769961.111 -6577 395777.778 755891.667 -6578 395777.778 822377.778 -6579 395852.778 914008.333 -6580 395855.556 902519.444 -6581 395863.889 1064302.778 -6582 395869.444 937958.333 -6583 395886.111 894144.444 -6584 395900.000 789500.000 -6585 395911.111 973986.111 -6586 395916.667 895802.778 -6587 395916.667 897463.889 -6588 395916.667 899527.778 -6589 395927.778 788336.111 -6590 395950.000 751705.556 -6591 395955.556 748819.444 -6592 395994.444 886077.778 -6593 395994.444 1108100.000 -6594 396000.000 759416.667 -6595 396005.556 778208.333 -6596 396005.556 829461.111 -6597 396011.111 1050316.667 -6598 396019.444 748430.556 -6599 396025.000 820883.333 -6600 396027.778 809369.444 -6601 396030.556 743405.556 -6602 396036.111 933422.222 -6603 396044.444 764780.556 -6604 396047.222 761155.556 -6605 396047.222 768502.778 -6606 396047.222 822116.667 -6607 396047.222 828291.667 -6608 396050.000 833955.556 -6609 396066.667 758336.111 -6610 396077.778 908050.000 -6611 396088.889 777047.222 -6612 396091.667 854463.889 -6613 396108.333 945991.667 -6614 396111.111 876961.111 -6615 396116.667 799047.222 -6616 396127.778 863741.667 -6617 396133.333 1050161.111 -6618 396144.444 787752.778 -6619 396172.222 1049502.778 -6620 396202.778 900438.889 -6621 396205.556 777591.667 -6622 396227.778 872833.333 -6623 396236.111 774111.111 -6624 396247.222 890188.889 -6625 396263.889 1114388.889 -6626 396283.333 1050494.444 -6627 396288.889 902188.889 -6628 396294.444 799561.111 -6629 396297.222 904561.111 -6630 396300.000 1116344.444 -6631 396313.889 1065216.667 -6632 396325.000 787847.222 -6633 396333.333 1053166.667 -6634 396344.444 799700.000 -6635 396355.556 840708.333 -6636 396355.556 849311.111 -6637 396363.889 748027.778 -6638 396375.000 1060613.889 -6639 396400.000 891927.778 -6640 396402.778 852622.222 -6641 396402.778 1063736.111 -6642 396413.889 787747.222 -6643 396416.667 777202.778 -6644 396416.667 1049588.889 -6645 396427.778 741808.333 -6646 396427.778 842866.667 -6647 396441.667 775861.111 -6648 396444.444 808577.778 -6649 396444.444 868647.222 -6650 396455.556 887380.556 -6651 396458.333 799875.000 -6652 396469.444 1050247.222 -6653 396469.444 1069511.111 -6654 396477.778 845272.222 -6655 396477.778 1049872.222 -6656 396486.111 818533.333 -6657 396491.667 818622.222 -6658 396494.444 827444.444 -6659 396511.111 776911.111 -6660 396513.889 753286.111 -6661 396525.000 788972.222 -6662 396527.778 787627.778 -6663 396527.778 837869.444 -6664 396533.333 755169.444 -6665 396536.111 835638.889 -6666 396536.111 917344.444 -6667 396538.889 880261.111 -6668 396547.222 775730.556 -6669 396552.778 1068280.556 -6670 396572.222 893894.444 -6671 396577.778 771747.222 -6672 396580.556 789286.111 -6673 396580.556 837350.000 -6674 396583.333 799866.667 -6675 396600.000 750925.000 -6676 396605.556 955261.111 -6677 396611.111 768852.778 -6678 396616.667 995700.000 -6679 396619.444 741655.556 -6680 396619.444 755666.667 -6681 396636.111 794055.556 -6682 396669.444 757272.222 -6683 396697.222 742322.222 -6684 396700.000 861313.889 -6685 396713.889 981533.333 -6686 396716.667 842527.778 -6687 396733.333 856986.111 -6688 396755.556 898466.667 -6689 396761.111 897044.444 -6690 396763.889 1202400.000 -6691 396794.444 844291.667 -6692 396802.778 874175.000 -6693 396819.444 966594.444 -6694 396830.556 776963.889 -6695 396836.111 757500.000 -6696 396841.667 1108538.889 -6697 396847.222 839297.222 -6698 396847.222 883063.889 -6699 396861.111 749955.556 -6700 396866.667 755847.222 -6701 396883.333 1234816.667 -6702 396891.667 865225.000 -6703 396894.444 841688.889 -6704 396911.111 967472.222 -6705 396927.778 777450.000 -6706 396927.778 787930.556 -6707 396938.889 920427.778 -6708 396941.667 910388.889 -6709 396952.778 742591.667 -6710 396955.556 788800.000 -6711 396977.778 760630.556 -6712 396988.889 781800.000 -6713 397011.111 891230.556 -6714 397016.667 824269.444 -6715 397027.778 751122.222 -6716 397044.444 773272.222 -6717 397047.222 1050808.333 -6718 397055.556 964166.667 -6719 397061.111 842194.444 -6720 397061.111 1056969.444 -6721 397069.444 912066.667 -6722 397083.333 913583.333 -6723 397086.111 902280.556 -6724 397088.889 907244.444 -6725 397102.778 1118355.556 -6726 397111.111 754705.556 -6727 397119.444 888044.444 -6728 397119.444 929480.556 -6729 397127.778 889969.444 -6730 397136.111 756097.222 -6731 397136.111 825994.444 -6732 397147.222 884722.222 -6733 397155.556 756411.111 -6734 397155.556 829530.556 -6735 397155.556 886325.000 -6736 397161.111 838777.778 -6737 397183.333 829869.444 -6738 397194.444 832652.778 -6739 397211.111 822988.889 -6740 397219.444 858891.667 -6741 397252.778 899105.556 -6742 397269.444 763269.444 -6743 397277.778 764522.222 -6744 397286.111 1218363.889 -6745 397294.444 754683.333 -6746 397294.444 1048313.889 -6747 397322.222 748813.889 -6748 397327.778 751319.444 -6749 397338.889 902288.889 -6750 397366.667 775352.778 -6751 397377.778 767016.667 -6752 397383.333 855719.444 -6753 397383.333 1043227.778 -6754 397388.889 798988.889 -6755 397391.667 752244.444 -6756 397391.667 755983.333 -6757 397391.667 1049841.667 -6758 397419.444 922583.333 -6759 397422.222 924725.000 -6760 397425.000 1050130.556 -6761 397427.778 1220125.000 -6762 397436.111 775541.667 -6763 397436.111 939980.556 -6764 397441.667 838086.111 -6765 397444.444 770883.333 -6766 397444.444 845322.222 -6767 397452.778 843850.000 -6768 397458.333 755469.444 -6769 397469.444 925638.889 -6770 397475.000 753108.333 -6771 397475.000 1221952.778 -6772 397477.778 815166.667 -6773 397500.000 755000.000 -6774 397508.333 944963.889 -6775 397508.333 1015325.000 -6776 397519.444 905350.000 -6777 397527.778 790811.111 -6778 397530.556 742233.333 -6779 397530.556 1050636.111 -6780 397536.111 765916.667 -6781 397555.556 948722.222 -6782 397555.556 1052205.556 -6783 397558.333 775780.556 -6784 397561.111 993236.111 -6785 397572.222 896536.111 -6786 397575.000 741066.667 -6787 397588.889 841916.667 -6788 397588.889 1044269.444 -6789 397591.667 949494.444 -6790 397605.556 865263.889 -6791 397611.111 799816.667 -6792 397611.111 868119.444 -6793 397622.222 938041.667 -6794 397625.000 811155.556 -6795 397625.000 872291.667 -6796 397655.556 808713.889 -6797 397658.333 903988.889 -6798 397661.111 755097.222 -6799 397661.111 892616.667 -6800 397661.111 1050766.667 -6801 397669.444 990313.889 -6802 397675.000 896805.556 -6803 397683.333 861580.556 -6804 397686.111 766800.000 -6805 397688.889 820922.222 -6806 397713.889 888741.667 -6807 397761.111 859572.222 -6808 397769.444 896791.667 -6809 397791.667 987847.222 -6810 397811.111 769636.111 -6811 397816.667 928900.000 -6812 397819.444 860502.778 -6813 397830.556 950897.222 -6814 397841.667 749925.000 -6815 397844.444 930733.333 -6816 397850.000 857694.444 -6817 397852.778 759791.667 -6818 397872.222 982097.222 -6819 397894.444 769983.333 -6820 397902.778 777280.556 -6821 397911.111 749294.444 -6822 397913.889 741955.556 -6823 397927.778 873708.333 -6824 397930.556 767305.556 -6825 397930.556 1232469.444 -6826 397941.667 915230.556 -6827 397944.444 751491.667 -6828 397952.778 935522.222 -6829 397955.556 855263.889 -6830 397969.444 885916.667 -6831 397972.222 843113.889 -6832 397975.000 842536.111 -6833 397986.111 879858.333 -6834 397988.889 827011.111 -6835 397991.667 882830.556 -6836 397994.444 884622.222 -6837 398005.556 754600.000 -6838 398016.667 896436.111 -6839 398022.222 750644.444 -6840 398022.222 862672.222 -6841 398027.778 828063.889 -6842 398027.778 1050869.444 -6843 398030.556 798080.556 -6844 398036.111 876736.111 -6845 398058.333 920413.889 -6846 398063.889 838869.444 -6847 398066.667 1010416.667 -6848 398069.444 822972.222 -6849 398072.222 770116.667 -6850 398072.222 820713.889 -6851 398077.778 874950.000 -6852 398088.889 755491.667 -6853 398091.667 754869.444 -6854 398094.444 893972.222 -6855 398097.222 825222.222 -6856 398097.222 863225.000 -6857 398105.556 1204680.556 -6858 398113.889 749833.333 -6859 398119.444 771375.000 -6860 398122.222 852088.889 -6861 398125.000 851716.667 -6862 398127.778 793569.444 -6863 398136.111 790250.000 -6864 398161.111 1118547.222 -6865 398169.444 751555.556 -6866 398169.444 912422.222 -6867 398180.556 970505.556 -6868 398183.333 1005277.778 -6869 398191.667 754188.889 -6870 398200.000 750066.667 -6871 398208.333 840194.444 -6872 398219.444 758277.778 -6873 398222.222 1049333.333 -6874 398230.556 787183.333 -6875 398241.667 749980.556 -6876 398244.444 976322.222 -6877 398247.222 797547.222 -6878 398252.778 836344.444 -6879 398266.667 750158.333 -6880 398269.444 805666.667 -6881 398275.000 754147.222 -6882 398277.778 779036.111 -6883 398288.889 848902.778 -6884 398302.778 752408.333 -6885 398308.333 772313.889 -6886 398311.111 905594.444 -6887 398313.889 757577.778 -6888 398338.889 998911.111 -6889 398341.667 960638.889 -6890 398366.667 844113.889 -6891 398366.667 1049586.111 -6892 398366.667 1050366.667 -6893 398380.556 749652.778 -6894 398380.556 751530.556 -6895 398383.333 854388.889 -6896 398386.111 860252.778 -6897 398394.444 750738.889 -6898 398402.778 825461.111 -6899 398402.778 889547.222 -6900 398411.111 966469.444 -6901 398427.778 828047.222 -6902 398433.333 863977.778 -6903 398438.889 750230.556 -6904 398438.889 841247.222 -6905 398441.667 775586.111 -6906 398441.667 895394.444 -6907 398452.778 826008.333 -6908 398461.111 845397.222 -6909 398466.667 757119.444 -6910 398466.667 799000.000 -6911 398480.556 861725.000 -6912 398483.333 810369.444 -6913 398488.889 868022.222 -6914 398494.444 753561.111 -6915 398513.889 1049980.556 -6916 398522.222 750683.333 -6917 398525.000 894086.111 -6918 398525.000 955355.556 -6919 398527.778 894633.333 -6920 398536.111 831830.556 -6921 398536.111 892419.444 -6922 398538.889 890838.889 -6923 398538.889 891661.111 -6924 398555.556 767077.778 -6925 398555.556 767688.889 -6926 398569.444 847933.333 -6927 398583.333 748033.333 -6928 398597.222 866425.000 -6929 398600.000 753447.222 -6930 398600.000 808155.556 -6931 398611.111 819069.444 -6932 398630.556 790583.333 -6933 398636.111 770561.111 -6934 398638.889 864669.444 -6935 398647.222 750555.556 -6936 398652.778 776127.778 -6937 398658.333 751791.667 -6938 398663.889 750286.111 -6939 398675.000 750950.000 -6940 398680.556 1049713.889 -6941 398691.667 753827.778 -6942 398727.778 899211.111 -6943 398744.444 768661.111 -6944 398769.444 870444.444 -6945 398772.222 750650.000 -6946 398772.222 797022.222 -6947 398775.000 843022.222 -6948 398780.556 751211.111 -6949 398780.556 839369.444 -6950 398783.333 750930.556 -6951 398783.333 799250.000 -6952 398788.889 829508.333 -6953 398811.111 753241.667 -6954 398813.889 830930.556 -6955 398830.556 767108.333 -6956 398841.667 827536.111 -6957 398841.667 874086.111 -6958 398850.000 906558.333 -6959 398855.556 1049866.667 -6960 398863.889 769850.000 -6961 398877.778 900077.778 -6962 398891.667 840266.667 -6963 398891.667 943616.667 -6964 398900.000 754758.333 -6965 398900.000 861572.222 -6966 398905.556 841988.889 -6967 398905.556 887280.556 -6968 398908.333 750733.333 -6969 398908.333 752841.667 -6970 398911.111 749222.222 -6971 398913.889 750380.556 -6972 398916.667 751166.667 -6973 398916.667 753000.000 -6974 398919.444 855769.444 -6975 398922.222 747025.000 -6976 398922.222 997066.667 -6977 398925.000 797472.222 -6978 398936.111 896047.222 -6979 398938.889 968791.667 -6980 398955.556 876519.444 -6981 398963.889 801794.444 -6982 398963.889 824202.778 -6983 398966.667 799747.222 -6984 398969.444 761638.889 -6985 398975.000 830869.444 -6986 398977.778 843063.889 -6987 398991.667 820063.889 -6988 398994.444 766405.556 -6989 399000.000 752894.444 -6990 399000.000 825341.667 -6991 399008.333 750850.000 -6992 399016.667 753288.889 -6993 399019.444 753502.778 -6994 399019.444 846750.000 -6995 399022.222 958005.556 -6996 399033.333 844855.556 -6997 399044.444 844016.667 -6998 399063.889 752719.444 -6999 399088.889 766372.222 -7000 399097.222 753238.889 -7001 399097.222 878211.111 -7002 399111.111 851616.667 -7003 399116.667 752775.000 -7004 399122.222 752541.667 -7005 399136.111 868011.111 -7006 399144.444 939619.444 -7007 399147.222 882733.333 -7008 399161.111 765847.222 -7009 399166.667 753880.556 -7010 399175.000 797175.000 -7011 399180.556 750716.667 -7012 399183.333 752594.444 -7013 399202.778 807433.333 -7014 399205.556 789580.556 -7015 399205.556 1050861.111 -7016 399213.889 752883.333 -7017 399219.444 885719.444 -7018 399230.556 772988.889 -7019 399241.667 838088.889 -7020 399258.333 751200.000 -7021 399266.667 740775.000 -7022 399266.667 741341.667 -7023 399277.778 1221780.556 -7024 399283.333 752741.667 -7025 399286.111 749441.667 -7026 399288.889 853702.778 -7027 399291.667 752966.667 -7028 399302.778 772483.333 -7029 399322.222 858480.556 -7030 399325.000 779991.667 -7031 399325.000 889511.111 -7032 399327.778 890619.444 -7033 399336.111 824725.000 -7034 399355.556 914097.222 -7035 399358.333 741713.889 -7036 399361.111 840255.556 -7037 399375.000 776613.889 -7038 399380.556 752722.222 -7039 399386.111 888655.556 -7040 399388.889 741933.333 -7041 399388.889 752558.333 -7042 399402.778 820133.333 -7043 399416.667 948300.000 -7044 399419.444 741502.778 -7045 399419.444 742047.222 -7046 399425.000 745444.444 -7047 399441.667 740733.333 -7048 399444.444 899372.222 -7049 399452.778 799958.333 -7050 399455.556 752616.667 -7051 399472.222 750669.444 -7052 399477.778 810575.000 -7053 399480.556 743611.111 -7054 399486.111 741375.000 -7055 399486.111 874597.222 -7056 399491.667 759738.889 -7057 399508.333 862619.444 -7058 399511.111 902122.222 -7059 399522.222 751641.667 -7060 399525.000 767516.667 -7061 399530.556 1119000.000 -7062 399536.111 741983.333 -7063 399541.667 895486.111 -7064 399541.667 1121194.444 -7065 399547.222 759972.222 -7066 399547.222 828122.222 -7067 399555.556 849175.000 -7068 399555.556 860138.889 -7069 399569.444 858052.778 -7070 399583.333 841722.222 -7071 399586.111 759197.222 -7072 399594.444 825958.333 -7073 399605.556 756058.333 -7074 399608.333 897238.889 -7075 399611.111 829988.889 -7076 399613.889 1055102.778 -7077 399616.667 824913.889 -7078 399625.000 746791.667 -7079 399625.000 767280.556 -7080 399625.000 843280.556 -7081 399633.333 752505.556 -7082 399666.667 758000.000 -7083 399666.667 828855.556 -7084 399675.000 872775.000 -7085 399677.778 847091.667 -7086 399680.556 753416.667 -7087 399686.111 891622.222 -7088 399688.889 829377.778 -7089 399697.222 815366.667 -7090 399700.000 812994.444 -7091 399702.778 740691.667 -7092 399708.333 807508.333 -7093 399719.444 746833.333 -7094 399719.444 765202.778 -7095 399741.667 758202.778 -7096 399747.222 938008.333 -7097 399755.556 1117844.444 -7098 399777.778 796147.222 -7099 399777.778 1051313.889 -7100 399780.556 767333.333 -7101 399783.333 861180.556 -7102 399786.111 820036.111 -7103 399813.889 740666.667 -7104 399819.444 888227.778 -7105 399825.000 772497.222 -7106 399830.556 758241.667 -7107 399830.556 761844.444 -7108 399836.111 768227.778 -7109 399852.778 1048200.000 -7110 399861.111 882588.889 -7111 399866.667 830616.667 -7112 399869.444 951447.222 -7113 399872.222 907633.333 -7114 399880.556 807316.667 -7115 399880.556 811766.667 -7116 399927.778 747880.556 -7117 399936.111 817341.667 -7118 399936.111 1050891.667 -7119 399947.222 844080.556 -7120 399955.556 826744.444 -7121 399958.333 866200.000 -7122 399963.889 1118425.000 -7123 399966.667 749930.556 -7124 399966.667 795861.111 -7125 399969.444 767069.444 -7126 399975.000 857466.667 -7127 399977.778 763544.444 -7128 400016.667 768505.556 -7129 400025.000 799983.333 -7130 400063.889 757036.111 -7131 400069.444 881580.556 -7132 400083.333 752608.333 -7133 400083.333 790783.333 -7134 400088.889 771158.333 -7135 400102.778 799011.111 -7136 400108.333 892822.222 -7137 400113.889 750152.778 -7138 400113.889 783736.111 -7139 400144.444 743116.667 -7140 400150.000 1052700.000 -7141 400158.333 741452.778 -7142 400161.111 810727.778 -7143 400175.000 904241.667 -7144 400177.778 795897.222 -7145 400180.556 807344.444 -7146 400186.111 785041.667 -7147 400191.667 828794.444 -7148 400208.333 980697.222 -7149 400213.889 1220991.667 -7150 400216.667 767283.333 -7151 400227.778 824447.222 -7152 400241.667 798908.333 -7153 400247.222 801002.778 -7154 400250.000 880733.333 -7155 400272.222 808152.778 -7156 400277.778 748694.444 -7157 400277.778 885733.333 -7158 400288.889 756211.111 -7159 400291.667 810391.667 -7160 400297.222 746188.889 -7161 400313.889 909605.556 -7162 400322.222 859125.000 -7163 400330.556 796616.667 -7164 400333.333 831583.333 -7165 400336.111 765047.222 -7166 400347.222 879580.556 -7167 400361.111 746183.333 -7168 400361.111 755141.667 -7169 400363.889 889569.444 -7170 400375.000 1079125.000 -7171 400377.778 763058.333 -7172 400391.667 764311.111 -7173 400391.667 910691.667 -7174 400394.444 842033.333 -7175 400411.111 868744.444 -7176 400419.444 754766.667 -7177 400422.222 876386.111 -7178 400427.778 914975.000 -7179 400444.444 1117313.889 -7180 400455.556 860086.111 -7181 400455.556 878305.556 -7182 400466.667 941355.556 -7183 400469.444 796547.222 -7184 400480.556 901550.000 -7185 400483.333 864691.667 -7186 400491.667 1015325.000 -7187 400497.222 849397.222 -7188 400502.778 1050494.444 -7189 400505.556 749538.889 -7190 400505.556 775205.556 -7191 400513.889 874333.333 -7192 400513.889 945238.889 -7193 400525.000 806286.111 -7194 400530.556 1116727.778 -7195 400547.222 882516.667 -7196 400552.778 840261.111 -7197 400569.444 765525.000 -7198 400580.556 824013.889 -7199 400588.889 1063883.333 -7200 400608.333 956016.667 -7201 400613.889 876380.556 -7202 400630.556 767041.667 -7203 400638.889 807211.111 -7204 400650.000 877019.444 -7205 400652.778 749194.444 -7206 400652.778 800238.889 -7207 400675.000 745311.111 -7208 400680.556 749011.111 -7209 400680.556 825197.222 -7210 400683.333 858483.333 -7211 400691.667 807838.889 -7212 400697.222 753166.667 -7213 400705.556 807611.111 -7214 400711.111 748652.778 -7215 400716.667 740547.222 -7216 400736.111 1046425.000 -7217 400755.556 798983.333 -7218 400758.333 1022227.778 -7219 400763.889 829438.889 -7220 400788.889 936163.889 -7221 400791.667 753019.444 -7222 400794.444 798658.333 -7223 400811.111 750900.000 -7224 400819.444 830252.778 -7225 400830.556 897380.556 -7226 400833.333 798483.333 -7227 400847.222 1048125.000 -7228 400847.222 1049388.889 -7229 400861.111 918130.556 -7230 400861.111 1059388.889 -7231 400869.444 797508.333 -7232 400875.000 805705.556 -7233 400875.000 870597.222 -7234 400877.778 1088097.222 -7235 400883.333 912836.111 -7236 400886.111 829166.667 -7237 400888.889 985191.667 -7238 400911.111 740483.333 -7239 400911.111 795877.778 -7240 400930.556 830180.556 -7241 400941.667 759116.667 -7242 400952.778 876475.000 -7243 400958.333 751255.556 -7244 400958.333 807247.222 -7245 400961.111 989522.222 -7246 400975.000 993616.667 -7247 400977.778 742180.556 -7248 400991.667 1049366.667 -7249 401002.778 795872.222 -7250 401002.778 798408.333 -7251 401002.778 895908.333 -7252 401005.556 748522.222 -7253 401011.111 800675.000 -7254 401016.667 760855.556 -7255 401027.778 846330.556 -7256 401036.111 798694.444 -7257 401052.778 856802.778 -7258 401072.222 808413.889 -7259 401075.000 832675.000 -7260 401077.778 740569.444 -7261 401083.333 837525.000 -7262 401083.333 961541.667 -7263 401083.333 1045194.444 -7264 401091.667 910175.000 -7265 401097.222 765036.111 -7266 401100.000 867719.444 -7267 401105.556 882072.222 -7268 401108.333 767161.111 -7269 401108.333 770352.778 -7270 401119.444 800175.000 -7271 401125.000 855969.444 -7272 401125.000 1049361.111 -7273 401130.556 872625.000 -7274 401138.889 878730.556 -7275 401138.889 879561.111 -7276 401150.000 1116541.667 -7277 401161.111 877783.333 -7278 401163.889 882433.333 -7279 401166.667 800086.111 -7280 401172.222 821194.444 -7281 401172.222 843538.889 -7282 401177.778 804105.556 -7283 401183.333 771902.778 -7284 401188.889 788183.333 -7285 401202.778 1238222.222 -7286 401211.111 887452.778 -7287 401211.111 905630.556 -7288 401213.889 753402.778 -7289 401213.889 820108.333 -7290 401222.222 886452.778 -7291 401222.222 966622.222 -7292 401222.222 1027247.222 -7293 401236.111 876533.333 -7294 401238.889 860133.333 -7295 401244.444 798800.000 -7296 401244.444 876300.000 -7297 401250.000 798666.667 -7298 401250.000 916250.000 -7299 401261.111 740497.222 -7300 401261.111 829291.667 -7301 401291.667 798683.333 -7302 401291.667 994550.000 -7303 401300.000 765708.333 -7304 401302.778 755152.778 -7305 401302.778 1115777.778 -7306 401311.111 952313.889 -7307 401313.889 750677.778 -7308 401319.444 740350.000 -7309 401322.222 844308.333 -7310 401350.000 862205.556 -7311 401363.889 747291.667 -7312 401372.222 971802.778 -7313 401375.000 998291.667 -7314 401377.778 798983.333 -7315 401391.667 748150.000 -7316 401394.444 966588.889 -7317 401408.333 977225.000 -7318 401411.111 806883.333 -7319 401416.667 873947.222 -7320 401447.222 842425.000 -7321 401461.111 747122.222 -7322 401469.444 789122.222 -7323 401483.333 798880.556 -7324 401483.333 893647.222 -7325 401488.889 1029625.000 -7326 401494.444 810663.889 -7327 401497.222 754022.222 -7328 401497.222 771286.111 -7329 401500.000 742138.889 -7330 401502.778 740313.889 -7331 401511.111 762513.889 -7332 401511.111 799077.778 -7333 401519.444 749169.444 -7334 401527.778 766030.556 -7335 401533.333 740286.111 -7336 401536.111 826852.778 -7337 401536.111 889644.444 -7338 401538.889 797413.889 -7339 401544.444 752219.444 -7340 401544.444 807105.556 -7341 401566.667 758330.556 -7342 401566.667 762025.000 -7343 401572.222 760508.333 -7344 401572.222 763072.222 -7345 401597.222 790666.667 -7346 401605.556 1032138.889 -7347 401613.889 790291.667 -7348 401633.333 763952.778 -7349 401633.333 1104022.222 -7350 401638.889 959447.222 -7351 401652.778 1116100.000 -7352 401663.889 975855.556 -7353 401666.667 807000.000 -7354 401669.444 749180.556 -7355 401672.222 1051013.889 -7356 401675.000 921725.000 -7357 401697.222 805938.889 -7358 401708.333 740277.778 -7359 401719.444 849813.889 -7360 401733.333 798577.778 -7361 401736.111 802377.778 -7362 401736.111 854941.667 -7363 401741.667 751072.222 -7364 401744.444 749230.556 -7365 401755.556 1010125.000 -7366 401758.333 860216.667 -7367 401766.667 755480.556 -7368 401777.778 745838.889 -7369 401783.333 740222.222 -7370 401783.333 751288.889 -7371 401786.111 834355.556 -7372 401786.111 1222347.222 -7373 401794.444 1184725.000 -7374 401797.222 761791.667 -7375 401808.333 754294.444 -7376 401825.000 806913.889 -7377 401830.556 798244.444 -7378 401841.667 755383.333 -7379 401855.556 754519.444 -7380 401872.222 767302.778 -7381 401877.778 851275.000 -7382 401880.556 869038.889 -7383 401888.889 852041.667 -7384 401905.556 747027.778 -7385 401916.667 852688.889 -7386 401922.222 740163.889 -7387 401933.333 853863.889 -7388 401933.333 863605.556 -7389 401944.444 1100611.111 -7390 401947.222 925830.556 -7391 401950.000 779833.333 -7392 401950.000 866672.222 -7393 401952.778 884041.667 -7394 401963.889 762013.889 -7395 401963.889 807752.778 -7396 401988.889 754766.667 -7397 401994.444 848052.778 -7398 402000.000 740283.333 -7399 402013.889 771891.667 -7400 402016.667 980675.000 -7401 402019.444 848091.667 -7402 402019.444 1006252.778 -7403 402022.222 740125.000 -7404 402022.222 896980.556 -7405 402022.222 931250.000 -7406 402030.556 799263.889 -7407 402052.778 742141.667 -7408 402055.556 805569.444 -7409 402066.667 751000.000 -7410 402077.778 750730.556 -7411 402077.778 799472.222 -7412 402088.889 789838.889 -7413 402097.222 797672.222 -7414 402105.556 812663.889 -7415 402108.333 752786.111 -7416 402108.333 767913.889 -7417 402113.889 761236.111 -7418 402113.889 885061.111 -7419 402144.444 846369.444 -7420 402150.000 750111.111 -7421 402150.000 1048222.222 -7422 402152.778 782447.222 -7423 402152.778 860263.889 -7424 402169.444 747433.333 -7425 402177.778 945380.556 -7426 402186.111 808730.556 -7427 402191.667 796097.222 -7428 402200.000 744736.111 -7429 402202.778 740125.000 -7430 402202.778 889619.444 -7431 402225.000 844844.444 -7432 402227.778 857788.889 -7433 402230.556 835575.000 -7434 402233.333 769538.889 -7435 402247.222 1052708.333 -7436 402263.889 806516.667 -7437 402269.444 789366.667 -7438 402275.000 903594.444 -7439 402297.222 1008380.556 -7440 402300.000 909500.000 -7441 402305.556 1040722.222 -7442 402313.889 756344.444 -7443 402319.444 927083.333 -7444 402322.222 768850.000 -7445 402330.556 761375.000 -7446 402333.333 740161.111 -7447 402333.333 910625.000 -7448 402338.889 1116577.778 -7449 402344.444 1004169.444 -7450 402352.778 768416.667 -7451 402361.111 740011.111 -7452 402388.889 891230.556 -7453 402394.444 756513.889 -7454 402397.222 769202.778 -7455 402397.222 788352.778 -7456 402402.778 795769.444 -7457 402411.111 760566.667 -7458 402411.111 768944.444 -7459 402413.889 752841.667 -7460 402416.667 881841.667 -7461 402419.444 743016.667 -7462 402427.778 778933.333 -7463 402430.556 740011.111 -7464 402430.556 792377.778 -7465 402433.333 886425.000 -7466 402436.111 788491.667 -7467 402450.000 755955.556 -7468 402452.778 756500.000 -7469 402455.556 748463.889 -7470 402463.889 802116.667 -7471 402469.444 867250.000 -7472 402472.222 796775.000 -7473 402483.333 996330.556 -7474 402497.222 788491.667 -7475 402502.778 1037994.444 -7476 402525.000 756777.778 -7477 402561.111 754641.667 -7478 402588.889 768322.222 -7479 402588.889 1036233.333 -7480 402594.444 892333.333 -7481 402600.000 742741.667 -7482 402625.000 801875.000 -7483 402627.778 769141.667 -7484 402627.778 856758.333 -7485 402638.889 744916.667 -7486 402644.444 758044.444 -7487 402647.222 806263.889 -7488 402652.778 767086.111 -7489 402680.556 967466.667 -7490 402686.111 929530.556 -7491 402691.667 798900.000 -7492 402694.444 745236.111 -7493 402694.444 857280.556 -7494 402700.000 873866.667 -7495 402708.333 798994.444 -7496 402708.333 807816.667 -7497 402719.444 806097.222 -7498 402719.444 818597.222 -7499 402722.222 816061.111 -7500 402727.778 809969.444 -7501 402736.111 764063.889 -7502 402736.111 768847.222 -7503 402750.000 769158.333 -7504 402750.000 1069577.778 -7505 402752.778 768483.333 -7506 402752.778 817511.111 -7507 402761.111 748494.444 -7508 402769.444 858419.444 -7509 402783.333 795450.000 -7510 402794.444 753875.000 -7511 402794.444 865108.333 -7512 402808.333 742516.667 -7513 402819.444 1001652.778 -7514 402819.444 1047772.222 -7515 402822.222 860411.111 -7516 402841.667 841555.556 -7517 402858.333 759847.222 -7518 402858.333 766505.556 -7519 402872.222 788897.222 -7520 402883.333 752094.444 -7521 402883.333 872938.889 -7522 402891.667 850288.889 -7523 402902.778 740180.556 -7524 402908.333 788691.667 -7525 402911.111 795472.222 -7526 402916.667 793894.444 -7527 402916.667 909188.889 -7528 402922.222 798819.444 -7529 402941.667 872488.889 -7530 402941.667 904277.778 -7531 402961.111 740513.889 -7532 402966.667 784500.000 -7533 402969.444 1116938.889 -7534 402972.222 743586.111 -7535 402986.111 830680.556 -7536 402986.111 894850.000 -7537 402988.889 751813.889 -7538 402988.889 788925.000 -7539 402991.667 839688.889 -7540 402994.444 1099880.556 -7541 403000.000 900608.333 -7542 403008.333 852419.444 -7543 403013.889 795391.667 -7544 403030.556 969886.111 -7545 403041.667 739927.778 -7546 403041.667 741008.333 -7547 403041.667 999000.000 -7548 403044.444 826963.889 -7549 403050.000 878005.556 -7550 403055.556 896027.778 -7551 403058.333 880211.111 -7552 403063.889 1212308.333 -7553 403077.778 759658.333 -7554 403083.333 881558.333 -7555 403083.333 1050805.556 -7556 403088.889 765936.111 -7557 403105.556 759397.222 -7558 403105.556 789388.889 -7559 403111.111 783244.444 -7560 403116.667 753255.556 -7561 403119.444 839158.333 -7562 403133.333 889736.111 -7563 403138.889 855005.556 -7564 403144.444 891697.222 -7565 403147.222 883500.000 -7566 403155.556 798313.889 -7567 403161.111 745141.667 -7568 403172.222 746202.778 -7569 403180.556 740155.556 -7570 403200.000 756105.556 -7571 403211.111 793797.222 -7572 403216.667 806100.000 -7573 403219.444 753283.333 -7574 403230.556 793127.778 -7575 403244.444 797013.889 -7576 403247.222 798925.000 -7577 403247.222 805777.778 -7578 403252.778 809013.889 -7579 403272.222 760113.889 -7580 403275.000 805961.111 -7581 403277.778 906069.444 -7582 403280.556 758911.111 -7583 403280.556 796155.556 -7584 403283.333 747911.111 -7585 403288.889 796413.889 -7586 403294.444 759655.556 -7587 403294.444 765155.556 -7588 403294.444 1048547.222 -7589 403300.000 760808.333 -7590 403302.778 739819.444 -7591 403325.000 984483.333 -7592 403336.111 756377.778 -7593 403336.111 759477.778 -7594 403352.778 820069.444 -7595 403355.556 759272.222 -7596 403358.333 783911.111 -7597 403358.333 798700.000 -7598 403366.667 740475.000 -7599 403366.667 754694.444 -7600 403369.444 1049116.667 -7601 403372.222 764758.333 -7602 403375.000 759800.000 -7603 403375.000 797136.111 -7604 403386.111 856444.444 -7605 403386.111 953930.556 -7606 403391.667 767258.333 -7607 403402.778 853508.333 -7608 403408.333 764116.667 -7609 403433.333 1117200.000 -7610 403444.444 866652.778 -7611 403452.778 756333.333 -7612 403455.556 763902.778 -7613 403461.111 742883.333 -7614 403461.111 948722.222 -7615 403469.444 925688.889 -7616 403477.778 798644.444 -7617 403486.111 746594.444 -7618 403486.111 788838.889 -7619 403488.889 851500.000 -7620 403488.889 1047013.889 -7621 403494.444 762136.111 -7622 403505.556 798863.889 -7623 403513.889 843738.889 -7624 403513.889 903244.444 -7625 403516.667 761347.222 -7626 403519.444 887641.667 -7627 403525.000 744405.556 -7628 403538.889 753052.778 -7629 403552.778 800497.222 -7630 403561.111 801102.778 -7631 403583.333 814344.444 -7632 403591.667 914344.444 -7633 403605.556 740386.111 -7634 403611.111 837597.222 -7635 403613.889 739744.444 -7636 403616.667 761844.444 -7637 403641.667 749516.667 -7638 403641.667 1117377.778 -7639 403647.222 800225.000 -7640 403650.000 804141.667 -7641 403658.333 749433.333 -7642 403666.667 961958.333 -7643 403672.222 769313.889 -7644 403672.222 787916.667 -7645 403677.778 810055.556 -7646 403697.222 806341.667 -7647 403705.556 799750.000 -7648 403708.333 802350.000 -7649 403716.667 752019.444 -7650 403719.444 739994.444 -7651 403719.444 752930.556 -7652 403722.222 979711.111 -7653 403725.000 895472.222 -7654 403733.333 756294.444 -7655 403741.667 867688.889 -7656 403752.778 807038.889 -7657 403755.556 823972.222 -7658 403763.889 1046916.667 -7659 403766.667 744250.000 -7660 403769.444 1117950.000 -7661 403772.222 1055211.111 -7662 403780.556 939366.667 -7663 403788.889 745469.444 -7664 403791.667 876686.111 -7665 403794.444 860886.111 -7666 403802.778 790755.556 -7667 403813.889 798600.000 -7668 403816.667 824925.000 -7669 403819.444 803930.556 -7670 403830.556 798066.667 -7671 403844.444 778825.000 -7672 403855.556 797591.667 -7673 403858.333 1222797.222 -7674 403875.000 1045611.111 -7675 403880.556 759183.333 -7676 403886.111 786725.000 -7677 403886.111 854994.444 -7678 403908.333 754925.000 -7679 403908.333 798102.778 -7680 403916.667 743988.889 -7681 403916.667 1118500.000 -7682 403922.222 799002.778 -7683 403922.222 800911.111 -7684 403927.778 958386.111 -7685 403930.556 813466.667 -7686 403930.556 843761.111 -7687 403930.556 901547.222 -7688 403933.333 813338.889 -7689 403933.333 824858.333 -7690 403936.111 779413.889 -7691 403936.111 797863.889 -7692 403936.111 969225.000 -7693 403938.889 799122.222 -7694 403944.444 841727.778 -7695 403947.222 814072.222 -7696 403955.556 798388.889 -7697 403958.333 800333.333 -7698 403958.333 810850.000 -7699 403963.889 913388.889 -7700 403969.444 791519.444 -7701 403969.444 888705.556 -7702 403972.222 913847.222 -7703 403977.778 1050744.444 -7704 403980.556 770233.333 -7705 403983.333 798900.000 -7706 403986.111 794222.222 -7707 403988.889 798411.111 -7708 403997.222 746347.222 -7709 404008.333 935802.778 -7710 404019.444 835452.778 -7711 404022.222 755875.000 -7712 404030.556 797783.333 -7713 404036.111 739919.444 -7714 404058.333 798252.778 -7715 404058.333 799122.222 -7716 404063.889 755022.222 -7717 404075.000 896427.778 -7718 404077.778 740347.222 -7719 404077.778 749786.111 -7720 404086.111 759219.444 -7721 404086.111 798391.667 -7722 404086.111 800836.111 -7723 404088.889 829555.556 -7724 404091.667 925675.000 -7725 404105.556 753786.111 -7726 404125.000 798794.444 -7727 404127.778 847763.889 -7728 404130.556 795705.556 -7729 404141.667 790202.778 -7730 404141.667 799880.556 -7731 404141.667 822411.111 -7732 404147.222 742300.000 -7733 404147.222 743658.333 -7734 404152.778 856505.556 -7735 404155.556 741913.889 -7736 404163.889 1206519.444 -7737 404166.667 868750.000 -7738 404169.444 865947.222 -7739 404172.222 798652.778 -7740 404175.000 862713.889 -7741 404183.333 1013708.333 -7742 404188.889 805897.222 -7743 404197.222 798502.778 -7744 404202.778 917194.444 -7745 404208.333 745611.111 -7746 404208.333 894144.444 -7747 404233.333 784341.667 -7748 404233.333 1047086.111 -7749 404236.111 798830.556 -7750 404255.556 800941.667 -7751 404258.333 786202.778 -7752 404258.333 869080.556 -7753 404258.333 897791.667 -7754 404263.889 832969.444 -7755 404263.889 907925.000 -7756 404266.667 885261.111 -7757 404272.222 783891.667 -7758 404272.222 861255.556 -7759 404311.111 792611.111 -7760 404316.667 981055.556 -7761 404330.556 742000.000 -7762 404333.333 807719.444 -7763 404336.111 893130.556 -7764 404338.889 830738.889 -7765 404344.444 800825.000 -7766 404344.444 849777.778 -7767 404347.222 892177.778 -7768 404350.000 800663.889 -7769 404369.444 843797.222 -7770 404377.778 813733.333 -7771 404383.333 798433.333 -7772 404400.000 816991.667 -7773 404402.778 953775.000 -7774 404402.778 993694.444 -7775 404405.556 799961.111 -7776 404416.667 741302.778 -7777 404416.667 753419.444 -7778 404416.667 798822.222 -7779 404455.556 950658.333 -7780 404461.111 800677.778 -7781 404463.889 741786.111 -7782 404463.889 743863.889 -7783 404469.444 759666.667 -7784 404483.333 1222966.667 -7785 404502.778 831886.111 -7786 404511.111 853700.000 -7787 404513.889 743083.333 -7788 404533.333 1117772.222 -7789 404538.889 758183.333 -7790 404555.556 1095280.556 -7791 404566.667 742469.444 -7792 404577.778 921711.111 -7793 404591.667 743613.889 -7794 404591.667 906716.667 -7795 404591.667 963772.222 -7796 404597.222 785919.444 -7797 404597.222 795233.333 -7798 404602.778 880952.778 -7799 404608.333 799511.111 -7800 404613.889 836700.000 -7801 404641.667 806011.111 -7802 404650.000 878963.889 -7803 404655.556 800658.333 -7804 404672.222 876683.333 -7805 404677.778 841805.556 -7806 404680.556 769322.222 -7807 404700.000 753208.333 -7808 404711.111 838927.778 -7809 404741.667 957333.333 -7810 404755.556 854944.444 -7811 404769.444 930030.556 -7812 404772.222 1095861.111 -7813 404775.000 1049008.333 -7814 404777.778 742911.111 -7815 404780.556 785411.111 -7816 404780.556 859666.667 -7817 404783.333 991263.889 -7818 404791.667 792000.000 -7819 404797.222 846283.333 -7820 404797.222 856277.778 -7821 404800.000 799786.111 -7822 404802.778 863947.222 -7823 404813.889 789188.889 -7824 404813.889 969602.778 -7825 404819.444 757580.556 -7826 404822.222 785519.444 -7827 404841.667 889936.111 -7828 404847.222 780105.556 -7829 404850.000 787250.000 -7830 404850.000 1068311.111 -7831 404861.111 744522.222 -7832 404863.889 794516.667 -7833 404863.889 861336.111 -7834 404872.222 856130.556 -7835 404875.000 944108.333 -7836 404897.222 814458.333 -7837 404897.222 1119380.556 -7838 404905.556 870963.889 -7839 404913.889 799050.000 -7840 404919.444 1072569.444 -7841 404933.333 798608.333 -7842 404936.111 843147.222 -7843 404944.444 896516.667 -7844 404950.000 819847.222 -7845 404966.667 806069.444 -7846 404986.111 989475.000 -7847 404991.667 743994.444 -7848 405005.556 828936.111 -7849 405008.333 759702.778 -7850 405008.333 800677.778 -7851 405030.556 786305.556 -7852 405033.333 757016.667 -7853 405041.667 799491.667 -7854 405063.889 798433.333 -7855 405066.667 742658.333 -7856 405066.667 837480.556 -7857 405083.333 858255.556 -7858 405083.333 868416.667 -7859 405100.000 800947.222 -7860 405108.333 756033.333 -7861 405113.889 753908.333 -7862 405122.222 748597.222 -7863 405122.222 1114736.111 -7864 405141.667 889905.556 -7865 405152.778 1075458.333 -7866 405158.333 755555.556 -7867 405169.444 1016427.778 -7868 405183.333 801669.444 -7869 405186.111 783950.000 -7870 405194.444 808841.667 -7871 405197.222 872477.778 -7872 405205.556 814741.667 -7873 405208.333 925277.778 -7874 405211.111 873783.333 -7875 405216.667 980550.000 -7876 405219.444 1119383.333 -7877 405222.222 800344.444 -7878 405247.222 1118630.556 -7879 405261.111 750619.444 -7880 405266.667 996333.333 -7881 405269.444 975955.556 -7882 405275.000 894925.000 -7883 405288.889 794616.667 -7884 405294.444 891772.222 -7885 405302.778 1047108.333 -7886 405308.333 1122975.000 -7887 405316.667 801691.667 -7888 405322.222 914147.222 -7889 405344.444 835205.556 -7890 405363.889 801847.222 -7891 405369.444 893575.000 -7892 405394.444 754972.222 -7893 405394.444 769611.111 -7894 405408.333 745880.556 -7895 405416.667 797994.444 -7896 405430.556 743636.111 -7897 405433.333 787880.556 -7898 405433.333 791625.000 -7899 405488.889 768122.222 -7900 405488.889 784294.444 -7901 405488.889 845702.778 -7902 405491.667 828275.000 -7903 405500.000 913847.222 -7904 405508.333 948191.667 -7905 405511.111 801930.556 -7906 405527.778 905061.111 -7907 405530.556 797575.000 -7908 405533.333 745319.444 -7909 405538.889 852775.000 -7910 405544.444 819180.556 -7911 405544.444 1231819.444 -7912 405555.556 759822.222 -7913 405561.111 908658.333 -7914 405575.000 828625.000 -7915 405580.556 900350.000 -7916 405588.889 791513.889 -7917 405622.222 1119288.889 -7918 405630.556 802086.111 -7919 405638.889 888988.889 -7920 405644.444 871069.444 -7921 405647.222 878930.556 -7922 405666.667 767008.333 -7923 405669.444 886163.889 -7924 405675.000 882477.778 -7925 405675.000 896405.556 -7926 405677.778 841936.111 -7927 405683.333 745388.889 -7928 405686.111 750950.000 -7929 405694.444 746333.333 -7930 405694.444 774030.556 -7931 405697.222 773972.222 -7932 405697.222 797650.000 -7933 405716.667 807266.667 -7934 405719.444 857691.667 -7935 405725.000 744930.556 -7936 405725.000 898133.333 -7937 405727.778 810858.333 -7938 405733.333 766916.667 -7939 405736.111 802358.333 -7940 405741.667 746102.778 -7941 405747.222 769894.444 -7942 405763.889 1242627.778 -7943 405772.222 742286.111 -7944 405788.889 861902.778 -7945 405791.667 744119.444 -7946 405794.444 753411.111 -7947 405800.000 797669.444 -7948 405813.889 795666.667 -7949 405825.000 1047313.889 -7950 405833.333 909691.667 -7951 405844.444 1023019.444 -7952 405852.778 1050838.889 -7953 405861.111 795316.667 -7954 405861.111 983880.556 -7955 405866.667 1223905.556 -7956 405875.000 866750.000 -7957 405883.333 736583.333 -7958 405883.333 824250.000 -7959 405886.111 831286.111 -7960 405888.889 737294.444 -7961 405891.667 744722.222 -7962 405891.667 765527.778 -7963 405891.667 802252.778 -7964 405900.000 985058.333 -7965 405902.778 998605.556 -7966 405916.667 1118833.333 -7967 405941.667 751947.222 -7968 405947.222 815269.444 -7969 405961.111 795558.333 -7970 405969.444 880380.556 -7971 405980.556 795613.889 -7972 405983.333 760936.111 -7973 405983.333 1241561.111 -7974 406000.000 1124636.111 -7975 406005.556 839752.778 -7976 406011.111 813613.889 -7977 406013.889 753955.556 -7978 406013.889 797600.000 -7979 406027.778 787088.889 -7980 406027.778 795650.000 -7981 406027.778 806491.667 -7982 406027.778 868672.222 -7983 406033.333 783250.000 -7984 406041.667 736558.333 -7985 406044.444 956575.000 -7986 406050.000 777258.333 -7987 406055.556 978588.889 -7988 406058.333 889872.222 -7989 406080.556 742780.556 -7990 406080.556 797413.889 -7991 406086.111 865400.000 -7992 406097.222 1119383.333 -7993 406111.111 1118991.667 -7994 406113.889 798372.222 -7995 406116.667 767188.889 -7996 406127.778 894591.667 -7997 406130.556 805630.556 -7998 406150.000 896222.222 -7999 406155.556 737300.000 -8000 406166.667 873208.333 -8001 406172.222 855047.222 -8002 406175.000 896002.778 -8003 406183.333 806044.444 -8004 406186.111 805775.000 -8005 406188.889 980969.444 -8006 406197.222 1118094.444 -8007 406200.000 825108.333 -8008 406200.000 966288.889 -8009 406211.111 904619.444 -8010 406211.111 986572.222 -8011 406213.889 791527.778 -8012 406219.444 742450.000 -8013 406225.000 808380.556 -8014 406227.778 737247.222 -8015 406227.778 939338.889 -8016 406238.889 737088.889 -8017 406255.556 1032072.222 -8018 406263.889 753461.111 -8019 406266.667 761930.556 -8020 406283.333 763875.000 -8021 406283.333 876961.111 -8022 406297.222 892747.222 -8023 406297.222 913150.000 -8024 406300.000 744277.778 -8025 406300.000 893325.000 -8026 406300.000 1005152.778 -8027 406305.556 761713.889 -8028 406308.333 929244.444 -8029 406319.444 737130.556 -8030 406336.111 744077.778 -8031 406350.000 802283.333 -8032 406352.778 822333.333 -8033 406355.556 1047547.222 -8034 406358.333 782961.111 -8035 406361.111 736819.444 -8036 406361.111 911672.222 -8037 406363.889 829691.667 -8038 406366.667 791444.444 -8039 406366.667 802402.778 -8040 406369.444 975850.000 -8041 406377.778 744513.889 -8042 406386.111 736405.556 -8043 406386.111 775688.889 -8044 406386.111 1119380.556 -8045 406402.778 917427.778 -8046 406408.333 743111.111 -8047 406408.333 743838.889 -8048 406408.333 748816.667 -8049 406411.111 1026263.889 -8050 406413.889 887833.333 -8051 406416.667 748363.889 -8052 406419.444 736700.000 -8053 406422.222 798511.111 -8054 406425.000 742858.333 -8055 406427.778 787730.556 -8056 406427.778 915644.444 -8057 406430.556 736961.111 -8058 406430.556 775808.333 -8059 406430.556 1112800.000 -8060 406441.667 974500.000 -8061 406444.444 804163.889 -8062 406458.333 805980.556 -8063 406461.111 1114972.222 -8064 406469.444 836097.222 -8065 406472.222 895911.111 -8066 406472.222 971130.556 -8067 406500.000 814522.222 -8068 406502.778 896519.444 -8069 406511.111 812991.667 -8070 406530.556 815811.111 -8071 406536.111 972858.333 -8072 406538.889 750869.444 -8073 406541.667 841508.333 -8074 406547.222 736722.222 -8075 406547.222 754750.000 -8076 406547.222 761011.111 -8077 406552.778 743902.778 -8078 406572.222 961861.111 -8079 406575.000 735836.111 -8080 406577.778 849519.444 -8081 406583.333 743000.000 -8082 406586.111 736416.667 -8083 406588.889 743477.778 -8084 406594.444 743233.333 -8085 406597.222 754772.222 -8086 406597.222 802394.444 -8087 406600.000 1119955.556 -8088 406608.333 862419.444 -8089 406625.000 787802.778 -8090 406627.778 735519.444 -8091 406630.556 868694.444 -8092 406638.889 742111.111 -8093 406638.889 775961.111 -8094 406641.667 737088.889 -8095 406641.667 742636.111 -8096 406641.667 904347.222 -8097 406644.444 742647.222 -8098 406658.333 734886.111 -8099 406661.111 806233.333 -8100 406661.111 895800.000 -8101 406669.444 751577.778 -8102 406669.444 947211.111 -8103 406669.444 1118872.222 -8104 406672.222 813550.000 -8105 406677.778 1119380.556 -8106 406686.111 735275.000 -8107 406686.111 741147.222 -8108 406688.889 1118238.889 -8109 406700.000 754958.333 -8110 406705.556 782388.889 -8111 406722.222 743577.778 -8112 406733.333 805766.667 -8113 406733.333 845188.889 -8114 406733.333 921619.444 -8115 406738.889 857213.889 -8116 406763.889 742911.111 -8117 406766.667 818705.556 -8118 406766.667 958588.889 -8119 406786.111 735894.444 -8120 406786.111 752372.222 -8121 406788.889 734175.000 -8122 406788.889 736744.444 -8123 406788.889 910727.778 -8124 406791.667 804950.000 -8125 406800.000 965061.111 -8126 406800.000 1223508.333 -8127 406802.778 734555.556 -8128 406805.556 734747.222 -8129 406805.556 1223700.000 -8130 406813.889 734002.778 -8131 406813.889 820219.444 -8132 406825.000 931208.333 -8133 406827.778 854272.222 -8134 406833.333 744430.556 -8135 406836.111 735105.556 -8136 406841.667 746361.111 -8137 406844.444 803291.667 -8138 406844.444 896800.000 -8139 406850.000 737022.222 -8140 406855.556 761958.333 -8141 406858.333 926772.222 -8142 406861.111 754972.222 -8143 406866.667 733738.889 -8144 406866.667 841377.778 -8145 406872.222 802716.667 -8146 406875.000 802541.667 -8147 406911.111 735636.111 -8148 406913.889 735338.889 -8149 406916.667 811813.889 -8150 406916.667 897950.000 -8151 406925.000 896277.778 -8152 406927.778 837855.556 -8153 406933.333 735080.556 -8154 406936.111 751905.556 -8155 406936.111 895888.889 -8156 406952.778 803050.000 -8157 406955.556 733261.111 -8158 406958.333 800119.444 -8159 406963.889 761691.667 -8160 406966.667 749411.111 -8161 406975.000 734255.556 -8162 406983.333 744019.444 -8163 406994.444 990811.111 -8164 407000.000 802683.333 -8165 407000.000 1118097.222 -8166 407002.778 735933.333 -8167 407008.333 734625.000 -8168 407008.333 737133.333 -8169 407011.111 742305.556 -8170 407022.222 802866.667 -8171 407036.111 894072.222 -8172 407038.889 1050080.556 -8173 407044.444 963872.222 -8174 407047.222 736505.556 -8175 407061.111 733066.667 -8176 407061.111 838438.889 -8177 407063.889 839213.889 -8178 407063.889 933650.000 -8179 407069.444 749563.889 -8180 407069.444 815983.333 -8181 407072.222 736763.889 -8182 407086.111 732816.667 -8183 407088.889 843536.111 -8184 407091.667 1121008.333 -8185 407105.556 902661.111 -8186 407138.889 775908.333 -8187 407138.889 1161030.556 -8188 407141.667 733819.444 -8189 407141.667 737005.556 -8190 407141.667 740063.889 -8191 407147.222 942350.000 -8192 407150.000 880061.111 -8193 407163.889 733222.222 -8194 407166.667 914500.000 -8195 407172.222 734841.667 -8196 407180.556 733547.222 -8197 407186.111 745697.222 -8198 407188.889 1118875.000 -8199 407191.667 736888.889 -8200 407194.444 748361.111 -8201 407194.444 761161.111 -8202 407194.444 993716.667 -8203 407205.556 734405.556 -8204 407208.333 740177.778 -8205 407213.889 892727.778 -8206 407219.444 954805.556 -8207 407236.111 737052.778 -8208 407241.667 737155.556 -8209 407244.444 815222.222 -8210 407250.000 732458.333 -8211 407255.556 753944.444 -8212 407258.333 735147.222 -8213 407263.889 788069.444 -8214 407266.667 736347.222 -8215 407277.778 730980.556 -8216 407280.556 740780.556 -8217 407294.444 760858.333 -8218 407297.222 732108.333 -8219 407297.222 811055.556 -8220 407302.778 803102.778 -8221 407302.778 919622.222 -8222 407311.111 948994.444 -8223 407311.111 1229408.333 -8224 407316.667 1062830.556 -8225 407319.444 731861.111 -8226 407322.222 906644.444 -8227 407336.111 778858.333 -8228 407336.111 827900.000 -8229 407350.000 736883.333 -8230 407355.556 741727.778 -8231 407358.333 730825.000 -8232 407361.111 732630.556 -8233 407372.222 1140366.667 -8234 407383.333 730511.111 -8235 407386.111 851716.667 -8236 407386.111 995372.222 -8237 407391.667 890163.889 -8238 407394.444 743044.444 -8239 407394.444 803294.444 -8240 407397.222 937475.000 -8241 407402.778 753100.000 -8242 407408.333 736630.556 -8243 407408.333 743841.667 -8244 407408.333 752575.000 -8245 407413.889 743600.000 -8246 407416.667 887197.222 -8247 407419.444 950380.556 -8248 407430.556 731930.556 -8249 407433.333 888813.889 -8250 407438.889 740327.778 -8251 407441.667 734825.000 -8252 407452.778 867647.222 -8253 407463.889 741566.667 -8254 407469.444 909038.889 -8255 407472.222 731702.778 -8256 407472.222 885147.222 -8257 407472.222 895738.889 -8258 407477.778 785347.222 -8259 407483.333 741622.222 -8260 407483.333 756122.222 -8261 407483.333 956472.222 -8262 407483.333 988444.444 -8263 407486.111 847911.111 -8264 407491.667 736411.111 -8265 407494.444 868716.667 -8266 407502.778 786711.111 -8267 407516.667 763363.889 -8268 407516.667 818394.444 -8269 407516.667 924147.222 -8270 407519.444 803194.444 -8271 407519.444 884111.111 -8272 407525.000 736108.333 -8273 407536.111 860688.889 -8274 407536.111 882919.444 -8275 407538.889 733608.333 -8276 407538.889 752625.000 -8277 407538.889 798102.778 -8278 407541.667 755991.667 -8279 407544.444 863566.667 -8280 407552.778 736672.222 -8281 407563.889 736452.778 -8282 407566.667 881911.111 -8283 407569.444 729397.222 -8284 407569.444 933186.111 -8285 407580.556 870416.667 -8286 407583.333 736352.778 -8287 407583.333 825155.556 -8288 407588.889 735700.000 -8289 407594.444 825902.778 -8290 407597.222 744175.000 -8291 407608.333 871508.333 -8292 407608.333 1118902.778 -8293 407616.667 733297.222 -8294 407625.000 734536.111 -8295 407630.556 769397.222 -8296 407633.333 872936.111 -8297 407655.556 730155.556 -8298 407655.556 953719.444 -8299 407663.889 894677.778 -8300 407666.667 728525.000 -8301 407666.667 879922.222 -8302 407669.444 729966.667 -8303 407672.222 742052.778 -8304 407683.333 735255.556 -8305 407683.333 741458.333 -8306 407691.667 731155.556 -8307 407691.667 800630.556 -8308 407691.667 875638.889 -8309 407694.444 740208.333 -8310 407694.444 838227.778 -8311 407700.000 1241416.667 -8312 407702.778 874452.778 -8313 407705.556 737180.556 -8314 407705.556 742330.556 -8315 407713.889 846155.556 -8316 407719.444 983691.667 -8317 407733.333 736436.111 -8318 407738.889 742738.889 -8319 407741.667 729433.333 -8320 407744.444 785536.111 -8321 407744.444 970502.778 -8322 407755.556 777927.778 -8323 407758.333 746011.111 -8324 407761.111 877363.889 -8325 407763.889 734677.778 -8326 407775.000 929436.111 -8327 407777.778 899663.889 -8328 407786.111 900147.222 -8329 407794.444 740241.667 -8330 407797.222 978119.444 -8331 407800.000 803386.111 -8332 407808.333 736769.444 -8333 407808.333 997411.111 -8334 407811.111 732466.667 -8335 407811.111 737250.000 -8336 407811.111 766733.333 -8337 407838.889 762305.556 -8338 407841.667 746972.222 -8339 407858.333 747805.556 -8340 407861.111 737141.667 -8341 407866.667 737269.444 -8342 407869.444 730094.444 -8343 407869.444 737372.222 -8344 407872.222 812827.778 -8345 407875.000 827366.667 -8346 407877.778 740147.222 -8347 407877.778 743886.111 -8348 407883.333 741336.111 -8349 407886.111 736000.000 -8350 407886.111 736477.778 -8351 407886.111 842038.889 -8352 407888.889 765591.667 -8353 407891.667 836433.333 -8354 407894.444 740569.444 -8355 407905.556 732022.222 -8356 407905.556 893605.556 -8357 407913.889 762838.889 -8358 407919.444 740041.667 -8359 407933.333 734155.556 -8360 407933.333 764727.778 -8361 407933.333 778602.778 -8362 407936.111 736275.000 -8363 407936.111 741505.556 -8364 407941.667 736608.333 -8365 407941.667 737488.889 -8366 407944.444 801369.444 -8367 407952.778 814736.111 -8368 407958.333 743152.778 -8369 407961.111 891972.222 -8370 407972.222 759697.222 -8371 407977.778 737000.000 -8372 407977.778 858205.556 -8373 407980.556 783975.000 -8374 407986.111 736802.778 -8375 407986.111 742394.444 -8376 407988.889 768625.000 -8377 407988.889 813786.111 -8378 407988.889 816955.556 -8379 407994.444 762127.778 -8380 407994.444 780544.444 -8381 407997.222 736513.889 -8382 407997.222 756622.222 -8383 407997.222 764280.556 -8384 408000.000 966666.667 -8385 408002.778 727902.778 -8386 408005.556 737288.889 -8387 408013.889 756105.556 -8388 408016.667 835105.556 -8389 408019.444 728413.889 -8390 408022.222 1241625.000 -8391 408025.000 737047.222 -8392 408030.556 726150.000 -8393 408030.556 749900.000 -8394 408041.667 740125.000 -8395 408041.667 763408.333 -8396 408041.667 764652.778 -8397 408041.667 821958.333 -8398 408044.444 904016.667 -8399 408050.000 819352.778 -8400 408052.778 742041.667 -8401 408066.667 737038.889 -8402 408066.667 741858.333 -8403 408072.222 736816.667 -8404 408075.000 911127.778 -8405 408083.333 829755.556 -8406 408102.778 795297.222 -8407 408105.556 778186.111 -8408 408119.444 741247.222 -8409 408122.222 730788.889 -8410 408125.000 761419.444 -8411 408152.778 730455.556 -8412 408161.111 736977.778 -8413 408163.889 736375.000 -8414 408163.889 795222.222 -8415 408166.667 964300.000 -8416 408175.000 730005.556 -8417 408177.778 800144.444 -8418 408191.667 831305.556 -8419 408197.222 737355.556 -8420 408202.778 762011.111 -8421 408202.778 879777.778 -8422 408205.556 742941.667 -8423 408205.556 985997.222 -8424 408213.889 739880.556 -8425 408216.667 744813.889 -8426 408222.222 741602.778 -8427 408230.556 726100.000 -8428 408236.111 733991.667 -8429 408236.111 759805.556 -8430 408238.889 735480.556 -8431 408244.444 726666.667 -8432 408244.444 742850.000 -8433 408250.000 783513.889 -8434 408250.000 911563.889 -8435 408255.556 732030.556 -8436 408255.556 736986.111 -8437 408258.333 742094.444 -8438 408261.111 735025.000 -8439 408263.889 741072.222 -8440 408269.444 739761.111 -8441 408272.222 832813.889 -8442 408275.000 762072.222 -8443 408291.667 853355.556 -8444 408297.222 742405.556 -8445 408297.222 750780.556 -8446 408311.111 730300.000 -8447 408316.667 758827.778 -8448 408316.667 768361.111 -8449 408325.000 1157622.222 -8450 408336.111 757141.667 -8451 408336.111 953080.556 -8452 408338.889 740975.000 -8453 408338.889 805405.556 -8454 408341.667 740091.667 -8455 408341.667 803225.000 -8456 408347.222 736958.333 -8457 408350.000 731316.667 -8458 408355.556 803997.222 -8459 408375.000 796322.222 -8460 408380.556 857302.778 -8461 408386.111 735655.556 -8462 408388.889 898863.889 -8463 408397.222 742769.444 -8464 408402.778 740911.111 -8465 408405.556 725819.444 -8466 408408.333 743022.222 -8467 408411.111 740455.556 -8468 408416.667 962933.333 -8469 408419.444 1017247.222 -8470 408427.778 732933.333 -8471 408430.556 737152.778 -8472 408436.111 817641.667 -8473 408447.222 737022.222 -8474 408450.000 806147.222 -8475 408452.778 733355.556 -8476 408455.556 740883.333 -8477 408475.000 776863.889 -8478 408480.556 739980.556 -8479 408480.556 752919.444 -8480 408483.333 799622.222 -8481 408486.111 768200.000 -8482 408486.111 1119061.111 -8483 408488.889 736452.778 -8484 408500.000 782708.333 -8485 408508.333 739705.556 -8486 408516.667 737191.667 -8487 408519.444 731544.444 -8488 408527.778 731155.556 -8489 408527.778 740425.000 -8490 408530.556 741141.667 -8491 408533.333 734119.444 -8492 408538.889 748294.444 -8493 408541.667 1069652.778 -8494 408555.556 1118922.222 -8495 408558.333 732011.111 -8496 408561.111 731877.778 -8497 408566.667 734700.000 -8498 408566.667 741288.889 -8499 408569.444 740219.444 -8500 408580.556 740811.111 -8501 408583.333 731000.000 -8502 408583.333 741641.667 -8503 408588.889 934972.222 -8504 408597.222 999869.444 -8505 408611.111 798955.556 -8506 408613.889 739886.111 -8507 408616.667 896786.111 -8508 408622.222 736341.667 -8509 408625.000 767947.222 -8510 408625.000 856016.667 -8511 408638.889 802591.667 -8512 408644.444 758113.889 -8513 408644.444 765527.778 -8514 408644.444 864997.222 -8515 408644.444 913144.444 -8516 408655.556 735325.000 -8517 408655.556 752069.444 -8518 408658.333 907483.333 -8519 408661.111 860775.000 -8520 408663.889 730361.111 -8521 408663.889 873636.111 -8522 408666.667 1240816.667 -8523 408672.222 980038.889 -8524 408677.778 868788.889 -8525 408680.556 734261.111 -8526 408680.556 777469.444 -8527 408680.556 975916.667 -8528 408686.111 730019.444 -8529 408686.111 752552.778 -8530 408686.111 823183.333 -8531 408688.889 725180.556 -8532 408688.889 733655.556 -8533 408688.889 742086.111 -8534 408694.444 845841.667 -8535 408700.000 961402.778 -8536 408708.333 735113.889 -8537 408711.111 747344.444 -8538 408711.111 984677.778 -8539 408713.889 734572.222 -8540 408716.667 1118913.889 -8541 408727.778 787244.444 -8542 408758.333 745427.778 -8543 408758.333 757327.778 -8544 408758.333 814025.000 -8545 408761.111 735769.444 -8546 408761.111 740302.778 -8547 408766.667 733250.000 -8548 408772.222 807555.556 -8549 408777.778 798466.667 -8550 408777.778 882691.667 -8551 408780.556 888611.111 -8552 408788.889 769872.222 -8553 408794.444 751841.667 -8554 408802.778 879550.000 -8555 408805.556 752150.000 -8556 408805.556 851663.889 -8557 408813.889 741136.111 -8558 408813.889 826619.444 -8559 408816.667 945616.667 -8560 408822.222 740836.111 -8561 408825.000 1216597.222 -8562 408830.556 854975.000 -8563 408830.556 895025.000 -8564 408830.556 1239827.778 -8565 408838.889 745625.000 -8566 408841.667 723900.000 -8567 408841.667 729377.778 -8568 408852.778 739527.778 -8569 408858.333 740438.889 -8570 408858.333 782211.111 -8571 408861.111 732577.778 -8572 408869.444 735555.556 -8573 408880.556 803383.333 -8574 408883.333 738286.111 -8575 408883.333 806941.667 -8576 408894.444 1118800.000 -8577 408897.222 741952.778 -8578 408897.222 782286.111 -8579 408897.222 815977.778 -8580 408908.333 724641.667 -8581 408908.333 774769.444 -8582 408908.333 928150.000 -8583 408916.667 767977.778 -8584 408927.778 739730.556 -8585 408930.556 745822.222 -8586 408938.889 1119011.111 -8587 408947.222 744333.333 -8588 408952.778 736013.889 -8589 408952.778 738075.000 -8590 408952.778 838888.889 -8591 408975.000 740163.889 -8592 408983.333 956711.111 -8593 408988.889 740930.556 -8594 408988.889 747069.444 -8595 408994.444 973991.667 -8596 408997.222 734152.778 -8597 409002.778 807641.667 -8598 409008.333 733436.111 -8599 409011.111 745147.222 -8600 409022.222 817341.667 -8601 409025.000 740622.222 -8602 409025.000 744075.000 -8603 409027.778 747094.444 -8604 409033.333 731583.333 -8605 409033.333 734602.778 -8606 409038.889 741188.889 -8607 409044.444 890344.444 -8608 409050.000 742102.778 -8609 409063.889 842966.667 -8610 409069.444 970986.111 -8611 409072.222 740755.556 -8612 409083.333 902847.222 -8613 409097.222 738083.333 -8614 409100.000 759916.667 -8615 409105.556 735625.000 -8616 409113.889 737827.778 -8617 409113.889 906472.222 -8618 409116.667 859244.444 -8619 409116.667 871552.778 -8620 409125.000 733013.889 -8621 409133.333 759669.444 -8622 409133.333 777786.111 -8623 409152.778 811061.111 -8624 409166.667 741722.222 -8625 409166.667 847027.778 -8626 409169.444 726625.000 -8627 409175.000 770480.556 -8628 409175.000 965280.556 -8629 409177.778 1113986.111 -8630 409180.556 1118713.889 -8631 409186.111 922227.778 -8632 409191.667 892911.111 -8633 409194.444 840569.444 -8634 409222.222 894861.111 -8635 409225.000 900144.444 -8636 409227.778 810191.667 -8637 409230.556 750969.444 -8638 409230.556 809938.889 -8639 409250.000 983416.667 -8640 409252.778 730477.778 -8641 409252.778 739633.333 -8642 409252.778 742769.444 -8643 409255.556 731413.889 -8644 409258.333 746352.778 -8645 409269.444 913994.444 -8646 409275.000 739977.778 -8647 409277.778 733602.778 -8648 409277.778 737522.222 -8649 409280.556 759150.000 -8650 409286.111 740402.778 -8651 409294.444 1001602.778 -8652 409297.222 897575.000 -8653 409297.222 949758.333 -8654 409311.111 738991.667 -8655 409319.444 909469.444 -8656 409322.222 843388.889 -8657 409327.778 724147.222 -8658 409327.778 746597.222 -8659 409327.778 803636.111 -8660 409350.000 740194.444 -8661 409352.778 879344.444 -8662 409355.556 741866.667 -8663 409366.667 871508.333 -8664 409377.778 723013.889 -8665 409380.556 738325.000 -8666 409402.778 741322.222 -8667 409405.556 739972.222 -8668 409413.889 739597.222 -8669 409416.667 777852.778 -8670 409436.111 789711.111 -8671 409444.444 740758.333 -8672 409461.111 874533.333 -8673 409463.889 730697.222 -8674 409466.667 1240994.444 -8675 409469.444 730300.000 -8676 409477.778 903100.000 -8677 409477.778 903711.111 -8678 409480.556 797430.556 -8679 409480.556 839611.111 -8680 409486.111 737330.556 -8681 409491.667 741541.667 -8682 409494.444 725819.444 -8683 409508.333 730844.444 -8684 409519.444 764600.000 -8685 409525.000 833825.000 -8686 409550.000 741863.889 -8687 409558.333 739316.667 -8688 409561.111 729683.333 -8689 409566.667 744983.333 -8690 409572.222 729080.556 -8691 409572.222 739638.889 -8692 409583.333 759750.000 -8693 409586.111 740372.222 -8694 409586.111 759963.889 -8695 409588.889 768994.444 -8696 409597.222 729966.667 -8697 409597.222 730683.333 -8698 409597.222 731300.000 -8699 409608.333 739905.556 -8700 409622.222 828544.444 -8701 409625.000 853733.333 -8702 409627.778 741333.333 -8703 409627.778 964408.333 -8704 409633.333 711833.333 -8705 409633.333 766130.556 -8706 409636.111 813313.889 -8707 409636.111 915577.778 -8708 409644.444 768847.222 -8709 409688.889 737130.556 -8710 409700.000 816966.667 -8711 409713.889 821100.000 -8712 409730.556 739619.444 -8713 409730.556 1177347.222 -8714 409736.111 721441.667 -8715 409747.222 848683.333 -8716 409755.556 785252.778 -8717 409761.111 740266.667 -8718 409777.778 803452.778 -8719 409780.556 817822.222 -8720 409791.667 741169.444 -8721 409805.556 736841.667 -8722 409805.556 1118866.667 -8723 409816.667 951038.889 -8724 409819.444 931983.333 -8725 409827.778 841994.444 -8726 409836.111 739802.778 -8727 409852.778 868794.444 -8728 409858.333 747425.000 -8729 409858.333 796133.333 -8730 409866.667 751950.000 -8731 409869.444 818938.889 -8732 409883.333 1022638.889 -8733 409891.667 741411.111 -8734 409900.000 752166.667 -8735 409900.000 887291.667 -8736 409900.000 947405.556 -8737 409911.111 725347.222 -8738 409911.111 740330.556 -8739 409919.444 760569.444 -8740 409938.889 743038.889 -8741 409941.667 921672.222 -8742 409952.778 740125.000 -8743 409955.556 723416.667 -8744 409963.889 741016.667 -8745 409977.778 722930.556 -8746 409977.778 961619.444 -8747 409980.556 739622.222 -8748 409994.444 751816.667 -8749 410005.556 857686.111 -8750 410011.111 986072.222 -8751 410016.667 736661.111 -8752 410016.667 743675.000 -8753 410016.667 793316.667 -8754 410025.000 784636.111 -8755 410027.778 738791.667 -8756 410027.778 955850.000 -8757 410030.556 879080.556 -8758 410036.111 743419.444 -8759 410036.111 885252.778 -8760 410041.667 923736.111 -8761 410050.000 737850.000 -8762 410052.778 742911.111 -8763 410061.111 764102.778 -8764 410063.889 739494.444 -8765 410080.556 911638.889 -8766 410086.111 919625.000 -8767 410094.444 741733.333 -8768 410097.222 952252.778 -8769 410100.000 818625.000 -8770 410105.556 738441.667 -8771 410105.556 739916.667 -8772 410105.556 741183.333 -8773 410113.889 958819.444 -8774 410127.778 723133.333 -8775 410127.778 816052.778 -8776 410138.889 933063.889 -8777 410144.444 738730.556 -8778 410144.444 763813.889 -8779 410161.111 721597.222 -8780 410166.667 742061.111 -8781 410166.667 758975.000 -8782 410166.667 1114975.000 -8783 410172.222 954019.444 -8784 410186.111 864133.333 -8785 410186.111 957988.889 -8786 410188.889 737986.111 -8787 410191.667 840472.222 -8788 410208.333 814361.111 -8789 410219.444 739477.778 -8790 410233.333 740669.444 -8791 410241.667 806150.000 -8792 410241.667 806630.556 -8793 410247.222 894111.111 -8794 410250.000 807611.111 -8795 410252.778 902797.222 -8796 410255.556 817300.000 -8797 410261.111 989122.222 -8798 410263.889 819333.333 -8799 410266.667 928055.556 -8800 410275.000 941977.778 -8801 410286.111 894383.333 -8802 410288.889 840791.667 -8803 410300.000 825158.333 -8804 410308.333 779497.222 -8805 410316.667 741025.000 -8806 410322.222 1119013.889 -8807 410333.333 820122.222 -8808 410338.889 737633.333 -8809 410338.889 937652.778 -8810 410352.778 805366.667 -8811 410352.778 1119377.778 -8812 410358.333 719550.000 -8813 410375.000 740411.111 -8814 410380.556 742944.444 -8815 410383.333 860280.556 -8816 410388.889 738655.556 -8817 410391.667 963680.556 -8818 410413.889 741294.444 -8819 410413.889 795033.333 -8820 410416.667 939491.667 -8821 410419.444 739186.111 -8822 410441.667 836500.000 -8823 410458.333 762825.000 -8824 410463.889 813980.556 -8825 410466.667 740233.333 -8826 410469.444 957422.222 -8827 410477.778 724636.111 -8828 410491.667 880977.778 -8829 410502.778 788225.000 -8830 410513.889 866030.556 -8831 410519.444 762211.111 -8832 410519.444 830150.000 -8833 410525.000 806080.556 -8834 410525.000 890502.778 -8835 410530.556 827263.889 -8836 410533.333 735391.667 -8837 410544.444 762336.111 -8838 410547.222 797269.444 -8839 410550.000 738205.556 -8840 410572.222 741413.889 -8841 410572.222 966444.444 -8842 410580.556 747530.556 -8843 410583.333 740988.889 -8844 410586.111 943611.111 -8845 410588.889 740222.222 -8846 410602.778 1119702.778 -8847 410605.556 757744.444 -8848 410613.889 1020738.889 -8849 410616.667 897730.556 -8850 410619.444 762227.778 -8851 410633.333 905558.333 -8852 410638.889 800566.667 -8853 410647.222 724266.667 -8854 410647.222 828877.778 -8855 410647.222 862158.333 -8856 410680.556 723391.667 -8857 410705.556 850144.444 -8858 410722.222 858916.667 -8859 410722.222 902252.778 -8860 410758.333 775888.889 -8861 410766.667 818963.889 -8862 410775.000 847272.222 -8863 410780.556 764147.222 -8864 410783.333 805994.444 -8865 410786.111 734697.222 -8866 410797.222 878113.889 -8867 410805.556 868919.444 -8868 410811.111 1119191.667 -8869 410813.889 815191.667 -8870 410816.667 745927.778 -8871 410819.444 961341.667 -8872 410830.556 739205.556 -8873 410844.444 768641.667 -8874 410847.222 856280.556 -8875 410855.556 738588.889 -8876 410886.111 740138.889 -8877 410891.667 906380.556 -8878 410894.444 1120638.889 -8879 410905.556 739183.333 -8880 410927.778 1024702.778 -8881 410936.111 898647.222 -8882 410944.444 884250.000 -8883 410958.333 796827.778 -8884 410961.111 912575.000 -8885 410963.889 739733.333 -8886 410969.444 788888.889 -8887 410972.222 1048144.444 -8888 410983.333 839847.222 -8889 410994.444 909425.000 -8890 410997.222 806497.222 -8891 411000.000 813466.667 -8892 411002.778 821233.333 -8893 411002.778 842663.889 -8894 411013.889 814419.444 -8895 411016.667 807647.222 -8896 411019.444 767713.889 -8897 411033.333 723597.222 -8898 411038.889 826119.444 -8899 411069.444 739205.556 -8900 411072.222 737963.889 -8901 411072.222 774847.222 -8902 411075.000 837927.778 -8903 411077.778 787713.889 -8904 411083.333 835169.444 -8905 411108.333 1120252.778 -8906 411111.111 740688.889 -8907 411113.889 893563.889 -8908 411116.667 1149636.111 -8909 411133.333 742458.333 -8910 411141.667 975986.111 -8911 411144.444 831780.556 -8912 411147.222 741500.000 -8913 411147.222 901644.444 -8914 411158.333 980013.889 -8915 411161.111 791869.444 -8916 411169.444 809836.111 -8917 411175.000 734083.333 -8918 411180.556 739558.333 -8919 411183.333 1120833.333 -8920 411191.667 787602.778 -8921 411200.000 878611.111 -8922 411202.778 765302.778 -8923 411208.333 888352.778 -8924 411219.444 753650.000 -8925 411219.444 830158.333 -8926 411222.222 803330.556 -8927 411230.556 914411.111 -8928 411233.333 737794.444 -8929 411238.889 741697.222 -8930 411238.889 1007650.000 -8931 411241.667 1013558.333 -8932 411247.222 774300.000 -8933 411252.778 848533.333 -8934 411263.889 737144.444 -8935 411263.889 774719.444 -8936 411280.556 1017191.667 -8937 411305.556 851288.889 -8938 411325.000 1119294.444 -8939 411333.333 1048166.667 -8940 411338.889 814847.222 -8941 411358.333 929038.889 -8942 411363.889 740827.778 -8943 411363.889 1120302.778 -8944 411366.667 800094.444 -8945 411366.667 958905.556 -8946 411369.444 774472.222 -8947 411380.556 845805.556 -8948 411383.333 818638.889 -8949 411408.333 962394.444 -8950 411413.889 733583.333 -8951 411416.667 878750.000 -8952 411419.444 878611.111 -8953 411427.778 890600.000 -8954 411427.778 1029775.000 -8955 411444.444 814400.000 -8956 411450.000 788047.222 -8957 411455.556 738241.667 -8958 411458.333 774216.667 -8959 411463.889 747527.778 -8960 411472.222 916605.556 -8961 411475.000 739897.222 -8962 411505.556 739458.333 -8963 411530.556 761505.556 -8964 411533.333 745766.667 -8965 411536.111 813580.556 -8966 411538.889 807016.667 -8967 411544.444 741933.333 -8968 411544.444 960419.444 -8969 411550.000 759786.111 -8970 411563.889 805694.444 -8971 411569.444 834169.444 -8972 411569.444 1011258.333 -8973 411572.222 854883.333 -8974 411575.000 812422.222 -8975 411577.778 800888.889 -8976 411586.111 1010022.222 -8977 411588.889 814544.444 -8978 411594.444 814405.556 -8979 411605.556 926311.111 -8980 411611.111 790833.333 -8981 411616.667 1120255.556 -8982 411627.778 738619.444 -8983 411655.556 808577.778 -8984 411666.667 876627.778 -8985 411669.444 732052.778 -8986 411669.444 740436.111 -8987 411675.000 900425.000 -8988 411688.889 822180.556 -8989 411702.778 909966.667 -8990 411725.000 835563.889 -8991 411725.000 923086.111 -8992 411727.778 882766.667 -8993 411727.778 1119758.333 -8994 411733.333 860347.222 -8995 411741.667 804536.111 -8996 411747.222 918194.444 -8997 411750.000 760750.000 -8998 411769.444 1120030.556 -8999 411772.222 744691.667 -9000 411772.222 797080.556 -9001 411772.222 896575.000 -9002 411788.889 903158.333 -9003 411797.222 975472.222 -9004 411813.889 847405.556 -9005 411813.889 911852.778 -9006 411816.667 743825.000 -9007 411819.444 1040686.111 -9008 411822.222 937286.111 -9009 411827.778 807655.556 -9010 411827.778 836783.333 -9011 411847.222 773141.667 -9012 411855.556 883097.222 -9013 411855.556 919927.778 -9014 411883.333 809783.333 -9015 411916.667 903800.000 -9016 411919.444 1119705.556 -9017 411922.222 974250.000 -9018 411966.667 908802.778 -9019 411969.444 759286.111 -9020 411975.000 739650.000 -9021 411991.667 798730.556 -9022 411997.222 907491.667 -9023 412002.778 857055.556 -9024 412022.222 793277.778 -9025 412030.556 905869.444 -9026 412041.667 737275.000 -9027 412044.444 928825.000 -9028 412052.778 760052.778 -9029 412052.778 960422.222 -9030 412055.556 767858.333 -9031 412069.444 830552.778 -9032 412075.000 838991.667 -9033 412083.333 738916.667 -9034 412094.444 739858.333 -9035 412094.444 1067891.667 -9036 412097.222 746080.556 -9037 412102.778 758969.444 -9038 412108.333 849669.444 -9039 412111.111 805380.556 -9040 412113.889 966200.000 -9041 412122.222 804969.444 -9042 412125.000 924352.778 -9043 412147.222 793855.556 -9044 412150.000 867758.333 -9045 412158.333 890666.667 -9046 412188.889 864230.556 -9047 412197.222 1222738.889 -9048 412219.444 932411.111 -9049 412222.222 730569.444 -9050 412222.222 758633.333 -9051 412225.000 742947.222 -9052 412225.000 770372.222 -9053 412230.556 1119730.556 -9054 412269.444 802400.000 -9055 412269.444 882647.222 -9056 412272.222 858219.444 -9057 412277.778 964875.000 -9058 412283.333 851725.000 -9059 412291.667 840341.667 -9060 412305.556 853194.444 -9061 412319.444 769994.444 -9062 412325.000 956127.778 -9063 412330.556 804936.111 -9064 412338.889 805697.222 -9065 412344.444 795375.000 -9066 412350.000 810494.444 -9067 412350.000 951372.222 -9068 412358.333 1036625.000 -9069 412366.667 954177.778 -9070 412369.444 888313.889 -9071 412375.000 808186.111 -9072 412380.556 818419.444 -9073 412380.556 858530.556 -9074 412391.667 813461.111 -9075 412397.222 816383.333 -9076 412400.000 814408.333 -9077 412400.000 836433.333 -9078 412402.778 759450.000 -9079 412411.111 767241.667 -9080 412411.111 770013.889 -9081 412411.111 815527.778 -9082 412413.889 884194.444 -9083 412425.000 826158.333 -9084 412427.778 732011.111 -9085 412450.000 759311.111 -9086 412450.000 963969.444 -9087 412455.556 899247.222 -9088 412458.333 758816.667 -9089 412463.889 832358.333 -9090 412488.889 841330.556 -9091 412491.667 787997.222 -9092 412502.778 794597.222 -9093 412505.556 878313.889 -9094 412527.778 971297.222 -9095 412538.889 836044.444 -9096 412541.667 769208.333 -9097 412541.667 893422.222 -9098 412541.667 947680.556 -9099 412544.444 823997.222 -9100 412555.556 734352.778 -9101 412558.333 1221383.333 -9102 412561.111 830516.667 -9103 412563.889 743602.778 -9104 412586.111 959375.000 -9105 412591.667 804722.222 -9106 412597.222 906077.778 -9107 412608.333 1117691.667 -9108 412611.111 892275.000 -9109 412611.111 961316.667 -9110 412619.444 739386.111 -9111 412619.444 958608.333 -9112 412647.222 815133.333 -9113 412650.000 882122.222 -9114 412683.333 1109625.000 -9115 412694.444 759166.667 -9116 412705.556 729475.000 -9117 412708.333 737780.556 -9118 412725.000 820547.222 -9119 412736.111 828416.667 -9120 412752.778 758505.556 -9121 412755.556 989663.889 -9122 412761.111 728688.889 -9123 412769.444 926794.444 -9124 412780.556 758975.000 -9125 412783.333 730261.111 -9126 412786.111 725280.556 -9127 412788.889 758786.111 -9128 412794.444 725988.889 -9129 412794.444 728155.556 -9130 412797.222 767133.333 -9131 412800.000 759125.000 -9132 412800.000 913605.556 -9133 412813.889 734986.111 -9134 412813.889 1119875.000 -9135 412833.333 701000.000 -9136 412838.889 812241.667 -9137 412841.667 810966.667 -9138 412844.444 843558.333 -9139 412852.778 723994.444 -9140 412852.778 724480.556 -9141 412861.111 804277.778 -9142 412863.889 962341.667 -9143 412872.222 845536.111 -9144 412877.778 882855.556 -9145 412877.778 993813.889 -9146 412886.111 882516.667 -9147 412888.889 726822.222 -9148 412888.889 758058.333 -9149 412888.889 915522.222 -9150 412897.222 945613.889 -9151 412900.000 739208.333 -9152 412905.556 959177.778 -9153 412916.667 723766.667 -9154 412916.667 758750.000 -9155 412916.667 934422.222 -9156 412919.444 999222.222 -9157 412922.222 895061.111 -9158 412930.556 847619.444 -9159 412938.889 822175.000 -9160 412938.889 902919.444 -9161 412941.667 882711.111 -9162 412952.778 890594.444 -9163 412955.556 861163.889 -9164 412958.333 897902.778 -9165 412963.889 926441.667 -9166 412975.000 826055.556 -9167 412980.556 1120852.778 -9168 412991.667 916927.778 -9169 413036.111 901927.778 -9170 413041.667 829752.778 -9171 413052.778 944611.111 -9172 413072.222 1119594.444 -9173 413077.778 881466.667 -9174 413080.556 729286.111 -9175 413083.333 741450.000 -9176 413088.889 820058.333 -9177 413097.222 742294.444 -9178 413100.000 721458.333 -9179 413100.000 1223094.444 -9180 413111.111 886097.222 -9181 413113.889 1055905.556 -9182 413116.667 758377.778 -9183 413125.000 811438.889 -9184 413125.000 814402.778 -9185 413127.778 963458.333 -9186 413136.111 817247.222 -9187 413138.889 816852.778 -9188 413144.444 818358.333 -9189 413163.889 730936.111 -9190 413166.667 870258.333 -9191 413175.000 868913.889 -9192 413186.111 872002.778 -9193 413188.889 905058.333 -9194 413197.222 758463.889 -9195 413197.222 816269.444 -9196 413205.556 730894.444 -9197 413205.556 758194.444 -9198 413208.333 931091.667 -9199 413216.667 802588.889 -9200 413230.556 777486.111 -9201 413241.667 834386.111 -9202 413250.000 757458.333 -9203 413252.778 721936.111 -9204 413252.778 824933.333 -9205 413255.556 856977.778 -9206 413258.333 757897.222 -9207 413261.111 896788.889 -9208 413263.889 777511.111 -9209 413269.444 757736.111 -9210 413275.000 757933.333 -9211 413275.000 891288.889 -9212 413275.000 891997.222 -9213 413275.000 1102922.222 -9214 413277.778 719911.111 -9215 413277.778 831322.222 -9216 413297.222 906702.778 -9217 413302.778 807255.556 -9218 413305.556 741872.222 -9219 413308.333 887080.556 -9220 413308.333 940136.111 -9221 413316.667 741213.889 -9222 413316.667 743572.222 -9223 413319.444 858500.000 -9224 413322.222 877852.778 -9225 413333.333 922044.444 -9226 413336.111 888780.556 -9227 413358.333 719063.889 -9228 413361.111 759636.111 -9229 413366.667 755188.889 -9230 413391.667 801052.778 -9231 413397.222 757366.667 -9232 413405.556 876213.889 -9233 413436.111 863097.222 -9234 413438.889 757388.889 -9235 413447.222 837972.222 -9236 413450.000 720252.778 -9237 413450.000 815286.111 -9238 413455.556 888425.000 -9239 413458.333 813952.778 -9240 413461.111 730794.444 -9241 413469.444 741266.667 -9242 413486.111 800825.000 -9243 413494.444 851355.556 -9244 413500.000 720788.889 -9245 413502.778 831219.444 -9246 413505.556 719825.000 -9247 413533.333 723911.111 -9248 413533.333 757386.111 -9249 413541.667 719669.444 -9250 413547.222 903813.889 -9251 413555.556 721000.000 -9252 413558.333 822538.889 -9253 413572.222 884211.111 -9254 413577.778 891761.111 -9255 413580.556 935572.222 -9256 413583.333 897372.222 -9257 413613.889 818130.556 -9258 413625.000 742716.667 -9259 413633.333 979688.889 -9260 413638.889 919536.111 -9261 413647.222 961575.000 -9262 413650.000 958577.778 -9263 413652.778 895838.889 -9264 413655.556 815613.889 -9265 413658.333 852388.889 -9266 413661.111 818544.444 -9267 413669.444 799294.444 -9268 413669.444 850588.889 -9269 413680.556 894647.222 -9270 413683.333 821077.778 -9271 413691.667 739666.667 -9272 413711.111 734144.444 -9273 413713.889 839419.444 -9274 413722.222 737338.889 -9275 413747.222 836513.889 -9276 413750.000 746930.556 -9277 413750.000 819083.333 -9278 413772.222 718341.667 -9279 413775.000 718277.778 -9280 413825.000 892188.889 -9281 413833.333 760250.000 -9282 413844.444 833205.556 -9283 413855.556 724361.111 -9284 413858.333 932691.667 -9285 413888.889 705138.889 -9286 413897.222 814413.889 -9287 413900.000 817597.222 -9288 413905.556 809736.111 -9289 413908.333 728600.000 -9290 413913.889 739563.889 -9291 413922.222 841252.778 -9292 413930.556 815366.667 -9293 413947.222 734544.444 -9294 413947.222 757069.444 -9295 413952.778 816763.889 -9296 413969.444 966111.111 -9297 413972.222 736175.000 -9298 413972.222 899044.444 -9299 413977.778 822225.000 -9300 413983.333 818047.222 -9301 413988.889 717475.000 -9302 414000.000 747236.111 -9303 414000.000 828086.111 -9304 414013.889 923544.444 -9305 414019.444 743247.222 -9306 414019.444 996388.889 -9307 414030.556 724513.889 -9308 414036.111 950136.111 -9309 414038.889 881116.667 -9310 414047.222 817230.556 -9311 414050.000 1023438.889 -9312 414061.111 736330.556 -9313 414080.556 929161.111 -9314 414088.889 756627.778 -9315 414091.667 741955.556 -9316 414091.667 1120352.778 -9317 414097.222 797119.444 -9318 414108.333 834611.111 -9319 414119.444 838644.444 -9320 414138.889 733038.889 -9321 414152.778 815661.111 -9322 414155.556 819236.111 -9323 414169.444 815275.000 -9324 414169.444 816061.111 -9325 414169.444 873652.778 -9326 414180.556 864858.333 -9327 414188.889 832213.889 -9328 414197.222 756327.778 -9329 414200.000 877416.667 -9330 414202.778 787288.889 -9331 414208.333 900150.000 -9332 414211.111 820963.889 -9333 414213.889 798813.889 -9334 414219.444 823647.222 -9335 414225.000 879858.333 -9336 414225.000 1001930.556 -9337 414227.778 1223850.000 -9338 414233.333 717861.111 -9339 414244.444 739469.444 -9340 414252.778 816883.333 -9341 414269.444 892133.333 -9342 414277.778 741663.889 -9343 414277.778 857525.000 -9344 414286.111 904608.333 -9345 414294.444 882286.111 -9346 414297.222 720825.000 -9347 414297.222 813908.333 -9348 414297.222 848713.889 -9349 414297.222 973680.556 -9350 414305.556 868983.333 -9351 414313.889 813655.556 -9352 414322.222 714569.444 -9353 414333.333 964977.778 -9354 414344.444 721102.778 -9355 414347.222 815258.333 -9356 414350.000 815363.889 -9357 414352.778 816575.000 -9358 414391.667 740455.556 -9359 414391.667 907175.000 -9360 414397.222 817355.556 -9361 414413.889 818644.444 -9362 414413.889 852650.000 -9363 414427.778 860013.889 -9364 414433.333 840088.889 -9365 414441.667 744002.778 -9366 414444.444 876313.889 -9367 414452.778 947644.444 -9368 414458.333 744233.333 -9369 414463.889 861480.556 -9370 414472.222 970591.667 -9371 414477.778 814277.778 -9372 414480.556 901541.667 -9373 414486.111 847480.556 -9374 414486.111 977302.778 -9375 414488.889 827080.556 -9376 414488.889 956152.778 -9377 414500.000 816636.111 -9378 414505.556 834875.000 -9379 414513.889 756122.222 -9380 414516.667 820355.556 -9381 414525.000 963508.333 -9382 414527.778 821825.000 -9383 414530.556 905719.444 -9384 414541.667 705625.000 -9385 414541.667 706041.667 -9386 414541.667 740580.556 -9387 414550.000 1068058.333 -9388 414552.778 819180.556 -9389 414552.778 882616.667 -9390 414558.333 960261.111 -9391 414563.889 907233.333 -9392 414569.444 728236.111 -9393 414569.444 1228936.111 -9394 414594.444 934047.222 -9395 414613.889 736713.889 -9396 414619.444 810738.889 -9397 414619.444 967794.444 -9398 414622.222 814808.333 -9399 414641.667 918380.556 -9400 414644.444 815088.889 -9401 414647.222 837061.111 -9402 414658.333 855875.000 -9403 414666.667 864830.556 -9404 414683.333 756033.333 -9405 414686.111 755625.000 -9406 414688.889 796911.111 -9407 414700.000 876363.889 -9408 414700.000 926511.111 -9409 414705.556 811452.778 -9410 414713.889 756080.556 -9411 414730.556 870611.111 -9412 414730.556 903575.000 -9413 414733.333 745388.889 -9414 414738.889 815372.222 -9415 414747.222 845525.000 -9416 414755.556 818394.444 -9417 414755.556 936786.111 -9418 414758.333 751825.000 -9419 414761.111 832958.333 -9420 414766.667 740241.667 -9421 414766.667 953377.778 -9422 414775.000 952216.667 -9423 414783.333 814638.889 -9424 414802.778 715230.556 -9425 414805.556 866916.667 -9426 414808.333 755950.000 -9427 414808.333 876377.778 -9428 414813.889 743605.556 -9429 414816.667 726816.667 -9430 414819.444 817983.333 -9431 414827.778 873327.778 -9432 414830.556 917058.333 -9433 414838.889 742180.556 -9434 414838.889 903530.556 -9435 414844.444 877033.333 -9436 414847.222 819222.222 -9437 414858.333 730511.111 -9438 414872.222 1205413.889 -9439 414875.000 821016.667 -9440 414880.556 914258.333 -9441 414883.333 875675.000 -9442 414886.111 757088.889 -9443 414891.667 814019.444 -9444 414900.000 713133.333 -9445 414913.889 876744.444 -9446 414919.444 941238.889 -9447 414927.778 757000.000 -9448 414941.667 875216.667 -9449 414947.222 755372.222 -9450 414947.222 903905.556 -9451 414952.778 794561.111 -9452 414958.333 878486.111 -9453 414961.111 853766.667 -9454 414969.444 713677.778 -9455 414969.444 725575.000 -9456 414977.778 815375.000 -9457 414988.889 729011.111 -9458 414994.444 816955.556 -9459 415002.778 858280.556 -9460 415005.556 874613.889 -9461 415005.556 946433.333 -9462 415008.333 837183.333 -9463 415008.333 904441.667 -9464 415008.333 934908.333 -9465 415027.778 724505.556 -9466 415033.333 740108.333 -9467 415033.333 943183.333 -9468 415036.111 844141.667 -9469 415038.889 877130.556 -9470 415047.222 739700.000 -9471 415052.778 820283.333 -9472 415061.111 876355.556 -9473 415061.111 881144.444 -9474 415063.889 875916.667 -9475 415066.667 905150.000 -9476 415075.000 717166.667 -9477 415088.889 907658.333 -9478 415094.444 905786.111 -9479 415102.778 1120147.222 -9480 415119.444 829377.778 -9481 415119.444 879655.556 -9482 415122.222 782352.778 -9483 415122.222 904150.000 -9484 415133.333 876741.667 -9485 415138.889 920761.111 -9486 415161.111 954500.000 -9487 415175.000 814036.111 -9488 415183.333 942261.111 -9489 415188.889 838038.889 -9490 415191.667 814580.556 -9491 415200.000 800486.111 -9492 415200.000 814888.889 -9493 415200.000 815563.889 -9494 415200.000 882016.667 -9495 415213.889 843072.222 -9496 415216.667 739269.444 -9497 415222.222 813380.556 -9498 415222.222 931016.667 -9499 415230.556 815186.111 -9500 415236.111 905775.000 -9501 415241.667 720763.889 -9502 415241.667 764011.111 -9503 415244.444 862733.333 -9504 415244.444 905155.556 -9505 415250.000 880816.667 -9506 415255.556 741533.333 -9507 415258.333 853666.667 -9508 415261.111 878891.667 -9509 415263.889 706736.111 -9510 415263.889 875386.111 -9511 415272.222 850655.556 -9512 415275.000 742372.222 -9513 415283.333 874236.111 -9514 415286.111 1094655.556 -9515 415300.000 886797.222 -9516 415305.556 739780.556 -9517 415308.333 755458.333 -9518 415316.667 940094.444 -9519 415319.444 939538.889 -9520 415322.222 872550.000 -9521 415330.556 815791.667 -9522 415341.667 757363.889 -9523 415341.667 864272.222 -9524 415347.222 740152.778 -9525 415350.000 740705.556 -9526 415350.000 808683.333 -9527 415355.556 738994.444 -9528 415355.556 878475.000 -9529 415369.444 885833.333 -9530 415380.556 728075.000 -9531 415386.111 759469.444 -9532 415391.667 855397.222 -9533 415397.222 740986.111 -9534 415413.889 869005.556 -9535 415425.000 816263.889 -9536 415425.000 876022.222 -9537 415427.778 876847.222 -9538 415438.889 738686.111 -9539 415444.444 732094.444 -9540 415444.444 961247.222 -9541 415472.222 891175.000 -9542 415475.000 865822.222 -9543 415486.111 985308.333 -9544 415486.111 987305.556 -9545 415491.667 841416.667 -9546 415511.111 1121094.444 -9547 415513.889 706152.778 -9548 415519.444 814786.111 -9549 415527.778 815102.778 -9550 415541.667 915347.222 -9551 415547.222 880986.111 -9552 415558.333 904091.667 -9553 415563.889 847688.889 -9554 415563.889 958875.000 -9555 415569.444 836272.222 -9556 415572.222 876655.556 -9557 415575.000 894608.333 -9558 415580.556 730519.444 -9559 415583.333 872744.444 -9560 415600.000 740036.111 -9561 415619.444 736030.556 -9562 415622.222 726511.111 -9563 415644.444 875125.000 -9564 415647.222 875388.889 -9565 415661.111 834247.222 -9566 415680.556 876080.556 -9567 415680.556 877202.778 -9568 415688.889 1118372.222 -9569 415700.000 912636.111 -9570 415716.667 876944.444 -9571 415727.778 726411.111 -9572 415733.333 877844.444 -9573 415736.111 755022.222 -9574 415736.111 840052.778 -9575 415736.111 876463.889 -9576 415750.000 872388.889 -9577 415755.556 723325.000 -9578 415758.333 725030.556 -9579 415758.333 871761.111 -9580 415766.667 744875.000 -9581 415766.667 752591.667 -9582 415769.444 734088.889 -9583 415772.222 937111.111 -9584 415783.333 705591.667 -9585 415783.333 928447.222 -9586 415802.778 754086.111 -9587 415816.667 903433.333 -9588 415833.333 875000.000 -9589 415838.889 738091.667 -9590 415838.889 935197.222 -9591 415847.222 907719.444 -9592 415852.778 878430.556 -9593 415858.333 925272.222 -9594 415861.111 844350.000 -9595 415869.444 712838.889 -9596 415875.000 1092022.222 -9597 415877.778 834933.333 -9598 415886.111 838911.111 -9599 415888.889 910166.667 -9600 415894.444 880577.778 -9601 415894.444 889219.444 -9602 415894.444 941958.333 -9603 415908.333 948752.778 -9604 415916.667 950597.222 -9605 415930.556 815269.444 -9606 415933.333 730858.333 -9607 415933.333 873463.889 -9608 415963.889 739113.889 -9609 415977.778 937080.556 -9610 415983.333 814186.111 -9611 415994.444 932350.000 -9612 415997.222 909105.556 -9613 416005.556 936088.889 -9614 416008.333 876069.444 -9615 416027.778 877438.889 -9616 416030.556 937238.889 -9617 416033.333 803055.556 -9618 416033.333 989258.333 -9619 416055.556 739719.444 -9620 416055.556 741844.444 -9621 416061.111 738733.333 -9622 416063.889 903352.778 -9623 416066.667 719813.889 -9624 416066.667 805725.000 -9625 416077.778 1228391.667 -9626 416097.222 835644.444 -9627 416100.000 876466.667 -9628 416105.556 867225.000 -9629 416105.556 965477.778 -9630 416111.111 876347.222 -9631 416116.667 938850.000 -9632 416125.000 887994.444 -9633 416136.111 901727.778 -9634 416141.667 760469.444 -9635 416141.667 811491.667 -9636 416144.444 940172.222 -9637 416147.222 1121258.333 -9638 416155.556 870741.667 -9639 416155.556 875294.444 -9640 416186.111 813841.667 -9641 416216.667 837116.667 -9642 416227.778 738711.111 -9643 416238.889 813072.222 -9644 416252.778 877175.000 -9645 416258.333 712138.889 -9646 416258.333 871902.778 -9647 416261.111 757808.333 -9648 416266.667 937119.444 -9649 416269.444 796738.889 -9650 416269.444 882038.889 -9651 416283.333 703875.000 -9652 416288.889 813616.667 -9653 416302.778 878538.889 -9654 416302.778 897861.111 -9655 416311.111 780916.667 -9656 416313.889 724602.778 -9657 416316.667 876608.333 -9658 416330.556 754708.333 -9659 416330.556 814688.889 -9660 416336.111 886811.111 -9661 416341.667 1118513.889 -9662 416347.222 849994.444 -9663 416352.778 727691.667 -9664 416361.111 709347.222 -9665 416377.778 859216.667 -9666 416386.111 1119330.556 -9667 416386.111 1120786.111 -9668 416388.889 875566.667 -9669 416388.889 876072.222 -9670 416391.667 874547.222 -9671 416397.222 732088.889 -9672 416397.222 814066.667 -9673 416405.556 993708.333 -9674 416411.111 884472.222 -9675 416413.889 801516.667 -9676 416416.667 854166.667 -9677 416430.556 957886.111 -9678 416436.111 834869.444 -9679 416438.889 877036.111 -9680 416441.667 934644.444 -9681 416458.333 886216.667 -9682 416475.000 880894.444 -9683 416500.000 702416.667 -9684 416513.889 754669.444 -9685 416525.000 797272.222 -9686 416527.778 702833.333 -9687 416530.556 953252.778 -9688 416538.889 814505.556 -9689 416555.556 738752.778 -9690 416555.556 746897.222 -9691 416561.111 804241.667 -9692 416563.889 768536.111 -9693 416563.889 900791.667 -9694 416572.222 876800.000 -9695 416580.556 905844.444 -9696 416583.333 701291.667 -9697 416583.333 708166.667 -9698 416602.778 808608.333 -9699 416611.111 727800.000 -9700 416611.111 877525.000 -9701 416611.111 915300.000 -9702 416611.111 920088.889 -9703 416619.444 861586.111 -9704 416627.778 788113.889 -9705 416627.778 876605.556 -9706 416627.778 885369.444 -9707 416638.889 835552.778 -9708 416641.667 836433.333 -9709 416644.444 701733.333 -9710 416650.000 860758.333 -9711 416652.778 1030986.111 -9712 416658.333 814433.333 -9713 416658.333 1111813.889 -9714 416661.111 813397.222 -9715 416666.667 701852.778 -9716 416666.667 966655.556 -9717 416672.222 878302.778 -9718 416680.556 762622.222 -9719 416680.556 877963.889 -9720 416686.111 933575.000 -9721 416688.889 877386.111 -9722 416713.889 899361.111 -9723 416713.889 913463.889 -9724 416716.667 729497.222 -9725 416730.556 936975.000 -9726 416730.556 1079786.111 -9727 416733.333 843269.444 -9728 416736.111 880016.667 -9729 416747.222 903402.778 -9730 416750.000 712711.111 -9731 416750.000 733522.222 -9732 416763.889 719155.556 -9733 416763.889 915802.778 -9734 416772.222 945030.556 -9735 416777.778 932450.000 -9736 416780.556 730113.889 -9737 416794.444 721708.333 -9738 416794.444 770641.667 -9739 416797.222 874944.444 -9740 416800.000 845530.556 -9741 416802.778 903188.889 -9742 416811.111 699916.667 -9743 416816.667 1118222.222 -9744 416819.444 699602.778 -9745 416819.444 859766.667 -9746 416819.444 869602.778 -9747 416827.778 883513.889 -9748 416833.333 862500.000 -9749 416841.667 877002.778 -9750 416844.444 939608.333 -9751 416861.111 700763.889 -9752 416883.333 937908.333 -9753 416888.889 889811.111 -9754 416888.889 983630.556 -9755 416897.222 877972.222 -9756 416908.333 980033.333 -9757 416916.667 943627.778 -9758 416916.667 974841.667 -9759 416919.444 713791.667 -9760 416925.000 869775.000 -9761 416947.222 740516.667 -9762 416966.667 878169.444 -9763 416972.222 862450.000 -9764 416975.000 905825.000 -9765 416977.778 727241.667 -9766 416983.333 868591.667 -9767 416986.111 880683.333 -9768 416994.444 840702.778 -9769 416997.222 930477.778 -9770 417000.000 703000.000 -9771 417000.000 707633.333 -9772 417002.778 739213.889 -9773 417002.778 865094.444 -9774 417005.556 934619.444 -9775 417013.889 711555.556 -9776 417013.889 877791.667 -9777 417019.444 702500.000 -9778 417038.889 790358.333 -9779 417050.000 813605.556 -9780 417052.778 972377.778 -9781 417061.111 715236.111 -9782 417063.889 1118163.889 -9783 417075.000 868950.000 -9784 417091.667 746288.889 -9785 417102.778 865341.667 -9786 417105.556 722086.111 -9787 417105.556 745747.222 -9788 417116.667 839097.222 -9789 417119.444 1121647.222 -9790 417122.222 726086.111 -9791 417127.778 718813.889 -9792 417141.667 726530.556 -9793 417141.667 893286.111 -9794 417161.111 862525.000 -9795 417169.444 743961.111 -9796 417175.000 899258.333 -9797 417180.556 929072.222 -9798 417180.556 949322.222 -9799 417183.333 738530.556 -9800 417188.889 801477.778 -9801 417188.889 837130.556 -9802 417194.444 842180.556 -9803 417205.556 877016.667 -9804 417208.333 739605.556 -9805 417208.333 877541.667 -9806 417211.111 968825.000 -9807 417213.889 858175.000 -9808 417216.667 1118205.556 -9809 417233.333 917902.778 -9810 417244.444 732366.667 -9811 417244.444 812458.333 -9812 417250.000 970025.000 -9813 417255.556 786386.111 -9814 417255.556 878250.000 -9815 417266.667 971219.444 -9816 417277.778 844188.889 -9817 417283.333 1225266.667 -9818 417297.222 936055.556 -9819 417305.556 883458.333 -9820 417308.333 849327.778 -9821 417316.667 922977.778 -9822 417330.556 776422.222 -9823 417336.111 924452.778 -9824 417344.444 877313.889 -9825 417355.556 1118336.111 -9826 417355.556 1226333.333 -9827 417383.333 957025.000 -9828 417405.556 713091.667 -9829 417408.333 878602.778 -9830 417411.111 705994.444 -9831 417411.111 735769.444 -9832 417411.111 1121608.333 -9833 417416.667 706583.333 -9834 417430.556 927222.222 -9835 417438.889 743719.444 -9836 417444.444 878377.778 -9837 417452.778 706186.111 -9838 417455.556 868508.333 -9839 417472.222 731891.667 -9840 417475.000 740872.222 -9841 417486.111 773008.333 -9842 417488.889 879183.333 -9843 417491.667 915977.778 -9844 417500.000 878041.667 -9845 417500.000 977750.000 -9846 417550.000 1033236.111 -9847 417561.111 1242005.556 -9848 417577.778 803680.556 -9849 417588.889 704944.444 -9850 417600.000 700833.333 -9851 417602.778 811411.111 -9852 417605.556 883200.000 -9853 417611.111 938241.667 -9854 417619.444 727425.000 -9855 417619.444 1089661.111 -9856 417625.000 707222.222 -9857 417627.778 878000.000 -9858 417636.111 726855.556 -9859 417652.778 721986.111 -9860 417658.333 836280.556 -9861 417675.000 764430.556 -9862 417680.556 888769.444 -9863 417688.889 878577.778 -9864 417688.889 886408.333 -9865 417694.444 711291.667 -9866 417694.444 1118038.889 -9867 417697.222 911277.778 -9868 417700.000 705288.889 -9869 417702.778 879022.222 -9870 417711.111 730602.778 -9871 417711.111 810500.000 -9872 417713.889 937127.778 -9873 417716.667 887736.111 -9874 417747.222 742986.111 -9875 417747.222 780208.333 -9876 417750.000 1071125.000 -9877 417755.556 954172.222 -9878 417758.333 725219.444 -9879 417783.333 962208.333 -9880 417794.444 1105377.778 -9881 417797.222 714377.778 -9882 417797.222 896888.889 -9883 417800.000 790933.333 -9884 417808.333 749341.667 -9885 417816.667 991327.778 -9886 417822.222 726125.000 -9887 417827.778 878780.556 -9888 417850.000 736944.444 -9889 417858.333 881472.222 -9890 417880.556 902561.111 -9891 417886.111 896961.111 -9892 417894.444 902191.667 -9893 417897.222 699902.778 -9894 417897.222 707608.333 -9895 417911.111 1072380.556 -9896 417925.000 1105369.444 -9897 417938.889 867438.889 -9898 417955.556 860808.333 -9899 417958.333 879755.556 -9900 417966.667 718977.778 -9901 417975.000 879547.222 -9902 417980.556 856433.333 -9903 417980.556 864991.667 -9904 417980.556 920705.556 -9905 417986.111 866105.556 -9906 417988.889 1118183.333 -9907 417991.667 854191.667 -9908 418005.556 731216.667 -9909 418005.556 803691.667 -9910 418008.333 879369.444 -9911 418011.111 747469.444 -9912 418011.111 880747.222 -9913 418019.444 810491.667 -9914 418025.000 718863.889 -9915 418036.111 800566.667 -9916 418061.111 883272.222 -9917 418069.444 834425.000 -9918 418072.222 770777.778 -9919 418072.222 914938.889 -9920 418083.333 722500.000 -9921 418086.111 877933.333 -9922 418088.889 880111.111 -9923 418094.444 1035033.333 -9924 418097.222 728311.111 -9925 418097.222 879005.556 -9926 418097.222 899650.000 -9927 418108.333 782800.000 -9928 418111.111 784450.000 -9929 418127.778 729205.556 -9930 418133.333 878180.556 -9931 418136.111 713705.556 -9932 418177.778 881733.333 -9933 418213.889 877827.778 -9934 418233.333 905380.556 -9935 418238.889 714133.333 -9936 418238.889 878516.667 -9937 418241.667 906477.778 -9938 418244.444 728941.667 -9939 418258.333 1036600.000 -9940 418261.111 931513.889 -9941 418272.222 863611.111 -9942 418280.556 866925.000 -9943 418283.333 974547.222 -9944 418288.889 740688.889 -9945 418297.222 862541.667 -9946 418316.667 908380.556 -9947 418325.000 838625.000 -9948 418327.778 879288.889 -9949 418347.222 878616.667 -9950 418350.000 878227.778 -9951 418358.333 964666.667 -9952 418383.333 1118319.444 -9953 418386.111 941069.444 -9954 418388.889 894794.444 -9955 418394.444 847480.556 -9956 418411.111 856686.111 -9957 418416.667 893002.778 -9958 418416.667 967083.333 -9959 418427.778 878230.556 -9960 418438.889 791452.778 -9961 418444.444 901886.111 -9962 418455.556 877538.889 -9963 418455.556 916927.778 -9964 418458.333 709500.000 -9965 418472.222 853186.111 -9966 418475.000 1036611.111 -9967 418491.667 735572.222 -9968 418500.000 876500.000 -9969 418500.000 879644.444 -9970 418500.000 883125.000 -9971 418505.556 877936.111 -9972 418505.556 878819.444 -9973 418519.444 945580.556 -9974 418525.000 726441.667 -9975 418544.444 956002.778 -9976 418550.000 843538.889 -9977 418569.444 939216.667 -9978 418575.000 909280.556 -9979 418594.444 809541.667 -9980 418616.667 881608.333 -9981 418627.778 1119900.000 -9982 418638.889 711250.000 -9983 418638.889 878533.333 -9984 418650.000 699916.667 -9985 418650.000 807900.000 -9986 418661.111 881069.444 -9987 418661.111 892211.111 -9988 418666.667 1036666.667 -9989 418672.222 901594.444 -9990 418700.000 1065613.889 -9991 418708.333 786616.667 -9992 418708.333 946772.222 -9993 418711.111 715525.000 -9994 418722.222 851947.222 -9995 418725.000 757275.000 -9996 418727.778 807730.556 -9997 418730.556 728586.111 -9998 418741.667 791525.000 -9999 418741.667 801319.444 -10000 418758.333 728016.667 -10001 418766.667 938230.556 -10002 418775.000 880669.444 -10003 418777.778 879027.778 -10004 418777.778 936783.333 -10005 418786.111 713830.556 -10006 418788.889 927891.667 -10007 418791.667 878430.556 -10008 418800.000 880077.778 -10009 418813.889 878830.556 -10010 418822.222 729775.000 -10011 418847.222 882038.889 -10012 418850.000 877844.444 -10013 418875.000 883052.778 -10014 418888.889 837788.889 -10015 418888.889 879033.333 -10016 418888.889 910563.889 -10017 418897.222 879888.889 -10018 418897.222 952319.444 -10019 418905.556 713927.778 -10020 418908.333 806763.889 -10021 418919.444 933994.444 -10022 418922.222 884722.222 -10023 418930.556 911505.556 -10024 418955.556 1062041.667 -10025 418969.444 922780.556 -10026 418975.000 840372.222 -10027 418977.778 878138.889 -10028 418983.333 935288.889 -10029 418994.444 798455.556 -10030 418994.444 879402.778 -10031 419000.000 710902.778 -10032 419002.778 748286.111 -10033 419005.556 878566.667 -10034 419011.111 837150.000 -10035 419027.778 919213.889 -10036 419038.889 777622.222 -10037 419044.444 912544.444 -10038 419050.000 803438.889 -10039 419052.778 739766.667 -10040 419055.556 878836.111 -10041 419058.333 806905.556 -10042 419066.667 713911.111 -10043 419075.000 885991.667 -10044 419086.111 727605.556 -10045 419086.111 771333.333 -10046 419091.667 950647.222 -10047 419094.444 920841.667 -10048 419102.778 880716.667 -10049 419116.667 860100.000 -10050 419125.000 881347.222 -10051 419150.000 719094.444 -10052 419163.889 833977.778 -10053 419172.222 878955.556 -10054 419172.222 1040386.111 -10055 419183.333 834305.556 -10056 419191.667 775391.667 -10057 419194.444 917808.333 -10058 419200.000 846305.556 -10059 419200.000 886886.111 -10060 419202.778 796405.556 -10061 419202.778 1120491.667 -10062 419211.111 730605.556 -10063 419211.111 878091.667 -10064 419211.111 913852.778 -10065 419219.444 914166.667 -10066 419227.778 1118127.778 -10067 419233.333 855283.333 -10068 419236.111 710527.778 -10069 419238.889 890686.111 -10070 419244.444 740616.667 -10071 419258.333 878358.333 -10072 419266.667 739130.556 -10073 419269.444 739977.778 -10074 419288.889 954936.111 -10075 419291.667 726277.778 -10076 419294.444 887502.778 -10077 419297.222 888608.333 -10078 419300.000 968113.889 -10079 419308.333 889644.444 -10080 419311.111 833269.444 -10081 419316.667 879888.889 -10082 419352.778 878655.556 -10083 419375.000 964769.444 -10084 419386.111 761361.111 -10085 419388.889 719600.000 -10086 419402.778 850005.556 -10087 419402.778 1038080.556 -10088 419413.889 931030.556 -10089 419438.889 856325.000 -10090 419441.667 848838.889 -10091 419444.444 712861.111 -10092 419463.889 863388.889 -10093 419475.000 805544.444 -10094 419502.778 972236.111 -10095 419508.333 882422.222 -10096 419511.111 890644.444 -10097 419536.111 735111.111 -10098 419538.889 727891.667 -10099 419538.889 752808.333 -10100 419538.889 860647.222 -10101 419541.667 723027.778 -10102 419550.000 879400.000 -10103 419555.556 717027.778 -10104 419558.333 786441.667 -10105 419558.333 878708.333 -10106 419561.111 1214763.889 -10107 419572.222 765183.333 -10108 419572.222 836597.222 -10109 419575.000 864855.556 -10110 419575.000 880808.333 -10111 419577.778 783855.556 -10112 419583.333 706677.778 -10113 419583.333 853250.000 -10114 419588.889 900991.667 -10115 419611.111 757436.111 -10116 419633.333 878272.222 -10117 419633.333 879788.889 -10118 419633.333 897744.444 -10119 419633.333 1039258.333 -10120 419636.111 781911.111 -10121 419638.889 908175.000 -10122 419655.556 716750.000 -10123 419666.667 711875.000 -10124 419666.667 925766.667 -10125 419672.222 878075.000 -10126 419675.000 1219169.444 -10127 419708.333 845258.333 -10128 419716.667 757436.111 -10129 419750.000 880072.222 -10130 419758.333 1118555.556 -10131 419761.111 725922.222 -10132 419766.667 714591.667 -10133 419788.889 765158.333 -10134 419797.222 736563.889 -10135 419816.667 726511.111 -10136 419825.000 793388.889 -10137 419833.333 980833.333 -10138 419836.111 909561.111 -10139 419841.667 846619.444 -10140 419841.667 861086.111 -10141 419847.222 880797.222 -10142 419850.000 862997.222 -10143 419852.778 724466.667 -10144 419855.556 718991.667 -10145 419855.556 739886.111 -10146 419861.111 773111.111 -10147 419861.111 895791.667 -10148 419863.889 843472.222 -10149 419866.667 838311.111 -10150 419872.222 725452.778 -10151 419872.222 969138.889 -10152 419888.889 886866.667 -10153 419902.778 709755.556 -10154 419941.667 882922.222 -10155 419944.444 707250.000 -10156 419950.000 881855.556 -10157 419955.556 919675.000 -10158 419955.556 925766.667 -10159 419969.444 918619.444 -10160 419972.222 741052.778 -10161 419975.000 765375.000 -10162 419980.556 911413.889 -10163 419983.333 921972.222 -10164 419994.444 881450.000 -10165 419994.444 975980.556 -10166 420002.778 803183.333 -10167 420022.222 906069.444 -10168 420027.778 715152.778 -10169 420036.111 798111.111 -10170 420038.889 839450.000 -10171 420038.889 879702.778 -10172 420044.444 877300.000 -10173 420061.111 841900.000 -10174 420063.889 854500.000 -10175 420069.444 927752.778 -10176 420075.000 962494.444 -10177 420083.333 916438.889 -10178 420086.111 920908.333 -10179 420111.111 878405.556 -10180 420127.778 965725.000 -10181 420127.778 1214075.000 -10182 420133.333 898905.556 -10183 420144.444 865194.444 -10184 420147.222 893322.222 -10185 420152.778 943772.222 -10186 420161.111 767272.222 -10187 420166.667 740766.667 -10188 420166.667 931633.333 -10189 420177.778 933150.000 -10190 420177.778 953550.000 -10191 420180.556 740152.778 -10192 420188.889 878027.778 -10193 420225.000 945450.000 -10194 420227.778 934522.222 -10195 420230.556 706833.333 -10196 420236.111 719502.778 -10197 420252.778 1215994.444 -10198 420255.556 881783.333 -10199 420258.333 858155.556 -10200 420266.667 960969.444 -10201 420272.222 733297.222 -10202 420316.667 942405.556 -10203 420333.333 712194.444 -10204 420333.333 877333.333 -10205 420333.333 878833.333 -10206 420333.333 880833.333 -10207 420341.667 915975.000 -10208 420347.222 936197.222 -10209 420358.333 916819.444 -10210 420372.222 882811.111 -10211 420386.111 783411.111 -10212 420391.667 940275.000 -10213 420405.556 877825.000 -10214 420411.111 876900.000 -10215 420416.667 706727.778 -10216 420427.778 880797.222 -10217 420427.778 1010422.222 -10218 420430.556 733455.556 -10219 420436.111 739477.778 -10220 420438.889 847575.000 -10221 420455.556 802700.000 -10222 420472.222 978336.111 -10223 420494.444 929077.778 -10224 420500.000 718805.556 -10225 420500.000 725833.333 -10226 420502.778 894311.111 -10227 420502.778 904138.889 -10228 420527.778 1242827.778 -10229 420533.333 1242663.889 -10230 420544.444 791583.333 -10231 420544.444 1049522.222 -10232 420569.444 947286.111 -10233 420583.333 701791.667 -10234 420583.333 739097.222 -10235 420591.667 833908.333 -10236 420591.667 910072.222 -10237 420594.444 914425.000 -10238 420597.222 938800.000 -10239 420600.000 754280.556 -10240 420638.889 832611.111 -10241 420650.000 864950.000 -10242 420650.000 1041811.111 -10243 420658.333 948666.667 -10244 420661.111 917952.778 -10245 420663.889 879372.222 -10246 420666.667 851361.111 -10247 420683.333 955913.889 -10248 420688.889 906655.556 -10249 420694.444 761550.000 -10250 420700.000 843305.556 -10251 420708.333 832466.667 -10252 420711.111 901738.889 -10253 420711.111 916666.667 -10254 420719.444 839716.667 -10255 420722.222 717138.889 -10256 420722.222 877227.778 -10257 420750.000 708805.556 -10258 420750.000 720338.889 -10259 420750.000 794833.333 -10260 420758.333 756408.333 -10261 420775.000 739533.333 -10262 420775.000 784300.000 -10263 420780.556 768455.556 -10264 420825.000 1109544.444 -10265 420833.333 710188.889 -10266 420833.333 713972.222 -10267 420841.667 880130.556 -10268 420852.778 836825.000 -10269 420858.333 877175.000 -10270 420863.889 779225.000 -10271 420866.667 714750.000 -10272 420869.444 864558.333 -10273 420886.111 852347.222 -10274 420897.222 768080.556 -10275 420900.000 784944.444 -10276 420913.889 881216.667 -10277 420916.667 707061.111 -10278 420925.000 888511.111 -10279 420930.556 707930.556 -10280 420933.333 849858.333 -10281 420936.111 926755.556 -10282 420941.667 883025.000 -10283 420944.444 901566.667 -10284 420944.444 918691.667 -10285 420950.000 831897.222 -10286 420950.000 899780.556 -10287 420952.778 879375.000 -10288 420963.889 1118758.333 -10289 420969.444 792355.556 -10290 420972.222 886927.778 -10291 420977.778 885302.778 -10292 420983.333 760497.222 -10293 420986.111 759183.333 -10294 420997.222 877808.333 -10295 421013.889 725902.778 -10296 421022.222 898333.333 -10297 421027.778 772338.889 -10298 421033.333 762625.000 -10299 421041.667 723194.444 -10300 421041.667 793333.333 -10301 421058.333 842483.333 -10302 421069.444 726208.333 -10303 421069.444 936494.444 -10304 421072.222 891791.667 -10305 421080.556 859744.444 -10306 421080.556 877358.333 -10307 421083.333 720791.667 -10308 421083.333 912850.000 -10309 421094.444 792833.333 -10310 421102.778 880341.667 -10311 421111.111 716666.667 -10312 421125.000 929883.333 -10313 421127.778 760213.889 -10314 421141.667 856377.778 -10315 421141.667 967069.444 -10316 421155.556 759591.667 -10317 421161.111 721138.889 -10318 421166.667 864541.667 -10319 421180.556 880961.111 -10320 421186.111 791986.111 -10321 421200.000 855327.778 -10322 421211.111 882577.778 -10323 421216.667 770375.000 -10324 421236.111 711791.667 -10325 421236.111 724319.444 -10326 421250.000 727500.000 -10327 421255.556 894036.111 -10328 421261.111 895791.667 -10329 421269.444 892555.556 -10330 421275.000 878288.889 -10331 421275.000 961491.667 -10332 421286.111 980294.444 -10333 421291.667 800852.778 -10334 421297.222 768211.111 -10335 421305.556 715416.667 -10336 421311.111 864072.222 -10337 421333.333 758966.667 -10338 421350.000 877580.556 -10339 421372.222 769372.222 -10340 421388.889 832416.667 -10341 421391.667 879288.889 -10342 421394.444 831783.333 -10343 421397.222 715166.667 -10344 421402.778 800152.778 -10345 421416.667 712500.000 -10346 421427.778 770550.000 -10347 421458.333 707402.778 -10348 421458.333 848088.889 -10349 421461.111 771119.444 -10350 421483.333 964880.556 -10351 421486.111 726083.333 -10352 421486.111 746486.111 -10353 421502.778 840377.778 -10354 421513.889 879597.222 -10355 421519.444 944741.667 -10356 421538.889 881361.111 -10357 421547.222 897397.222 -10358 421550.000 710091.667 -10359 421563.889 777958.333 -10360 421577.778 787152.778 -10361 421583.333 723291.667 -10362 421591.667 795955.556 -10363 421605.556 842461.111 -10364 421608.333 880813.889 -10365 421611.111 932969.444 -10366 421619.444 770944.444 -10367 421619.444 789755.556 -10368 421625.000 710416.667 -10369 421625.000 834030.556 -10370 421630.556 1236469.444 -10371 421652.778 954366.667 -10372 421655.556 882941.667 -10373 421658.333 957927.778 -10374 421663.889 935016.667 -10375 421666.667 837816.667 -10376 421669.444 768208.333 -10377 421672.222 858469.444 -10378 421675.000 878969.444 -10379 421680.556 884280.556 -10380 421686.111 920233.333 -10381 421694.444 751297.222 -10382 421705.556 880477.778 -10383 421711.111 878444.444 -10384 421716.667 923061.111 -10385 421727.778 789480.556 -10386 421777.778 846430.556 -10387 421783.333 879977.778 -10388 421811.111 723611.111 -10389 421816.667 878002.778 -10390 421816.667 883302.778 -10391 421816.667 949766.667 -10392 421861.111 863083.333 -10393 421866.667 862605.556 -10394 421872.222 935955.556 -10395 421875.000 713069.444 -10396 421877.778 927150.000 -10397 421888.889 1203447.222 -10398 421908.333 917850.000 -10399 421916.667 1122500.000 -10400 421933.333 843911.111 -10401 421933.333 878663.889 -10402 421936.111 924652.778 -10403 421944.444 712000.000 -10404 421944.444 719063.889 -10405 421947.222 1227083.333 -10406 421955.556 741341.667 -10407 421958.333 707263.889 -10408 421958.333 733625.000 -10409 421969.444 880933.333 -10410 421986.111 765527.778 -10411 421991.667 975263.889 -10412 421997.222 878091.667 -10413 422008.333 882144.444 -10414 422011.111 855800.000 -10415 422038.889 915238.889 -10416 422041.667 726166.667 -10417 422047.222 834852.778 -10418 422050.000 845527.778 -10419 422063.889 781377.778 -10420 422066.667 861666.667 -10421 422069.444 1217361.111 -10422 422075.000 880555.556 -10423 422077.778 881405.556 -10424 422094.444 857844.444 -10425 422097.222 764936.111 -10426 422119.444 882380.556 -10427 422122.222 862719.444 -10428 422125.000 721916.667 -10429 422125.000 723458.333 -10430 422125.000 881525.000 -10431 422136.111 742191.667 -10432 422138.889 721027.778 -10433 422138.889 831938.889 -10434 422155.556 798344.444 -10435 422169.444 880494.444 -10436 422172.222 738650.000 -10437 422175.000 782755.556 -10438 422177.778 858911.111 -10439 422188.889 707861.111 -10440 422191.667 860513.889 -10441 422194.444 879794.444 -10442 422208.333 709402.778 -10443 422208.333 863694.444 -10444 422222.222 710000.000 -10445 422222.222 833966.667 -10446 422230.556 780347.222 -10447 422236.111 761836.111 -10448 422241.667 918741.667 -10449 422247.222 928744.444 -10450 422250.000 1217805.556 -10451 422272.222 1114002.778 -10452 422277.778 720472.222 -10453 422280.556 755269.444 -10454 422286.111 715230.556 -10455 422305.556 970175.000 -10456 422327.778 763427.778 -10457 422327.778 962277.778 -10458 422330.556 843272.222 -10459 422338.889 738827.778 -10460 422347.222 889488.889 -10461 422352.778 721416.667 -10462 422358.333 964722.222 -10463 422383.333 853350.000 -10464 422383.333 911869.444 -10465 422408.333 832697.222 -10466 422411.111 836130.556 -10467 422411.111 883161.111 -10468 422416.667 708902.778 -10469 422416.667 711666.667 -10470 422425.000 882019.444 -10471 422430.556 847530.556 -10472 422433.333 1138811.111 -10473 422438.889 719927.778 -10474 422444.444 831458.333 -10475 422455.556 930644.444 -10476 422458.333 712833.333 -10477 422458.333 844013.889 -10478 422458.333 1227875.000 -10479 422463.889 882427.778 -10480 422483.333 736536.111 -10481 422486.111 886083.333 -10482 422500.000 710666.667 -10483 422505.556 831786.111 -10484 422508.333 842130.556 -10485 422525.000 788058.333 -10486 422527.778 710027.778 -10487 422527.778 737913.889 -10488 422538.889 795047.222 -10489 422541.667 733666.667 -10490 422541.667 777908.333 -10491 422563.889 725166.667 -10492 422563.889 902794.444 -10493 422575.000 832111.111 -10494 422577.778 983461.111 -10495 422583.333 845997.222 -10496 422586.111 904227.778 -10497 422588.889 881391.667 -10498 422597.222 722402.778 -10499 422602.778 738100.000 -10500 422613.889 940683.333 -10501 422625.000 718027.778 -10502 422630.556 880038.889 -10503 422638.889 792588.889 -10504 422638.889 888441.667 -10505 422652.778 898258.333 -10506 422661.111 892411.111 -10507 422666.667 720833.333 -10508 422669.444 797108.333 -10509 422675.000 947336.111 -10510 422688.889 715244.444 -10511 422691.667 968647.222 -10512 422694.444 716166.667 -10513 422697.222 1047411.111 -10514 422702.778 776061.111 -10515 422702.778 945483.333 -10516 422711.111 890938.889 -10517 422711.111 950927.778 -10518 422713.889 939269.444 -10519 422722.222 849633.333 -10520 422733.333 831344.444 -10521 422750.000 786730.556 -10522 422755.556 1228169.444 -10523 422761.111 881919.444 -10524 422769.444 724013.889 -10525 422780.556 749163.889 -10526 422786.111 967263.889 -10527 422788.889 878341.667 -10528 422791.667 714166.667 -10529 422805.556 942905.556 -10530 422808.333 915302.778 -10531 422813.889 833863.889 -10532 422825.000 831752.778 -10533 422830.556 879530.556 -10534 422833.333 712333.333 -10535 422833.333 837458.333 -10536 422861.111 737391.667 -10537 422866.667 917805.556 -10538 422875.000 733208.333 -10539 422886.111 772186.111 -10540 422886.111 854180.556 -10541 422900.000 882247.222 -10542 422916.667 855872.222 -10543 422933.333 754797.222 -10544 422941.667 833100.000 -10545 422944.444 791000.000 -10546 422963.889 712930.556 -10547 422966.667 896211.111 -10548 422986.111 910147.222 -10549 422988.889 739988.889 -10550 423019.444 709083.333 -10551 423030.556 855502.778 -10552 423041.667 732486.111 -10553 423055.556 933000.000 -10554 423066.667 780161.111 -10555 423083.333 852191.667 -10556 423122.222 952502.778 -10557 423125.000 722083.333 -10558 423125.000 861130.556 -10559 423136.111 1229658.333 -10560 423138.889 893591.667 -10561 423147.222 753919.444 -10562 423147.222 884486.111 -10563 423150.000 921919.444 -10564 423152.778 934341.667 -10565 423155.556 955983.333 -10566 423177.778 902213.889 -10567 423180.556 840205.556 -10568 423188.889 851425.000 -10569 423188.889 882580.556 -10570 423194.444 716416.667 -10571 423200.000 890580.556 -10572 423208.333 713647.222 -10573 423211.111 851797.222 -10574 423216.667 964891.667 -10575 423216.667 1030725.000 -10576 423222.222 777386.111 -10577 423222.222 795783.333 -10578 423222.222 831763.889 -10579 423222.222 1112969.444 -10580 423236.111 925991.667 -10581 423241.667 834002.778 -10582 423250.000 726416.667 -10583 423252.778 753127.778 -10584 423255.556 833311.111 -10585 423255.556 878411.111 -10586 423266.667 1228744.444 -10587 423277.778 776613.889 -10588 423280.556 855697.222 -10589 423286.111 881988.889 -10590 423288.889 759680.556 -10591 423291.667 757702.778 -10592 423291.667 788683.333 -10593 423313.889 830458.333 -10594 423363.889 853522.222 -10595 423366.667 767888.889 -10596 423369.444 712097.222 -10597 423369.444 773180.556 -10598 423369.444 784583.333 -10599 423369.444 832733.333 -10600 423383.333 838886.111 -10601 423402.778 725055.556 -10602 423427.778 879980.556 -10603 423427.778 890519.444 -10604 423438.889 912483.333 -10605 423441.667 793097.222 -10606 423444.444 880416.667 -10607 423447.222 882738.889 -10608 423450.000 954713.889 -10609 423458.333 715527.778 -10610 423461.111 776616.667 -10611 423472.222 768455.556 -10612 423483.333 878841.667 -10613 423497.222 900066.667 -10614 423497.222 977916.667 -10615 423508.333 738033.333 -10616 423533.333 880933.333 -10617 423563.889 732852.778 -10618 423569.444 880766.667 -10619 423583.333 710602.778 -10620 423600.000 940519.444 -10621 423600.000 975963.889 -10622 423608.333 858794.444 -10623 423608.333 930994.444 -10624 423616.667 927683.333 -10625 423636.111 878447.222 -10626 423641.667 735952.778 -10627 423641.667 790558.333 -10628 423683.333 833527.778 -10629 423683.333 882925.000 -10630 423694.444 719486.111 -10631 423702.778 879019.444 -10632 423708.333 711833.333 -10633 423708.333 725986.111 -10634 423716.667 880900.000 -10635 423736.111 725208.333 -10636 423750.000 709833.333 -10637 423758.333 829375.000 -10638 423758.333 896330.556 -10639 423763.889 712361.111 -10640 423783.333 846986.111 -10641 423786.111 973566.667 -10642 423794.444 898222.222 -10643 423800.000 881041.667 -10644 423805.556 768736.111 -10645 423811.111 881397.222 -10646 423827.778 859569.444 -10647 423861.111 829119.444 -10648 423875.000 711000.000 -10649 423883.333 958663.889 -10650 423886.111 794413.889 -10651 423886.111 895261.111 -10652 423916.667 710333.333 -10653 423916.667 715666.667 -10654 423927.778 830497.222 -10655 423933.333 883402.778 -10656 423944.444 776969.444 -10657 423944.444 917608.333 -10658 423952.778 736983.333 -10659 423952.778 946336.111 -10660 423958.333 711791.667 -10661 423966.667 881836.111 -10662 423972.222 751738.889 -10663 423986.111 880525.000 -10664 423997.222 887402.778 -10665 424030.556 862736.111 -10666 424038.889 963583.333 -10667 424066.667 924552.778 -10668 424072.222 746147.222 -10669 424075.000 1244205.556 -10670 424077.778 772238.889 -10671 424080.556 881316.667 -10672 424083.333 710125.000 -10673 424083.333 710541.667 -10674 424086.111 882063.889 -10675 424091.667 828919.444 -10676 424094.444 774216.667 -10677 424102.778 725313.889 -10678 424105.556 880261.111 -10679 424133.333 736736.111 -10680 424133.333 890091.667 -10681 424152.778 711569.444 -10682 424155.556 964180.556 -10683 424161.111 922147.222 -10684 424166.667 716833.333 -10685 424166.667 904288.889 -10686 424169.444 880738.889 -10687 424183.333 711066.667 -10688 424222.222 886136.111 -10689 424222.222 949894.444 -10690 424227.778 721055.556 -10691 424233.333 781575.000 -10692 424247.222 941500.000 -10693 424250.000 710666.667 -10694 424263.889 709194.444 -10695 424286.111 879238.889 -10696 424286.111 1121236.111 -10697 424291.667 764952.778 -10698 424294.444 970894.444 -10699 424297.222 913308.333 -10700 424311.111 834833.333 -10701 424330.556 829241.667 -10702 424333.333 714500.000 -10703 424361.111 1231708.333 -10704 424363.889 893319.444 -10705 424366.667 828769.444 -10706 424375.000 1228577.778 -10707 424391.667 1233272.222 -10708 424394.444 837438.889 -10709 424400.000 793319.444 -10710 424400.000 856488.889 -10711 424405.556 764969.444 -10712 424408.333 736613.889 -10713 424413.889 849241.667 -10714 424416.667 760325.000 -10715 424427.778 910061.111 -10716 424433.333 850180.556 -10717 424436.111 829069.444 -10718 424444.444 716875.000 -10719 424450.000 909319.444 -10720 424461.111 878327.778 -10721 424472.222 712250.000 -10722 424500.000 732458.333 -10723 424511.111 841805.556 -10724 424513.889 844325.000 -10725 424522.222 711375.000 -10726 424527.778 750641.667 -10727 424566.667 839463.889 -10728 424577.778 986472.222 -10729 424583.333 710666.667 -10730 424583.333 713958.333 -10731 424591.667 929383.333 -10732 424594.444 764869.444 -10733 424605.556 831347.222 -10734 424605.556 836516.667 -10735 424605.556 856963.889 -10736 424613.889 777772.222 -10737 424613.889 951516.667 -10738 424625.000 831041.667 -10739 424630.556 789361.111 -10740 424641.667 926280.556 -10741 424644.444 833763.889 -10742 424647.222 710105.556 -10743 424661.111 781152.778 -10744 424666.667 709500.000 -10745 424666.667 979058.333 -10746 424669.444 922563.889 -10747 424683.333 738166.667 -10748 424683.333 791772.222 -10749 424683.333 829555.556 -10750 424683.333 896438.889 -10751 424686.111 918891.667 -10752 424688.889 922194.444 -10753 424691.667 922808.333 -10754 424694.444 938158.333 -10755 424705.556 939933.333 -10756 424708.333 709180.556 -10757 424711.111 831422.222 -10758 424716.667 884322.222 -10759 424727.778 1228016.667 -10760 424733.333 832219.444 -10761 424733.333 917341.667 -10762 424738.889 964133.333 -10763 424750.000 957852.778 -10764 424755.556 920636.111 -10765 424772.222 726083.333 -10766 424772.222 880955.556 -10767 424775.000 830277.778 -10768 424788.889 878236.111 -10769 424791.667 711527.778 -10770 424794.444 793341.667 -10771 424800.000 711000.000 -10772 424805.556 831669.444 -10773 424805.556 834755.556 -10774 424816.667 912722.222 -10775 424841.667 914552.778 -10776 424844.444 911227.778 -10777 424850.000 830277.778 -10778 424858.333 831052.778 -10779 424888.889 960722.222 -10780 424891.667 784811.111 -10781 424891.667 955447.222 -10782 424894.444 831447.222 -10783 424908.333 762975.000 -10784 424922.222 906427.778 -10785 424927.778 923427.778 -10786 424930.556 890366.667 -10787 424947.222 1078266.667 -10788 424963.889 832227.778 -10789 424963.889 899894.444 -10790 424969.444 828888.889 -10791 424972.222 829372.222 -10792 424975.000 941677.778 -10793 424983.333 883297.222 -10794 424994.444 975416.667 -10795 425000.000 708583.333 -10796 425000.000 952927.778 -10797 425000.000 964000.000 -10798 425005.556 906644.444 -10799 425022.222 775075.000 -10800 425025.000 887288.889 -10801 425030.556 831836.111 -10802 425047.222 711961.111 -10803 425061.111 972033.333 -10804 425063.889 710733.333 -10805 425083.333 890316.667 -10806 425091.667 846558.333 -10807 425144.444 907513.889 -10808 425158.333 736105.556 -10809 425158.333 832733.333 -10810 425183.333 737516.667 -10811 425194.444 708972.222 -10812 425202.778 933758.333 -10813 425222.222 833061.111 -10814 425225.000 932511.111 -10815 425233.333 769769.444 -10816 425247.222 835363.889 -10817 425250.000 717602.778 -10818 425255.556 710958.333 -10819 425272.222 964827.778 -10820 425277.778 709291.667 -10821 425277.778 924452.778 -10822 425291.667 712286.111 -10823 425291.667 858552.778 -10824 425294.444 837802.778 -10825 425297.222 1143052.778 -10826 425300.000 784730.556 -10827 425311.111 755238.889 -10828 425311.111 882480.556 -10829 425311.111 885994.444 -10830 425313.889 989777.778 -10831 425327.778 904344.444 -10832 425333.333 831463.889 -10833 425338.889 784233.333 -10834 425338.889 1143638.889 -10835 425347.222 881436.111 -10836 425358.333 1137919.444 -10837 425363.889 997002.778 -10838 425377.778 834811.111 -10839 425380.556 883508.333 -10840 425383.333 1101136.111 -10841 425388.889 710486.111 -10842 425391.667 829494.444 -10843 425422.222 766663.889 -10844 425436.111 716500.000 -10845 425441.667 791669.444 -10846 425458.333 714750.000 -10847 425463.889 711741.667 -10848 425466.667 832113.889 -10849 425486.111 752455.556 -10850 425488.889 748213.889 -10851 425500.000 998622.222 -10852 425511.111 946836.111 -10853 425536.111 882944.444 -10854 425536.111 1101086.111 -10855 425541.667 930530.556 -10856 425566.667 834738.889 -10857 425577.778 888650.000 -10858 425583.333 708805.556 -10859 425586.111 1137630.556 -10860 425608.333 776963.889 -10861 425611.111 715902.778 -10862 425630.556 1144600.000 -10863 425636.111 848358.333 -10864 425669.444 926219.444 -10865 425677.778 775900.000 -10866 425697.222 903805.556 -10867 425700.000 921602.778 -10868 425702.778 1146069.444 -10869 425733.333 902308.333 -10870 425750.000 709305.556 -10871 425750.000 719986.111 -10872 425761.111 1117297.222 -10873 425775.000 881050.000 -10874 425775.000 927866.667 -10875 425777.778 1218650.000 -10876 425780.556 885408.333 -10877 425794.444 779427.778 -10878 425802.778 830302.778 -10879 425813.889 948458.333 -10880 425819.444 724930.556 -10881 425822.222 762094.444 -10882 425833.333 718027.778 -10883 425836.111 832455.556 -10884 425841.667 886325.000 -10885 425841.667 928841.667 -10886 425847.222 878211.111 -10887 425858.333 995375.000 -10888 425875.000 726000.000 -10889 425877.778 763672.222 -10890 425883.333 959672.222 -10891 425902.778 723102.778 -10892 425905.556 749455.556 -10893 425936.111 835994.444 -10894 425938.889 861016.667 -10895 425944.444 717250.000 -10896 425952.778 789413.889 -10897 425958.333 722272.222 -10898 425961.111 760936.111 -10899 425969.444 980333.333 -10900 425972.222 828780.556 -10901 425986.111 916419.444 -10902 425988.889 976452.778 -10903 425991.667 991422.222 -10904 425991.667 1147586.111 -10905 426011.111 761808.333 -10906 426011.111 896383.333 -10907 426016.667 887075.000 -10908 426025.000 965588.889 -10909 426027.778 850930.556 -10910 426041.667 725569.444 -10911 426041.667 727397.222 -10912 426055.556 904297.222 -10913 426055.556 950025.000 -10914 426072.222 839294.444 -10915 426080.556 833438.889 -10916 426080.556 1137825.000 -10917 426083.333 720763.889 -10918 426102.778 719394.444 -10919 426111.111 715750.000 -10920 426113.889 833286.111 -10921 426122.222 884822.222 -10922 426144.444 941458.333 -10923 426152.778 770925.000 -10924 426152.778 774027.778 -10925 426158.333 706625.000 -10926 426169.444 767252.778 -10927 426183.333 825311.111 -10928 426183.333 893761.111 -10929 426191.667 1136763.889 -10930 426208.333 919000.000 -10931 426213.889 951730.556 -10932 426219.444 738330.556 -10933 426225.000 972641.667 -10934 426236.111 857602.778 -10935 426241.667 731180.556 -10936 426241.667 753319.444 -10937 426241.667 790672.222 -10938 426261.111 830336.111 -10939 426272.222 905919.444 -10940 426275.000 892530.556 -10941 426277.778 962913.889 -10942 426288.889 780547.222 -10943 426288.889 850241.667 -10944 426291.667 847388.889 -10945 426319.444 707833.333 -10946 426330.556 886436.111 -10947 426333.333 713166.667 -10948 426338.889 735541.667 -10949 426341.667 745644.444 -10950 426369.444 761791.667 -10951 426375.000 709500.000 -10952 426383.333 790280.556 -10953 426388.889 832911.111 -10954 426391.667 920469.444 -10955 426405.556 845152.778 -10956 426411.111 952094.444 -10957 426425.000 737433.333 -10958 426433.333 736091.667 -10959 426444.444 914011.111 -10960 426455.556 846488.889 -10961 426461.111 924627.778 -10962 426505.556 1121922.222 -10963 426525.000 737566.667 -10964 426538.889 739291.667 -10965 426544.444 1116038.889 -10966 426550.000 862019.444 -10967 426566.667 935008.333 -10968 426583.333 711375.000 -10969 426605.556 780858.333 -10970 426605.556 840730.556 -10971 426608.333 770541.667 -10972 426611.111 709972.222 -10973 426641.667 939041.667 -10974 426652.778 715736.111 -10975 426658.333 715888.889 -10976 426658.333 743100.000 -10977 426666.667 717055.556 -10978 426669.444 841741.667 -10979 426708.333 892088.889 -10980 426713.889 923372.222 -10981 426727.778 885444.444 -10982 426733.333 919133.333 -10983 426736.111 952902.778 -10984 426738.889 856447.222 -10985 426763.889 768233.333 -10986 426777.778 744858.333 -10987 426780.556 754988.889 -10988 426780.556 882761.111 -10989 426791.667 708416.667 -10990 426805.556 831338.889 -10991 426811.111 827369.444 -10992 426822.222 768688.889 -10993 426827.778 890186.111 -10994 426830.556 901175.000 -10995 426830.556 1034122.222 -10996 426833.333 966833.333 -10997 426836.111 915338.889 -10998 426838.889 1026894.444 -10999 426855.556 787769.444 -11000 426861.111 720444.444 -11001 426880.556 880513.889 -11002 426888.889 842830.556 -11003 426894.444 907119.444 -11004 426902.778 735650.000 -11005 426911.111 738691.667 -11006 426919.444 737250.000 -11007 426950.000 738075.000 -11008 426958.333 724533.333 -11009 426980.556 878944.444 -11010 427005.556 740341.667 -11011 427005.556 749247.222 -11012 427008.333 731091.667 -11013 427011.111 898669.444 -11014 427022.222 834027.778 -11015 427022.222 922252.778 -11016 427047.222 737552.778 -11017 427069.444 711636.111 -11018 427077.778 894369.444 -11019 427102.778 925827.778 -11020 427119.444 732041.667 -11021 427125.000 764219.444 -11022 427127.778 954363.889 -11023 427130.556 854619.444 -11024 427144.444 909905.556 -11025 427155.556 780058.333 -11026 427166.667 708791.667 -11027 427177.778 738338.889 -11028 427183.333 1024636.111 -11029 427194.444 824922.222 -11030 427197.222 962483.333 -11031 427200.000 942000.000 -11032 427202.778 1118850.000 -11033 427208.333 942150.000 -11034 427222.222 844275.000 -11035 427241.667 1145177.778 -11036 427250.000 1109311.111 -11037 427255.556 778744.444 -11038 427258.333 924752.778 -11039 427261.111 877827.778 -11040 427283.333 736922.222 -11041 427288.889 974952.778 -11042 427294.444 944475.000 -11043 427300.000 737016.667 -11044 427316.667 937327.778 -11045 427325.000 845555.556 -11046 427341.667 904783.333 -11047 427355.556 946688.889 -11048 427358.333 834188.889 -11049 427361.111 903341.667 -11050 427363.889 1234222.222 -11051 427369.444 844838.889 -11052 427400.000 781330.556 -11053 427413.889 882241.667 -11054 427419.444 932022.222 -11055 427441.667 736919.444 -11056 427455.556 895947.222 -11057 427458.333 1244961.111 -11058 427469.444 737594.444 -11059 427469.444 844011.111 -11060 427494.444 955513.889 -11061 427519.444 929752.778 -11062 427527.778 927950.000 -11063 427533.333 847463.889 -11064 427538.889 767027.778 -11065 427583.333 758847.222 -11066 427597.222 1053816.667 -11067 427600.000 772266.667 -11068 427622.222 848963.889 -11069 427622.222 849925.000 -11070 427625.000 1044516.667 -11071 427630.556 882141.667 -11072 427647.222 714402.778 -11073 427652.778 714680.556 -11074 427672.222 718127.778 -11075 427675.000 787441.667 -11076 427677.778 786136.111 -11077 427702.778 832641.667 -11078 427733.333 723836.111 -11079 427738.889 918822.222 -11080 427741.667 737005.556 -11081 427755.556 889438.889 -11082 427758.333 1147033.333 -11083 427761.111 710777.778 -11084 427794.444 969288.889 -11085 427797.222 738461.111 -11086 427802.778 892991.667 -11087 427819.444 949483.333 -11088 427844.444 832397.222 -11089 427844.444 877661.111 -11090 427847.222 851383.333 -11091 427847.222 926675.000 -11092 427852.778 884050.000 -11093 427858.333 910994.444 -11094 427861.111 724869.444 -11095 427861.111 1128536.111 -11096 427875.000 861088.889 -11097 427891.667 855166.667 -11098 427913.889 838463.889 -11099 427919.444 836277.778 -11100 427925.000 736816.667 -11101 427941.667 961652.778 -11102 427955.556 747536.111 -11103 427958.333 746175.000 -11104 427958.333 778172.222 -11105 427963.889 1122533.333 -11106 427972.222 788236.111 -11107 427977.778 837050.000 -11108 427980.556 761097.222 -11109 428027.778 830130.556 -11110 428047.222 1022027.778 -11111 428080.556 922580.556 -11112 428091.667 827558.333 -11113 428102.778 898619.444 -11114 428122.222 1148977.778 -11115 428125.000 708777.778 -11116 428125.000 860186.111 -11117 428127.778 945266.667 -11118 428138.889 720236.111 -11119 428141.667 739400.000 -11120 428144.444 837825.000 -11121 428144.444 896350.000 -11122 428147.222 959730.556 -11123 428208.333 824861.111 -11124 428213.889 776688.889 -11125 428227.778 839444.444 -11126 428238.889 721816.667 -11127 428247.222 832647.222 -11128 428255.556 788236.111 -11129 428258.333 958072.222 -11130 428263.889 739647.222 -11131 428263.889 780900.000 -11132 428263.889 842194.444 -11133 428269.444 755450.000 -11134 428288.889 965591.667 -11135 428294.444 1030000.000 -11136 428297.222 786363.889 -11137 428330.556 1087300.000 -11138 428336.111 887322.222 -11139 428352.778 716494.444 -11140 428352.778 890675.000 -11141 428386.111 841783.333 -11142 428397.222 766936.111 -11143 428405.556 1063652.778 -11144 428408.333 856636.111 -11145 428416.667 708611.111 -11146 428419.444 918019.444 -11147 428433.333 717355.556 -11148 428441.667 828844.444 -11149 428461.111 936138.889 -11150 428466.667 948516.667 -11151 428475.000 907105.556 -11152 428475.000 920913.889 -11153 428508.333 725583.333 -11154 428522.222 834430.556 -11155 428533.333 749858.333 -11156 428536.111 893702.778 -11157 428538.889 914052.778 -11158 428541.667 978969.444 -11159 428558.333 726036.111 -11160 428583.333 709305.556 -11161 428597.222 895380.556 -11162 428600.000 1062677.778 -11163 428613.889 1058716.667 -11164 428641.667 782805.556 -11165 428666.667 883333.333 -11166 428666.667 1063125.000 -11167 428666.667 1098602.778 -11168 428686.111 773358.333 -11169 428686.111 912358.333 -11170 428688.889 769780.556 -11171 428691.667 849030.556 -11172 428694.444 856447.222 -11173 428705.556 719522.222 -11174 428708.333 858650.000 -11175 428711.111 973969.444 -11176 428713.889 1124447.222 -11177 428727.778 1005505.556 -11178 428738.889 987011.111 -11179 428744.444 740469.444 -11180 428777.778 885861.111 -11181 428780.556 731972.222 -11182 428786.111 840638.889 -11183 428791.667 752513.889 -11184 428794.444 884741.667 -11185 428805.556 713277.778 -11186 428813.889 882066.667 -11187 428836.111 1240719.444 -11188 428852.778 751936.111 -11189 428852.778 909233.333 -11190 428858.333 878630.556 -11191 428863.889 788786.111 -11192 428902.778 843513.889 -11193 428905.556 785780.556 -11194 428933.333 787941.667 -11195 428933.333 932150.000 -11196 428933.333 951508.333 -11197 428944.444 739283.333 -11198 428950.000 774350.000 -11199 428958.333 928022.222 -11200 428963.889 827688.889 -11201 428986.111 756405.556 -11202 429000.000 735858.333 -11203 429000.000 784922.222 -11204 429000.000 904308.333 -11205 429005.556 786705.556 -11206 429011.111 733519.444 -11207 429022.222 774200.000 -11208 429027.778 736877.778 -11209 429033.333 735630.556 -11210 429038.889 786925.000 -11211 429041.667 722083.333 -11212 429047.222 768630.556 -11213 429047.222 776116.667 -11214 429055.556 745722.222 -11215 429058.333 881388.889 -11216 429061.111 1085827.778 -11217 429072.222 857919.444 -11218 429086.111 765405.556 -11219 429097.222 857630.556 -11220 429105.556 767969.444 -11221 429105.556 878605.556 -11222 429108.333 745744.444 -11223 429113.889 988488.889 -11224 429119.444 777458.333 -11225 429119.444 839847.222 -11226 429125.000 824869.444 -11227 429133.333 857052.778 -11228 429169.444 835063.889 -11229 429169.444 892177.778 -11230 429188.889 767266.667 -11231 429205.556 830450.000 -11232 429208.333 1124652.778 -11233 429261.111 893844.444 -11234 429275.000 836300.000 -11235 429275.000 1232800.000 -11236 429288.889 888369.444 -11237 429294.444 847986.111 -11238 429294.444 852130.556 -11239 429300.000 758530.556 -11240 429302.778 732430.556 -11241 429313.889 746230.556 -11242 429316.667 765663.889 -11243 429336.111 722786.111 -11244 429336.111 853419.444 -11245 429344.444 884052.778 -11246 429347.222 746138.889 -11247 429361.111 1144050.000 -11248 429375.000 708394.444 -11249 429375.000 880486.111 -11250 429377.778 937930.556 -11251 429386.111 737902.778 -11252 429386.111 741886.111 -11253 429386.111 919500.000 -11254 429388.889 1147122.222 -11255 429391.667 754613.889 -11256 429391.667 840294.444 -11257 429405.556 879958.333 -11258 429411.111 856100.000 -11259 429413.889 832891.667 -11260 429441.667 1128375.000 -11261 429461.111 831238.889 -11262 429469.444 764294.444 -11263 429477.778 743708.333 -11264 429511.111 1233630.556 -11265 429522.222 775905.556 -11266 429527.778 925361.111 -11267 429544.444 743769.444 -11268 429550.000 1153000.000 -11269 429552.778 742855.556 -11270 429558.333 772211.111 -11271 429569.444 944408.333 -11272 429572.222 838305.556 -11273 429575.000 770577.778 -11274 429575.000 916305.556 -11275 429583.333 742333.333 -11276 429597.222 878613.889 -11277 429600.000 784058.333 -11278 429602.778 901300.000 -11279 429613.889 880125.000 -11280 429616.667 771402.778 -11281 429627.778 918080.556 -11282 429638.889 787380.556 -11283 429644.444 825230.556 -11284 429647.222 786777.778 -11285 429652.778 921994.444 -11286 429658.333 788702.778 -11287 429697.222 772305.556 -11288 429708.333 824250.000 -11289 429716.667 904330.556 -11290 429730.556 778530.556 -11291 429741.667 954972.222 -11292 429744.444 741513.889 -11293 429747.222 963180.556 -11294 429763.889 881083.333 -11295 429783.333 779844.444 -11296 429791.667 956877.778 -11297 429813.889 709483.333 -11298 429819.444 841177.778 -11299 429819.444 849469.444 -11300 429825.000 774091.667 -11301 429827.778 763408.333 -11302 429836.111 906552.778 -11303 429852.778 931916.667 -11304 429855.556 839283.333 -11305 429872.222 850711.111 -11306 429875.000 960102.778 -11307 429908.333 895330.556 -11308 429933.333 978625.000 -11309 429955.556 714552.778 -11310 429958.333 849425.000 -11311 429958.333 964850.000 -11312 429977.778 841766.667 -11313 429980.556 781877.778 -11314 430008.333 738494.444 -11315 430013.889 857680.556 -11316 430016.667 847397.222 -11317 430019.444 759772.222 -11318 430022.222 899902.778 -11319 430036.111 890163.889 -11320 430036.111 916522.222 -11321 430044.444 883766.667 -11322 430050.000 980594.444 -11323 430055.556 888072.222 -11324 430058.333 843716.667 -11325 430066.667 743680.556 -11326 430069.444 936027.778 -11327 430072.222 960580.556 -11328 430077.778 842847.222 -11329 430086.111 897383.333 -11330 430105.556 786377.778 -11331 430113.889 750044.444 -11332 430116.667 882313.889 -11333 430125.000 829280.556 -11334 430125.000 836875.000 -11335 430125.000 879725.000 -11336 430125.000 892897.222 -11337 430141.667 884725.000 -11338 430150.000 750358.333 -11339 430155.556 898952.778 -11340 430166.667 880069.444 -11341 430183.333 911825.000 -11342 430202.778 788805.556 -11343 430202.778 1232919.444 -11344 430208.333 784955.556 -11345 430213.889 966305.556 -11346 430247.222 830777.778 -11347 430250.000 1083794.444 -11348 430255.556 749863.889 -11349 430255.556 1025558.333 -11350 430258.333 777455.556 -11351 430280.556 733816.667 -11352 430297.222 760047.222 -11353 430333.333 710747.222 -11354 430344.444 764483.333 -11355 430344.444 766241.667 -11356 430347.222 835180.556 -11357 430361.111 711838.889 -11358 430386.111 788644.444 -11359 430386.111 856700.000 -11360 430388.889 750708.333 -11361 430388.889 879063.889 -11362 430391.667 763044.444 -11363 430430.556 880788.889 -11364 430433.333 748600.000 -11365 430444.444 911780.556 -11366 430450.000 758669.444 -11367 430466.667 770955.556 -11368 430466.667 903797.222 -11369 430472.222 762388.889 -11370 430475.000 762208.333 -11371 430480.556 761477.778 -11372 430483.333 753788.889 -11373 430486.111 765630.556 -11374 430494.444 880075.000 -11375 430513.889 833188.889 -11376 430516.667 911411.111 -11377 430516.667 913891.667 -11378 430519.444 890755.556 -11379 430522.222 929483.333 -11380 430527.778 743441.667 -11381 430580.556 762077.778 -11382 430586.111 741969.444 -11383 430591.667 923175.000 -11384 430605.556 881063.889 -11385 430608.333 884036.111 -11386 430619.444 944266.667 -11387 430622.222 893338.889 -11388 430630.556 838511.111 -11389 430630.556 862283.333 -11390 430638.889 772336.111 -11391 430638.889 859347.222 -11392 430641.667 769905.556 -11393 430650.000 1241377.778 -11394 430652.778 760788.889 -11395 430652.778 764733.333 -11396 430655.556 952836.111 -11397 430658.333 782700.000 -11398 430663.889 926722.222 -11399 430691.667 772991.667 -11400 430700.000 942327.778 -11401 430705.556 921500.000 -11402 430716.667 707630.556 -11403 430719.444 959041.667 -11404 430730.556 894011.111 -11405 430733.333 752880.556 -11406 430736.111 755986.111 -11407 430747.222 731544.444 -11408 430752.778 757072.222 -11409 430761.111 760011.111 -11410 430761.111 887741.667 -11411 430761.111 891994.444 -11412 430769.444 861969.444 -11413 430772.222 781872.222 -11414 430775.000 894455.556 -11415 430794.444 755397.222 -11416 430794.444 757511.111 -11417 430797.222 961752.778 -11418 430797.222 982927.778 -11419 430805.556 882611.111 -11420 430805.556 967733.333 -11421 430813.889 889116.667 -11422 430825.000 756338.889 -11423 430830.556 737850.000 -11424 430830.556 971602.778 -11425 430841.667 768697.222 -11426 430844.444 862202.778 -11427 430847.222 915680.556 -11428 430852.778 779425.000 -11429 430852.778 908830.556 -11430 430858.333 706975.000 -11431 430869.444 956269.444 -11432 430880.556 707366.667 -11433 430883.333 939900.000 -11434 430886.111 843869.444 -11435 430891.667 878875.000 -11436 430905.556 734991.667 -11437 430905.556 775152.778 -11438 430922.222 753800.000 -11439 430925.000 756516.667 -11440 430944.444 790569.444 -11441 430966.667 714655.556 -11442 430972.222 895041.667 -11443 430977.778 761455.556 -11444 430977.778 852288.889 -11445 430977.778 884022.222 -11446 430977.778 938016.667 -11447 430986.111 774422.222 -11448 431000.000 735822.222 -11449 431008.333 747733.333 -11450 431008.333 752330.556 -11451 431025.000 936016.667 -11452 431044.444 742652.778 -11453 431044.444 884591.667 -11454 431047.222 846919.444 -11455 431050.000 883419.444 -11456 431052.778 752916.667 -11457 431058.333 880694.444 -11458 431063.889 762180.556 -11459 431080.556 707780.556 -11460 431086.111 774877.778 -11461 431116.667 883922.222 -11462 431116.667 884991.667 -11463 431127.778 752713.889 -11464 431127.778 946827.778 -11465 431133.333 879000.000 -11466 431144.444 896555.556 -11467 431152.778 761461.111 -11468 431166.667 839700.000 -11469 431183.333 893794.444 -11470 431186.111 836950.000 -11471 431191.667 1244072.222 -11472 431194.444 969611.111 -11473 431200.000 855600.000 -11474 431219.444 752919.444 -11475 431225.000 1234113.889 -11476 431263.889 934775.000 -11477 431291.667 948988.889 -11478 431305.556 714536.111 -11479 431319.444 861547.222 -11480 431330.556 1156902.778 -11481 431333.333 724444.444 -11482 431338.889 709269.444 -11483 431338.889 882219.444 -11484 431344.444 907052.778 -11485 431347.222 761302.778 -11486 431372.222 897466.667 -11487 431377.778 725102.778 -11488 431380.556 755711.111 -11489 431413.889 951441.667 -11490 431427.778 930041.667 -11491 431433.333 771894.444 -11492 431461.111 881661.111 -11493 431463.889 917644.444 -11494 431466.667 883066.667 -11495 431497.222 977172.222 -11496 431500.000 786969.444 -11497 431536.111 932008.333 -11498 431547.222 776158.333 -11499 431563.889 985411.111 -11500 431566.667 834105.556 -11501 431572.222 753330.556 -11502 431575.000 879016.667 -11503 431586.111 763330.556 -11504 431600.000 953272.222 -11505 431605.556 1233666.667 -11506 431608.333 857100.000 -11507 431633.333 879644.444 -11508 431636.111 730727.778 -11509 431661.111 835244.444 -11510 431683.333 890666.667 -11511 431688.889 862638.889 -11512 431702.778 970811.111 -11513 431705.556 786905.556 -11514 431722.222 733280.556 -11515 431725.000 790361.111 -11516 431725.000 1017322.222 -11517 431741.667 879241.667 -11518 431752.778 900677.778 -11519 431766.667 838927.778 -11520 431766.667 897947.222 -11521 431769.444 730575.000 -11522 431769.444 848463.889 -11523 431772.222 1241863.889 -11524 431775.000 837341.667 -11525 431775.000 852527.778 -11526 431788.889 881172.222 -11527 431797.222 718227.778 -11528 431800.000 954766.667 -11529 431805.556 879005.556 -11530 431811.111 958558.333 -11531 431816.667 956552.778 -11532 431819.444 903244.444 -11533 431825.000 992916.667 -11534 431836.111 892136.111 -11535 431836.111 918638.889 -11536 431838.889 889883.333 -11537 431847.222 841150.000 -11538 431850.000 904430.556 -11539 431863.889 778041.667 -11540 431866.667 844744.444 -11541 431886.111 961333.333 -11542 431905.556 1123441.667 -11543 431911.111 960055.556 -11544 431919.444 894555.556 -11545 431947.222 887288.889 -11546 431972.222 766547.222 -11547 431975.000 942194.444 -11548 431977.778 708741.667 -11549 431991.667 785763.889 -11550 432011.111 862388.889 -11551 432052.778 962947.222 -11552 432080.556 715380.556 -11553 432097.222 776933.333 -11554 432122.222 774302.778 -11555 432122.222 829897.222 -11556 432122.222 850736.111 -11557 432136.111 779394.444 -11558 432166.667 1233405.556 -11559 432200.000 783872.222 -11560 432200.000 857511.111 -11561 432205.556 768152.778 -11562 432219.444 717144.444 -11563 432233.333 855513.889 -11564 432238.889 771863.889 -11565 432255.556 750616.667 -11566 432255.556 979655.556 -11567 432263.889 780269.444 -11568 432294.444 831966.667 -11569 432311.111 763011.111 -11570 432322.222 994300.000 -11571 432341.667 862483.333 -11572 432344.444 708100.000 -11573 432358.333 1081097.222 -11574 432361.111 708208.333 -11575 432363.889 879844.444 -11576 432369.444 940411.111 -11577 432375.000 879786.111 -11578 432377.778 770616.667 -11579 432377.778 947511.111 -11580 432380.556 761411.111 -11581 432386.111 724250.000 -11582 432386.111 789100.000 -11583 432397.222 975775.000 -11584 432402.778 758841.667 -11585 432416.667 752572.222 -11586 432444.444 738327.778 -11587 432463.889 781938.889 -11588 432466.667 924358.333 -11589 432472.222 767238.889 -11590 432472.222 790502.778 -11591 432477.778 760005.556 -11592 432488.889 705997.222 -11593 432505.556 895013.889 -11594 432508.333 837941.667 -11595 432547.222 861097.222 -11596 432561.111 862675.000 -11597 432586.111 828175.000 -11598 432616.667 708658.333 -11599 432625.000 936369.444 -11600 432658.333 708650.000 -11601 432669.444 735850.000 -11602 432680.556 825308.333 -11603 432694.444 914755.556 -11604 432708.333 897219.444 -11605 432716.667 769894.444 -11606 432755.556 826211.111 -11607 432788.889 900436.111 -11608 432794.444 962325.000 -11609 432813.889 835297.222 -11610 432841.667 928108.333 -11611 432866.667 761463.889 -11612 432866.667 787105.556 -11613 432869.444 897238.889 -11614 432872.222 932019.444 -11615 432880.556 777936.111 -11616 432916.667 846075.000 -11617 432925.000 850813.889 -11618 432927.778 942177.778 -11619 432947.222 945113.889 -11620 432966.667 879875.000 -11621 432983.333 724827.778 -11622 432991.667 736355.556 -11623 433000.000 736844.444 -11624 433005.556 735863.889 -11625 433008.333 965925.000 -11626 433011.111 1038250.000 -11627 433033.333 917855.556 -11628 433036.111 707338.889 -11629 433044.444 709761.111 -11630 433050.000 888447.222 -11631 433058.333 713247.222 -11632 433058.333 1006577.778 -11633 433072.222 964316.667 -11634 433094.444 736444.444 -11635 433097.222 788263.889 -11636 433102.778 885180.556 -11637 433138.889 895263.889 -11638 433175.000 908447.222 -11639 433177.778 883788.889 -11640 433186.111 983463.889 -11641 433197.222 879533.333 -11642 433211.111 765791.667 -11643 433227.778 764175.000 -11644 433238.889 881666.667 -11645 433247.222 951497.222 -11646 433266.667 783891.667 -11647 433269.444 751872.222 -11648 433269.444 830802.778 -11649 433300.000 785550.000 -11650 433316.667 837380.556 -11651 433336.111 882861.111 -11652 433344.444 757483.333 -11653 433347.222 903866.667 -11654 433361.111 858108.333 -11655 433369.444 833525.000 -11656 433377.778 787150.000 -11657 433380.556 890152.778 -11658 433438.889 960019.444 -11659 433525.000 974369.444 -11660 433541.667 968916.667 -11661 433561.111 1242036.111 -11662 433616.667 704772.222 -11663 433622.222 912163.889 -11664 433636.111 1241916.667 -11665 433638.889 925538.889 -11666 433652.778 721738.889 -11667 433680.556 1242158.333 -11668 433713.889 937733.333 -11669 433719.444 835833.333 -11670 433766.667 723472.222 -11671 433766.667 998586.111 -11672 433788.889 846597.222 -11673 433813.889 921138.889 -11674 433813.889 1121225.000 -11675 433816.667 879405.556 -11676 433838.889 705452.778 -11677 433844.444 890450.000 -11678 433858.333 939463.889 -11679 433863.889 951480.556 -11680 433869.444 988441.667 -11681 433872.222 878755.556 -11682 433897.222 710655.556 -11683 433902.778 894027.778 -11684 433902.778 1233113.889 -11685 433952.778 907741.667 -11686 433955.556 854677.778 -11687 433958.333 727011.111 -11688 433961.111 944780.556 -11689 433975.000 971361.111 -11690 433980.556 764777.778 -11691 433988.889 979833.333 -11692 433991.667 957516.667 -11693 433997.222 885325.000 -11694 434016.667 948325.000 -11695 434055.556 887050.000 -11696 434061.111 761261.111 -11697 434066.667 1242230.556 -11698 434077.778 732600.000 -11699 434080.556 844750.000 -11700 434080.556 850386.111 -11701 434097.222 843288.889 -11702 434100.000 863486.111 -11703 434113.889 1062794.444 -11704 434130.556 1062488.889 -11705 434138.889 719855.556 -11706 434141.667 734880.556 -11707 434147.222 842305.556 -11708 434161.111 955344.444 -11709 434166.667 863569.444 -11710 434194.444 839508.333 -11711 434194.444 935330.556 -11712 434197.222 858000.000 -11713 434202.778 828297.222 -11714 434222.222 951019.444 -11715 434222.222 1232972.222 -11716 434230.556 972602.778 -11717 434252.778 881833.333 -11718 434252.778 984069.444 -11719 434261.111 737127.778 -11720 434269.444 826713.889 -11721 434272.222 961755.556 -11722 434308.333 825425.000 -11723 434313.889 966969.444 -11724 434316.667 880463.889 -11725 434316.667 1034738.889 -11726 434361.111 927822.222 -11727 434391.667 707747.222 -11728 434441.667 716477.778 -11729 434441.667 932208.333 -11730 434463.889 968355.556 -11731 434477.778 892397.222 -11732 434505.556 836963.889 -11733 434513.889 886311.111 -11734 434536.111 964338.889 -11735 434552.778 765108.333 -11736 434555.556 953205.556 -11737 434577.778 888372.222 -11738 434586.111 839302.778 -11739 434594.444 762291.667 -11740 434597.222 898683.333 -11741 434636.111 1142597.222 -11742 434666.667 707941.667 -11743 434666.667 1120333.333 -11744 434675.000 859419.444 -11745 434697.222 1119658.333 -11746 434705.556 879505.556 -11747 434711.111 897441.667 -11748 434716.667 729777.778 -11749 434744.444 897702.778 -11750 434763.889 839205.556 -11751 434800.000 1107616.667 -11752 434836.111 753369.444 -11753 434908.333 854438.889 -11754 434911.111 833969.444 -11755 434919.444 1164191.667 -11756 434925.000 704538.889 -11757 434941.667 885447.222 -11758 434958.333 893083.333 -11759 434966.667 737766.667 -11760 434966.667 912894.444 -11761 434997.222 878502.778 -11762 435008.333 704433.333 -11763 435050.000 940877.778 -11764 435052.778 929438.889 -11765 435061.111 906680.556 -11766 435072.222 863475.000 -11767 435097.222 925036.111 -11768 435169.444 732366.667 -11769 435172.222 703780.556 -11770 435172.222 884511.111 -11771 435180.556 960180.556 -11772 435197.222 1143144.444 -11773 435205.556 917694.444 -11774 435208.333 882288.889 -11775 435236.111 835433.333 -11776 435244.444 846947.222 -11777 435250.000 841227.778 -11778 435263.889 1119322.222 -11779 435266.667 827352.778 -11780 435277.778 714708.333 -11781 435280.556 963583.333 -11782 435325.000 900025.000 -11783 435336.111 946313.889 -11784 435336.111 1096297.222 -11785 435363.889 937119.444 -11786 435377.778 893000.000 -11787 435391.667 890066.667 -11788 435391.667 894625.000 -11789 435408.333 1165625.000 -11790 435422.222 891072.222 -11791 435455.556 1168122.222 -11792 435500.000 967000.000 -11793 435502.778 857719.444 -11794 435516.667 975072.222 -11795 435522.222 879616.667 -11796 435552.778 920100.000 -11797 435555.556 734041.667 -11798 435569.444 908886.111 -11799 435591.667 863455.556 -11800 435611.111 916358.333 -11801 435641.667 1190800.000 -11802 435652.778 927191.667 -11803 435655.556 889063.889 -11804 435669.444 761280.556 -11805 435680.556 835141.667 -11806 435680.556 1007450.000 -11807 435688.889 860394.444 -11808 435697.222 878233.333 -11809 435725.000 932811.111 -11810 435758.333 1241738.889 -11811 435780.556 703222.222 -11812 435825.000 964675.000 -11813 435830.556 753455.556 -11814 435838.889 712077.778 -11815 435863.889 1190530.556 -11816 435911.111 717372.222 -11817 435913.889 884436.111 -11818 435930.556 730455.556 -11819 435944.444 838888.889 -11820 435947.222 732661.111 -11821 435963.889 1119630.556 -11822 435977.778 882788.889 -11823 435977.778 972902.778 -11824 435986.111 1232822.222 -11825 436008.333 831747.222 -11826 436011.111 897936.111 -11827 436033.333 840697.222 -11828 436086.111 863638.889 -11829 436105.556 729730.556 -11830 436122.222 1163905.556 -11831 436152.778 838419.444 -11832 436155.556 842472.222 -11833 436177.778 1169327.778 -11834 436191.667 879519.444 -11835 436200.000 955961.111 -11836 436208.333 949883.333 -11837 436222.222 1162372.222 -11838 436227.778 877944.444 -11839 436230.556 969422.222 -11840 436241.667 725188.889 -11841 436252.778 753675.000 -11842 436275.000 897708.333 -11843 436319.444 1117727.778 -11844 436333.333 887294.444 -11845 436347.222 914966.667 -11846 436350.000 959325.000 -11847 436366.667 1132994.444 -11848 436375.000 941019.444 -11849 436405.556 721444.444 -11850 436413.889 702413.889 -11851 436422.222 722522.222 -11852 436433.333 760688.889 -11853 436441.667 760863.889 -11854 436461.111 1082113.889 -11855 436480.556 933680.556 -11856 436488.889 723197.222 -11857 436522.222 903438.889 -11858 436522.222 944608.333 -11859 436522.222 947266.667 -11860 436527.778 902233.333 -11861 436536.111 834661.111 -11862 436536.111 977825.000 -11863 436541.667 962125.000 -11864 436569.444 908541.667 -11865 436575.000 715008.333 -11866 436583.333 880069.444 -11867 436588.889 1233175.000 -11868 436613.889 702558.333 -11869 436619.444 912183.333 -11870 436630.556 1166863.889 -11871 436647.222 968105.556 -11872 436666.667 929744.444 -11873 436669.444 946191.667 -11874 436702.778 920830.556 -11875 436702.778 935758.333 -11876 436713.889 1168152.778 -11877 436725.000 1119141.667 -11878 436727.778 723091.667 -11879 436727.778 843805.556 -11880 436766.667 1169108.333 -11881 436769.444 703716.667 -11882 436775.000 951713.889 -11883 436794.444 704447.222 -11884 436808.333 1143627.778 -11885 436861.111 885463.889 -11886 436869.444 923888.889 -11887 436936.111 883608.333 -11888 436952.778 716311.111 -11889 436958.333 1120097.222 -11890 436972.222 1143508.333 -11891 436980.556 854836.111 -11892 436983.333 863638.889 -11893 436986.111 954683.333 -11894 437022.222 722900.000 -11895 437022.222 910130.556 -11896 437025.000 1240955.556 -11897 437058.333 925719.444 -11898 437066.667 730286.111 -11899 437069.444 1166191.667 -11900 437072.222 889900.000 -11901 437094.444 980294.444 -11902 437097.222 929694.444 -11903 437100.000 749747.222 -11904 437100.000 829316.667 -11905 437155.556 984847.222 -11906 437175.000 965025.000 -11907 437208.333 919766.667 -11908 437208.333 1119891.667 -11909 437233.333 1111105.556 -11910 437241.667 973886.111 -11911 437291.667 878105.556 -11912 437322.222 834511.111 -11913 437347.222 702083.333 -11914 437352.778 887811.111 -11915 437402.778 928691.667 -11916 437408.333 902722.222 -11917 437419.444 907791.667 -11918 437461.111 937286.111 -11919 437466.667 989580.556 -11920 437466.667 1224605.556 -11921 437486.111 879769.444 -11922 437508.333 877144.444 -11923 437566.667 845858.333 -11924 437569.444 716886.111 -11925 437594.444 913463.889 -11926 437613.889 967400.000 -11927 437622.222 947069.444 -11928 437633.333 915683.333 -11929 437638.889 933288.889 -11930 437666.667 1035983.333 -11931 437677.778 941655.556 -11932 437730.556 884469.444 -11933 437816.667 864330.556 -11934 437852.778 1169422.222 -11935 437861.111 969272.222 -11936 437866.667 754922.222 -11937 437913.889 893197.222 -11938 437950.000 953200.000 -11939 437963.889 702594.444 -11940 437972.222 900772.222 -11941 437977.778 1230583.333 -11942 437980.556 730880.556 -11943 438005.556 701872.222 -11944 438013.889 912394.444 -11945 438019.444 830008.333 -11946 438066.667 917913.889 -11947 438077.778 886747.222 -11948 438083.333 917527.778 -11949 438108.333 993302.778 -11950 438113.889 884833.333 -11951 438194.444 831808.333 -11952 438194.444 847686.111 -11953 438261.111 967058.333 -11954 438261.111 1117888.889 -11955 438263.889 882461.111 -11956 438277.778 944369.444 -11957 438300.000 832700.000 -11958 438305.556 906213.889 -11959 438333.333 726344.444 -11960 438333.333 880177.778 -11961 438338.889 878200.000 -11962 438338.889 1015094.444 -11963 438341.667 704388.889 -11964 438350.000 848669.444 -11965 438419.444 938316.667 -11966 438422.222 888358.333 -11967 438441.667 889600.000 -11968 438447.222 826513.889 -11969 438455.556 921888.889 -11970 438486.111 734238.889 -11971 438500.000 963983.333 -11972 438508.333 891216.667 -11973 438522.222 696286.111 -11974 438536.111 839650.000 -11975 438547.222 1042044.444 -11976 438555.556 924883.333 -11977 438569.444 701036.111 -11978 438600.000 760058.333 -11979 438663.889 951166.667 -11980 438666.667 930508.333 -11981 438705.556 956000.000 -11982 438725.000 961283.333 -11983 438727.778 933011.111 -11984 438730.556 1117475.000 -11985 438736.111 1164983.333 -11986 438750.000 855100.000 -11987 438769.444 1169938.889 -11988 438791.667 901652.778 -11989 438822.222 844847.222 -11990 438836.111 894933.333 -11991 438844.444 912350.000 -11992 438866.667 1116769.444 -11993 438880.556 941563.889 -11994 438883.333 1007125.000 -11995 438905.556 928475.000 -11996 438930.556 909902.778 -11997 438933.333 756738.889 -11998 438938.889 934936.111 -11999 438958.333 753927.778 -12000 438991.667 910811.111 -12001 439005.556 852580.556 -12002 439011.111 858516.667 -12003 439097.222 1000583.333 -12004 439105.556 698211.111 -12005 439125.000 880355.556 -12006 439144.444 699658.333 -12007 439147.222 1136125.000 -12008 439147.222 1161969.444 -12009 439150.000 877472.222 -12010 439180.556 1230233.333 -12011 439186.111 1227825.000 -12012 439225.000 902713.889 -12013 439250.000 726663.889 -12014 439275.000 699763.889 -12015 439288.889 939558.333 -12016 439325.000 1035747.222 -12017 439388.889 949294.444 -12018 439394.444 829969.444 -12019 439411.111 832713.889 -12020 439441.667 908127.778 -12021 439461.111 761194.444 -12022 439500.000 880841.667 -12023 439547.222 862800.000 -12024 439552.778 864525.000 -12025 439583.333 947944.444 -12026 439633.333 912561.111 -12027 439680.556 889433.333 -12028 439700.000 1168180.556 -12029 439705.556 898166.667 -12030 439741.667 756155.556 -12031 439747.222 759111.111 -12032 439780.556 756097.222 -12033 439786.111 905038.889 -12034 439791.667 711208.333 -12035 439808.333 844863.889 -12036 439822.222 1172372.222 -12037 439825.000 968141.667 -12038 439827.778 1240986.111 -12039 439830.556 839588.889 -12040 439844.444 918691.667 -12041 439877.778 957555.556 -12042 439883.333 922283.333 -12043 439925.000 721294.444 -12044 439925.000 1022411.111 -12045 439961.111 700611.111 -12046 440005.556 963172.222 -12047 440011.111 759666.667 -12048 440047.222 940655.556 -12049 440055.556 914419.444 -12050 440061.111 971136.111 -12051 440077.778 760447.222 -12052 440077.778 1169155.556 -12053 440108.333 975263.889 -12054 440125.000 757947.222 -12055 440152.778 731677.778 -12056 440163.889 709811.111 -12057 440169.444 1079547.222 -12058 440191.667 847994.444 -12059 440216.667 924697.222 -12060 440247.222 885425.000 -12061 440261.111 900738.889 -12062 440266.667 1169619.444 -12063 440275.000 917697.222 -12064 440280.556 928544.444 -12065 440288.889 881627.778 -12066 440300.000 927505.556 -12067 440327.778 926452.778 -12068 440394.444 887441.667 -12069 440394.444 1016647.222 -12070 440419.444 890983.333 -12071 440422.222 954358.333 -12072 440444.444 929975.000 -12073 440461.111 829941.667 -12074 440463.889 1230208.333 -12075 440483.333 734602.778 -12076 440486.111 836958.333 -12077 440488.889 1233497.222 -12078 440494.444 965950.000 -12079 440500.000 916391.667 -12080 440508.333 944180.556 -12081 440522.222 1230855.556 -12082 440536.111 711288.889 -12083 440536.111 982752.778 -12084 440547.222 707133.333 -12085 440583.333 1213141.667 -12086 440625.000 916955.556 -12087 440661.111 878841.667 -12088 440669.444 761305.556 -12089 440691.667 927555.556 -12090 440716.667 882988.889 -12091 440716.667 1114475.000 -12092 440747.222 892877.778 -12093 440758.333 885250.000 -12094 440777.778 935072.222 -12095 440783.333 1169327.778 -12096 440788.889 691822.222 -12097 440791.667 985691.667 -12098 440805.556 1032305.556 -12099 440816.667 913488.889 -12100 440838.889 932258.333 -12101 440872.222 697994.444 -12102 440880.556 758075.000 -12103 440886.111 876575.000 -12104 440952.778 693761.111 -12105 440977.778 702316.667 -12106 440977.778 918166.667 -12107 440997.222 1046275.000 -12108 441002.778 702152.778 -12109 441025.000 851469.444 -12110 441036.111 691094.444 -12111 441036.111 1231300.000 -12112 441058.333 942186.111 -12113 441102.778 949044.444 -12114 441108.333 887125.000 -12115 441116.667 703922.222 -12116 441125.000 1030677.778 -12117 441161.111 937077.778 -12118 441197.222 701080.556 -12119 441277.778 763333.333 -12120 441302.778 922513.889 -12121 441305.556 909980.556 -12122 441319.444 917186.111 -12123 441333.333 730794.444 -12124 441372.222 1230652.778 -12125 441402.778 881638.889 -12126 441447.222 878213.889 -12127 441511.111 726569.444 -12128 441511.111 1033075.000 -12129 441522.222 720377.778 -12130 441536.111 879566.667 -12131 441536.111 928994.444 -12132 441538.889 875691.667 -12133 441544.444 757091.667 -12134 441572.222 1088708.333 -12135 441597.222 750319.444 -12136 441636.111 939991.667 -12137 441650.000 921713.889 -12138 441650.000 938811.111 -12139 441661.111 925347.222 -12140 441672.222 732544.444 -12141 441733.333 940336.111 -12142 441741.667 932461.111 -12143 441769.444 725061.111 -12144 441772.222 880641.667 -12145 441838.889 734361.111 -12146 441858.333 884625.000 -12147 441936.111 852133.333 -12148 441969.444 725025.000 -12149 441991.667 756072.222 -12150 441994.444 877213.889 -12151 442013.889 926461.111 -12152 442022.222 884463.889 -12153 442044.444 938152.778 -12154 442097.222 690652.778 -12155 442097.222 951283.333 -12156 442133.333 719113.889 -12157 442138.889 705452.778 -12158 442138.889 894922.222 -12159 442152.778 757975.000 -12160 442188.889 935677.778 -12161 442194.444 1232044.444 -12162 442230.556 954691.667 -12163 442236.111 705138.889 -12164 442272.222 934444.444 -12165 442275.000 918350.000 -12166 442300.000 697758.333 -12167 442302.778 697672.222 -12168 442311.111 952638.889 -12169 442333.333 956188.889 -12170 442333.333 958719.444 -12171 442361.111 964808.333 -12172 442388.889 949755.556 -12173 442391.667 876411.111 -12174 442394.444 760861.111 -12175 442444.444 697719.444 -12176 442444.444 862961.111 -12177 442444.444 863241.667 -12178 442511.111 1169683.333 -12179 442519.444 854011.111 -12180 442527.778 915013.889 -12181 442597.222 888647.222 -12182 442600.000 725758.333 -12183 442611.111 962872.222 -12184 442619.444 884152.778 -12185 442633.333 1049497.222 -12186 442658.333 883141.667 -12187 442694.444 835147.222 -12188 442722.222 883388.889 -12189 442722.222 929852.778 -12190 442727.778 1211727.778 -12191 442730.556 925447.222 -12192 442741.667 1231694.444 -12193 442761.111 941872.222 -12194 442763.889 842386.111 -12195 442780.556 724269.444 -12196 442780.556 882719.444 -12197 442783.333 961344.444 -12198 442794.444 739802.778 -12199 442794.444 834902.778 -12200 442797.222 683255.556 -12201 442800.000 883183.333 -12202 442841.667 966852.778 -12203 442858.333 697913.889 -12204 442911.111 1055016.667 -12205 442911.111 1215480.556 -12206 442925.000 939647.222 -12207 442941.667 926688.889 -12208 442944.444 912350.000 -12209 442947.222 908513.889 -12210 442950.000 932686.111 -12211 442972.222 947238.889 -12212 443044.444 927902.778 -12213 443050.000 699775.000 -12214 443061.111 717705.556 -12215 443105.556 697800.000 -12216 443113.889 967980.556 -12217 443125.000 899041.667 -12218 443125.000 944602.778 -12219 443147.222 847647.222 -12220 443200.000 919147.222 -12221 443213.889 889336.111 -12222 443236.111 969261.111 -12223 443244.444 752513.889 -12224 443255.556 938375.000 -12225 443258.333 881627.778 -12226 443294.444 741316.667 -12227 443347.222 886380.556 -12228 443352.778 852150.000 -12229 443358.333 759180.556 -12230 443366.667 754633.333 -12231 443377.778 727566.667 -12232 443477.778 878272.222 -12233 443483.333 1066983.333 -12234 443508.333 898652.778 -12235 443513.889 1172655.556 -12236 443522.222 1037647.222 -12237 443536.111 1003733.333 -12238 443569.444 914202.778 -12239 443580.556 890858.333 -12240 443633.333 982138.889 -12241 443636.111 862050.000 -12242 443636.111 973769.444 -12243 443644.444 971327.778 -12244 443675.000 913163.889 -12245 443683.333 1003505.556 -12246 443730.556 716105.556 -12247 443766.667 1037291.667 -12248 443800.000 1080383.333 -12249 443836.111 898172.222 -12250 443838.889 920327.778 -12251 443841.667 1231086.111 -12252 443875.000 682044.444 -12253 443875.000 975500.000 -12254 443877.778 711736.111 -12255 443894.444 937300.000 -12256 443897.222 1189491.667 -12257 443927.778 887397.222 -12258 443936.111 1229836.111 -12259 443977.778 1227350.000 -12260 444005.556 926236.111 -12261 444019.444 952555.556 -12262 444052.778 729933.333 -12263 444063.889 1043752.778 -12264 444077.778 740875.000 -12265 444097.222 1035086.111 -12266 444108.333 833322.222 -12267 444108.333 853988.889 -12268 444161.111 1189519.444 -12269 444169.444 949252.778 -12270 444177.778 1191125.000 -12271 444202.778 833308.333 -12272 444213.889 841166.667 -12273 444238.889 897802.778 -12274 444258.333 690069.444 -12275 444269.444 1240675.000 -12276 444388.889 935811.111 -12277 444391.667 901244.444 -12278 444411.111 921477.778 -12279 444447.222 885788.889 -12280 444466.667 943950.000 -12281 444469.444 957880.556 -12282 444488.889 880602.778 -12283 444494.444 922666.667 -12284 444508.333 892847.222 -12285 444511.111 908411.111 -12286 444563.889 895438.889 -12287 444583.333 689247.222 -12288 444583.333 875030.556 -12289 444583.333 931613.889 -12290 444611.111 1036380.556 -12291 444633.333 962469.444 -12292 444633.333 1187088.889 -12293 444644.444 889197.222 -12294 444652.778 726850.000 -12295 444669.444 731713.889 -12296 444686.111 711855.556 -12297 444752.778 701886.111 -12298 444758.333 732125.000 -12299 444775.000 884505.556 -12300 444802.778 934283.333 -12301 444813.889 702000.000 -12302 444822.222 899638.889 -12303 444888.889 715697.222 -12304 444891.667 1080555.556 -12305 444905.556 731113.889 -12306 444908.333 1038588.889 -12307 444913.889 731861.111 -12308 444936.111 895586.111 -12309 444983.333 845919.444 -12310 445047.222 723686.111 -12311 445047.222 1142308.333 -12312 445050.000 734805.556 -12313 445069.444 929052.778 -12314 445072.222 964238.889 -12315 445080.556 891305.556 -12316 445150.000 883302.778 -12317 445163.889 1160408.333 -12318 445183.333 989880.556 -12319 445191.667 880197.222 -12320 445194.444 895458.333 -12321 445213.889 994411.111 -12322 445236.111 895744.444 -12323 445258.333 1212119.444 -12324 445263.889 1090558.333 -12325 445283.333 939075.000 -12326 445291.667 947205.556 -12327 445327.778 675988.889 -12328 445336.111 720036.111 -12329 445338.889 704563.889 -12330 445338.889 945261.111 -12331 445366.667 1229058.333 -12332 445386.111 877038.889 -12333 445394.444 951166.667 -12334 445402.778 697225.000 -12335 445402.778 1233663.889 -12336 445430.556 943661.111 -12337 445433.333 684200.000 -12338 445433.333 935758.333 -12339 445469.444 696216.667 -12340 445497.222 913925.000 -12341 445513.889 949841.667 -12342 445519.444 696322.222 -12343 445530.556 942202.778 -12344 445536.111 705513.889 -12345 445600.000 905961.111 -12346 445608.333 705458.333 -12347 445616.667 725988.889 -12348 445625.000 925336.111 -12349 445647.222 1232608.333 -12350 445677.778 916708.333 -12351 445722.222 912272.222 -12352 445736.111 687961.111 -12353 445747.222 969019.444 -12354 445758.333 914700.000 -12355 445855.556 924502.778 -12356 445883.333 695991.667 -12357 445908.333 897672.222 -12358 445927.778 702286.111 -12359 445955.556 751694.444 -12360 445986.111 715116.667 -12361 446002.778 909627.778 -12362 446083.333 940802.778 -12363 446088.889 874325.000 -12364 446088.889 956738.889 -12365 446180.556 754075.000 -12366 446194.444 862263.889 -12367 446205.556 887622.222 -12368 446216.667 1239372.222 -12369 446227.778 937683.333 -12370 446263.889 919655.556 -12371 446269.444 900075.000 -12372 446277.778 893086.111 -12373 446291.667 921922.222 -12374 446336.111 862344.444 -12375 446336.111 1211283.333 -12376 446355.556 726808.333 -12377 446366.667 1231047.222 -12378 446369.444 1240522.222 -12379 446377.778 688455.556 -12380 446377.778 695036.111 -12381 446397.222 731108.333 -12382 446402.778 931433.333 -12383 446497.222 932425.000 -12384 446530.556 1231005.556 -12385 446563.889 832947.222 -12386 446613.889 847147.222 -12387 446622.222 1111033.333 -12388 446688.889 901716.667 -12389 446697.222 749816.667 -12390 446705.556 701516.667 -12391 446713.889 1038516.667 -12392 446722.222 882425.000 -12393 446802.778 911197.222 -12394 446811.111 1230602.778 -12395 446930.556 735625.000 -12396 446941.667 754866.667 -12397 446994.444 734533.333 -12398 447050.000 1228480.556 -12399 447080.556 1000594.444 -12400 447088.889 962761.111 -12401 447130.556 697911.111 -12402 447133.333 934225.000 -12403 447147.222 1034202.778 -12404 447150.000 674619.444 -12405 447197.222 1230091.667 -12406 447213.889 737241.667 -12407 447219.444 1239188.889 -12408 447227.778 970297.222 -12409 447300.000 1164372.222 -12410 447319.444 932175.000 -12411 447319.444 943500.000 -12412 447322.222 924872.222 -12413 447341.667 851758.333 -12414 447369.444 904958.333 -12415 447372.222 946166.667 -12416 447394.444 931255.556 -12417 447402.778 884447.222 -12418 447408.333 890630.556 -12419 447433.333 928522.222 -12420 447438.889 947152.778 -12421 447444.444 688375.000 -12422 447458.333 966805.556 -12423 447480.556 721766.667 -12424 447488.889 928019.444 -12425 447513.889 749947.222 -12426 447538.889 1087566.667 -12427 447541.667 1224769.444 -12428 447577.778 902966.667 -12429 447630.556 856205.556 -12430 447636.111 912769.444 -12431 447636.111 936255.556 -12432 447650.000 697197.222 -12433 447675.000 948952.778 -12434 447677.778 932775.000 -12435 447680.556 939272.222 -12436 447691.667 941513.889 -12437 447716.667 937811.111 -12438 447747.222 1226138.889 -12439 447763.889 949894.444 -12440 447783.333 1178283.333 -12441 447811.111 921458.333 -12442 447822.222 886088.889 -12443 447825.000 693838.889 -12444 447827.778 939133.333 -12445 447869.444 953513.889 -12446 447891.667 952113.889 -12447 447894.444 936019.444 -12448 447905.556 958083.333 -12449 447919.444 950969.444 -12450 447930.556 897030.556 -12451 447963.889 1085058.333 -12452 447966.667 687619.444 -12453 447972.222 1069555.556 -12454 447975.000 698802.778 -12455 447980.556 935266.667 -12456 448008.333 749913.889 -12457 448008.333 1227933.333 -12458 448011.111 687783.333 -12459 448011.111 900791.667 -12460 448047.222 914430.556 -12461 448086.111 1240619.444 -12462 448100.000 955452.778 -12463 448113.889 914983.333 -12464 448116.667 722036.111 -12465 448125.000 920713.889 -12466 448147.222 718808.333 -12467 448272.222 891694.444 -12468 448277.778 929436.111 -12469 448297.222 1227933.333 -12470 448302.778 745138.889 -12471 448341.667 873769.444 -12472 448352.778 692744.444 -12473 448375.000 1083888.889 -12474 448386.111 687058.333 -12475 448408.333 932980.556 -12476 448411.111 1228697.222 -12477 448433.333 1229516.667 -12478 448480.556 930425.000 -12479 448486.111 742952.778 -12480 448486.111 1232327.778 -12481 448508.333 937866.667 -12482 448513.889 1231855.556 -12483 448530.556 887880.556 -12484 448547.222 934705.556 -12485 448586.111 936613.889 -12486 448613.889 926236.111 -12487 448622.222 935305.556 -12488 448644.444 752044.444 -12489 448663.889 930002.778 -12490 448663.889 1234347.222 -12491 448730.556 916908.333 -12492 448738.889 881427.778 -12493 448752.778 1072616.667 -12494 448755.556 919191.667 -12495 448758.333 985183.333 -12496 448777.778 977327.778 -12497 448830.556 686725.000 -12498 448833.333 694480.556 -12499 448833.333 932827.778 -12500 448836.111 931380.556 -12501 448838.889 940413.889 -12502 448872.222 878644.444 -12503 448872.222 896200.000 -12504 448877.778 943694.444 -12505 448897.222 933497.222 -12506 448900.000 883072.222 -12507 448944.444 714963.889 -12508 448955.556 854163.889 -12509 448994.444 971147.222 -12510 449008.333 935888.889 -12511 449022.222 850608.333 -12512 449027.778 927833.333 -12513 449033.333 935661.111 -12514 449033.333 941952.778 -12515 449061.111 669905.556 -12516 449069.444 728069.444 -12517 449086.111 935927.778 -12518 449088.889 1071627.778 -12519 449097.222 896044.444 -12520 449100.000 903155.556 -12521 449111.111 1160977.778 -12522 449133.333 935030.556 -12523 449150.000 935530.556 -12524 449180.556 731247.222 -12525 449194.444 1233158.333 -12526 449250.000 934625.000 -12527 449263.889 913008.333 -12528 449272.222 899633.333 -12529 449280.556 748922.222 -12530 449297.222 935222.222 -12531 449327.778 960541.667 -12532 449338.889 951872.222 -12533 449341.667 686458.333 -12534 449352.778 936319.444 -12535 449361.111 946963.889 -12536 449363.889 722055.556 -12537 449366.667 936658.333 -12538 449369.444 913927.778 -12539 449397.222 935763.889 -12540 449425.000 957233.333 -12541 449430.556 1230338.889 -12542 449461.111 686444.444 -12543 449480.556 911505.556 -12544 449508.333 929763.889 -12545 449511.111 880466.667 -12546 449519.444 910347.222 -12547 449530.556 922911.111 -12548 449530.556 929950.000 -12549 449550.000 953661.111 -12550 449563.889 905975.000 -12551 449563.889 927655.556 -12552 449583.333 1240166.667 -12553 449591.667 896300.000 -12554 449600.000 909369.444 -12555 449611.111 907997.222 -12556 449633.333 735877.778 -12557 449636.111 938469.444 -12558 449638.889 940472.222 -12559 449666.667 923741.667 -12560 449694.444 935138.889 -12561 449713.889 936041.667 -12562 449713.889 1162830.556 -12563 449747.222 927566.667 -12564 449766.667 856505.556 -12565 449788.889 924355.556 -12566 449800.000 932636.111 -12567 449802.778 852111.111 -12568 449808.333 888308.333 -12569 449838.889 925558.333 -12570 449861.111 1229816.667 -12571 449863.889 734469.444 -12572 449866.667 935713.889 -12573 449902.778 1230250.000 -12574 449916.667 931661.111 -12575 449930.556 927566.667 -12576 449938.889 733652.778 -12577 449944.444 724002.778 -12578 449958.333 928791.667 -12579 449969.444 726716.667 -12580 449975.000 917269.444 -12581 449983.333 1202150.000 -12582 449986.111 932055.556 -12583 449991.667 883719.444 -12584 450030.556 903355.556 -12585 450050.000 720994.444 -12586 450052.778 1227819.444 -12587 450061.111 931563.889 -12588 450072.222 936555.556 -12589 450097.222 933488.889 -12590 450097.222 961955.556 -12591 450105.556 934552.778 -12592 450116.667 999552.778 -12593 450158.333 952383.333 -12594 450213.889 927808.333 -12595 450230.556 1020355.556 -12596 450238.889 692902.778 -12597 450269.444 930875.000 -12598 450275.000 846747.222 -12599 450313.889 927927.778 -12600 450322.222 933383.333 -12601 450327.778 933600.000 -12602 450330.556 900738.889 -12603 450350.000 991236.111 -12604 450380.556 933863.889 -12605 450408.333 932627.778 -12606 450419.444 937888.889 -12607 450436.111 920408.333 -12608 450475.000 1016005.556 -12609 450502.778 931563.889 -12610 450533.333 932472.222 -12611 450541.667 929563.889 -12612 450544.444 877491.667 -12613 450563.889 928058.333 -12614 450575.000 930736.111 -12615 450586.111 698827.778 -12616 450586.111 921722.222 -12617 450608.333 940730.556 -12618 450616.667 834327.778 -12619 450650.000 880341.667 -12620 450650.000 939108.333 -12621 450655.556 932016.667 -12622 450680.556 1227988.889 -12623 450697.222 929513.889 -12624 450700.000 852644.444 -12625 450725.000 934555.556 -12626 450758.333 941897.222 -12627 450761.111 933325.000 -12628 450788.889 1234847.222 -12629 450791.667 931469.444 -12630 450816.667 943066.667 -12631 450847.222 930097.222 -12632 450861.111 932630.556 -12633 450883.333 937341.667 -12634 450900.000 929722.222 -12635 450941.667 933561.111 -12636 450952.778 935472.222 -12637 450994.444 1233936.111 -12638 451000.000 876305.556 -12639 451002.778 914886.111 -12640 451027.778 930788.889 -12641 451050.000 932083.333 -12642 451077.778 876141.667 -12643 451077.778 932377.778 -12644 451083.333 1228963.889 -12645 451158.333 1232061.111 -12646 451194.444 934022.222 -12647 451200.000 932875.000 -12648 451219.444 950430.556 -12649 451230.556 925363.889 -12650 451244.444 926733.333 -12651 451272.222 945277.778 -12652 451313.889 856166.667 -12653 451386.111 903400.000 -12654 451388.889 947777.778 -12655 451402.778 891522.222 -12656 451427.778 846602.778 -12657 451438.889 1228541.667 -12658 451475.000 1225758.333 -12659 451486.111 931513.889 -12660 451505.556 946827.778 -12661 451558.333 936661.111 -12662 451569.444 674052.778 -12663 451580.556 851241.667 -12664 451600.000 929930.556 -12665 451602.778 930886.111 -12666 451608.333 932347.222 -12667 451672.222 911491.667 -12668 451688.889 693850.000 -12669 451719.444 938744.444 -12670 451758.333 1138950.000 -12671 451805.556 896833.333 -12672 451825.000 1228066.667 -12673 451833.333 692275.000 -12674 451858.333 1092461.111 -12675 451872.222 871208.333 -12676 451888.889 672791.667 -12677 451888.889 933972.222 -12678 451930.556 953202.778 -12679 451969.444 960194.444 -12680 451977.778 933869.444 -12681 452086.111 1178641.667 -12682 452102.778 1231975.000 -12683 452163.889 1126366.667 -12684 452166.667 850138.889 -12685 452191.667 966352.778 -12686 452208.333 1230750.000 -12687 452291.667 940016.667 -12688 452311.111 1227547.222 -12689 452325.000 880075.000 -12690 452330.556 949397.222 -12691 452333.333 932911.111 -12692 452344.444 1201838.889 -12693 452377.778 936541.667 -12694 452386.111 686641.667 -12695 452436.111 997766.667 -12696 452438.889 935147.222 -12697 452444.444 1231136.111 -12698 452519.444 922711.111 -12699 452536.111 689863.889 -12700 452627.778 941241.667 -12701 452630.556 1226913.889 -12702 452661.111 932341.667 -12703 452783.333 1230097.222 -12704 452788.889 929850.000 -12705 452897.222 1223325.000 -12706 452916.667 964625.000 -12707 452944.444 1231752.778 -12708 452958.333 1089130.556 -12709 453000.000 1227725.000 -12710 453002.778 1229719.444 -12711 453011.111 949438.889 -12712 453038.889 935669.444 -12713 453047.222 964444.444 -12714 453055.556 937938.889 -12715 453069.444 923619.444 -12716 453141.667 916508.333 -12717 453144.444 1073625.000 -12718 453150.000 955997.222 -12719 453152.778 944083.333 -12720 453175.000 902083.333 -12721 453180.556 852583.333 -12722 453194.444 932022.222 -12723 453205.556 927047.222 -12724 453247.222 1180866.667 -12725 453261.111 945458.333 -12726 453319.444 973047.222 -12727 453322.222 975197.222 -12728 453325.000 937458.333 -12729 453363.889 929969.444 -12730 453416.667 1231861.111 -12731 453488.889 1117288.889 -12732 453533.333 1195566.667 -12733 453544.444 1172286.111 -12734 453561.111 926333.333 -12735 453566.667 1228388.889 -12736 453575.000 842238.889 -12737 453575.000 1226055.556 -12738 453622.222 685055.556 -12739 453658.333 1226111.111 -12740 453708.333 879522.222 -12741 453733.333 849552.778 -12742 453736.111 928897.222 -12743 453805.556 947116.667 -12744 453808.333 1225936.111 -12745 453841.667 1227627.778 -12746 453894.444 928477.778 -12747 453933.333 938766.667 -12748 453944.444 921422.222 -12749 453975.000 1222602.778 -12750 453980.556 929872.222 -12751 454013.889 918488.889 -12752 454019.444 926522.222 -12753 454022.222 1227516.667 -12754 454086.111 917438.889 -12755 454086.111 968575.000 -12756 454152.778 876075.000 -12757 454169.444 920327.778 -12758 454208.333 1226694.444 -12759 454213.889 838183.333 -12760 454222.222 1163144.444 -12761 454263.889 1172777.778 -12762 454313.889 1227702.778 -12763 454316.667 849919.444 -12764 454438.889 1054069.444 -12765 454441.667 847866.667 -12766 454444.444 990288.889 -12767 454463.889 1226380.556 -12768 454466.667 1227577.778 -12769 454469.444 1225291.667 -12770 454475.000 980983.333 -12771 454513.889 925538.889 -12772 454522.222 924544.444 -12773 454530.556 996536.111 -12774 454533.333 1211294.444 -12775 454541.667 945180.556 -12776 454555.556 1121961.111 -12777 454558.333 944286.111 -12778 454563.889 1238427.778 -12779 454569.444 912730.556 -12780 454594.444 695911.111 -12781 454602.778 964333.333 -12782 454630.556 911038.889 -12783 454647.222 984861.111 -12784 454686.111 1226083.333 -12785 454711.111 897297.222 -12786 454719.444 943405.556 -12787 454833.333 1188288.889 -12788 454836.111 1227538.889 -12789 454852.778 929616.667 -12790 454852.778 1089697.222 -12791 454872.222 1228025.000 -12792 454902.778 932475.000 -12793 454944.444 1228658.333 -12794 454975.000 957963.889 -12795 454983.333 1224302.778 -12796 454988.889 1227633.333 -12797 455011.111 951241.667 -12798 455041.667 1225363.889 -12799 455050.000 1227972.222 -12800 455061.111 917380.556 -12801 455063.889 1000316.667 -12802 455113.889 929800.000 -12803 455200.000 1230586.111 -12804 455200.000 1231094.444 -12805 455227.778 1238880.556 -12806 455230.556 1229886.111 -12807 455236.111 1226750.000 -12808 455261.111 925083.333 -12809 455322.222 920191.667 -12810 455344.444 1224175.000 -12811 455372.222 1004275.000 -12812 455394.444 1223861.111 -12813 455461.111 902863.889 -12814 455527.778 847838.889 -12815 455572.222 942238.889 -12816 455597.222 1225591.667 -12817 455650.000 1179163.889 -12818 455691.667 964341.667 -12819 455700.000 935813.889 -12820 455702.778 1175272.222 -12821 455716.667 961730.556 -12822 455719.444 889027.778 -12823 455727.778 932241.667 -12824 455761.111 924825.000 -12825 455827.778 1223522.222 -12826 455861.111 959136.111 -12827 455863.889 929744.444 -12828 455872.222 1223983.333 -12829 455919.444 941658.333 -12830 455952.778 968330.556 -12831 455972.222 1229922.222 -12832 456091.667 944513.889 -12833 456136.111 1239419.444 -12834 456144.444 955308.333 -12835 456216.667 942066.667 -12836 456275.000 685750.000 -12837 456300.000 945697.222 -12838 456366.667 894119.444 -12839 456366.667 1092513.889 -12840 456388.889 1226602.778 -12841 456469.444 844744.444 -12842 456502.778 953894.444 -12843 456572.222 687102.778 -12844 456591.667 924669.444 -12845 456625.000 1105602.778 -12846 456627.778 946897.222 -12847 456647.222 939094.444 -12848 456647.222 970494.444 -12849 456666.667 1225597.222 -12850 456691.667 1087708.333 -12851 456700.000 1218894.444 -12852 456716.667 1226616.667 -12853 456722.222 1187875.000 -12854 456747.222 948072.222 -12855 456797.222 1110377.778 -12856 456855.556 929652.778 -12857 456966.667 904002.778 -12858 457055.556 1215202.778 -12859 457150.000 1214633.333 -12860 457169.444 1201997.222 -12861 457227.778 931705.556 -12862 457227.778 989405.556 -12863 457277.778 1214852.778 -12864 457311.111 944697.222 -12865 457325.000 1076113.889 -12866 457375.000 949522.222 -12867 457394.444 919252.778 -12868 457425.000 1191944.444 -12869 457452.778 870644.444 -12870 457544.444 1228763.889 -12871 457558.333 936541.667 -12872 457575.000 929622.222 -12873 457694.444 996191.667 -12874 457713.889 879947.222 -12875 457761.111 1111761.111 -12876 457763.889 926825.000 -12877 457805.556 1192161.111 -12878 457811.111 1225322.222 -12879 457833.333 1085000.000 -12880 457838.889 847277.778 -12881 457858.333 923808.333 -12882 457869.444 879036.111 -12883 457916.667 977505.556 -12884 457950.000 880719.444 -12885 458044.444 964988.889 -12886 458086.111 961430.556 -12887 458119.444 1184894.444 -12888 458138.889 1184236.111 -12889 458144.444 1008100.000 -12890 458152.778 1227413.889 -12891 458202.778 880658.333 -12892 458208.333 1208205.556 -12893 458225.000 918891.667 -12894 458261.111 929683.333 -12895 458294.444 957916.667 -12896 458300.000 942933.333 -12897 458347.222 1000688.889 -12898 458350.000 1099547.222 -12899 458400.000 1196994.444 -12900 458405.556 1192883.333 -12901 458405.556 1228405.556 -12902 458527.778 870216.667 -12903 458566.667 1113316.667 -12904 458588.889 1231916.667 -12905 458661.111 1224050.000 -12906 458669.444 951519.444 -12907 458708.333 1120966.667 -12908 458769.444 932936.111 -12909 458775.000 923672.222 -12910 458841.667 1066230.556 -12911 458852.778 953772.222 -12912 458888.889 1045522.222 -12913 458902.778 1228058.333 -12914 458919.444 1239602.778 -12915 458958.333 1194902.778 -12916 459047.222 1227427.778 -12917 459172.222 892441.667 -12918 459175.000 1193413.889 -12919 459266.667 1161213.889 -12920 459344.444 904413.889 -12921 459408.333 1021588.889 -12922 459577.778 862461.111 -12923 459747.222 948652.778 -12924 459763.889 943622.222 -12925 459816.667 941044.444 -12926 459933.333 1239213.889 -12927 459941.667 959763.889 -12928 459963.889 684466.667 -12929 460013.889 1026363.889 -12930 460027.778 985266.667 -12931 460041.667 956825.000 -12932 460086.111 1228433.333 -12933 460113.889 929441.667 -12934 460130.556 914844.444 -12935 460227.778 1141772.222 -12936 460244.444 1239100.000 -12937 460313.889 993786.111 -12938 460341.667 1125350.000 -12939 460494.444 1183872.222 -12940 460522.222 1184016.667 -12941 460641.667 886313.889 -12942 460647.222 1183419.444 -12943 460697.222 969013.889 -12944 460705.556 936675.000 -12945 460755.556 971513.889 -12946 460811.111 886269.444 -12947 460858.333 948655.556 -12948 460891.667 1229347.222 -12949 460911.111 945033.333 -12950 460922.222 1006286.111 -12951 460927.778 886422.222 -12952 460980.556 883338.889 -12953 460994.444 918247.222 -12954 461013.889 1232055.556 -12955 461077.778 976361.111 -12956 461261.111 678408.333 -12957 461302.778 949483.333 -12958 461311.111 928672.222 -12959 461336.111 1001611.111 -12960 461380.556 934705.556 -12961 461383.333 1229369.444 -12962 461386.111 980900.000 -12963 461450.000 1159769.444 -12964 461469.444 1229072.222 -12965 461530.556 953286.111 -12966 461644.444 1229402.778 -12967 461650.000 950388.889 -12968 461652.778 1239225.000 -12969 461830.556 1033944.444 -12970 461875.000 1229041.667 -12971 461880.556 1238300.000 -12972 462002.778 1239502.778 -12973 462033.333 1233819.444 -12974 462069.444 1197677.778 -12975 462113.889 1191361.111 -12976 462150.000 1199955.556 -12977 462258.333 976622.222 -12978 462272.222 1160283.333 -12979 462286.111 1190994.444 -12980 462350.000 1162397.222 -12981 462366.667 1121200.000 -12982 462413.889 1164661.111 -12983 462469.444 1141594.444 -12984 462511.111 1199005.556 -12985 462591.667 974558.333 -12986 462633.333 1194866.667 -12987 462636.111 965877.778 -12988 462652.778 966055.556 -12989 462663.889 1066772.222 -12990 462666.667 950625.000 -12991 462666.667 971319.444 -12992 462666.667 1002325.000 -12993 462705.556 1181522.222 -12994 462752.778 1229063.889 -12995 462805.556 957133.333 -12996 462811.111 874408.333 -12997 462830.556 960772.222 -12998 462858.333 1192833.333 -12999 463011.111 989541.667 -13000 463044.444 1193602.778 -13001 463191.667 1115200.000 -13002 463216.667 954450.000 -13003 463255.556 906608.333 -13004 463322.222 1132933.333 -13005 463394.444 1170472.222 -13006 463422.222 1201861.111 -13007 463433.333 942863.889 -13008 463525.000 1240530.556 -13009 463533.333 918222.222 -13010 463550.000 855094.444 -13011 463555.556 947919.444 -13012 463572.222 982941.667 -13013 463580.556 942005.556 -13014 463591.667 987152.778 -13015 463669.444 1042841.667 -13016 463725.000 1023266.667 -13017 463761.111 1159372.222 -13018 463775.000 1203075.000 -13019 463958.333 1127291.667 -13020 463983.333 950144.444 -13021 464022.222 1202608.333 -13022 464038.889 1018455.556 -13023 464050.000 1168038.889 -13024 464080.556 943555.556 -13025 464083.333 1058400.000 -13026 464111.111 866477.778 -13027 464163.889 1170441.667 -13028 464166.667 1170166.667 -13029 464280.556 902458.333 -13030 464355.556 1098336.111 -13031 464400.000 1228455.556 -13032 464416.667 976808.333 -13033 464425.000 951358.333 -13034 464452.778 1085411.111 -13035 464477.778 1204191.667 -13036 464497.222 901863.889 -13037 464541.667 927616.667 -13038 464547.222 901708.333 -13039 464736.111 938986.111 -13040 464750.000 1176016.667 -13041 464752.778 899397.222 -13042 464775.000 939775.000 -13043 464794.444 1162541.667 -13044 464813.889 900527.778 -13045 464822.222 939575.000 -13046 464855.556 943602.778 -13047 464886.111 876675.000 -13048 464911.111 1157980.556 -13049 464913.889 1229366.667 -13050 464947.222 873541.667 -13051 464991.667 876116.667 -13052 465083.333 997708.333 -13053 465100.000 1140922.222 -13054 465150.000 916997.222 -13055 465180.556 953758.333 -13056 465205.556 942883.333 -13057 465330.556 937100.000 -13058 465391.667 1028677.778 -13059 465436.111 873952.778 -13060 465483.333 1109013.889 -13061 465508.333 1169244.444 -13062 465538.889 1203819.444 -13063 465566.667 874372.222 -13064 465575.000 1204738.889 -13065 465586.111 1222738.889 -13066 465622.222 921472.222 -13067 465705.556 1232961.111 -13068 465708.333 960827.778 -13069 465747.222 1229069.444 -13070 465788.889 1167050.000 -13071 465838.889 917988.889 -13072 465897.222 1119147.222 -13073 465925.000 908836.111 -13074 465927.778 1120352.778 -13075 465944.444 955722.222 -13076 466022.222 1205047.222 -13077 466030.556 943091.667 -13078 466063.889 1204386.111 -13079 466180.556 1205519.444 -13080 466230.556 976011.111 -13081 466300.000 950886.111 -13082 466486.111 970166.667 -13083 466522.222 964194.444 -13084 466541.667 1205288.889 -13085 466622.222 1229627.778 -13086 466636.111 1188600.000 -13087 466638.889 924247.222 -13088 466733.333 908947.222 -13089 466811.111 680163.889 -13090 466866.667 1237316.667 -13091 467022.222 1207541.667 -13092 467066.667 924280.556 -13093 467163.889 1229530.556 -13094 467180.556 944038.889 -13095 467208.333 921038.889 -13096 467216.667 924591.667 -13097 467280.556 957005.556 -13098 467311.111 939577.778 -13099 467311.111 1206983.333 -13100 467313.889 1171786.111 -13101 467325.000 1169991.667 -13102 467352.778 1229877.778 -13103 467369.444 1167686.111 -13104 467472.222 922252.778 -13105 467538.889 895838.889 -13106 467538.889 950977.778 -13107 467566.667 884527.778 -13108 467588.889 1140800.000 -13109 467722.222 678344.444 -13110 467786.111 884888.889 -13111 467833.333 921063.889 -13112 467900.000 681580.556 -13113 467911.111 1172494.444 -13114 467930.556 1053116.667 -13115 467991.667 1228686.111 -13116 467994.444 1165550.000 -13117 468083.333 1007833.333 -13118 468108.333 908180.556 -13119 468150.000 1018294.444 -13120 468172.222 958450.000 -13121 468261.111 1191741.667 -13122 468266.667 1008891.667 -13123 468405.556 1232311.111 -13124 468450.000 1014108.333 -13125 468547.222 999155.556 -13126 468569.444 1228516.667 -13127 468605.556 680125.000 -13128 468633.333 1140475.000 -13129 468675.000 1222652.778 -13130 468708.333 1139436.111 -13131 468711.111 893138.889 -13132 468722.222 1139930.556 -13133 468738.889 967672.222 -13134 468750.000 969000.000 -13135 468752.778 965786.111 -13136 468766.667 967030.556 -13137 468772.222 967894.444 -13138 468791.667 1027891.667 -13139 468802.778 1173633.333 -13140 468808.333 963163.889 -13141 468838.889 1023152.778 -13142 468852.778 1031991.667 -13143 468863.889 960941.667 -13144 468883.333 1226872.222 -13145 468902.778 1241027.778 -13146 468938.889 992994.444 -13147 469005.556 972108.333 -13148 469005.556 1020450.000 -13149 469011.111 1196294.444 -13150 469086.111 678263.889 -13151 469102.778 1170747.222 -13152 469105.556 987080.556 -13153 469180.556 1040038.889 -13154 469216.667 1168972.222 -13155 469222.222 950583.333 -13156 469233.333 980027.778 -13157 469291.667 929194.444 -13158 469422.222 1226047.222 -13159 469555.556 1237725.000 -13160 469630.556 1241638.889 -13161 469677.778 1190386.111 -13162 469722.222 1186141.667 -13163 469736.111 1236911.111 -13164 469811.111 1238880.556 -13165 469813.889 1236013.889 -13166 469833.333 1204158.333 -13167 469850.000 1041877.778 -13168 469933.333 935983.333 -13169 469966.667 1205466.667 -13170 470036.111 1234075.000 -13171 470075.000 1229080.556 -13172 470080.556 1171400.000 -13173 470227.778 916705.556 -13174 470344.444 1228219.444 -13175 470380.556 1228994.444 -13176 470533.333 1232641.667 -13177 470625.000 1094275.000 -13178 470700.000 886430.556 -13179 470788.889 962586.111 -13180 470969.444 1226300.000 -13181 470980.556 1222030.556 -13182 471013.889 945869.444 -13183 471041.667 1224333.333 -13184 471052.778 1047119.444 -13185 471163.889 1012991.667 -13186 471219.444 885688.889 -13187 471269.444 885808.333 -13188 471275.000 1183788.889 -13189 471302.778 1192769.444 -13190 471536.111 1102175.000 -13191 471555.556 1224327.778 -13192 471572.222 679358.333 -13193 471586.111 1007830.556 -13194 471633.333 1220255.556 -13195 471700.000 1226013.889 -13196 471733.333 884291.667 -13197 471772.222 1221852.778 -13198 471911.111 1222894.444 -13199 471916.667 1148908.333 -13200 471941.667 884072.222 -13201 471955.556 1209380.556 -13202 472033.333 1222391.667 -13203 472044.444 1219902.778 -13204 472155.556 1230961.111 -13205 472233.333 1170711.111 -13206 472236.111 1209919.444 -13207 472283.333 934888.889 -13208 472344.444 1198513.889 -13209 472358.333 1225491.667 -13210 472361.111 1173688.889 -13211 472372.222 935300.000 -13212 472375.000 884430.556 -13213 472394.444 1223558.333 -13214 472397.222 1225147.222 -13215 472466.667 884538.889 -13216 472483.333 1223116.667 -13217 472530.556 1224430.556 -13218 472586.111 685900.000 -13219 472602.778 962586.111 -13220 472633.333 1017775.000 -13221 472647.222 1222488.889 -13222 472711.111 1116997.222 -13223 472791.667 1222508.333 -13224 472863.889 1019222.222 -13225 472888.889 934275.000 -13226 472891.667 1010286.111 -13227 472944.444 912572.222 -13228 472944.444 1016222.222 -13229 472955.556 934186.111 -13230 472994.444 1225069.444 -13231 472997.222 965150.000 -13232 473075.000 1222272.222 -13233 473088.889 1220019.444 -13234 473152.778 959683.333 -13235 473177.778 1195525.000 -13236 473205.556 932983.333 -13237 473211.111 1013811.111 -13238 473294.444 1225788.889 -13239 473330.556 937925.000 -13240 473333.333 1186897.222 -13241 473352.778 1168875.000 -13242 473458.333 1055916.667 -13243 473516.667 968283.333 -13244 473719.444 1027536.111 -13245 473794.444 946038.889 -13246 473802.778 931680.556 -13247 473811.111 1222336.111 -13248 473852.778 1171705.556 -13249 473861.111 1109247.222 -13250 473894.444 1194894.444 -13251 473997.222 930722.222 -13252 474019.444 1223230.556 -13253 474038.889 970616.667 -13254 474158.333 1202919.444 -13255 474236.111 1203091.667 -13256 474363.889 1223394.444 -13257 474444.444 981236.111 -13258 474497.222 991258.333 -13259 474563.889 1011366.667 -13260 474602.778 1148819.444 -13261 474625.000 925397.222 -13262 474702.778 1158008.333 -13263 474705.556 1223455.556 -13264 474736.111 948800.000 -13265 474741.667 1159269.444 -13266 474741.667 1222597.222 -13267 474811.111 1182533.333 -13268 474830.556 1222158.333 -13269 474844.444 1222933.333 -13270 474858.333 1004427.778 -13271 474875.000 1175747.222 -13272 474888.889 924647.222 -13273 474891.667 928836.111 -13274 474936.111 927777.778 -13275 474958.333 1217855.556 -13276 474980.556 973241.667 -13277 474983.333 973700.000 -13278 475000.000 1113000.000 -13279 475061.111 1159983.333 -13280 475141.667 978355.556 -13281 475197.222 921383.333 -13282 475200.000 1008897.222 -13283 475216.667 953980.556 -13284 475225.000 1204686.111 -13285 475233.333 925363.889 -13286 475236.111 1226230.556 -13287 475288.889 1141005.556 -13288 475288.889 1218241.667 -13289 475300.000 922369.444 -13290 475302.778 1220313.889 -13291 475325.000 926233.333 -13292 475330.556 923400.000 -13293 475361.111 962800.000 -13294 475383.333 1161183.333 -13295 475405.556 1226350.000 -13296 475411.111 1221752.778 -13297 475427.778 1161805.556 -13298 475536.111 1226633.333 -13299 475605.556 1115450.000 -13300 475669.444 1221572.222 -13301 475675.000 1226313.889 -13302 475708.333 1222208.333 -13303 475730.556 1176811.111 -13304 475763.889 957511.111 -13305 475830.556 1227072.222 -13306 475850.000 1225975.000 -13307 475963.889 1206602.778 -13308 475972.222 1153433.333 -13309 476000.000 1226916.667 -13310 476063.889 1223308.333 -13311 476091.667 1146677.778 -13312 476091.667 1226538.889 -13313 476105.556 1221994.444 -13314 476113.889 1192911.111 -13315 476147.222 1119794.444 -13316 476211.111 1222263.889 -13317 476225.000 1220669.444 -13318 476247.222 1225200.000 -13319 476319.444 1222166.667 -13320 476369.444 958861.111 -13321 476397.222 974530.556 -13322 476447.222 1175922.222 -13323 476463.889 1222161.111 -13324 476472.222 1200700.000 -13325 476480.556 1219127.778 -13326 476483.333 1170913.889 -13327 476491.667 996288.889 -13328 476522.222 1014152.778 -13329 476541.667 1181488.889 -13330 476569.444 1171952.778 -13331 476569.444 1172822.222 -13332 476575.000 1172388.889 -13333 476588.889 1174250.000 -13334 476675.000 960097.222 -13335 476741.667 1221202.778 -13336 476777.778 1167794.444 -13337 476800.000 991375.000 -13338 476813.889 1172816.667 -13339 476816.667 1222075.000 -13340 476919.444 954308.333 -13341 476936.111 1141622.222 -13342 477033.333 1222058.333 -13343 477086.111 919444.444 -13344 477166.667 1041558.333 -13345 477180.556 1169505.556 -13346 477297.222 1167691.667 -13347 477313.889 1225511.111 -13348 477330.556 945483.333 -13349 477341.667 975663.889 -13350 477361.111 1226452.778 -13351 477425.000 1219844.444 -13352 477505.556 903341.667 -13353 477569.444 1222797.222 -13354 477575.000 1222427.778 -13355 477588.889 1187044.444 -13356 477600.000 1222044.444 -13357 477613.889 1223450.000 -13358 477638.889 981769.444 -13359 477661.111 1167855.556 -13360 477697.222 999350.000 -13361 477736.111 971094.444 -13362 477741.667 966077.778 -13363 477847.222 1222730.556 -13364 477883.333 1223075.000 -13365 477963.889 1223816.667 -13366 478022.222 1032827.778 -13367 478055.556 922744.444 -13368 478108.333 1223761.111 -13369 478125.000 1168955.556 -13370 478138.889 1126791.667 -13371 478200.000 1106722.222 -13372 478211.111 1223138.889 -13373 478222.222 1222808.333 -13374 478391.667 958541.667 -13375 478411.111 1200152.778 -13376 478525.000 926894.444 -13377 478555.556 1219697.222 -13378 478563.889 1040444.444 -13379 478569.444 1216958.333 -13380 478627.778 1218152.778 -13381 478822.222 962738.889 -13382 479033.333 918669.444 -13383 479066.667 976263.889 -13384 479130.556 1220969.444 -13385 479188.889 973647.222 -13386 479252.778 970325.000 -13387 479300.000 970241.667 -13388 479325.000 1190369.444 -13389 479416.667 1190022.222 -13390 479447.222 1223033.333 -13391 479505.556 1243841.667 -13392 479533.333 1021344.444 -13393 479625.000 995297.222 -13394 479655.556 1189750.000 -13395 479663.889 1168675.000 -13396 479772.222 1024963.889 -13397 479791.667 1222008.333 -13398 480083.333 1196700.000 -13399 480402.778 1224050.000 -13400 480427.778 983358.333 -13401 480511.111 1199022.222 -13402 480519.444 1221758.333 -13403 480561.111 1009288.889 -13404 480633.333 1140716.667 -13405 480797.222 1231005.556 -13406 480841.667 1219675.000 -13407 480905.556 1056400.000 -13408 480961.111 1197794.444 -13409 480980.556 1090480.556 -13410 481127.778 988647.222 -13411 481130.556 1051977.778 -13412 481172.222 1227591.667 -13413 481183.333 1234294.444 -13414 481191.667 961808.333 -13415 481333.333 1036333.333 -13416 481444.444 1045163.889 -13417 481702.778 1119452.778 -13418 481786.111 1101113.889 -13419 481808.333 1170358.333 -13420 481958.333 1143119.444 -13421 481966.667 967725.000 -13422 481969.444 1066361.111 -13423 481988.889 1221238.889 -13424 482200.000 1226850.000 -13425 482258.333 1142752.778 -13426 482325.000 1012958.333 -13427 482363.889 1011330.556 -13428 482413.889 1223694.444 -13429 482555.556 1216002.778 -13430 482752.778 1014283.333 -13431 482763.889 1177144.444 -13432 482766.667 1165522.222 -13433 482888.889 994372.222 -13434 482916.667 973711.111 -13435 482933.333 1226419.444 -13436 483077.778 1122488.889 -13437 483172.222 1023900.000 -13438 483327.778 968205.556 -13439 483444.444 1031647.222 -13440 483458.333 1004050.000 -13441 483597.222 1078736.111 -13442 483613.889 1195822.222 -13443 483636.111 1201211.111 -13444 483688.889 999958.333 -13445 483725.000 1141805.556 -13446 483883.333 1155550.000 -13447 483925.000 1224936.111 -13448 483972.222 1029377.778 -13449 483986.111 977408.333 -13450 483988.889 935555.556 -13451 484111.111 1143366.667 -13452 484111.111 1195263.889 -13453 484122.222 974102.778 -13454 484213.889 1223327.778 -13455 484500.000 968722.222 -13456 484633.333 1158886.111 -13457 484758.333 1223241.667 -13458 484866.667 992094.444 -13459 485038.889 1222361.111 -13460 485052.778 1118561.111 -13461 485105.556 1109666.667 -13462 485127.778 1226113.889 -13463 485333.333 1087833.333 -13464 485344.444 1230158.333 -13465 485394.444 1217450.000 -13466 485466.667 1179044.444 -13467 485500.000 1096833.333 -13468 485569.444 1130125.000 -13469 485711.111 971775.000 -13470 485775.000 965202.778 -13471 485866.667 933988.889 -13472 485900.000 1092305.556 -13473 486011.111 934108.333 -13474 486108.333 1180547.222 -13475 486330.556 1123252.778 -13476 486483.333 1187366.667 -13477 486608.333 998411.111 -13478 486747.222 1020822.222 -13479 486913.889 1163152.778 -13480 487005.556 961813.889 -13481 487052.778 1194383.333 -13482 487125.000 945997.222 -13483 487411.111 1174161.111 -13484 487458.333 1224005.556 -13485 487597.222 1224869.444 -13486 487600.000 983677.778 -13487 487633.333 1015127.778 -13488 487744.444 969461.111 -13489 487747.222 1045619.444 -13490 487925.000 1054202.778 -13491 487938.889 976219.444 -13492 488030.556 1022455.556 -13493 488130.556 1000605.556 -13494 488272.222 1004452.778 -13495 488391.667 997444.444 -13496 488461.111 957625.000 -13497 488466.667 1225897.222 -13498 488577.778 996175.000 -13499 488800.000 1150525.000 -13500 489052.778 953141.667 -13501 489094.444 1010202.778 -13502 489141.667 1032944.444 -13503 489202.778 1223413.889 -13504 489233.333 979177.778 -13505 489391.667 1194344.444 -13506 489466.667 1224508.333 -13507 489663.889 972433.333 -13508 489938.889 1227458.333 -13509 490000.000 1222636.111 -EOF \ No newline at end of file diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/city_swap.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/city_swap.cpp deleted file mode 100644 index e47a4e31b..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/city_swap.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include - -#include "city_swap.h" - -bool CitySwap :: operator () (Route & __route) -{ - - std :: swap (__route [rng.random (__route.size ())], - __route [rng.random (__route.size ())]) ; - - __route.invalidate () ; - - return true ; -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/city_swap.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/city_swap.h deleted file mode 100644 index eda897f0f..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/city_swap.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef city_swap_h -#define city_swap_h - -#include - -#include "route.h" - -/** Its swaps two vertices - randomly choosen */ -class CitySwap : public eoMonOp - { - - public : - - bool operator () (Route & __route) ; - - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/edge_xover.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/edge_xover.cpp deleted file mode 100644 index a8b6a8532..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/edge_xover.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include - -#include - -#include "edge_xover.h" -#include "route_valid.h" - -#define MAXINT 1000000 - -void -EdgeXover :: build_map (const Route & __par1, const Route & __par2) -{ - - unsigned int len = __par1.size () ; - - /* Initialization */ - _map.clear () ; - _map.resize (len) ; - - for (unsigned int i = 0 ; i < len ; i ++) - { - _map [__par1 [i]].insert (__par1 [(i + 1) % len]) ; - _map [__par2 [i]].insert (__par2 [(i + 1) % len]) ; - _map [__par1 [i]].insert (__par1 [(i - 1 + len) % len]) ; - _map [__par2 [i]].insert (__par2 [(i - 1 + len) % len]) ; - } - - visited.clear () ; - visited.resize (len, false) ; -} - -void -EdgeXover :: remove_entry (unsigned int __vertex, std :: vector > & __map) - { - - std :: set & neigh = __map [__vertex] ; - - for (std :: set :: iterator it = neigh.begin () ; it != neigh.end () ; it ++) - { - __map [* it].erase (__vertex) ; - } - - } - -void -EdgeXover :: add_vertex (unsigned int __vertex, Route & __child) -{ - visited [__vertex] = true ; - __child.push_back (__vertex) ; - remove_entry (__vertex, _map) ; /* Removing entries */ -} - -void -EdgeXover :: cross (const Route & __par1, const Route & __par2, Route & __child) -{ - - build_map (__par1, __par2) ; - - unsigned int len = __par1.size () ; - - /* Go ! */ - __child.clear () ; - - unsigned int cur_vertex = rng.random (len) ; - - add_vertex (cur_vertex, __child) ; - - for (unsigned int i = 1 ; i < len ; i ++) - { - - unsigned int len_min_entry = MAXINT ; - - std :: set & neigh = _map [cur_vertex] ; - - for (std :: set :: iterator it = neigh.begin () ; it != neigh.end () ; it ++) - { - unsigned int l = _map [* it].size () ; - if (len_min_entry > l) - { - len_min_entry = l ; - } - } - - std :: vector cand ; /* Candidates */ - - for (std :: set :: iterator it = neigh.begin () ; it != neigh.end () ; it ++) - { - unsigned int l = _map [* it].size () ; - if (len_min_entry == l) - { - cand.push_back (* it) ; - } - } - - if (! cand.size ()) - { - - /* Oh no ! Implicit mutation */ - for (unsigned int j = 0 ; j < len ; j ++) - { - if (! visited [j]) - { - cand.push_back (j) ; - } - } - } - - cur_vertex = cand [rng.random (cand.size ())] ; - - add_vertex (cur_vertex, __child) ; - } -} - -bool -EdgeXover :: operator () (Route & __route1, Route & __route2) -{ - - // Init. copy - Route par [2] ; - par [0] = __route1 ; - par [1] = __route2 ; - - cross (par [0], par [1], __route1) ; - cross (par [1], par [0], __route2) ; - - assert (valid (__route1)) ; - assert (valid (__route2)) ; - - __route1.invalidate () ; - __route2.invalidate () ; - - return true ; -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/edge_xover.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/edge_xover.h deleted file mode 100644 index 3e97d6d48..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/edge_xover.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef edge_xover_h -#define edge_xover_h - -#include -#include - -#include - -#include "route.h" - -/** Edge Crossover */ -class EdgeXover : public eoQuadOp - { - - public : - - bool operator () (Route & __route1, Route & __route2) ; - - private : - - void cross (const Route & __par1, const Route & __par2, Route & __child) ; /* Binary */ - - void remove_entry (unsigned int __vertex, std :: vector > & __map) ; - /* Updating the map of entries */ - - void build_map (const Route & __par1, const Route & __par2) ; - - void add_vertex (unsigned int __vertex, Route & __child) ; - - std :: vector > _map ; /* The handled map */ - - std :: vector visited ; /* Vertices that are already visited */ - - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/graph.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/graph.cpp deleted file mode 100644 index 412b9263a..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/graph.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "graph.h" - -using std::cout; -using std::endl; - -namespace Graph - { - - static std :: vector > vectCoord ; // Coordinates - - static std :: vector > dist ; // Distances Mat. - - unsigned size () - { - return dist.size () ; - } - - void computeDistances () - { - - // Dim. - unsigned int numCities = vectCoord.size () ; - dist.resize (numCities) ; - for (unsigned int i = 0 ; i < dist.size () ; i ++) - { - dist [i].resize (numCities) ; - } - - // Computations. - for (unsigned int i = 0 ; i < dist.size () ; i ++) - { - for (unsigned int j = i + 1 ; j < dist.size () ; j ++) - { - double distX = (double)(vectCoord [i].first - vectCoord [j].first) ; - double distY = (double)(vectCoord [i].second - vectCoord [j].second) ; - dist [i] [j] = dist [j] [i] = (unsigned int) (sqrt ((float) (distX * distX + distY * distY)) + 0.5) ; - } - } - } - - void load (const char * _fileName) - { - unsigned int i, dimension; - - std::string string_read, buffer; - - std :: ifstream file (_fileName) ; - - cout << endl << "\tLoading [" << _fileName << "]" << endl << endl; - - if( file.is_open() ) - { - // Read NAME: - file >> string_read; - if (string_read.compare("NAME:")!=0) - { - cout << "ERROR: \'NAME:\' espected, \'" << string_read << "\' found" << endl; - exit(EXIT_FAILURE); - } - // Read instance name - file >> string_read; - cout << "\t\tInstance Name = " << string_read << endl; - // Read TYPE: - file >> string_read; - if (string_read.compare("TYPE:")!=0) - { - cout << "ERROR: \'TYPE:\' espected, \'" << string_read << "\' found" << endl; - exit(EXIT_FAILURE); - } - // Read instance type; - file >> string_read; - cout << "\t\tInstance type = " << string_read << endl; - if (string_read.compare("TSP")!=0) - { - cout << "ERROR: only TSP type instance can be loaded" << endl; - exit(EXIT_FAILURE); - } - // Read COMMENT: - file >> string_read; - if (string_read.compare("COMMENT:")!=0) - { - cout << "ERROR: \'COMMENT:\' espected, \'" << string_read << "\' found" << endl; - exit(EXIT_FAILURE); - } - // Read comments - cout << "\t\tInstance comments = "; - file >> string_read; - buffer = string_read+"_first"; - while((string_read.compare("DIMENSION:")!=0) && (string_read.compare(buffer)!=0)) - { - if(string_read.compare("COMMENT:")!=0) - { - cout << string_read << " "; - } - else - { - cout << endl << "\t "; - } - buffer = string_read; - file >> string_read; - } - - cout << endl; - - // Read dimension; - file >> dimension ; - cout << "\t\tInstance dimension = " << dimension << endl; - vectCoord.resize (dimension) ; - - // Read EDGE_WEIGHT_TYPE - file >> string_read; - if (string_read.compare("EDGE_WEIGHT_TYPE:")!=0) - { - cout << "ERROR: \'EDGE_WEIGHT_TYPE:\' espected, \'" << string_read << "\' found" << endl; - exit(EXIT_FAILURE); - } - - // Read edge weight type - file >> string_read; - cout << "\t\tInstance edge weight type = " << string_read << endl; - if (string_read.compare("EUC_2D")!=0) - { - cout << "ERROR: only EUC_2D edge weight type instance can be loaded" << endl; - exit(EXIT_FAILURE); - } - - // Read NODE_COORD_SECTION - file >> string_read; - if (string_read.compare("NODE_COORD_SECTION")!=0) - { - cout << "ERROR: \'NODE_COORD_SECTION\' espected, \'" << string_read << "\' found" << endl; - exit(EXIT_FAILURE); - } - - // Read coordonates. - for(i=0;i> string_read; - //Read Coordinate - file >> vectCoord [i].first >> vectCoord [i].second ; - } - - // Read EOF - file >> string_read; - if(string_read.compare("EOF")!=0) - { - cout << "ERROR: \'EOF\' espected, \'" << string_read << "\' found" << endl; - exit(EXIT_FAILURE); - } - - cout << endl; - - file.close () ; - - computeDistances () ; - } - else - { - cout << _fileName << " does not exist !!!" << endl ; - exit(EXIT_FAILURE) ; - } - } - - float distance (unsigned int _from, unsigned int _to) - { - return (float)(dist [_from] [_to]) ; - } -} - - diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/graph.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/graph.h deleted file mode 100644 index 94b66d7f6..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/graph.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef graph_h -#define graph_h - -#include -#include -#include -#include -#include -#include -#include - - -namespace Graph -{ - void load (const char * _file_name) ; - /* Loading cities - (expressed by their coordinates) - from the given file name */ - - float distance (unsigned int _from, unsigned int _to) ; - - unsigned int size () ; // How many cities ? -} - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/mix.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/mix.h deleted file mode 100644 index fc570a939..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/mix.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef mix_h -#define mix_h - -#include - -template void mix (std :: vector & __vect) -{ - for (unsigned int i = 0 ; i < __vect.size () ; i ++) - { - std :: swap (__vect [i], __vect [rng.random (__vect.size ())]) ; - } -} - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/order_xover.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/order_xover.cpp deleted file mode 100644 index 9e2c1f408..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/order_xover.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include -#include - -#include - -#include "order_xover.h" -#include "route_valid.h" - -void OrderXover :: cross (const Route & __par1, const Route & __par2, Route & __child) -{ - - unsigned int cut = rng.random (__par1.size ()) ; - - /* To store vertices that have - already been crossed */ - std::vector v; - v.resize(__par1.size()); - - for (unsigned int i = 0 ; i < __par1.size () ; i ++) - { - v [i] = false ; - } - - /* Copy of the left partial - route of the first parent */ - for (unsigned int i = 0 ; i < cut ; i ++) - { - __child [i] = __par1 [i] ; - v [__par1 [i]] = true ; - } - - /* Searching the vertex of the second path, that ended - the previous first one */ - unsigned int from = 0 ; - for (unsigned int i = 0 ; i < __par2.size () ; i ++) - { - if (__par2 [i] == __child [cut - 1]) - { - from = i ; - break ; - } - } - - /* Selecting a direction - Left or Right */ - char direct = rng.flip () ? 1 : -1 ; - - /* Copy of the left vertices from - the second parent path */ - unsigned int l = cut ; - - for (unsigned int i = 0 ; i < __par2.size () ; i ++) - { - unsigned int bidule /* :-) */ = (direct * i + from + __par2.size ()) % __par2.size () ; - if (! v [__par2 [bidule]]) - { - __child [l ++] = __par2 [bidule] ; - v [__par2 [bidule]] = true ; - } - } - - v.clear(); -} - -bool OrderXover :: operator () (Route & __route1, Route & __route2) -{ - - // Init. copy - Route par [2] ; - par [0] = __route1 ; - par [1] = __route2 ; - - cross (par [0], par [1], __route1) ; - cross (par [1], par [0], __route2) ; - - assert (valid (__route1)) ; - assert (valid (__route2)) ; - - __route1.invalidate () ; - __route2.invalidate () ; - - return true ; -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/order_xover.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/order_xover.h deleted file mode 100644 index 924eb4dfd..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/order_xover.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef order_xover_h -#define order_xover_h - -#include - -#include "route.h" - -/** Order Crossover */ -class OrderXover : public eoQuadOp - { - - public : - - bool operator () (Route & __route1, Route & __route2) ; - - private : - - void cross (const Route & __par1, const Route & __par2, Route & __child) ; - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_route_eval.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_route_eval.cpp deleted file mode 100644 index 1639e002a..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_route_eval.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "part_route_eval.h" -#include "graph.h" - -PartRouteEval :: PartRouteEval (float __from, float __to) : from (__from), to (__to) -{} - -void PartRouteEval :: operator () (Route & __route) -{ - float len = 0 ; - - for (unsigned int i = (unsigned int) (__route.size () * from) ; i < (unsigned int ) (__route.size () * to) ; i ++) - { - len += Graph :: distance (__route [i], __route [(i + 1) % Graph :: size ()]) ; - } - - __route.fitness (len) ; -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_route_eval.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_route_eval.h deleted file mode 100644 index a92fad2ce..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_route_eval.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef part_route_eval_h -#define part_route_eval_h - -#include - -#include "route.h" - -/** Route Evaluator */ -class PartRouteEval : public eoEvalFunc - { - - public : - - /** Constructor */ - PartRouteEval (float __from, float __to) ; - - void operator () (Route & __route) ; - - private : - - float from, to ; - - } ; - - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_two_opt_init.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_two_opt_init.cpp deleted file mode 100644 index 357b7ecbe..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_two_opt_init.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include - -#include "part_two_opt_init.h" - -void PartTwoOptInit :: operator () (TwoOpt & __move, const Route & __route) -{ - __move.first = rng.random (__route.size () - 6) ; - __move.second = __move.first + 2 ; -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_two_opt_init.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_two_opt_init.h deleted file mode 100644 index 490fe61bf..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_two_opt_init.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef part_two_opt_init_h -#define part_two_opt_init_h - -#include - -#include "two_opt.h" - -/** It sets the first couple of edges */ -class PartTwoOptInit : public moMoveInit - { - - public : - - void operator () (TwoOpt & __move, const Route & __route) ; - - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_two_opt_next.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_two_opt_next.cpp deleted file mode 100644 index 7abc14012..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_two_opt_next.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "part_two_opt_next.h" -#include "graph.h" - -bool PartTwoOptNext :: operator () (TwoOpt & __move, const Route & __route) -{ - if (__move.first == Graph :: size () - 4 && __move.second == __move.first + 2) - { - return false ; - } - else - { - __move.second ++ ; - if (__move.second == Graph :: size () - 1) - { - __move.first ++ ; - __move.second = __move.first + 2 ; - } - - return true ; - } -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_two_opt_next.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_two_opt_next.h deleted file mode 100644 index e2a0c05cc..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/part_two_opt_next.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef part_two_opt_next_h -#define part_two_opt_next_h - -#include -#include "two_opt.h" - -/** It updates a couple of edges */ -class PartTwoOptNext : public moNextMove - { - - public : - - bool operator () (TwoOpt & __move, const Route & __route) ; - - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/partial_mapped_xover.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/partial_mapped_xover.cpp deleted file mode 100644 index ab92d2a3b..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/partial_mapped_xover.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include - -#include - -#include - -#include "partial_mapped_xover.h" -#include "route_valid.h" -#include "mix.h" - -void PartialMappedXover :: repair (Route & __route, unsigned __cut1, unsigned __cut2) -{ - - std::vector v; // Number of times a cities are visited ... - - v.resize(__route.size ()); - - for (unsigned int i = 0 ; i < __route.size () ; i ++) - { - v [i] = 0 ; - } - - for (unsigned int i = 0 ; i < __route.size () ; i ++) - { - v [__route [i]] ++ ; - } - - std :: vector vert ; - - for (unsigned int i = 0 ; i < __route.size () ; i ++) - { - if (! v [i]) - { - vert.push_back (i) ; - } - } - - mix (vert) ; - - for (unsigned int i = 0 ; i < __route.size () ; i ++) - { - if (i < __cut1 || i >= __cut2) - { - if (v [__route [i]] > 1) - { - __route [i] = vert.back () ; - vert.pop_back () ; - } - } - } - - v.clear(); -} - -bool PartialMappedXover :: operator () (Route & __route1, Route & __route2) -{ - unsigned int cut1 = rng.random (__route1.size ()), cut2 = rng.random (__route2.size ()) ; - - if (cut2 < cut1) - { - std :: swap (cut1, cut2) ; - } - - // Between the cuts - for (unsigned int i = cut1 ; i < cut2 ; i ++) - { - std :: swap (__route1 [i], __route2 [i]) ; - } - - // Outside the cuts - repair (__route1, cut1, cut2) ; - repair (__route2, cut1, cut2) ; - - // Debug - assert (valid (__route1)) ; - assert (valid (__route2)) ; - - __route1.invalidate () ; - __route2.invalidate () ; - - return true ; -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/partial_mapped_xover.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/partial_mapped_xover.h deleted file mode 100644 index 65c6474de..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/partial_mapped_xover.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef partial_mapped_xover_h -#define partial_mapped_xover_h - -#include - -#include "route.h" - -/** Partial Mapped Crossover */ -class PartialMappedXover : public eoQuadOp - { - - public : - - bool operator () (Route & __route1, Route & __route2) ; - - private : - - void repair (Route & __route, unsigned __cut1, unsigned __cut2) ; - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/route.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/route.h deleted file mode 100644 index ac9629cbb..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/route.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef route_h -#define route_h - -#include -#include - -// A float that has to be minimized. -typedef eoScalarFitness< float, std::greater > tspFitness ; - -typedef eoVector Route ; // [Fitness (length), Gene (city)] - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_eval.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_eval.cpp deleted file mode 100644 index abde85b99..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_eval.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "route_eval.h" -#include "graph.h" - -void RouteEval :: operator () (Route & __route) -{ - - float len = 0.0 ; - - for (unsigned int i = 0 ; i < Graph :: size () ; i ++) - { - len += Graph :: distance (__route [i], __route [(i + 1) % Graph :: size ()]) ; - } - - __route.fitness (len) ; -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_eval.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_eval.h deleted file mode 100644 index 474075cf0..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_eval.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef route_eval_h -#define route_eval_h - -#include - -#include "route.h" - -/** Route Evaluator */ -class RouteEval : public eoEvalFunc - { - - public : - - void operator () (Route & __route) ; - - } ; - - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_init.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_init.cpp deleted file mode 100644 index 09a2c40cb..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_init.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include - -#include "route_init.h" -#include "graph.h" - -void RouteInit :: operator () (Route & __route) -{ - - // Init. - __route.clear () ; - for (unsigned int i = 0 ; i < Graph :: size () ; i ++) - { - __route.push_back (i) ; - } - - // Swap. cities - - for (unsigned int i = 0 ; i < Graph :: size () ; i ++) - { - //unsigned int j = rng.random (Graph :: size ()) ; - - unsigned int j = (unsigned int) (Graph :: size () * (rand () / (RAND_MAX + 1.0))) ; - unsigned int city = __route [i] ; - __route [i] = __route [j] ; - __route [j] = city ; - } -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_init.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_init.h deleted file mode 100644 index 466345c1b..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_init.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef route_init_h -#define route_init_h - -#include - -#include "route.h" - -class RouteInit : public eoInit - { - - public : - - void operator () (Route & __route) ; - - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_valid.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_valid.cpp deleted file mode 100644 index 844cebf82..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_valid.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "route_valid.h" - -#include - -bool valid (Route & __route) -{ - - std::vector t; - t.resize(__route.size()); - - for (unsigned int i = 0 ; i < __route.size () ; i ++) - { - t [i] = 0 ; - } - - for (unsigned int i = 0 ; i < __route.size () ; i ++) - { - t [__route [i]] ++ ; - } - - for (unsigned int i = 0 ; i < __route.size () ; i ++) - { - if (t [i] != 1) - { - t.clear(); - return false ; - } - } - - t.clear(); - return true ; // OK. -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_valid.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_valid.h deleted file mode 100644 index 607728e8b..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/route_valid.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef route_valid_h -#define route_valid_h - -#include "route.h" - -bool valid (Route & __route) ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/tsp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/tsp deleted file mode 100644 index adf8189ca..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/tsp +++ /dev/null @@ -1,41 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -#ifndef __tsp -#define __tsp - -#include "tsp.h" - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/tsp.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/tsp.h deleted file mode 100644 index ba249a794..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/tsp.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __tsp_h -#define __tsp_h - -#include "city_swap.h" -#include "edge_xover.h" -#include "graph.h" -#include "mix.h" -#include "order_xover.h" -#include "partial_mapped_xover.h" -#include "part_route_eval.h" -#include "part_two_opt_init.h" -#include "part_two_opt_next.h" -#include "route_eval.h" -#include "route.h" -#include "route_init.h" -#include "route_valid.h" -#include "two_opt.h" -#include "two_opt_incr_eval.h" -#include "two_opt_init.h" -#include "two_opt_next.h" -#include "two_opt_rand.h" -#include "two_opt_tabu_list.h" - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt.cpp deleted file mode 100644 index 146c6c6c2..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "two_opt.h" - -TwoOpt TwoOpt :: operator ! () const - { - TwoOpt move = * this ; - std :: swap (move.first, move.second) ; - - return move ; - } - -void TwoOpt :: operator () (Route & __route) -{ - - std :: vector seq_cities ; - - for (unsigned int i = second ; i > first ; i --) - { - seq_cities.push_back (__route [i]) ; - } - - unsigned int j = 0 ; - for (unsigned int i = first + 1 ; i < second + 1 ; i ++) - { - __route [i] = seq_cities [j ++] ; - } -} - -void TwoOpt :: readFrom (std :: istream & __is) -{ - __is >> first >> second ; -} - -void TwoOpt :: printOn (std :: ostream & __os) const - { - __os << first << ' ' << second ; - } diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt.h deleted file mode 100644 index 6b9cf435f..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef two_opt_h -#define two_opt_h - -#include - -#include -#include - -#include "route.h" - -class TwoOpt : public moMove , public std :: pair , public eoPersistent - { - - public : - - TwoOpt operator ! () const ; - - void operator () (Route & __route) ; - - void readFrom (std :: istream & __is) ; - - void printOn (std :: ostream & __os) const ; - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_incr_eval.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_incr_eval.cpp deleted file mode 100644 index 2d4657b73..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_incr_eval.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "two_opt_incr_eval.h" -#include "graph.h" - -tspFitness TwoOptIncrEval :: operator () (const TwoOpt & __move, const Route & __route) -{ - // From - unsigned int v1 = __route [__move.first], v1_next = __route [__move.first + 1] ; - - // To - unsigned int v2 = __route [__move.second], v2_next = __route [__move.second + 1] ; - - return __route.fitness () - + Graph :: distance (v1, v2) - + Graph :: distance (v1_next, v2_next) - - Graph :: distance (v1, v1_next) - - Graph :: distance (v2, v2_next) ; -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_incr_eval.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_incr_eval.h deleted file mode 100644 index 91ffca098..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_incr_eval.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef two_optincr_eval_h -#define two_optincr_eval_h - -#include -#include "two_opt.h" - -class TwoOptIncrEval : public moMoveIncrEval - { - public : - - tspFitness operator () (const TwoOpt & __move, const Route & __route) ; - - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_init.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_init.cpp deleted file mode 100644 index 2e593db0a..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_init.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "two_opt_init.h" - -void TwoOptInit :: operator () (TwoOpt & _move, const Route & _route) -{ - Route route=_route; - - _move.first = 0 ; - _move.second = 2 ; -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_init.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_init.h deleted file mode 100644 index 1b2a5e376..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_init.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef two_opt_init_h -#define two_opt_init_h - -#include - -#include "two_opt.h" - -/** It sets the first couple of edges */ -class TwoOptInit : public moMoveInit - { - - public : - - void operator () (TwoOpt & _move, const Route & _route) ; - - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_next.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_next.cpp deleted file mode 100644 index 2438390fd..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_next.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "two_opt_next.h" -#include "graph.h" - -bool TwoOptNext :: operator () (TwoOpt & _move, const Route & _route) -{ - Route route=_route; - - if (_move.first == Graph :: size () - 4 && _move.second == _move.first + 2) - { - return false ; - } - else - { - _move.second ++ ; - if (_move.second == Graph :: size () - 1) - { - _move.first ++ ; - _move.second = _move.first + 2 ; - } - - return true ; - } -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_next.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_next.h deleted file mode 100644 index f57595cd6..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_next.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef two_opt_next_h -#define two_opt_next_h - -#include -#include "two_opt.h" - -/** It updates a couple of edges */ -class TwoOptNext : public moNextMove - { - - public : - - bool operator () (TwoOpt & _move, const Route & _route) ; - - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_rand.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_rand.cpp deleted file mode 100644 index 956bddfb0..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_rand.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "two_opt_rand.h" -#include "graph.h" -#include - -void TwoOptRand :: operator () (TwoOpt & __move) -{ - __move.first = rng.random (Graph :: size () - 3) ; - __move.second = __move.first + 2 + rng.random (Graph :: size () - __move.first - 3) ; -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_rand.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_rand.h deleted file mode 100644 index e6e0bdff2..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_rand.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef two_opt_rand_h -#define two_opt_rand_h - -#include - -#include "two_opt.h" - -class TwoOptRand : public moRandMove - { - - public : - - void operator () (TwoOpt & __move) ; - - } ; - -#endif diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_tabu_list.cpp b/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_tabu_list.cpp deleted file mode 100644 index 290eef7f7..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_tabu_list.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "two_opt_tabu_list.h" -#include "graph.h" - -#define TABU_LENGTH 10 - -void -TwoOptTabuList :: init () -{ - // Size (eventually) - tabu_span.resize (Graph :: size ()) ; - for (unsigned int i = 0 ; i < tabu_span.size () ; i ++) - { - tabu_span [i].resize (Graph :: size ()) ; - } - - // Clear - for (unsigned int i = 0 ; i < tabu_span.size () ; i ++) - { - for (unsigned int j = 0 ; j < tabu_span [i].size () ; j ++) - { - tabu_span [i] [j] = 0 ; - } - } -} - -bool -TwoOptTabuList :: operator () (const TwoOpt & _move, const Route & _route) -{ - Route route=_route; - - return tabu_span [_move.first] [_move.second] > 0 ; -} - -void -TwoOptTabuList :: add (const TwoOpt & _move, const Route & _route) - { - Route route=_route; - - tabu_span [_move.first] [_move.second] = tabu_span [_move.second] [_move.first] = TABU_LENGTH ; - } - -void -TwoOptTabuList :: update () -{ - unsigned int i,j; - - for (i = 0 ; i < tabu_span.size () ; i ++) - { - for (j = 0 ; j < tabu_span [i].size () ; j ++) - { - if ( tabu_span [i] [j] > 0 ) - { - tabu_span [i] [j] -- ; - } - } - } -} diff --git a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_tabu_list.h b/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_tabu_list.h deleted file mode 100644 index 236919f69..000000000 --- a/trunk/paradiseo-old-mo/tutorial/examples/tsp/two_opt_tabu_list.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 -* (C) OPAC Team, LIFL, 2002-2007 -* -* Sébastien Cahon, Jean-Charles Boisson -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef two_opt_tabu_list_h -#define two_opt_tabu_list_h - -#include -#include "two_opt.h" -#include "route.h" - -/** The table of tabu movements, i.e. forbidden edges */ -class TwoOptTabuList : public moTabuList - { - public : - - bool operator () (const TwoOpt & _move, const Route & _route) ; - - void add (const TwoOpt & _move, const Route & _route) ; - - void update () ; - - void init () ; - - private : - - std :: vector > tabu_span ; - - } ; - -#endif diff --git a/trunk/paradiseo-peo/AUTHORS b/trunk/paradiseo-peo/AUTHORS deleted file mode 100644 index 7c66563a7..000000000 --- a/trunk/paradiseo-peo/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -Alexandru-Adrian Tantar -Clive Canape -Sébastien Cahon diff --git a/trunk/paradiseo-peo/CMakeLists.txt b/trunk/paradiseo-peo/CMakeLists.txt deleted file mode 100644 index f22c8d5b6..000000000 --- a/trunk/paradiseo-peo/CMakeLists.txt +++ /dev/null @@ -1,72 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - -########################################################################################################################################## -### 0) If you want to set your own variables in peo-conf.cmake and avoid the cmd line -########################################################################################################################################## - -INCLUDE(peo-conf.cmake OPTIONAL) - -########################################################################################################################################## - - -###################################################################################### -### 1) Preliminary checking -###################################################################################### - -# check libxml2 -FIND_PROGRAM(XML2_CONFIG_PROGRAM NAMES xml2-config PATHS /usr/local/bin /usr/bin DOC "The libxml2 (www.xmlsoft.org) configuration tool") - -#IF(NOT XML2_CONFIG_PROGRAM) - #MESSAGE(FATAL_ERROR "Libxml2 cannot be found on your system. Libxml2 is required for ParadisEO-PEO install") -#ENDIF(NOT XML2_CONFIG_PROGRAM) - -# set libxml2 cflags in XML2_CFLAGS -EXECUTE_PROCESS(COMMAND ${XML2_CONFIG_PROGRAM} --cflags OUTPUT_VARIABLE XML2_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) - -# set libxml2 libs in XML2_LIBSINCLUDE(FindLibXml2) -EXECUTE_PROCESS(COMMAND ${XML2_CONFIG_PROGRAM} --libs OUTPUT_VARIABLE XML2_LIBS) - -IF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4) - STRING(STRIP ${XML2_LIBS} XML2_LIBS) -ELSEIF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - STRING(REGEX REPLACE "^ " "" XML2_LIBS ${XML2_LIBS}) - STRING(REGEX REPLACE "( +)$" "" XML2_LIBS ${XML2_LIBS}) -ENDIF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4) - - -###################################################################################### - - -########################################################################################################################################## -### 2) Project properties -########################################################################################################################################## - -# set the project name -PROJECT(ParadisEO-PEO) - -SET(PACKAGE_BUGREPORT "paradiseo-help@lists.gforge.inria.fr" CACHE STRING "Package bug report" FORCE) -SET(PACKAGE_NAME "ParadisEO-PEO - Parallel and distributed Evolving Objects" CACHE STRING "Package name" FORCE) -SET(PACKAGE_STRING "ParadisEO-PEO 1.3" CACHE STRING "PEO Package string full name" FORCE) -SET(PACKAGE_VERSION "1.3" CACHE STRING "Package version" FORCE) -SET(GLOBAL_VERSION "1.3" CACHE STRING "Global version" FORCE) -SET(VERSION "1.3" CACHE STRING "Version" FORCE) -########################################################################################################################################## - - -########################################################################################################################################## -### 3) Include the common CMake configuration -########################################################################################################################################## - -# The "config" variable must be provided on the command line -IF(NOT DEFINED config OR NOT config) - MESSAGE(FATAL_ERROR "The \"config\" variable must be set on the command line to - give the path of the install configuration file. ") -ENDIF(NOT DEFINED config OR NOT config) - -# Need the config file whose full path is given thanks to the "config" variable -INCLUDE(${config}) -########################################################################################################################################## - - - - diff --git a/trunk/paradiseo-peo/CTestConfig.cmake b/trunk/paradiseo-peo/CTestConfig.cmake deleted file mode 100644 index 465d208d6..000000000 --- a/trunk/paradiseo-peo/CTestConfig.cmake +++ /dev/null @@ -1,7 +0,0 @@ -set(CTEST_PROJECT_NAME "ParadisEO") -set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") - -set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "cdash.inria.fr") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ParadisEO") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/trunk/paradiseo-peo/README b/trunk/paradiseo-peo/README deleted file mode 100755 index d74cb5d67..000000000 --- a/trunk/paradiseo-peo/README +++ /dev/null @@ -1,76 +0,0 @@ - PARADISEO-PEO README FILE -======================================================================= - check latest news at http://paradiseo.gforge.inria.fr/ -======================================================================= - -Welcome to ParadisEO-PEO, the Parallel Evolving Objects library. -The latest news about ParadisEO-PEO can be found on the gforge repository at -http://paradiseo.gforge.inria.fr/ -In case of any problem, please e-mail us at -paradiseo-help@lists.gforge.inria.fr - - -======================================================================= - BUILDING PARADISEO-PEO -======================================================================= -The basic installation procedure goes the following. - -To compile paradiseo-peo in the default directory, -go to paradiseo-peo/build/ and run: - > cmake ../ -Dconfig= - > make - // for an easy-use of the provided lessons - > make install - // optional (if the documentation is not already available) - > make doc - -To compile paradiseo-peo anywhere else, simply run: - > cmake $(PEO) -Dconfig= - > make - // for an easy-use of the provided lessons - > make install - // optional (if the documentation is not already available) - > make doc - -To clean everything, simply run - > make clean - - -=================================================================== - DIRECTORY STRUCTURE -=================================================================== -After unpacking the archive file, you should end up with the following -structure: - -.../ The main PARADISEO-PEO directory, created when unpacking. - | - +-- build BUILD directory that contains libraries and executable files. - | - +-- src SOURCE directory Contains most PARADISEO-PEO .h files. - | - +-- doc DOCUMENTATION directory (generated by Doxygen). - | | - | +- html HTML files - start at index.html. - | | - | +- latex latex files - use to generate Postcript doc. - | | - | +- man Unix man format documentation. - | - | - +-- tutorial APPLICATIONS - | - +-- examples TSP - | - +-- Lesson1 Parallel evaluation for EA and PSO - | - +-- Lesson2 Parallel transformation (crossover + mutation) for EA - | - +-- Lesson3 Insular model for PSO and EA - | - +-- Lesson4 Hybridization - -=================================================================== - NOTES -=================================================================== - -Mailing list : paradiseo-help@lists.gforge.inria.fr diff --git a/trunk/paradiseo-peo/doc/CMakeLists.txt b/trunk/paradiseo-peo/doc/CMakeLists.txt deleted file mode 100644 index 5934e8857..000000000 --- a/trunk/paradiseo-peo/doc/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ - -########################################################################################## -### PEO Doc generation using Doxygen -########################################################################################## - -IF (DOXYGEN_FOUND) - - SET(DOC_DIR ${CMAKE_BINARY_DIR}/doc CACHE PATH "PEO documentation directory") - SET(PEO_DOC_CONFIG_FILE "peo.doxyfile" CACHE PATH "PEO documentation configuration file") - # define the doc target - IF (DOXYGEN_EXECUTABLE) - ADD_CUSTOM_TARGET(doc - COMMAND ${DOXYGEN_EXECUTABLE} ${PEO_DOC_CONFIG_FILE} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - ENDIF (DOXYGEN_EXECUTABLE) - - # configure doxyfile file - CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/doc/${PEO_DOC_CONFIG_FILE}.cmake" - "${CMAKE_BINARY_DIR}/doc/${PEO_DOC_CONFIG_FILE}") - -ELSE (DOXYGEN_FOUND) - MESSAGE(STATUS "Unable to generate the documentation, Doxygen package not found") -ENDIF (DOXYGEN_FOUND) - -########################################################################################## \ No newline at end of file diff --git a/trunk/paradiseo-peo/doc/peo.doxyfile.cmake b/trunk/paradiseo-peo/doc/peo.doxyfile.cmake deleted file mode 100644 index 3ce2bd9c0..000000000 --- a/trunk/paradiseo-peo/doc/peo.doxyfile.cmake +++ /dev/null @@ -1,239 +0,0 @@ -# Doxyfile 1.4.7 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = @PACKAGE_NAME@ -PROJECT_NUMBER = @PACKAGE_VERSION@ -OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doc -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = NO -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = NO -WARN_IF_UNDOCUMENTED = NO -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = @CMAKE_SOURCE_DIR@ -FILE_PATTERNS = *.cpp \ - *.h \ - NEWS \ - README -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 3 -IGNORE_PREFIX = peo -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = YES -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = YES -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = @EO_BIN_DIR@/doc/eo.doxytag=http://eodev.sourceforge.net/eo/doc/html \ - @MO_BIN_DIR@/doc/mo.doxytag=@MO_BIN_DIR@/doc/html -GENERATE_TAGFILE = @CMAKE_BINARY_DIR@/doc/peo.doxytag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = YES diff --git a/trunk/paradiseo-peo/src/core/CMakeLists.txt b/trunk/paradiseo-peo/src/core/CMakeLists.txt deleted file mode 100644 index 04cad69fd..000000000 --- a/trunk/paradiseo-peo/src/core/CMakeLists.txt +++ /dev/null @@ -1,48 +0,0 @@ - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${MOEO_SRC_DIR}/src) -###################################################################################### - - -###################################################################################### -### 2) Define your target(s): just the peo library here -###################################################################################### - -SET(CORE_LIB_OUTPUT_PATH ${ParadisEO-PEO_BINARY_DIR}/lib) -SET(LIBRARY_OUTPUT_PATH ${CORE_LIB_OUTPUT_PATH}) - -SET (CORE_SOURCES peo_init.cpp - peo_fin.cpp - peo_run.cpp - peo_param.cpp - peo_debug.cpp - thread.cpp - reac_thread.cpp - service.cpp - runner.cpp - communicable.cpp - topology.cpp - ring_topo.cpp - star_topo.cpp - random_topo.cpp - complete_topo.cpp) - - - -ADD_LIBRARY(peo STATIC ${CORE_SOURCES}) - -###################################################################################### - - -###################################################################################### -### 3) Optionnal: define your target(s)'s version: no effect for windows -###################################################################################### - -SET(CORE_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(peo PROPERTIES VERSION "${CORE_VERSION}") -###################################################################################### - diff --git a/trunk/paradiseo-peo/src/core/communicable.cpp b/trunk/paradiseo-peo/src/core/communicable.cpp deleted file mode 100644 index 382973f93..000000000 --- a/trunk/paradiseo-peo/src/core/communicable.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include -#include -#include - -#include "communicable.h" - -static std :: vector key_to_comm (1); /* Vector of registered cooperators */ - -static std :: map comm_to_key; /* Map of registered cooperators */ - -unsigned Communicable :: num_comm = 0; - - -Communicable :: Communicable () -{ - - comm_to_key [this] = key = ++ num_comm; - key_to_comm.push_back (this); - sem_init (& sem_lock, 0, 1); - sem_init (& sem_stop, 0, 0); -} - -Communicable :: ~ Communicable () -{ -} - -COMM_ID Communicable :: getKey () -{ - - return key; -} - -Communicable * getCommunicable (COMM_ID __key) -{ - - assert (__key < key_to_comm.size ()); - return key_to_comm [__key]; -} - -COMM_ID getKey (const Communicable * __comm) -{ - - return comm_to_key [__comm]; -} - -void Communicable :: lock () -{ - - sem_wait (& sem_lock); -} - -void Communicable :: unlock () -{ - - sem_post (& sem_lock); -} - -void Communicable :: stop () -{ - sem_wait (& sem_stop); -} - -void Communicable :: resume () -{ - - sem_post (& sem_stop); -} - -void initCommunicableEnv () -{ - - key_to_comm.resize (1); - comm_to_key.clear (); - Communicable :: num_comm = 0; -} diff --git a/trunk/paradiseo-peo/src/core/communicable.h b/trunk/paradiseo-peo/src/core/communicable.h deleted file mode 100644 index 6f05cad45..000000000 --- a/trunk/paradiseo-peo/src/core/communicable.h +++ /dev/null @@ -1,79 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __communicable_h -#define __communicable_h - -#include - - -typedef unsigned COMM_ID; - -class Communicable - { - - public : - - Communicable (); - - virtual ~ Communicable (); - - COMM_ID getKey (); - - void lock (); /* It suspends the current process if the semaphore is locked */ - void unlock (); /* It unlocks the shared semaphore */ - - void stop (); /* It suspends the current process */ - void resume (); /* It resumes ___________ */ - - public : - - static unsigned num_comm; - - protected : - - COMM_ID key; - - sem_t sem_lock; - - sem_t sem_stop; - }; - -extern void initCommunicableEnv (); - -extern Communicable * getCommunicable (COMM_ID __key); - -#endif diff --git a/trunk/paradiseo-peo/src/core/complete_topo.cpp b/trunk/paradiseo-peo/src/core/complete_topo.cpp deleted file mode 100644 index 408e64b58..000000000 --- a/trunk/paradiseo-peo/src/core/complete_topo.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include -#include "complete_topo.h" - -void CompleteTopology :: setNeighbors (Cooperative * __mig, - std :: vector & __from, - std :: vector & __to) -{ - - __from.clear () ; - __to.clear () ; - - for (unsigned i = 0; i < mig.size (); i ++) - { - if (mig [i] != __mig) - { - __from.push_back (mig [i]); - __to.push_back (mig [i]); - } - } -} diff --git a/trunk/paradiseo-peo/src/core/complete_topo.h b/trunk/paradiseo-peo/src/core/complete_topo.h deleted file mode 100644 index f5513ea20..000000000 --- a/trunk/paradiseo-peo/src/core/complete_topo.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __complete_topo_h -#define __complete_topo_h - -#include "topology.h" - -class CompleteTopology : public Topology - { - - public : - - void setNeighbors (Cooperative * __mig, - std :: vector & __from, - std :: vector & __to); - }; - -#endif diff --git a/trunk/paradiseo-peo/src/core/cooperative.h b/trunk/paradiseo-peo/src/core/cooperative.h deleted file mode 100644 index c103739b3..000000000 --- a/trunk/paradiseo-peo/src/core/cooperative.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __cooperative_h -#define __cooperative_h - -#include -#include "communicable.h" -#include "runner.h" - -typedef unsigned COOP_ID; - -class Cooperative : public Communicable - { - - public : - - Runner * getOwner (); - - void setOwner (Runner & __runner); - - virtual void pack () = 0; - - virtual void unpack () = 0; - - virtual void packSynchronizeReq () = 0; - - void send (Cooperative * __coop); - - void synchronizeCoopEx (); - - virtual void notifySending (); - - virtual void notifyReceiving (); - - virtual void notifySendingSyncReq (); - - virtual void notifySynchronized (); - - private : - - Runner * owner; - - }; - -extern Cooperative * getCooperative (COOP_ID __key); - -#endif diff --git a/trunk/paradiseo-peo/src/core/eoPop_mesg.h b/trunk/paradiseo-peo/src/core/eoPop_mesg.h deleted file mode 100644 index a8645cedd..000000000 --- a/trunk/paradiseo-peo/src/core/eoPop_mesg.h +++ /dev/null @@ -1,83 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __eoPop_mesg_h -#define __eoPop_mesg_h - -#include - -#include "messaging.h" - - -template void pack (eoPop & __pop) -{ - - pack ((unsigned) __pop.size ()); - for (unsigned i = 0; i < __pop.size (); i ++) - pack (__pop [i]); -} - -template void unpack (eoPop & __pop) -{ - - unsigned n; - - unpack (n); - __pop.resize (n); - for (unsigned i = 0; i < n; i ++) - unpack (__pop [i]); -} - -template void pack (moeoArchive < MOEOT > & __pop) -{ - - pack ((unsigned) __pop.size ()); - for (unsigned i = 0; i < __pop.size (); i ++) - pack (__pop [i]); -} - -template void unpack (moeoArchive < MOEOT > & __pop) -{ - - unsigned n; - - unpack (n); - __pop.resize (n); - for (unsigned i = 0; i < n; i ++) - unpack (__pop [i]); -} - -#endif diff --git a/trunk/paradiseo-peo/src/core/eoVector_mesg.h b/trunk/paradiseo-peo/src/core/eoVector_mesg.h deleted file mode 100644 index 7ac61d4aa..000000000 --- a/trunk/paradiseo-peo/src/core/eoVector_mesg.h +++ /dev/null @@ -1,244 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __eoVector_mesg_h -#define __eoVector_mesg_h - -#include - -#include -#include - -#include "messaging.h" - - - -template void pack (const eoVector & __v) -{ - - if (__v.invalid()) - { - pack((unsigned)0); - } - else - { - pack((unsigned)1); - pack (__v.fitness ()); - } - - unsigned len = __v.size (); - pack (len); - for (unsigned i = 0 ; i < len; i ++) - pack (__v [i]); -} - -template void unpack (eoVector & __v) -{ - - unsigned valid; - unpack(valid); - - if (! valid) - { - __v.invalidate(); - } - else - { - F fit; - unpack (fit); - __v.fitness (fit); - } - - unsigned len; - unpack (len); - __v.resize (len); - for (unsigned i = 0 ; i < len; i ++) - unpack (__v [i]); -} - -template void pack (const eoVectorParticle & __v) -{ - - if (__v.invalid()) - { - pack((unsigned)0); - } - else - { - pack((unsigned)1); - pack (__v.fitness ()); - pack (__v.best()); - } - - unsigned len = __v.size (); - pack (len); - for (unsigned i = 0 ; i < len; i ++) - pack (__v [i]); - for (unsigned i = 0 ; i < len; i ++) - pack (__v.bestPositions[i]); - for (unsigned i = 0 ; i < len; i ++) - pack (__v.velocities[i]); -} - - - -template void unpack (eoVectorParticle & __v) -{ - - unsigned valid; - unpack(valid); - - if (! valid) - { - __v.invalidate(); - } - else - { - F fit; - unpack (fit); - __v.fitness (fit); - unpack(fit); - __v.best(fit); - - } - unsigned len; - unpack (len); - __v.resize (len); - for (unsigned i = 0 ; i < len; i ++) - unpack (__v [i]); - for (unsigned i = 0 ; i < len; i ++) - unpack (__v.bestPositions[i]); - for (unsigned i = 0 ; i < len; i ++) - unpack (__v.velocities[i]); -} - - -template void unpack (moeoObjectiveVector _objVec) -{ - unsigned int len; - - unpack (len); - _objVec.resize(len); - for (unsigned i = 0 ; i < len; i ++) - unpack (_objVec[i]); -} - - -template void pack (const moeoObjectiveVector & _objVec) -{ - unsigned int len = _objVec.nObjectives(); - pack(len); - for (unsigned i=0; i void pack (moeoVector &_v) -{ - if (_v.invalid()) - pack((unsigned)0); - else - { - pack((unsigned)1); - pack (_v.fitness ()); - } - if (_v.invalidDiversity()) - pack((unsigned)0); - else - { - pack((unsigned)1); - pack(_v.diversity()); - } - unsigned len = _v.size (); - pack (len); - for (unsigned i = 0 ; i < len; i ++) - pack (_v[i]); - if (_v.invalidObjectiveVector()) - pack((unsigned)0); - else - { - pack((unsigned)1); - F object; - object=_v.objectiveVector(); - len=object.nObjectives(); - pack (len); - for (unsigned i = 0 ; i < len; i ++) - pack (object[i]); - } -} - -template void unpack (moeoVector &_v) -{ - unsigned valid; - unpack(valid); - if (! valid) - _v.invalidate(); - else - { - T fit; - unpack (fit); - _v.fitness (fit); - } - unpack(valid); - if (! valid) - _v.invalidateDiversity(); - else - { - V diver; - unpack(diver); - _v.diversity(diver); - } - unsigned len; - unpack (len); - _v.resize (len); - for (unsigned i = 0 ; i < len; i ++) - unpack (_v [i]); - unpack(valid); - if (! valid) - _v.invalidateObjectiveVector(); - else - { - F object; - unpack (len); - object.resize(len); - for (unsigned i = 0 ; i < len; i ++) - unpack (object[i]); - _v.objectiveVector(object); - } -} - -#endif diff --git a/trunk/paradiseo-peo/src/core/messaging.h b/trunk/paradiseo-peo/src/core/messaging.h deleted file mode 100644 index 0623f67ca..000000000 --- a/trunk/paradiseo-peo/src/core/messaging.h +++ /dev/null @@ -1,145 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __mess_h -#define __mess_h - -#include -#include - -/* Char */ -extern void pack (const char & __c); - -/* Boolean */ -extern void pack (const bool & __b, int __nitem = 1); - -/* Float */ -extern void pack (const float & __f, int __nitem = 1); - -/* Double */ -extern void pack (const double & __d, int __nitem = 1); - -/* Integer */ -extern void pack (const int & __i, int __nitem = 1); - -/* Unsigned int. */ -extern void pack (const unsigned int & __ui, int __nitem = 1); - -/* Short int. */ -extern void pack (const short & __sh, int __nitem = 1); - -/* Unsigned short */ -extern void pack (const unsigned short & __ush, int __nitem = 1); - -/* Long */ -extern void pack (const long & __l, int __nitem = 1); - -/* Unsigned long */ -extern void pack (const unsigned long & __ul, int __nitem = 1); - -/* String */ -extern void pack (const char * __str); -extern void pack (const std::string & __str); - -/* Pointer */ -template void pack (const T * __ptr) -{ - - pack ((unsigned long) __ptr); -} - -/* Pair */ -template void pack (const std :: pair & __pair) -{ - - pack (__pair.first); - pack (__pair.second); -} - - - -/* Char */ -extern void unpack (char & __c); - -/* Boolean */ -extern void unpack (bool & __b, int __nitem = 1); - -/* Float */ -extern void unpack (float & __f, int __nitem = 1); - -/* Double */ -extern void unpack (double & __d, int __nitem = 1); - -/* Integer */ -extern void unpack (int & __i, int __nitem = 1); - -/* Unsigned int. */ -extern void unpack (unsigned int & __ui, int __nitem = 1); - -/* Short int. */ -extern void unpack (short & __sh, int __nitem = 1); - -/* Unsigned short */ -extern void unpack (unsigned short & __ush, int __nitem = 1); - -/* Long */ -extern void unpack (long & __l, int __nitem = 1); - -/* Unsigned long */ -extern void unpack (unsigned long & __ul, int __nitem = 1); - -/* String */ -extern void unpack (char * __str); -extern void unpack (std::string & __str); - -/* Pointer */ -template void unpack (T * & __ptr) -{ - - unsigned long p; - unpack (p); - __ptr = (T *) p; -} - -/* Pair */ -template void unpack (std :: pair & __pair) -{ - - unpack (__pair.first); - unpack (__pair.second); -} - -#endif diff --git a/trunk/paradiseo-peo/src/core/packUnpackeoScalarFitness.h b/trunk/paradiseo-peo/src/core/packUnpackeoScalarFitness.h deleted file mode 100644 index c8cb80b5b..000000000 --- a/trunk/paradiseo-peo/src/core/packUnpackeoScalarFitness.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - C++ Interface: packUnpackeoScalarFitness - -(c) TAO Project Team of INRIA Saclay, 2010 Thales group - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Contact: http://eodev.sourceforge.net - -Authors: - Mostepha-Redouane Khouadjia - Johann Dréo -*/ -#ifndef _packUnpackeoScalarFitness_h -#define _packUnpackeoScalarFitness_h - -#include "messaging.h" - -#include -#include - - -template -void pack( const eoScalarFitness < ScalarType, std::less > & __fit ) { - - ScalarType value = __fit; // pack the scalar type of the fitness ( see operator ScalarType () in ) - - pack( value ); - - } - - - - -template -void pack( const eoScalarFitness < ScalarType, std::greater > & __fit ) { - - ScalarType value = __fit; // same as for less - - pack( value ); - - } - - -template -void unpack( eoScalarFitness < ScalarType, std::less > & __fit ) { - - ScalarType value ; - - unpack( value ); - - } - - - - -template -void unpack( eoScalarFitness < ScalarType, std::greater > & __fit ) { - - ScalarType value ; - - unpack( value ); - - } - - -#endif - diff --git a/trunk/paradiseo-peo/src/core/peoAbstractDefs.h b/trunk/paradiseo-peo/src/core/peoAbstractDefs.h deleted file mode 100755 index b9fa96c2c..000000000 --- a/trunk/paradiseo-peo/src/core/peoAbstractDefs.h +++ /dev/null @@ -1,289 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Alexandru-Adrian TANTAR -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#if !defined __peoAbstractDefs_h -#define __peoAbstractDefs_h - - -#include - -#include "core/messaging.h" - - - -template < typename Type > struct Entity; - -struct AbstractEntity - { - - virtual ~AbstractEntity() {} - - template < typename EntityType > operator EntityType& () - { - - return ( reinterpret_cast< Entity< EntityType >& >( *this ) ).entity; - } - }; - -struct AbstractFunctor : virtual public AbstractEntity - { - - virtual ~AbstractFunctor() {} - - virtual void operator()() {} - }; - -struct AbstractUnaryFunctor : virtual public AbstractEntity - { - - virtual ~AbstractUnaryFunctor() {} - - virtual void operator()( AbstractEntity& dataEntity ) {} - }; - -struct AbstractBinaryFunctor : virtual public AbstractEntity - { - - virtual ~AbstractBinaryFunctor() {} - - virtual void operator()( AbstractEntity& dataEntityA, AbstractEntity& dataEntityB ) {}; - }; - - - -template < typename EntityType > struct Entity : virtual public AbstractEntity - { - - Entity( EntityType& externalEntityRef ) : entity( externalEntityRef ) {} - - EntityType& entity; - }; - -template < typename FunctorType, typename DataType > struct FunctorEx : public Entity< DataType >, public AbstractFunctor - { - - FunctorEx( FunctorType& externalFunctorRef, DataType& externalDataRef ) - : externalFunctor( externalFunctorRef ), Entity< DataType >( externalDataRef ) {} - - void operator()() - { - - externalFunctor( Entity< DataType > :: entity ); - } - - FunctorType& externalFunctor; - }; - -template < typename FunctorType > struct FunctorEx< FunctorType, void > : public Entity< AbstractEntity >, public AbstractFunctor - { - - FunctorEx( FunctorType& externalFunctorRef ) - : externalFunctor( externalFunctorRef ), Entity< AbstractEntity >( *this ) {} - - void operator()() - { - - externalFunctor(); - } - - FunctorType& externalFunctor; - }; - -template < typename ReturnType, typename DataType > struct FnFunctorEx - : public Entity< DataType >, public AbstractFunctor - { - - FnFunctorEx( ReturnType (*externalFunctorRef)( DataType& ), DataType& externalDataRef ) - : externalFunctor( externalFunctorRef ), Entity< DataType >( externalDataRef ) {} - - void operator()() - { - - externalFunctor( Entity< DataType > :: entity ); - } - - ReturnType (*externalFunctor)( DataType& ); - }; - -template < typename ReturnType > struct FnFunctorEx< ReturnType, void > - : public Entity< AbstractEntity >, public AbstractFunctor - { - - FnFunctorEx( ReturnType (*externalFunctorRef)() ) - : externalFunctor( externalFunctorRef ), Entity< AbstractEntity >( *this ) {} - - void operator()() - { - - externalFunctor(); - } - - ReturnType (*externalFunctor)(); - }; - - - -template < typename FunctorType > struct UnaryFunctor : public Entity< FunctorType >, public AbstractUnaryFunctor - { - - UnaryFunctor( FunctorType& externalFunctorRef ) : Entity< FunctorType >( externalFunctorRef ) {} - - void operator()( AbstractEntity& dataEntity ) - { - - Entity< FunctorType > :: entity( dataEntity ); - } - }; - -template < typename ReturnType, typename DataType > struct UnaryFnFunctor - : public Entity< AbstractEntity >, public AbstractUnaryFunctor - { - - UnaryFnFunctor( ReturnType (*externalFnRef)( DataType& ) ) : Entity< AbstractEntity >( *this ), externalFn( externalFnRef ) - { - } - - void operator()( AbstractEntity& dataEntity ) - { - - externalFn( dataEntity ); - } - - ReturnType (*externalFn)( DataType& ); - }; - -template < typename FunctorType > struct BinaryFunctor : public Entity< FunctorType >, public AbstractBinaryFunctor - { - - BinaryFunctor( FunctorType& externalFunctorRef ) : Entity< FunctorType >( externalFunctorRef ) {} - - void operator()( AbstractEntity& dataEntityA, AbstractEntity& dataEntityB ) - { - - Entity< FunctorType > :: entity( dataEntityA, dataEntityB ); - } - }; - -struct AbstractMsgTransferQueue : virtual public AbstractEntity - { - - virtual ~AbstractMsgTransferQueue() {} - - virtual void pushMessage() {} - virtual void popMessage() {} - - virtual bool empty() - { - return true; - } - - virtual void packMessage() {} - virtual void unpackMessage() {} - }; - -template < typename EntityType > struct MsgTransferQueue : public Entity< EntityType >, public AbstractMsgTransferQueue - { - - MsgTransferQueue( EntityType& externalDataRef ) - : Entity< EntityType >( externalDataRef ) - { - - aggregationFunctor = new BinaryFunctor< AssignmentFunctor >( assignmentFunctor ); - } - - template < typename FunctorType > - MsgTransferQueue( EntityType& externalDataRef, FunctorType& externalFunctorRef ) - : Entity< EntityType >( externalDataRef ) - { - - aggregationFunctor = new BinaryFunctor< FunctorType >( externalFunctorRef ); - } - - ~MsgTransferQueue() - { - delete aggregationFunctor; - } - - void pushMessage() - { - - transferQueue.push( Entity< EntityType > :: entity ); - } - - void popMessage() - { - - Entity< EntityType > message( transferQueue.front() ); - aggregationFunctor->operator()( *this, message ); - - transferQueue.pop(); - } - - bool empty() - { - return transferQueue.empty(); - } - - void packMessage() - { - - pack( transferQueue.front() ); - transferQueue.pop(); - } - - void unpackMessage() - { - - EntityType transferredData; - unpack( transferredData ); - transferQueue.push( transferredData ); - } - - struct AssignmentFunctor - { - void operator()( EntityType& A, EntityType& B ) - { - A = B; - } - } assignmentFunctor; - - std::queue< EntityType > transferQueue; - AbstractBinaryFunctor* aggregationFunctor; - }; - - - -#endif diff --git a/trunk/paradiseo-peo/src/core/peo_debug.cpp b/trunk/paradiseo-peo/src/core/peo_debug.cpp deleted file mode 100644 index 8badb1628..000000000 --- a/trunk/paradiseo-peo/src/core/peo_debug.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "peo_debug.h" - -#include -#include -#include -#include -#include -#include -#include - -#include "peo_debug.h" - -#define MAX_BUFF_SIZE 1000 - -#define DEBUG_PATH "./log/" - - -static bool debug = false; - -static char host [MAX_BUFF_SIZE]; - -std :: vector files; - - -void setDebugMode (bool __dbg) -{ - - debug = __dbg; - gethostname (host, MAX_BUFF_SIZE); -} - -extern int getNodeRank (); - -void initDebugging () -{ - - mkdir (DEBUG_PATH, S_IRWXU); - // files.push_back (stdout); - char buff [MAX_BUFF_SIZE]; - sprintf (buff, "%s/%d", DEBUG_PATH, getNodeRank ()); - files.push_back (fopen (buff, "w")); -} - -void endDebugging () -{ - - for (unsigned i = 0; i < files.size (); i ++) - if (files [i] != stdout) - fclose (files [i]); - files.clear(); -} - -void printDebugMessage (const char * __mess) -{ - - if (debug) - { - - char buff [MAX_BUFF_SIZE]; - char localTime [MAX_BUFF_SIZE]; - time_t t = time (0); - - /* Date */ - strcpy( localTime, ctime (& t) ); - localTime[ strlen( localTime )-1 ] = ']'; - sprintf (buff, "[%s][%s: ", host, localTime ); - - for (unsigned i = 0; i < files.size (); i ++) - fprintf (files [i],"%s" ,buff); - - /* Message */ - sprintf (buff, "%s", __mess); - - for (unsigned i = 0; i < files.size (); i ++) - { - fputs (buff, files [i]); - fputs ("\n", files [i]); - fflush (files [i]); - } - } -} diff --git a/trunk/paradiseo-peo/src/core/peo_debug.h b/trunk/paradiseo-peo/src/core/peo_debug.h deleted file mode 100644 index bd5507d98..000000000 --- a/trunk/paradiseo-peo/src/core/peo_debug.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peo_debug_h -#define __peo_debug_h - -extern void initDebugging (); - -extern void endDebugging (); - -extern void setDebugMode (bool __dbg = true); /* (Des)activating the Debugging mode */ - -extern void printDebugMessage (const char * __mess); /* Print a new message both on the - standard output and a target - text-file in a subdirectory) */ - -#endif diff --git a/trunk/paradiseo-peo/src/core/peo_fin.cpp b/trunk/paradiseo-peo/src/core/peo_fin.cpp deleted file mode 100644 index d47cfd2cd..000000000 --- a/trunk/paradiseo-peo/src/core/peo_fin.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "peo_fin.h" -#include "peo_debug.h" -#include "runner.h" -#include "rmc.h" - -void peo :: finalize () -{ - - printDebugMessage ("waiting for the termination of all threads"); - - joinRunners (); - finalizeRMC (); - - printDebugMessage ("this is the end"); - endDebugging (); -} diff --git a/trunk/paradiseo-peo/src/core/peo_fin.h b/trunk/paradiseo-peo/src/core/peo_fin.h deleted file mode 100644 index 75e0b3027..000000000 --- a/trunk/paradiseo-peo/src/core/peo_fin.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peo_finalize_h -#define __peo_finalize_h - -namespace peo - { - - extern void finalize (); -} - -#endif diff --git a/trunk/paradiseo-peo/src/core/peo_init.cpp b/trunk/paradiseo-peo/src/core/peo_init.cpp deleted file mode 100644 index 707599e77..000000000 --- a/trunk/paradiseo-peo/src/core/peo_init.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include - -#include "peo_init.h" -#include "peo_param.h" - -#include "peo_debug.h" -#include "rmc.h" -#include "runner.h" - - -extern void initCommunicableEnv (); -extern void initBuffers (); - -extern void initThreadsEnv (); -extern void initReactiveThreadsEnv (); - -extern void initRunnersEnv (); -extern void initWorkersEnv (); - -extern void initScheduler (); -extern void initSynchron (); - - -static void initExecutionEnv() -{ - - initCommunicableEnv (); - initBuffers (); - initScheduler(); - initSynchron (); - - initThreadsEnv (); - initReactiveThreadsEnv (); - - initRunnersEnv (); - initWorkersEnv (); -} - - -namespace peo - { - - int * argc; - - char * * * argv; - - void init (int & __argc, char * * & __argv) - { - - argc = & __argc; - - argv = & __argv; - - /* Initializing the execution environment */ - initExecutionEnv(); - - /* Loading the common parameters */ - loadParameters (__argc, __argv); - - /* Initializing the the Resource Management and Communication */ - initRMC ( *peo::argc, *peo::argv); - - /* */ - initDebugging (); - } -} diff --git a/trunk/paradiseo-peo/src/core/peo_init.h b/trunk/paradiseo-peo/src/core/peo_init.h deleted file mode 100644 index 0e5ebb13c..000000000 --- a/trunk/paradiseo-peo/src/core/peo_init.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peo_init_h -#define __peo_init_h - -namespace peo - { - - extern int * argc; - - extern char * * * argv; - - extern void init (int & __argc, char * * & __argv); -} - -#endif diff --git a/trunk/paradiseo-peo/src/core/peo_param.cpp b/trunk/paradiseo-peo/src/core/peo_param.cpp deleted file mode 100644 index 9e76711ba..000000000 --- a/trunk/paradiseo-peo/src/core/peo_param.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include - -#include "peo_param.h" -#include "peo_debug.h" - - -void peo :: loadParameters (int & __argc, char * * & __argv) -{ - - eoParser parser (__argc, __argv); - - /* Debug */ - eoValueParam debug_param ("false", "debug", "?"); - parser.processParam (debug_param); - if (debug_param.value () == "true") - setDebugMode (); -} diff --git a/trunk/paradiseo-peo/src/core/peo_param.h b/trunk/paradiseo-peo/src/core/peo_param.h deleted file mode 100644 index 621c50671..000000000 --- a/trunk/paradiseo-peo/src/core/peo_param.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peo_param_h -#define __peo_param_h - -namespace peo - { - - extern void loadParameters (int & __argc, char * * & __argv); -} - -#endif diff --git a/trunk/paradiseo-peo/src/core/peo_run.cpp b/trunk/paradiseo-peo/src/core/peo_run.cpp deleted file mode 100644 index 6e8bb0fde..000000000 --- a/trunk/paradiseo-peo/src/core/peo_run.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "peo_run.h" -#include "rmc.h" -#include "runner.h" - - -void peo :: run () -{ - - startRunners (); - - runRMC (); -} diff --git a/trunk/paradiseo-peo/src/core/peo_run.h b/trunk/paradiseo-peo/src/core/peo_run.h deleted file mode 100644 index 571a97586..000000000 --- a/trunk/paradiseo-peo/src/core/peo_run.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peo_run_h -#define __peo_run_h - -namespace peo - { - - extern void run (); -} - -#endif diff --git a/trunk/paradiseo-peo/src/core/random_topo.cpp b/trunk/paradiseo-peo/src/core/random_topo.cpp deleted file mode 100644 index 237fc169d..000000000 --- a/trunk/paradiseo-peo/src/core/random_topo.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include -#include "random_topo.h" - -#include - -void RandomTopology :: setNeighbors (Cooperative * __mig, - std :: vector & __from, - std :: vector & __to) -{ - - __from.clear () ; - __to.clear () ; - - for (unsigned i = 0; i < mig.size (); i ++) - { - if (mig [i] != __mig && rng.uniform() < 0.5 ) - { - __from.push_back (mig [i]); - __to.push_back (mig [i]); - } - } -} diff --git a/trunk/paradiseo-peo/src/core/random_topo.h b/trunk/paradiseo-peo/src/core/random_topo.h deleted file mode 100644 index 695f5a779..000000000 --- a/trunk/paradiseo-peo/src/core/random_topo.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __random_topo_h -#define __random_topo_h - -#include "topology.h" - -class RandomTopology : public Topology - { - - public : - - void setNeighbors (Cooperative * __mig, - std :: vector & __from, - std :: vector & __to); - }; - -#endif diff --git a/trunk/paradiseo-peo/src/core/reac_thread.cpp b/trunk/paradiseo-peo/src/core/reac_thread.cpp deleted file mode 100644 index a029963ec..000000000 --- a/trunk/paradiseo-peo/src/core/reac_thread.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "reac_thread.h" - -static bool the_end = false; - -static std :: vector reac_threads; - - -ReactiveThread :: ReactiveThread () -{ - - reac_threads.push_back (this); - sem_init (& sem, 0, 0); -} - -void ReactiveThread :: sleep () -{ - - sem_wait (& sem); -} - -void ReactiveThread :: wakeUp () -{ - - sem_post (& sem); -} - -void initReactiveThreadsEnv () -{ - - the_end = false; - reac_threads.clear (); -} - -void stopReactiveThreads () -{ - - the_end = true; - for (unsigned i = 0; i < reac_threads.size (); i ++) - reac_threads [i] -> wakeUp (); - reac_threads.clear (); -} - -bool theEnd () -{ - return the_end; -} diff --git a/trunk/paradiseo-peo/src/core/reac_thread.h b/trunk/paradiseo-peo/src/core/reac_thread.h deleted file mode 100644 index 762ba9b42..000000000 --- a/trunk/paradiseo-peo/src/core/reac_thread.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef REAC_THREAD_H_ -#define REAC_THREAD_H_ - -#include - -#include "thread.h" - - -class ReactiveThread : public Thread - { - - public: - - /* Ctor */ - ReactiveThread (); - - void sleep (); - - void wakeUp (); - - private: - - sem_t sem; - }; - -extern void initReactiveThreadsEnv (); - -extern void stopReactiveThreads (); - -#endif /*REAC_THREAD_H_*/ diff --git a/trunk/paradiseo-peo/src/core/ring_topo.cpp b/trunk/paradiseo-peo/src/core/ring_topo.cpp deleted file mode 100644 index 82051a595..000000000 --- a/trunk/paradiseo-peo/src/core/ring_topo.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "ring_topo.h" - -void RingTopology :: setNeighbors (Cooperative * __mig, - std :: vector & __from, - std :: vector & __to) -{ - __from.clear () ; - __to.clear () ; - - int len = mig.size () ; - - for (int i = 0 ; i < len ; i ++) - if (mig [i] == __mig) - { - __from.push_back (mig [(i - 1 + len) % len]) ; - __to.push_back (mig [(i + 1) % len]) ; - break; - } -} diff --git a/trunk/paradiseo-peo/src/core/ring_topo.h b/trunk/paradiseo-peo/src/core/ring_topo.h deleted file mode 100644 index c245541bf..000000000 --- a/trunk/paradiseo-peo/src/core/ring_topo.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __ring_topo_h -#define __ring_topo_h - -#include "topology.h" - -class RingTopology : public Topology - { - - public : - - void setNeighbors (Cooperative * __mig, - std :: vector & __from, - std :: vector & __to); - - }; - -#endif diff --git a/trunk/paradiseo-peo/src/core/rmc.h b/trunk/paradiseo-peo/src/core/rmc.h deleted file mode 100644 index d9daae4bd..000000000 --- a/trunk/paradiseo-peo/src/core/rmc.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __rmc_h -#define __rmc_h - -extern void initRMC (int & __argc, char * * & __argv); - -extern void runRMC (); /* Resource Management and Communication */ - -extern void finalizeRMC (); - -#endif diff --git a/trunk/paradiseo-peo/src/core/runner.cpp b/trunk/paradiseo-peo/src/core/runner.cpp deleted file mode 100644 index 3f7964ec3..000000000 --- a/trunk/paradiseo-peo/src/core/runner.cpp +++ /dev/null @@ -1,227 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include -#include -#include "runner.h" -#include "reac_thread.h" -#include "peo_debug.h" -#include "messaging.h" - -#include "../rmc/mpi/mess.h" -#include "../rmc/mpi/tags.h" - -#include "../rmc/mpi/node.h" -#include "../rmc/mpi/schema.h" - - -static std :: vector ll_threads; /* Low-level runner threads */ - -static std :: vector the_runners; - -static unsigned num_def_runners = 0; /* Number of defined runners */ - -static unsigned num_local_exec_runners = 0; /* Number of locally executing runners */ - -static unsigned num_exec_runners = 0; /* Number of globally executing runners */ - - -extern int getNodeRank (); - -extern int getNumberOfNodes (); - -extern void wakeUpCommunicator (); - - -Runner :: Runner () -{ - - exec_id = 0; - def_id = ++ num_def_runners; - - the_runners.push_back (this); - - sem_init (& sem_start, 0, 0); - sem_init (& sem_cntxt, 0, 0); -} - -RUNNER_ID Runner :: getDefinitionID () -{ - - return def_id; -} - -RUNNER_ID Runner :: getExecutionID () -{ - - return exec_id; -} - -void Runner :: setExecutionID (const RUNNER_ID& execution_id) -{ - - exec_id = execution_id; -} - -Runner * getRunner (RUNNER_ID __key) -{ - - return dynamic_cast (getCommunicable (__key)); -} - -void initializeContext () -{ - - num_local_exec_runners = 0; - - //synchronizeNodes (); - // setting up the execution IDs & counting the number of local exec. runners - for (unsigned i = 0; i < the_runners.size (); i ++) - { - if (my_node->execution_id_run.size() > 0) - the_runners [i] -> setExecutionID ( my_node -> execution_id_run[ i ] ); - if (the_runners [i] -> isAssignedLocally ()) num_local_exec_runners ++; - } - - collectiveCountOfRunners( &num_local_exec_runners, &num_exec_runners ); - - // synchronizeNodes (); - - for (unsigned i = 0; i < the_runners.size (); i ++) - if (the_runners [i] -> isAssignedLocally ()) the_runners [i] -> notifyContextInitialized (); -} - -void Runner :: waitStarting () -{ - - sem_wait (& sem_start); -} - -void Runner :: waitContextInitialization () -{ - - sem_wait (& sem_cntxt); -} - -void Runner :: start () -{ - - setActive (); - - sem_post (& sem_start); - - waitContextInitialization (); - run (); - terminate (); -} - -void startRunners () -{ - - /* Runners */ - for (unsigned i = 0; i < the_runners.size (); i ++) - if (the_runners [i] -> isAssignedLocally ()) - { - addThread (the_runners [i], ll_threads); - the_runners [i] -> waitStarting (); - } - - printDebugMessage ("launched the parallel runners"); -} - -void joinRunners () -{ - - joinThreads (ll_threads); - the_runners.clear(); -} - -bool atLeastOneActiveRunner () -{ - - return num_exec_runners; -} - -unsigned numberOfActiveRunners () -{ - - return num_exec_runners; -} - -void Runner :: notifyContextInitialized () -{ - - sem_post (& sem_cntxt); -} - -void Runner :: notifySendingTermination () -{ - - printDebugMessage ("I am informed that everyone received my termination notification."); - setPassive (); -} - -void unpackTerminationOfRunner () -{ - - RUNNER_ID finished_id; - unpack (finished_id); - - num_exec_runners --; - - printDebugMessage ("I'm noticed of the termination of a runner"); - - if (!num_exec_runners) - { - - printDebugMessage ("All the runners have terminated - now stopping the reactive threads."); - stopReactiveThreads (); - printDebugMessage ("Reactive threads stopped!"); - } - - wakeUpCommunicator (); -} - -void initRunnersEnv () -{ - - ll_threads.clear (); - the_runners.clear (); - - num_def_runners = 0; - num_local_exec_runners = 0; - num_exec_runners = 0; -} diff --git a/trunk/paradiseo-peo/src/core/runner.h b/trunk/paradiseo-peo/src/core/runner.h deleted file mode 100644 index db00c0369..000000000 --- a/trunk/paradiseo-peo/src/core/runner.h +++ /dev/null @@ -1,106 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __runner_h -#define __runner_h - -#include - -#include "communicable.h" -#include "thread.h" - - -typedef unsigned RUNNER_ID; - - -class Runner : public Communicable, public Thread - { - - public : - - Runner (); - - RUNNER_ID getDefinitionID (); - - RUNNER_ID getExecutionID (); - - void setExecutionID (const RUNNER_ID& execution_id); - - bool isAssignedLocally (); - - void waitStarting (); - - void waitContextInitialization (); - - void start (); - - virtual void run () = 0; - - void terminate (); - - void notifyContextInitialized (); - - void notifySendingTermination (); - - void packTermination (); - - private : - - sem_t sem_start; - sem_t sem_cntxt; - - unsigned def_id; - unsigned exec_id; - }; - - -extern void initRunnersEnv (); - -extern Runner * getRunner (RUNNER_ID __key); - -extern void initializeContext (); - -extern void startRunners (); - -extern void joinRunners (); - -extern bool atLeastOneActiveRunner (); - -extern unsigned numberOfActiveRunners (); - -extern void unpackTerminationOfRunner (); - -#endif diff --git a/trunk/paradiseo-peo/src/core/service.cpp b/trunk/paradiseo-peo/src/core/service.cpp deleted file mode 100644 index 7dc2e9403..000000000 --- a/trunk/paradiseo-peo/src/core/service.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "service.h" - -void Service :: setOwner (Thread & __owner) -{ - - owner = & __owner; -} - -Thread * Service :: getOwner () -{ - - return owner; -} - -Service * getService (SERVICE_ID __key) -{ - - return dynamic_cast (getCommunicable (__key)); -} - -void Service :: notifySendingData () -{ } - -void Service :: notifySendingResourceRequest () -{ - - num_sent_rr --; - if (! num_sent_rr) - notifySendingAllResourceRequests (); -} - -void Service :: notifySendingAllResourceRequests () -{ } - -void Service :: packData () -{} - -void Service :: unpackData () -{} - -void Service :: execute () -{} - -void Service :: packResult () -{} - -void Service :: unpackResult () -{} diff --git a/trunk/paradiseo-peo/src/core/service.h b/trunk/paradiseo-peo/src/core/service.h deleted file mode 100644 index b2688cf1b..000000000 --- a/trunk/paradiseo-peo/src/core/service.h +++ /dev/null @@ -1,80 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __service_h -#define __service_h - -#include "communicable.h" -#include "thread.h" - - -typedef unsigned SERVICE_ID; - -class Service : public Communicable - { - - public : - - void setOwner (Thread & __owner); - - Thread * getOwner (); - - void requestResourceRequest (unsigned __how_many = 1); - void packResourceRequest (); - - virtual void packData (); - virtual void unpackData (); - - virtual void execute (); - - virtual void packResult (); - virtual void unpackResult (); - - virtual void notifySendingData (); - virtual void notifySendingResourceRequest (); - virtual void notifySendingAllResourceRequests (); - - private : - - Thread * owner; /* Owner thread (i.e. 'uses' that service) */ - - unsigned num_sent_rr; /* Number of RR not really sent (i.e. still in the sending queue)*/ - - }; - -extern Service * getService (SERVICE_ID __key); - -#endif diff --git a/trunk/paradiseo-peo/src/core/star_topo.cpp b/trunk/paradiseo-peo/src/core/star_topo.cpp deleted file mode 100644 index 6661d4b05..000000000 --- a/trunk/paradiseo-peo/src/core/star_topo.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include -#include "star_topo.h" - -StarTopology :: StarTopology () : center( NULL ) {} - -void StarTopology :: setNeighbors (Cooperative * __mig, - std :: vector & __from, - std :: vector & __to) -{ - - assert( center != NULL ); - - __from.clear () ; - __to.clear () ; - - if ( __mig == center ) - { - - for (unsigned i = 0; i < mig.size (); i ++) - { - if (mig [i] != center) - { - __from.push_back (mig [i]); - __to.push_back (mig [i]); - } - } - } - else - { - __from.push_back (center); - __to.push_back (center); - } -} - -void StarTopology :: setCenter (Cooperative& __center) -{ - - center = &__center; -} diff --git a/trunk/paradiseo-peo/src/core/star_topo.h b/trunk/paradiseo-peo/src/core/star_topo.h deleted file mode 100644 index e3ab5acf2..000000000 --- a/trunk/paradiseo-peo/src/core/star_topo.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __star_topo_h -#define __star_topo_h - -#include "topology.h" - -class StarTopology : public Topology - { - - public : - - StarTopology (); - - void setNeighbors (Cooperative * __mig, - std :: vector & __from, - std :: vector & __to); - - void setCenter (Cooperative& __center); - - private : - - Cooperative* center; - }; - -#endif diff --git a/trunk/paradiseo-peo/src/core/thread.cpp b/trunk/paradiseo-peo/src/core/thread.cpp deleted file mode 100644 index f3dfd818b..000000000 --- a/trunk/paradiseo-peo/src/core/thread.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include - -#include "thread.h" - -static std :: vector threads; - -unsigned num_act = 0; - - -Thread :: Thread () -{ - - threads.push_back (this); - act = false; -} - -Thread :: ~ Thread () -{ - - /* Nothing ! */ -} - -void Thread :: setActive () -{ - - if (! act) - { - - act = true; - num_act ++; - } -} - -void Thread :: setPassive () -{ - - if (act) - { - - act = false; - num_act --; - } -} - -void initThreadsEnv () -{ - - threads.clear (); - num_act = 0; -} - -bool atLeastOneActiveThread () -{ - - return num_act; -} - -static void * launch (void * __arg) -{ - - Thread * thr = (Thread *) __arg; - thr -> start (); - - return 0; -} - -void addThread (Thread * __hl_thread, std :: vector & __ll_threads) -{ - - pthread_t * ll_thr = new pthread_t; - __ll_threads.push_back (ll_thr); - pthread_create (ll_thr, 0, launch, __hl_thread); -} - -void joinThreads (std :: vector & __threads) -{ - - for (unsigned i = 0; i < __threads.size (); i ++) - { - pthread_join (* __threads [i], 0); - delete __threads [i]; - } - __threads.clear(); -} diff --git a/trunk/paradiseo-peo/src/core/thread.h b/trunk/paradiseo-peo/src/core/thread.h deleted file mode 100644 index 1b7e13fd6..000000000 --- a/trunk/paradiseo-peo/src/core/thread.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef THREAD_H_ -#define THREAD_H_ - -#include -#include - -/* A high-level thread */ -class Thread - { - - public: - - /* Ctor */ - Thread (); - - /* Dtor */ - virtual ~ Thread (); - - /* Go ! */ - virtual void start () = 0; - - void setActive ();/* It means the current process is going to send messages soon */ - void setPassive ();/* The current process is not going to perform send operations - (but it may receive messages) */ - - private : - - bool act; - }; - -extern void initThreadsEnv (); - -extern void addThread (Thread * __hl_thread, std :: vector & __ll_threads); - -extern void joinThreads (std :: vector & __ll_threads); - -extern bool atLeastOneActiveThread (); /* It returns 'true' iff at least one process is going - to send messages */ - -#endif /*THREAD_H_*/ diff --git a/trunk/paradiseo-peo/src/core/topology.cpp b/trunk/paradiseo-peo/src/core/topology.cpp deleted file mode 100644 index fffeca66c..000000000 --- a/trunk/paradiseo-peo/src/core/topology.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "topology.h" - -Topology :: ~ Topology () -{ - - /* Nothing ! */ -} - -void Topology :: add (Cooperative & __mig) -{ - - mig.push_back (& __mig) ; -} - -Topology :: operator std :: vector & () -{ - - return mig; -} diff --git a/trunk/paradiseo-peo/src/core/topology.h b/trunk/paradiseo-peo/src/core/topology.h deleted file mode 100644 index c21213b55..000000000 --- a/trunk/paradiseo-peo/src/core/topology.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __topology_h -#define __topology_h - -#include - -#include "cooperative.h" - -class Topology - { - - public: - - virtual ~Topology (); - - void add (Cooperative & __mig); - - virtual void setNeighbors (Cooperative * __mig, - std :: vector & __from, - std :: vector & __to) = 0; - - operator std :: vector & (); - - protected: - - std :: vector mig; - }; - -#endif diff --git a/trunk/paradiseo-peo/src/peo b/trunk/paradiseo-peo/src/peo deleted file mode 100644 index e88982b65..000000000 --- a/trunk/paradiseo-peo/src/peo +++ /dev/null @@ -1,42 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peo_ -#define __peo_ - -#include "peo.h" - -#endif diff --git a/trunk/paradiseo-peo/src/peo.h b/trunk/paradiseo-peo/src/peo.h deleted file mode 100644 index 82db1685e..000000000 --- a/trunk/paradiseo-peo/src/peo.h +++ /dev/null @@ -1,147 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peo_h_ -#define __peo_h_ - -#include -#include -#include - -/** @mainpage Welcome to Paradiseo-PEO - - @section Introduction - - PEO is an extension of the ANSI-C++ compliant evolutionary computation library EO. -
    - It contains classes for the most common parallel and distributed models and hybridization mechanisms. - - @section authors AUTHORS - - - - - - - - - - - -
    - Sebastien CAHON -
    - Alexandru-Adrian TANTAR -
    - Clive Canape -
    - - @section LICENSE - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr - - - @section Paradiseo Home Page - - http://paradiseo.gforge.inria.fr - - @section Installation - - The installation procedure of the package is detailed in the - README file in the top-directory of the source-tree. - -*/ - -#include "core/peo_init.h" -#include "core/peo_run.h" -#include "core/peo_fin.h" - -#include "core/messaging.h" -#include "core/eoPop_mesg.h" -#include "core/eoVector_mesg.h" - -#include "peoWrapper.h" - -/* <------- components for parallel algorithms -------> */ -#include "peoTransform.h" -#include "peoEvalFunc.h" -#include "peoPopEval.h" -#include "peoMoeoPopEval.h" - -/* Cooperative island model */ -#include "core/ring_topo.h" -#include "core/star_topo.h" -#include "core/random_topo.h" -#include "core/complete_topo.h" -#include "peoData.h" -#include "peoSyncIslandMig.h" -#include "peoAsyncIslandMig.h" -#include "peoAsyncDataTransfer.h" -#include "peoSyncDataTransfer.h" - -/* Synchronous multi-start model */ -#include "peoMultiStart.h" -/* <------- components for parallel algorithms -------> */ - -/* Parallel PSO */ -#include "peoPSO.h" - -#endif diff --git a/trunk/paradiseo-peo/src/peoAggEvalFunc.h b/trunk/paradiseo-peo/src/peoAggEvalFunc.h deleted file mode 100644 index e054bebad..000000000 --- a/trunk/paradiseo-peo/src/peoAggEvalFunc.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peoAggEvalFunc_h -#define __peoAggEvalFunc_h - -#include - -//! Interface class for creating an aggregate evaluation function. - -//! The peoAggEvalFunc class offers only the interface for creating aggregate evaluation functions - there -//! are no direct internal functions provided. The class inherits public eoBF< EOT&, const typename EOT :: Fitness&, void > -//! thus requiring, for the derived classes, the creation of a function having the following signature: -//! -//! -//! -//!
    void operator()( EOT& __eot, const typename EOT :: Fitness& __partial_fittness );    
    -//! -//! The aggregation object is called in an iterative manner for each of the results obtained by applying partial evaluation functions. -template< class EOT > class peoAggEvalFunc : public eoBF< EOT&, const typename EOT :: Fitness&, void > - {}; - - -#endif diff --git a/trunk/paradiseo-peo/src/peoAsyncDataTransfer.h b/trunk/paradiseo-peo/src/peoAsyncDataTransfer.h deleted file mode 100755 index bba165892..000000000 --- a/trunk/paradiseo-peo/src/peoAsyncDataTransfer.h +++ /dev/null @@ -1,208 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Alexandru-Adrian TANTAR -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peoAsyncDataTransfer_h -#define __peoAsyncDataTransfer_h - - -#include - -#include - -#include "core/peoAbstractDefs.h" - -#include "core/messaging.h" - -#include "core/topology.h" -#include "core/thread.h" -#include "core/cooperative.h" -#include "core/peo_debug.h" - - - -class peoAsyncDataTransfer : public Cooperative, public eoUpdater - { - - public: - - template< typename EndPointType > - peoAsyncDataTransfer( - - EndPointType& __endPoint, - Topology& __topology - - ) : topology( __topology ) - { - - source = new MsgTransferQueue< EndPointType >( __endPoint ); - destination = new MsgTransferQueue< EndPointType >( __endPoint ); - __topology.add( *this ); - } - - template< typename EndPointType, typename FunctorType > - peoAsyncDataTransfer( - - EndPointType& __endPoint, - Topology& __topology, - FunctorType& externalFunctorRef - - ) : topology( __topology ) - { - - source = new MsgTransferQueue< EndPointType >( __endPoint, externalFunctorRef ); - destination = new MsgTransferQueue< EndPointType >( __endPoint, externalFunctorRef ); - __topology.add( *this ); - } - - template< typename SourceEndPointType, typename DestinationEndPointType > - peoAsyncDataTransfer( - - SourceEndPointType& __source, - DestinationEndPointType& __destination, - Topology& __topology - - ) : topology( __topology ) - { - - source = new MsgTransferQueue< SourceEndPointType >( __source ); - destination = new MsgTransferQueue< DestinationEndPointType >( __destination ); - __topology.add( *this ); - } - - template< typename SourceEndPointType, typename DestinationEndPointType, typename FunctorType > - peoAsyncDataTransfer( - - SourceEndPointType& __source, - DestinationEndPointType& __destination, - Topology& __topology, - FunctorType& externalFunctorRef - - ) : topology( __topology ) - { - - source = new MsgTransferQueue< SourceEndPointType >( __source, externalFunctorRef ); - destination = new MsgTransferQueue< DestinationEndPointType >( __destination, externalFunctorRef ); - __topology.add( *this ); - } - - ~peoAsyncDataTransfer() - { - delete source; - delete destination; - } - - - void operator()() - { - - sendData(); // sending data - receiveData(); // receiving data - } - - void pack() - { - lock (); - - ::pack( coop_em.front()->getKey() ); - source->packMessage(); - coop_em.pop(); - - unlock(); - } - - void unpack() - { - - lock (); - destination->unpackMessage(); - unlock(); - } - - void packSynchronizeReq(){} - - - private: - - void sendData() - { - - std :: vector< Cooperative* > in, out; - topology.setNeighbors( this, in, out ); - - for ( unsigned i = 0; i < out.size(); i++ ) - { - - source->pushMessage(); - - coop_em.push( out[i] ); - send( out[i] ); - - printDebugMessage( "peoAsyncDataTransfer: sending data." ); - } - } - - void receiveData() - { - - lock (); - { - - while ( !( destination->empty() ) ) - { - - printDebugMessage( "peoAsyncDataTransfer: received data." ); - destination->popMessage(); - printDebugMessage( "peoAsyncDataTransfer: done reading data." ); - } - } - unlock(); - } - - - private: - - // the neighboring topology - Topology& topology; - - // source and destination end-points - AbstractMsgTransferQueue* source; - AbstractMsgTransferQueue* destination; - - std :: queue< Cooperative* > coop_em; - }; - - -#endif diff --git a/trunk/paradiseo-peo/src/peoAsyncIslandMig.h b/trunk/paradiseo-peo/src/peoAsyncIslandMig.h deleted file mode 100644 index b6a2278a1..000000000 --- a/trunk/paradiseo-peo/src/peoAsyncIslandMig.h +++ /dev/null @@ -1,198 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* peoData to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peoAsyncIslandMig_h -#define __peoAsyncIslandMig_h - - -#include - -#include -#include -#include -#include -#include - - -#include "core/messaging.h" -#include "core/eoPop_mesg.h" -#include "core/eoVector_mesg.h" -#include "core/topology.h" -#include "core/thread.h" -#include "core/cooperative.h" -#include "core/peo_debug.h" - - -//! @class peoAsyncIslandMig -//! @brief Specific class for a asynchronous migration -//! @see Cooperative eoUpdater -//! @version 2.0 -//! @date january 2008 -template< class TYPESELECT, class TYPEREPLACE > class peoAsyncIslandMig : public Cooperative, public eoUpdater - { - - public: - - //! @brief Constructor - //! @param continuator & __cont - //! @param selector & __select - //! @param replacement & __replace - //! @param Topology& __topology - peoAsyncIslandMig( - continuator & __cont, - selector & __select, - replacement & __replace, - Topology& __topology - ); - - //! @brief operator - void operator()(); - //! @brief Function realizing packages - void pack(); - //! @brief Function reconstituting packages - void unpack(); - //! @brief Function packSynchronizeReq - void packSynchronizeReq(); - - private: - //! @brief Function which sends some emigrants - void emigrate(); - //! @brief Function which receives some immigrants - void immigrate(); - - private: - //! @param continuator & cont - //! @param selector & select - //! @param replacement & replace - //! @param Topology& topology - //! @param std :: queue< TYPEREPLACE > imm - //! @param std :: queue< TYPESELECT > em - //! @param std :: queue< Cooperative* > coop_em - continuator & cont; - selector & select; - replacement & replace; - Topology& topology; - std :: queue< TYPEREPLACE > imm; - std :: queue< TYPESELECT > em; - std :: queue< Cooperative* > coop_em; - }; - - -template< class TYPESELECT , class TYPEREPLACE> peoAsyncIslandMig< TYPESELECT, TYPEREPLACE > :: peoAsyncIslandMig( - - continuator & __cont, - selector & __select, - replacement & __replace, - Topology& __topology - -) : select( __select ), replace( __replace ), topology( __topology ), cont(__cont) -{ - - __topology.add( *this ); -} - - -template< class TYPESELECT , class TYPEREPLACE> void peoAsyncIslandMig< TYPESELECT, TYPEREPLACE > :: pack() -{ - lock (); - ::pack( coop_em.front()->getKey() ); - ::pack(em.front()); - coop_em.pop(); - em.pop(); - unlock(); -} - - -template< class TYPESELECT, class TYPEREPLACE> void peoAsyncIslandMig< TYPESELECT , TYPEREPLACE> :: unpack() -{ - lock (); - TYPEREPLACE mig; - ::unpack(mig); - imm.push( mig ); - unlock(); -} - -template< class TYPESELECT , class TYPEREPLACE> void peoAsyncIslandMig< TYPESELECT, TYPEREPLACE > :: packSynchronizeReq() -{} - -template< class TYPESELECT , class TYPEREPLACE> void peoAsyncIslandMig< TYPESELECT , TYPEREPLACE> :: emigrate() -{ - std :: vector< Cooperative* >in, out; - topology.setNeighbors( this, in, out ); - - for ( unsigned i = 0; i < out.size(); i++ ) - { - - TYPESELECT mig; - select(mig); - em.push( mig ); - coop_em.push( out[i] ); - send( out[i] ); - printDebugMessage( "sending some emigrants." ); - } -} - - -template< class TYPESELECT, class TYPEREPLACE> void peoAsyncIslandMig< TYPESELECT , TYPEREPLACE> :: immigrate() -{ - - lock (); - { - - while ( !imm.empty() ) - { - replace(imm.front() ); - imm.pop(); - printDebugMessage( "receiving some immigrants." ); - } - } - unlock(); -} - - -template< class TYPESELECT , class TYPEREPLACE> void peoAsyncIslandMig< TYPESELECT , TYPEREPLACE > :: operator()() -{ - - if (! cont.check()) - { - - emigrate(); - immigrate(); - } -} - - -#endif diff --git a/trunk/paradiseo-peo/src/peoData.h b/trunk/paradiseo-peo/src/peoData.h deleted file mode 100644 index e5f477da3..000000000 --- a/trunk/paradiseo-peo/src/peoData.h +++ /dev/null @@ -1,262 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Clive Canape, Thomas Legrand -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* peoData to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef _PEODATA_H -#define _PEODATA_H - -#include "core/eoVector_mesg.h" -#include "core/messaging.h" - -/**************************************************************************************/ -/************************** DEFINE A CONTINUATOR ***********************************/ -/**************************************************************************************/ -/* -//! @class continuator -//! @brief Abstract class for a continuator within the exchange of data by migration -//! @version 1.0 -//! @date january 2008 -*/ -class continuator - { - public: -/* - //! @brief Virtual function of check - //! @return true if the algorithm must continue -*/ - virtual bool check()=0; -// //! @brief Virtual destructor - virtual ~continuator(){} - }; - -/* -//! @class eoContinuator -//! @brief Specific class for a continuator within the exchange of migration of a population -//! @see continuator -//! @version 1.0 -//! @date january 2008 -*/ -template < class EOT> class eoContinuator : public continuator - { - public: -/* - //! @brief Constructor - //! @param eoContinue & - //! @param eoPop & -*/ - eoContinuator(eoContinue & _cont, const eoPop & _pop): cont (_cont), pop(_pop) - {} -/* - //! @brief Virtual function of check - //! @return false if the algorithm must continue -*/ - virtual bool check() - { - return cont(pop); - } - - protected: -/* - //! @param eoContinue & - //! @param eoPop & -*/ - eoContinue & cont ; - const eoPop & pop; - }; - - -/**************************************************************************************/ -/************************** DEFINE A SELECTOR **************************************/ -/**************************************************************************************/ -/* -//! @class selector -//! @brief Abstract class for a selector within the exchange of data by migration -//! @version 1.0 -//! @date january 2008 -*/ -template < class TYPE> class selector - { - public: -/* - //! @brief Virtual operator on the template type - //! @param TYPE & -*/ - virtual void operator()(TYPE &)=0; -// //! @brief Virtual destructor - virtual ~selector(){} - }; - -/* -//! @class eoSelector -//! @brief Specific class for a selector within the exchange of migration of a population -//! @see selector -//! @version 1.0 -//! @date january 2008 -*/ -template < class EOT, class TYPE> class eoSelector : public selector< TYPE > - { - public: -/* - //! @brief Constructor - //! @param eoSelectOne & - //! @param unsigned _nb_select - //! @param TYPE & _source (with TYPE which is the template type) -*/ - eoSelector(eoSelectOne & _select, unsigned _nb_select, const TYPE & _source): selector (_select), nb_select(_nb_select), source(_source) - {} -/* - //! @brief Virtual operator on the template type - //! @param TYPE & _dest -*/ - virtual void operator()(TYPE & _dest) - { - size_t target = static_cast(nb_select); - _dest.resize(target); - for (size_t i = 0; i < _dest.size(); ++i) - _dest[i] = selector(source); - } - - protected: -/* - //! @param eoSelectOne & - //! @param unsigned nb_select - //! @param TYPE & source -*/ - eoSelectOne & selector ; - unsigned nb_select; - const TYPE & source; - }; - - -/**************************************************************************************/ -/************************** DEFINE A REPLACEMENT ***********************************/ -/**************************************************************************************/ -/* -//! @class replacement -//! @brief Abstract class for a replacement within the exchange of data by migration -//! @version 1.0 -//! @date january 2008 -*/ -template < class TYPE> class replacement - { - public: -/* - //! @brief Virtual operator on the template type - //! @param TYPE & -*/ - virtual void operator()(TYPE &)=0; -// //! @brief Virtual destructor - virtual ~replacement(){} - }; - -/* -//! @class eoReplace -//! @brief Specific class for a replacement within the exchange of migration of a population -//! @see replacement -//! @version 1.0 -//! @date january 2008 -*/ -template < class EOT, class TYPE> class eoReplace : public replacement< TYPE > - { - public: -/* - //! @brief Constructor - //! @param eoReplacement & - //! @param TYPE & _destination (with TYPE which is the template type) -*/ - eoReplace(eoReplacement & _replace, TYPE & _destination): replace(_replace), destination(_destination) - {} -/* - //! @brief Virtual operator on the template type - //! @param TYPE & _source -*/ - virtual void operator()(TYPE & _source) - { - replace(destination, _source); - } - - protected: -/* - //! @param eoReplacement & - //! @param TYPE & destination -*/ - eoReplacement & replace; - TYPE & destination; - }; - - -/**************************************************************************************/ -/************************ Continuator for synchrone migartion ************************/ -/**************************************************************************************/ -/* -//! @class eoSyncContinue -//! @brief Class for a continuator within the exchange of data by synchrone migration -//! @see continuator -//! @version 1.0 -//! @date january 2008 -*/ -class eoSyncContinue: public continuator - { - - public: -/* - //! @brief Constructor - //! @param unsigned __period - //! @param unsigned __init_counter -*/ - eoSyncContinue (unsigned __period, unsigned __init_counter = 0): period (__period),counter (__init_counter) - {} -/* - //! @brief Virtual function of check - //! @return true if the algorithm must continue -*/ - virtual bool check() - { - return ((++ counter) % period) != 0 ; - } - - - private: -/* - //! @param unsigned period - //! @param unsigned counter -*/ - unsigned period; - unsigned counter; - }; - - -#endif - diff --git a/trunk/paradiseo-peo/src/peoEvalFunc.h b/trunk/paradiseo-peo/src/peoEvalFunc.h deleted file mode 100644 index adfd8a4f3..000000000 --- a/trunk/paradiseo-peo/src/peoEvalFunc.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, INRIA, 2008 -* -* Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: clive.canape@inria.fr -* -*/ - -#ifndef PEOEVALFUNC_H -#define PEOEVALFUNC_H -/* -//! @class peoEvalFunc -//! @brief Specific class for evaluation -//! @see eoEvalFunc -//! @version 1.0 -//! @date november 2007 -*/ -#ifdef _MSC_VER -template< class EOT, class FitT = EOT::Fitness, class FunctionArg = const EOT& > -#else -template< class EOT, class FitT = typename EOT::Fitness, class FunctionArg = const EOT& > -#endif -struct peoEvalFunc: public eoEvalFunc - { -/* - //! @brief Constructor - //! @param FitT (* _eval)( FunctionArg ) -*/ - peoEvalFunc( FitT (* _eval)( FunctionArg ) ) - : eoEvalFunc(), evalFunc( _eval ) - {}; -/* - //! @brief Virtual operator - //! @param EOT & _peo -*/ - virtual void operator() ( EOT & _peo ) - { - _peo.fitness((*evalFunc)( _peo )); - }; - -private: -// //! @param FitT (* evalFunc )( FunctionArg ) - FitT (* evalFunc )( FunctionArg ); - }; - -#endif - diff --git a/trunk/paradiseo-peo/src/peoMoeoPopEval.h b/trunk/paradiseo-peo/src/peoMoeoPopEval.h deleted file mode 100644 index a1d03783b..000000000 --- a/trunk/paradiseo-peo/src/peoMoeoPopEval.h +++ /dev/null @@ -1,265 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peoMoeoPopEval_h -#define __peoMoeoPopEval_h - -#include -#include - -#include "core/messaging.h" -#include "core/peo_debug.h" -#include "peoAggEvalFunc.h" -#include "peoNoAggEvalFunc.h" - -//! @class peoPopEval -//! @brief Parallel evaluation functor wrapper with MOEO -//! @see Service eoPopEvalFunc -//! @version 1.0 -//! @date 2008 -template< class EOT > class peoMoeoPopEval : public Service, public eoPopEvalFunc - { - - public: - - //! Constructor function - an EO-derived evaluation functor has to be specified; an internal reference - //! is set towards the specified evaluation functor. - //! - //! @param eoEvalFunc< EOT >& __eval_func - EO-derived evaluation functor to be applied in parallel on each individual of a specified population - peoMoeoPopEval( eoEvalFunc< EOT >& __eval_func ); - - //! Constructor function - a vector of EO-derived evaluation functors has to be specified as well as an aggregation function. - //! - //! @param const std :: vector< eoEvalFunc < EOT >* >& __funcs - vector of EO-derived partial evaluation functors; - //! @param peoAggEvalFunc< EOT >& __merge_eval - aggregation functor for creating a fitness value out of the partial fitness values. - peoMoeoPopEval( const std :: vector< eoEvalFunc < EOT >* >& __funcs, peoAggEvalFunc< EOT >& __merge_eval ); - - //! Operator for applying the evaluation functor (direct or aggregate) for each individual of the specified population. - //! - //! @param eoPop< EOT >& __pop - population to be evaluated by applying the evaluation functor specified in the constructor. - void operator()(eoPop< EOT >& __pop); - - //! @brief Operator ()( eoPop< EOT >& __dummy, eoPop< EOT >& __pop ) - //! @param eoPop< EOT >& __dummy - //! @param eoPop< EOT >& __pop - void operator()( eoPop< EOT >& __dummy, eoPop< EOT >& __pop ); - - //! Auxiliary function for transferring data between the process requesting an evaluation operation and the process that - //! performs the actual evaluation phase. There is no need to explicitly call the function. - void packData(); - - //! Auxiliary function for transferring data between the process requesting an evaluation operation and the process that - //! performs the actual evaluation phase. There is no need to explicitly call the function. - void unpackData(); - - //! Auxiliary function - it calls the specified evaluation functor(s). There is no need to explicitly call the function. - void execute(); - - //! Auxiliary function for transferring data between the process requesting an evaluation operation and the process that - //! performs the actual evaluation phase. There is no need to explicitly call the function. - void packResult(); - - //! Auxiliary function for transferring data between the process requesting an evaluation operation and the process that - //! performs the actual evaluation phase. There is no need to explicitly call the function. - void unpackResult(); - - //! Auxiliary function for notifications between the process requesting an evaluation operation and the processes that - //! performs the actual evaluation phase. There is no need to explicitly call the function. - void notifySendingData(); - - //! Auxiliary function for notifications between the process requesting an evaluation operation and the processes that - //! performs the actual evaluation phase. There is no need to explicitly call the function. - void notifySendingAllResourceRequests(); - - private: - //! @param std :: vector< eoEvalFunc < EOT >* >& funcs - //! @param std :: vector< eoEvalFunc < EOT >* > one_func - //! @param peoAggEvalFunc< EOT >& merge_eval - //! @param peoNoAggEvalFunc< EOT > no_merge_eval - //! @param std :: queue< EOT* >tasks - //! @param std :: map< EOT*, std :: pair< unsigned, unsigned > > progression - //! @param unsigned num_func - //! @param EOT sol - //! @param EOT *ad_sol - //! @param unsigned total - const std :: vector< eoEvalFunc < EOT >* >& funcs; - std :: vector< eoEvalFunc < EOT >* > one_func; - peoAggEvalFunc< EOT >& merge_eval; - peoNoAggEvalFunc< EOT > no_merge_eval; - std :: queue< EOT* >tasks; - std :: map< EOT*, std :: pair< unsigned, unsigned > > progression; - unsigned num_func; - EOT sol; - EOT *ad_sol; - unsigned total; - }; - - -template< class EOT > peoMoeoPopEval< EOT > :: peoMoeoPopEval( eoEvalFunc< EOT >& __eval_func ) : - - funcs( one_func ), merge_eval( no_merge_eval ) -{ - - one_func.push_back( &__eval_func ); -} - - -template< class EOT > peoMoeoPopEval< EOT > :: peoMoeoPopEval( - - const std :: vector< eoEvalFunc< EOT >* >& __funcs, - peoAggEvalFunc< EOT >& __merge_eval - -) : funcs( __funcs ), merge_eval( __merge_eval ) -{} - -template< class EOT > void peoMoeoPopEval< EOT >::operator()(eoPop< EOT >& __dummy, eoPop< EOT >& __pop ) -{ - this->operator()(__pop); -} - -template< class EOT > void peoMoeoPopEval< EOT >::operator()(eoPop< EOT >& __pop ) -{ - for ( unsigned i = 0; i < __pop.size(); i++ ) - { - __pop[ i ].fitness(typename EOT :: Fitness() ); - progression[ &__pop[ i ] ].first = funcs.size() - 1; - progression[ &__pop[ i ] ].second = funcs.size(); - for ( unsigned j = 0; j < funcs.size(); j++ ) - { - /* Queuing the 'invalid' solution and its associated owner */ - tasks.push( &__pop[ i ] ); - } - } - total = funcs.size() * __pop.size(); - requestResourceRequest( funcs.size() * __pop.size() ); - stop(); -} - - -template< class EOT > void peoMoeoPopEval< EOT > :: packData() -{ - pack( progression[ tasks.front() ].first-- ); - - /* Packing the contents :-) of the solution */ - pack( *tasks.front() ); - - /* Packing the addresses of both the solution and the owner */ - pack( tasks.front() ); - tasks.pop( ); -} - - -template< class EOT > void peoMoeoPopEval< EOT > :: unpackData() -{ - unpack( num_func ); - /* Unpacking the solution */ - unpack( sol ); - /* Unpacking the @ of that one */ - unpack( ad_sol ); -} - - -template< class EOT > void peoMoeoPopEval< EOT > :: execute() -{ - - /* Computing the fitness of the solution */ - funcs[ num_func ]->operator()( sol ); -} - - -template< class EOT > void peoMoeoPopEval< EOT > :: packResult() -{ - /* Packing the fitness of the solution */ - std::vector < double > object; - unsigned len; - object=sol.objectiveVector(); - len=object.size(); - pack (len); - for (unsigned i = 0 ; i < len; i ++) - pack (object[i]); - - /* Packing the @ of the individual */ - pack( ad_sol ); -} - - -template< class EOT > void peoMoeoPopEval< EOT > :: unpackResult() -{ - /* Unpacking the computed fitness */ - unsigned len; - std::vector < double > object; - - unpack(len); - object.resize(len); - for (unsigned i = 0 ; i < len; i ++) - unpack (object[i]); - /* Unpacking the @ of the associated individual */ - unpack( ad_sol ); - - - /* Associating the fitness the local solution */ - ad_sol->objectiveVector(object); - progression[ ad_sol ].second--; - - /* Notifying the container of the termination of the evaluation */ - if ( !progression[ ad_sol ].second ) - { - - progression.erase( ad_sol ); - } - - total--; - if ( !total ) - { - - getOwner()->setActive(); - resume(); - } - -} - - -template< class EOT > void peoMoeoPopEval< EOT > :: notifySendingData() -{} - - -template< class EOT > void peoMoeoPopEval< EOT > :: notifySendingAllResourceRequests() -{ - getOwner()->setPassive(); -} - - -#endif diff --git a/trunk/paradiseo-peo/src/peoMultiStart.h b/trunk/paradiseo-peo/src/peoMultiStart.h deleted file mode 100644 index 835c9bb28..000000000 --- a/trunk/paradiseo-peo/src/peoMultiStart.h +++ /dev/null @@ -1,320 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ -#ifndef __peoMultiStart_h -#define __peoMultiStart_h - -#include - -#include "core/service.h" -#include "core/messaging.h" - -//! @class peoMultiStart -//! @brief Class allowing the launch of several algorithms -//! @see Service -//! @version 1.1 -//! @date january 2008 -template < typename EntityType > class peoMultiStart : public Service - { - - public: - - //! @brief Constructor - //! @param AlgorithmType& externalAlgorithm - template < typename AlgorithmType > peoMultiStart( AlgorithmType& externalAlgorithm ) - { - singularAlgorithm = new Algorithm< AlgorithmType >( externalAlgorithm ); - algorithms.push_back( singularAlgorithm ); - aggregationFunction = new NoAggregationFunction(); - } - - //! @brief Constructor - //! @param AlgorithmReturnType (*externalAlgorithm)( AlgorithmDataType& ) - template < typename AlgorithmReturnType, typename AlgorithmDataType > peoMultiStart( AlgorithmReturnType (*externalAlgorithm)( AlgorithmDataType& ) ) - { - singularAlgorithm = new FunctionAlgorithm< AlgorithmReturnType, AlgorithmDataType >( externalAlgorithm ); - algorithms.push_back( singularAlgorithm ); - aggregationFunction = new NoAggregationFunction(); - } - - //! @brief Constructor - //! @param std::vector< AlgorithmType* >& externalAlgorithms - //! @param AggregationFunctionType& externalAggregationFunction - template < typename AlgorithmType, typename AggregationFunctionType > peoMultiStart( std::vector< AlgorithmType* >& externalAlgorithms, AggregationFunctionType& externalAggregationFunction ) - { - for ( unsigned int index = 0; index < externalAlgorithms.size(); index++ ) - { - algorithms.push_back( new Algorithm< AlgorithmType >( *externalAlgorithms[ index ] ) ); - } - aggregationFunction = new AggregationAlgorithm< AggregationFunctionType >( externalAggregationFunction ); - } - - //! @brief Constructor - //! @param std::vector< AlgorithmReturnType (*)( AlgorithmDataType& ) >& externalAlgorithms - //! @param AggregationFunctionType& externalAggregationFunction - template < typename AlgorithmReturnType, typename AlgorithmDataType, typename AggregationFunctionType > peoMultiStart( std::vector< AlgorithmReturnType (*)( AlgorithmDataType& ) >& externalAlgorithms, AggregationFunctionType& externalAggregationFunction ) - { - for ( unsigned int index = 0; index < externalAlgorithms.size(); index++ ) - { - algorithms.push_back( new FunctionAlgorithm< AlgorithmReturnType, AlgorithmDataType >( externalAlgorithms[ index ] ) ); - } - aggregationFunction = new AggregationAlgorithm< AggregationFunctionType >( externalAggregationFunction ); - } - - //! @brief Destructor - ~peoMultiStart() - { - for ( unsigned int index = 0; index < data.size(); index++ ) delete data[ index ]; - for ( unsigned int index = 0; index < algorithms.size(); index++ ) delete algorithms[ index ]; - delete aggregationFunction; - } - - //! @brief operator on the template type - //! @param Type& externalData - template < typename Type > void operator()( Type& externalData ) - { - for ( typename Type::iterator externalDataIterator = externalData.begin(); externalDataIterator != externalData.end(); externalDataIterator++ ) - { - data.push_back( new DataType< EntityType >( *externalDataIterator ) ); - } - functionIndex = dataIndex = idx = num_term = 0; - requestResourceRequest( data.size() * algorithms.size() ); - stop(); - } - - //! @brief operator on the template type - //! @param Type& externalDataBegin - //! @param Type& externalDataEnd - template < typename Type > void operator()( const Type& externalDataBegin, const Type& externalDataEnd ) - { - for ( Type externalDataIterator = externalDataBegin; externalDataIterator != externalDataEnd; externalDataIterator++ ) - { - data.push_back( new DataType< EntityType >( *externalDataIterator ) ); - } - functionIndex = dataIndex = idx = num_term = 0; - requestResourceRequest( data.size() * algorithms.size() ); - stop(); - } - - //! @brief Function realizing packages of data - void packData(); - //! @brief Function reconstituting packages of data - void unpackData(); - //! @brief Function which executes the algorithm - void execute(); - //! @brief Function realizing packages of the result - void packResult(); - //! @brief Function reconstituting packages of result - void unpackResult(); - //! @brief Function notifySendingData - void notifySendingData(); - //! @brief Function notifySendingAllResourceRequests - void notifySendingAllResourceRequests(); - - private: - - //! @param AbstractAlgorithm* singularAlgorithm - //! @param std::vector< AbstractAlgorithm* > algorithms - //! @param AbstractAggregationAlgorithm* aggregationFunction - //! @param EntityType entityTypeInstance - //! @param std::vector< AbstractDataType* > data - //! @param unsigned idx - //! @param unsigned num_term - //! @param unsigned dataIndex - //! @param unsigned functionIndex - template < typename Type > struct DataType; - struct AbstractDataType - { - virtual ~AbstractDataType() - { } - template < typename Type > operator Type& () - { - return ( dynamic_cast< DataType< Type >& >( *this ) ).data; - } - }; - - template < typename Type > struct DataType : public AbstractDataType - { - DataType( Type& externalData ) : data( externalData ) - { } - Type& data; - }; - - struct AbstractAlgorithm - { - virtual ~AbstractAlgorithm() - { } - virtual void operator()( AbstractDataType& dataTypeInstance ) - {} - }; - - template < typename AlgorithmType > struct Algorithm : public AbstractAlgorithm - { - Algorithm( AlgorithmType& externalAlgorithm ) : algorithm( externalAlgorithm ) - { } - void operator()( AbstractDataType& dataTypeInstance ) - { - algorithm( dataTypeInstance ); - } - AlgorithmType& algorithm; - }; - - template < typename AlgorithmReturnType, typename AlgorithmDataType > struct FunctionAlgorithm : public AbstractAlgorithm - { - FunctionAlgorithm( AlgorithmReturnType (*externalAlgorithm)( AlgorithmDataType& ) ) : algorithm( externalAlgorithm ) - { } - void operator()( AbstractDataType& dataTypeInstance ) - { - algorithm( dataTypeInstance ); - } - AlgorithmReturnType (*algorithm)( AlgorithmDataType& ); - }; - - struct AbstractAggregationAlgorithm - { - virtual ~AbstractAggregationAlgorithm() - { } - virtual void operator()( AbstractDataType& dataTypeInstanceA, AbstractDataType& dataTypeInstanceB ) - {} - }; - - template < typename AggregationAlgorithmType > struct AggregationAlgorithm : public AbstractAggregationAlgorithm - { - AggregationAlgorithm( AggregationAlgorithmType& externalAggregationAlgorithm ) : aggregationAlgorithm( externalAggregationAlgorithm ) - { } - void operator()( AbstractDataType& dataTypeInstanceA, AbstractDataType& dataTypeInstanceB ) - { - aggregationAlgorithm( dataTypeInstanceA, dataTypeInstanceB ); - } - AggregationAlgorithmType& aggregationAlgorithm; - }; - - struct NoAggregationFunction : public AbstractAggregationAlgorithm - { - void operator()( AbstractDataType& dataTypeInstanceA, AbstractDataType& dataTypeInstanceB ) - { - - static_cast< EntityType& >( dataTypeInstanceA ) = static_cast< EntityType& >( dataTypeInstanceB ); - } - }; - - AbstractAlgorithm* singularAlgorithm; - std::vector< AbstractAlgorithm* > algorithms; - AbstractAggregationAlgorithm* aggregationFunction; - EntityType entityTypeInstance; - std::vector< AbstractDataType* > data; - unsigned idx; - unsigned num_term; - unsigned dataIndex; - unsigned functionIndex; - }; - - -template < typename EntityType > void peoMultiStart< EntityType >::packData() -{ - - pack( functionIndex ); - pack( idx ); - pack( ( EntityType& ) *data[ idx++ ] ); - - // done with functionIndex for the entire data set - moving to another - // function/algorithm starting all over with the entire data set ( idx is set to 0 ) - if ( idx == data.size() ) - { - - ++functionIndex; - idx = 0; - } -} - -template < typename EntityType > void peoMultiStart< EntityType >::unpackData() -{ - - unpack( functionIndex ); - unpack( dataIndex ); - unpack( entityTypeInstance ); -} - -template < typename EntityType > void peoMultiStart< EntityType >::execute() -{ - - // wrapping the unpacked data - the definition of an abstract algorithm imposes - // that its internal function operator acts only on abstract data types - AbstractDataType* entityWrapper = new DataType< EntityType >( entityTypeInstance ); - algorithms[ functionIndex ]->operator()( *entityWrapper ); - - delete entityWrapper; -} - -template < typename EntityType > void peoMultiStart< EntityType >::packResult() -{ - - pack( dataIndex ); - pack( entityTypeInstance ); -} - -template < typename EntityType > void peoMultiStart< EntityType >::unpackResult() -{ - - unpack( dataIndex ); - unpack( entityTypeInstance ); - - // wrapping the unpacked data - the definition of an abstract algorithm imposes - // that its internal function operator acts only on abstract data types - AbstractDataType* entityWrapper = new DataType< EntityType >( entityTypeInstance ); - aggregationFunction->operator()( *data[ dataIndex ], *entityWrapper ); - delete entityWrapper; - - num_term++; - - if ( num_term == data.size() * algorithms.size() ) - { - - getOwner()->setActive(); - resume(); - } -} - -template < typename EntityType > void peoMultiStart< EntityType >::notifySendingData() -{} - -template < typename EntityType > void peoMultiStart< EntityType >::notifySendingAllResourceRequests() -{ - - getOwner()->setPassive(); -} - - -#endif diff --git a/trunk/paradiseo-peo/src/peoNoAggEvalFunc.h b/trunk/paradiseo-peo/src/peoNoAggEvalFunc.h deleted file mode 100644 index 689c8013c..000000000 --- a/trunk/paradiseo-peo/src/peoNoAggEvalFunc.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peoNoAggEvalFunc_h -#define __peoNoAggEvalFunc_h - -#include "peoAggEvalFunc.h" - -//! Class providing a simple interface for associating a fitness value to a specified individual. - -//! The peoNoAggEvalFunc class does nothing more than an association between a fitness value and a specified individual. -//! The class is provided as a mean of declaring that no aggregation is required for the evaluation function - the fitness -//! value is explicitly specified. -template< class EOT > class peoNoAggEvalFunc : public peoAggEvalFunc< EOT > - { - - public : - - //! Operator which sets as fitness the __fit value for the __sol individual - //! @param EOT& __sol - //! @param typename EOT :: Fitness& __fit - void operator()( EOT& __sol, const typename EOT :: Fitness& __fit ); - }; - - -template< class EOT > void peoNoAggEvalFunc< EOT > :: operator()( EOT& __sol, const typename EOT :: Fitness& __fit ) -{ - - __sol.fitness( __fit ); -} - - -#endif diff --git a/trunk/paradiseo-peo/src/peoPSO.h b/trunk/paradiseo-peo/src/peoPSO.h deleted file mode 100644 index aa2de53e4..000000000 --- a/trunk/paradiseo-peo/src/peoPSO.h +++ /dev/null @@ -1,167 +0,0 @@ -/* -* -* (c) OPAC Team, October 2008 -* -* Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* Contact: clive.canape@inria.fr -*/ - -#ifndef peoPSO_h -#define peoPSO_h - -#include -#include -#include -#include -#include -#include -#include -#include - -/* -//! @class peoPSOSelect -//! @brief Specific class for a selection of a population of a PSO -//! @see eoSelectOne -//! @version 1.1 -//! @date october 2007 -*/ -template class peoPSOSelect: public eoSelectOne - { - public: -/* - //! @brief Constructor - //! @param eoTopology < POT > & _topology -*/ - peoPSOSelect(eoTopology < POT > & _topology):topology(_topology) - {} - -// //! @brief typedef : creation of Fitness - typedef typename PO < POT >::Fitness Fitness; -/* - //! @brief Virtual operator - //! @param eoPop& _pop - //! @return POT& -*/ - virtual const POT& operator()(const eoPop& _pop) - { -//return topology.globalBest(_pop); - return topology.globalBest(); - } - - private: -// //! @param eoTopology < POT > & topology - eoTopology < POT > & topology; - }; -/* -//! @class peoGlobalBestVelocity -//! @brief Specific class for a replacement thanks to the velocity migration of a population of a PSO -//! @see eoReplacement -//! @version 1.1 -//! @date october 2007 -*/ -template -class peoGlobalBestVelocity : public eoReplacement - { - public: - -// //! @brief typedef : creation of VelocityType - typedef typename POT::ParticleVelocityType VelocityType; -/* - //! @brief Constructor - //! @param double & _c3 - //! @param eoVelocity < POT > &_velocity -*/ - peoGlobalBestVelocity( const double & _c3, eoVelocity < POT > &_velocity): c3 (_c3),velocity (_velocity) - {} -/* - //! @brief Virtual operator - //! @param eoPop& _dest - //! @param eoPop& _source -*/ - void operator()(eoPop& _dest, eoPop& _source) - { - - VelocityType newVelocity,r3; - r3 = (VelocityType) rng.uniform (1) * c3; - for (unsigned i=0;i<_dest.size();i++) - for (unsigned j=0;j<_dest[i].size();j++) - { - newVelocity= _dest[i].velocities[j] + r3 * (_source[0].bestPositions[j] - _dest[i][j]); - _dest[i].velocities[j]=newVelocity; - } - - } - - protected: -/* - //! @param double & c3 - //! @param eoVelocity < POT > & velocity -*/ - const double & c3; - eoVelocity < POT > & velocity; - }; -/* -//! @class peoWorstPositionReplacement -//! @brief Specific class for a replacement of a population of a PSO -//! @see eoReplacement -//! @version 1.1 -//! @date october 2007 -*/ -template class peoWorstPositionReplacement : public eoReplacement - { - public: -// //! @brief constructor - peoWorstPositionReplacement() - {} -/* - //! @brief operator - //! @param eoPop& _dest - //! @param eoPop& _source -*/ - void operator()(eoPop& _dest, eoPop& _source) - { - unsigned ind=0; - double best=_dest[0].best(); - for (unsigned j=1;j<_dest.size();j++) - if (_dest[j].best() < best) - { - ind=j; - best=_dest[j].best(); - } - if (_dest[ind].best() < _source[0].best()) - { - _dest[ind].best(_source[0].best()); - for (unsigned j=0;j<_dest[ind].size();j++) - _dest[ind].bestPositions[j]=_source[0].bestPositions[j]; - } - } - }; - -#endif diff --git a/trunk/paradiseo-peo/src/peoPopEval.h b/trunk/paradiseo-peo/src/peoPopEval.h deleted file mode 100644 index ca14f5b3d..000000000 --- a/trunk/paradiseo-peo/src/peoPopEval.h +++ /dev/null @@ -1,315 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* Mostepha-Redouane Khouadjia, Johann Dréo -* (C) TAO Project Team of INRIA Saclay, Thales group, 2010 - -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peoPopEval_h -#define __peoPopEval_h - -#include -#include -#include -#include - -#include "core/messaging.h" -#include "core/peo_debug.h" -#include "peoAggEvalFunc.h" -#include "peoNoAggEvalFunc.h" -#include "core/packUnpackeoScalarFitness.h" - - -//! @class peoPopEval -//! @brief Parallel evaluation functor wrapper -//! @see Service eoPopEvalFunc -//! @version 1.2 -//! @date 2006 - -template< class EOT > class peoPopEval : public Service, public eoPopEvalFunc - { - - public: - - //! Constructor function - an EO-derived evaluation functor has to be specified; an internal reference - //! is set towards the specified evaluation functor. - //! - //! @param eoEvalFunc< EOT >& __eval_func - EO-derived evaluation functor to be applied in parallel on each individual of a specified population - peoPopEval( eoEvalFunc< EOT >& __eval_func ); - - //! Constructor function - a vector of EO-derived evaluation functors has to be specified as well as an aggregation function. - //! - //! @param const std :: vector< eoEvalFunc < EOT >* >& __funcs - vector of EO-derived partial evaluation functors; - //! @param peoAggEvalFunc< EOT >& __merge_eval - aggregation functor for creating a fitness value out of the partial fitness values. - peoPopEval( const std :: vector< eoEvalFunc < EOT >* >& __funcs, peoAggEvalFunc< EOT >& __merge_eval ); - - //! Operator for applying the evaluation functor (direct or aggregate) for each individual of the specified population. - //! - //! @param eoPop< EOT >& __pop - population to be evaluated by applying the evaluation functor specified in the constructor. - void operator()(eoPop< EOT >& __pop); - - //! @brief Operator ()( eoPop< EOT >& __dummy, eoPop< EOT >& __pop ) - //! @param eoPop< EOT >& __dummy - //! @param eoPop< EOT >& __pop - void operator()( eoPop< EOT >& __dummy, eoPop< EOT >& __pop ); - - //! Auxiliary function for transferring data between the process requesting an evaluation operation and the process that - //! performs the actual evaluation phase. There is no need to explicitly call the function. - void packData(); - - //! Auxiliary function for transferring data between the process requesting an evaluation operation and the process that - //! performs the actual evaluation phase. There is no need to explicitly call the function. - void unpackData(); - - //! Auxiliary function - it calls the specified evaluation functor(s). There is no need to explicitly call the function. - void execute(); - - //! Auxiliary function for transferring data between the process requesting an evaluation operation and the process that - //! performs the actual evaluation phase. There is no need to explicitly call the function. - void packResult(); - - //! Auxiliary function for transferring data between the process requesting an evaluation operation and the process that - //! performs the actual evaluation phase. There is no need to explicitly call the function. - void unpackResult(); - - //! Auxiliary function for notifications between the process requesting an evaluation operation and the processes that - //! performs the actual evaluation phase. There is no need to explicitly call the function. - void notifySendingData(); - - //! Auxiliary function for notifications between the process requesting an evaluation operation and the processes that - //! performs the actual evaluation phase. There is no need to explicitly call the function. - void notifySendingAllResourceRequests(); - - private: - - //! @param std :: vector< eoEvalFunc < EOT >* >& funcs - //! @param std :: vector< eoEvalFunc < EOT >* > one_func - //! @param peoAggEvalFunc< EOT >& merge_eval - //! @param peoNoAggEvalFunc< EOT > no_merge_eval - //! @param std :: queue< EOT* >tasks - //! @param std :: map< EOT*, std :: pair< unsigned, unsigned > > progression - //! @param unsigned num_func - //! @param EOT sol - //! @param EOT *ad_sol - //! @param unsigned total - const std :: vector< eoEvalFunc < EOT >* >& funcs; - std :: vector< eoEvalFunc < EOT >* > one_func; - peoAggEvalFunc< EOT >& merge_eval; - peoNoAggEvalFunc< EOT > no_merge_eval; - std :: queue< EOT* >tasks; - std :: map< EOT*, std :: pair< unsigned, unsigned > > progression; - unsigned num_func; - EOT sol; - EOT *ad_sol; - unsigned total; - }; - - -template< class EOT > peoPopEval< EOT > :: peoPopEval( eoEvalFunc< EOT >& __eval_func ) : - - funcs( one_func ), merge_eval( no_merge_eval ) -{ - - one_func.push_back( &__eval_func ); -} - - -template< class EOT > peoPopEval< EOT > :: peoPopEval( - - const std :: vector< eoEvalFunc< EOT >* >& __funcs, - peoAggEvalFunc< EOT >& __merge_eval - -) : funcs( __funcs ), merge_eval( __merge_eval ) -{} - -template< class EOT > void peoPopEval< EOT >::operator()(eoPop< EOT >& __dummy, eoPop< EOT >& __pop ) -{ - this->operator()(__pop); -} - -template< class EOT > void peoPopEval< EOT >::operator()(eoPop< EOT >& __pop ) -{ - if ( __pop.size() && (funcs.size() * __pop.size()) ) - { - for ( unsigned i = 0; i < __pop.size(); i++ ) - { - __pop[ i ].fitness(typename EOT :: Fitness() ); - progression[ &__pop[ i ] ].first = funcs.size() - 1; - progression[ &__pop[ i ] ].second = funcs.size(); - for ( unsigned j = 0; j < funcs.size(); j++ ) - { - /* Queuing the 'invalid' solution and its associated owner */ - tasks.push( &__pop[ i ] ); - } - } - total = funcs.size() * __pop.size(); - requestResourceRequest( funcs.size() * __pop.size() ); - stop(); - } -} - - -template< class EOT > void peoPopEval< EOT > :: packData() -{ - // printDebugMessage ("debut pakc data"); - pack( progression[ tasks.front() ].first-- ); - - /* Packing the contents :-) of the solution */ - pack( *tasks.front() ); - - /* Packing the addresses of both the solution and the owner */ - pack( tasks.front() ); - tasks.pop( ); -} - - -template< class EOT > void peoPopEval< EOT > :: unpackData() -{ - unpack( num_func ); - /* Unpacking the solution */ - unpack( sol ); - /* Unpacking the @ of that one */ - unpack( ad_sol ); -} - - -template< class EOT > void peoPopEval< EOT > :: execute() -{ - - /* Computing the fitness of the solution */ - funcs[ num_func ]->operator()( sol ); -} - - -template< class EOT > void peoPopEval< EOT > :: packResult() -{ - /* Packing the fitness of the solution */ - pack( sol.fitness() ); - /* Packing the @ of the individual */ - pack( ad_sol ); -} - - -template< class EOT > void peoPopEval< EOT > :: unpackResult() -{ - typename EOT :: Fitness fit, __fit; - /* Built in types : int, short, long int, long long int, - * unsigned int, unsigend short, unsigned long int, unsigned long long int, - * float, double, long double - */ - unpack(__fit); fit = __fit; - /* - char types [11] = {'i','s','l','x','j','t','m','y', 'f', 'd','e'}; - const char* type = typeid(fit).name(); - int length = strlen(type); - int position = 18; - if ( length == 1) - { - position = 0; - length = 2; - } - if ( length > 1 && position < length) - { - if ( type[position] == types[0]) - { - int __fit; unpack( __fit );fit = __fit; - } - if ( type[position] == types[1]) - { - short int __fit; unpack( __fit );fit = __fit; - } - if ( type[position] == types[2]) - { - long int __fit; unpack( __fit );fit = __fit; - } - if ( type[position] == types[4]) - { - unsigned int __fit; unpack( __fit );fit = __fit; - } - if ( type[position] == types[5]) - { - unsigned short __fit; unpack( __fit );fit = __fit; - } - if ( type[position] == types[6]) - { - unsigned long __fit; unpack( __fit );fit = __fit; - } - if ( type[position] == types[8]) - { - float __fit; unpack( __fit );fit = __fit; - } - if ( type[position] == types[9]) - { - double __fit; unpack( __fit );fit = __fit; - } - } - - */ - /* Unpacking the @ of the associated individual */ - unpack( ad_sol ); - - - /* Associating the fitness the local solution */ - merge_eval( *ad_sol, fit ); - - progression[ ad_sol ].second--; - - /* Notifying the container of the termination of the evaluation */ - if ( !progression[ ad_sol ].second ) - { - - progression.erase( ad_sol ); - } - - total--; - if ( !total ) - { - - getOwner()->setActive(); - resume(); - } -} - - -template< class EOT > void peoPopEval< EOT > :: notifySendingData() -{} - - -template< class EOT > void peoPopEval< EOT > :: notifySendingAllResourceRequests() -{ - getOwner()->setPassive(); -} - - -#endif diff --git a/trunk/paradiseo-peo/src/peoSyncDataTransfer.h b/trunk/paradiseo-peo/src/peoSyncDataTransfer.h deleted file mode 100755 index d1f7b8436..000000000 --- a/trunk/paradiseo-peo/src/peoSyncDataTransfer.h +++ /dev/null @@ -1,288 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Alexandru-Adrian TANTAR -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peoSyncDataTransfer_h -#define __peoSyncDataTransfer_h - - -#include -#include - -#include - -#include "core/peoAbstractDefs.h" - -#include "core/messaging.h" -#include "core/eoPop_mesg.h" -#include "core/eoVector_mesg.h" - -#include "core/topology.h" -#include "core/thread.h" -#include "core/cooperative.h" -#include "core/peo_debug.h" - -#include "rmc/mpi/synchron.h" - - -extern void wakeUpCommunicator(); -extern int getNodeRank(); - - -class peoSyncDataTransfer : public Cooperative, public eoUpdater - { - - public: - - template< typename EndPointType > - peoSyncDataTransfer( - - EndPointType& __endPoint, - Topology& __topology - - ) : topology( __topology ) - { - - source = new MsgTransferQueue< EndPointType >( __endPoint ); - destination = new MsgTransferQueue< EndPointType >( __endPoint ); - __topology.add( *this ); - - sem_init( &sync, 0, 0 ); - } - - template< typename EndPointType, typename FunctorType > - peoSyncDataTransfer( - - EndPointType& __endPoint, - Topology& __topology, - FunctorType& externalFunctorRef - - ) : topology( __topology ) - { - - source = new MsgTransferQueue< EndPointType >( __endPoint, externalFunctorRef ); - destination = new MsgTransferQueue< EndPointType >( __endPoint, externalFunctorRef ); - __topology.add( *this ); - - sem_init( &sync, 0, 0 ); - } - - template< typename SourceEndPointType, typename DestinationEndPointType > - peoSyncDataTransfer( - - SourceEndPointType& __source, - DestinationEndPointType& __destination, - Topology& __topology - - ) : topology( __topology ) - { - - source = new MsgTransferQueue< SourceEndPointType >( __source ); - destination = new MsgTransferQueue< DestinationEndPointType >( __destination ); - __topology.add( *this ); - - sem_init( &sync, 0, 0 ); - } - - template< typename SourceEndPointType, typename DestinationEndPointType, typename FunctorType > - peoSyncDataTransfer( - - SourceEndPointType& __source, - DestinationEndPointType& __destination, - Topology& __topology, - FunctorType& externalFunctorRef - - ) : topology( __topology ) - { - - source = new MsgTransferQueue< SourceEndPointType >( __source, externalFunctorRef ); - destination = new MsgTransferQueue< DestinationEndPointType >( __destination, externalFunctorRef ); - __topology.add( *this ); - - sem_init( &sync, 0, 0 ); - } - - - void operator()() - { - - standbyTransfer = false; - nbTransfersIn = nbTransfersOut = 0; - - topology.setNeighbors( this, in, out ); - all = topology; - - synchronizeCoopEx(); - stop(); - - // sending data out - sendData(); - // synchronizing - sem_wait( &sync ); - // receiving data in - receiveData(); - - synchronizeCoopEx(); - stop(); - } - - - void pack() - { - - ::pack( coop_em.front()->getKey() ); - source->packMessage(); - coop_em.pop(); - } - - void unpack() - { - - destination->unpackMessage(); - } - - - void packSynchronizeReq() - { - - packSynchronRequest( all ); - } - - - void notifySending() - { - - nbTransfersOut++; - - printDebugMessage( "peoSyncDataTransfer: notified of the completion of a transfer round." ); - - getOwner()->setActive(); - if ( nbTransfersOut == out.size() && nbTransfersIn < in.size() ) - { - getOwner()->setPassive(); - } - } - - - void notifyReceiving() - { - - nbTransfersIn++; - printDebugMessage( "peoSyncIslandMig: notified of incoming data." ); - - if ( standbyTransfer ) - { - getOwner()->setActive(); - if ( nbTransfersOut == out.size() && nbTransfersIn < in.size() ) - getOwner()->setPassive(); - } - - if ( nbTransfersIn == in.size() ) - { - - printDebugMessage( "peoSyncIslandMig: finished collecting incoming data." ); - sem_post( &sync ); - } - } - - - void notifySendingSyncReq() - { - - getOwner()->setPassive(); - printDebugMessage( "peoSyncIslandMig: synchronization request sent." ); - } - - void notifySynchronized() - { - - printDebugMessage( "peoSyncIslandMig: cooperators synchronized." ); - - standbyTransfer = true; - getOwner()->setActive(); - resume(); - } - - - private: - - void sendData() - { - - for ( unsigned i = 0; i < out.size(); i ++ ) - { - - source->pushMessage(); - - coop_em.push( out[ i ] ); - send( out[ i ]); - - printDebugMessage( "peoSyncDataTransfer: sending data." ); - } - - wakeUpCommunicator(); - } - - void receiveData() - { - - assert( !( destination->empty() ) ); - - while ( !( destination->empty() ) ) - { - - printDebugMessage( "peoSyncDataTransfer: received data." ); - destination->popMessage(); - printDebugMessage( "peoSyncDataTransfer: done extracting received data." ); - } - } - - Topology& topology; // neighboring topology - - // source and destination end-points - AbstractMsgTransferQueue* source; - AbstractMsgTransferQueue* destination; - - std :: queue< Cooperative* > coop_em; - - sem_t sync; - - bool standbyTransfer; - - std :: vector< Cooperative* > in, out, all; - unsigned nbTransfersIn, nbTransfersOut; - }; - -#endif diff --git a/trunk/paradiseo-peo/src/peoSyncIslandMig.h b/trunk/paradiseo-peo/src/peoSyncIslandMig.h deleted file mode 100644 index 9f125be3b..000000000 --- a/trunk/paradiseo-peo/src/peoSyncIslandMig.h +++ /dev/null @@ -1,257 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peoSyncIslandMig_h -#define __peoSyncIslandMig_h - - -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include "peoData.h" - -#include "core/messaging.h" -#include "core/eoPop_mesg.h" -#include "core/eoVector_mesg.h" - -#include "core/topology.h" -#include "core/thread.h" -#include "core/cooperative.h" -#include "core/peo_debug.h" - -#include "rmc/mpi/synchron.h" - - -//! @class peoSyncIslandMig -//! @brief Specific class for a synchronous migration -//! @see Cooperative eoUpdater -//! @version 2.0 -//! @date january 2008 -template< class TYPESELECT, class TYPEREPLACE > class peoSyncIslandMig : public Cooperative, public eoUpdater - { - - public: - - //! @brief Constructor - //! @param unsigned __frequency - //! @param selector & __select - //! @param replacement & __replace - //! @param Topology& __topology - peoSyncIslandMig( - unsigned __frequency, - selector & __select, - replacement & __replace, - Topology& __topology - ); - - //! @brief operator - void operator()(); - //! @brief Function realizing packages - void pack(); - //! @brief Function reconstituting packages - void unpack(); - //! @brief Function packSynchronizeReq - void packSynchronizeReq(); - //! @brief Function notifySending - void notifySending(); - //! @brief Function notifyReceiving - void notifyReceiving(); - //! @brief notifySendingSyncReq - void notifySendingSyncReq(); - //! @brief notifySynchronized - void notifySynchronized(); - - private: - - void emigrate(); - void immigrate(); - - - private: - //! @param eoSyncContinue cont - //! @param selector & select - //! @param replacement & replace - //! @param Topology& topology - //! @param std :: queue< TYPEREPLACE > imm - //! @param std :: queue< TYPESELECT > em - //! @param std :: queue< Cooperative* > coop_em - //! @param sem_t sync - //! @param bool explicitPassive - //! @param bool standbyMigration - //! @param std :: vector< Cooperative* > in, out, all - //! @param unsigned nbMigrations - eoSyncContinue cont; - selector & select; - replacement & replace; - Topology& topology; - std :: queue< TYPEREPLACE > imm; - std :: queue< TYPESELECT > em; - std :: queue< Cooperative* > coop_em; - sem_t sync; - bool explicitPassive; - bool standbyMigration; - std :: vector< Cooperative* > in, out, all; - unsigned nbMigrations; - }; - - -template< class TYPESELECT, class TYPEREPLACE > peoSyncIslandMig< TYPESELECT,TYPEREPLACE > :: peoSyncIslandMig( - - unsigned __frequency, - selector & __select, - replacement & __replace, - Topology& __topology -) : cont( __frequency ), select( __select ), replace( __replace ), topology( __topology ) -{ - - __topology.add( *this ); - sem_init( &sync, 0, 0 ); -} - - -template< class TYPESELECT, class TYPEREPLACE > void peoSyncIslandMig< TYPESELECT, TYPEREPLACE > :: pack() -{ - ::pack( coop_em.front()->getKey() ); - ::pack(em.front()); - coop_em.pop(); - em.pop(); -} - -template< class TYPESELECT, class TYPEREPLACE > void peoSyncIslandMig< TYPESELECT, TYPEREPLACE > :: unpack() -{ - TYPEREPLACE mig; - ::unpack(mig); - imm.push( mig ); - explicitPassive = true; -} - -template< class TYPESELECT, class TYPEREPLACE > void peoSyncIslandMig< TYPESELECT,TYPEREPLACE > :: packSynchronizeReq() -{ - - packSynchronRequest( all ); -} - -template< class TYPESELECT, class TYPEREPLACE > void peoSyncIslandMig< TYPESELECT , TYPEREPLACE > :: emigrate() -{ - - for ( unsigned i = 0; i < out.size(); i ++ ) - { - - TYPESELECT mig; - select( mig ); - em.push( mig ); - coop_em.push( out[ i ] ); - send( out[ i ] ); - printDebugMessage( "peoSyncIslandMig: sending some emigrants." ); - } -} - -template< class TYPESELECT, class TYPEREPLACE > void peoSyncIslandMig< TYPESELECT , TYPEREPLACE > :: immigrate() -{ - assert( imm.size() ); - - while ( imm.size() ) - { - replace( imm.front() ) ; - imm.pop(); - } - - printDebugMessage( "peoSyncIslandMig: receiving some immigrants." ); -} - -template< class TYPESELECT, class TYPEREPLACE > void peoSyncIslandMig< TYPESELECT , TYPEREPLACE > :: operator()() -{ - - if (! cont.check() ) - { - explicitPassive = standbyMigration = false; - topology.setNeighbors( this, in, out ); - all = topology; - nbMigrations = 0; - synchronizeCoopEx(); - stop(); - // sending emigrants - emigrate(); - // synchronizing - sem_wait( &sync ); - // receiving immigrants - immigrate(); - synchronizeCoopEx(); - stop(); - } -} - -template< class TYPESELECT, class TYPEREPLACE > void peoSyncIslandMig< TYPESELECT , TYPEREPLACE > :: notifySending() -{ - if ( !explicitPassive ) getOwner()->setPassive(); -} - -template< class TYPESELECT, class TYPEREPLACE > void peoSyncIslandMig< TYPESELECT , TYPEREPLACE > :: notifyReceiving() -{ - nbMigrations++; - - if ( nbMigrations == in.size() ) - { - - if ( standbyMigration ) getOwner()->setActive(); - sem_post( &sync ); - } -} - -template< class TYPESELECT, class TYPE > void peoSyncIslandMig< TYPESELECT, TYPE > :: notifySendingSyncReq () -{ - - getOwner()->setPassive(); -} - -template< class TYPESELECT, class TYPE > void peoSyncIslandMig< TYPESELECT, TYPE > :: notifySynchronized () -{ - - standbyMigration = true; - getOwner()->setActive(); - resume(); -} - - -#endif diff --git a/trunk/paradiseo-peo/src/peoTransform.h b/trunk/paradiseo-peo/src/peoTransform.h deleted file mode 100644 index b6b058871..000000000 --- a/trunk/paradiseo-peo/src/peoTransform.h +++ /dev/null @@ -1,199 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peoTransform_h -#define __peoTransform_h - -#include "core/thread.h" -#include "core/messaging.h" -#include "core/peo_debug.h" -#include "core/service.h" - - -extern int getNodeRank(); - -//! @class peoTransform -//! @brief Class for a parallel transform -//! @see Service eoTransform -//! @version 1.1 -//! @date january 2008 -template< class EOT > class peoTransform : public Service, public eoTransform< EOT > - { - - public: - - //! @brief Constructor - //! @param eoQuadOp< EOT >& __cross - //! @param double __cross_rate - //! @param eoMonOp< EOT >& __mut - //! @param double __mut_rate - peoTransform( - eoQuadOp< EOT >& __cross, - double __cross_rate, - eoMonOp< EOT >& __mut, - double __mut_rate - ); - - //! @brief Operator - //! @param eoPop< EOT >& __pop - void operator()( eoPop< EOT >& __pop ); - //! @brief Function realizing packages of data - void packData(); - //! @brief Function reconstituting packages of data - void unpackData(); - //! @brief Function which executes the algorithm - void execute(); - //! @brief Function realizing packages of the result - void packResult(); - //! @brief Function reconstituting packages of result - void unpackResult(); - //! @brief Function notifySendingData - void notifySendingData(); - //! @brief Function notifySendingAllResourceRequests - void notifySendingAllResourceRequests(); - - private: - //! @param eoQuadOp< EOT >& cross - //! @param double cross_rate - //! @param eoMonOp< EOT >& mut - //! @param double mut_rate - //! @param unsigned idx - //! @param eoPop< EOT >* pop - //! @param EOT father - //! @param mother - //! @param unsigned num_term - eoQuadOp< EOT >& cross; - double cross_rate; - eoMonOp< EOT >& mut; - double mut_rate; - unsigned idx; - eoPop< EOT >* pop; - EOT father, mother; - unsigned num_term; - }; - -template< class EOT > peoTransform< EOT > :: peoTransform( - - eoQuadOp< EOT >& __cross, - double __cross_rate, - eoMonOp < EOT >& __mut, - double __mut_rate - -) : cross( __cross ), cross_rate( __cross_rate ), mut( __mut ), mut_rate( __mut_rate ) -{} - - -template< class EOT > void peoTransform< EOT > :: packData() -{ - - pack( idx ); - pack( pop->operator[]( idx++ ) ); - pack( pop->operator[]( idx++ ) ); -} - - -template< class EOT > void peoTransform< EOT > :: unpackData() -{ - - unpack( idx ); - unpack( father ); - unpack( mother ); -} - - -template< class EOT > void peoTransform< EOT > :: execute() -{ - - if ( rng.uniform() < cross_rate ) cross( mother, father ); - - if ( rng.uniform() < mut_rate ) mut( mother ); - if ( rng.uniform() < mut_rate ) mut( father ); -} - - -template< class EOT > void peoTransform< EOT > :: packResult() -{ - - pack( idx ); - pack( father ); - pack( mother ); -} - - -template< class EOT > void peoTransform< EOT > :: unpackResult() -{ - - unsigned sidx; - - unpack( sidx ); - unpack( pop->operator[]( sidx++ ) ); - unpack( pop->operator[]( sidx ) ); - num_term += 2; - - // Can be used with an odd size - if ( num_term == 2*(pop->size()/2) ) - { - - getOwner()->setActive(); - resume(); - } -} - - -template< class EOT > void peoTransform< EOT > :: operator()( eoPop < EOT >& __pop ) -{ - - printDebugMessage( "peoTransform: performing the parallel transformation step." ); - pop = &__pop; - idx = 0; - num_term = 0; - requestResourceRequest( __pop.size() / 2 ); - stop(); -} - - -template< class EOT > void peoTransform< EOT > :: notifySendingData() -{} - - -template< class EOT > void peoTransform< EOT > :: notifySendingAllResourceRequests() -{ - - getOwner()->setPassive(); -} - - -#endif diff --git a/trunk/paradiseo-peo/src/peoWrapper.h b/trunk/paradiseo-peo/src/peoWrapper.h deleted file mode 100644 index 664f53b41..000000000 --- a/trunk/paradiseo-peo/src/peoWrapper.h +++ /dev/null @@ -1,174 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __peoParaAlgorithm_h -#define __peoParaAlgorithm_h - - -#include "core/runner.h" -#include "core/peo_debug.h" - -//! @class peoWrapper -//! @brief Specific class for wrapping -//! @see Runner -//! @version 1.1 -//! @date december 2007 -class peoWrapper : public Runner - { - - public: - - //! @brief constructor - //! @param AlgorithmType& externalAlgorithm - template< typename AlgorithmType > peoWrapper( AlgorithmType& externalAlgorithm ) - : algorithm( new Algorithm< AlgorithmType, void >( externalAlgorithm ) ) - {} - - //! @brief constructor - //! @param AlgorithmType& externalAlgorithm - //! @param AlgorithmDataType& externalData - template< typename AlgorithmType, typename AlgorithmDataType > peoWrapper( AlgorithmType& externalAlgorithm, AlgorithmDataType& externalData ) - : algorithm( new Algorithm< AlgorithmType, AlgorithmDataType >( externalAlgorithm, externalData ) ) - {} - - //! @brief constructor - //! @param AlgorithmReturnType& (*externalAlgorithm)() - template< typename AlgorithmReturnType > peoWrapper( AlgorithmReturnType& (*externalAlgorithm)() ) - : algorithm( new FunctionAlgorithm< AlgorithmReturnType, void >( externalAlgorithm ) ) - {} - - //! @brief constructor - //! @param AlgorithmReturnType& (*externalAlgorithm)( AlgorithmDataType& ) - //! @param AlgorithmDataType& externalData - template< typename AlgorithmReturnType, typename AlgorithmDataType > peoWrapper( AlgorithmReturnType& (*externalAlgorithm)( AlgorithmDataType& ), AlgorithmDataType& externalData ) - : algorithm( new FunctionAlgorithm< AlgorithmReturnType, AlgorithmDataType >( externalAlgorithm, externalData ) ) - {} - - //! @brief destructor - ~peoWrapper() - { - delete algorithm; - } - - //! @brief function run - void run() - { - algorithm->operator()(); - } - - - private: - - struct AbstractAlgorithm - { - - // virtual destructor as we will be using inheritance and polymorphism - virtual ~AbstractAlgorithm() - { } - - // operator to be called for executing the algorithm - virtual void operator()() - { } - }; - - template< typename AlgorithmType, typename AlgorithmDataType > struct Algorithm : public AbstractAlgorithm - { - - Algorithm( AlgorithmType& externalAlgorithm, AlgorithmDataType& externalData ) - : algorithm( externalAlgorithm ), algorithmData( externalData ) - {} - - virtual void operator()() - { - algorithm( algorithmData ); - } - - AlgorithmType& algorithm; - AlgorithmDataType& algorithmData; - }; - - template< typename AlgorithmType > struct Algorithm< AlgorithmType, void > : public AbstractAlgorithm - { - - Algorithm( AlgorithmType& externalAlgorithm ) : algorithm( externalAlgorithm ) - {} - - virtual void operator()() - { - algorithm(); - } - - AlgorithmType& algorithm; - }; - - template< typename AlgorithmReturnType, typename AlgorithmDataType > struct FunctionAlgorithm : public AbstractAlgorithm - { - - FunctionAlgorithm( AlgorithmReturnType (*externalAlgorithm)( AlgorithmDataType& ), AlgorithmDataType& externalData ) - : algorithm( externalAlgorithm ), algorithmData( externalData ) - {} - - virtual void operator()() - { - algorithm( algorithmData ); - } - - AlgorithmReturnType (*algorithm)( AlgorithmDataType& ); - AlgorithmDataType& algorithmData; - }; - - template< typename AlgorithmReturnType > struct FunctionAlgorithm< AlgorithmReturnType, void > : public AbstractAlgorithm - { - - FunctionAlgorithm( AlgorithmReturnType (*externalAlgorithm)() ) - : algorithm( externalAlgorithm ) - {} - - virtual void operator()() - { - algorithm(); - } - - AlgorithmReturnType (*algorithm)(); - }; - - private: - //! @param AbstractAlgorithm* algorithm - AbstractAlgorithm* algorithm; - }; - - -#endif diff --git a/trunk/paradiseo-peo/src/rmc/mpi/comm.cpp b/trunk/paradiseo-peo/src/rmc/mpi/comm.cpp deleted file mode 100644 index e0d771d47..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/comm.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - - -#include - -#include "comm.h" -#include "mess.h" -#include "node.h" -#include "param.h" -#include "../../core/peo_debug.h" -#include "../../core/runner.h" -#include "send.h" -#include "recv.h" -#include "scheduler.h" - -static sem_t sem_comm_init; - -static Communicator * the_thread; - - -Communicator :: Communicator (int * __argc, char * * * __argv) -{ - - the_thread = this; - initNode (__argc, __argv); - loadRMCParameters (* __argc, * __argv); - - sem_post (& sem_comm_init); -} - -void Communicator :: start () -{ - - while (true) - { - - /* Zzz Zzz Zzz :-))) */ - sleep (); - - sendMessages (); - - if (! atLeastOneActiveRunner () && ! atLeastOneActiveThread() && allResourcesFree ()) - break; - - receiveMessages (); - } - - waitBuffers (); - printDebugMessage ("finalizing"); - - //synchronizeNodes (); -} - -void initCommunication () -{ - - static bool initializedSemaphore = false; - - if (initializedSemaphore) - { - sem_destroy(& sem_comm_init); - } - - sem_init (& sem_comm_init, 0, 0); - initializedSemaphore = true; -} - -void waitNodeInitialization () -{ - - sem_wait (& sem_comm_init); -} - -void wakeUpCommunicator () -{ - - the_thread -> wakeUp (); -} diff --git a/trunk/paradiseo-peo/src/rmc/mpi/comm.h b/trunk/paradiseo-peo/src/rmc/mpi/comm.h deleted file mode 100644 index 3b1bfb288..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/comm.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __comm_mpi_h -#define __comm_mpi_h - -#include "../../core/communicable.h" -#include "../../core/reac_thread.h" - -class Communicator : public ReactiveThread - { - - public : - - /* Ctor */ - Communicator (int * __argc, char * * * __argv); - - void start (); - }; - -extern void initCommunication (); - -extern void waitNodeInitialization (); - -extern void wakeUpCommunicator (); - -#endif diff --git a/trunk/paradiseo-peo/src/rmc/mpi/cooperative.cpp b/trunk/paradiseo-peo/src/rmc/mpi/cooperative.cpp deleted file mode 100644 index 713291748..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/cooperative.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "../../core/cooperative.h" -#include "send.h" -#include "tags.h" -#include "schema.h" -#include "mess.h" -#include "../../core/peo_debug.h" - -Runner * Cooperative :: getOwner () -{ - - return owner; -} - -void Cooperative :: setOwner (Runner & __runner) -{ - - owner = & __runner; -} - -void Cooperative :: send (Cooperative * __coop) -{ - - :: send (this, getRankOfRunner (__coop -> getOwner () -> getDefinitionID ()), COOP_TAG); - // stop (); -} - -void Cooperative :: synchronizeCoopEx () -{ - :: send (this, my_node -> rk_sched, SYNCHRONIZE_REQ_TAG); -} - -Cooperative * getCooperative (COOP_ID __key) -{ - - return dynamic_cast (getCommunicable (__key)); -} - -void Cooperative :: notifySending () -{ - - //getOwner -> setPassive (); - // resume (); -} - -void Cooperative :: notifyReceiving () -{} - -void Cooperative :: notifySendingSyncReq () -{} - -void Cooperative :: notifySynchronized () -{} diff --git a/trunk/paradiseo-peo/src/rmc/mpi/mess.cpp b/trunk/paradiseo-peo/src/rmc/mpi/mess.cpp deleted file mode 100644 index c30f56c28..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/mess.cpp +++ /dev/null @@ -1,347 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include -#include - -#include "mess.h" -#include "../../core/peo_debug.h" -#include "node.h" - -#define MPI_BUF_SIZE 1024*512 - -static char mpi_buf [MPI_BUF_SIZE]; - -static int pos_buf; - -static std :: vector act_buf; /* Active buffers */ - -static std :: vector act_req; /* Active requests */ - -void initBuffers () -{ - - pos_buf = 0; - act_buf.clear (); - act_req.clear (); -} - -void cleanBuffers () -{ - - for (unsigned i = 0; i < act_req.size ();) - { - - MPI_Status stat ; - int flag ; - - MPI_Test (act_req [i], & flag, & stat) ; - if (flag) - { - - delete[] act_buf [i] ; - delete act_req [i] ; - - act_buf [i] = act_buf.back () ; - act_buf.pop_back () ; - - act_req [i] = act_req.back () ; - act_req.pop_back () ; - } - else - i ++; - } -} - -void waitBuffers () -{ - - // printDebugMessage ("waiting the termination of the asynchronous operations to complete"); - - for (unsigned i = 0; i < act_req.size (); i ++) - { - - MPI_Status stat ; - - MPI_Wait (act_req [i], & stat) ; - - delete[] act_buf [i] ; - delete act_req [i] ; - } -} - -bool probeMessage (int & __src, int & __tag) -{ - - int flag; - - MPI_Status stat; - - MPI_Iprobe (MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, & flag, & stat); - - __src = stat.MPI_SOURCE; - __tag = stat.MPI_TAG; - - return flag; -} - -void waitMessage () -{ - - MPI_Status stat; - - MPI_Probe (MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, & stat); -} - -void initMessage () -{ - - pos_buf = 0; -} - -void sendMessage (int __to, int __tag) -{ - - cleanBuffers (); - act_buf.push_back (new char [pos_buf]); - act_req.push_back (new MPI_Request); - memcpy (act_buf.back (), mpi_buf, pos_buf); - MPI_Isend (act_buf.back (), pos_buf, MPI_PACKED, __to, __tag, MPI_COMM_WORLD, act_req.back ()); -} - -void sendMessageToAll (int __tag) -{ - - for (int i = 0; i < getNumberOfNodes (); i ++) - sendMessage (i, __tag); -} - -void receiveMessage (int __from, int __tag) -{ - - MPI_Status stat; - MPI_Request req; - - MPI_Irecv (mpi_buf, MPI_BUF_SIZE, MPI_PACKED, __from, __tag, MPI_COMM_WORLD, & req); - MPI_Wait (& req, & stat); -} - -void synchronizeNodes () -{ - - MPI_Barrier ( MPI_COMM_WORLD ); -} - -/* Char */ -void pack (const char & __c) -{ - - MPI_Pack ((void *) & __c, 1, MPI_CHAR, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD); -} - -/* Boolean */ -void pack (const bool & __b, int __nitem) -{ - - MPI_Pack ((void *) & __b, __nitem, MPI_INT, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD); -} - -/* Float */ -void pack (const float & __f, int __nitem) -{ - - MPI_Pack ((void *) & __f, __nitem, MPI_FLOAT, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD); -} - -/* Double */ -void pack (const double & __d, int __nitem) -{ - - MPI_Pack ((void *) & __d, __nitem, MPI_DOUBLE, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD); -} - -/* Integer */ -void pack (const int & __i, int __nitem) -{ - - MPI_Pack ((void *) & __i, __nitem, MPI_INT, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD); -} - -/* Unsigned int. */ -void pack (const unsigned int & __ui, int __nitem) -{ - - MPI_Pack ((void *) & __ui, __nitem, MPI_UNSIGNED, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD); -} - -/* Short int. */ -void pack (const short & __sh, int __nitem) -{ - - MPI_Pack ((void *) & __sh, __nitem, MPI_SHORT, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD); -} - -/* Unsigned short */ -void pack (const unsigned short & __ush, int __nitem) -{ - - MPI_Pack ((void *) & __ush, __nitem, MPI_UNSIGNED_SHORT, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD); -} - -/* Long */ -void pack (const long & __l, int __nitem) -{ - - MPI_Pack ((void *) & __l, __nitem, MPI_LONG, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD); -} - -/* Unsigned long */ -void pack (const unsigned long & __ul, int __nitem) -{ - - MPI_Pack ((void *) & __ul, __nitem, MPI_UNSIGNED_LONG, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD); -} - -/* String */ -void pack (const char * __str) -{ - - int len = strlen (__str) + 1; - MPI_Pack (& len, 1, MPI_INT, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD); - MPI_Pack ((void *) __str, len, MPI_CHAR, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD); -} - -void pack (const std::string & __str) -{ - - size_t size = __str.size() + 1; - char * buffer = new char[ size ]; - strncpy( buffer, __str.c_str(), size ); - pack (buffer); - delete [] buffer; -} - -/* Char */ -void unpack (char & __c) -{ - - MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __c, 1, MPI_CHAR, MPI_COMM_WORLD); -} - -/* Boolean */ -extern void unpack (bool & __b, int __nitem ) - { - - MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __b, __nitem, MPI_INT, MPI_COMM_WORLD); - } - -/* Float */ -void unpack (float & __f, int __nitem) -{ - - MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __f, __nitem, MPI_FLOAT, MPI_COMM_WORLD); -} - -/* Double */ -void unpack (double & __d, int __nitem) -{ - - MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __d, __nitem, MPI_DOUBLE, MPI_COMM_WORLD); -} - -/* Integer */ -void unpack (int & __i, int __nitem) -{ - - MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __i, __nitem, MPI_INT, MPI_COMM_WORLD); -} - -/* Unsigned int. */ -void unpack (unsigned int & __ui, int __nitem) -{ - - MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __ui, __nitem, MPI_UNSIGNED, MPI_COMM_WORLD); -} - -/* Short int. */ -void unpack (short & __sh, int __nitem) -{ - - MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __sh, __nitem, MPI_SHORT, MPI_COMM_WORLD); -} - -/* Unsigned short */ -void unpack (unsigned short & __ush, int __nitem) -{ - - MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __ush, __nitem, MPI_UNSIGNED_SHORT, MPI_COMM_WORLD); -} - -/* Long */ -void unpack (long & __l, int __nitem) -{ - - MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __l, __nitem, MPI_LONG, MPI_COMM_WORLD); -} - -/* Unsigned long */ -void unpack (unsigned long & __ul, int __nitem) -{ - - MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __ul, __nitem, MPI_UNSIGNED_LONG, MPI_COMM_WORLD); -} - -/* String */ -void unpack (char * __str) -{ - - int len; - MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & len, 1, MPI_INT, MPI_COMM_WORLD); - MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, __str, len, MPI_CHAR, MPI_COMM_WORLD); -} -void unpack (std::string & __str) -{ - - char * buffer; - int len; - MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & len, 1, MPI_INT, MPI_COMM_WORLD); - buffer = new char[len+1]; - MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, buffer, len, MPI_CHAR, MPI_COMM_WORLD); - __str.assign( buffer ); - delete [] buffer; - -} - diff --git a/trunk/paradiseo-peo/src/rmc/mpi/mess.h b/trunk/paradiseo-peo/src/rmc/mpi/mess.h deleted file mode 100644 index 3e2c73046..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/mess.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __mess_rmc_h -#define __mess_rmc_h - -#include - -#include "../../core/messaging.h" - -extern void initMessage (); - -extern void sendMessage (int __to, int __tag); - -extern void sendMessageToAll (int __tag); - -extern void receiveMessage (int __from, int __tag); - -extern void initBuffers (); - -extern void cleanBuffers (); - -extern void waitBuffers (); - -extern bool probeMessage (int & __src, int & __tag); - -extern void waitMessage (); - -extern void synchronizeNodes (); - -#endif diff --git a/trunk/paradiseo-peo/src/rmc/mpi/node.cpp b/trunk/paradiseo-peo/src/rmc/mpi/node.cpp deleted file mode 100644 index bfded53ee..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/node.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include -#include -#include -#include -#include -#include - -#include "mess.h" - - -class MPIThreadedEnv - { - - public: - - static void init ( int * __argc, char * * * __argv ) - { - - static MPIThreadedEnv mpiThreadedEnv( __argc, __argv ); - } - - static void finalize () - { - - static bool finalizedEnvironment = false; - - if (! finalizedEnvironment ) - { - - MPI_Finalize (); - finalizedEnvironment = true; - } - } - - private: - - /* No instance of this class can be created outside its domain! */ - MPIThreadedEnv ( int * __argc, char * * * __argv ) - { - - static bool MPIThreadedEnvInitialized = false; - int provided = 1; - - if (! MPIThreadedEnvInitialized) - { - - MPI_Init_thread (__argc, __argv, MPI_THREAD_FUNNELED, & provided); - - MPIThreadedEnvInitialized = true; - } - } - - ~MPIThreadedEnv() - { - - finalize (); - } - }; - - -static int rk, sz; /* Rank & size */ - -static std :: map name_to_rk; - -static std :: vector rk_to_name; - - -int getNodeRank () -{ - - return rk; -} - -int getNumberOfNodes () -{ - - return sz; -} - -void collectiveCountOfRunners ( unsigned int* num_local_exec_runners, unsigned int* num_exec_runners ) -{ - - MPI_Allreduce( num_local_exec_runners, num_exec_runners, 1, MPI_UNSIGNED, MPI_SUM, MPI_COMM_WORLD ); -} - -int getRankFromName (const std :: string & __name) -{ - - return atoi (__name.c_str ()); -} - -void initNode (int * __argc, char * * * __argv) -{ - - rk_to_name.clear (); - name_to_rk.clear (); - - MPIThreadedEnv :: init ( __argc, __argv ); - //synchronizeNodes(); - - MPI_Comm_rank (MPI_COMM_WORLD, & rk); /* Who ? */ - MPI_Comm_size (MPI_COMM_WORLD, & sz); /* How many ? */ - - char names [sz] [MPI_MAX_PROCESSOR_NAME]; - int len; - - /* Processor names */ - MPI_Get_processor_name (names [0], & len); /* Me */ - MPI_Allgather (names, MPI_MAX_PROCESSOR_NAME, MPI_CHAR, names, MPI_MAX_PROCESSOR_NAME, MPI_CHAR, MPI_COMM_WORLD); /* Broadcast */ - - for (int i = 0; i < sz; i ++) - { - rk_to_name.push_back (names [i]); - name_to_rk [names [i]] = i; - } -} diff --git a/trunk/paradiseo-peo/src/rmc/mpi/node.h b/trunk/paradiseo-peo/src/rmc/mpi/node.h deleted file mode 100644 index 31327c7b0..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/node.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __node_h -#define __node_h - -#include -#include - -#include "../../core/runner.h" - -typedef int RANK_ID; - -struct Node - { - - RANK_ID rk; /* Rank */ - std :: string name; /* Host name */ - unsigned num_workers; /* Number of parallel workers */ - int rk_sched; /* rank of the scheduler */ - std :: vector id_run; /* List of runner def. IDs */ - std :: vector execution_id_run; /* List of runtime execution runner IDs */ - }; - -extern Node * my_node; - -extern bool isScheduleNode (); - -extern int getNodeRank (); /* It gives the rank of the calling process */ - -extern RANK_ID getRankOfRunner (RUNNER_ID __key); - -extern int getNumberOfNodes (); /* It gives the size of the environment (Total number of nodes) */ - -extern void collectiveCountOfRunners ( unsigned int* num_local_exec_runners, unsigned int* num_exec_runners ); - -extern int getRankFromName (const std :: string & __name); /* It gives the rank of the process - expressed by its name */ - -extern void initNode (int * __argc, char * * * __argv); - -#endif diff --git a/trunk/paradiseo-peo/src/rmc/mpi/param.cpp b/trunk/paradiseo-peo/src/rmc/mpi/param.cpp deleted file mode 100644 index 5977642a4..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/param.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include - -#include "schema.h" - -void loadRMCParameters (int & __argc, char * * & __argv) -{ - - eoParser parser (__argc, __argv); - - /* Schema */ - eoValueParam schema_param ("schema.xml", "schema", "?"); - parser.processParam (schema_param); - loadSchema (schema_param.value ().c_str ()); -} diff --git a/trunk/paradiseo-peo/src/rmc/mpi/param.h b/trunk/paradiseo-peo/src/rmc/mpi/param.h deleted file mode 100644 index 69f2b0b5b..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/param.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __rmc_param_h -#define __rmc_param_h - -extern void loadRMCParameters (int & __argc, char * * & __argv); - -#endif diff --git a/trunk/paradiseo-peo/src/rmc/mpi/recv.cpp b/trunk/paradiseo-peo/src/rmc/mpi/recv.cpp deleted file mode 100644 index 9927aa213..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/recv.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "comm.h" -#include "tags.h" -#include "worker.h" -#include "scheduler.h" -#include "synchron.h" -#include "mess.h" -#include "node.h" -#include "../../core/runner.h" -#include "../../core/cooperative.h" -#include "../../core/peo_debug.h" - -void receiveMessages () -{ - - cleanBuffers (); - - do - { - - if (! atLeastOneActiveThread ()) - { - - waitMessage (); - } - - int src, tag; - - while (probeMessage (src, tag)) - { - - receiveMessage (src, tag); - initMessage (); - - switch (tag) - { - - case RUNNER_STOP_TAG: - unpackTerminationOfRunner (); - break; - - case SYNCHRONIZE_REQ_TAG: - unpackSynchronRequest (); - break; - - case SYNCHRONIZED_TAG: - { - RUNNER_ID runner_id; - unpack (runner_id); - - COOP_ID coop_id; - unpack (coop_id); - - getCooperative (coop_id) -> notifySynchronized (); - break; - } - - case COOP_TAG: - COOP_ID coop_id; - unpack (coop_id); - getCooperative (coop_id) -> unpack (); - getCooperative (coop_id) -> notifyReceiving (); - break; - - case SCHED_REQUEST_TAG: - unpackResourceRequest (); - break; - - case SCHED_RESULT_TAG: - { - /* Unpacking the resource */ - SERVICE_ID serv_id; - unpack (serv_id); - Service * serv = getService (serv_id); - int dest; - unpack (dest); - WORKER_ID worker_id; - unpack (worker_id); - - /* Going back ... */ - initMessage (); - pack (worker_id); - pack (serv_id); - serv -> packData (); - serv -> notifySendingData (); - sendMessage (dest, TASK_DATA_TAG); - break; - } - - case TASK_DATA_TAG: - { - WORKER_ID worker_id; - unpack (worker_id); - Worker * worker = getWorker (worker_id); - worker -> setSource (src); - worker -> unpackData (); - worker -> wakeUp (); - break; - } - - case TASK_RESULT_TAG: - { - SERVICE_ID serv_id; - unpack (serv_id); - Service * serv = getService (serv_id); - serv -> unpackResult (); - break; - } - - case TASK_DONE_TAG: - unpackTaskDone (); - break; - - default: - ; - }; - } - - } - while ( ! atLeastOneActiveThread () && atLeastOneActiveRunner () /*&& ! allResourcesFree ()*/ ); -} diff --git a/trunk/paradiseo-peo/src/rmc/mpi/recv.h b/trunk/paradiseo-peo/src/rmc/mpi/recv.h deleted file mode 100644 index cc9e7efa4..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/recv.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __recv_h -#define __recv_h - -extern void receiveMessages (); - -#endif diff --git a/trunk/paradiseo-peo/src/rmc/mpi/rmc.cpp b/trunk/paradiseo-peo/src/rmc/mpi/rmc.cpp deleted file mode 100644 index 3dc075cb8..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/rmc.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "send.h" -#include "worker.h" -#include "schema.h" -#include "comm.h" -#include "scheduler.h" -#include "../../core/peo_debug.h" - -static std :: vector ll_threads; /* Low level threads */ -static std :: vector worker_threads; /* Worker threads */ -static Communicator* communicator_thread = NULL; /* Communicator thread */ - - -void runRMC () -{ - - /* Worker(s) ? */ - for (unsigned i = 0; i < my_node -> num_workers; i ++) - { - worker_threads.push_back (new Worker); - addThread (worker_threads.back(), ll_threads); - } - - wakeUpCommunicator (); -} - -void initRMC (int & __argc, char * * & __argv) -{ - - /* Communication */ - initCommunication (); - communicator_thread = new Communicator (& __argc, & __argv); - addThread (communicator_thread, ll_threads); - waitNodeInitialization (); - initSending (); - - /* Scheduler */ - if (isScheduleNode ()) - initScheduler (); -} - -void finalizeRMC () -{ - - printDebugMessage ("before join threads RMC"); - - joinThreads (ll_threads); - for (unsigned i = 0; i < worker_threads.size(); i++ ) - { - delete worker_threads [i]; - } - worker_threads.clear (); - delete communicator_thread; - - printDebugMessage ("after join threads RMC"); -} diff --git a/trunk/paradiseo-peo/src/rmc/mpi/runner.cpp b/trunk/paradiseo-peo/src/rmc/mpi/runner.cpp deleted file mode 100644 index 3e17a3e27..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/runner.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "../../core/messaging.h" -#include "../../core/runner.h" -#include "node.h" -#include "mess.h" -#include "send.h" -#include "tags.h" -#include "schema.h" - - -bool Runner :: isAssignedLocally () -{ - - for (unsigned i = 0; i < my_node -> id_run.size (); i ++) - if (my_node -> id_run [i] == def_id) - return true; - return false; -} - -void Runner :: terminate () -{ - - sendToAll (this, RUNNER_STOP_TAG); -} - -void Runner :: packTermination () -{ - - pack (def_id); -} diff --git a/trunk/paradiseo-peo/src/rmc/mpi/scheduler.cpp b/trunk/paradiseo-peo/src/rmc/mpi/scheduler.cpp deleted file mode 100644 index ee7c81b32..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/scheduler.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include - -#include "scheduler.h" -#include "tags.h" -#include "mess.h" -#include "../../core/peo_debug.h" - -static std :: queue resources; /* Free resources */ - -static std :: queue requests; /* Requests */ - -static unsigned initNumberOfRes = 0; - -extern void wakeUpCommunicator(); - -void initScheduler () -{ - - resources = std :: queue (); - requests = std :: queue (); - initNumberOfRes = 0; - - for (unsigned i = 0; i < the_schema.size (); i ++) - { - - const Node & node = the_schema [i]; - - if (node.rk_sched == my_node -> rk) - for (unsigned j = 0; j < node.num_workers; j ++) - resources.push (std :: pair (i, j + 1)); - } - initNumberOfRes = resources.size (); -} - -bool allResourcesFree () -{ - return resources.size () == initNumberOfRes; -} - -unsigned numResourcesFree () -{ - return resources.size (); -} - -static void update () -{ - - unsigned num_alloc = std :: min (resources.size (), requests.size ()); - - for (unsigned i = 0; i < num_alloc; i ++) - { - - SCHED_REQUEST req = requests.front (); - requests.pop (); - - SCHED_RESOURCE res = resources.front (); - resources.pop (); - - printDebugMessage ("allocating a resource."); - initMessage (); - pack (req.second); - pack (res); - sendMessage (req.first, SCHED_RESULT_TAG); - } -} - -void unpackResourceRequest () -{ - - printDebugMessage ("queuing a resource request."); - SCHED_REQUEST req; - unpack (req); - requests.push (req); - update (); -} - -void unpackTaskDone () -{ - - printDebugMessage ("I'm notified a worker is now idle."); - SCHED_RESOURCE res; - unpack (res); - resources.push (res); - if (resources.size () == initNumberOfRes) - printDebugMessage ("all the resources are now free."); - update (); - wakeUpCommunicator(); -} diff --git a/trunk/paradiseo-peo/src/rmc/mpi/scheduler.h b/trunk/paradiseo-peo/src/rmc/mpi/scheduler.h deleted file mode 100644 index 00872c952..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/scheduler.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __scheduler_h -#define __scheduler_h - -#include - -#include "schema.h" -#include "worker.h" - -typedef std :: pair SCHED_RESOURCE; - -typedef std :: pair SCHED_REQUEST; - -/* Initializing the list of available workers */ -extern void initScheduler (); - -/* Processing a resource request from a service */ -extern void unpackResourceRequest (); - -/* Being known a worker is now idle :-) */ -extern void unpackTaskDone (); - -extern bool allResourcesFree (); - -extern unsigned numResourcesFree (); - -#endif diff --git a/trunk/paradiseo-peo/src/rmc/mpi/schema.cpp b/trunk/paradiseo-peo/src/rmc/mpi/schema.cpp deleted file mode 100644 index 95c017416..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/schema.cpp +++ /dev/null @@ -1,208 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include -#include - -#include "schema.h" -#include "xml_parser.h" -#include "comm.h" -#include "node.h" -#include "../../core/peo_debug.h" - -#include - -std :: vector the_schema; - -Node * my_node; - -static unsigned maxSpecifiedRunnerID = 0; - - -RANK_ID getRankOfRunner (RUNNER_ID __key) -{ - - for (unsigned i = 0; i < the_schema.size (); i ++) - for (unsigned j = 0; j < the_schema [i].id_run.size (); j ++) - if (the_schema [i].id_run [j] == __key) - return the_schema [i].rk; - assert (false); - return 0; -} - -static void loadNode (int __rk_sched) -{ - - Node node; - - node.rk_sched = __rk_sched; - - /* ATT: name*/ - node.rk = getRankFromName (getAttributeValue ("name")); - /* ATT: num_workers */ - node.num_workers = atoi (getAttributeValue ("num_workers").c_str ()); - - while (true) - { - - /* TAG: | */ - std :: string name = getNextNode (); - assert (name == "runner" || name == "node"); - if (name == "runner") - { - /* TAG: */ - node.id_run.push_back (atoi (getNextNode ().c_str ())); - if ( node.id_run.back() > maxSpecifiedRunnerID ) - maxSpecifiedRunnerID = node.id_run.back(); - /* TAG:
    */ - assert (getNextNode () == "runner"); - } - else - { - /* TAG: */ - node.execution_id_run = node.id_run; - the_schema.push_back (node); - break; - } - } -} - -static void loadGroup () -{ - - std :: string name; - - /* ATT: scheduler*/ - int rk_sched = getRankFromName (getAttributeValue ("scheduler")); - - while (true) - { - - /* TAG: | */ - name = getNextNode (); - assert (name == "node" || name == "group"); - if (name == "node") - /* TAG: */ - loadNode (rk_sched); - else - /* TAG: */ - break; - } -} - -bool isScheduleNode () -{ - - return my_node -> rk == my_node -> rk_sched; -} - -void loadSchema (const char * __filename) -{ - - openXMLDocument (__filename); - - std :: string name; - - /* TAG: */ - name = getNextNode (); - assert (name == "schema"); - - the_schema.clear(); - maxSpecifiedRunnerID = 0; - - while (true) - { - - /* TAG: | */ - name = getNextNode (); - assert (name == "group" || name == "schema"); - if (name == "group") - /* TAG: */ - loadGroup (); - else - /* TAG: */ - break; - } - - - std :: set uniqueRunnerIDs; - unsigned nbUniqueIDs = 0; - for (unsigned i = 0; i < the_schema.size (); i ++) - { - for (unsigned j = 0; j < the_schema [i].id_run.size(); j ++) - { - uniqueRunnerIDs.insert( the_schema [i].id_run[j] ); - /* In case a duplicate ID has been found */ - if ( uniqueRunnerIDs.size() == nbUniqueIDs ) - { - the_schema [i].execution_id_run[j] = ++maxSpecifiedRunnerID; - } - nbUniqueIDs = uniqueRunnerIDs.size(); - } - } - - /* Looking for my node */ - for (unsigned i = 0; i < the_schema.size (); i ++) - { - if (the_schema [i].rk == getNodeRank ()) - my_node = & (the_schema [i]); - } - - - /* About me */ - char mess [1000]; - - sprintf (mess, "my rank is %d", my_node -> rk); - printDebugMessage (mess); - - if (isScheduleNode ()) - printDebugMessage ("I'am a scheduler"); - - for (unsigned i = 0; i < my_node -> id_run.size (); i ++) - { - sprintf (mess, "I manage the runner %d", my_node -> id_run [i]); - printDebugMessage (mess); - } - - if (my_node -> num_workers) - { - - sprintf (mess, "I manage %d worker(s)", my_node -> num_workers); - printDebugMessage (mess); - } - - closeXMLDocument (); -} diff --git a/trunk/paradiseo-peo/src/rmc/mpi/schema.h b/trunk/paradiseo-peo/src/rmc/mpi/schema.h deleted file mode 100644 index 444a6eb78..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/schema.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __schema_h -#define __schema_h - -#include -#include -#include -#include - -#include "node.h" -#include "../../core/runner.h" - - -extern Node * my_node; - -extern bool isScheduleNode (); - -extern RANK_ID getRankOfRunner (RUNNER_ID __key); - -extern std :: vector the_schema; - -extern void loadSchema (const char * __filename); - -#endif diff --git a/trunk/paradiseo-peo/src/rmc/mpi/send.cpp b/trunk/paradiseo-peo/src/rmc/mpi/send.cpp deleted file mode 100644 index 76a14374e..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/send.cpp +++ /dev/null @@ -1,178 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include -#include -#include - -#include "tags.h" -#include "comm.h" -#include "worker.h" -#include "scheduler.h" -#include "mess.h" -#include "node.h" -#include "../../core/cooperative.h" -#include "../../core/peo_debug.h" - -#define TO_ALL -1 - - -typedef struct - { - - Communicable * comm; - int to; - int tag; - - } -SEND_REQUEST; - - -static std :: queue mess; - -static sem_t sem_send; - -static bool contextInitialized = false; - - -void initSending () -{ - - static bool initializedSemaphore = false; - - mess = std :: queue (); - - if (initializedSemaphore) - { - sem_destroy(& sem_send); - } - - sem_init (& sem_send, 0, 1); - initializedSemaphore = true; - - contextInitialized = false; -} - -void send (Communicable * __comm, int __to, int __tag) -{ - - SEND_REQUEST req; - req.comm = __comm; - req.to = __to; - req.tag = __tag; - - sem_wait (& sem_send); - mess.push (req); - sem_post (& sem_send); - wakeUpCommunicator (); -} - -void sendToAll (Communicable * __comm, int __tag) -{ - - send (__comm, TO_ALL, __tag); -} - -extern void initializeContext (); - -void sendMessages () -{ - - if (! contextInitialized) - { - contextInitialized = true; - initializeContext(); - } - - sem_wait (& sem_send); - - while (! mess.empty ()) - { - - SEND_REQUEST req = mess.front (); - - Communicable * comm = req.comm; - - initMessage (); - - switch (req.tag) - { - - case RUNNER_STOP_TAG: - dynamic_cast (comm) -> packTermination (); - dynamic_cast (comm) -> notifySendingTermination (); - break; - - case COOP_TAG: - dynamic_cast (comm) -> pack (); - dynamic_cast (comm) -> notifySending (); - break; - - case SYNCHRONIZE_REQ_TAG: - dynamic_cast (comm) -> packSynchronizeReq (); - dynamic_cast (comm) -> notifySendingSyncReq (); - break; - - case SCHED_REQUEST_TAG: - dynamic_cast (comm) -> packResourceRequest (); - dynamic_cast (comm) -> notifySendingResourceRequest (); - break; - - case TASK_RESULT_TAG: - dynamic_cast (comm) -> packResult (); - dynamic_cast (comm) -> notifySendingResult (); - break; - - case TASK_DONE_TAG: - dynamic_cast (comm) -> packTaskDone (); - dynamic_cast (comm) -> notifySendingTaskDone (); - break; - - default : - break; - - }; - - if (req.to == TO_ALL) - sendMessageToAll (req.tag); - else - sendMessage (req.to, req.tag); - - mess.pop (); - } - - sem_post (& sem_send); -} diff --git a/trunk/paradiseo-peo/src/rmc/mpi/send.h b/trunk/paradiseo-peo/src/rmc/mpi/send.h deleted file mode 100644 index b539d54dc..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/send.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __send_h -#define __send_h - -#include "../../core/communicable.h" - -extern void initSending (); - -extern void send (Communicable * __comm, int __to, int __tag); - -extern void sendToAll (Communicable * __comm, int __tag); - -extern void sendMessages (); - -#endif diff --git a/trunk/paradiseo-peo/src/rmc/mpi/service.cpp b/trunk/paradiseo-peo/src/rmc/mpi/service.cpp deleted file mode 100644 index 3793dae75..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/service.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include "../../core/service.h" -#include "../../core/messaging.h" -#include "node.h" -#include "tags.h" -#include "send.h" -#include "scheduler.h" - -void Service :: requestResourceRequest (unsigned __how_many) -{ - - num_sent_rr = __how_many; - for (unsigned i = 0; i < __how_many; i ++) - send (this, my_node -> rk_sched, SCHED_REQUEST_TAG); -} - -void Service :: packResourceRequest () -{ - - SCHED_REQUEST req; - req.first = getNodeRank (); - req.second = getKey (); - - :: pack (req); -} diff --git a/trunk/paradiseo-peo/src/rmc/mpi/synchron.cpp b/trunk/paradiseo-peo/src/rmc/mpi/synchron.cpp deleted file mode 100644 index 936d55eb8..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/synchron.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include -#include -#include "synchron.h" -#include "../../core/messaging.h" -#include "node.h" -#include "tags.h" -#include "mess.h" - - - -static SYNC syncRunners; /* Runners to be synchronized */ - -extern void wakeUpCommunicator(); - -extern RANK_ID getRankOfRunner (RUNNER_ID __key); - -/* Initializing the list of runners to be synchronized */ -void initSynchron () -{ - - syncRunners = SYNC(); -} - -/* packing a synchronization request from a service */ -void packSynchronRequest ( const std :: vector & coops ) -{ - - /* Number of coops to synchronize */ - pack( (unsigned)( coops.size() ) ); - - /* Coops to synchronize */ - for (unsigned i = 0; i < coops.size(); i ++) - { - pack( coops[ i ]->getOwner()->getDefinitionID() ); - pack( coops[ i ]->getKey() ); - } -} - -/* Processing a synchronization request from a service */ -void unpackSynchronRequest () -{ - - unsigned req_num_entries; - unpack (req_num_entries); - - /* Creating a sync vector + adding the created entry */ - std::pair< SYNC_RUNNERS, unsigned > req_sync; - - /* Adding entries for each of the runners to be synchronized */ - SyncEntry req_entry; - for (unsigned i = 0; i < req_num_entries; i ++) - { - - unpack (req_entry.runner); - unpack (req_entry.coop); - - req_sync.first.push_back (req_entry); - } - - /* Looking for the sync vector */ - SYNC::iterator sync_it = syncRunners.find (req_sync); - - /* The vector does not exist - insert a new sync */ - if (sync_it == syncRunners.end ()) - { - req_sync.second = 1; - syncRunners.insert (req_sync); - } - else - { - - /* The vector exists - updating the entry */ - std::pair< SYNC_RUNNERS, unsigned >& sync_req_entry = const_cast< std::pair< SYNC_RUNNERS, unsigned >& > (*sync_it); - sync_req_entry.second ++; - - /* All the runners to be synchronized sent the SYNC_REQUEST signal */ - if (sync_req_entry.second == sync_req_entry.first.size()) - { - - /* Remove the entry */ - syncRunners.erase (sync_it); - - /* Send SYNCHRONIZED signals to all the coop objects */ - for (unsigned i = 0; i < req_sync.first.size(); i ++) - { - - initMessage (); - - pack (req_sync.first [i].runner); - pack (req_sync.first [i].coop); - - RANK_ID dest_rank = getRankOfRunner (req_sync.first [i].runner); - sendMessage (dest_rank, SYNCHRONIZED_TAG); - } - } - } -} diff --git a/trunk/paradiseo-peo/src/rmc/mpi/synchron.h b/trunk/paradiseo-peo/src/rmc/mpi/synchron.h deleted file mode 100644 index 8b1ad0f43..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/synchron.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __synchron_h -#define __synchron_h - -#include -#include -#include - -#include "../../core/runner.h" -#include "../../core/cooperative.h" - -struct SyncEntry - { - - RUNNER_ID runner; - COOP_ID coop; - }; - -struct SyncCompare - { - - bool operator()( const std::pair< std::vector< SyncEntry >, unsigned >& A, const std::pair< std::vector< SyncEntry >, unsigned >& B ) - { - - const std::vector< SyncEntry >& syncA = A.first; - const std::vector< SyncEntry >& syncB = B.first; - - if ( syncA.size() == syncB.size() ) - { - std::vector< SyncEntry >::const_iterator itA = syncA.begin(); - std::vector< SyncEntry >::const_iterator itB = syncB.begin(); - - while ( itA != syncA.end() && (*itA).runner == (*itB).runner ) - { - itA++; - itB++; - } - - return ( (itA == syncA.end()) ) ? false : ( (*itA).runner < (*itB).runner ); - } - - return syncA.size() < syncB.size(); - } - }; - -typedef std::vector< SyncEntry > SYNC_RUNNERS; -typedef std::set< std::pair< SYNC_RUNNERS, unsigned >, SyncCompare > SYNC; - -/* Initializing the list of runners to be synchronized */ -extern void initSynchron (); - -/* packing a synchronization request from a service */ -extern void packSynchronRequest ( const std :: vector & coops ); - -/* Processing a synchronization request from a service */ -extern void unpackSynchronRequest (); - -#endif diff --git a/trunk/paradiseo-peo/src/rmc/mpi/tags.h b/trunk/paradiseo-peo/src/rmc/mpi/tags.h deleted file mode 100644 index 251572178..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/tags.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __tags_h -#define __tags_h - -#define RUNNER_STOP_TAG 13 - -#define COOP_TAG 14 - -#define SCHED_REQUEST_TAG 16 -#define SCHED_RESULT_TAG 17 - -#define TASK_DATA_TAG 18 -#define TASK_RESULT_TAG 19 -#define TASK_DONE_TAG 20 - -#define SYNCHRONIZE_REQ_TAG 1000 -#define SYNCHRONIZED_TAG 1001 - -#endif diff --git a/trunk/paradiseo-peo/src/rmc/mpi/worker.cpp b/trunk/paradiseo-peo/src/rmc/mpi/worker.cpp deleted file mode 100644 index f34c48384..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/worker.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include - -#include "tags.h" -#include "send.h" -#include "node.h" -#include "schema.h" -#include "worker.h" -#include "mess.h" -#include "../../core/peo_debug.h" - -static std :: vector key_to_worker (1); /* Vector of registered workers */ - -extern void wakeUpCommunicator (); - -Worker * getWorker (WORKER_ID __key) -{ - - return key_to_worker [__key]; -} - -Worker :: Worker () -{ - - recvAndCompleted = false; - taskAssigned = 0; - id = key_to_worker.size (); - key_to_worker.push_back (this); - - sem_init( &sem_task_done, 0, 0 ); -} - -void Worker :: packResult () -{ - - pack (serv_id); - serv -> packResult (); -} - -void Worker :: unpackData () -{ - - taskAssigned ++; - printDebugMessage ("unpacking the ID. of the service."); - unpack (serv_id); - serv = getService (serv_id); - printDebugMessage ("found the service."); - serv -> unpackData (); - printDebugMessage ("unpacking the data."); - setActive (); -} - -void Worker :: packTaskDone () -{ - - pack (getNodeRank ()); - pack (id); -} - -void Worker :: notifySendingResult () -{ - - /* Notifying the scheduler of the termination */ - recvAndCompleted = true; - wakeUp (); -} - -void Worker :: notifySendingTaskDone () -{ - - sem_post(&sem_task_done); - setPassive (); -} - -void Worker :: setSource (int __rank) -{ - - src = __rank; -} - -void Worker :: start () -{ - - while (true) - { - - sleep (); - - if (! atLeastOneActiveRunner () && ! taskAssigned) - break; - - if (recvAndCompleted) - { - send (this, my_node -> rk_sched, TASK_DONE_TAG); - recvAndCompleted = false; - sem_wait(&sem_task_done); - taskAssigned --; - } - else - { - - serv -> execute (); - send (this, src, TASK_RESULT_TAG); - } - } - - printDebugMessage ("Worker finished execution."); - setPassive (); - - wakeUpCommunicator(); -} - -void initWorkersEnv () -{ - - key_to_worker.resize (1); -} diff --git a/trunk/paradiseo-peo/src/rmc/mpi/worker.h b/trunk/paradiseo-peo/src/rmc/mpi/worker.h deleted file mode 100644 index cc8f5a1b2..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/worker.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __worker_h -#define __worker_h - -#include "../../core/communicable.h" -#include "../../core/reac_thread.h" -#include "../../core/service.h" - - -typedef unsigned WORKER_ID; - -class Worker : public Communicable, public ReactiveThread - { - - public : - - Worker (); - - void start (); - - void packResult (); - - void unpackData (); - - void packTaskDone (); - - void notifySendingResult (); - - void notifySendingTaskDone (); - - void setSource (int __rank); - - private : - - WORKER_ID id; - SERVICE_ID serv_id; - Service * serv; - int src; - - bool recvAndCompleted; - unsigned taskAssigned; - - sem_t sem_task_done; - sem_t sem_task_asgn; - }; - -extern void initWorkersEnv (); - -extern Worker * getWorker (WORKER_ID __key); - -#endif diff --git a/trunk/paradiseo-peo/src/rmc/mpi/xml_parser.cpp b/trunk/paradiseo-peo/src/rmc/mpi/xml_parser.cpp deleted file mode 100644 index ae0caaab9..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/xml_parser.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include - -#include "xml_parser.h" - -static xmlTextReaderPtr reader; - -void openXMLDocument (const char * __filename) -{ - - reader = xmlNewTextReaderFilename (__filename); - - if (! reader) - { - - fprintf (stderr, "unable to open '%s'.\n", __filename); - exit (1); - } -} - -void closeXMLDocument () -{ - - xmlFreeTextReader (reader); -} - -std :: string getAttributeValue (const std :: string & __attr) -{ - - xmlChar * value = xmlTextReaderGetAttribute (reader, (const xmlChar *) __attr.c_str ()); - - std :: string str ((const char *) value); - - xmlFree (value); - - return str; -} - -static bool isSep (const xmlChar * __text) -{ - - for (unsigned i = 0; i < strlen ((char *) __text); i ++) - if (__text [i] != ' ' && __text [i] != '\t' && __text [i] != '\n') - return false; - return true; -} - -std :: string getNextNode () -{ - - xmlChar * name, * value; - - do - { - xmlTextReaderRead (reader); - name = xmlTextReaderName (reader); - value = xmlTextReaderValue (reader); - } - while (! strcmp ((char *) name, "#text") && isSep (value)); - - std :: string str; - - if (strcmp ((char *) name, "#text")) - str.assign ((char *) name); - else - str.assign ((char *) value); - - if (name) - xmlFree (name); - if (value) - xmlFree (value); - - return str; -} diff --git a/trunk/paradiseo-peo/src/rmc/mpi/xml_parser.h b/trunk/paradiseo-peo/src/rmc/mpi/xml_parser.h deleted file mode 100644 index ccfb1ad84..000000000 --- a/trunk/paradiseo-peo/src/rmc/mpi/xml_parser.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* data to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#ifndef __xml_parser_h -#define __xml_parser_h - -#include -#include - -extern void openXMLDocument (const char * __filename); - -extern void closeXMLDocument (); - -extern std :: string getAttributeValue (const std :: string & __attr); - -extern std :: string getNextNode (); - -#endif diff --git a/trunk/paradiseo-peo/test/CMakeLists.txt b/trunk/paradiseo-peo/test/CMakeLists.txt deleted file mode 100644 index 02670c43e..000000000 --- a/trunk/paradiseo-peo/test/CMakeLists.txt +++ /dev/null @@ -1,129 +0,0 @@ -############################################################################### -## -## CMakeLists file for ParadisEO-PEO/test -## -############################################################################### - - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${MO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${OLDMO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${MOEO_SRC_DIR}/src) -INCLUDE_DIRECTORIES(${ParadisEO-PEO_SOURCE_DIR}/src) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - -INCLUDE(CheckLibraryExists) - -SET (CMAKE_CXX_COMPILER mpicxx) - -ADD_CUSTOM_TARGET(install ALL DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/test/param ${ParadisEO-PEO_SOURCE_DIR}/test/schema.xml ${ParadisEO-PEO_SOURCE_DIR}/tutorial/benchs) -ADD_CUSTOM_COMMAND( - TARGET install - PRE_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/test/param - ${ParadisEO-PEO_BINARY_DIR}/test) -ADD_CUSTOM_COMMAND( - TARGET install - PRE_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/test/schema.xml - ${ParadisEO-PEO_BINARY_DIR}/test) - -ADD_CUSTOM_COMMAND( - TARGET install - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_directory - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/benchs - ${ParadisEO-PEO_BINARY_DIR}/tutorial/benchs) -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-PEO_BINARY_DIR}/lib ) - -###################################################################################### - - - -###################################################################################### -### 3) Define your targets and link the librairies -###################################################################################### - -SET (TEST_RUN t-Mpdboot) - - -SET (TEST_LIST t-ParallelEval - t-ParallelTransform - t-MultiStart - t-PSOSelect - t-EAAsyncIsland - t-EASyncIsland - t-PSOGlobalBest - t-PSOWorstPosition) - - -SET (TEST_STOP t-Mpdallexit) - -FOREACH (test ${TEST_RUN} ${TEST_LIST} ${TEST_STOP}) - SET ("T_${test}_SOURCES" "${test}.cpp") -ENDFOREACH (test) - - -IF(ENABLE_MINIMAL_CMAKE_TESTING) - - SET (MIN_TEST_LIST t-MultiStart) - - FOREACH (testrun ${TEST_RUN}) - ADD_EXECUTABLE(${testrun} ${T_${testrun}_SOURCES}) - ADD_TEST(${testrun} ${testrun}) - ENDFOREACH (testrun) - - FOREACH (mintest ${MIN_TEST_LIST}) - SET ("T_${mintest}_SOURCES" "${mintest}.cpp") - ADD_EXECUTABLE(${mintest} ${T_${mintest}_SOURCES}) - ADD_TEST(${mintest} "mpiexec" "-n" "4" "${CMAKE_CURRENT_BINARY_DIR}/${mintest}" "@param") - TARGET_LINK_LIBRARIES(${mintest} peo ${XML2_LIBS} rmc_mpi ga es eoutils eo peo) - ENDFOREACH (mintest) - - FOREACH (teststop ${TEST_STOP}) - ADD_EXECUTABLE(${teststop} ${T_${teststop}_SOURCES}) - ADD_TEST(${teststop} ${teststop}) - ENDFOREACH (teststop) - -ELSEIF(ENABLE_CMAKE_TESTING) - - FOREACH (test ${TEST_RUN} ${TEST_LIST} ${TEST_STOP}) - ADD_EXECUTABLE(${test} ${T_${test}_SOURCES}) - ENDFOREACH (test) - - FOREACH (testrun ${TEST_RUN}) - ADD_TEST(${testrun} ${testrun}) - ENDFOREACH (testrun) - - FOREACH (test ${TEST_LIST}) - ADD_TEST(${test} "mpiexec" "-n" "4" "${CMAKE_CURRENT_BINARY_DIR}/${test}" "@param") - ENDFOREACH (test) - - FOREACH (teststop ${TEST_STOP}) - ADD_TEST(${teststop} ${teststop}) - ENDFOREACH (teststop) - - FOREACH (test ${TEST_LIST}) - TARGET_LINK_LIBRARIES(${test} peo ${XML2_LIBS} rmc_mpi ga es eoutils eo peo) - ENDFOREACH (test) - -ENDIF(ENABLE_MINIMAL_CMAKE_TESTING) - -###################################################################################### diff --git a/trunk/paradiseo-peo/test/param b/trunk/paradiseo-peo/test/param deleted file mode 100644 index eb843c65f..000000000 --- a/trunk/paradiseo-peo/test/param +++ /dev/null @@ -1,12 +0,0 @@ -## miscallenous parameters - ---debug=false - -## deployment schema - ---schema=schema.xml - -## parameters - ---inst=../examples/tsp/benchs/eil101.tsp - diff --git a/trunk/paradiseo-peo/test/schema.xml b/trunk/paradiseo-peo/test/schema.xml deleted file mode 100644 index 9b8bf316c..000000000 --- a/trunk/paradiseo-peo/test/schema.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - 1 - 2 - - - - - - - - - diff --git a/trunk/paradiseo-peo/test/t-EAAsyncIsland.cpp b/trunk/paradiseo-peo/test/t-EAAsyncIsland.cpp deleted file mode 100644 index a48e9092a..000000000 --- a/trunk/paradiseo-peo/test/t-EAAsyncIsland.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* peoData to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -//Test : Asynchronous island with EA -#include -#include -typedef eoReal Indi; - -double f (const Indi & _indi) -{ - double sum=_indi[0]+_indi[1]; - return (-sum); -} -int main (int __argc, char *__argv[]) -{ - peo :: init( __argc, __argv ); - if (getNodeRank()==1) - std::cout<<"\n\nTest : Asynchronous island with EA\n\n"; - rng.reseed (10); - RingTopology topology; - eoGenContinue < Indi > genContPara (10); - eoCombinedContinue continuatorPara (genContPara); - eoCheckPoint checkpoint(continuatorPara); - peoEvalFunc mainEval( f ); - peoPopEval eval(mainEval); - eoUniformGenerator < double >uGen (-2., 2.); - eoInitFixedLength < Indi > random (2, uGen); - eoRankingSelect selectionStrategy; - eoSelectNumber select(selectionStrategy,10); - eoSegmentCrossover crossover; - eoUniformMutation mutation(0.01); - peoTransform transform(crossover,0.8,mutation,0.3); - /*p*/ - eoPop < Indi > pop; - pop.append (10, random); - eoPlusReplacement replace; - eoRandomSelect mig_select_one; - eoSelector > mig_select (mig_select_one,2,pop); - eoReplace > mig_replace (replace,pop); - eoPeriodicContinue< Indi > mig_cont( 2 ); - eoContinuator cont(mig_cont, pop); - peoAsyncIslandMig, eoPop > mig(cont,mig_select,mig_replace,topology); - checkpoint.add(mig); - eoEasyEA< Indi > eaAlg( checkpoint, eval, select, transform, replace ); - peoWrapper parallelEA( eaAlg, pop); - eval.setOwner(parallelEA); - transform.setOwner(parallelEA); - mig.setOwner(parallelEA); - eoGenContinue < Indi > genContPara2 (10); - eoCombinedContinue continuatorPara2 (genContPara2); - eoCheckPoint checkpoint2(continuatorPara2); - peoEvalFunc mainEval2( f ); - peoPopEval eval2(mainEval2); - eoUniformGenerator < double >uGen2 (-2., 2.); - eoInitFixedLength < Indi > random2 (2, uGen2); - eoRankingSelect selectionStrategy2; - eoSelectNumber select2(selectionStrategy2,10); - eoSegmentCrossover crossover2; - eoUniformMutation mutation2(0.01); - peoTransform transform2(crossover2,0.8,mutation2,0.3); - /*p*/ - eoPop < Indi > pop2; - pop2.append (10, random2); - eoPlusReplacement replace2; - eoRandomSelect mig_select_one2; - eoSelector > mig_select2 (mig_select_one2,2,pop2); - eoReplace > mig_replace2 (replace2,pop2); - eoPeriodicContinue< Indi > mig_cont2( 2 ); - eoContinuator cont2(mig_cont2, pop2); - peoAsyncIslandMig, eoPop > mig2(cont2,mig_select2,mig_replace2,topology); - checkpoint2.add(mig2); - eoEasyEA< Indi > eaAlg2( checkpoint2, eval2, select2, transform2, replace2 ); - peoWrapper parallelEA2( eaAlg2, pop2); - eval2.setOwner(parallelEA2); - transform2.setOwner(parallelEA2); - mig2.setOwner(parallelEA2); - peo :: run(); - peo :: finalize(); - if (getNodeRank()==1) - { - pop.sort(); - pop2.sort(); - std::cout << "Final population 1 :\n" << pop << std::endl; - std::cout << "Final population 2 :\n" << pop2 << std::endl; - } -} diff --git a/trunk/paradiseo-peo/test/t-EASyncIsland.cpp b/trunk/paradiseo-peo/test/t-EASyncIsland.cpp deleted file mode 100644 index 696749a27..000000000 --- a/trunk/paradiseo-peo/test/t-EASyncIsland.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* peoData to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - - -//Test : Synchronous island with EA -#include -#include -typedef eoReal Indi; - -double f (const Indi & _indi) -{ - double sum=_indi[0]+_indi[1]; - return (-sum); -} -int main (int __argc, char *__argv[]) -{ - peo :: init( __argc, __argv ); - if (getNodeRank()==1) - std::cout<<"\n\nTest : Synchronous island with EA\n\n"; - rng.reseed (10); - RingTopology topology; - eoGenContinue < Indi > genContPara (10); - eoCombinedContinue continuatorPara (genContPara); - eoCheckPoint checkpoint(continuatorPara); - peoEvalFunc mainEval( f ); - peoPopEval eval(mainEval); - eoUniformGenerator < double >uGen (-2., 2.); - eoInitFixedLength < Indi > random (2, uGen); - eoRankingSelect selectionStrategy; - eoSelectNumber select(selectionStrategy,10); - eoSegmentCrossover crossover; - eoUniformMutation mutation(0.01); - peoTransform transform(crossover,0.8,mutation,0.3); - eoPop < Indi > pop; - pop.append (10, random); - eoPlusReplacement replace; - eoRandomSelect mig_select_one; - eoSelector > mig_select (mig_select_one,2,pop); - eoReplace > mig_replace (replace,pop); - peoSyncIslandMig, eoPop > mig(2,mig_select,mig_replace,topology); - checkpoint.add(mig); - eoEasyEA< Indi > eaAlg( checkpoint, eval, select, transform, replace ); - peoWrapper parallelEA( eaAlg, pop); - eval.setOwner(parallelEA); - transform.setOwner(parallelEA); - mig.setOwner(parallelEA); - eoGenContinue < Indi > genContPara2 (10); - eoCombinedContinue continuatorPara2 (genContPara2); - eoCheckPoint checkpoint2(continuatorPara2); - peoEvalFunc mainEval2( f ); - peoPopEval eval2(mainEval2); - eoUniformGenerator < double >uGen2 (-2., 2.); - eoInitFixedLength < Indi > random2 (2, uGen2); - eoRankingSelect selectionStrategy2; - eoSelectNumber select2(selectionStrategy2,10); - eoSegmentCrossover crossover2; - eoUniformMutation mutation2(0.01); - peoTransform transform2(crossover2,0.8,mutation2,0.3); - eoPop < Indi > pop2; - pop2.append (10, random2); - eoPlusReplacement replace2; - eoRandomSelect mig_select_one2; - eoSelector > mig_select2 (mig_select_one2,2,pop2); - eoReplace > mig_replace2 (replace2,pop2); - peoSyncIslandMig, eoPop > mig2(2,mig_select2,mig_replace2,topology); - checkpoint2.add(mig2); - eoEasyEA< Indi > eaAlg2( checkpoint2, eval2, select2, transform2, replace2 ); - peoWrapper parallelEA2( eaAlg2, pop2); - eval2.setOwner(parallelEA2); - transform2.setOwner(parallelEA2); - mig2.setOwner(parallelEA2); - peo :: run(); - peo :: finalize(); - if (getNodeRank()==1) - { - pop.sort(); - pop2.sort(); - std::cout << "Final population 1 :\n" << pop << std::endl; - std::cout << "Final population 2 :\n" << pop2 << std::endl; - } -} diff --git a/trunk/paradiseo-peo/test/t-Mpdallexit.cpp b/trunk/paradiseo-peo/test/t-Mpdallexit.cpp deleted file mode 100644 index 3772c8e15..000000000 --- a/trunk/paradiseo-peo/test/t-Mpdallexit.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* peoData to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include -#include - -int main (int __argc, char *__argv[]) -{ - int success = system("mpdallexit"); -} diff --git a/trunk/paradiseo-peo/test/t-Mpdboot.cpp b/trunk/paradiseo-peo/test/t-Mpdboot.cpp deleted file mode 100644 index 01611baf5..000000000 --- a/trunk/paradiseo-peo/test/t-Mpdboot.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* peoData to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - -#include -#include - -int main (int __argc, char *__argv[]) -{ - int success = system("mpdboot"); -} diff --git a/trunk/paradiseo-peo/test/t-MultiStart.cpp b/trunk/paradiseo-peo/test/t-MultiStart.cpp deleted file mode 100644 index 8ec9e4882..000000000 --- a/trunk/paradiseo-peo/test/t-MultiStart.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* peoData to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - - -// Test : multistart - -#include - -struct Algorithm - { - void operator()(double & _d) - { - _d = _d * _d; - } - }; - -int main (int __argc, char * * __argv) -{ - - peo :: init (__argc, __argv); - if (getNodeRank()==1) - std::cout<<"\n\nTest : multistart\n\n"; - std::vector < double > v; - if (getNodeRank()==1) - std::cout<<"\n\nBefore :"; - for (unsigned i = 0; i< 10; i++) - { - v.push_back(i); - if (getNodeRank()==1) - std::cout<<"\n"< initParallel (algo); - peoWrapper parallelAlgo (initParallel, v); - initParallel.setOwner(parallelAlgo); - peo :: run( ); - peo :: finalize( ); - if (getNodeRank()==1) - { - std::cout<<"\n\nAfter :\n"; - for (unsigned i = 0; i< 10; i++) - std::cout< -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* peoData to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - - -// Test : PSO Global Best -#include -typedef eoRealParticle < double >Indi; -double f (const Indi & _indi) -{ - double sum=_indi[0]+_indi[1]; - return (sum); -} -int main (int __argc, char *__argv[]) -{ - peo :: init( __argc, __argv ); - if (getNodeRank()==1) - std::cout<<"\n\nTest : PSO Global Best\n\n"; - rng.reseed (10); - RingTopology topologyMig; - eoGenContinue < Indi > genContPara (10); - eoCombinedContinue continuatorPara (genContPara); - eoCheckPoint checkpoint(continuatorPara); - peoEvalFunc plainEval(f); - peoPopEval< Indi > eval(plainEval); - eoUniformGenerator < double >uGen (0, 1.); - eoInitFixedLength < Indi > random (2, uGen); - eoUniformGenerator < double >sGen (-1., 1.); - eoVelocityInitFixedLength < Indi > veloRandom (2, sGen); - eoFirstIsBestInit < Indi > localInit; - eoRealVectorBounds bndsFlight(2,0,1.); - eoStandardFlight < Indi > flight(bndsFlight); - eoPop < Indi > pop; - pop.append (10, random); - eoLinearTopology topology(2); - eoRealVectorBounds bnds(2,-1.,1.); - eoStandardVelocity < Indi > velocity (topology,1,0.5,2.,bnds); - eoInitializer init(eval,veloRandom,localInit,topology,pop); - eoPeriodicContinue< Indi > mig_cont( 2 ); - peoPSOSelect mig_selec(topology); - peoGlobalBestVelocity mig_replac (2.,velocity); - eoContinuator cont(mig_cont, pop); - eoSelector > mig_select (mig_selec,1,pop); - eoReplace > mig_replace (mig_replac,pop); - eoGenContinue < Indi > genContPara2 (10); - eoCombinedContinue continuatorPara2 (genContPara2); - eoCheckPoint checkpoint2(continuatorPara2); - peoEvalFunc plainEval2(f); - peoPopEval< Indi > eval2(plainEval2); - eoUniformGenerator < double >uGen2 (0, 1.); - eoInitFixedLength < Indi > random2 (2, uGen2); - eoUniformGenerator < double >sGen2 (-1., 1.); - eoVelocityInitFixedLength < Indi > veloRandom2 (2, sGen2); - eoFirstIsBestInit < Indi > localInit2; - eoRealVectorBounds bndsFlight2(2,0,1.); - eoStandardFlight < Indi > flight2(bndsFlight2); - eoPop < Indi > pop2; - pop2.append (10, random2); - eoLinearTopology topology2(2); - eoRealVectorBounds bnds2(2,-1.,1.); - eoStandardVelocity < Indi > velocity2 (topology2,1,0.5,2.,bnds2); - eoInitializer init2(eval2,veloRandom2,localInit2,topology2,pop2); - eoPeriodicContinue< Indi > mig_cont2( 2 ); - peoPSOSelect mig_selec2(topology2); - peoGlobalBestVelocity mig_replac2 (2.,velocity2); - eoContinuator cont2(mig_cont2,pop2); - eoSelector > mig_select2 (mig_selec2,1,pop2); - eoReplace > mig_replace2 (mig_replac2,pop2); - peoAsyncIslandMig< eoPop, eoPop > mig(cont,mig_select, mig_replace, topologyMig); - checkpoint.add( mig ); - peoAsyncIslandMig< eoPop, eoPop > mig2(cont2,mig_select2, mig_replace2, topologyMig); - checkpoint2.add( mig2 ); - eoSyncEasyPSO psa(init,checkpoint,eval, velocity, flight); - peoWrapper parallelPSO( psa, pop); - eval.setOwner(parallelPSO); - mig.setOwner(parallelPSO); - eoSyncEasyPSO psa2(init2,checkpoint2,eval2, velocity2, flight2); - peoWrapper parallelPSO2( psa2, pop2); - eval2.setOwner(parallelPSO2); - mig2.setOwner(parallelPSO2); - peo :: run(); - peo :: finalize(); - if (getNodeRank()==1) - { - pop.sort(); - pop2.sort(); - std::cout << "Final population :\n" << pop << std::endl; - std::cout << "Final population :\n" << pop2 << std::endl; - } -} diff --git a/trunk/paradiseo-peo/test/t-PSOSelect.cpp b/trunk/paradiseo-peo/test/t-PSOSelect.cpp deleted file mode 100644 index 6ff64f302..000000000 --- a/trunk/paradiseo-peo/test/t-PSOSelect.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* peoData to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - - -//Test : PSO select -#include -typedef eoRealParticle < double >Indi; -double f (const Indi & _indi) -{ - double sum=_indi[0]+_indi[1]; - return (-sum); -} - -int main (int __argc, char *__argv[]) -{ - std::cout<<"\n\nTest : PSO select\n\n"; - rng.reseed (10); - peoEvalFunc plainEval(f); - eoEvalFuncCounter < Indi > firstEval(plainEval); - eoPopLoopEval < Indi > eval(firstEval); - eoUniformGenerator < double >uGen (1, 2); - eoInitFixedLength < Indi > random (2, uGen); - eoUniformGenerator < double >sGen (-1, 1); - eoVelocityInitFixedLength < Indi > veloRandom (2, sGen); - eoFirstIsBestInit < Indi > localInit; - eoRealVectorBounds bndsFlight(2,1,2); - eoStandardFlight < Indi > flight(bndsFlight); - eoLinearTopology topology(6); - eoRealVectorBounds bnds(2,-1,1); - eoStandardVelocity < Indi > velocity (topology,1,0.5,2.,bnds); - eoPop < Indi > empty_pop,pop(20, random); - eoInitializer init(eval,veloRandom,localInit,topology,pop); - init(); - eval (empty_pop,pop); - peoPSOSelect mig_selec(topology); - pop.sort(); - std::cout<<"\nBest : "< -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* peoData to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - - -// Test : PSO Worst Position -#include -typedef eoRealParticle < double >Indi; -double f (const Indi & _indi) -{ - double sum=_indi[0]+_indi[1]; - return (sum); -} -int main (int __argc, char *__argv[]) -{ - peo :: init( __argc, __argv ); - if (getNodeRank()==1) - std::cout<<"\n\nTest : PSO Worst Position\n\n"; - rng.reseed (10); - RingTopology topologyMig; - eoGenContinue < Indi > genContPara (10); - eoCombinedContinue continuatorPara (genContPara); - eoCheckPoint checkpoint(continuatorPara); - peoEvalFunc plainEval(f); - peoPopEval< Indi > eval(plainEval); - eoUniformGenerator < double >uGen (0, 1.); - eoInitFixedLength < Indi > random (2, uGen); - eoUniformGenerator < double >sGen (-1., 1.); - eoVelocityInitFixedLength < Indi > veloRandom (2, sGen); - eoFirstIsBestInit < Indi > localInit; - eoRealVectorBounds bndsFlight(2,0,1.); - eoStandardFlight < Indi > flight(bndsFlight); - eoPop < Indi > pop; - pop.append (10, random); - eoLinearTopology topology(2); - eoRealVectorBounds bnds(2,-1.,1.); - eoStandardVelocity < Indi > velocity (topology,1,0.5,2.,bnds); - eoInitializer init(eval,veloRandom,localInit,topology,pop); - eoPeriodicContinue< Indi > mig_cont( 2 ); - peoPSOSelect mig_selec(topology); - peoWorstPositionReplacement mig_replac; - eoContinuator cont(mig_cont, pop); - eoSelector > mig_select (mig_selec,1,pop); - eoReplace > mig_replace (mig_replac,pop); - eoGenContinue < Indi > genContPara2 (10); - eoCombinedContinue continuatorPara2 (genContPara2); - eoCheckPoint checkpoint2(continuatorPara2); - peoEvalFunc plainEval2(f); - peoPopEval< Indi > eval2(plainEval2); - eoUniformGenerator < double >uGen2 (0, 1.); - eoInitFixedLength < Indi > random2 (2, uGen2); - eoUniformGenerator < double >sGen2 (-1., 1.); - eoVelocityInitFixedLength < Indi > veloRandom2 (2, sGen2); - eoFirstIsBestInit < Indi > localInit2; - eoRealVectorBounds bndsFlight2(2,0,1.); - eoStandardFlight < Indi > flight2(bndsFlight2); - eoPop < Indi > pop2; - pop2.append (10, random2); - eoLinearTopology topology2(2); - eoRealVectorBounds bnds2(2,-1.,1.); - eoStandardVelocity < Indi > velocity2 (topology2,1,0.5,2.,bnds2); - eoInitializer init2(eval2,veloRandom2,localInit2,topology2,pop2); - eoPeriodicContinue< Indi > mig_cont2( 2 ); - peoPSOSelect mig_selec2(topology2); - peoWorstPositionReplacement mig_replac2; - eoContinuator cont2(mig_cont2,pop2); - eoSelector > mig_select2 (mig_selec2,1,pop2); - eoReplace > mig_replace2 (mig_replac2,pop2); - peoAsyncIslandMig< eoPop, eoPop > mig(cont,mig_select, mig_replace, topologyMig); - checkpoint.add( mig ); - peoAsyncIslandMig< eoPop, eoPop > mig2(cont2,mig_select2, mig_replace2, topologyMig); - checkpoint2.add( mig2 ); - eoSyncEasyPSO psa(init,checkpoint,eval, velocity, flight); - peoWrapper parallelPSO( psa, pop); - eval.setOwner(parallelPSO); - mig.setOwner(parallelPSO); - eoSyncEasyPSO psa2(init2,checkpoint2,eval2, velocity2, flight2); - peoWrapper parallelPSO2( psa2, pop2); - eval2.setOwner(parallelPSO2); - mig2.setOwner(parallelPSO2); - peo :: run(); - peo :: finalize(); - if (getNodeRank()==1) - { - pop.sort(); - pop2.sort(); - std::cout << "Final population :\n" << pop << std::endl; - std::cout << "Final population :\n" << pop2 << std::endl; - } -} diff --git a/trunk/paradiseo-peo/test/t-ParallelEval.cpp b/trunk/paradiseo-peo/test/t-ParallelEval.cpp deleted file mode 100644 index 5da070ad3..000000000 --- a/trunk/paradiseo-peo/test/t-ParallelEval.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* -* -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* peoData to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - - -// Test : parallel evaluation -#include -#include -typedef eoReal Indi; -double f (const Indi & _indi) -{ - double sum=_indi[0]+_indi[1]; - return (-sum); -} -struct Algorithm - { - Algorithm( peoPopEval < Indi > & _eval): eval( _eval ){} - void operator()(eoPop < Indi > & _pop) - { - eoPop < Indi > empty_pop; - eval(empty_pop, _pop); - } - peoPopEval < Indi > & eval; - }; - -int main (int __argc, char *__argv[]) -{ - peo :: init( __argc, __argv ); - if (getNodeRank()==1) - std::cout<<"\n\nTest : parallel evaluation\n\n"; - rng.reseed (10); - peoEvalFunc plainEval(f); - peoPopEval< Indi > eval(plainEval); - eoUniformGenerator < double >uGen (0, 1); - eoInitFixedLength < Indi > random (2, uGen); - eoPop < Indi > pop(20, random); - Algorithm algo ( eval ); - peoWrapper parallelAlgo( algo, pop); - eval.setOwner(parallelAlgo); - peo :: run(); - peo :: finalize(); - if (getNodeRank()==1) - { - pop.sort(); - std::cout< -* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 -* (C) OPAC Team, LIFL, 2002-2008 -* -* Clive Canape -* -* This software is governed by the CeCILL license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL -* license as circulated by CEA, CNRS and INRIA at the following URL -* "http://www.cecill.info". -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited liability. -* -* In this respect, the user's attention is drawn to the risks associated -* with loading, using, modifying and/or developing or reproducing the -* software by the user in light of its specific status of free software, -* that may mean that it is complicated to manipulate, and that also -* therefore means that it is reserved for developers and experienced -* professionals having in-depth computer knowledge. Users are therefore -* encouraged to load and test the software's suitability as regards their -* requirements in conditions enabling the security of their systems and/or -* peoData to be ensured and, more generally, to use and operate it in the -* same conditions as regards security. -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL license and that you accept its terms. -* -* ParadisEO WebSite : http://paradiseo.gforge.inria.fr -* Contact: paradiseo-help@lists.gforge.inria.fr -* -*/ - - -// Test : parallel transform -#include -#include -typedef eoReal Indi; -double f (const Indi & _indi) -{ - double sum=_indi[0]+_indi[1]; - return (-sum); -} -struct Algorithm - { - Algorithm( eoEvalFunc < Indi > & _eval, eoSelect < Indi > & _select, peoTransform < Indi > & _transform): - loopEval(_eval), - eval(loopEval), - selectTransform( _select, _transform), - breed(selectTransform) {} - - void operator()(eoPop < Indi > & _pop) - { - eoPop < Indi > offspring, empty_pop; - eval(empty_pop, _pop); - eval(empty_pop, offspring); - std::cout<<"\n\nBefore :\n"< loopEval; - eoPopEvalFunc < Indi > & eval; - eoSelectTransform < Indi > selectTransform; - eoBreed < Indi > & breed; - }; - -int main (int __argc, char *__argv[]) -{ - peo :: init( __argc, __argv ); - if (getNodeRank()==1) - std::cout<<"\n\nTest : parallel transform\n\n"; - rng.reseed (10); - eoEvalFuncPtr < Indi > plainEval(f); - eoEvalFuncCounter < Indi > eval(plainEval); - eoUniformGenerator < double >uGen (0, 1); - eoInitFixedLength < Indi > random (2, uGen); - eoPop < Indi > empty_pop,pop(6, random); - eoRankingSelect < Indi > selectionStrategy; - eoSelectNumber < Indi > select(selectionStrategy,6); - eoSegmentCrossover < Indi > crossover; - eoUniformMutation < Indi > mutation(0.01); - peoTransform transform(crossover,0.8,mutation,0.3); - Algorithm algo ( eval, select, transform ); - peoWrapper parallelAlgo( algo, pop); - transform.setOwner(parallelAlgo); - peo :: run(); - peo :: finalize(); -} diff --git a/trunk/paradiseo-peo/tutorial/CMakeLists.txt b/trunk/paradiseo-peo/tutorial/CMakeLists.txt deleted file mode 100644 index 128d23eb6..000000000 --- a/trunk/paradiseo-peo/tutorial/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ - -###################################################################################### -### 1) Where must cmake go now ? -###################################################################################### - -ADD_SUBDIRECTORY(Lesson1) -ADD_SUBDIRECTORY(Lesson2) -ADD_SUBDIRECTORY(Lesson3) -ADD_SUBDIRECTORY(Lesson4) -ADD_SUBDIRECTORY(Lesson5) -ADD_SUBDIRECTORY(Lesson6) diff --git a/trunk/paradiseo-peo/tutorial/Lesson1/CMakeLists.txt b/trunk/paradiseo-peo/tutorial/Lesson1/CMakeLists.txt deleted file mode 100644 index 05c8f13c9..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson1/CMakeLists.txt +++ /dev/null @@ -1,78 +0,0 @@ - -###################################################################################### -### 0) Set the compiler and define targets to easily run the lessons -###################################################################################### - -SET (CMAKE_CXX_COMPILER mpicxx) - -#ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson1/param ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson1/schema.xml) - -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson1/param -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson1) -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson1/schema.xml -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson1) - -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson1/param - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson1 - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson1/schema.xml - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson1 -) - -###################################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src ${MOEO_SRC_DIR}/src ${OLDMO_SRC_DIR}/src ${MO_SRC_DIR}/src ${ParadisEO-PEO_SOURCE_DIR}/src) - -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-PEO_BINARY_DIR}/lib) - -###################################################################################### - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -ADD_EXECUTABLE(multistartMO main.cpp) -###################################################################################### - - -###################################################################################### -### 4) Optionnal: define properties -###################################################################################### - -SET(LESSON1_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(multistartMO PROPERTIES VERSION "${LESSON1_VERSION}") -###################################################################################### - - -###################################################################################### -### 5) Link the librairies -###################################################################################### - -TARGET_LINK_LIBRARIES(multistartMO ${XML2_LIBS} peo rmc_mpi eo eoutils peo) - -###################################################################################### diff --git a/trunk/paradiseo-peo/tutorial/Lesson1/Move.h b/trunk/paradiseo-peo/tutorial/Lesson1/Move.h deleted file mode 100755 index da6049a80..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson1/Move.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef MOVE_H -#define MOVE_H - -#include - - -class ProblemEval : public eoEvalFunc { -public: - - void operator() (Problem & _problem){ - //cout << "eoEvalFunc()"<< endl; - _problem.fitness(_problem.evaluate()); - - } - -}; - -class Move : public moMove , public std :: pair { -public : - void operator () (Problem & _problem) { - // transformer une solution en une autre connaissant le meilleur mouvement - //cout << "MOVE() " << endl; - int temp = _problem.solution[first]; - _problem.solution[first] = _problem.solution[second]; - _problem.solution[second] = temp; - - -} - -}; - - -class MoveInit : public moMoveInit { -public: - - void operator () (Move & _move, const Problem& _problem) { - //cout << "MoveInit " << endl; - - _move.first = 0; - _move.second = 1; - - - } -}; - - -class MoveNext : public moNextMove { -public: - bool operator() (Move & _move, const Problem & _problem) { - //cout << "MoveNext" << endl; - //cout << _move.first << " , " << _move.second << endl; - - if (_move.first < n-2){ - if (_move.second < n-1){ - - _move.second++; - } - else { - _move.first++; - _move.second = _move.first + 1; - - } - - - return true; - - } - - - return false; - - } -}; - -class MoveIncrEval : public moMoveIncrEval -{ -public: - - int compute_delta(int n, int** a, int** b, - int* p, int i, int j) - { - int d; int k; - d = (a[i][i]-a[j][j])*(b[p[j]][p[j]]-b[p[i]][p[i]]) + - (a[i][j]-a[j][i])*(b[p[j]][p[i]]-b[p[i]][p[j]]); - for (k = 0; k < n; k = k + 1) if (k!=i && k!=j) - d = d + (a[k][i]-a[k][j])*(b[p[k]][p[j]]-b[p[k]][p[i]]) + - (a[i][k]-a[j][k])*(b[p[j]][p[k]]-b[p[i]][p[k]]); - return(d); - } - - - eoMinimizingFitness operator() (const Move & _move, const Problem & _problem){ - - double cost; - cost=0; - - // for calculing delta difference - int* p = new int[n]; - for (int i = 0 ; i < n ; i++) - p[i] = _problem.solution[i]; - - - - cost = _problem.fitness() + compute_delta(n,a,b,p,_move.first, _move.second); - - - - delete[] p; - - return cost; - } - -}; - - - - -class MoveRand : public moRandMove { -public: - - void operator() (Move & _move){ - _move.first = rand()%n; - do{ - _move.second = rand()%n; - - } while (_move.first == _move.second); - } - -}; - - -//for ILS - - -/* -class Perturbation : public eoMonOp { -public: - - bool operator() (Problem & _problem){ - int r1,r2,temp; - int mu = 1 + rand()%n; - for (int k = 1 ; k <= mu; k++){ - - r1 = rand()%n; - - for(;;){ - r2 = rand()%n; - if (r1 != r2) - break; - } - - temp = _problem.solution[r1]; - _problem.solution[r1] = _problem.solution[r2]; - _problem.solution[r2] = temp; - - } - _problem.invalidate(); - - } - - -}; -*/ -#endif diff --git a/trunk/paradiseo-peo/tutorial/Lesson1/QAP.h b/trunk/paradiseo-peo/tutorial/Lesson1/QAP.h deleted file mode 100755 index 5730fa4f6..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson1/QAP.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - - -#ifndef QAP_H -#define QAP_H - -#include - -/* global variables */ -extern int n; // size -extern int** a; // matrix A -extern int** b; // matrix B - -class Problem : public EO { - -public: - - int* solution; - - Problem () { - solution = new int[n]; - create(); - } - - Problem (const Problem & _problem){ // copy constructor - solution = new int[n]; - for (int i = 0; i < n ; i++){ - solution[i] = _problem.solution[i]; - } - if (!_problem.invalid()) // if the solution has already been evaluated - fitness(_problem.fitness()); // copy the fitness - } - - ~Problem(){ // destructor - delete[] solution; - } - - void operator= (const Problem & _problem){ // copy assignment operator - for (int i = 0; i < n ; i++){ - solution[i] = _problem.solution[i]; - } - fitness(_problem.fitness()); // copy the fitness - } - - int& operator[] (unsigned i) - { - return solution[i]; - } - - - void create(){ // create and initialize a solution - int random, temp; - for (int i=0; i< n; i++) - solution[i]=i; - - // we want a random permutation so we shuffle - for (int i = 0; i < n; i++){ - random = rand()%(n-i) + i; - temp = solution[i]; - solution[i] = solution[random]; - solution[random] = temp; - } - } - - int evaluate() { // evaluate the solution - int cost=0; - for (int i=0; i - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _QAPGA_h -#define _QAPGA_h - -class ProblemInit : public eoInit -{ -public: - - void operator()(Problem & _problem) - { - _problem.create(); - } -}; - -class ProblemEvalFunc : public eoEvalFunc -{ -public: - - void operator()(Problem & _problem) - { - _problem.fitness(_problem.evaluate()); - - } -}; - -class ProblemXover : public eoQuadOp { -public: - - /* The two parameters in input are the parents. - The first parameter is also the output ie the child - */ - bool operator()(Problem & _problem1, Problem & _problem2) - { - int i; - int random, temp; - int unassigned_positions[n]; - int remaining_items[n]; - int j = 0; - - /* 1) find the items assigned in different positions for the 2 parents */ - for (i = 0 ; i < n ; i++){ - if (_problem1.solution[i] != _problem2.solution[i]){ - unassigned_positions[j] = i; - remaining_items[j] = _problem1.solution[i]; - j++; - } - } - - /* 2) shuffle the remaining items to ensure that remaining items - will be assigned at random positions */ - for (i = 0; i < j; i++){ - random = rand()%(j-i) + i; - temp = remaining_items[i]; - remaining_items[i] = remaining_items[random]; - remaining_items[random] = temp; - } - - /* 3) copy the shuffled remaining items at unassigned positions */ - for (i = 0; i < j ; i++) - _problem1.solution[unassigned_positions[i]] = remaining_items[i]; - - // crossover in our case is always possible - return true; - } -}; - -class ProblemSwapMutation: public eoMonOp { -public: - - bool operator()(Problem& _problem) { - int i,j; - int temp; - - // generate two different indices - i=rand()%n; - do - j = rand()%n; - while (i == j); - - // swap - temp = _problem.solution[i]; - _problem.solution[i] = _problem.solution[j]; - _problem.solution[j] = temp; - - return true; - - } -}; - - - - -#endif diff --git a/trunk/paradiseo-peo/tutorial/Lesson1/main.cpp b/trunk/paradiseo-peo/tutorial/Lesson1/main.cpp deleted file mode 100755 index f56aa6208..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson1/main.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#include -#include -#include - -#include -#include - -#include "QAP.h" -#include "Move.h" -#include "QAPGA.h" -#include "qapPackUnpack.h" - -using namespace std; - -/** Set of parameters wrapped into a structure. We pass then the structure - * to a function which parses the parameters file. Doing so helps cleaning - * the code from the parts of reading the inputs. - */ -#include "parserStruct.h" -#include "utils.h" -/** The actual reading and parameters parsing is done inside this class utilities - */ - - -// Global variables -int n; // problem size -int** a; -int** b; // flows and distances matrices - -int bkv; //best known value - -void main_function(int argc, char **argv) -{ - - if (argc < 2){ - cout << "Please give a param file" << endl; - exit(1); - } - - - // Declaration of useful variables to parse the parameters file and then - // put its elements into a structure - eoParser parser(argc, argv); - parameters param; - parseFile(parser, param); - - string s (argv[1]); - - if ( (s.compare("-h") == 0) || (s.compare("--help") == 0 ) ) - ;//make help - - // Reading the a and b matrices of the QAP problem - else - loadInstances(param.inst.c_str(), n, bkv, a, b); - - MoveInit move_init; - - ProblemEval problem_eval; - - MoveNext move_next; - - MoveIncrEval move_incr_eval; - - moBestImprSelect move_select; - - moSimpleMoveTabuList tabulist (param.tabuListSize); - - //moNoAspirCrit aspiration_criterion; - moImprBestFitAspirCrit aspiration_criterion; - - moGenSolContinue continu (param.TSmaxIter); - - moTS tabu_search (move_init, move_next, move_incr_eval, - tabulist, aspiration_criterion, continu, problem_eval ); - - ProblemInit chromInit; - - eoPop pop (param.popSize, chromInit); - - // Initialisation of the parallel environment - peo :: init (argc, argv); - - if (getNodeRank()==1) - { - std :: cout << "\nResult before the local search\n"; - //std :: cout << "size\t" << pop.size() << endl; - for (int i=0;i initParallelTS (tabu_search); - peoWrapper parallelTS (initParallelTS, pop); - initParallelTS.setOwner(parallelTS); - peo :: run( ); - peo :: finalize( ); - - if (getNodeRank()==1) - { - cout << "\nInstance size = " << n << endl; - cout << "Best known value in the litterature = " << bkv << endl; - std :: cout << "\nResult after the local search\n"; - // sort and print the population - pop.sort(); - cout << pop; - } - - - - cout << endl; - - -} - -// A main that catches the exceptions - -int main(int argc, char **argv) -{ - - try - { - main_function(argc, argv); - - } - catch(exception& e) - { - cout << "Exception: " << e.what() << '\n'; - } - - - // desallocate memory - for (int i=0; i - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -struct parameters -{ - unsigned seed ; - int popSize; - string loadName; - string inst; - string schema; - int TSmaxIter; - int tabuListSize; -}; diff --git a/trunk/paradiseo-peo/tutorial/Lesson1/qapPackUnpack.h b/trunk/paradiseo-peo/tutorial/Lesson1/qapPackUnpack.h deleted file mode 100644 index 09277e36c..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson1/qapPackUnpack.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ -/** - * Since you define your own class, you need to tell ParadisEO how to pack - * and unpack your own data. - * This example show you how we pack and unpack a QAP class. In our case, it is - * just packing and unpacking an array of integers. In your case, it will depend - * on the representation of your class. - */ - -void pack( const Problem& _problem ) -{ - - if ( _problem.invalid() ) - pack( (unsigned int)0 ); - else - { - pack( (unsigned int)1 ); - pack(_problem.fitness()); - } - - for (int i = 0; i < n; i++ ) - { - pack( _problem.solution[i] ); - } -} - -void unpack( Problem& _problem ) -{ - unsigned int validFitness; - - unpack( validFitness ); - if ( validFitness ) - { - double fitnessValue; - unpack( fitnessValue ); - _problem.fitness( fitnessValue ); - } - else - { - _problem.invalidate(); - } - - for (int i = 0; i < n; i++ ) - { - unpack(_problem[i]); - } -} diff --git a/trunk/paradiseo-peo/tutorial/Lesson1/schema.xml b/trunk/paradiseo-peo/tutorial/Lesson1/schema.xml deleted file mode 100644 index 173e616c6..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson1/schema.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - 1 - - - - - - - - - - diff --git a/trunk/paradiseo-peo/tutorial/Lesson1/utils.h b/trunk/paradiseo-peo/tutorial/Lesson1/utils.h deleted file mode 100755 index 061185706..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson1/utils.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ -#ifndef _UTILS_H -#define _UTILS_H -#include -#include -#include - -using namespace std; - -void parseFile(eoParser & parser, parameters & param) -{ - - // For each parameter, you can in on single line - // define the parameter, read it through the parser, and assign it - - param.seed = parser.createParam(unsigned(time(0)), "seed", "Random number seed", 'S').value(); // will be in default section General - - // init and stop - param.popSize = parser.createParam(unsigned(15), "popSize", "Population size",'P', "Evolution engine" ).value(); - - param.loadName = parser.createParam(string(""), "Load","A save file to restart from",'L', "Persistence" ).value(); - param.inst = parser.createParam(string(""), "inst","A data file to read instances from",'i', "Persistence" ).value(); - param.schema = parser.createParam(string(""), "schema","An xml file mapping processes",'s', "Persistence" ).value(); - - param.TSmaxIter = parser.createParam(unsigned(1000), "TSmaxIter", "Maximum number of iterations",'M', "Tabu Search" ).value(); - - param.tabuListSize = parser.createParam(unsigned(10), "tabuListSize", "Tabu List Size",'l', "Tabu Search" ).value(); - - - - // the name of the "status" file where all actual parameter values will be saved - string str_status = parser.ProgramName() + ".status"; // default value - string statusName = parser.createParam(str_status, "status","Status file",'S', "Persistence" ).value(); - - // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED - // i.e. in case you need parameters somewhere else, postpone these - if (parser.userNeedsHelp()) - { - parser.printHelp(cout); - exit(1); - } - if (statusName != "") - { - ofstream os(statusName.c_str()); - os << parser; // and you can use that file as parameter file - } -} - -void loadInstances(const char* filename, int& n, int& bkv, int** & a, int** & b) -{ - - ifstream data_file; - int i, j; - data_file.open(filename); - if (! data_file.is_open()) - { - cout << "\n Error while reading the file " << filename << ". Please check if it exists !" << endl; - exit (1); - } - data_file >> n; - data_file >> bkv; // best known value - // ****************** dynamic memory allocation ****************** / - a = new int* [n]; - b = new int* [n]; - for (i = 0; i < n; i++) - { - a[i] = new int[n]; - b[i] = new int[n]; - } - - // ************** read flows and distanceMatrixs matrices ************** / - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) - data_file >> a[i][j]; - - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) - data_file >> b[i][j]; - - data_file.close(); -} - - - -#endif diff --git a/trunk/paradiseo-peo/tutorial/Lesson2/CMakeLists.txt b/trunk/paradiseo-peo/tutorial/Lesson2/CMakeLists.txt deleted file mode 100644 index 122564c7b..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson2/CMakeLists.txt +++ /dev/null @@ -1,78 +0,0 @@ - -###################################################################################### -### 0) Set the compiler and define targets to easily run the lessons -###################################################################################### - -SET (CMAKE_CXX_COMPILER mpicxx) - -#ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson2/param ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson2/schema.xml) - -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson2/param -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson2) -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson2/schema.xml -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson2) - -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson2/param - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson2 - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson2/schema.xml - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson2 -) - -###################################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src ${MOEO_SRC_DIR}/src ${OLDMO_SRC_DIR}/src ${MO_SRC_DIR}/src ${ParadisEO-PEO_SOURCE_DIR}/src) - -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-PEO_BINARY_DIR}/lib) - -###################################################################################### - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -ADD_EXECUTABLE(multistartGA main.cpp) -###################################################################################### - - -###################################################################################### -### 4) Optionnal: define properties -###################################################################################### - -SET(LESSON2_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(multistartGA PROPERTIES VERSION "${LESSON2_VERSION}") -###################################################################################### - - -###################################################################################### -### 5) Link the librairies -###################################################################################### - -TARGET_LINK_LIBRARIES(multistartGA ${XML2_LIBS} peo rmc_mpi eo eoutils peo) - -###################################################################################### diff --git a/trunk/paradiseo-peo/tutorial/Lesson2/QAP.h b/trunk/paradiseo-peo/tutorial/Lesson2/QAP.h deleted file mode 100755 index 5730fa4f6..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson2/QAP.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - - -#ifndef QAP_H -#define QAP_H - -#include - -/* global variables */ -extern int n; // size -extern int** a; // matrix A -extern int** b; // matrix B - -class Problem : public EO { - -public: - - int* solution; - - Problem () { - solution = new int[n]; - create(); - } - - Problem (const Problem & _problem){ // copy constructor - solution = new int[n]; - for (int i = 0; i < n ; i++){ - solution[i] = _problem.solution[i]; - } - if (!_problem.invalid()) // if the solution has already been evaluated - fitness(_problem.fitness()); // copy the fitness - } - - ~Problem(){ // destructor - delete[] solution; - } - - void operator= (const Problem & _problem){ // copy assignment operator - for (int i = 0; i < n ; i++){ - solution[i] = _problem.solution[i]; - } - fitness(_problem.fitness()); // copy the fitness - } - - int& operator[] (unsigned i) - { - return solution[i]; - } - - - void create(){ // create and initialize a solution - int random, temp; - for (int i=0; i< n; i++) - solution[i]=i; - - // we want a random permutation so we shuffle - for (int i = 0; i < n; i++){ - random = rand()%(n-i) + i; - temp = solution[i]; - solution[i] = solution[random]; - solution[random] = temp; - } - } - - int evaluate() { // evaluate the solution - int cost=0; - for (int i=0; i - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _QAPGA_h -#define _QAPGA_h - -class ProblemInit : public eoInit -{ -public: - - void operator()(Problem & _problem) - { - _problem.create(); - } -}; - -class ProblemEvalFunc : public eoEvalFunc -{ -public: - - void operator()(Problem & _problem) - { - _problem.fitness(_problem.evaluate()); - - } -}; - -class ProblemXover : public eoQuadOp { -public: - - /* The two parameters in input are the parents. - The first parameter is also the output ie the child - */ - bool operator()(Problem & _problem1, Problem & _problem2) - { - int i; - int random, temp; - int unassigned_positions[n]; - int remaining_items[n]; - int j = 0; - - /* 1) find the items assigned in different positions for the 2 parents */ - for (i = 0 ; i < n ; i++){ - if (_problem1.solution[i] != _problem2.solution[i]){ - unassigned_positions[j] = i; - remaining_items[j] = _problem1.solution[i]; - j++; - } - } - - /* 2) shuffle the remaining items to ensure that remaining items - will be assigned at random positions */ - for (i = 0; i < j; i++){ - random = rand()%(j-i) + i; - temp = remaining_items[i]; - remaining_items[i] = remaining_items[random]; - remaining_items[random] = temp; - } - - /* 3) copy the shuffled remaining items at unassigned positions */ - for (i = 0; i < j ; i++) - _problem1.solution[unassigned_positions[i]] = remaining_items[i]; - - // crossover in our case is always possible - return true; - } -}; - -class ProblemSwapMutation: public eoMonOp { -public: - - bool operator()(Problem& _problem) { - int i,j; - int temp; - - // generate two different indices - i=rand()%n; - do - j = rand()%n; - while (i == j); - - // swap - temp = _problem.solution[i]; - _problem.solution[i] = _problem.solution[j]; - _problem.solution[j] = temp; - - return true; - - } -}; - - - - -#endif diff --git a/trunk/paradiseo-peo/tutorial/Lesson2/main.cpp b/trunk/paradiseo-peo/tutorial/Lesson2/main.cpp deleted file mode 100755 index fbe2c97e7..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson2/main.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -/** - * Declaration of the necessary headers: In these are defined the class QAP, - * redefinition of the crossover, mutation, initialisation of solution. - * - */ -#include -#include "QAP.h" -#include "QAPGA.h" -#include -using namespace std; - - -/** Set of parameters wrapped into a structure. We pass then the structure - * to a function which parses the parameters file. Doing so helps cleaning - * the code from the parts of reading the inputs. - */ -#include "parserStruct.h" -#include "utils.h" -/** The actual reading and parameters parsing is done inside this class utilities - */ - -// Global variables -int n; // problem size -int** a; -int** b; // a and matrices - -int bkv; //best known value - -void main_function(int argc, char **argv) -{ - // Declaration of useful variables to parse the parameters file and then - // its elements into a structure - if (argc < 2){ - cout << "Please give a param file" << endl; - exit(1); - } - - eoParser parser(argc, argv); - parameters param; - parseFile(parser, param); - rng.reseed(param.seed); - - - string s (argv[1]); - - if ( (s.compare("-h") == 0) || (s.compare("--help") == 0 ) ) - ;//make help - - // Reading the a and b matrices of the QAP problem - else - loadInstances(param.inst.c_str(), n, bkv, a, b); - - // Declaration of class wrapping the evaluation function of the QAP - ProblemEvalFunc plainEval; - eoEvalFuncCounter eval(plainEval); - - // Class involving a simple call to the function of initialisation of a solution - ProblemInit chromInit; - - - eoPop pop1(param.popSize, chromInit); // Initialise the population - eoPop pop2(param.popSize, chromInit); // Initialise the population - eoPop pop3(param.popSize, chromInit); // Initialise the population - - // The robust tournament selection - eoDetTournamentSelect selectOne(param.tSize); - // is now encapsulated in a eoSelectPerc (entage) - eoSelectPerc select(selectOne);// by default rate==1 - - ProblemXover Xover; // CROSSOVER - ProblemSwapMutation mutationSwap; // MUTATION - - // The operators are encapsulated into an eoTRansform object - eoSGATransform transform(Xover, param.pCross, mutationSwap, param.pMut); - - // REPLACE - eoPlusReplacement replace; - - eoGenContinue genCont(param.maxGen); // generation continuation - - eoEasyEA gga1(genCont, plainEval, select, transform, replace); - eoEasyEA gga2(genCont, plainEval, select, transform, replace); - eoEasyEA gga3(genCont, plainEval, select, transform, replace); - - // Start the parallel EA - peo :: init (argc, argv); - if (getNodeRank()==1) - { - apply(eval, pop1); - pop1.sort(); - cout << "Initial Population\n" << pop1 << endl; - } - if (getNodeRank()==2) - { - apply(eval, pop2); - pop2.sort(); - cout << "Initial Population\n" << pop2 << endl; - } - if (getNodeRank()==3) - { - apply(eval, pop3); - pop3.sort(); - cout << "Initial Population\n" << pop3 << endl; - } - - peoWrapper parallelEA1 (gga1, pop1); - peoWrapper parallelEA2 (gga2, pop2); - peoWrapper parallelEA3 (gga3, pop3); - - peo :: run( ); - peo :: finalize( ); - - // Print (sorted) intial population - if (getNodeRank()==1) - { - pop1.sort(); - cout << "FINAL Population\n" << pop1 << endl; - cout << "\nInstance size = " << n << endl; - cout << "Best known value in the litterature = " << bkv <<"\n"<< endl; - cout << "Best solution found\t" << pop1[0].fitness() << endl; - } - if (getNodeRank()==2) - { - pop2.sort(); - cout << "FINAL Population\n" << pop2 << endl; - cout << "\nInstance size = " << n << endl; - cout << "Best known value in the litterature = " << bkv <<"\n"<< endl; - cout << "Best solution found\t" << pop2[0].fitness() << endl; - } - if (getNodeRank()==3) - { - pop3.sort(); - cout << "FINAL Population\n" << pop3 << endl; - cout << "\nInstance size = " << n << endl; - cout << "Best known value in the litterature = " << bkv <<"\n"<< endl; - cout << "Best solution found\t" << pop3[0].fitness() << endl; - } - - // GENERAL - - -} - -// A main that catches the exceptions - -int main(int argc, char **argv) -{ - - try - { - main_function(argc, argv); - - } - catch(exception& e) - { - cout << "Exception: " << e.what() << '\n'; - } - - - // desallocate memory - for (int i=0; i - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -struct parameters -{ - unsigned seed ; - int popSize; - int tSize; - string inst; - string loadName; - string schema; - double pCross; - double pMut; - int minGen; - int maxGen; -}; diff --git a/trunk/paradiseo-peo/tutorial/Lesson2/schema.xml b/trunk/paradiseo-peo/tutorial/Lesson2/schema.xml deleted file mode 100644 index 173e616c6..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson2/schema.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - 1 - - - - - - - - - - diff --git a/trunk/paradiseo-peo/tutorial/Lesson2/utils.h b/trunk/paradiseo-peo/tutorial/Lesson2/utils.h deleted file mode 100755 index b5e07cfb4..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson2/utils.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ -#ifndef _UTILS_H -#define _UTILS_H -#include -#include -#include - -using namespace std; - -void parseFile(eoParser & parser, parameters & param) -{ - - // For each parameter, you can in on single line - // define the parameter, read it through the parser, and assign it - - param.seed = parser.createParam(unsigned(time(0)), "seed", "Random number seed", 'S').value(); // will be in default section General - - // init and stop - param.loadName = parser.createParam(string(""), "Load","A save file to restart from",'L', "Persistence" ).value(); - - param.inst = parser.createParam(string(""), "inst","a dat file to read instances from",'i', "Persistence" ).value(); - - param.schema = parser.createParam(string(""), "schema","an xml file mapping process",'s', "Persistence" ).value(); - - param.popSize = parser.createParam(unsigned(10), "popSize", "Population size",'P', "Evolution engine" ).value(); - - param.tSize = parser.createParam(unsigned(2), "tSize", "Tournament size",'T', "Evolution Engine" ).value(); - - param.minGen = parser.createParam(unsigned(100), "minGen", "Minimum number of iterations",'g', "Stopping criterion" ).value(); - - param.maxGen = parser.createParam(unsigned(300), "maxGen", "Maximum number of iterations",'G', "Stopping criterion" ).value(); - - param.pCross = parser.createParam(double(0.6), "pCross", "Probability of Crossover", 'C', "Genetic Operators" ).value(); - - param.pMut = parser.createParam(double(0.1), "pMut", "Probability of Mutation", 'M', "Genetic Operators" ).value(); - - - // the name of the "status" file where all actual parameter values will be saved - string str_status = parser.ProgramName() + ".status"; // default value - string statusName = parser.createParam(str_status, "status","Status file",'S', "Persistence" ).value(); - - // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED - // i.e. in case you need parameters somewhere else, postpone these - if (parser.userNeedsHelp()) - { - parser.printHelp(cout); - exit(1); - } - if (statusName != "") - { - ofstream os(statusName.c_str()); - os << parser; // and you can use that file as parameter file - } -} - -void loadInstances(const char* filename, int& n, int& bkv, int** & a, int** & b) -{ - - ifstream data_file; - int i, j; - data_file.open(filename); - if (! data_file.is_open()) - { - cout << "\n Error while reading the file " << filename << ". Please check if it exists !" << endl; - exit (1); - } - data_file >> n; - data_file >> bkv; // best known value - // ****************** dynamic memory allocation ****************** / - a = new int* [n]; - b = new int* [n]; - for (i = 0; i < n; i++) - { - a[i] = new int[n]; - b[i] = new int[n]; - } - - // ************** read flows and distanceMatrixs matrices ************** / - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) - data_file >> a[i][j]; - - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) - data_file >> b[i][j]; - - data_file.close(); -} - - - -#endif diff --git a/trunk/paradiseo-peo/tutorial/Lesson3/CMakeLists.txt b/trunk/paradiseo-peo/tutorial/Lesson3/CMakeLists.txt deleted file mode 100644 index 3cc47091b..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson3/CMakeLists.txt +++ /dev/null @@ -1,80 +0,0 @@ - -###################################################################################### -### 0) Set the compiler and define targets to easily run the lessons -###################################################################################### - -SET (CMAKE_CXX_COMPILER mpicxx) - -#ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/param ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/schema.xml) - -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/param -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson3) -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/schema.xml -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson3) - -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/param - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson3 - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/schema.xml - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson3 -) - -###################################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src ${MOEO_SRC_DIR}/src ${OLDMO_SRC_DIR}/src ${MO_SRC_DIR}/src ${ParadisEO-PEO_SOURCE_DIR}/src) - -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-PEO_BINARY_DIR}/lib) - -###################################################################################### - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -ADD_EXECUTABLE(popEval main.cpp) -###################################################################################### - - -###################################################################################### -### 4) Optionnal: define properties -###################################################################################### - -SET(LESSON3_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(popEval PROPERTIES VERSION "${LESSON3_VERSION}") - -###################################################################################### - - -###################################################################################### -### 5) Link the librairies -###################################################################################### - -TARGET_LINK_LIBRARIES(popEval eo ga es ${XML2_LIBS} peo rmc_mpi eoutils peo) - -###################################################################################### - diff --git a/trunk/paradiseo-peo/tutorial/Lesson3/Move.h b/trunk/paradiseo-peo/tutorial/Lesson3/Move.h deleted file mode 100755 index d1188a65b..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson3/Move.h +++ /dev/null @@ -1,203 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef MOVE_H -#define MOVE_H - -#include -#include -#include "QAP.h" - -#endif - - -class ProblemEval : public eoEvalFunc { -public: - - void operator() (Problem & _problem){ - //cout << "eoEvalFunc()"<< endl; - _problem.fitness(_problem.evaluate()); - - } - -}; - -class Move : public moMove , public std :: pair { -public : - void operator () (Problem & _problem) { - // transformer une solution en une autre connaissant le meilleur mouvement - //cout << "MOVE() " << endl; - int temp = _problem.solution[first]; - _problem.solution[first] = _problem.solution[second]; - _problem.solution[second] = temp; - - -} - -}; - - -class MoveInit : public moMoveInit { -public: - - void operator () (Move & _move, const Problem& _problem) { - //cout << "MoveInit " << endl; - - _move.first = 0; - _move.second = 1; - - - } -}; - - -class MoveNext : public moNextMove { -public: - bool operator() (Move & _move, const Problem & _problem) { - //cout << "MoveNext" << endl; - //cout << _move.first << " , " << _move.second << endl; - - if (_move.first < n-2){ - if (_move.second < n-1){ - - _move.second++; - } - else { - _move.first++; - _move.second = _move.first + 1; - - } - - - return true; - - } - - - return false; - - } -}; - -class MoveIncrEval : public moMoveIncrEval -{ -public: - - int compute_delta(int n, int** a, int** b, - int* p, int i, int j) - { - int d; int k; - d = (a[i][i]-a[j][j])*(b[p[j]][p[j]]-b[p[i]][p[i]]) + - (a[i][j]-a[j][i])*(b[p[j]][p[i]]-b[p[i]][p[j]]); - for (k = 0; k < n; k = k + 1) if (k!=i && k!=j) - d = d + (a[k][i]-a[k][j])*(b[p[k]][p[j]]-b[p[k]][p[i]]) + - (a[i][k]-a[j][k])*(b[p[j]][p[k]]-b[p[i]][p[k]]); - return(d); - } - - - eoMinimizingFitness operator() (const Move & _move, const Problem & _problem){ - - double cost; - cost=0; - - // for calculing delta difference - int* p = new int[n]; - for (int i = 0 ; i < n ; i++) - p[i] = _problem.solution[i]; - - - - cost = _problem.fitness() + compute_delta(n,a,b,p,_move.first, _move.second); - - - - delete[] p; - - return cost; - } - -}; - - - - -class MoveRand : public moRandMove { -public: - - void operator() (Move & _move){ - _move.first = rand()%n; - do{ - _move.second = rand()%n; - - } while (_move.first == _move.second); - } - -}; - - -//for ILS - - -/* -class Perturbation : public eoMonOp { -public: - - bool operator() (Problem & _problem){ - int r1,r2,temp; - int mu = 1 + rand()%n; - for (int k = 1 ; k <= mu; k++){ - - r1 = rand()%n; - - for(;;){ - r2 = rand()%n; - if (r1 != r2) - break; - } - - temp = _problem.solution[r1]; - _problem.solution[r1] = _problem.solution[r2]; - _problem.solution[r2] = temp; - - } - _problem.invalidate(); - - } - - -}; -*/ diff --git a/trunk/paradiseo-peo/tutorial/Lesson3/QAP.h b/trunk/paradiseo-peo/tutorial/Lesson3/QAP.h deleted file mode 100755 index e259b63bb..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson3/QAP.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - - -#ifndef QAP_H -#define QAP_H - -#include -using namespace std; - -/* global variables */ -extern int n; // size -extern int** a; // matrix A -extern int** b; // matrix B - -class Problem : public EO { - -public: - - int* solution; - - Problem () { - solution = new int[n]; - create(); - } - - Problem (const Problem & _problem){ // copy constructor - solution = new int[n]; - for (int i = 0; i < n ; i++){ - solution[i] = _problem.solution[i]; - } - if (!_problem.invalid()) // if the solution has already been evaluated - fitness(_problem.fitness()); // copy the fitness - } - - ~Problem(){ // destructor - delete[] solution; - } - - void operator= (const Problem & _problem){ // copy assignment operator - for (int i = 0; i < n ; i++){ - solution[i] = _problem.solution[i]; - } - fitness(_problem.fitness()); // copy the fitness - } - - int & operator[] (unsigned i) - { - return solution[i]; - } - - - void create(){ // create and initialize a solution - int random, temp; - for (int i=0; i< n; i++) - solution[i]=i; - - // we want a random permutation so we shuffle - for (int i = 0; i < n; i++){ - random = rng.rand()%(n-i) + i; - temp = solution[i]; - solution[i] = solution[random]; - solution[random] = temp; - } - } - - int evaluate() { // evaluate the solution - int cost=0; - for (int i=0; i - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _QAPGA_h -#define _QAPGA_h - -class ProblemInit : public eoInit -{ -public: - - void operator()(Problem & _problem) - { - _problem.create(); - } -}; - -class ProblemEvalFunc : public eoEvalFunc -{ -public: - - void operator()(Problem & _problem) - { - _problem.fitness(_problem.evaluate()); - - } -}; - -class ProblemXover : public eoQuadOp { -public: - - /* The two parameters in input are the parents. - The first parameter is also the output ie the child - */ - bool operator()(Problem & _problem1, Problem & _problem2) - { - int i; - int random, temp; - int unassigned_positions[n]; - int remaining_items[n]; - int j = 0; - - /* 1) find the items assigned in different positions for the 2 parents */ - for (i = 0 ; i < n ; i++){ - if (_problem1.solution[i] != _problem2.solution[i]){ - unassigned_positions[j] = i; - remaining_items[j] = _problem1.solution[i]; - j++; - } - } - - /* 2) shuffle the remaining items to ensure that remaining items - will be assigned at random positions */ - for (i = 0; i < j; i++){ - random = rng.rand()%(j-i) + i; - temp = remaining_items[i]; - remaining_items[i] = remaining_items[random]; - remaining_items[random] = temp; - } - - /* 3) copy the shuffled remaining items at unassigned positions */ - for (i = 0; i < j ; i++) - _problem1.solution[unassigned_positions[i]] = remaining_items[i]; - - // crossover in our case is always possible - return true; - } -}; - -class ProblemSwapMutation: public eoMonOp { -public: - - bool operator()(Problem& _problem) { - int i,j; - int temp; - - // generate two different indices - i=rng.rand()%n; - do - j = rng.rand()%n; - while (i == j); - - // swap - temp = _problem.solution[i]; - _problem.solution[i] = _problem.solution[j]; - _problem.solution[j] = temp; - - return true; - - } -}; - - - - -#endif diff --git a/trunk/paradiseo-peo/tutorial/Lesson3/main.cpp b/trunk/paradiseo-peo/tutorial/Lesson3/main.cpp deleted file mode 100755 index 59198ec70..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson3/main.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -/** - * Declaration of the necessary headers: In these are defined the class QAP, - * redefinition of the crossover, mutation, initialisation of solution. - * - */ - -#include -#include -#include -#include "QAP.h" -#include "QAPGA.h" -#include "Move.h" -#include "qapPackUnpack.h" - - -/** Set of parameters wrapped into a structure. We pass then the structure - * to a function which parses the parameters file. Doing so helps cleaning - * the code from the parts of reading the inputs. - */ -#include "parserStruct.h" -#include "utils.h" -/** The actual reading and parameters parsing is done inside this class utilities - */ - -// Global variables -int n; // problem size -int** a; -int** b; // a and matrices - -int bkv; //best known value - -void main_function(int argc, char **argv) -{ - if (argc < 2){ - cout << "Please give a param file" << endl; - exit(1); - } - - // Declaration of useful variables to parse the parameters file and then - // its elements into a structure - eoParser parser(argc, argv); - parameters param; - parseFile(parser, param); - - string s (argv[1]); - if ( (s.compare("-h") == 0) || (s.compare("--help") == 0 ) ) - ;//make help - - // Reading the a and b matrices of the QAP problem - else - loadInstances(param.inst.c_str(), n, bkv, a, b); - rng.reseed(param.seed); - - // Declaration of class wrapping the evaluation function of the QAP - ProblemEvalFunc plainEval; - peoPopEval eval(plainEval); - - - // Class involving a simple call to the function of initialisation of a solution - ProblemInit chromInit; - - - eoPop pop(param.popSize, chromInit); // Initialise the population - - // The robust tournament selection - eoDetTournamentSelect selectOne(param.tSize); - // is now encapsulated in a eoSelectPerc (entage) - eoSelectPerc select(selectOne);// by default rate==1 - - ProblemXover Xover; // CROSSOVER - - MoveInit move_init; - ProblemEval problem_eval; - MoveNext move_next; - MoveIncrEval move_incr_eval; - - moSimpleMoveTabuList tabulist(param.tabuListSize); - moImprBestFitAspirCrit aspiration_criterion; - moGenSolContinue continu (param.TSmaxIter); - - moTS tabu_search (move_init, move_next, move_incr_eval, - tabulist, aspiration_criterion, continu, problem_eval ); - - - // The operators are encapsulated into an eoTRansform object - - eoSGATransform transform(Xover, param.pCross, tabu_search, param.pMut); - - - - // REPLACE - eoPlusReplacement replace; - - eoGenContinue genCont(param.maxGen); // generation continuation - - eoEasyEA gga(genCont, eval, select, transform, replace); - - // PEO ADD - peo :: init( argc, argv ); - peoWrapper parallelEA( gga, pop); - eval.setOwner(parallelEA); - - if (getNodeRank()==1) - { - for (int i=0;i - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ -struct parameters -{ - unsigned seed ; - unsigned popSize ; - unsigned tSize ; - string loadName ; - string inst ; - string schema ; - unsigned maxGen ; - unsigned minGen ; - double pCross ; - double pMut ; - int TSmaxIter ; - int tabuListSize; - -}; diff --git a/trunk/paradiseo-peo/tutorial/Lesson3/qapPackUnpack.h b/trunk/paradiseo-peo/tutorial/Lesson3/qapPackUnpack.h deleted file mode 100644 index 093e57c87..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson3/qapPackUnpack.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ -/** - * Since you define your own class, you need to tell ParadisEO how to pack - * and unpack your own data. - * This example show you how we pack and unpack a QAP class. In our case, it is - * just packing and unpacking an array of integers. In your case, it will depend - * on the representation of your class. - */ -void pack( const Problem& _problem ) -{ - - if ( _problem.invalid() ) - pack( (unsigned int)0 ); - else - { - pack( (unsigned int)1 ); - pack(_problem.fitness()); - } - - for (int i = 0; i < n; i++ ) - { - pack( _problem.solution[i] ); - } -} - -void unpack( Problem& _problem ) -{ - - unsigned int validFitness; - unpack( validFitness ); - if ( validFitness ) - { - double fitnessValue; - unpack( fitnessValue ); - _problem.fitness( fitnessValue ); - } - else - { - _problem.invalidate(); - } - - for (int i = 0; i < n; i++ ) - { - unpack(_problem[i]); - } -} -/* -void unpack( eoMinimizingFitness& __fitness ) -{ - - cout << " unpacking .... " << endl; - -} -*/ diff --git a/trunk/paradiseo-peo/tutorial/Lesson3/schema.xml b/trunk/paradiseo-peo/tutorial/Lesson3/schema.xml deleted file mode 100644 index 173e616c6..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson3/schema.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - 1 - - - - - - - - - - diff --git a/trunk/paradiseo-peo/tutorial/Lesson3/utils.h b/trunk/paradiseo-peo/tutorial/Lesson3/utils.h deleted file mode 100755 index ca1f54629..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson3/utils.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _UTILS_H -#define _UTILS_H -#include -#include -#include - -using namespace std; - -void parseFile(eoParser & parser, parameters & param) -{ - - // For each parameter, you can in on single line - // define the parameter, read it through the parser, and assign it - - param.seed = parser.createParam(unsigned(time(0)), "seed", "Random number seed", 'S').value(); // will be in default section General - - // parameters for evolution engine - param.popSize = parser.createParam(unsigned(15), "popSize", "Population size",'P', "Evolution engine" ).value(); - - param.tSize = parser.createParam(unsigned(2), "tSize", "Tournament size",'T', "Evolution Engine" ).value(); - - param.loadName = parser.createParam(string(""), "Load","A save file to restart from",'L', "Persistence" ).value(); - - param.inst = parser.createParam(string(""), "inst","a dat file to read instances from",'i', "Persistence" ).value(); - - param.schema = parser.createParam(string(""), "schema","an xml file mapping process",'s', "Persistence" ).value(); - - param.maxGen = parser.createParam(unsigned(10), "maxGen", "Maximum number of generations",'G', "Stopping criterion" ).value(); - param.minGen = parser.createParam(unsigned(10), "minGen", "Minimum number of generations",'g', "Stopping criterion" ).value(); - - // operators probabilities at the algorithm level - param.pCross = parser.createParam(double(0.6), "pCross", "Probability of Crossover", 'C', "Genetic Operators" ).value(); - - param.pMut = parser.createParam(double(0.3), "pMut", "Probability of Mutation", 'M', "Genetic Operators" ).value(); - - param.TSmaxIter = parser.createParam(unsigned(1000), "TSmaxIter", "Maximum number of iterations",'I', "Tabu Search" ).value(); - - param.tabuListSize = parser.createParam(unsigned(10), "tabuListSize", "Tabu List Size",'V', "Tabu Search" ).value(); - - - // the name of the "status" file where all actual parameter values will be saved - string str_status = parser.ProgramName() + ".status"; // default value - string statusName = parser.createParam(str_status, "status","Status file",'S', "Persistence" ).value(); - - // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED - // i.e. in case you need parameters somewhere else, postpone these - if (parser.userNeedsHelp()) - { - parser.printHelp(cout); - exit(1); - } - if (statusName != "") - { - ofstream os(statusName.c_str()); - os << parser; // and you can use that file as parameter file - } -} - -void loadInstances(const char* filename, int& n, int& bkv, int** & a, int** & b) -{ - - ifstream data_file; - int i, j; - data_file.open(filename); - if (! data_file.is_open()) - { - cout << "\n Error while reading the file " << filename << ". Please check if it exists !" << endl; - exit (1); - } - data_file >> n; - data_file >> bkv; // best known value - // ****************** dynamic memory allocation ****************** / - a = new int* [n]; - b = new int* [n]; - for (i = 0; i < n; i++) - { - a[i] = new int[n]; - b[i] = new int[n]; - } - - // ************** read flows and distanceMatrixs matrices ************** / - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) - data_file >> a[i][j]; - - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) - data_file >> b[i][j]; - - data_file.close(); -} - - - -#endif diff --git a/trunk/paradiseo-peo/tutorial/Lesson4/CMakeLists.txt b/trunk/paradiseo-peo/tutorial/Lesson4/CMakeLists.txt deleted file mode 100644 index b4ab76bce..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson4/CMakeLists.txt +++ /dev/null @@ -1,80 +0,0 @@ - -###################################################################################### -### 0) Set the compiler and define targets to easily run the lessons -###################################################################################### - -SET (CMAKE_CXX_COMPILER mpicxx) - -#ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson4/param ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson4/schema.xml) - -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson4/param -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson4) -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson4/schema.xml -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson4) - -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson4/param - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson4 - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson4/schema.xml - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson4 -) - -###################################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src ${MOEO_SRC_DIR}/src ${OLDMO_SRC_DIR}/src ${MO_SRC_DIR}/src ${ParadisEO-PEO_SOURCE_DIR}/src) - -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${MOEO_BIN_DIR}/lib ${ParadisEO-PEO_BINARY_DIR}/lib) - -###################################################################################### - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -ADD_EXECUTABLE(transform main.cpp) - -###################################################################################### - - -###################################################################################### -### 4) Optionnal: define properties -###################################################################################### - -SET(LESSON4_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(transform PROPERTIES VERSION "${LESSON4_VERSION}") - -###################################################################################### - - -###################################################################################### -### 5) Link the librairies -###################################################################################### - -TARGET_LINK_LIBRARIES(transform eo ga es ${XML2_LIBS} peo rmc_mpi eoutils peo) - -###################################################################################### diff --git a/trunk/paradiseo-peo/tutorial/Lesson4/Move.h b/trunk/paradiseo-peo/tutorial/Lesson4/Move.h deleted file mode 100755 index d1188a65b..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson4/Move.h +++ /dev/null @@ -1,203 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef MOVE_H -#define MOVE_H - -#include -#include -#include "QAP.h" - -#endif - - -class ProblemEval : public eoEvalFunc { -public: - - void operator() (Problem & _problem){ - //cout << "eoEvalFunc()"<< endl; - _problem.fitness(_problem.evaluate()); - - } - -}; - -class Move : public moMove , public std :: pair { -public : - void operator () (Problem & _problem) { - // transformer une solution en une autre connaissant le meilleur mouvement - //cout << "MOVE() " << endl; - int temp = _problem.solution[first]; - _problem.solution[first] = _problem.solution[second]; - _problem.solution[second] = temp; - - -} - -}; - - -class MoveInit : public moMoveInit { -public: - - void operator () (Move & _move, const Problem& _problem) { - //cout << "MoveInit " << endl; - - _move.first = 0; - _move.second = 1; - - - } -}; - - -class MoveNext : public moNextMove { -public: - bool operator() (Move & _move, const Problem & _problem) { - //cout << "MoveNext" << endl; - //cout << _move.first << " , " << _move.second << endl; - - if (_move.first < n-2){ - if (_move.second < n-1){ - - _move.second++; - } - else { - _move.first++; - _move.second = _move.first + 1; - - } - - - return true; - - } - - - return false; - - } -}; - -class MoveIncrEval : public moMoveIncrEval -{ -public: - - int compute_delta(int n, int** a, int** b, - int* p, int i, int j) - { - int d; int k; - d = (a[i][i]-a[j][j])*(b[p[j]][p[j]]-b[p[i]][p[i]]) + - (a[i][j]-a[j][i])*(b[p[j]][p[i]]-b[p[i]][p[j]]); - for (k = 0; k < n; k = k + 1) if (k!=i && k!=j) - d = d + (a[k][i]-a[k][j])*(b[p[k]][p[j]]-b[p[k]][p[i]]) + - (a[i][k]-a[j][k])*(b[p[j]][p[k]]-b[p[i]][p[k]]); - return(d); - } - - - eoMinimizingFitness operator() (const Move & _move, const Problem & _problem){ - - double cost; - cost=0; - - // for calculing delta difference - int* p = new int[n]; - for (int i = 0 ; i < n ; i++) - p[i] = _problem.solution[i]; - - - - cost = _problem.fitness() + compute_delta(n,a,b,p,_move.first, _move.second); - - - - delete[] p; - - return cost; - } - -}; - - - - -class MoveRand : public moRandMove { -public: - - void operator() (Move & _move){ - _move.first = rand()%n; - do{ - _move.second = rand()%n; - - } while (_move.first == _move.second); - } - -}; - - -//for ILS - - -/* -class Perturbation : public eoMonOp { -public: - - bool operator() (Problem & _problem){ - int r1,r2,temp; - int mu = 1 + rand()%n; - for (int k = 1 ; k <= mu; k++){ - - r1 = rand()%n; - - for(;;){ - r2 = rand()%n; - if (r1 != r2) - break; - } - - temp = _problem.solution[r1]; - _problem.solution[r1] = _problem.solution[r2]; - _problem.solution[r2] = temp; - - } - _problem.invalidate(); - - } - - -}; -*/ diff --git a/trunk/paradiseo-peo/tutorial/Lesson4/QAP.h b/trunk/paradiseo-peo/tutorial/Lesson4/QAP.h deleted file mode 100755 index af6026cea..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson4/QAP.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - - -#ifndef QAP_H -#define QAP_H - -#include - -/* global variables */ -extern int n; // size -extern int** a; // matrix A -extern int** b; // matrix B - -class Problem : public EO { - -public: - - int* solution; - - Problem () { - solution = new int[n]; - create(); - } - - Problem (const Problem & _problem){ // copy constructor - solution = new int[n]; - for (int i = 0; i < n ; i++){ - solution[i] = _problem.solution[i]; - } - if (!_problem.invalid()) // if the solution has already been evaluated - fitness(_problem.fitness()); // copy the fitness - } - - ~Problem(){ // destructor - delete[] solution; - } - - void operator= (const Problem & _problem){ // copy assignment operator - for (int i = 0; i < n ; i++){ - solution[i] = _problem.solution[i]; - } - fitness(_problem.fitness()); // copy the fitness - } - - - void create(){ // create and initialize a solution - int random, temp; - for (int i=0; i< n; i++) - solution[i]=i; - - // we want a random permutation so we shuffle - for (int i = 0; i < n; i++){ - random = rng.rand()%(n-i) + i; - temp = solution[i]; - solution[i] = solution[random]; - solution[random] = temp; - } - } - - int evaluate() { // evaluate the solution - int cost=0; - for (int i=0; i - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _QAPGA_h -#define _QAPGA_h - -class ProblemInit : public eoInit -{ -public: - - void operator()(Problem & _problem) - { - _problem.create(); - } -}; - -class ProblemEvalFunc : public eoEvalFunc -{ -public: - - void operator()(Problem & _problem) - { - _problem.fitness(_problem.evaluate()); - - } -}; - -class ProblemXover : public eoQuadOp { -public: - - /* The two parameters in input are the parents. - The first parameter is also the output ie the child - */ - bool operator()(Problem & _problem1, Problem & _problem2) - { - int i; - int random, temp; - int unassigned_positions[n]; - int remaining_items[n]; - int j = 0; - - /* 1) find the items assigned in different positions for the 2 parents */ - for (i = 0 ; i < n ; i++){ - if (_problem1.solution[i] != _problem2.solution[i]){ - unassigned_positions[j] = i; - remaining_items[j] = _problem1.solution[i]; - j++; - } - } - - /* 2) shuffle the remaining items to ensure that remaining items - will be assigned at random positions */ - for (i = 0; i < j; i++){ - random = rng.rand()%(j-i) + i; - temp = remaining_items[i]; - remaining_items[i] = remaining_items[random]; - remaining_items[random] = temp; - } - - /* 3) copy the shuffled remaining items at unassigned positions */ - for (i = 0; i < j ; i++) - _problem1.solution[unassigned_positions[i]] = remaining_items[i]; - - // crossover in our case is always possible - return true; - } -}; - -class ProblemSwapMutation: public eoMonOp { -public: - - bool operator()(Problem& _problem) { - int i,j; - int temp; - - // generate two different indices - i=rng.rand()%n; - do - j = rng.rand()%n; - while (i == j); - - // swap - temp = _problem.solution[i]; - _problem.solution[i] = _problem.solution[j]; - _problem.solution[j] = temp; - - return true; - - } -}; - - - - -#endif diff --git a/trunk/paradiseo-peo/tutorial/Lesson4/main.cpp b/trunk/paradiseo-peo/tutorial/Lesson4/main.cpp deleted file mode 100755 index ec3a8575b..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson4/main.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -/** - * Declaration of the necessary headers: In these are defined the class QAP, - * redefinition of the crossover, mutation, initialisation of solution. - * - */ -#include -#include -#include -#include "QAP.h" -#include "QAPGA.h" -#include "Move.h" -#include "qapPackUnpack.h" -using namespace std; - - -/** Set of parameters wrapped into a structure. We pass then the structure - * to a function which parses the parameters file. Doing so helps cleaning - * the code from the parts of reading the inputs. - */ -#include "parserStruct.h" -#include "utils.h" -/** The actual reading and parameters parsing is done inside this class utilities - */ - -// Global variables -int n; // problem size -int** a; -int** b; // a and matrices - -int bkv; //best known value - -void main_function(int argc, char **argv) -{ - if (argc < 2){ - cout << "Please give a param file" << endl; - exit(1); - } - - // Declaration of useful variables to parse the parameters file and then - // its elements into a structure - eoParser parser(argc, argv); - parameters param; - parseFile(parser, param); - - string s (argv[1]); - if ( (s.compare("-h") == 0) || (s.compare("--help") == 0 ) ) - ;//make help - - // Reading the a and b matrices of the QAP problem - else - loadInstances(param.inst.c_str(), n, bkv, a, b); - - rng.reseed(param.seed); - - // Declaration of class wrapping the evaluation function of the QAP - ProblemEvalFunc plainEval; - - - // Class involving a simple call to the function of initialisation of a solution - ProblemInit chromInit; - - - eoPop pop(param.popSize, chromInit); // Initialise the population - - // The robust tournament selection - eoDetTournamentSelect selectOne(param.tSize); - // is now encapsulated in a eoSelectPerc (entage) - eoSelectPerc select(selectOne);// by default rate==1 - - ProblemXover Xover; // CROSSOVER - - MoveInit move_init; - ProblemEval problem_eval; - MoveNext move_next; - MoveIncrEval move_incr_eval; - - moSimpleMoveTabuList tabulist(param.tabuListSize); - moImprBestFitAspirCrit aspiration_criterion; - moGenSolContinue continu (param.TSmaxIter); - - moTS tabu_search (move_init, move_next, move_incr_eval, - tabulist, aspiration_criterion, continu, problem_eval ); - - peo :: init( argc, argv ); - // The operators are encapsulated into an eoTRansform object - /* - eoSGATransform transform(Xover, param.pCross, tabu_search, param.pMut); - */ - peoTransform transform(Xover, param.pCross, tabu_search, param.pMut); - - // REPLACE - eoPlusReplacement replace; - - eoGenContinue genCont(param.maxGen); // generation continuation - - eoEasyEA gga(genCont, plainEval, select, transform, replace); - - // PEO ADD - - peoWrapper parallelEA( gga, pop); - transform.setOwner(parallelEA); - - peo :: run(); - peo :: finalize(); - - if (getNodeRank()==1) - { - cout << "Instance size = " << n << endl; - cout << "Best known value in the litterature = " << bkv << endl; - pop.sort(); - std::cout << "Final population :\n" << pop << std::endl; - - cout << "Best solution found" << endl; - pop[0].printSolution(); - cout << pop[0] << endl; - // GENERAL - } - -} - -// A main that catches the exceptions - -int main(int argc, char **argv) -{ - - try - { - main_function(argc, argv); - } - catch(exception& e) - { - cout << "Exception: " << e.what() << '\n'; - } - - - // desallocate memory - for (int i=0; i - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ -struct parameters -{ - unsigned seed ; - unsigned popSize ; - unsigned tSize ; - string loadName ; - string inst ; - string schema ; - unsigned maxGen ; - unsigned minGen ; - double pCross ; - double pMut ; - int TSmaxIter ; - int tabuListSize; - -}; diff --git a/trunk/paradiseo-peo/tutorial/Lesson4/qapPackUnpack.h b/trunk/paradiseo-peo/tutorial/Lesson4/qapPackUnpack.h deleted file mode 100644 index 82769ef63..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson4/qapPackUnpack.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ -void pack( const Problem& _problem ) -{ - - if ( _problem.invalid() ) - pack( (unsigned int)0 ); - else - { - pack( (unsigned int)1 ); - pack(_problem.fitness()); - } - - for (int i = 0; i < n; i++ ) - { - pack( _problem.solution[i] ); - } - -} - -void unpack( Problem& _problem ) -{ - - - unsigned int validFitness; - - unpack( validFitness ); - if ( validFitness ) - { - double fitnessValue; - unpack( fitnessValue ); - _problem.fitness( fitnessValue ); } - else - { - _problem.invalidate(); - } - - int value; - for (int i = 0; i < n; i++ ) - { - unpack(value); - _problem.solution[i] = value; - } - - -} diff --git a/trunk/paradiseo-peo/tutorial/Lesson4/schema.xml b/trunk/paradiseo-peo/tutorial/Lesson4/schema.xml deleted file mode 100644 index 173e616c6..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson4/schema.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - 1 - - - - - - - - - - diff --git a/trunk/paradiseo-peo/tutorial/Lesson4/utils.h b/trunk/paradiseo-peo/tutorial/Lesson4/utils.h deleted file mode 100755 index 152594adf..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson4/utils.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _UTILS_H -#define _UTILS_H -#include -#include -#include - -using namespace std; - -void parseFile(eoParser & parser, parameters & param) -{ - - // For each parameter, you can in on single line - // define the parameter, read it through the parser, and assign it - - param.seed = parser.createParam(unsigned(time(0)), "seed", "Random number seed", 'S').value(); // will be in default section General - - // parameters for evolution engine - param.popSize = parser.createParam(unsigned(15), "popSize", "Population size",'P', "Evolution engine" ).value(); - - param.tSize = parser.createParam(unsigned(2), "tSize", "Tournament size",'T', "Evolution Engine" ).value(); - - param.maxGen = parser.createParam(unsigned(20), "maxGen", "Maximum number of generations",'G', "Stopping criterion" ).value(); - param.minGen = parser.createParam(unsigned(10), "minGen", "Minimum number of generations",'g', "Stopping criterion" ).value(); - - param.inst = parser.createParam(string(""), "inst","a dat file to read instances from",'i', "Persistence" ).value(); - - param.schema = parser.createParam(string(""), "schema","an xml file mapping process",'s', "Persistence" ).value(); - - // operators probabilities at the algorithm level - param.pCross = parser.createParam(double(0.6), "pCross", "Probability of Crossover", 'C', "Genetic Operators" ).value(); - - param.pMut = parser.createParam(double(0.3), "pMut", "Probability of Mutation", 'M', "Genetic Operators" ).value(); - - param.TSmaxIter = parser.createParam(unsigned(1000), "TSmaxIter", "Maximum number of iterations",'I', "Tabu Search" ).value(); - - param.tabuListSize = parser.createParam(unsigned(10), "tabuListSize", "Tabu List Size",'V', "Tabu Search" ).value(); - - - // the name of the "status" file where all actual parameter values will be saved - string str_status = parser.ProgramName() + ".status"; // default value - string statusName = parser.createParam(str_status, "status","Status file",'S', "Persistence" ).value(); - - // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED - // i.e. in case you need parameters somewhere else, postpone these - if (parser.userNeedsHelp()) - { - parser.printHelp(cout); - exit(1); - } - if (statusName != "") - { - ofstream os(statusName.c_str()); - os << parser; // and you can use that file as parameter file - } -} - -void loadInstances(const char* filename, int& n, int& bkv, int** & a, int** & b) -{ - - ifstream data_file; - int i, j; - data_file.open(filename); - if (! data_file.is_open()) - { - cout << "\n Error while reading the file " << filename << ". Please check if it exists !" << endl; - exit (1); - } - data_file >> n; - data_file >> bkv; // best known value - // ****************** dynamic memory allocation ****************** / - a = new int* [n]; - for (i = 0; i < n; i++) - a[i] = new int[n]; - - b = new int* [n]; - for (i = 0; i < n; i++) - b[i] = new int[n]; - - - - // ************** read flows and distanceMatrixs matrices ************** / - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) - data_file >> a[i][j]; - - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) - data_file >> b[i][j]; - - data_file.close(); -} - - - -#endif diff --git a/trunk/paradiseo-peo/tutorial/Lesson5/CMakeLists.txt b/trunk/paradiseo-peo/tutorial/Lesson5/CMakeLists.txt deleted file mode 100644 index 9164c63d6..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson5/CMakeLists.txt +++ /dev/null @@ -1,80 +0,0 @@ - -###################################################################################### -### 0) Set the compiler and define targets to easily run the lessons -###################################################################################### - -SET (CMAKE_CXX_COMPILER mpicxx) - -#ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson5/param ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson5/schema.xml) - -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson5/param -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson5) -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson5/schema.xml -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson5) - -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson5/param - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson5 - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson5/schema.xml - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson5 -) - -###################################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src ${MOEO_SRC_DIR}/src ${OLDMO_SRC_DIR}/src ${MO_SRC_DIR}/src ${ParadisEO-PEO_SOURCE_DIR}/src) - -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-PEO_BINARY_DIR}/lib) - -###################################################################################### - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -ADD_EXECUTABLE(island main.cpp) - -###################################################################################### - - -###################################################################################### -### 4) Optionnal: define properties -###################################################################################### - -SET(Lesson5_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(island PROPERTIES VERSION "${Lesson5_VERSION}") -###################################################################################### - - -###################################################################################### -### 5) Link the librairies -###################################################################################### - -TARGET_LINK_LIBRARIES(island eo ga es ${XML2_LIBS} peo rmc_mpi eoutils peo) - -###################################################################################### - diff --git a/trunk/paradiseo-peo/tutorial/Lesson5/QAP.h b/trunk/paradiseo-peo/tutorial/Lesson5/QAP.h deleted file mode 100755 index 5730fa4f6..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson5/QAP.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - - -#ifndef QAP_H -#define QAP_H - -#include - -/* global variables */ -extern int n; // size -extern int** a; // matrix A -extern int** b; // matrix B - -class Problem : public EO { - -public: - - int* solution; - - Problem () { - solution = new int[n]; - create(); - } - - Problem (const Problem & _problem){ // copy constructor - solution = new int[n]; - for (int i = 0; i < n ; i++){ - solution[i] = _problem.solution[i]; - } - if (!_problem.invalid()) // if the solution has already been evaluated - fitness(_problem.fitness()); // copy the fitness - } - - ~Problem(){ // destructor - delete[] solution; - } - - void operator= (const Problem & _problem){ // copy assignment operator - for (int i = 0; i < n ; i++){ - solution[i] = _problem.solution[i]; - } - fitness(_problem.fitness()); // copy the fitness - } - - int& operator[] (unsigned i) - { - return solution[i]; - } - - - void create(){ // create and initialize a solution - int random, temp; - for (int i=0; i< n; i++) - solution[i]=i; - - // we want a random permutation so we shuffle - for (int i = 0; i < n; i++){ - random = rand()%(n-i) + i; - temp = solution[i]; - solution[i] = solution[random]; - solution[random] = temp; - } - } - - int evaluate() { // evaluate the solution - int cost=0; - for (int i=0; i - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _QAPGA_h -#define _QAPGA_h - -class ProblemInit : public eoInit -{ -public: - - void operator()(Problem & _problem) - { - _problem.create(); - } -}; - -class ProblemEvalFunc : public eoEvalFunc -{ -public: - - void operator()(Problem & _problem) - { - _problem.fitness(_problem.evaluate()); - - } -}; - -class ProblemXover : public eoQuadOp { -public: - - /* The two parameters in input are the parents. - The first parameter is also the output ie the child - */ - bool operator()(Problem & _problem1, Problem & _problem2) - { - return true; - } -}; - -class ProblemSwapMutation: public eoMonOp { -public: - - bool operator()(Problem& _problem) - { - return true; - } -}; - -/* -class ProblemXover : public eoQuadOp { -public: - - // The two parameters in input are the parents. - // The first parameter is also the output ie the child - - bool operator()(Problem & _problem1, Problem & _problem2) - { - int i; - int random, temp; - int unassigned_positions[n]; - int remaining_items[n]; - int j = 0; - - // 1) find the items assigned in different positions for the 2 parents - for (i = 0 ; i < n ; i++){ - if (_problem1.solution[i] != _problem2.solution[i]){ - unassigned_positions[j] = i; - remaining_items[j] = _problem1.solution[i]; - j++; - } - } - - // 2) shuffle the remaining items to ensure that remaining items - will be assigned at random positions - for (i = 0; i < j; i++){ - random = rand()%(j-i) + i; - temp = remaining_items[i]; - remaining_items[i] = remaining_items[random]; - remaining_items[random] = temp; - } - - // 3) copy the shuffled remaining items at unassigned positions - for (i = 0; i < j ; i++) - _problem1.solution[unassigned_positions[i]] = remaining_items[i]; - - // crossover in our case is always possible - return true; - } -}; - -class ProblemSwapMutation: public eoMonOp { -public: - - bool operator()(Problem& _problem) { - int i,j; - int temp; - - // generate two different indices - i=rand()%n; - do - j = rand()%n; - while (i == j); - - // swap - temp = _problem.solution[i]; - _problem.solution[i] = _problem.solution[j]; - _problem.solution[j] = temp; - - return true; - - } -}; -*/ - -#endif diff --git a/trunk/paradiseo-peo/tutorial/Lesson5/main.cpp b/trunk/paradiseo-peo/tutorial/Lesson5/main.cpp deleted file mode 100755 index 93db8c632..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson5/main.cpp +++ /dev/null @@ -1,255 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -/** - * Declaration of the necessary headers: In these are defined the class Problem, - * redefinition of the crossover, mutation, initialisation of solution. - * - */ -#include -#include "QAP.h" -#include "QAPGA.h" -#include "qapPackUnpack.h" -#include -using namespace std; -//typedef Problem Problem; -/** Set of parameters wrapped into a structure. We pass then the structure - * to a function which parses the parameters file. Doing so helps cleaning - * the code from the parts of reading the inputs. - */ -#include "parserStruct.h" -#include "utils.h" -/** The actual reading and parameters parsing is done inside this class utilities - */ - -// Global variables -int n; // Problem size -int** a; -int** b; // a and matrices - -int bkv; //best known value - -void main_function(int argc, char **argv) -{ - // Declaration of useful variables to parse the parameters file and then - // its elements into a structure - if (argc < 2){ - cout << "Please give a param file" << endl; - exit(1); - } - - eoParser parser(argc, argv); - parameters param; - parseFile(parser, param); - rng.reseed(param.seed); - - - string s (argv[1]); - - if ( (s.compare("-h") == 0) || (s.compare("--help") == 0 ) ) - ;//make help - - // Reading the a and b matrices of the Problem Problem - else - loadInstances(param.inst.c_str(), n, bkv, a, b); - - // Declaration of class wrapping the evaluation function of the Problem - ProblemEvalFunc plainEval; - eoEvalFuncCounter eval(plainEval); - - // Class involving a simple call to the function of initialisation of a solution - ProblemInit chromInit; - - - eoPop pop_1(param.popSize, chromInit); // Initialise the population - eoPop pop_2(param.popSize, chromInit); // Initialise the population - eoPop pop_3(param.popSize, chromInit); // Initialise the population - - // The robust tournament selection - eoDetTournamentSelect selectOne(param.tSize); - - // is now encapsulated in a eoSelectPerc (entage) - eoSelectPerc select(selectOne);// by default rate==1 - - ProblemXover Xover; // CROSSOVER - ProblemSwapMutation mutationSwap; // MUTATION - - // The operators are encapsulated into an eoTRansform object - eoSGATransform transform(Xover, param.pCross, mutationSwap, param.pMut); - - // REPLACE - eoPlusReplacement replace; - - eoGenContinue genCont(param.maxGen); // generation continuation - - eoCheckPoint< Problem > checkpoint_1( genCont ); - eoCheckPoint< Problem > checkpoint_2( genCont ); - eoCheckPoint< Problem > checkpoint_3( genCont ); - - eoEasyEA gga_1(checkpoint_1, plainEval, select, transform, replace); - eoEasyEA gga_2(checkpoint_2, plainEval, select, transform, replace); - eoEasyEA gga_3(checkpoint_3, plainEval, select, transform, replace); - - peo :: init (argc, argv); - initDebugging(); - setDebugMode(true); - - // Start the parallel EA - - if (getNodeRank()==1) - { - apply(eval, pop_1); - pop_1.sort(); - cout << "Initial Population 1\n" << pop_1 << endl; - } - - if (getNodeRank()==2) - { - apply(eval, pop_2); - pop_2.sort(); - cout << "Initial Population 2\n" << pop_2 << endl; - } - - if (getNodeRank()==3) - { - apply(eval, pop_3); - pop_3.sort(); - cout << "Initial Population 3\n" << pop_3 << endl; - } - - //Topolgy - RingTopology ring,topology; - - eoPeriodicContinue< Problem > mig_conti_1( param.manGeneration ); - eoContinuator mig_cont_1(mig_conti_1,pop_1); - eoRandomSelect mig_select_one_1; - eoSelector > mig_select_1 (mig_select_one_1,param.nbMigrants,pop_1); - eoPlusReplacement replace_one_1; - eoReplace > mig_replace_1 (replace_one_1,pop_1); - peoAsyncIslandMig< eoPop< Problem >, eoPop< Problem > > mig_1 (mig_cont_1,mig_select_1,mig_replace_1,topology); - checkpoint_1.add( mig_1 ); - - eoPeriodicContinue< Problem > mig_conti_2( param.manGeneration ); - eoContinuator mig_cont_2(mig_conti_2,pop_2); - eoRandomSelect mig_select_one_2; - eoSelector > mig_select_2 (mig_select_one_2,param.nbMigrants,pop_2); - eoPlusReplacement replace_one_2; - eoReplace > mig_replace_2 (replace_one_2,pop_2); - peoAsyncIslandMig< eoPop< Problem >, eoPop< Problem > > mig_2 (mig_cont_2,mig_select_2,mig_replace_2,topology); - checkpoint_2.add( mig_2 ); - - eoPeriodicContinue< Problem > mig_conti_3( param.manGeneration ); - eoContinuator mig_cont_3(mig_conti_3,pop_3); - eoRandomSelect mig_select_one_3; - eoSelector > mig_select_3 (mig_select_one_3,param.nbMigrants,pop_3); - eoPlusReplacement replace_one_3; - eoReplace > mig_replace_3 (replace_one_3,pop_3); - peoAsyncIslandMig< eoPop< Problem >, eoPop< Problem > > mig_3 (mig_cont_3,mig_select_3,mig_replace_3,topology); - checkpoint_3.add( mig_3 ); - - peoWrapper parallelEA_1( gga_1, pop_1 ); - mig_1.setOwner( parallelEA_1 ); - - peoWrapper parallelEA_2( gga_2, pop_2 ); - mig_2.setOwner( parallelEA_2 ); - - peoWrapper parallelEA_3( gga_3, pop_3 ); - mig_3.setOwner( parallelEA_3 ); - - peo :: run( ); - peo :: finalize( ); - endDebugging(); - // Print (sorted) intial population - - if (getNodeRank()==1) - { - pop_1.sort(); - cout << "FINAL Population 1\n" << pop_1 << endl; - cout << "Best solution found\t" << pop_1[0].fitness() << endl; - } - - if (getNodeRank()==2) - { - pop_2.sort(); - cout << "FINAL Population 2\n" << pop_2 << endl; - cout << "Best solution found\t" << pop_2[0].fitness() << endl; - } - - if (getNodeRank()==3) - { - pop_3.sort(); - cout << "FINAL Population 3\n" << pop_3 << endl; - cout << "Best solution found\t" << pop_3[0].fitness() << endl; - } - - if (getNodeRank()==0) - { - cout << "\nInstance size = " << n << endl; - cout << "Best known value in the litterature = " << bkv <<"\n"<< endl; - } - // GENERAL - - -} - -// A main that catches the exceptions - -int main(int argc, char **argv) -{ - - try - { - main_function(argc, argv); - - } - catch(exception& e) - { - cout << "Exception: " << e.what() << '\n'; - } - - - // desallocate memory - for (int i=0; i - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -struct parameters -{ - unsigned seed ; - int popSize; - int tSize; - string inst; - string loadName; - string schema; - double pCross; - double pMut; - int minGen; - int maxGen; - int nbMigrants; - int manGeneration; -}; diff --git a/trunk/paradiseo-peo/tutorial/Lesson5/qapPackUnpack.h b/trunk/paradiseo-peo/tutorial/Lesson5/qapPackUnpack.h deleted file mode 100644 index 09277e36c..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson5/qapPackUnpack.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ -/** - * Since you define your own class, you need to tell ParadisEO how to pack - * and unpack your own data. - * This example show you how we pack and unpack a QAP class. In our case, it is - * just packing and unpacking an array of integers. In your case, it will depend - * on the representation of your class. - */ - -void pack( const Problem& _problem ) -{ - - if ( _problem.invalid() ) - pack( (unsigned int)0 ); - else - { - pack( (unsigned int)1 ); - pack(_problem.fitness()); - } - - for (int i = 0; i < n; i++ ) - { - pack( _problem.solution[i] ); - } -} - -void unpack( Problem& _problem ) -{ - unsigned int validFitness; - - unpack( validFitness ); - if ( validFitness ) - { - double fitnessValue; - unpack( fitnessValue ); - _problem.fitness( fitnessValue ); - } - else - { - _problem.invalidate(); - } - - for (int i = 0; i < n; i++ ) - { - unpack(_problem[i]); - } -} diff --git a/trunk/paradiseo-peo/tutorial/Lesson5/schema.xml b/trunk/paradiseo-peo/tutorial/Lesson5/schema.xml deleted file mode 100644 index 1c3e85c50..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson5/schema.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - 1 - - - 2 - - - 3 - - - - - - diff --git a/trunk/paradiseo-peo/tutorial/Lesson5/utils.h b/trunk/paradiseo-peo/tutorial/Lesson5/utils.h deleted file mode 100755 index b10e1f57e..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson5/utils.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ -#ifndef _UTILS_H -#define _UTILS_H -#include -#include -#include - -using namespace std; - -void parseFile(eoParser & parser, parameters & param) -{ - - // For each parameter, you can in on single line - // define the parameter, read it through the parser, and assign it - - param.seed = parser.createParam(unsigned(time(0)), "seed", "Random number seed", 'S').value(); // will be in default section General - - // init and stop - param.loadName = parser.createParam(string(""), "Load","A save file to restart from",'L', "Persistence" ).value(); - - param.inst = parser.createParam(string(""), "inst","a dat file to read instances from",'i', "Persistence" ).value(); - - param.schema = parser.createParam(string(""), "schema","an xml file mapping process",'s', "Persistence" ).value(); - - param.popSize = parser.createParam(unsigned(15), "popSize", "Population size",'P', "Evolution engine" ).value(); - - param.tSize = parser.createParam(unsigned(2), "tSize", "Tournament size",'T', "Evolution Engine" ).value(); - - param.minGen = parser.createParam(unsigned(100), "minGen", "Minimum number of iterations",'g', "Stopping criterion" ).value(); - - param.maxGen = parser.createParam(unsigned(300), "maxGen", "Maximum number of iterations",'G', "Stopping criterion" ).value(); - - param.pCross = parser.createParam(double(0.6), "pCross", "Probability of Crossover", 'C', "Genetic Operators" ).value(); - - param.pMut = parser.createParam(double(0.1), "pMut", "Probability of Mutation", 'M', "Genetic Operators" ).value(); - - param.nbMigrants = parser.createParam(unsigned(6), "nbMigrants", "Number of migrants",'n', "Migration Policy" ).value(); - - param.manGeneration = parser.createParam(unsigned(5), "manGeneration", "Migration at N generations",'N', "Migration Policy" ).value(); - - // the name of the "status" file where all actual parameter values will be saved - string str_status = parser.ProgramName() + ".status"; // default value - string statusName = parser.createParam(str_status, "status","Status file",'S', "Persistence" ).value(); - - // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED - // i.e. in case you need parameters somewhere else, postpone these - if (parser.userNeedsHelp()) - { - parser.printHelp(cout); - exit(1); - } - if (statusName != "") - { - ofstream os(statusName.c_str()); - os << parser; // and you can use that file as parameter file - } -} - -void loadInstances(const char* filename, int& n, int& bkv, int** & a, int** & b) -{ - - ifstream data_file; - int i, j; - data_file.open(filename); - if (! data_file.is_open()) - { - cout << "\n Error while reading the file " << filename << ". Please check if it exists !" << endl; - exit (1); - } - data_file >> n; - data_file >> bkv; // best known value - // ****************** dynamic memory allocation ****************** / - a = new int* [n]; - b = new int* [n]; - for (i = 0; i < n; i++) - { - a[i] = new int[n]; - b[i] = new int[n]; - } - - // ************** read flows and distanceMatrixs matrices ************** / - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) - data_file >> a[i][j]; - - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) - data_file >> b[i][j]; - - data_file.close(); -} - - - -#endif diff --git a/trunk/paradiseo-peo/tutorial/Lesson6/CMakeLists.txt b/trunk/paradiseo-peo/tutorial/Lesson6/CMakeLists.txt deleted file mode 100644 index 43cd09ef0..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson6/CMakeLists.txt +++ /dev/null @@ -1,80 +0,0 @@ - -###################################################################################### -### 0) Set the compiler and define targets to easily run the lessons -###################################################################################### - -SET (CMAKE_CXX_COMPILER mpicxx) - -#ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson6/param ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson6/schema.xml) - -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson6/param -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson6) -#ADD_CUSTOM_COMMAND( -# TARGET install -# POST_BUILD -# COMMAND ${CMAKE_COMMAND} -# ARGS -E copy_if_different -# ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson6/schema.xml -# ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson6) - -EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson6/param - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson6 - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson6/schema.xml - ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson6 -) - -###################################################################################### - - -###################################################################################### -### 1) Include the sources -###################################################################################### - -INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src ${MOEO_SRC_DIR}/src ${OLDMO_SRC_DIR}/src ${MO_SRC_DIR}/src ${ParadisEO-PEO_SOURCE_DIR}/src) - -###################################################################################### - - -###################################################################################### -### 2) Specify where CMake can find the libraries -###################################################################################### - -LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-PEO_BINARY_DIR}/lib ) - -###################################################################################### - - -###################################################################################### -### 3) Define your target(s): just an executable here -###################################################################################### - -ADD_EXECUTABLE(hybrid main.cpp) - -###################################################################################### - - -###################################################################################### -### 4) Optionnal: define properties -###################################################################################### - -SET(Lesson6_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(hybrid PROPERTIES VERSION "${Lesson6_VERSION}") -###################################################################################### - - -###################################################################################### -### 5) Link the librairies -###################################################################################### - -TARGET_LINK_LIBRARIES(hybrid eo ga es ${XML2_LIBS} peo rmc_mpi eoutils peo) - -###################################################################################### - diff --git a/trunk/paradiseo-peo/tutorial/Lesson6/Move.h b/trunk/paradiseo-peo/tutorial/Lesson6/Move.h deleted file mode 100755 index da6049a80..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson6/Move.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef MOVE_H -#define MOVE_H - -#include - - -class ProblemEval : public eoEvalFunc { -public: - - void operator() (Problem & _problem){ - //cout << "eoEvalFunc()"<< endl; - _problem.fitness(_problem.evaluate()); - - } - -}; - -class Move : public moMove , public std :: pair { -public : - void operator () (Problem & _problem) { - // transformer une solution en une autre connaissant le meilleur mouvement - //cout << "MOVE() " << endl; - int temp = _problem.solution[first]; - _problem.solution[first] = _problem.solution[second]; - _problem.solution[second] = temp; - - -} - -}; - - -class MoveInit : public moMoveInit { -public: - - void operator () (Move & _move, const Problem& _problem) { - //cout << "MoveInit " << endl; - - _move.first = 0; - _move.second = 1; - - - } -}; - - -class MoveNext : public moNextMove { -public: - bool operator() (Move & _move, const Problem & _problem) { - //cout << "MoveNext" << endl; - //cout << _move.first << " , " << _move.second << endl; - - if (_move.first < n-2){ - if (_move.second < n-1){ - - _move.second++; - } - else { - _move.first++; - _move.second = _move.first + 1; - - } - - - return true; - - } - - - return false; - - } -}; - -class MoveIncrEval : public moMoveIncrEval -{ -public: - - int compute_delta(int n, int** a, int** b, - int* p, int i, int j) - { - int d; int k; - d = (a[i][i]-a[j][j])*(b[p[j]][p[j]]-b[p[i]][p[i]]) + - (a[i][j]-a[j][i])*(b[p[j]][p[i]]-b[p[i]][p[j]]); - for (k = 0; k < n; k = k + 1) if (k!=i && k!=j) - d = d + (a[k][i]-a[k][j])*(b[p[k]][p[j]]-b[p[k]][p[i]]) + - (a[i][k]-a[j][k])*(b[p[j]][p[k]]-b[p[i]][p[k]]); - return(d); - } - - - eoMinimizingFitness operator() (const Move & _move, const Problem & _problem){ - - double cost; - cost=0; - - // for calculing delta difference - int* p = new int[n]; - for (int i = 0 ; i < n ; i++) - p[i] = _problem.solution[i]; - - - - cost = _problem.fitness() + compute_delta(n,a,b,p,_move.first, _move.second); - - - - delete[] p; - - return cost; - } - -}; - - - - -class MoveRand : public moRandMove { -public: - - void operator() (Move & _move){ - _move.first = rand()%n; - do{ - _move.second = rand()%n; - - } while (_move.first == _move.second); - } - -}; - - -//for ILS - - -/* -class Perturbation : public eoMonOp { -public: - - bool operator() (Problem & _problem){ - int r1,r2,temp; - int mu = 1 + rand()%n; - for (int k = 1 ; k <= mu; k++){ - - r1 = rand()%n; - - for(;;){ - r2 = rand()%n; - if (r1 != r2) - break; - } - - temp = _problem.solution[r1]; - _problem.solution[r1] = _problem.solution[r2]; - _problem.solution[r2] = temp; - - } - _problem.invalidate(); - - } - - -}; -*/ -#endif diff --git a/trunk/paradiseo-peo/tutorial/Lesson6/QAP.h b/trunk/paradiseo-peo/tutorial/Lesson6/QAP.h deleted file mode 100755 index 5730fa4f6..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson6/QAP.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - - -#ifndef QAP_H -#define QAP_H - -#include - -/* global variables */ -extern int n; // size -extern int** a; // matrix A -extern int** b; // matrix B - -class Problem : public EO { - -public: - - int* solution; - - Problem () { - solution = new int[n]; - create(); - } - - Problem (const Problem & _problem){ // copy constructor - solution = new int[n]; - for (int i = 0; i < n ; i++){ - solution[i] = _problem.solution[i]; - } - if (!_problem.invalid()) // if the solution has already been evaluated - fitness(_problem.fitness()); // copy the fitness - } - - ~Problem(){ // destructor - delete[] solution; - } - - void operator= (const Problem & _problem){ // copy assignment operator - for (int i = 0; i < n ; i++){ - solution[i] = _problem.solution[i]; - } - fitness(_problem.fitness()); // copy the fitness - } - - int& operator[] (unsigned i) - { - return solution[i]; - } - - - void create(){ // create and initialize a solution - int random, temp; - for (int i=0; i< n; i++) - solution[i]=i; - - // we want a random permutation so we shuffle - for (int i = 0; i < n; i++){ - random = rand()%(n-i) + i; - temp = solution[i]; - solution[i] = solution[random]; - solution[random] = temp; - } - } - - int evaluate() { // evaluate the solution - int cost=0; - for (int i=0; i - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#ifndef _QAPGA_h -#define _QAPGA_h - -class ProblemInit : public eoInit -{ -public: - - void operator()(Problem & _problem) - { - _problem.create(); - } -}; - -class ProblemEvalFunc : public eoEvalFunc -{ -public: - - void operator()(Problem & _problem) - { - _problem.fitness(_problem.evaluate()); - - } -}; - -class ProblemXover : public eoQuadOp { -public: - - /* The two parameters in input are the parents. - The first parameter is also the output ie the child - */ - bool operator()(Problem & _problem1, Problem & _problem2) - { - int i; - int random, temp; - int unassigned_positions[n]; - int remaining_items[n]; - int j = 0; - - /* 1) find the items assigned in different positions for the 2 parents */ - for (i = 0 ; i < n ; i++){ - if (_problem1.solution[i] != _problem2.solution[i]){ - unassigned_positions[j] = i; - remaining_items[j] = _problem1.solution[i]; - j++; - } - } - - /* 2) shuffle the remaining items to ensure that remaining items - will be assigned at random positions */ - for (i = 0; i < j; i++){ - random = rand()%(j-i) + i; - temp = remaining_items[i]; - remaining_items[i] = remaining_items[random]; - remaining_items[random] = temp; - } - - /* 3) copy the shuffled remaining items at unassigned positions */ - for (i = 0; i < j ; i++) - _problem1.solution[unassigned_positions[i]] = remaining_items[i]; - - // crossover in our case is always possible - return true; - } -}; - -class ProblemSwapMutation: public eoMonOp { -public: - - bool operator()(Problem& _problem) { - int i,j; - int temp; - - // generate two different indices - i=rand()%n; - do - j = rand()%n; - while (i == j); - - // swap - temp = _problem.solution[i]; - _problem.solution[i] = _problem.solution[j]; - _problem.solution[j] = temp; - - return true; - - } -}; - - - - -#endif diff --git a/trunk/paradiseo-peo/tutorial/Lesson6/main.cpp b/trunk/paradiseo-peo/tutorial/Lesson6/main.cpp deleted file mode 100755 index f44c38b29..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson6/main.cpp +++ /dev/null @@ -1,195 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -#include -#include -#include - -#include -#include - -#include "QAP.h" -#include "Move.h" -#include "QAPGA.h" -#include "qapPackUnpack.h" - -using namespace std; - -/** Set of parameters wrapped into a structure. We pass then the structure - * to a function which parses the parameters file. Doing so helps cleaning - * the code from the parts of reading the inputs. - */ -#include "parserStruct.h" -#include "utils.h" -/** The actual reading and parameters parsing is done inside this class utilities - */ - - -// Global variables -int n; // problem size -int** a; -int** b; // flows and distances matrices - -int bkv; //best known value - -void main_function(int argc, char **argv) -{ - - if (argc < 2){ - cout << "Please give a param file" << endl; - exit(1); - } - - - // Declaration of useful variables to parse the parameters file and then - // put its elements into a structure - eoParser parser(argc, argv); - parameters param; - parseFile(parser, param); - - string s (argv[1]); - - if ( (s.compare("-h") == 0) || (s.compare("--help") == 0 ) ) - ;//make help - - // Reading the a and b matrices of the QAP problem - else - loadInstances(param.inst.c_str(), n, bkv, a, b); - - MoveInit move_init; - - ProblemEval problem_eval; - - MoveNext move_next; - - MoveIncrEval move_incr_eval; - - moBestImprSelect move_select; - - moSimpleMoveTabuList tabulist (param.tabuListSize); - - //moNoAspirCrit aspiration_criterion; - moImprBestFitAspirCrit aspiration_criterion; - - moGenSolContinue continu (param.TSmaxIter); - - moTS tabu_search (move_init, move_next, move_incr_eval, - tabulist, aspiration_criterion, continu, problem_eval ); - - ProblemInit chromInit; - - eoPop pop (param.popSize, chromInit); - eoDetTournamentSelect selectOne(param.tSize); - eoSelectPerc select(selectOne);// by default rate==1 - ProblemXover Xover; // CROSSOVER - ProblemSwapMutation mutationSwap; // MUTATION - eoSGATransform transform(Xover, param.pCross, mutationSwap, param.pMut); - eoPlusReplacement replace; - eoGenContinue genCont(param.maxGen); // generation continuation - - eoEasyEA gga(genCont, problem_eval, select, transform, replace); - // Initialisation of the parallel environment - peo :: init (argc, argv); - - if (getNodeRank()==1) - { - std :: cout << "\nResult before the local search\n"; - //std :: cout << "size\t" << pop.size() << endl; - for (int i=0;i initParallelTS (tabu_search); - peoWrapper parallelTS (initParallelTS, pop); - initParallelTS.setOwner(parallelTS); - peo :: run( ); - peo :: finalize( ); - - if (getNodeRank()==1) - { - cout << "\nInstance size = " << n << endl; - cout << "Best known value in the litterature = " << bkv << endl; - std :: cout << "\nResult after the local search\n"; - // sort and print the population - pop.sort(); - cout << pop; - } - - - - cout << endl; - - -} - -// A main that catches the exceptions - -int main(int argc, char **argv) -{ - - try - { - main_function(argc, argv); - - } - catch(exception& e) - { - cout << "Exception: " << e.what() << '\n'; - } - - - // desallocate memory - for (int i=0; i - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ - -struct parameters -{ - unsigned seed ; - int popSize; - string loadName; - string inst; - string schema; - int TSmaxIter; - int tabuListSize; - int tSize; - double pCross; - double pMut; - int maxGen; - int minGen; -}; diff --git a/trunk/paradiseo-peo/tutorial/Lesson6/qapPackUnpack.h b/trunk/paradiseo-peo/tutorial/Lesson6/qapPackUnpack.h deleted file mode 100644 index 09277e36c..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson6/qapPackUnpack.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ -/** - * Since you define your own class, you need to tell ParadisEO how to pack - * and unpack your own data. - * This example show you how we pack and unpack a QAP class. In our case, it is - * just packing and unpacking an array of integers. In your case, it will depend - * on the representation of your class. - */ - -void pack( const Problem& _problem ) -{ - - if ( _problem.invalid() ) - pack( (unsigned int)0 ); - else - { - pack( (unsigned int)1 ); - pack(_problem.fitness()); - } - - for (int i = 0; i < n; i++ ) - { - pack( _problem.solution[i] ); - } -} - -void unpack( Problem& _problem ) -{ - unsigned int validFitness; - - unpack( validFitness ); - if ( validFitness ) - { - double fitnessValue; - unpack( fitnessValue ); - _problem.fitness( fitnessValue ); - } - else - { - _problem.invalidate(); - } - - for (int i = 0; i < n; i++ ) - { - unpack(_problem[i]); - } -} diff --git a/trunk/paradiseo-peo/tutorial/Lesson6/schema.xml b/trunk/paradiseo-peo/tutorial/Lesson6/schema.xml deleted file mode 100644 index 173e616c6..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson6/schema.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - 1 - - - - - - - - - - diff --git a/trunk/paradiseo-peo/tutorial/Lesson6/utils.h b/trunk/paradiseo-peo/tutorial/Lesson6/utils.h deleted file mode 100755 index a06aa4851..000000000 --- a/trunk/paradiseo-peo/tutorial/Lesson6/utils.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Lille Nord Europe, 2006-2009 - (C) OPAC Team, LIFL, 2002-2009 - - The Van LUONG, (The-Van.Luong@inria.fr) - Mahmoud FATENE, (mahmoud.fatene@inria.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - modify and/ or redistribute the software under the terms of the CeCILL - license as circulated by CEA, CNRS and INRIA at the following URL - "http://www.cecill.info". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - In this respect, the user's attention is drawn to the risks associated - with loading, using, modifying and/or developing or reproducing the - software by the user in light of its specific status of free software, - that may mean that it is complicated to manipulate, and that also - therefore means that it is reserved for developers and experienced - professionals having in-depth computer knowledge. Users are therefore - encouraged to load and test the software's suitability as regards their - requirements in conditions enabling the security of their systems and/or - data to be ensured and, more generally, to use and operate it in the - same conditions as regards security. - The fact that you are presently reading this means that you have had - knowledge of the CeCILL license and that you accept its terms. - - ParadisEO WebSite : http://paradiseo.gforge.inria.fr - Contact: paradiseo-help@lists.gforge.inria.fr -*/ -#ifndef _UTILS_H -#define _UTILS_H -#include -#include -#include - -using namespace std; - -void parseFile(eoParser & parser, parameters & param) -{ - - // For each parameter, you can in on single line - // define the parameter, read it through the parser, and assign it - - param.seed = parser.createParam(unsigned(time(0)), "seed", "Random number seed", 'S').value(); // will be in default section General - - // init and stop - param.popSize = parser.createParam(unsigned(15), "popSize", "Population size",'P', "Evolution engine" ).value(); - - param.loadName = parser.createParam(string(""), "Load","A save file to restart from",'L', "Persistence" ).value(); - param.inst = parser.createParam(string(""), "inst","A data file to read instances from",'i', "Persistence" ).value(); - param.schema = parser.createParam(string(""), "schema","An xml file mapping processes",'s', "Persistence" ).value(); - - param.TSmaxIter = parser.createParam(unsigned(1000), "TSmaxIter", "Maximum number of iterations",'M', "Tabu Search" ).value(); - - param.tabuListSize = parser.createParam(unsigned(10), "tabuListSize", "Tabu List Size",'l', "Tabu Search" ).value(); - - param.tSize = parser.createParam(unsigned(2), "tSize", "Tournament size",'T', "Evolution Engine" ).value(); - - param.minGen = parser.createParam(unsigned(100), "minGen", "Minimum number of iterations",'g', "Stopping criterion" ).value(); - - param.maxGen = parser.createParam(unsigned(300), "maxGen", "Maximum number of iterations",'G', "Stopping criterion" ).value(); - - param.pCross = parser.createParam(double(0.6), "pCross", "Probability of Crossover", 'C', "Genetic Operators" ).value(); - - param.pMut = parser.createParam(double(0.1), "pMut", "Probability of Mutation", 'M', "Genetic Operators" ).value(); - - // the name of the "status" file where all actual parameter values will be saved - string str_status = parser.ProgramName() + ".status"; // default value - string statusName = parser.createParam(str_status, "status","Status file",'S', "Persistence" ).value(); - - // do the following AFTER ALL PARAMETERS HAVE BEEN PROCESSED - // i.e. in case you need parameters somewhere else, postpone these - if (parser.userNeedsHelp()) - { - parser.printHelp(cout); - exit(1); - } - if (statusName != "") - { - ofstream os(statusName.c_str()); - os << parser; // and you can use that file as parameter file - } -} - -void loadInstances(const char* filename, int& n, int& bkv, int** & a, int** & b) -{ - - ifstream data_file; - int i, j; - data_file.open(filename); - if (! data_file.is_open()) - { - cout << "\n Error while reading the file " << filename << ". Please check if it exists !" << endl; - exit (1); - } - data_file >> n; - data_file >> bkv; // best known value - // ****************** dynamic memory allocation ****************** / - a = new int* [n]; - b = new int* [n]; - for (i = 0; i < n; i++) - { - a[i] = new int[n]; - b[i] = new int[n]; - } - - // ************** read flows and distanceMatrixs matrices ************** / - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) - data_file >> a[i][j]; - - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) - data_file >> b[i][j]; - - data_file.close(); -} - - - -#endif diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai100a.dat b/trunk/paradiseo-peo/tutorial/benchs/tai100a.dat deleted file mode 100755 index 7c2a7c238..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai100a.dat +++ /dev/null @@ -1,203 +0,0 @@ - 100 21125314 - - 0 21 95 82 56 41 6 25 10 4 63 6 44 40 75 79 0 89 35 9 1 85 84 12 0 26 91 11 35 82 26 69 56 86 45 91 59 18 76 39 18 57 36 61 36 21 71 11 29 82 82 6 71 8 77 74 30 89 76 76 40 93 56 1 50 4 36 27 85 2 1 15 11 35 11 20 21 61 80 58 21 76 72 44 85 94 90 51 3 48 29 90 66 41 15 83 96 74 45 65 - 21 0 40 54 83 14 71 77 36 53 37 26 87 76 91 13 29 11 77 32 87 67 94 79 2 10 99 56 70 99 60 4 56 2 60 72 74 46 13 20 86 4 77 15 89 48 14 89 44 59 22 57 63 6 0 62 41 62 46 25 75 76 40 66 58 30 68 78 91 13 59 49 85 84 8 38 41 56 39 53 77 50 30 58 55 19 85 52 34 53 40 69 12 85 72 7 49 46 87 58 - 95 40 0 17 68 27 21 6 67 26 82 44 35 3 62 8 51 1 91 39 87 72 45 96 7 87 68 33 3 21 90 45 47 25 30 43 97 33 35 61 42 36 43 7 84 6 0 0 48 62 59 29 94 82 29 3 3 51 67 39 15 66 42 23 62 62 28 76 66 82 98 35 15 17 77 44 26 76 86 60 62 62 83 91 57 62 36 2 2 43 65 37 49 61 5 34 53 96 82 48 - 82 54 17 0 28 31 75 1 95 7 92 69 62 32 97 5 39 50 82 93 71 35 14 20 74 49 50 37 79 19 51 70 42 26 79 98 60 35 9 96 70 21 37 37 67 93 93 39 2 52 26 90 26 1 68 93 7 94 19 54 37 0 20 12 11 66 84 80 1 55 9 21 12 65 7 17 51 84 87 2 27 82 71 71 40 93 27 93 92 34 39 31 26 1 87 72 59 97 46 62 - 56 83 68 28 0 12 91 63 70 1 22 49 24 58 62 49 94 92 63 13 45 22 69 70 18 1 44 32 3 72 99 34 45 18 96 82 79 75 83 43 26 81 39 66 22 71 58 42 91 56 27 56 28 64 98 69 69 93 35 41 67 12 33 1 71 72 26 86 67 67 24 10 46 56 56 69 53 48 74 43 94 29 64 97 38 12 99 51 87 76 71 47 47 9 71 20 81 99 45 56 - 41 14 27 31 12 0 15 99 64 57 84 83 61 25 41 8 46 52 22 33 68 52 28 75 99 6 85 65 47 90 24 79 70 28 19 87 80 4 21 34 12 20 67 24 94 10 64 52 92 49 68 65 66 28 81 17 58 99 90 70 17 57 37 2 37 3 43 20 68 35 60 23 48 40 10 42 83 82 27 49 15 34 50 42 26 33 23 16 69 97 13 35 80 40 55 30 22 76 55 56 - 6 71 21 75 91 15 0 91 74 82 96 2 13 4 4 35 48 29 42 56 3 30 60 81 37 42 3 17 25 37 26 88 95 55 53 62 22 44 86 43 43 40 36 53 34 59 43 50 58 62 43 9 22 64 46 68 53 8 30 30 92 6 13 95 76 81 91 37 78 90 64 49 46 19 60 93 35 47 69 54 87 12 39 33 54 12 10 4 88 54 46 82 84 8 29 10 92 62 62 74 - 25 77 6 1 63 99 91 0 48 22 85 23 3 30 12 98 69 29 61 34 53 98 94 33 77 31 54 71 78 8 78 50 76 56 80 72 26 20 57 39 68 55 71 19 32 87 41 94 21 21 20 61 13 5 46 97 61 8 92 33 73 0 16 73 74 44 55 96 67 94 83 28 22 78 55 89 11 99 84 56 30 90 87 80 20 66 59 93 79 80 28 68 99 54 69 99 1 49 63 23 - 10 36 67 95 70 64 74 48 0 33 99 40 29 60 95 28 44 30 88 66 9 41 3 4 63 61 87 34 28 55 63 10 78 17 90 0 66 62 30 76 0 91 62 73 38 49 85 86 88 13 71 46 75 98 53 52 10 84 70 44 8 52 59 48 85 29 94 79 4 85 31 54 95 75 81 11 56 38 95 37 67 54 88 93 53 44 68 58 98 55 84 76 19 46 89 89 5 23 63 19 - 4 53 26 7 1 57 82 22 33 0 53 20 47 17 66 60 86 14 52 27 77 5 37 27 53 88 84 63 1 26 18 85 59 24 64 81 12 72 32 64 18 79 23 56 63 2 78 3 32 3 2 18 89 50 69 66 20 97 52 81 42 28 71 71 53 87 31 36 99 98 38 97 26 31 60 83 43 16 91 96 52 48 12 17 13 35 7 96 17 59 26 30 43 53 26 37 93 35 49 33 - 63 37 82 92 22 84 96 85 99 53 0 87 55 48 63 81 55 12 28 79 62 63 11 56 0 10 34 1 75 62 33 68 51 53 80 84 40 3 32 27 32 61 27 92 25 2 15 9 30 0 97 24 14 10 84 56 83 0 16 67 2 5 98 73 47 81 88 39 46 13 9 89 96 30 66 37 2 0 1 8 84 99 7 62 58 49 93 47 53 34 39 8 86 18 52 4 95 3 80 9 - 6 26 44 69 49 83 2 23 40 20 87 0 3 5 26 36 92 8 94 75 8 64 73 47 68 78 8 40 6 31 85 47 96 5 98 44 86 0 93 53 16 87 94 23 61 80 35 17 45 51 26 54 59 57 25 99 87 34 79 24 41 29 7 26 71 36 18 57 16 28 1 24 68 56 81 1 54 22 67 44 6 46 30 0 86 73 15 81 68 36 12 65 18 59 93 34 92 82 69 3 - 44 87 35 62 24 61 13 3 29 47 55 3 0 24 94 53 66 98 6 98 30 31 41 74 23 56 15 63 91 67 10 63 5 20 27 20 15 75 56 89 93 60 37 44 41 76 25 6 62 60 51 57 79 34 41 82 95 15 94 12 90 49 82 56 75 39 48 84 15 45 93 74 87 39 10 81 54 80 88 13 62 11 65 72 18 81 55 82 20 33 20 77 99 5 70 31 33 52 47 55 - 40 76 3 32 58 25 4 30 60 17 48 5 24 0 29 74 7 30 64 45 13 7 96 98 47 0 60 94 53 6 97 20 94 42 4 30 25 64 12 44 74 96 54 44 32 74 5 84 4 44 64 68 38 35 29 11 39 69 85 79 60 83 12 5 55 9 49 88 61 92 23 54 81 58 29 27 80 10 78 55 72 49 31 63 37 68 36 5 74 74 57 65 82 51 27 28 85 5 73 48 - 75 91 62 97 62 41 4 12 95 66 63 26 94 29 0 23 44 0 39 53 80 33 43 99 80 98 61 46 15 4 33 66 6 77 84 82 33 12 24 91 45 83 85 44 45 51 78 88 31 3 42 34 46 71 12 80 15 81 21 54 1 72 84 9 35 21 64 8 66 94 50 37 42 40 6 30 12 34 27 29 33 82 54 75 75 54 19 67 42 63 79 10 79 93 87 13 21 48 40 63 - 79 13 8 5 49 8 35 98 28 60 81 36 53 74 23 0 97 32 73 94 16 2 30 89 9 89 0 90 9 2 79 37 54 71 49 19 9 29 53 17 79 33 12 6 9 18 80 29 45 9 81 2 97 39 92 76 21 69 1 24 22 28 47 80 22 18 89 97 52 13 99 66 27 67 89 64 80 50 34 46 18 52 31 52 22 28 21 91 9 49 75 37 35 47 47 61 80 34 75 98 - 0 29 51 39 94 46 48 69 44 86 55 92 66 7 44 97 0 11 10 49 1 47 85 13 41 22 65 61 42 33 77 91 12 91 56 35 45 31 45 25 58 7 86 58 24 6 37 69 57 6 50 87 63 85 35 20 72 91 86 11 22 84 57 73 6 1 19 72 79 70 22 19 5 94 2 72 38 95 93 24 17 85 89 99 17 85 78 14 63 11 97 6 94 61 32 9 39 56 76 48 - 89 11 1 50 92 52 29 29 30 14 12 8 98 30 0 32 11 0 9 93 47 40 55 3 55 81 58 29 44 33 30 48 3 80 43 88 43 17 27 56 4 86 32 76 6 41 55 32 41 20 61 75 46 60 10 38 99 62 70 30 49 3 22 17 26 2 29 62 69 28 61 33 21 55 27 73 89 88 42 26 1 22 41 66 1 88 78 68 30 9 60 44 24 42 35 90 0 13 71 61 - 35 77 91 82 63 22 42 61 88 52 28 94 6 64 39 73 10 9 0 67 68 65 78 33 92 21 34 27 9 26 79 33 1 22 2 10 27 38 25 59 44 28 72 91 32 30 55 30 3 57 9 34 94 18 7 17 85 28 38 40 29 91 81 85 74 18 19 69 69 43 64 29 32 33 25 70 76 31 89 56 49 29 2 26 84 34 64 67 33 59 89 45 63 45 75 76 52 40 44 32 - 9 32 39 93 13 33 56 34 66 27 79 75 98 45 53 94 49 93 67 0 10 6 35 25 75 56 78 92 4 92 98 29 9 79 98 86 40 18 53 12 48 71 15 87 79 94 1 97 40 31 87 97 57 26 41 21 51 38 82 68 68 12 48 2 66 17 49 90 31 39 61 73 6 19 45 13 21 32 56 26 79 71 7 70 35 96 47 30 32 23 35 39 56 80 28 78 62 81 80 13 - 1 87 87 71 45 68 3 53 9 77 62 8 30 13 80 16 1 47 68 10 0 85 26 5 62 3 26 46 91 49 27 73 21 58 3 21 27 57 83 30 60 94 44 97 94 66 5 36 21 99 83 28 2 26 60 34 76 64 87 53 98 76 40 70 43 41 79 88 14 49 72 89 52 55 12 7 31 31 98 45 59 22 87 6 36 26 85 6 33 35 48 59 88 25 58 76 98 28 46 79 - 85 67 72 35 22 52 30 98 41 5 63 64 31 7 33 2 47 40 65 6 85 0 25 18 48 95 78 77 90 23 9 85 55 54 66 11 57 69 81 99 83 16 40 23 10 67 58 30 4 4 39 58 31 92 11 53 97 56 53 64 77 51 36 52 18 53 86 40 55 78 74 23 2 8 7 88 72 27 21 50 1 48 81 93 96 43 12 60 10 36 91 83 66 3 17 24 27 95 51 84 - 84 94 45 14 69 28 60 94 3 37 11 73 41 96 43 30 85 55 78 35 26 25 0 18 5 90 69 61 57 4 75 3 37 27 3 80 24 14 91 48 55 9 62 70 76 99 57 83 84 64 74 13 17 47 96 86 14 84 7 30 95 79 8 91 76 25 42 66 70 91 67 2 98 3 71 61 74 87 12 10 40 42 93 69 79 12 23 72 37 81 82 87 25 5 89 67 70 30 89 29 - 12 79 96 20 70 75 81 33 4 27 56 47 74 98 99 89 13 3 33 25 5 18 18 0 68 20 78 45 99 9 16 22 83 46 86 17 66 45 3 13 3 19 88 49 84 57 93 76 49 29 25 36 24 95 48 11 58 17 45 19 52 44 92 75 95 32 9 44 1 62 62 82 28 28 94 19 41 80 94 35 7 41 65 3 70 29 13 31 50 30 26 98 38 84 65 11 58 44 48 15 - 0 2 7 74 18 99 37 77 63 53 0 68 23 47 80 9 41 55 92 75 62 48 5 68 0 48 3 92 92 71 44 4 98 93 16 78 10 15 88 81 92 45 61 38 28 94 86 22 0 55 91 67 91 3 60 38 24 90 93 12 65 25 33 46 98 91 10 46 49 77 4 13 46 80 45 25 67 3 14 93 54 20 19 5 17 75 24 15 77 27 23 15 77 36 15 31 46 21 81 27 - 26 10 87 49 1 6 42 31 61 88 10 78 56 0 98 89 22 81 21 56 3 95 90 20 48 0 70 89 54 96 62 46 60 18 97 12 6 43 6 73 14 66 69 97 32 97 63 72 27 3 86 77 94 8 56 28 79 54 73 65 85 25 38 76 24 38 4 91 28 21 27 38 30 45 17 93 57 85 57 97 9 78 93 1 87 16 17 9 50 7 25 13 20 14 9 85 46 41 17 35 - 91 99 68 50 44 85 3 54 87 84 34 8 15 60 61 0 65 58 34 78 26 78 69 78 3 70 0 1 44 89 5 2 0 42 81 57 75 58 10 1 35 29 88 9 87 21 30 8 42 91 26 2 74 99 63 83 70 84 83 12 84 45 19 32 74 41 32 70 32 48 41 99 6 53 8 73 29 75 84 58 26 79 73 91 85 21 26 17 90 13 62 54 87 28 70 81 95 11 98 56 - 11 56 33 37 32 65 17 71 34 63 1 40 63 94 46 90 61 29 27 92 46 77 61 45 92 89 1 0 46 69 17 47 96 14 18 57 44 25 29 97 27 86 68 22 74 21 30 66 48 73 17 45 13 91 81 66 7 89 55 71 60 33 89 31 46 60 17 15 84 98 12 67 56 23 24 70 46 65 28 63 80 81 29 10 58 92 20 5 26 19 69 22 90 1 67 80 75 20 32 30 - 35 70 3 79 3 47 25 78 28 1 75 6 91 53 15 9 42 44 9 4 91 90 57 99 92 54 44 46 0 21 46 25 89 22 98 78 50 90 81 17 39 58 49 51 26 96 28 22 54 83 93 21 79 44 22 62 95 39 50 99 19 82 84 85 76 85 31 44 48 1 30 40 91 44 40 14 17 48 62 95 69 2 80 40 20 64 99 47 64 4 91 55 80 59 47 25 60 37 17 5 - 82 99 21 19 72 90 37 8 55 26 62 31 67 6 4 2 33 33 26 92 49 23 4 9 71 96 89 69 21 0 21 31 21 21 3 87 72 25 15 35 56 91 15 69 54 72 69 21 2 91 43 24 35 98 4 96 54 67 79 51 53 36 27 75 81 97 44 21 31 50 91 13 69 80 16 74 72 84 18 85 11 97 74 85 76 25 23 77 18 32 32 81 75 23 24 51 63 12 39 61 - 26 60 90 51 99 24 26 78 63 18 33 85 10 97 33 79 77 30 79 98 27 9 75 16 44 62 5 17 46 21 0 98 0 16 73 18 1 2 69 18 91 92 63 53 52 23 79 97 5 66 86 3 86 99 13 1 30 69 75 87 67 62 59 29 65 12 57 76 77 5 55 59 92 13 72 71 28 72 4 75 41 68 96 1 89 0 78 21 21 87 38 21 50 28 19 14 31 80 9 5 - 69 4 45 70 34 79 88 50 10 85 68 47 63 20 66 37 91 48 33 29 73 85 3 22 4 46 2 47 25 31 98 0 90 58 90 24 96 62 71 12 52 30 29 69 90 69 48 10 94 57 3 20 87 17 37 69 96 57 76 64 60 99 97 88 29 73 81 72 19 22 0 44 48 8 63 38 46 51 77 53 44 73 51 24 56 56 57 63 87 58 66 71 10 73 18 92 86 77 23 62 - 56 56 47 42 45 70 95 76 78 59 51 96 5 94 6 54 12 3 1 9 21 55 37 83 98 60 0 96 89 21 0 90 0 41 26 94 68 79 52 96 15 84 18 81 45 78 84 93 25 31 95 71 70 47 27 17 40 71 10 82 88 87 65 96 68 54 24 15 26 42 29 23 36 92 47 61 89 63 2 6 26 32 26 48 17 28 67 15 59 62 96 50 53 84 41 24 32 64 8 43 - 86 2 25 26 18 28 55 56 17 24 53 5 20 42 77 71 91 80 22 79 58 54 27 46 93 18 42 14 22 21 16 58 41 0 46 2 10 46 50 25 36 22 12 22 92 92 66 51 51 57 55 39 16 79 77 64 57 33 90 78 66 84 70 81 23 86 70 88 52 27 19 71 69 49 46 11 92 13 32 51 54 44 77 84 78 78 56 49 77 72 92 99 93 81 67 94 44 32 37 31 - 45 60 30 79 96 19 53 80 90 64 80 98 27 4 84 49 56 43 2 98 3 66 3 86 16 97 81 18 98 3 73 90 26 46 0 72 98 80 3 37 50 35 31 37 42 49 15 20 41 35 74 26 89 5 67 17 17 67 8 84 80 91 58 4 47 82 23 87 90 31 71 80 22 33 54 75 61 72 73 52 88 49 37 37 62 74 10 36 42 89 88 48 4 47 15 35 5 37 8 60 - 91 72 43 98 82 87 62 72 0 81 84 44 20 30 82 19 35 88 10 86 21 11 80 17 78 12 57 57 78 87 18 24 94 2 72 0 65 63 96 64 76 85 30 23 64 96 23 49 74 73 35 75 14 16 31 8 16 80 74 42 92 54 64 15 16 42 45 54 25 27 38 0 28 48 23 47 84 58 11 54 17 87 2 53 6 92 1 32 79 90 0 79 59 88 50 13 30 90 70 4 - 59 74 97 60 79 80 22 26 66 12 40 86 15 25 33 9 45 43 27 40 27 57 24 66 10 6 75 44 50 72 1 96 68 10 98 65 0 25 76 39 89 52 52 3 0 28 51 66 1 61 36 13 54 73 42 9 54 82 27 73 9 85 51 3 84 48 5 99 29 69 18 73 61 84 14 92 65 23 83 37 19 0 80 38 87 96 55 99 9 53 48 68 11 92 31 90 94 58 94 78 - 18 46 33 35 75 4 44 20 62 72 3 0 75 64 12 29 31 17 38 18 57 69 14 45 15 43 58 25 90 25 2 62 79 46 80 63 25 0 72 58 3 70 25 94 3 17 49 9 64 19 87 97 16 63 4 16 18 78 57 36 82 57 73 35 56 7 27 54 86 49 2 10 89 11 91 36 74 54 3 33 45 93 45 17 43 8 26 30 63 23 62 14 11 11 67 19 60 91 7 91 - 76 13 35 9 83 21 86 57 30 32 32 93 56 12 24 53 45 27 25 53 83 81 91 3 88 6 10 29 81 15 69 71 52 50 3 96 76 72 0 29 34 40 40 97 25 23 22 13 13 47 31 85 96 26 57 77 77 46 22 13 54 99 22 54 64 51 44 45 42 87 81 50 10 96 89 52 28 85 32 62 74 21 18 10 50 60 22 45 3 33 26 27 57 20 81 55 63 21 26 17 - 39 20 61 96 43 34 43 39 76 64 27 53 89 44 91 17 25 56 59 12 30 99 48 13 81 73 1 97 17 35 18 12 96 25 37 64 39 58 29 0 67 90 85 76 20 19 39 36 17 85 22 20 80 15 55 32 32 20 23 75 8 3 5 41 71 50 1 55 99 83 8 41 30 16 20 85 12 66 43 82 64 51 3 95 13 54 71 64 7 62 20 49 22 20 24 83 86 92 58 8 - 18 86 42 70 26 12 43 68 0 18 32 16 93 74 45 79 58 4 44 48 60 83 55 3 92 14 35 27 39 56 91 52 15 36 50 76 89 3 34 67 0 9 66 95 83 42 26 88 93 65 85 87 87 75 33 40 80 93 53 74 37 1 27 55 32 49 15 6 88 38 10 71 99 23 89 0 6 16 75 81 46 15 84 17 71 49 15 14 58 8 30 8 14 90 64 2 48 66 87 45 - 57 4 36 21 81 20 40 55 91 79 61 87 60 96 83 33 7 86 28 71 94 16 9 19 45 66 29 86 58 91 92 30 84 22 35 85 52 70 40 90 9 0 28 89 7 20 5 43 0 63 46 19 72 45 33 36 14 2 82 55 77 1 24 61 71 91 87 31 70 19 11 88 56 47 86 88 35 60 21 18 96 57 75 31 19 19 3 53 10 4 51 77 21 70 2 26 37 17 41 28 - 36 77 43 37 39 67 36 71 62 23 27 94 37 54 85 12 86 32 72 15 44 40 62 88 61 69 88 68 49 15 63 29 18 12 31 30 52 25 40 85 66 28 0 44 20 26 11 82 43 76 85 64 54 18 72 84 26 28 3 65 21 69 21 50 56 28 70 51 47 18 54 88 94 37 18 83 64 21 2 35 58 83 22 89 3 10 81 0 61 25 91 9 60 56 13 40 5 49 69 79 - 61 15 7 37 66 24 53 19 73 56 92 23 44 44 44 6 58 76 91 87 97 23 70 49 38 97 9 22 51 69 53 69 81 22 37 23 3 94 97 76 95 89 44 0 19 45 87 94 77 16 71 19 22 85 24 71 5 75 17 95 6 41 49 72 91 36 87 67 39 20 0 95 50 48 79 69 7 48 86 94 9 96 7 4 84 70 44 51 58 94 92 70 26 98 23 23 23 26 15 54 - 36 89 84 67 22 94 34 32 38 63 25 61 41 32 45 9 24 6 32 79 94 10 76 84 28 32 87 74 26 54 52 90 45 92 42 64 0 3 25 20 83 7 20 19 0 50 77 81 1 39 57 94 21 20 93 71 36 27 55 88 36 21 77 68 4 51 98 16 73 94 65 45 14 95 17 74 57 7 30 48 12 36 92 78 70 25 22 29 18 35 26 79 30 60 71 75 68 94 34 67 - 21 48 6 93 71 10 59 87 49 2 2 80 76 74 51 18 6 41 30 94 66 67 99 57 94 97 21 21 96 72 23 69 78 92 49 96 28 17 23 19 42 20 26 45 50 0 47 85 77 72 62 93 37 74 40 14 56 86 51 54 83 50 36 21 55 95 6 71 12 88 16 3 22 85 88 64 18 52 1 54 20 1 40 95 43 16 12 1 34 69 66 15 67 50 58 25 61 59 36 61 - 71 14 0 93 58 64 43 41 85 78 15 35 25 5 78 80 37 55 55 1 5 58 57 93 86 63 30 30 28 69 79 48 84 66 15 23 51 49 22 39 26 5 11 87 77 47 0 7 25 96 2 66 12 68 45 42 70 19 64 2 56 77 83 10 96 73 78 3 39 56 45 30 44 65 4 5 96 8 96 10 51 16 57 67 35 78 47 56 56 63 61 5 86 97 55 51 36 94 3 14 - 11 89 0 39 42 52 50 94 86 3 9 17 6 84 88 29 69 32 30 97 36 30 83 76 22 72 8 66 22 21 97 10 93 51 20 49 66 9 13 36 88 43 82 94 81 85 7 0 83 33 96 76 64 93 19 29 56 20 0 56 18 14 4 72 33 22 82 52 3 23 78 51 26 80 57 85 84 76 4 59 74 6 57 71 23 81 45 70 64 79 86 23 91 33 79 66 97 83 94 92 - 29 44 48 2 91 92 58 21 88 32 30 45 62 4 31 45 57 41 3 40 21 4 84 49 0 27 42 48 54 2 5 94 25 51 41 74 1 64 13 17 93 0 43 77 1 77 25 83 0 89 3 47 12 49 27 19 47 91 46 47 96 82 97 69 99 84 30 12 13 63 87 40 72 89 52 8 18 81 24 83 40 65 2 47 32 29 24 98 90 34 66 66 69 96 78 25 45 55 52 5 - 82 59 62 52 56 49 62 21 13 3 0 51 60 44 3 9 6 20 57 31 99 4 64 29 55 3 91 73 83 91 66 57 31 57 35 73 61 19 47 85 65 63 76 16 39 72 96 33 89 0 69 31 96 4 73 59 59 53 46 43 63 26 8 80 65 62 82 95 56 59 94 82 2 88 43 95 24 71 10 60 17 77 52 74 58 63 47 17 97 10 13 98 11 8 56 0 47 41 29 4 - 82 22 59 26 27 68 43 20 71 2 97 26 51 64 42 81 50 61 9 87 83 39 74 25 91 86 26 17 93 43 86 3 95 55 74 35 36 87 31 22 85 46 85 71 57 62 2 96 3 69 0 49 94 16 97 59 24 40 78 31 2 56 83 54 97 33 7 28 26 60 11 28 46 54 48 86 91 37 63 14 13 27 57 31 49 49 74 81 27 74 51 23 48 85 66 57 23 23 81 6 - 6 57 29 90 56 65 9 61 46 18 24 54 57 68 34 2 87 75 34 97 28 58 13 36 67 77 2 45 21 24 3 20 71 39 26 75 13 97 85 20 87 19 64 19 94 93 66 76 47 31 49 0 17 71 36 51 60 0 48 64 18 18 30 52 92 28 35 49 42 23 39 44 91 72 27 36 27 98 9 97 44 20 22 17 50 55 30 47 94 35 93 37 65 78 76 98 91 43 44 99 - 71 63 94 26 28 66 22 13 75 89 14 59 79 38 46 97 63 46 94 57 2 31 17 24 91 94 74 13 79 35 86 87 70 16 89 14 54 16 96 80 87 72 54 22 21 37 12 64 12 96 94 17 0 8 36 68 21 77 32 7 58 79 82 63 78 12 25 43 51 99 41 47 17 91 42 25 84 29 9 49 93 10 28 93 14 80 42 26 91 43 84 89 92 96 30 45 21 57 8 28 - 8 6 82 1 64 28 64 5 98 50 10 57 34 35 71 39 85 60 18 26 26 92 47 95 3 8 99 91 44 98 99 17 47 79 5 16 73 63 26 15 75 45 18 85 20 74 68 93 49 4 16 71 8 0 30 31 80 10 60 26 54 96 97 56 53 86 85 0 84 72 94 61 26 88 11 66 44 34 90 12 76 74 92 15 54 93 42 64 7 74 76 43 68 44 0 18 86 85 91 20 - 77 0 29 68 98 81 46 46 53 69 84 25 41 29 12 92 35 10 7 41 60 11 96 48 60 56 63 81 22 4 13 37 27 77 67 31 42 4 57 55 33 33 72 24 93 40 45 19 27 73 97 36 36 30 0 21 44 78 4 61 98 63 48 99 54 41 55 72 56 41 3 31 57 75 72 35 83 83 53 85 88 49 45 21 43 63 17 98 49 50 7 47 44 15 57 59 98 9 83 24 - 74 62 3 93 69 17 68 97 52 66 56 99 82 11 80 76 20 38 17 21 34 53 86 11 38 28 83 66 62 96 1 69 17 64 17 8 9 16 77 32 40 36 84 71 71 14 42 29 19 59 59 51 68 31 21 0 23 47 30 16 28 71 11 70 93 37 9 27 93 62 54 45 29 41 73 82 32 18 38 20 52 89 26 42 55 14 58 68 71 73 64 79 97 1 60 71 52 95 41 75 - 30 41 3 7 69 58 53 61 10 20 83 87 95 39 15 21 72 99 85 51 76 97 14 58 24 79 70 7 95 54 30 96 40 57 17 16 54 18 77 32 80 14 26 5 36 56 70 56 47 59 24 60 21 80 44 23 0 44 57 88 53 84 61 91 13 95 89 3 94 1 97 68 20 33 51 98 7 85 86 72 3 39 98 11 58 44 45 1 41 27 83 28 20 80 70 3 59 34 55 53 - 89 62 51 94 93 99 8 8 84 97 0 34 15 69 81 69 91 62 28 38 64 56 84 17 90 54 84 89 39 67 69 57 71 33 67 80 82 78 46 20 93 2 28 75 27 86 19 20 91 53 40 0 77 10 78 47 44 0 96 36 36 63 99 69 70 53 20 9 30 80 18 4 17 17 71 90 93 14 48 52 6 78 56 40 74 98 93 32 75 68 32 60 82 24 99 3 97 23 49 54 - 76 46 67 19 35 90 30 92 70 52 16 79 94 85 21 1 86 70 38 82 87 53 7 45 93 73 83 55 50 79 75 76 10 90 8 74 27 57 22 23 53 82 3 17 55 51 64 0 46 46 78 48 32 60 4 30 57 96 0 91 46 57 17 46 82 6 14 91 73 41 82 20 79 95 46 22 39 95 87 37 23 23 65 62 18 67 65 5 65 58 1 67 82 90 29 62 4 92 53 85 - 76 25 39 54 41 70 30 33 44 81 67 24 12 79 54 24 11 30 40 68 53 64 30 19 12 65 12 71 99 51 87 64 82 78 84 42 73 36 13 75 74 55 65 95 88 54 2 56 47 43 31 64 7 26 61 16 88 36 91 0 81 73 34 74 12 77 34 19 15 48 11 10 80 8 23 75 31 34 66 48 15 25 46 66 76 31 36 7 37 20 2 76 67 4 46 71 66 56 95 49 - 40 75 15 37 67 17 92 73 8 42 2 41 90 60 1 22 22 49 29 68 98 77 95 52 65 85 84 60 19 53 67 60 88 66 80 92 9 82 54 8 37 77 21 6 36 83 56 18 96 63 2 18 58 54 98 28 53 36 46 81 0 47 26 81 55 76 66 35 53 26 51 28 35 68 20 71 60 70 68 27 85 27 40 86 54 16 61 96 58 52 92 63 55 59 35 21 58 78 24 29 - 93 76 66 0 12 57 6 0 52 28 5 29 49 83 72 28 84 3 91 12 76 51 79 44 25 25 45 33 82 36 62 99 87 84 91 54 85 57 99 3 1 1 69 41 21 50 77 14 82 26 56 18 79 96 63 71 84 63 57 73 47 0 38 78 78 57 44 37 76 70 72 85 7 9 84 41 67 19 24 74 22 32 60 20 75 83 25 92 28 39 14 73 65 86 9 26 7 7 97 83 - 56 40 42 20 33 37 13 16 59 71 98 7 82 12 84 47 57 22 81 48 40 36 8 92 33 38 19 89 84 27 59 97 65 70 58 64 51 73 22 5 27 24 21 49 77 36 83 4 97 8 83 30 82 97 48 11 61 99 17 34 26 38 0 56 61 8 94 34 89 61 47 66 76 14 17 53 23 55 96 9 11 96 52 91 77 5 91 13 41 29 85 16 22 60 76 39 85 9 64 14 - 1 66 23 12 1 2 95 73 48 71 73 26 56 5 9 80 73 17 85 2 70 52 91 75 46 76 32 31 85 75 29 88 96 81 4 15 3 35 54 41 55 61 50 72 68 21 10 72 69 80 54 52 63 56 99 70 91 69 46 74 81 78 56 0 55 40 27 93 88 26 77 81 19 75 55 66 64 7 17 55 79 20 93 31 7 44 37 78 25 98 17 25 21 27 67 23 61 89 60 64 - 50 58 62 11 71 37 76 74 85 53 47 71 75 55 35 22 6 26 74 66 43 18 76 95 98 24 74 46 76 81 65 29 68 23 47 16 84 56 64 71 32 71 56 91 4 55 96 33 99 65 97 92 78 53 54 93 13 70 82 12 55 78 61 55 0 38 90 87 0 99 34 8 21 73 14 13 84 75 37 32 28 31 89 11 47 18 97 6 11 43 89 13 33 55 56 21 5 24 54 47 - 4 30 62 66 72 3 81 44 29 87 81 36 39 9 21 18 1 2 18 17 41 53 25 32 91 38 41 60 85 97 12 73 54 86 82 42 48 7 51 50 49 91 28 36 51 95 73 22 84 62 33 28 12 86 41 37 95 53 6 77 76 57 8 40 38 0 57 78 4 50 83 70 20 71 57 35 49 31 86 28 30 92 49 83 89 44 37 62 45 22 85 38 98 56 67 84 77 67 53 46 - 36 68 28 84 26 43 91 55 94 31 88 18 48 49 64 89 19 29 19 49 79 86 42 9 10 4 32 17 31 44 57 81 24 70 23 45 5 27 44 1 15 87 70 87 98 6 78 82 30 82 7 35 25 85 55 9 89 20 14 34 66 44 94 27 90 57 0 24 51 96 1 87 32 26 48 78 82 65 80 12 63 77 16 77 82 3 72 93 67 24 66 80 42 92 20 32 13 29 58 83 - 27 78 76 80 86 20 37 96 79 36 39 57 84 88 8 97 72 62 69 90 88 40 66 44 46 91 70 15 44 21 76 72 15 88 87 54 99 54 45 55 6 31 51 67 16 71 3 52 12 95 28 49 43 0 72 27 3 9 91 19 35 37 34 93 87 78 24 0 85 85 70 34 1 76 45 72 69 46 2 56 70 77 33 48 59 81 59 70 76 9 65 18 76 86 20 75 96 2 49 57 - 85 91 66 1 67 68 78 67 4 99 46 16 15 61 66 52 79 69 69 31 14 55 70 1 49 28 32 84 48 31 77 19 26 52 90 25 29 86 42 99 88 70 47 39 73 12 39 3 13 56 26 42 51 84 56 93 94 30 73 15 53 76 89 88 0 4 51 85 0 66 84 98 55 70 31 30 63 10 8 31 58 98 95 24 3 44 60 87 30 0 96 21 95 72 77 29 88 13 22 93 - 2 13 82 55 67 35 90 94 85 98 13 28 45 92 94 13 70 28 43 39 49 78 91 62 77 21 48 98 1 50 5 22 42 27 31 27 69 49 87 83 38 19 18 20 94 88 56 23 63 59 60 23 99 72 41 62 1 80 41 48 26 70 61 26 99 50 96 85 66 0 48 9 6 14 91 4 42 29 79 39 33 76 81 10 10 53 18 99 61 88 93 33 71 42 64 39 79 8 25 71 - 1 59 98 9 24 60 64 83 31 38 9 1 93 23 50 99 22 61 64 61 72 74 67 62 4 27 41 12 30 91 55 0 29 19 71 38 18 2 81 8 10 11 54 0 65 16 45 78 87 94 11 39 41 94 3 54 97 18 82 11 51 72 47 77 34 83 1 70 84 48 0 29 35 47 57 95 93 79 88 77 94 38 73 46 16 29 62 77 43 98 47 13 44 24 98 29 90 92 34 12 - 15 49 35 21 10 23 49 28 54 97 89 24 74 54 37 66 19 33 29 73 89 23 2 82 13 38 99 67 40 13 59 44 23 71 80 0 73 10 50 41 71 88 88 95 45 3 30 51 40 82 28 44 47 61 31 45 68 4 20 10 28 85 66 81 8 70 87 34 98 9 29 0 75 54 80 67 2 92 54 67 24 76 37 98 96 20 14 35 65 97 27 24 60 23 97 60 75 92 73 20 - 11 85 15 12 46 48 46 22 95 26 96 68 87 81 42 27 5 21 32 6 52 2 98 28 46 30 6 56 91 69 92 48 36 69 22 28 61 89 10 30 99 56 94 50 14 22 44 26 72 2 46 91 17 26 57 29 20 17 79 80 35 7 76 19 21 20 32 1 55 6 35 75 0 28 2 96 51 25 44 55 30 64 37 44 46 66 30 48 26 81 50 90 63 85 35 69 66 81 17 81 - 35 84 17 65 56 40 19 78 75 31 30 56 39 58 40 67 94 55 33 19 55 8 3 28 80 45 53 23 44 80 13 8 92 49 33 48 84 11 96 16 23 47 37 48 95 85 65 80 89 88 54 72 91 88 75 41 33 17 95 8 68 9 14 75 73 71 26 76 70 14 47 54 28 0 72 71 90 59 82 21 88 34 48 78 69 76 1 13 2 21 25 44 0 3 15 54 42 87 35 76 - 11 8 77 7 56 10 60 55 81 60 66 81 10 29 6 89 2 27 25 45 12 7 71 94 45 17 8 24 40 16 72 63 47 46 54 23 14 91 89 20 89 86 18 79 17 88 4 57 52 43 48 27 42 11 72 73 51 71 46 23 20 84 17 55 14 57 48 45 31 91 57 80 2 72 0 98 78 81 48 25 81 27 83 59 98 13 32 95 30 12 67 18 57 65 12 63 26 95 53 94 - 20 38 44 17 69 42 93 89 11 83 37 1 81 27 30 64 72 73 70 13 7 88 61 19 25 93 73 70 14 74 71 38 61 11 75 47 92 36 52 85 0 88 83 69 74 64 5 85 8 95 86 36 25 66 35 82 98 90 22 75 71 41 53 66 13 35 78 72 30 4 95 67 96 71 98 0 26 93 48 63 64 33 9 56 50 97 52 46 15 50 96 85 60 76 29 90 42 87 36 42 - 21 41 26 51 53 83 35 11 56 43 2 54 54 80 12 80 38 89 76 21 31 72 74 41 67 57 29 46 17 72 28 46 89 92 61 84 65 74 28 12 6 35 64 7 57 18 96 84 18 24 91 27 84 44 83 32 7 93 39 31 60 67 23 64 84 49 82 69 63 42 93 2 51 90 78 26 0 88 91 13 63 65 74 71 7 38 95 81 17 38 69 17 23 65 75 51 59 3 73 55 - 61 56 76 84 48 82 47 99 38 16 0 22 80 10 34 50 95 88 31 32 31 27 87 80 3 85 75 65 48 84 72 51 63 13 72 58 23 54 85 66 16 60 21 48 7 52 8 76 81 71 37 98 29 34 83 18 85 14 95 34 70 19 55 7 75 31 65 46 10 29 79 92 25 59 81 93 88 0 18 39 50 94 52 54 22 83 54 1 80 83 66 24 16 79 90 50 28 28 90 83 - 80 39 86 87 74 27 69 84 95 91 1 67 88 78 27 34 93 42 89 56 98 21 12 94 14 57 84 28 62 18 4 77 2 32 73 11 83 3 32 43 75 21 2 86 30 1 96 4 24 10 63 9 9 90 53 38 86 48 87 66 68 24 96 17 37 86 80 2 8 79 88 54 44 82 48 48 91 18 0 83 18 95 86 11 33 22 43 29 82 83 42 56 89 37 96 9 2 53 97 10 - 58 53 60 2 43 49 54 56 37 96 8 44 13 55 29 46 24 26 56 26 45 50 10 35 93 97 58 63 95 85 75 53 6 51 52 54 37 33 62 82 81 18 35 94 48 54 10 59 83 60 14 97 49 12 85 20 72 52 37 48 27 74 9 55 32 28 12 56 31 39 77 67 55 21 25 63 13 39 83 0 65 47 75 22 16 13 10 68 91 53 2 80 78 31 53 43 85 18 47 49 - 21 77 62 27 94 15 87 30 67 52 84 6 62 72 33 18 17 1 49 79 59 1 40 7 54 9 26 80 69 11 41 44 26 54 88 17 19 45 74 64 46 96 58 9 12 20 51 74 40 17 13 44 93 76 88 52 3 6 23 15 85 22 11 79 28 30 63 70 58 33 94 24 30 88 81 64 63 50 18 65 0 65 21 37 51 82 58 88 77 18 32 52 8 96 22 64 21 36 2 52 - 76 50 62 82 29 34 12 90 54 48 99 46 11 49 82 52 85 22 29 71 22 48 42 41 20 78 79 81 2 97 68 73 32 44 49 87 0 93 21 51 15 57 83 96 36 1 16 6 65 77 27 20 10 74 49 89 39 78 23 25 27 32 96 20 31 92 77 77 98 76 38 76 64 34 27 33 65 94 95 47 65 0 44 10 20 85 5 39 67 29 35 58 31 10 11 5 59 64 65 22 - 72 30 83 71 64 50 39 87 88 12 7 30 65 31 54 31 89 41 2 7 87 81 93 65 19 93 73 29 80 74 96 51 26 77 37 2 80 45 18 3 84 75 22 7 92 40 57 57 2 52 57 22 28 92 45 26 98 56 65 46 40 60 52 93 89 49 16 33 95 81 73 37 37 48 83 9 74 52 86 75 21 44 0 80 74 63 92 62 10 83 87 66 98 42 22 45 51 5 2 64 - 44 58 91 71 97 42 33 80 93 17 62 0 72 63 75 52 99 66 26 70 6 93 69 3 5 1 91 10 40 85 1 24 48 84 37 53 38 17 10 95 17 31 89 4 78 95 67 71 47 74 31 17 93 15 21 42 11 40 62 66 86 20 91 31 11 83 77 48 24 10 46 98 44 78 59 56 71 54 11 22 37 10 80 0 55 97 83 41 81 92 68 45 56 88 49 12 23 12 49 17 - 85 55 57 40 38 26 54 20 53 13 58 86 18 37 75 22 17 1 84 35 36 96 79 70 17 87 85 58 20 76 89 56 17 78 62 6 87 43 50 13 71 19 3 84 70 43 35 23 32 58 49 50 14 54 43 55 58 74 18 76 54 75 77 7 47 89 82 59 3 10 16 96 46 69 98 50 7 22 33 16 51 20 74 55 0 49 94 71 64 31 20 1 63 58 35 64 52 7 94 51 - 94 19 62 93 12 33 12 66 44 35 49 73 81 68 54 28 85 88 34 96 26 43 12 29 75 16 21 92 64 25 0 56 28 78 74 92 96 8 60 54 49 19 10 70 25 16 78 81 29 63 49 55 80 93 63 14 44 98 67 31 16 83 5 44 18 44 3 81 44 53 29 20 66 76 13 97 38 83 22 13 82 85 63 97 49 0 35 82 29 16 20 80 38 54 34 85 43 47 66 18 - 90 85 36 27 99 23 10 59 68 7 93 15 55 36 19 21 78 78 64 47 85 12 23 13 24 17 26 20 99 23 78 57 67 56 10 1 55 26 22 71 15 3 81 44 22 12 47 45 24 47 74 30 42 42 17 58 45 93 65 36 61 25 91 37 97 37 72 59 60 18 62 14 30 1 32 52 95 54 43 10 58 5 92 83 94 35 0 66 60 60 98 82 78 70 27 74 26 32 12 8 - 51 52 2 93 51 16 4 93 58 96 47 81 82 5 67 91 14 68 67 30 6 60 72 31 15 9 17 5 47 77 21 63 15 49 36 32 99 30 45 64 14 53 0 51 29 1 56 70 98 17 81 47 26 64 98 68 1 32 5 7 96 92 13 78 6 62 93 70 87 99 77 35 48 13 95 46 81 1 29 68 88 39 62 41 71 82 66 0 11 50 15 48 83 48 13 78 96 77 67 88 - 3 34 2 92 87 69 88 79 98 17 53 68 20 74 42 9 63 30 33 32 33 10 37 50 77 50 90 26 64 18 21 87 59 77 42 79 9 63 3 7 58 10 61 58 18 34 56 64 90 97 27 94 91 7 49 71 41 75 65 37 58 28 41 25 11 45 67 76 30 61 43 65 26 2 30 15 17 80 82 91 77 67 10 81 64 29 60 11 0 76 76 73 92 72 86 66 98 39 31 74 - 48 53 43 34 76 97 54 80 55 59 34 36 33 74 63 49 11 9 59 23 35 36 81 30 27 7 13 19 4 32 87 58 62 72 89 90 53 23 33 62 8 4 25 94 35 69 63 79 34 10 74 35 43 74 50 73 27 68 58 20 52 39 29 98 43 22 24 9 0 88 98 97 81 21 12 50 38 83 83 53 18 29 83 92 31 16 60 50 76 0 45 98 90 3 23 60 86 15 41 13 - 29 40 65 39 71 13 46 28 84 26 39 12 20 57 79 75 97 60 89 35 48 91 82 26 23 25 62 69 91 32 38 66 96 92 88 0 48 62 26 20 30 51 91 92 26 66 61 86 66 13 51 93 84 76 7 64 83 32 1 2 92 14 85 17 89 85 66 65 96 93 47 27 50 25 67 96 69 66 42 2 32 35 87 68 20 20 98 15 76 45 0 92 67 77 46 40 78 2 72 95 - 90 69 37 31 47 35 82 68 76 30 8 65 77 65 10 37 6 44 45 39 59 83 87 98 15 13 54 22 55 81 21 71 50 99 48 79 68 14 27 49 8 77 9 70 79 15 5 23 66 98 23 37 89 43 47 79 28 60 67 76 63 73 16 25 13 38 80 18 21 33 13 24 90 44 18 85 17 24 56 80 52 58 66 45 1 80 82 48 73 98 92 0 53 58 34 66 41 63 26 92 - 66 12 49 26 47 80 84 99 19 43 86 18 99 82 79 35 94 24 63 56 88 66 25 38 77 20 87 90 80 75 50 10 53 93 4 59 11 11 57 22 14 21 60 26 30 67 86 91 69 11 48 65 92 68 44 97 20 82 82 67 55 65 22 21 33 98 42 76 95 71 44 60 63 0 57 60 23 16 89 78 8 31 98 56 63 38 78 83 92 90 67 53 0 7 64 34 5 42 39 1 - 41 85 61 1 9 40 8 54 46 53 18 59 5 51 93 47 61 42 45 80 25 3 5 84 36 14 28 1 59 23 28 73 84 81 47 88 92 11 20 20 90 70 56 98 60 50 97 33 96 8 85 78 96 44 15 1 80 24 90 4 59 86 60 27 55 56 92 86 72 42 24 23 85 3 65 76 65 79 37 31 96 10 42 88 58 54 70 48 72 3 77 58 7 0 6 85 32 13 74 58 - 15 72 5 87 71 55 29 69 89 26 52 93 70 27 87 47 32 35 75 28 58 17 89 65 15 9 70 67 47 24 19 18 41 67 15 50 31 67 81 24 64 2 13 23 71 58 55 79 78 56 66 76 30 0 57 60 70 99 29 46 35 9 76 67 56 67 20 20 77 64 98 97 35 15 12 29 75 90 96 53 22 11 22 49 35 34 27 13 86 23 46 34 64 6 0 95 48 36 59 3 - 83 7 34 72 20 30 10 99 89 37 4 34 31 28 13 61 9 90 76 78 76 24 67 11 31 85 81 80 25 51 14 92 24 94 35 13 90 19 55 83 2 26 40 23 75 25 51 66 25 0 57 98 45 18 59 71 3 3 62 71 21 26 39 23 21 84 32 75 29 39 29 60 69 54 63 90 51 50 9 43 64 5 45 12 64 85 74 78 66 60 40 66 34 85 95 0 41 93 32 29 - 96 49 53 59 81 22 92 1 5 93 95 92 33 85 21 80 39 0 52 62 98 27 70 58 46 46 95 75 60 63 31 86 32 44 5 30 94 60 63 86 48 37 5 23 68 61 36 97 45 47 23 91 21 86 98 52 59 97 4 66 58 7 85 61 5 77 13 96 88 79 90 75 66 42 26 42 59 28 2 85 21 59 51 23 52 43 26 96 98 86 78 41 5 32 48 41 0 15 95 57 - 74 46 96 97 99 76 62 49 23 35 3 82 52 5 48 34 56 13 40 81 28 95 30 44 21 41 11 20 37 12 80 77 64 32 37 90 58 91 21 92 66 17 49 26 94 59 94 83 55 41 23 43 57 85 9 95 34 23 92 56 78 7 9 89 24 67 29 2 13 8 92 92 81 87 95 87 3 28 53 18 36 64 5 12 7 47 32 77 39 15 2 63 42 13 36 93 15 0 11 95 - 45 87 82 46 45 55 62 63 63 49 80 69 47 73 40 75 76 71 44 80 46 51 89 48 81 17 98 32 17 39 9 23 8 37 8 70 94 7 26 58 87 41 69 15 34 36 3 94 52 29 81 44 8 91 83 41 55 49 53 95 24 97 64 60 54 53 58 49 22 25 34 73 17 35 53 36 73 90 97 47 2 65 2 49 94 66 12 67 31 41 72 26 39 74 59 32 95 11 0 20 - 65 58 48 62 56 56 74 23 19 33 9 3 55 48 63 98 48 61 32 13 79 84 29 15 27 35 56 30 5 61 5 62 43 31 60 4 78 91 17 8 45 28 79 54 67 61 14 92 5 4 6 99 28 20 24 75 53 54 85 49 29 83 14 64 47 46 83 57 93 71 12 20 81 76 94 42 55 83 10 49 52 22 64 17 51 18 8 88 74 13 95 92 1 58 3 29 57 95 20 0 - - 0 74 37 4 31 61 38 97 56 8 53 12 47 5 70 18 97 40 0 56 60 61 13 90 76 11 89 37 34 91 69 54 48 56 84 21 51 42 50 61 61 9 87 99 39 91 63 62 52 32 15 57 39 80 75 8 56 84 87 42 53 28 74 23 83 64 74 39 86 56 52 95 88 41 59 87 85 58 39 48 40 34 54 62 89 93 11 19 85 26 0 18 60 86 39 90 28 50 53 43 - 74 0 7 74 86 79 24 79 62 79 91 98 30 39 93 3 21 11 89 8 82 28 31 1 0 13 55 46 31 25 59 79 44 0 11 75 78 98 42 53 66 23 35 7 50 86 92 99 7 56 97 28 93 5 7 86 79 62 80 27 94 4 63 25 41 28 83 40 44 18 0 2 24 49 0 25 14 85 46 15 23 98 22 32 94 28 79 70 19 54 96 79 67 92 19 40 27 3 42 4 - 37 7 0 61 27 7 27 37 46 85 22 19 56 40 1 13 97 37 57 23 39 62 0 27 17 94 66 86 23 58 13 64 66 8 75 28 61 59 91 85 33 86 13 73 42 0 6 12 94 80 52 20 22 55 68 22 49 90 38 33 66 81 27 47 46 67 48 92 78 84 93 38 42 0 65 87 77 55 8 42 84 73 66 38 83 57 97 52 77 12 11 1 65 93 39 0 35 42 9 18 - 4 74 61 0 54 47 85 70 82 38 91 82 84 16 5 54 87 85 3 71 85 87 60 98 3 99 52 20 33 53 63 17 45 28 43 41 80 4 30 18 8 92 98 43 50 7 30 14 47 30 80 83 19 83 69 48 93 38 12 88 74 63 96 95 21 41 25 33 68 8 81 27 60 69 37 57 35 79 96 74 46 94 5 19 19 51 85 92 43 75 70 69 35 30 76 63 89 45 24 88 - 31 86 27 54 0 73 2 56 72 80 82 35 98 90 46 10 46 65 83 75 46 60 27 59 21 71 49 35 87 7 24 75 73 80 5 5 33 79 9 92 65 25 72 41 18 6 40 33 64 4 24 89 95 57 83 27 34 74 4 5 8 2 1 35 40 48 49 14 17 64 54 0 79 9 36 77 80 78 83 93 20 85 64 46 34 2 52 59 6 65 57 23 54 25 39 89 94 51 74 53 - 61 79 7 47 73 0 85 21 83 18 43 60 88 14 26 10 15 55 59 80 53 92 22 55 78 12 89 1 16 97 41 11 47 46 16 43 15 91 94 73 88 11 57 25 23 55 0 67 2 0 71 75 19 59 87 26 47 72 88 48 58 73 86 48 94 14 95 40 94 15 71 30 60 46 31 33 69 31 0 0 80 18 57 98 37 30 51 66 38 62 72 69 77 40 9 46 94 25 65 17 - 38 24 27 85 2 85 0 41 59 79 6 75 62 96 6 9 47 38 19 78 37 26 63 62 10 37 67 37 74 8 65 15 37 84 49 61 39 97 88 29 33 32 20 7 94 9 73 85 81 61 99 67 61 10 3 69 30 48 8 41 21 33 83 54 2 7 75 29 56 65 89 60 90 84 74 16 1 18 70 26 55 90 10 17 41 64 73 95 21 52 32 4 94 12 41 85 75 37 12 10 - 97 79 37 70 56 21 41 0 73 42 26 32 56 42 70 2 10 49 7 2 46 57 22 79 99 22 61 25 51 72 89 74 59 27 94 95 17 73 39 60 68 75 36 13 64 6 20 7 4 7 58 59 85 35 84 97 93 59 99 28 94 40 50 86 97 11 91 12 6 95 19 69 44 43 28 31 94 84 60 48 48 65 84 52 8 57 1 22 5 77 97 13 71 28 95 30 32 52 70 11 - 56 62 46 82 72 83 59 73 0 66 14 76 11 44 36 91 48 15 41 78 33 17 3 86 76 40 74 92 93 49 3 12 24 62 20 45 16 16 29 32 67 23 54 57 14 89 49 52 62 54 48 98 88 49 92 64 96 92 4 70 30 26 10 77 56 3 73 96 73 66 52 38 77 98 23 62 28 28 1 29 86 27 9 55 51 3 88 76 76 47 15 2 37 90 73 17 57 37 32 14 - 8 79 85 38 80 18 79 42 66 0 60 66 71 99 79 29 42 62 85 10 43 6 14 53 0 84 31 52 50 6 54 9 43 58 49 92 25 25 70 35 13 30 38 35 52 66 40 30 68 56 59 51 17 57 36 91 21 21 81 91 28 69 17 3 50 18 31 21 34 92 14 37 51 58 38 61 92 62 56 14 48 91 65 59 90 38 2 51 54 60 79 63 68 51 51 5 43 99 92 27 - 53 91 22 91 82 43 6 26 14 60 0 38 81 94 12 91 96 54 61 54 85 21 47 92 4 21 26 23 58 92 69 26 33 78 26 75 18 60 82 14 18 4 16 71 39 5 79 23 16 99 25 0 99 96 86 9 92 93 54 57 51 31 74 75 27 86 3 24 7 41 58 93 79 65 64 10 5 99 63 73 60 96 74 66 76 18 36 50 58 74 45 40 74 39 43 65 60 3 0 40 - 12 98 19 82 35 60 75 32 76 66 38 0 17 7 48 27 77 97 77 14 44 15 89 7 18 71 21 9 26 69 78 90 22 5 22 27 98 56 96 85 60 34 42 73 30 10 59 57 88 38 42 29 77 84 57 58 44 71 86 83 2 13 91 26 16 12 20 82 91 10 88 99 7 5 71 53 1 1 91 8 32 97 26 16 97 96 0 29 4 78 58 19 42 96 96 75 89 66 8 58 - 47 30 56 84 98 88 62 56 11 71 81 17 0 84 93 83 58 92 82 11 89 81 20 3 93 12 75 35 58 69 8 79 28 45 26 71 89 20 78 3 16 97 49 16 53 52 73 43 7 75 18 90 94 77 80 19 47 89 30 4 19 45 71 9 97 44 85 40 68 61 76 60 65 91 63 67 25 56 21 66 70 29 56 66 29 63 77 27 73 63 19 67 71 49 11 53 68 34 26 80 - 5 39 40 16 90 14 96 42 44 99 94 7 84 0 12 16 9 74 63 16 10 15 29 91 89 93 61 15 49 72 57 68 14 92 31 15 56 41 31 84 1 39 39 79 85 34 29 9 42 77 69 47 83 7 26 11 73 28 12 71 19 64 56 43 79 25 42 43 27 70 63 57 53 84 44 5 77 39 94 72 93 80 34 31 59 30 85 52 6 99 19 95 20 62 72 97 49 77 83 73 - 70 93 1 5 46 26 6 70 36 79 12 48 93 12 0 94 35 89 8 29 81 78 16 52 84 0 90 5 17 9 3 40 20 32 82 28 30 6 34 83 69 52 0 81 25 45 61 70 63 28 2 38 2 30 96 47 12 99 42 55 49 40 80 74 17 9 33 67 64 51 6 88 67 21 98 99 82 58 79 30 65 95 37 19 82 38 18 73 3 53 33 90 28 75 74 59 64 66 70 90 - 18 3 13 54 10 10 9 2 91 29 91 27 83 16 94 0 62 0 33 23 60 2 19 77 36 67 31 28 42 69 74 8 23 14 40 65 40 36 27 25 97 34 9 93 88 67 19 17 15 98 24 98 82 34 8 23 8 75 41 45 53 21 97 52 87 88 97 79 65 92 50 76 13 78 34 82 21 79 59 69 50 66 21 8 40 23 24 67 58 68 24 61 55 24 42 41 28 53 97 55 - 97 21 97 87 46 15 47 10 48 42 96 77 58 9 35 62 0 69 73 9 72 36 38 8 27 21 26 23 69 91 18 33 18 58 53 94 80 85 38 59 35 74 35 83 50 26 44 60 74 73 50 52 19 21 33 88 7 3 45 11 3 12 75 72 65 3 77 5 17 75 66 57 17 25 65 47 34 6 13 10 80 28 43 76 33 67 83 62 28 86 73 6 34 17 22 10 2 77 95 2 - 40 11 37 85 65 55 38 49 15 62 54 97 92 74 89 0 69 0 81 84 63 14 64 63 48 9 91 26 33 41 2 10 54 26 30 8 14 88 55 49 56 28 4 42 93 0 81 77 69 51 27 27 76 41 53 45 48 15 42 65 41 77 35 56 15 80 82 98 97 12 35 84 70 26 36 59 41 57 15 10 33 0 58 95 48 90 78 2 69 99 41 73 27 99 12 58 47 7 92 87 - 0 89 57 3 83 59 19 7 41 85 61 77 82 63 8 33 73 81 0 62 44 72 58 62 53 98 38 74 32 7 85 41 41 21 43 33 80 15 37 94 33 19 57 46 61 39 74 94 8 62 86 12 78 45 82 51 12 69 39 60 4 47 80 43 33 1 87 68 28 83 30 34 41 39 85 33 36 8 96 83 86 35 4 93 74 11 39 95 80 5 92 13 83 48 36 37 43 89 94 32 - 56 8 23 71 75 80 78 2 78 10 54 14 11 16 29 23 9 84 62 0 28 38 55 21 25 88 58 39 90 17 32 9 58 92 14 77 30 85 85 99 7 91 44 54 75 17 59 86 44 89 10 53 37 41 64 98 83 35 61 18 35 86 70 53 30 62 92 71 81 20 83 51 85 93 75 73 60 14 87 28 61 77 10 40 62 92 20 6 71 61 81 64 65 98 90 23 85 29 50 92 - 60 82 39 85 46 53 37 46 33 43 85 44 89 10 81 60 72 63 44 28 0 64 71 32 49 6 60 36 56 60 89 40 36 2 8 75 80 95 58 98 20 4 32 12 15 42 7 83 54 37 51 5 73 6 21 55 87 81 92 22 63 82 96 91 89 60 6 81 60 94 38 48 71 92 57 48 81 46 1 91 12 94 43 5 46 45 51 73 49 30 58 18 35 54 75 6 4 82 19 30 - 61 28 62 87 60 92 26 57 17 6 21 15 81 15 78 2 36 14 72 38 64 0 31 3 17 42 41 83 61 26 75 51 58 17 0 61 67 55 72 16 11 87 20 38 23 27 31 86 18 85 90 77 3 85 81 8 52 67 77 45 6 20 25 0 92 83 43 2 2 51 4 38 37 43 66 30 7 78 41 85 92 88 28 63 96 49 11 14 11 32 6 3 58 26 6 6 54 30 94 24 - 13 31 0 60 27 22 63 22 3 14 47 89 20 29 16 19 38 64 58 55 71 31 0 8 60 50 86 35 18 71 7 77 7 5 39 39 23 82 69 82 38 52 85 47 21 56 44 24 85 86 73 58 95 12 49 38 24 54 58 79 42 98 44 15 12 74 19 82 11 70 5 64 2 3 28 43 40 77 88 74 12 12 17 44 1 21 54 46 68 14 55 74 41 40 88 68 67 67 7 12 - 90 1 27 98 59 55 62 79 86 53 92 7 3 91 52 77 8 63 62 21 32 3 8 0 74 46 2 95 36 46 67 66 66 32 7 29 92 40 12 79 19 28 26 17 41 86 30 40 26 50 98 79 43 90 21 71 83 42 46 71 98 12 13 5 70 0 41 59 51 82 30 62 87 79 44 53 11 15 2 89 84 23 3 32 59 69 19 43 1 52 20 17 98 58 16 28 42 18 16 48 - 76 0 17 3 21 78 10 99 76 0 4 18 93 89 84 36 27 48 53 25 49 17 60 74 0 70 24 21 84 49 45 59 31 63 53 62 19 70 11 0 74 72 78 48 77 16 60 46 67 45 67 34 54 25 31 75 55 87 52 77 77 93 65 20 35 0 14 51 94 9 60 7 78 39 28 19 50 36 67 23 63 14 9 20 14 18 92 62 68 14 94 94 54 45 51 57 27 26 51 41 - 11 13 94 99 71 12 37 22 40 84 21 71 12 93 0 67 21 9 98 88 6 42 50 46 70 0 95 94 34 25 42 31 25 13 75 5 85 31 92 70 62 72 10 38 53 78 39 55 59 24 54 78 77 52 38 50 64 67 14 24 73 71 17 93 74 29 86 50 11 6 80 96 9 95 17 98 28 12 64 55 81 37 3 40 98 21 7 30 41 24 91 95 83 38 93 62 87 26 32 58 - 89 55 66 52 49 89 67 61 74 31 26 21 75 61 90 31 26 91 38 58 60 41 86 2 24 95 0 26 42 33 38 9 94 74 11 14 3 82 73 61 36 86 20 24 97 19 57 44 67 87 94 32 25 11 32 68 79 91 93 25 34 30 4 82 24 62 60 48 27 67 46 36 53 66 16 44 1 2 41 85 4 9 20 52 9 62 10 76 25 28 1 22 8 46 45 57 28 81 90 7 - 37 46 86 20 35 1 37 25 92 52 23 9 35 15 5 28 23 26 74 39 36 83 35 95 21 94 26 0 12 10 35 29 59 19 6 5 85 71 79 11 4 61 8 38 14 77 80 78 49 3 96 57 76 25 31 28 41 90 48 27 38 21 4 88 52 57 17 41 44 3 66 19 73 64 35 28 8 45 69 93 19 96 75 83 1 64 26 51 49 29 74 84 53 82 51 43 50 5 46 4 - 34 31 23 33 87 16 74 51 93 50 58 26 58 49 17 42 69 33 32 90 56 61 18 36 84 34 42 12 0 33 43 25 6 60 77 40 84 3 75 82 11 11 2 24 33 21 40 58 30 26 83 99 11 3 10 90 17 93 20 19 90 50 56 24 67 95 42 82 75 46 76 22 40 18 60 54 35 71 6 82 3 42 30 62 11 81 87 90 59 89 88 87 10 95 14 73 51 80 39 85 - 91 25 58 53 7 97 8 72 49 6 92 69 69 72 9 69 91 41 7 17 60 26 71 46 49 25 33 10 33 0 45 37 35 76 15 68 49 89 55 56 37 83 69 93 96 7 72 64 54 18 72 92 15 96 18 58 17 28 1 56 57 7 27 49 48 7 45 90 37 32 91 81 73 1 24 56 81 67 28 35 42 0 59 61 39 85 37 43 0 75 5 61 53 43 45 2 39 39 45 92 - 69 59 13 63 24 41 65 89 3 54 69 78 8 57 3 74 18 2 85 32 89 75 7 67 45 42 38 35 43 45 0 57 76 39 44 72 81 89 96 35 23 42 0 54 64 54 38 9 83 60 94 78 81 32 57 96 0 17 91 40 96 45 94 68 98 40 76 8 22 13 52 3 11 37 5 5 32 63 59 41 89 91 63 18 8 20 24 42 33 29 51 59 21 67 88 28 45 0 77 64 - 54 79 64 17 75 11 15 74 12 9 26 90 79 68 40 8 33 10 41 9 40 51 77 66 59 31 9 29 25 37 57 0 84 60 6 10 72 92 18 50 7 21 59 58 17 22 9 60 30 54 86 75 26 53 73 78 17 35 94 28 27 37 11 67 51 9 64 8 37 16 33 55 40 7 32 60 13 77 69 5 28 28 72 14 4 88 62 92 49 3 89 88 69 65 41 74 71 34 30 50 - 48 44 66 45 73 47 37 59 24 43 33 22 28 14 20 23 18 54 41 58 36 58 7 66 31 25 94 59 6 35 76 84 0 52 73 81 88 91 57 30 79 65 95 76 16 71 3 26 66 44 24 5 86 45 53 76 31 93 32 43 27 37 65 39 99 20 29 85 50 53 13 52 0 62 63 95 44 0 95 32 11 37 38 67 58 24 1 54 90 43 28 93 93 89 15 68 28 66 99 11 - 56 0 8 28 80 46 84 27 62 58 78 5 45 92 32 14 58 26 21 92 2 17 5 32 63 13 74 19 60 76 39 60 52 0 44 81 24 39 14 28 35 71 30 69 39 82 4 11 60 65 79 38 20 7 65 37 0 94 32 93 96 80 61 47 12 76 39 24 10 4 17 32 64 64 86 41 3 79 90 20 20 99 53 76 67 84 74 95 69 73 62 89 50 56 63 25 40 71 26 44 - 84 11 75 43 5 16 49 94 20 49 26 22 26 31 82 40 53 30 43 14 8 0 39 7 53 75 11 6 77 15 44 6 73 44 0 64 83 23 66 71 57 0 1 79 82 69 14 81 14 6 55 24 90 42 34 84 26 84 97 97 47 99 6 16 76 33 61 33 63 98 79 12 25 18 70 94 72 26 99 89 8 43 11 70 58 96 79 6 94 57 3 32 55 4 5 55 64 70 14 93 - 21 75 28 41 5 43 61 95 45 92 75 27 71 15 28 65 94 8 33 77 75 61 39 29 62 5 14 5 40 68 72 10 81 81 64 0 85 51 7 89 7 41 53 45 0 14 13 44 35 27 4 93 1 99 62 76 29 14 93 45 99 71 72 53 37 84 31 92 60 3 55 16 39 30 76 7 29 89 44 33 10 15 68 65 22 0 88 16 80 29 36 55 99 74 36 90 18 54 95 2 - 51 78 61 80 33 15 39 17 16 25 18 98 89 56 30 40 80 14 80 30 80 67 23 92 19 85 3 85 84 49 81 72 88 24 83 85 0 45 88 11 81 84 42 86 42 50 79 32 74 61 31 19 26 36 36 0 3 63 73 32 67 72 7 78 63 98 60 89 48 1 78 79 52 59 15 90 2 76 74 21 29 89 60 38 14 69 57 8 12 71 1 34 48 65 94 96 47 34 34 84 - 42 98 59 4 79 91 97 73 16 25 60 56 20 41 6 36 85 88 15 85 95 55 82 40 70 31 82 71 3 89 89 92 91 39 23 51 45 0 2 60 34 69 57 7 74 12 37 87 71 89 56 70 2 43 13 25 83 25 65 47 94 75 29 0 71 46 87 78 76 75 55 94 98 62 83 18 78 53 78 29 7 37 97 61 9 36 15 78 96 8 91 45 52 79 44 97 10 44 24 85 - 50 42 91 30 9 94 88 39 29 70 82 96 78 31 34 27 38 55 37 85 58 72 69 12 11 92 73 79 75 55 96 18 57 14 66 7 88 2 0 75 65 48 95 60 18 46 84 12 10 18 98 1 85 44 7 73 18 68 11 73 85 22 52 16 88 7 25 41 58 62 6 1 43 37 23 75 85 61 32 90 61 87 50 24 72 93 28 90 94 58 64 1 15 34 52 39 81 26 85 3 - 61 53 85 18 92 73 29 60 32 35 14 85 3 84 83 25 59 49 94 99 98 16 82 79 0 70 61 11 82 56 35 50 30 28 71 89 11 60 75 0 3 9 63 96 55 71 65 94 6 14 10 99 36 49 55 68 21 56 66 63 96 73 3 41 39 29 93 35 24 87 2 0 57 85 32 71 57 55 64 42 47 69 96 35 82 53 64 10 61 35 53 87 88 9 31 38 24 24 90 6 - 61 66 33 8 65 88 33 68 67 13 18 60 16 1 69 97 35 56 33 7 20 11 38 19 74 62 36 4 11 37 23 7 79 35 57 7 81 34 65 3 0 10 48 1 75 17 31 38 8 83 68 67 27 88 23 91 71 2 25 40 96 51 23 20 56 69 51 50 50 20 18 63 91 10 5 30 63 35 38 57 46 55 64 58 3 9 11 62 42 48 53 87 28 1 17 75 38 77 68 14 - 9 23 86 92 25 11 32 75 23 30 4 34 97 39 52 34 74 28 19 91 4 87 52 28 72 72 86 61 11 83 42 21 65 71 0 41 84 69 48 9 10 0 78 68 36 21 40 92 66 23 87 91 30 36 15 42 47 94 13 94 33 71 35 87 51 40 70 94 99 10 97 44 76 69 91 38 24 87 6 65 54 86 49 2 48 44 93 36 82 30 58 77 32 35 2 58 10 98 5 43 - 87 35 13 98 72 57 20 36 54 38 16 42 49 39 0 9 35 4 57 44 32 20 85 26 78 10 20 8 2 69 0 59 95 30 1 53 42 57 95 63 48 78 0 62 24 94 79 93 68 75 36 43 33 38 76 61 74 27 78 42 98 83 91 26 5 82 60 44 42 76 99 66 11 34 52 7 40 62 24 23 29 0 73 26 16 91 32 10 99 1 59 90 35 62 14 2 83 87 37 37 - 99 7 73 43 41 25 7 13 57 35 71 73 16 79 81 93 83 42 46 54 12 38 47 17 48 38 24 38 24 93 54 58 76 69 79 45 86 7 60 96 1 68 62 0 86 67 23 19 97 77 65 67 6 23 67 7 77 70 85 29 49 2 94 76 95 47 3 36 81 56 61 5 97 4 26 94 46 92 45 51 7 10 6 53 71 56 85 22 87 65 22 28 99 25 98 55 79 82 32 68 - 39 50 42 50 18 23 94 64 14 52 39 30 53 85 25 88 50 93 61 75 15 23 21 41 77 53 97 14 33 96 64 17 16 39 82 0 42 74 18 55 75 36 24 86 0 46 74 25 61 95 55 10 41 71 13 7 98 90 35 75 69 25 23 54 98 86 29 92 93 66 46 2 40 41 47 89 28 38 80 47 57 74 38 59 4 26 92 75 94 17 40 37 58 56 19 1 39 91 81 33 - 91 86 0 7 6 55 9 6 89 66 5 10 52 34 45 67 26 0 39 17 42 27 56 86 16 78 19 77 21 7 54 22 71 82 69 14 50 12 46 71 17 21 94 67 46 0 14 88 22 36 64 79 23 65 4 14 51 1 81 11 39 59 31 15 86 78 41 42 94 0 93 21 93 61 52 29 33 27 29 53 77 23 47 38 65 40 45 23 22 68 49 93 22 64 81 94 97 53 82 10 - 63 92 6 30 40 0 73 20 49 40 79 59 73 29 61 19 44 81 74 59 7 31 44 30 60 39 57 80 40 72 38 9 3 4 14 13 79 37 84 65 31 40 79 23 74 14 0 91 23 32 26 22 11 22 33 87 58 1 38 84 61 9 10 93 57 81 9 39 62 49 90 34 11 81 50 21 38 26 11 72 17 84 42 76 12 82 35 33 76 18 94 93 63 82 60 7 66 55 40 10 - 62 99 12 14 33 67 85 7 52 30 23 57 43 9 70 17 60 77 94 86 83 86 24 40 46 55 44 78 58 64 9 60 26 11 81 44 32 87 12 94 38 92 93 19 25 88 91 0 11 19 61 71 51 62 85 66 67 68 17 9 0 92 66 22 95 59 79 24 42 50 69 26 33 76 11 19 12 63 6 60 75 75 63 87 93 72 4 17 75 20 30 99 18 70 55 10 78 65 92 56 - 52 7 94 47 64 2 81 4 62 68 16 88 7 42 63 15 74 69 8 44 54 18 85 26 67 59 67 49 30 54 83 30 66 60 14 35 74 71 10 6 8 66 68 97 61 22 23 11 0 91 56 0 16 60 50 2 72 72 20 1 35 41 58 11 31 72 38 99 8 67 26 21 60 28 65 82 51 72 81 61 35 9 61 10 45 41 31 39 43 95 9 96 54 66 85 75 58 9 64 8 - 32 56 80 30 4 0 61 7 54 56 99 38 75 77 28 98 73 51 62 89 37 85 86 50 45 24 87 3 26 18 60 54 44 65 6 27 61 89 18 14 83 23 75 77 95 36 32 19 91 0 22 55 34 98 82 64 67 48 98 35 50 18 68 23 35 7 8 69 73 49 29 36 9 8 0 19 77 62 27 77 33 96 88 19 25 3 30 40 17 36 98 23 69 66 14 96 28 73 39 15 - 15 97 52 80 24 71 99 58 48 59 25 42 18 69 2 24 50 27 86 10 51 90 73 98 67 54 94 96 83 72 94 86 24 79 55 4 31 56 98 10 68 87 36 65 55 64 26 61 56 22 0 72 92 8 9 44 31 9 46 83 63 58 77 26 88 78 79 37 12 38 75 60 58 1 70 8 91 32 4 51 29 19 25 53 91 39 52 54 8 32 31 16 77 30 37 78 67 31 16 6 - 57 28 20 83 89 75 67 59 98 51 0 29 90 47 38 98 52 27 12 53 5 77 58 79 34 78 32 57 99 92 78 75 5 38 24 93 19 70 1 99 67 91 43 67 10 79 22 71 0 55 72 0 18 18 61 2 99 94 62 23 1 99 6 93 0 26 19 97 80 22 75 15 20 46 68 40 54 58 24 60 58 51 80 32 63 13 66 2 31 78 55 26 79 92 57 90 67 72 56 55 - 39 93 22 19 95 19 61 85 88 17 99 77 94 83 2 82 19 76 78 37 73 3 95 43 54 77 25 76 11 15 81 26 86 20 90 1 26 2 85 36 27 30 33 6 41 23 11 51 16 34 92 18 0 18 46 86 25 96 45 3 16 8 60 23 54 41 29 78 43 80 43 6 27 23 54 65 89 63 37 65 82 46 76 47 56 1 77 45 69 18 70 97 60 61 14 16 81 44 16 36 - 80 5 55 83 57 59 10 35 49 57 96 84 77 7 30 34 21 41 45 41 6 85 12 90 25 52 11 25 3 96 32 53 45 7 42 99 36 43 44 49 88 36 38 23 71 65 22 62 60 98 8 18 18 0 50 22 66 33 45 41 22 55 58 80 17 17 67 22 41 98 47 85 28 80 42 93 27 98 72 4 5 88 35 19 23 77 20 7 35 49 86 50 60 25 6 10 75 32 74 68 - 75 7 68 69 83 87 3 84 92 36 86 57 80 26 96 8 33 53 82 64 21 81 49 21 31 38 32 31 10 18 57 73 53 65 34 62 36 13 7 55 23 15 76 67 13 4 33 85 50 82 9 61 46 50 0 9 1 53 58 81 13 8 9 48 90 89 2 19 23 66 90 18 72 58 94 84 58 42 81 37 62 85 85 84 71 30 39 40 40 40 5 63 56 62 75 56 21 89 28 32 - 8 86 22 48 27 26 69 97 64 91 9 58 19 11 47 23 88 45 51 98 55 8 38 71 75 50 68 28 90 58 96 78 76 37 84 76 0 25 73 68 91 42 61 7 7 14 87 66 2 64 44 2 86 22 9 0 45 96 51 43 59 87 45 85 84 54 74 18 82 18 57 5 84 81 1 16 75 52 13 0 43 85 72 78 91 51 0 45 2 26 14 21 18 7 19 31 5 10 27 71 - 56 79 49 93 34 47 30 93 96 21 92 44 47 73 12 8 7 48 12 83 87 52 24 83 55 64 79 41 17 17 0 17 31 0 26 29 3 83 18 21 71 47 74 77 98 51 58 67 72 67 31 99 25 66 1 45 0 3 72 15 63 85 92 57 90 48 75 15 64 44 9 77 79 92 18 70 21 21 78 5 86 93 45 56 80 96 94 4 28 49 52 49 30 65 29 10 13 44 31 30 - 84 62 90 38 74 72 48 59 92 21 93 71 89 28 99 75 3 15 69 35 81 67 54 42 87 67 91 90 93 28 17 35 93 94 84 14 63 25 68 56 2 94 27 70 90 1 1 68 72 48 9 94 96 33 53 96 3 0 5 95 95 21 22 54 62 54 86 67 91 43 65 61 79 87 11 97 60 14 3 69 81 63 27 93 86 81 8 80 82 16 29 51 74 54 91 16 9 83 15 60 - 87 80 38 12 4 88 8 99 4 81 54 86 30 12 42 41 45 42 39 61 92 77 58 46 52 14 93 48 20 1 91 94 32 32 97 93 73 65 11 66 25 13 78 85 35 81 38 17 20 98 46 62 45 45 58 51 72 5 0 65 28 6 31 86 46 55 65 79 49 76 18 56 74 71 24 64 62 72 91 91 42 91 6 63 71 30 30 70 80 45 84 38 30 60 71 5 15 22 20 64 - 42 27 33 88 5 48 41 28 70 91 57 83 4 71 55 45 11 65 60 18 22 45 79 71 77 24 25 27 19 56 40 28 43 93 97 45 32 47 73 63 40 94 42 29 75 11 84 9 1 35 83 23 3 41 81 43 15 95 65 0 34 61 23 85 62 8 49 85 94 56 95 24 72 78 19 66 59 66 97 19 70 51 3 41 93 73 97 67 81 47 20 12 22 20 92 12 3 30 11 91 - 53 94 66 74 8 58 21 94 30 28 51 2 19 19 49 53 3 41 4 35 63 6 42 98 77 73 34 38 90 57 96 27 27 96 47 99 67 94 85 96 96 33 98 49 69 39 61 0 35 50 63 1 16 22 13 59 63 95 28 34 0 33 34 0 18 1 8 7 75 27 1 53 36 95 45 82 19 37 38 23 73 24 52 55 35 40 27 85 64 62 62 21 26 47 51 17 12 16 56 90 - 28 4 81 63 2 73 33 40 26 69 31 13 45 64 40 21 12 77 47 86 82 20 98 12 93 71 30 21 50 7 45 37 37 80 99 71 72 75 22 73 51 71 83 2 25 59 9 92 41 18 58 99 8 55 8 87 85 21 6 61 33 0 97 35 29 16 76 63 81 7 15 57 4 12 92 75 32 44 32 70 78 47 67 74 11 54 87 31 80 68 98 64 62 64 47 68 27 89 37 68 - 74 63 27 96 1 86 83 50 10 17 74 91 71 56 80 97 75 35 80 70 96 25 44 13 65 17 4 4 56 27 94 11 65 61 6 72 7 29 52 3 23 35 91 94 23 31 10 66 58 68 77 6 60 58 9 45 92 22 31 23 34 97 0 58 56 30 40 62 80 84 21 14 57 96 80 64 4 46 6 83 67 82 37 51 9 53 80 26 8 72 32 54 52 31 48 45 94 18 84 49 - 23 25 47 95 35 48 54 86 77 3 75 26 9 43 74 52 72 56 43 53 91 0 15 5 20 93 82 88 24 49 68 67 39 47 16 53 78 0 16 41 20 87 26 76 54 15 93 22 11 23 26 93 23 80 48 85 57 54 86 85 0 35 58 0 32 3 84 6 87 39 43 7 21 20 52 34 9 61 40 16 58 16 61 92 46 97 31 20 63 70 28 1 28 90 2 55 65 29 91 20 - 83 41 46 21 40 94 2 97 56 50 27 16 97 79 17 87 65 15 33 30 89 92 12 70 35 74 24 52 67 48 98 51 99 12 76 37 63 71 88 39 56 51 5 95 98 86 57 95 31 35 88 0 54 17 90 84 90 62 46 62 18 29 56 32 0 1 10 89 6 27 17 28 66 42 23 4 45 64 87 13 40 51 83 23 87 99 86 88 8 64 49 56 86 43 33 26 2 14 9 9 - 64 28 67 41 48 14 7 11 3 18 86 12 44 25 9 88 3 80 1 62 60 83 74 0 0 29 62 57 95 7 40 9 20 76 33 84 98 46 7 29 69 40 82 47 86 78 81 59 72 7 78 26 41 17 89 54 48 54 55 8 1 16 30 3 1 0 51 41 68 67 11 18 96 14 27 23 22 30 53 15 98 13 79 61 73 32 58 8 41 44 8 26 2 90 47 87 87 80 48 2 - 74 83 48 25 49 95 75 91 73 31 3 20 85 42 33 97 77 82 87 92 6 43 19 41 14 86 60 17 42 45 76 64 29 39 61 31 60 87 25 93 51 70 60 3 29 41 9 79 38 8 79 19 29 67 2 74 75 86 65 49 8 76 40 84 10 51 0 1 90 5 16 59 38 52 28 62 76 44 16 60 74 60 36 52 2 71 14 70 54 54 51 34 78 58 51 34 62 31 82 59 - 39 40 92 33 14 40 29 12 96 21 24 82 40 43 67 79 5 98 68 71 81 2 82 59 51 50 48 41 82 90 8 8 85 24 33 92 89 78 41 35 50 94 44 36 92 42 39 24 99 69 37 97 78 22 19 18 15 67 79 85 7 63 62 6 89 41 1 0 10 17 50 5 9 11 59 29 98 78 69 64 58 59 27 81 93 34 54 81 12 32 44 52 6 57 80 60 87 10 20 37 - 86 44 78 68 17 94 56 6 73 34 7 91 68 27 64 65 17 97 28 81 60 2 11 51 94 11 27 44 75 37 22 37 50 10 63 60 48 76 58 24 50 99 42 81 93 94 62 42 8 73 12 80 43 41 23 82 64 91 49 94 75 81 80 87 6 68 90 10 0 87 77 58 68 56 1 18 21 98 92 46 36 89 84 29 64 36 45 74 53 36 41 91 10 0 59 86 19 97 72 44 - 56 18 84 8 64 15 65 95 66 92 41 10 61 70 51 92 75 12 83 20 94 51 70 82 9 6 67 3 46 32 13 16 53 4 98 3 1 75 62 87 20 10 76 56 66 0 49 50 67 49 38 22 80 98 66 18 44 43 76 56 27 7 84 39 27 67 5 17 87 0 11 91 48 94 11 27 13 65 13 94 15 56 43 77 43 27 17 25 29 28 84 54 25 57 11 42 81 99 22 35 - 52 0 93 81 54 71 89 19 52 14 58 88 76 63 6 50 66 35 30 83 38 4 5 30 60 80 46 66 76 91 52 33 13 17 79 55 78 55 6 2 18 97 99 61 46 93 90 69 26 29 75 75 43 47 90 57 9 65 18 95 1 15 21 43 17 11 16 50 77 11 0 94 35 81 84 41 48 67 53 77 11 38 84 79 16 62 51 44 77 89 23 49 68 91 17 20 88 61 67 34 - 95 2 38 27 0 30 60 69 38 37 93 99 60 57 88 76 57 84 34 51 48 38 64 62 7 96 36 19 22 81 3 55 52 32 12 16 79 94 1 0 63 44 66 5 2 21 34 26 21 36 60 15 6 85 18 5 77 61 56 24 53 57 14 7 28 18 59 5 58 91 94 0 26 57 94 60 4 9 48 9 77 21 45 49 44 60 66 26 79 47 1 13 10 90 97 86 3 51 74 99 - 88 24 42 60 79 60 90 44 77 51 79 7 65 53 67 13 17 70 41 85 71 37 2 87 78 9 53 73 40 73 11 40 0 64 25 39 52 98 43 57 91 76 11 97 40 93 11 33 60 9 58 20 27 28 72 84 79 79 74 72 36 4 57 21 66 96 38 9 68 48 35 26 0 49 67 68 70 62 32 25 90 85 44 48 52 9 43 44 69 29 51 74 47 1 84 17 60 10 43 59 - 41 49 0 69 9 46 84 43 98 58 65 5 91 84 21 78 25 26 39 93 92 43 3 79 39 95 66 64 18 1 37 7 62 64 18 30 59 62 37 85 10 69 34 4 41 61 81 76 28 8 1 46 23 80 58 81 92 87 71 78 95 12 96 20 42 14 52 11 56 94 81 57 49 0 67 27 59 34 55 32 18 17 2 92 9 94 88 43 63 15 76 10 11 46 81 13 62 1 79 58 - 59 0 65 37 36 31 74 28 23 38 64 71 63 44 98 34 65 36 85 75 57 66 28 44 28 17 16 35 60 24 5 32 63 86 70 76 15 83 23 32 5 91 52 26 47 52 50 11 65 0 70 68 54 42 94 1 18 11 24 19 45 92 80 52 23 27 28 59 1 11 84 94 67 67 0 20 96 19 32 46 28 91 46 14 22 36 16 23 88 27 37 27 56 83 88 91 28 28 0 42 - 87 25 87 57 77 33 16 31 62 61 10 53 67 5 99 82 47 59 33 73 48 30 43 53 19 98 44 28 54 56 5 60 95 41 94 7 90 18 75 71 30 38 7 94 89 29 21 19 82 19 8 40 65 93 84 16 70 97 64 66 82 75 64 34 4 23 62 29 18 27 41 60 68 27 20 0 74 14 51 3 36 61 65 24 54 70 17 81 21 2 48 73 82 18 84 83 60 61 8 59 - 85 14 77 35 80 69 1 94 28 92 5 1 25 77 82 21 34 41 36 60 81 7 40 11 50 28 1 8 35 81 32 13 44 3 72 29 2 78 85 57 63 24 40 46 28 33 38 12 51 77 91 54 89 27 58 75 21 60 62 59 19 32 4 9 45 22 76 98 21 13 48 4 70 59 96 74 0 27 61 80 53 86 77 19 67 51 16 80 10 91 61 54 1 98 79 23 25 57 37 80 - 58 85 55 79 78 31 18 84 28 62 99 1 56 39 58 79 6 57 8 14 46 78 77 15 36 12 2 45 71 67 63 77 0 79 26 89 76 53 61 55 35 87 62 92 38 27 26 63 72 62 32 58 63 98 42 52 21 14 72 66 37 44 46 61 64 30 44 78 98 65 67 9 62 34 19 14 27 0 49 49 19 13 59 36 4 45 62 98 3 38 90 54 41 6 98 75 23 57 31 55 - 39 46 8 96 83 0 70 60 1 56 63 91 21 94 79 59 13 15 96 87 1 41 88 2 67 64 41 69 6 28 59 69 95 90 99 44 74 78 32 64 38 6 24 45 80 29 11 6 81 27 4 24 37 72 81 13 78 3 91 97 38 32 6 40 87 53 16 69 92 13 53 48 32 55 32 51 61 49 0 7 52 63 97 95 55 18 91 62 28 56 84 65 90 43 61 38 82 95 94 58 - 48 15 42 74 93 0 26 48 29 14 73 8 66 72 30 69 10 10 83 28 91 85 74 89 23 55 85 93 82 35 41 5 32 20 89 33 21 29 90 42 57 65 23 51 47 53 72 60 61 77 51 60 65 4 37 0 5 69 91 19 23 70 83 16 13 15 60 64 46 94 77 9 25 32 46 3 80 49 7 0 64 40 35 25 98 38 4 87 87 30 30 73 51 29 28 24 43 64 85 92 - 40 23 84 46 20 80 55 48 86 48 60 32 70 93 65 50 80 33 86 61 12 92 12 84 63 81 4 19 3 42 89 28 11 20 8 10 29 7 61 47 46 54 29 7 57 77 17 75 35 33 29 58 82 5 62 43 86 81 42 70 73 78 67 58 40 98 74 58 36 15 11 77 90 18 28 36 53 19 52 64 0 22 25 1 36 94 52 72 79 58 91 13 31 42 29 92 63 71 16 37 - 34 98 73 94 85 18 90 65 27 91 96 97 29 80 95 66 28 0 35 77 94 88 12 23 14 37 9 96 42 0 91 28 37 99 43 15 89 37 87 69 55 86 0 10 74 23 84 75 9 96 19 51 46 88 85 85 93 63 91 51 24 47 82 16 51 13 60 59 89 56 38 21 85 17 91 61 86 13 63 40 22 0 91 61 9 9 72 29 27 63 61 42 80 92 38 99 46 19 84 31 - 54 22 66 5 64 57 10 84 9 65 74 26 56 34 37 21 43 58 4 10 43 28 17 3 9 3 20 75 30 59 63 72 38 53 11 68 60 97 50 96 64 49 73 6 38 47 42 63 61 88 25 80 76 35 85 72 45 27 6 3 52 67 37 61 83 79 36 27 84 43 84 45 44 2 46 65 77 59 97 35 25 91 0 66 85 79 83 2 43 34 79 50 28 39 63 40 27 70 26 3 - 62 32 38 19 46 98 17 52 55 59 66 16 66 31 19 8 76 95 93 40 5 63 44 32 20 40 52 83 62 61 18 14 67 76 70 65 38 61 24 35 58 2 26 53 59 38 76 87 10 19 53 32 47 19 84 78 56 93 63 41 55 74 51 92 23 61 52 81 29 77 79 49 48 92 14 24 19 36 95 25 1 61 66 0 60 55 92 54 48 81 19 7 36 32 79 83 51 61 92 30 - 89 94 83 19 34 37 41 8 51 90 76 97 29 59 82 40 33 48 74 62 46 96 1 59 14 98 9 1 11 39 8 4 58 67 58 22 14 9 72 82 3 48 16 71 4 65 12 93 45 25 91 63 56 23 71 91 80 86 71 93 35 11 9 46 87 73 2 93 64 43 16 44 52 9 22 54 67 4 55 98 36 9 85 60 0 50 5 75 80 34 33 21 62 90 65 7 56 13 18 28 - 93 28 57 51 2 30 64 57 3 38 18 96 63 30 38 23 67 90 11 92 45 49 21 69 18 21 62 64 81 85 20 88 24 84 96 0 69 36 93 53 9 44 91 56 26 40 82 72 41 3 39 13 1 77 30 51 96 81 30 73 40 54 53 97 99 32 71 34 36 27 62 60 9 94 36 70 51 45 18 38 94 9 79 55 50 0 17 5 49 78 76 64 96 12 8 16 18 51 0 53 - 11 79 97 85 52 51 73 1 88 2 36 0 77 85 18 24 83 78 39 20 51 11 54 19 92 7 10 26 87 37 24 62 1 74 79 88 57 15 28 64 11 93 32 85 92 45 35 4 31 30 52 66 77 20 39 0 94 8 30 97 27 87 80 31 86 58 14 54 45 17 51 66 43 88 16 17 16 62 91 4 52 72 83 92 5 17 0 86 90 25 15 38 50 3 17 34 65 4 47 5 - 19 70 52 92 59 66 95 22 76 51 50 29 27 52 73 67 62 2 95 6 73 14 46 43 62 30 76 51 90 43 42 92 54 95 6 16 8 78 90 10 62 36 10 22 75 23 33 17 39 40 54 2 45 7 40 45 4 80 70 67 85 31 26 20 88 8 70 81 74 25 44 26 44 43 23 81 80 98 62 87 72 29 2 54 75 5 86 0 33 21 11 77 87 23 87 9 45 15 10 73 - 85 19 77 43 6 38 21 5 76 54 58 4 73 6 3 58 28 69 80 71 49 11 68 1 68 41 25 49 59 0 33 49 90 69 94 80 12 96 94 61 42 82 99 87 94 22 76 75 43 17 8 31 69 35 40 2 28 82 80 81 64 80 8 63 8 41 54 12 53 29 77 79 69 63 88 21 10 3 28 87 79 27 43 48 80 49 90 33 0 24 16 68 13 92 93 30 94 52 48 31 - 26 54 12 75 65 62 52 77 47 60 74 78 63 99 53 68 86 99 5 61 30 32 14 52 14 24 28 29 89 75 29 3 43 73 57 29 71 8 58 35 48 30 1 65 17 68 18 20 95 36 32 78 18 49 40 26 49 16 45 47 62 68 72 70 64 44 54 32 36 28 89 47 29 15 27 2 91 38 56 30 58 63 34 81 34 78 25 21 24 0 60 29 5 33 32 41 87 55 12 38 - 0 96 11 70 57 72 32 97 15 79 45 58 19 19 33 24 73 41 92 81 58 6 55 20 94 91 1 74 88 5 51 89 28 62 3 36 1 91 64 53 53 58 59 22 40 49 94 30 9 98 31 55 70 86 5 14 52 29 84 20 62 98 32 28 49 8 51 44 41 84 23 1 51 76 37 48 61 90 84 30 91 61 79 19 33 76 15 11 16 60 0 19 8 57 83 1 84 23 83 15 - 18 79 1 69 23 69 4 13 2 63 40 19 67 95 90 61 6 73 13 64 18 3 74 17 94 95 22 84 87 61 59 88 93 89 32 55 34 45 1 87 87 77 90 28 37 93 93 99 96 23 16 26 97 50 63 21 49 51 38 12 21 64 54 1 56 26 34 52 91 54 49 13 74 10 27 73 54 54 65 73 13 42 50 7 21 64 38 77 68 29 19 0 87 21 51 26 87 87 33 99 - 60 67 65 35 54 77 94 71 37 68 74 42 71 20 28 55 34 27 83 65 35 58 41 98 54 83 8 53 10 53 21 69 93 50 55 99 48 52 15 88 28 32 35 99 58 22 63 18 54 69 77 79 60 60 56 18 30 74 30 22 26 62 52 28 86 2 78 6 10 25 68 10 47 11 56 82 1 41 90 51 31 80 28 36 62 96 50 87 13 5 8 87 0 37 13 59 12 17 33 31 - 86 92 93 30 25 40 12 28 90 51 39 96 49 62 75 24 17 99 48 98 54 26 40 58 45 38 46 82 95 43 67 65 89 56 4 74 65 79 34 9 1 35 62 25 56 64 82 70 66 66 30 92 61 25 62 7 65 54 60 20 47 64 31 90 43 90 58 57 0 57 91 90 1 46 83 18 98 6 43 29 42 92 39 32 90 12 3 23 92 33 57 21 37 0 17 8 0 65 57 90 - 39 19 39 76 39 9 41 95 73 51 43 96 11 72 74 42 22 12 36 90 75 6 88 16 51 93 45 51 14 45 88 41 15 63 5 36 94 44 52 31 17 2 14 98 19 81 60 55 85 14 37 57 14 6 75 19 29 91 71 92 51 47 48 2 33 47 51 80 59 11 17 97 84 81 88 84 79 98 61 28 29 38 63 79 65 8 17 87 93 32 83 51 13 17 0 61 90 60 39 38 - 90 40 0 63 89 46 85 30 17 5 65 75 53 97 59 41 10 58 37 23 6 6 68 28 57 62 57 43 73 2 28 74 68 25 55 90 96 97 39 38 75 58 2 55 1 94 7 10 75 96 78 90 16 10 56 31 10 16 5 12 17 68 45 55 26 87 34 60 86 42 20 86 17 13 91 83 23 75 38 24 92 99 40 83 7 16 34 9 30 41 1 26 59 8 61 0 25 15 89 4 - 28 27 35 89 94 94 75 32 57 43 60 89 68 49 64 28 2 47 43 85 4 54 67 42 27 87 28 50 51 39 45 71 28 40 64 18 47 10 81 24 38 10 83 79 39 97 66 78 58 28 67 67 81 75 21 5 13 9 15 3 12 27 94 65 2 87 62 87 19 81 88 3 60 62 28 60 25 23 82 43 63 46 27 51 56 18 65 45 94 87 84 87 12 0 90 25 0 80 15 28 - 50 3 42 45 51 25 37 52 37 99 3 66 34 77 66 53 77 7 89 29 82 30 67 18 26 26 81 5 80 39 0 34 66 71 70 54 34 44 26 24 77 98 87 82 91 53 55 65 9 73 31 72 44 32 89 10 44 83 22 30 16 89 18 29 14 80 31 10 97 99 61 51 10 1 28 61 57 57 95 64 71 19 70 61 13 51 4 15 52 55 23 87 17 65 60 15 80 0 57 98 - 53 42 9 24 74 65 12 70 32 92 0 8 26 83 70 97 95 92 94 50 19 94 7 16 51 32 90 46 39 45 77 30 99 26 14 95 34 24 85 90 68 5 37 32 81 82 40 92 64 39 16 56 16 74 28 27 31 15 20 11 56 37 84 91 9 48 82 20 72 22 67 74 43 79 0 8 37 31 94 85 16 84 26 92 18 0 47 10 48 12 83 33 33 57 39 89 15 57 0 90 - 43 4 18 88 53 17 10 11 14 27 40 58 80 73 90 55 2 87 32 92 30 24 12 48 41 58 7 4 85 92 64 50 11 44 93 2 84 85 3 6 14 43 37 68 33 10 10 56 8 15 6 55 36 68 32 71 30 60 64 91 90 68 49 20 9 2 59 37 44 35 34 99 59 58 42 59 80 55 58 92 37 31 3 30 28 53 5 73 31 38 15 99 31 90 38 4 28 98 90 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai100b.dat b/trunk/paradiseo-peo/tutorial/benchs/tai100b.dat deleted file mode 100755 index 25389ae8d..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai100b.dat +++ /dev/null @@ -1,201 +0,0 @@ - 100 1185996137 - 0 108 42 115 104 114 71 131 113 47 59 149 65 895 854 874 841 846 869 800 817 1116 1004 1045 1095 1097 1724 1665 1697 1669 1695 1065 1106 1124 1053 1122 1102 1079 1102 1106 1087 1066 1105 1092 1061 1141 1140 1132 1138 1090 1047 1129 587 618 581 574 661 599 599 655 587 569 971 1025 1073 1007 982 970 979 1036 1022 1059 1026 1045 560 554 547 558 550 525 540 517 968 975 954 981 960 977 960 967 966 981 980 973 962 969 951 950 976 1596 - 108 0 67 183 80 147 114 89 131 78 50 238 158 983 942 956 926 926 956 886 907 1220 1103 1148 1194 1197 1831 1771 1803 1775 1801 1162 1201 1222 1150 1218 1196 1174 1198 1202 1184 1161 1200 1192 1162 1239 1237 1230 1237 1189 1146 1230 688 721 681 675 762 702 701 755 686 667 1074 1128 1175 1110 1088 1073 1085 1140 1124 1161 1129 1148 652 647 642 650 646 617 631 613 1067 1075 1053 1080 1059 1076 1059 1066 1064 1080 1080 1072 1061 1068 1050 1048 1076 1701 - 42 67 0 129 74 109 66 98 100 37 23 177 100 932 891 910 878 880 906 837 855 1158 1044 1086 1135 1138 1765 1706 1738 1710 1736 1104 1145 1164 1093 1162 1141 1118 1142 1146 1127 1105 1144 1132 1102 1181 1180 1172 1179 1131 1087 1170 628 659 621 615 702 640 640 695 627 609 1012 1066 1114 1048 1024 1011 1021 1077 1063 1100 1067 1086 598 593 586 596 590 563 578 557 1009 1016 995 1022 1000 1017 1001 1007 1006 1021 1021 1013 1003 1009 992 990 1017 1638 - 115 183 129 0 119 53 69 137 72 157 152 67 159 936 895 926 888 900 913 846 856 1119 1019 1048 1110 1113 1705 1648 1679 1657 1679 1086 1130 1144 1075 1145 1129 1105 1128 1130 1108 1092 1129 1106 1073 1158 1160 1149 1154 1107 1063 1140 603 627 599 591 674 609 612 674 612 594 976 1027 1080 1011 975 972 971 1037 1030 1066 1029 1048 599 591 582 598 583 568 583 549 987 991 973 1000 976 995 977 985 986 999 996 991 981 986 970 969 992 1592 - 104 80 74 119 0 72 57 27 53 110 82 184 169 999 957 979 945 950 973 904 921 1211 1102 1139 1193 1196 1809 1751 1783 1758 1782 1165 1206 1224 1154 1223 1203 1180 1204 1207 1187 1167 1206 1190 1159 1240 1240 1231 1237 1190 1146 1226 685 714 679 672 758 695 696 754 687 669 1066 1119 1169 1102 1073 1064 1069 1130 1118 1155 1120 1139 663 657 649 661 652 629 644 619 1068 1074 1054 1081 1058 1077 1059 1066 1066 1080 1079 1072 1062 1068 1051 1049 1075 1688 - 114 147 109 53 72 0 44 86 20 144 128 120 172 978 936 964 928 938 954 886 898 1169 1067 1098 1158 1161 1758 1700 1732 1709 1731 1132 1176 1191 1122 1192 1174 1151 1174 1176 1155 1138 1175 1154 1122 1206 1207 1197 1202 1155 1111 1188 650 676 645 638 722 657 660 720 657 639 1025 1077 1130 1061 1026 1022 1023 1088 1079 1115 1079 1098 640 633 624 639 626 608 624 592 1034 1039 1020 1047 1024 1043 1025 1032 1033 1046 1044 1038 1028 1033 1018 1016 1040 1643 - 71 114 66 69 57 44 0 82 42 100 87 129 133 952 910 935 900 907 927 859 873 1156 1049 1084 1140 1143 1752 1694 1726 1701 1725 1113 1155 1172 1102 1172 1153 1130 1153 1156 1136 1116 1155 1137 1105 1188 1188 1179 1184 1137 1093 1173 632 660 626 619 705 641 643 701 636 618 1011 1064 1115 1047 1016 1009 1013 1075 1064 1101 1066 1084 615 608 600 613 602 582 597 569 1016 1021 1001 1028 1006 1024 1006 1014 1014 1028 1026 1020 1009 1015 999 997 1022 1633 - 131 89 98 137 27 86 82 0 66 133 103 204 196 1026 984 1005 972 977 1000 931 948 1237 1129 1165 1220 1223 1834 1776 1808 1783 1806 1191 1233 1251 1181 1250 1230 1207 1230 1234 1214 1194 1233 1217 1185 1267 1266 1258 1264 1216 1172 1253 712 740 706 698 784 721 723 780 714 696 1092 1145 1195 1128 1098 1090 1095 1156 1144 1181 1147 1165 690 684 676 688 679 656 671 646 1095 1101 1080 1108 1085 1103 1086 1093 1093 1107 1105 1099 1088 1094 1078 1076 1102 1714 - 113 131 100 72 53 20 42 66 0 137 118 140 175 989 947 974 938 947 965 897 910 1185 1081 1114 1173 1175 1776 1718 1750 1727 1749 1146 1189 1205 1136 1205 1187 1164 1187 1190 1169 1151 1189 1169 1137 1220 1221 1212 1216 1169 1126 1204 665 691 659 652 736 672 675 734 670 652 1041 1093 1145 1077 1043 1038 1040 1104 1094 1131 1095 1114 651 645 636 650 638 619 634 605 1049 1054 1034 1061 1038 1057 1039 1046 1047 1061 1058 1052 1042 1048 1032 1030 1054 1660 - 47 78 37 157 110 144 100 133 137 0 31 196 80 907 866 882 851 852 880 810 830 1142 1025 1071 1116 1119 1755 1696 1728 1698 1725 1084 1124 1144 1072 1141 1119 1096 1120 1125 1107 1083 1122 1114 1084 1161 1159 1153 1160 1111 1068 1152 611 643 603 597 685 624 624 677 608 589 996 1051 1097 1032 1012 996 1009 1062 1046 1084 1052 1070 575 570 564 573 568 539 554 535 989 997 975 1002 981 998 981 988 987 1002 1002 994 983 990 972 970 998 1623 - 59 50 23 152 82 128 87 103 118 31 0 200 108 938 897 913 882 883 911 842 861 1170 1054 1098 1145 1148 1781 1721 1753 1724 1751 1114 1154 1174 1102 1170 1149 1126 1150 1155 1136 1113 1152 1143 1113 1191 1189 1182 1189 1141 1097 1181 639 671 632 626 713 652 652 706 637 618 1024 1079 1125 1060 1038 1023 1035 1090 1074 1112 1079 1098 605 600 594 603 598 570 585 565 1018 1026 1004 1031 1010 1027 1011 1017 1016 1031 1031 1023 1012 1019 1001 1000 1027 1651 - 149 238 177 67 184 120 129 204 140 196 200 0 168 886 845 881 841 857 864 799 806 1056 960 985 1050 1053 1638 1581 1613 1592 1612 1028 1073 1086 1018 1088 1073 1049 1072 1073 1050 1036 1073 1046 1013 1099 1102 1090 1094 1048 1004 1079 546 568 542 534 615 549 554 617 557 540 914 964 1019 949 910 910 907 974 968 1004 967 985 550 542 531 549 532 521 537 499 929 932 915 941 918 937 918 926 927 940 937 932 922 927 912 911 933 1527 - 65 158 100 159 169 172 133 196 175 80 108 168 0 832 791 810 777 781 806 736 755 1062 946 991 1037 1039 1676 1616 1648 1618 1646 1005 1045 1065 994 1062 1041 1018 1042 1046 1028 1005 1044 1034 1004 1082 1080 1073 1080 1032 989 1073 531 564 524 517 605 544 544 597 528 510 916 971 1017 952 932 916 929 982 966 1004 972 990 498 492 486 496 490 463 478 457 910 918 896 923 901 919 902 909 908 923 922 915 904 911 893 891 919 1543 - 895 983 932 936 999 978 952 1026 989 907 938 886 832 0 41 96 72 124 35 101 81 400 241 354 298 299 1033 967 997 937 989 240 255 293 225 273 238 220 245 258 257 212 250 304 297 319 302 312 329 285 257 354 360 363 360 370 315 374 362 296 335 351 306 350 336 326 409 324 410 362 308 335 344 353 338 345 355 339 354 370 355 387 200 224 194 208 211 207 211 205 194 212 225 209 200 212 190 190 225 833 - 854 942 891 895 957 936 910 984 947 866 897 845 791 41 0 96 51 114 30 65 41 415 255 364 321 322 1056 990 1021 963 1013 266 287 322 252 305 272 253 277 290 285 244 283 326 315 347 332 340 355 309 277 376 322 326 321 331 280 337 324 259 295 311 309 358 352 333 408 326 409 370 318 349 352 363 296 304 313 297 313 328 313 346 212 235 204 222 220 221 220 216 206 225 237 221 210 223 200 199 236 860 - 874 956 910 926 979 964 935 1005 974 882 913 881 810 96 96 0 55 36 69 92 124 494 336 449 389 390 1122 1057 1087 1024 1078 329 337 378 315 355 316 302 325 341 345 296 332 396 391 405 385 399 417 375 350 446 387 400 384 394 358 407 393 333 354 366 400 445 431 421 502 418 503 457 403 430 439 448 334 344 356 334 359 360 345 390 296 320 290 303 306 303 306 300 290 307 321 304 295 308 286 285 320 917 - 841 926 878 888 945 928 900 972 938 851 882 841 777 72 51 55 0 64 37 43 71 465 305 415 368 369 1103 1037 1068 1008 1060 311 327 365 296 345 309 292 316 330 329 284 322 374 364 391 374 384 400 355 325 423 336 347 333 343 304 355 341 280 304 318 360 409 401 384 458 377 459 421 369 399 403 414 292 301 312 292 313 320 305 345 263 286 255 272 271 271 271 267 257 275 288 271 261 274 251 250 286 904 - 846 926 880 900 950 938 907 977 947 852 883 857 781 124 114 36 64 0 92 87 133 523 364 475 420 421 1155 1089 1119 1058 1111 361 371 412 347 389 351 336 359 375 378 330 366 427 421 439 419 432 450 407 381 477 376 393 371 381 353 398 383 326 340 351 423 470 459 446 522 440 523 482 429 458 464 474 313 324 337 313 340 337 322 370 322 346 315 330 331 330 332 327 316 334 347 331 321 334 311 310 347 951 - 869 956 906 913 973 954 927 1000 965 880 911 864 806 35 30 69 37 92 0 70 68 431 272 383 332 333 1067 1001 1032 972 1024 274 290 328 260 308 272 255 279 293 292 247 285 338 330 354 337 347 363 319 290 388 348 354 346 356 308 364 351 287 320 334 332 378 368 354 433 349 434 390 337 366 372 382 315 323 333 316 334 345 330 367 230 254 223 239 239 238 240 235 224 242 255 239 229 242 219 218 255 867 - 800 886 837 846 904 886 859 931 897 810 842 799 736 101 65 92 43 87 70 0 56 473 314 418 384 385 1117 1052 1082 1026 1075 330 351 386 316 370 336 317 342 354 349 308 347 388 375 411 397 404 419 372 339 438 295 308 292 302 267 315 301 241 263 276 358 410 410 385 451 373 451 423 374 406 405 417 249 258 269 249 271 278 263 303 270 292 260 280 275 279 276 273 264 283 294 279 267 280 256 255 292 924 - 817 907 855 856 921 898 873 948 910 830 861 806 755 81 41 124 71 133 68 56 0 419 261 363 335 336 1065 1000 1031 976 1024 283 310 342 269 328 298 277 302 312 304 267 307 338 323 365 353 358 371 324 289 387 281 286 280 290 241 296 283 219 255 270 303 355 357 330 396 318 396 367 319 352 350 362 258 265 274 260 274 292 277 307 217 238 206 228 221 226 222 220 211 230 240 225 214 226 202 201 239 876 - 1116 1220 1158 1119 1211 1169 1156 1237 1185 1142 1170 1056 1062 400 415 494 465 523 431 473 419 0 160 71 124 126 650 585 617 570 611 182 211 171 194 204 239 234 226 206 179 229 218 112 104 152 181 149 132 139 147 79 533 499 541 546 458 518 519 471 543 561 146 92 64 110 167 147 171 82 104 68 90 72 598 598 598 601 591 636 625 619 203 182 213 193 198 195 198 200 209 190 179 195 206 193 217 218 181 483 - 1004 1103 1044 1019 1102 1067 1049 1129 1081 1025 1054 960 946 241 255 336 305 364 272 314 261 160 0 116 91 94 805 740 771 718 764 82 134 130 81 143 150 131 142 132 101 119 138 89 64 140 147 131 135 89 45 132 417 392 423 430 345 410 407 349 418 436 97 117 96 97 202 116 205 127 70 94 110 115 462 464 466 465 461 500 487 492 44 28 56 33 45 35 44 42 49 30 24 36 48 37 60 61 27 623 - 1045 1148 1086 1048 1139 1098 1084 1165 1114 1071 1098 985 991 354 364 449 415 475 383 418 363 71 116 0 127 129 716 651 683 639 678 168 211 181 176 210 236 224 224 206 175 216 217 114 85 172 196 167 155 138 123 112 461 427 469 475 387 447 447 400 472 490 75 22 52 39 116 76 120 18 46 36 19 1 529 529 528 532 521 566 556 549 153 129 160 147 144 146 143 149 159 143 128 145 154 141 164 165 129 554 - 1095 1194 1135 1110 1193 1158 1140 1220 1173 1116 1145 1050 1037 298 321 389 368 420 332 384 335 124 91 127 0 3 735 670 700 642 692 61 87 55 75 84 115 110 102 82 55 106 94 13 47 52 70 44 44 15 49 57 508 483 514 521 436 501 498 440 509 527 159 143 77 137 241 173 245 145 104 91 135 126 551 553 556 553 551 588 576 582 128 119 142 115 135 119 135 129 132 115 115 123 134 126 146 147 118 541 - 1097 1197 1138 1113 1196 1161 1143 1223 1175 1119 1148 1053 1039 299 322 390 369 421 333 385 336 126 94 129 3 0 734 669 699 640 691 61 86 52 75 82 114 109 101 81 54 106 93 15 50 49 67 41 41 15 51 57 511 486 517 524 439 504 501 443 511 530 162 145 79 140 244 176 248 147 107 93 138 129 553 555 559 556 553 591 578 585 131 122 145 118 138 122 137 131 134 117 117 125 136 129 148 149 121 540 - 1724 1831 1765 1705 1809 1758 1752 1834 1776 1755 1781 1638 1676 1033 1056 1122 1103 1155 1067 1117 1065 650 805 716 735 734 0 66 37 123 50 793 789 745 808 772 813 823 803 784 778 827 795 729 742 718 740 724 706 748 778 680 1162 1122 1172 1175 1090 1142 1146 1108 1180 1197 789 731 710 754 747 782 750 718 754 718 733 716 1243 1241 1239 1246 1231 1279 1269 1257 849 830 860 838 847 840 846 846 854 835 826 841 852 841 864 866 829 241 - 1665 1771 1706 1648 1751 1700 1694 1776 1718 1696 1721 1581 1616 967 990 1057 1037 1089 1001 1052 1000 585 740 651 670 669 66 0 32 81 32 728 723 680 742 707 748 758 737 719 712 762 730 664 677 652 675 658 640 682 713 614 1100 1061 1110 1113 1028 1080 1084 1045 1117 1135 725 667 645 690 686 719 689 654 689 653 669 652 1179 1178 1176 1182 1168 1216 1206 1194 783 764 795 772 782 774 781 781 789 770 761 776 787 776 799 800 763 187 - 1697 1803 1738 1679 1783 1732 1726 1808 1750 1728 1753 1613 1648 997 1021 1087 1068 1119 1032 1082 1031 617 771 683 700 699 37 32 0 89 15 758 753 709 772 736 777 787 767 748 742 792 759 694 708 682 704 688 670 712 743 645 1132 1093 1142 1145 1060 1112 1116 1077 1149 1167 757 699 677 722 718 751 721 686 721 684 700 684 1211 1210 1208 1214 1200 1248 1238 1226 815 796 826 803 813 806 812 812 820 801 792 807 818 807 830 831 795 205 - 1669 1775 1710 1657 1758 1709 1701 1783 1727 1698 1724 1592 1618 937 963 1024 1008 1058 972 1026 976 570 718 639 642 640 123 81 89 0 74 697 688 646 712 670 711 723 701 683 680 728 694 637 654 619 639 625 609 653 687 589 1096 1058 1105 1109 1022 1077 1080 1037 1110 1128 714 656 626 678 686 710 690 643 673 636 657 639 1168 1167 1167 1171 1159 1205 1194 1187 761 744 774 750 761 752 761 760 766 748 740 754 766 755 778 779 743 120 - 1695 1801 1736 1679 1782 1731 1725 1806 1749 1725 1751 1612 1646 989 1013 1078 1060 1111 1024 1075 1024 611 764 678 692 691 50 32 15 74 0 750 744 700 764 727 768 778 757 739 734 783 750 687 701 673 695 679 661 705 736 637 1129 1089 1138 1142 1056 1109 1113 1073 1145 1163 752 694 670 716 715 746 718 681 715 678 695 678 1206 1205 1204 1209 1196 1243 1233 1222 808 789 819 796 806 799 806 806 813 794 786 800 812 800 824 825 788 192 - 1065 1162 1104 1086 1165 1132 1113 1191 1146 1084 1114 1028 1005 240 266 329 311 361 274 330 283 182 82 168 61 61 793 728 758 697 750 0 52 60 14 63 70 56 60 50 23 48 56 71 85 82 75 74 89 47 46 118 482 461 487 495 413 479 474 412 477 496 175 179 126 165 273 193 277 184 132 135 170 167 513 516 521 515 516 550 537 548 100 103 113 88 114 92 113 103 100 90 98 98 106 104 116 117 102 594 - 1106 1201 1145 1130 1206 1176 1155 1233 1189 1124 1154 1073 1045 255 287 337 327 371 290 351 310 211 134 211 87 86 789 723 753 688 744 52 0 46 57 18 29 35 16 5 36 43 7 100 126 73 48 70 90 74 96 136 527 508 531 539 459 525 519 456 519 538 226 224 163 213 320 243 324 228 179 175 216 210 550 554 560 552 556 587 573 589 149 154 162 138 164 142 163 153 149 140 150 148 155 155 163 165 154 580 - 1124 1222 1164 1144 1224 1191 1172 1251 1205 1144 1174 1086 1065 293 322 378 365 412 328 386 342 171 130 181 55 52 745 680 709 646 700 60 46 0 73 34 74 79 62 41 38 82 53 67 100 28 17 24 44 46 85 93 541 518 546 554 470 536 532 471 537 556 210 197 131 191 295 226 299 199 158 145 190 181 573 577 581 576 576 611 597 609 157 155 171 144 169 149 168 159 159 145 151 154 163 159 174 175 155 540 - 1053 1150 1093 1075 1154 1122 1102 1181 1136 1072 1102 1018 994 225 252 315 296 347 260 316 269 194 81 176 75 75 808 742 772 712 764 14 57 73 0 70 69 51 62 56 35 41 59 84 94 96 87 88 103 61 52 132 472 452 477 485 403 470 464 402 467 485 176 184 136 170 277 195 281 191 137 143 176 175 501 504 509 503 504 538 524 537 92 99 105 81 107 86 107 96 92 84 94 92 99 98 107 108 98 608 - 1122 1218 1162 1145 1223 1192 1172 1250 1205 1141 1170 1088 1062 273 305 355 345 389 308 370 328 204 143 210 84 82 772 707 736 670 727 63 18 34 70 0 42 53 31 16 42 62 23 97 127 59 32 58 78 72 102 127 542 522 546 555 473 540 534 472 536 554 231 225 161 216 322 248 326 228 182 174 217 209 568 571 577 570 572 604 590 605 162 165 175 150 176 155 175 165 162 152 161 160 168 167 177 178 165 562 - 1102 1196 1141 1129 1203 1174 1153 1230 1187 1119 1149 1073 1041 238 272 316 309 351 272 336 298 239 150 236 115 114 813 748 777 711 768 70 29 74 69 42 0 23 13 34 61 37 21 128 151 101 74 98 118 101 117 165 527 510 530 539 460 527 520 456 517 535 245 248 190 235 343 264 347 252 202 201 240 235 544 549 555 546 551 580 566 584 158 167 169 148 174 153 174 162 156 151 163 159 164 165 170 171 167 601 - 1079 1174 1118 1105 1180 1151 1130 1207 1164 1096 1126 1049 1018 220 253 302 292 336 255 317 277 234 131 224 110 109 823 758 787 723 778 56 35 79 51 53 23 0 25 39 55 14 30 122 140 106 84 102 122 95 102 164 503 487 507 516 437 504 497 433 494 512 228 234 181 220 328 247 332 240 188 190 226 223 522 526 532 524 529 558 544 562 136 146 147 126 152 131 152 141 134 130 142 137 142 144 148 149 146 615 - 1102 1198 1142 1128 1204 1174 1153 1230 1187 1120 1150 1072 1042 245 277 325 316 359 279 342 302 226 142 224 102 101 803 737 767 701 757 60 16 62 62 31 13 25 0 21 49 36 9 115 139 89 63 85 106 88 106 152 525 508 529 538 458 525 519 455 517 535 235 236 178 225 332 254 336 241 191 189 228 223 546 550 556 548 552 582 568 585 152 160 165 142 168 147 168 157 151 145 156 152 158 159 166 167 160 592 - 1106 1202 1146 1130 1207 1176 1156 1234 1190 1125 1155 1073 1046 258 290 341 330 375 293 354 312 206 132 206 82 81 784 719 748 683 739 50 5 41 56 16 34 39 21 0 33 46 13 95 122 68 44 64 85 69 92 131 527 507 531 539 458 525 519 456 520 538 222 219 159 209 316 240 320 223 176 171 211 205 552 556 561 554 557 588 575 589 148 153 161 136 163 141 162 152 148 139 148 147 154 153 163 164 152 576 - 1087 1184 1127 1108 1187 1155 1136 1214 1169 1107 1136 1050 1028 257 285 345 329 378 292 349 304 179 101 175 55 54 778 712 742 680 734 23 36 38 35 42 61 55 49 33 0 53 43 67 90 62 52 55 72 40 60 109 505 484 510 518 435 501 496 435 500 519 190 187 128 177 284 207 288 192 143 140 179 174 536 539 543 538 539 573 559 571 122 124 136 110 135 114 135 125 123 112 119 120 128 126 138 139 123 575 - 1066 1161 1105 1092 1167 1138 1116 1194 1151 1083 1113 1036 1005 212 244 296 284 330 247 308 267 229 119 216 106 106 827 762 792 728 783 48 43 82 41 62 37 14 36 46 53 0 40 117 133 110 90 104 123 91 93 162 490 473 494 502 423 490 483 419 481 499 216 225 174 210 318 235 321 231 178 183 217 215 509 514 519 511 516 546 532 549 122 133 133 113 139 117 138 127 120 116 129 123 128 130 134 135 133 621 - 1105 1200 1144 1129 1206 1175 1155 1233 1189 1122 1152 1073 1044 250 283 332 322 366 285 347 307 218 138 217 94 93 795 730 759 694 750 56 7 53 59 23 21 30 9 13 43 40 0 107 132 80 55 77 97 81 101 144 527 508 531 539 459 525 519 456 519 537 231 230 170 219 326 249 330 234 185 182 222 216 549 553 558 551 554 585 571 587 151 157 163 140 166 145 166 155 150 143 153 150 157 157 165 166 157 585 - 1092 1192 1132 1106 1190 1154 1137 1217 1169 1114 1143 1046 1034 304 326 396 374 427 338 388 338 112 89 114 13 15 729 664 694 637 687 71 100 67 84 97 128 122 115 95 67 117 107 0 37 62 82 54 50 27 50 50 505 479 511 518 433 497 494 437 506 525 149 130 64 126 229 163 233 132 94 78 123 114 550 552 555 553 549 588 575 580 128 117 142 116 134 119 133 128 132 115 112 122 134 125 146 147 116 538 - 1061 1162 1102 1073 1159 1122 1105 1185 1137 1084 1113 1013 1004 297 315 391 364 421 330 375 323 104 64 85 47 50 742 677 708 654 701 85 126 100 94 127 151 140 139 122 90 133 132 37 0 98 116 91 86 55 43 69 474 446 481 487 401 465 463 407 477 496 113 98 42 91 196 127 200 102 58 50 90 84 524 525 528 527 521 562 550 552 107 91 119 96 108 98 108 106 112 93 87 100 111 101 123 125 90 559 - 1141 1239 1181 1158 1240 1206 1188 1267 1220 1161 1191 1099 1082 319 347 405 391 439 354 411 365 152 140 172 52 49 718 652 682 619 673 82 73 28 96 59 101 106 89 68 62 110 80 62 98 0 30 9 20 51 95 73 556 532 561 569 484 550 546 486 554 572 211 190 121 187 288 225 292 190 155 136 183 171 593 595 599 595 594 630 617 626 172 167 186 159 182 164 181 174 175 160 162 168 178 173 189 191 166 514 - 1140 1237 1180 1160 1240 1207 1188 1266 1221 1159 1189 1102 1080 302 332 385 374 419 337 397 353 181 147 196 70 67 740 675 704 639 695 75 48 17 87 32 74 84 63 44 52 90 55 82 116 30 0 31 50 63 102 102 557 535 562 569 487 553 548 487 553 571 227 212 145 207 311 242 315 214 174 160 205 195 588 591 596 590 591 625 611 624 173 172 187 161 185 165 185 176 175 162 167 170 179 176 190 191 171 532 - 1132 1230 1172 1149 1231 1197 1179 1258 1212 1153 1182 1090 1073 312 340 399 384 432 347 404 358 149 131 167 44 41 724 658 688 625 679 74 70 24 88 58 98 102 85 64 55 104 77 54 91 9 31 0 20 42 86 71 547 523 552 560 475 541 537 478 545 564 203 184 115 180 282 217 286 184 148 130 176 166 584 587 591 586 586 622 608 618 164 158 178 151 173 155 172 165 166 151 154 159 170 164 181 182 158 521 - 1138 1237 1179 1154 1237 1202 1184 1264 1216 1160 1189 1094 1080 329 355 417 400 450 363 419 371 132 135 155 44 41 706 640 670 609 661 89 90 44 103 78 118 122 106 85 72 123 97 50 86 20 50 20 0 49 92 52 552 527 558 565 480 545 542 484 552 570 198 174 103 173 271 211 275 173 142 120 167 154 593 596 599 596 594 631 618 625 171 163 185 158 179 162 178 172 174 158 158 166 177 170 188 190 162 505 - 1090 1189 1131 1107 1190 1155 1137 1216 1169 1111 1141 1048 1032 285 309 375 355 407 319 372 324 139 89 138 15 15 748 682 712 653 705 47 74 46 61 72 101 95 88 69 40 91 81 27 55 51 63 42 49 0 44 72 505 480 511 518 433 499 495 436 504 522 164 153 90 145 251 180 255 156 112 102 145 138 544 547 550 547 545 582 569 577 122 116 137 109 131 113 130 124 125 109 111 118 128 122 140 141 115 552 - 1047 1146 1087 1063 1146 1111 1093 1172 1126 1068 1097 1004 989 257 277 350 325 381 290 339 289 147 45 123 49 51 778 713 743 687 736 46 96 85 52 102 117 102 106 92 60 93 101 50 43 95 102 86 92 44 0 99 461 436 467 474 389 455 451 392 460 479 130 132 86 119 227 148 230 139 86 92 124 122 502 504 507 505 502 540 527 534 80 72 94 67 87 70 87 80 83 66 67 74 85 78 97 98 71 588 - 1129 1230 1170 1140 1226 1188 1173 1253 1204 1152 1181 1079 1073 354 376 446 423 477 388 438 387 79 132 112 57 57 680 614 645 589 637 118 136 93 132 127 165 164 152 131 109 162 144 50 69 73 102 71 52 72 99 0 542 513 549 555 469 532 530 476 546 564 169 133 64 138 227 178 231 129 112 80 127 112 593 595 597 596 590 631 619 621 174 159 187 162 177 165 176 173 179 160 155 167 179 169 191 192 158 491 - 587 688 628 603 685 650 632 712 665 611 639 546 531 360 322 387 336 376 348 295 281 533 417 461 508 511 1162 1100 1132 1096 1129 482 527 541 472 542 527 503 525 527 505 490 527 505 474 556 557 547 552 505 461 542 0 46 12 13 74 33 19 71 44 48 386 442 486 423 416 387 413 454 436 473 442 461 120 110 100 123 89 143 142 101 384 389 370 397 374 392 374 382 382 396 394 388 378 383 367 366 390 1016 - 618 721 659 627 714 676 660 740 691 643 671 568 564 363 326 400 347 393 354 308 286 499 392 427 483 486 1122 1061 1093 1058 1089 461 508 518 452 522 510 487 508 507 484 473 508 479 446 532 535 523 527 480 436 513 46 0 57 57 50 19 27 68 85 93 353 407 455 389 375 352 373 419 404 441 408 427 163 155 145 167 134 189 186 147 362 364 348 374 350 370 351 359 361 373 369 365 355 360 346 344 365 980 - 581 681 621 599 679 645 626 706 659 603 632 542 524 360 321 384 333 371 346 292 280 541 423 469 514 517 1172 1110 1142 1105 1138 487 531 546 477 546 530 507 529 531 510 494 531 511 481 561 562 552 558 511 467 549 12 57 0 10 82 44 31 75 35 37 394 451 494 431 426 396 423 462 443 481 451 469 109 99 88 112 77 132 130 90 389 395 375 402 379 398 380 387 387 401 400 393 383 389 372 371 396 1024 - 574 675 615 591 672 638 619 698 652 597 626 534 517 370 331 394 343 381 356 302 290 546 430 475 521 524 1175 1113 1145 1109 1142 495 539 554 485 555 539 516 538 539 518 502 539 518 487 569 569 560 565 518 474 555 13 57 10 0 88 41 30 83 44 43 400 456 500 436 429 401 426 467 449 487 456 474 114 104 92 117 82 135 135 90 397 402 383 410 387 405 387 395 395 409 407 401 391 396 380 379 403 1029 - 661 762 702 674 758 722 705 784 736 685 713 615 605 315 280 358 304 353 308 267 241 458 345 387 436 439 1090 1028 1060 1022 1056 413 459 470 403 473 460 437 458 458 435 423 459 433 401 484 487 475 480 433 389 469 74 50 82 88 0 66 62 32 93 108 312 368 412 348 345 313 343 380 361 399 368 387 167 161 155 170 146 199 193 168 313 317 299 326 302 322 303 311 312 325 322 317 307 312 297 296 318 941 - 599 702 640 609 695 657 641 721 672 624 652 549 544 374 337 407 355 398 364 315 296 518 410 447 501 504 1142 1080 1112 1077 1109 479 525 536 470 540 527 504 525 525 501 490 525 497 465 550 553 541 545 499 455 532 33 19 44 41 66 0 16 77 77 82 372 427 475 408 394 372 392 438 424 461 428 446 153 144 133 156 122 176 175 131 379 383 366 392 368 388 369 377 378 391 387 383 373 378 363 362 384 1000 - 599 701 640 612 696 660 643 723 675 624 652 554 544 362 324 393 341 383 351 301 283 519 407 447 498 501 1146 1084 1116 1080 1113 474 519 532 464 534 520 497 519 519 496 483 519 494 463 546 548 537 542 495 451 530 19 27 31 30 62 16 0 67 61 67 372 428 474 409 399 373 397 440 423 460 428 447 138 129 119 142 108 163 161 120 375 379 361 388 364 383 365 373 373 387 384 378 369 374 358 357 380 1001 - 655 755 695 674 754 720 701 780 734 677 706 617 597 296 259 333 280 326 287 241 219 471 349 400 440 443 1108 1045 1077 1037 1073 412 456 471 402 472 456 433 455 456 435 419 456 437 407 486 487 478 484 436 392 476 71 68 75 83 32 77 67 0 73 90 324 382 422 361 366 328 364 394 371 409 381 399 141 136 132 144 124 175 167 149 314 321 300 327 305 323 306 313 313 327 325 318 308 314 298 296 322 954 - 587 686 627 612 687 657 636 714 670 608 637 557 528 335 295 354 304 340 320 263 255 543 418 472 509 511 1180 1117 1149 1110 1145 477 519 537 467 536 517 494 517 520 500 481 519 506 477 554 553 545 552 504 460 546 44 85 35 44 93 77 61 73 0 19 397 454 493 433 437 400 435 466 443 481 454 472 79 71 63 82 53 107 103 77 382 389 367 395 373 390 374 380 379 394 394 386 376 382 364 363 390 1026 - 569 667 609 594 669 639 618 696 652 589 618 540 510 351 311 366 318 351 334 276 270 561 436 490 527 530 1197 1135 1167 1128 1163 496 538 556 485 554 535 512 535 538 519 499 537 525 496 572 571 564 570 522 479 564 48 93 37 43 108 82 67 90 19 0 415 472 511 451 453 418 451 484 461 499 472 490 72 62 51 75 41 95 93 60 400 408 386 413 392 409 392 399 398 413 413 405 394 401 383 381 409 1044 - 971 1074 1012 976 1066 1025 1011 1092 1041 996 1024 914 916 306 309 400 360 423 332 358 303 146 97 75 159 162 789 725 757 714 752 175 226 210 176 231 245 228 235 222 190 216 231 149 113 211 227 203 198 164 130 169 386 353 394 400 312 372 372 324 397 415 0 58 106 36 108 20 110 71 57 90 57 75 455 454 453 457 446 492 481 474 115 92 116 115 100 113 99 109 121 111 94 108 113 102 119 119 92 630 - 1025 1128 1066 1027 1119 1077 1064 1145 1093 1051 1079 964 971 350 358 445 409 470 378 410 355 92 117 22 143 145 731 667 699 656 694 179 224 197 184 225 248 234 236 219 187 225 230 130 98 190 212 184 174 153 132 133 442 407 451 456 368 427 428 382 454 472 58 0 71 25 98 55 102 13 48 54 8 22 513 512 511 516 503 550 539 531 151 126 156 146 139 145 139 145 157 141 126 142 151 138 159 160 126 573 - 1073 1175 1114 1080 1169 1130 1115 1195 1145 1097 1125 1019 1017 336 352 431 401 459 368 410 357 64 96 52 77 79 710 645 677 626 670 126 163 131 136 161 190 181 178 159 128 174 170 64 42 121 145 115 103 90 86 64 486 455 494 500 412 475 474 422 493 511 106 71 0 74 168 114 172 70 51 17 64 51 545 545 546 548 540 582 571 569 140 119 150 130 136 131 136 137 145 127 116 131 143 131 154 156 118 535 - 1007 1110 1048 1011 1102 1061 1047 1128 1077 1032 1060 949 952 326 333 421 384 446 354 385 330 110 97 39 137 140 754 690 722 678 716 165 213 191 170 216 235 220 225 209 177 210 219 126 91 187 207 180 173 145 119 138 423 389 431 436 348 408 409 361 433 451 36 25 74 0 108 41 111 38 34 57 21 39 490 490 489 493 482 528 517 510 128 103 132 124 115 122 115 122 134 119 103 119 127 115 135 136 103 593 - 982 1088 1024 975 1073 1026 1016 1098 1043 1012 1038 910 932 409 408 502 458 522 433 451 396 167 202 116 241 244 747 686 718 686 715 273 320 295 277 322 343 328 332 316 284 318 326 229 196 288 311 282 271 251 227 227 416 375 426 429 345 394 399 366 437 453 108 98 168 108 0 88 4 98 141 152 106 117 505 502 498 508 489 540 532 513 223 200 223 223 207 221 207 217 229 218 202 216 221 210 226 226 200 617 - 970 1073 1011 972 1064 1022 1009 1090 1038 996 1023 910 916 324 326 418 377 440 349 373 318 147 116 76 173 176 782 719 751 710 746 193 243 226 195 248 264 247 254 240 207 235 249 163 127 225 242 217 211 180 148 178 387 352 396 401 313 372 373 328 400 418 20 55 114 41 88 0 91 67 69 98 57 76 460 459 458 463 450 497 487 477 135 112 135 135 119 133 119 129 141 131 114 128 133 122 138 138 112 628 - 979 1085 1021 971 1069 1023 1013 1095 1040 1009 1035 907 929 410 409 503 459 523 434 451 396 171 205 120 245 248 750 689 721 690 718 277 324 299 281 326 347 332 336 320 288 321 330 233 200 292 315 286 275 255 230 231 413 373 423 426 343 392 397 364 435 451 110 102 172 111 4 91 0 103 145 156 110 121 503 500 496 506 487 538 530 510 226 203 225 226 210 223 209 220 231 221 204 219 223 213 228 228 203 621 - 1036 1140 1077 1037 1130 1088 1075 1156 1104 1062 1090 974 982 362 370 457 421 482 390 423 367 82 127 18 145 147 718 654 686 643 681 184 228 199 191 228 252 240 241 223 192 231 234 132 102 190 214 184 173 156 139 129 454 419 462 467 380 438 440 394 466 484 71 13 70 38 98 67 103 0 57 54 18 19 525 524 524 528 516 562 552 543 162 138 167 157 151 156 151 157 168 152 137 153 162 150 171 172 137 562 - 1022 1124 1063 1030 1118 1079 1064 1144 1094 1046 1074 968 966 308 318 403 369 429 337 374 319 104 70 46 104 107 754 689 721 673 715 132 179 158 137 182 202 188 191 176 143 178 185 94 58 155 174 148 142 112 86 112 436 404 443 449 361 424 423 371 443 461 57 48 51 34 141 69 145 57 0 38 40 45 496 496 497 499 490 534 522 519 107 84 114 101 99 101 98 103 114 97 82 99 108 96 118 120 83 584 - 1059 1161 1100 1066 1155 1115 1101 1181 1131 1084 1112 1004 1004 335 349 430 399 458 366 406 352 68 94 36 91 93 718 653 684 636 678 135 175 145 143 174 201 190 189 171 140 183 182 78 50 136 160 130 120 102 92 80 473 441 481 487 399 461 460 409 481 499 90 54 17 57 152 98 156 54 38 0 47 36 534 534 535 537 528 571 560 557 136 114 146 127 131 128 130 133 142 124 112 128 139 126 150 151 113 546 - 1026 1129 1067 1029 1120 1079 1066 1147 1095 1052 1079 967 972 344 352 439 403 464 372 405 350 90 110 19 135 138 733 669 700 657 695 170 216 190 176 217 240 226 228 211 179 217 222 123 90 183 205 176 167 145 124 127 442 408 451 456 368 428 428 381 454 472 57 8 64 21 106 57 110 18 40 47 0 19 511 511 510 514 503 549 538 530 144 120 149 139 133 138 133 139 150 135 119 136 144 132 153 154 119 573 - 1045 1148 1086 1048 1139 1098 1084 1165 1114 1070 1098 985 990 353 363 448 414 474 382 417 362 72 115 1 126 129 716 652 684 639 678 167 210 181 175 209 235 223 223 205 174 215 216 114 84 171 195 166 154 138 122 112 461 427 469 474 387 446 447 399 472 490 75 22 51 39 117 76 121 19 45 36 19 0 529 528 528 532 520 566 555 549 152 128 159 146 143 146 143 148 159 142 127 144 153 141 163 164 128 555 - 560 652 598 599 663 640 615 690 651 575 605 550 498 338 296 334 292 313 315 249 258 598 462 529 551 553 1243 1179 1211 1168 1206 513 550 573 501 568 544 522 546 552 536 509 549 550 524 593 588 584 593 544 502 593 120 163 109 114 167 153 138 141 79 72 455 513 545 490 505 460 503 525 496 534 511 529 0 12 27 3 35 38 27 57 423 434 409 436 417 432 418 422 419 436 438 428 417 425 405 404 435 1080 - 554 647 593 591 657 633 608 684 645 570 600 542 492 345 304 344 301 324 323 258 265 598 464 529 553 555 1241 1178 1210 1167 1205 516 554 577 504 571 549 526 550 556 539 514 553 552 525 595 591 587 596 547 504 595 110 155 99 104 161 144 129 136 71 62 454 512 545 490 502 459 500 524 496 534 511 528 12 0 15 14 24 39 32 46 425 436 411 438 419 434 419 424 422 438 440 430 419 427 407 406 437 1080 - 547 642 586 582 649 624 600 676 636 564 594 531 486 355 313 356 312 337 333 269 274 598 466 528 556 559 1239 1176 1208 1167 1204 521 560 581 509 577 555 532 556 561 543 519 558 555 528 599 596 591 599 550 507 597 100 145 88 92 155 133 119 132 63 51 453 511 546 489 498 458 496 524 497 535 510 528 27 15 0 29 11 44 42 34 428 438 414 441 421 437 422 427 425 441 443 433 422 430 411 409 439 1081 - 558 650 596 598 661 639 613 688 650 573 603 549 496 339 297 334 292 313 316 249 260 601 465 532 553 556 1246 1182 1214 1171 1209 515 552 576 503 570 546 524 548 554 538 511 551 553 527 595 590 586 596 547 505 596 123 167 112 117 170 156 142 144 82 75 457 516 548 493 508 463 506 528 499 537 514 532 3 14 29 0 38 35 24 58 425 437 411 438 419 434 420 425 422 439 441 431 419 428 408 406 438 1083 - 550 646 590 583 652 626 602 679 638 568 598 532 490 354 313 359 313 340 334 271 274 591 461 521 551 553 1231 1168 1200 1159 1196 516 556 576 504 572 551 529 552 557 539 516 554 549 521 594 591 586 594 545 502 590 89 134 77 82 146 122 108 124 53 41 446 503 540 482 489 450 487 516 490 528 503 520 35 24 11 38 0 55 53 34 423 432 409 436 416 432 416 422 420 436 437 428 417 424 405 404 433 1074 - 525 617 563 568 629 608 582 656 619 539 570 521 463 370 328 360 320 337 345 278 292 636 500 566 588 591 1279 1216 1248 1205 1243 550 587 611 538 604 580 558 582 588 573 546 585 588 562 630 625 622 631 582 540 631 143 189 132 135 199 176 163 175 107 95 492 550 582 528 540 497 538 562 534 571 549 566 38 39 44 35 55 0 15 53 460 472 446 473 455 469 455 460 457 474 476 466 455 463 443 441 473 1118 - 540 631 578 583 644 624 597 671 634 554 585 537 478 355 313 345 305 322 330 263 277 625 487 556 576 578 1269 1206 1238 1194 1233 537 573 597 524 590 566 544 568 575 559 532 571 575 550 617 611 608 618 569 527 619 142 186 130 135 193 175 161 167 103 93 481 539 571 517 532 487 530 552 522 560 538 555 27 32 42 24 53 15 0 60 447 459 433 460 442 456 443 447 444 461 464 453 442 450 430 428 460 1106 - 517 613 557 549 619 592 569 646 605 535 565 499 457 387 346 390 345 370 367 303 307 619 492 549 582 585 1257 1194 1226 1187 1222 548 589 609 537 605 584 562 585 589 571 549 587 580 552 626 624 618 625 577 534 621 101 147 90 90 168 131 120 149 77 60 474 531 569 510 513 477 510 543 519 557 530 549 57 46 34 58 34 53 60 0 454 463 440 467 447 463 448 453 452 467 468 459 448 456 437 436 464 1103 - 968 1067 1009 987 1068 1034 1016 1095 1049 989 1018 929 910 200 212 296 263 322 230 270 217 203 44 153 128 131 849 783 815 761 808 100 149 157 92 162 158 136 152 148 122 122 151 128 107 172 173 164 171 122 80 174 384 362 389 397 313 379 375 314 382 400 115 151 140 128 223 135 226 162 107 136 144 152 423 425 428 425 423 460 447 454 0 24 14 13 18 9 18 6 6 14 25 9 6 13 17 19 25 665 - 975 1075 1016 991 1074 1039 1021 1101 1054 997 1026 932 918 224 235 320 286 346 254 292 238 182 28 129 119 122 830 764 796 744 789 103 154 155 99 165 167 146 160 153 124 133 157 117 91 167 172 158 163 116 72 159 389 364 395 402 317 383 379 321 389 408 92 126 119 103 200 112 203 138 84 114 120 128 434 436 438 437 432 472 459 463 24 0 31 23 17 20 17 19 31 18 5 16 25 12 35 37 1 650 - 954 1053 995 973 1054 1020 1001 1080 1034 975 1004 915 896 194 204 290 255 315 223 260 206 213 56 160 142 145 860 795 826 774 819 113 162 171 105 175 169 147 165 161 136 133 163 142 119 186 187 178 185 137 94 187 370 348 375 383 299 366 361 300 367 386 116 156 150 132 223 135 225 167 114 146 149 159 409 411 414 411 409 446 433 440 14 31 0 27 16 23 17 14 13 27 34 20 8 19 4 5 32 678 - 981 1080 1022 1000 1081 1047 1028 1108 1061 1002 1031 941 923 208 222 303 272 330 239 280 228 193 33 147 115 118 838 772 803 750 796 88 138 144 81 150 148 126 142 136 110 113 140 116 96 159 161 151 158 109 67 162 397 374 402 410 326 392 388 327 395 413 115 146 130 124 223 135 226 157 101 127 139 146 436 438 441 438 436 473 460 467 13 23 27 0 26 5 26 15 17 5 21 11 19 17 30 32 23 653 - 960 1059 1000 976 1058 1024 1006 1085 1038 981 1010 918 901 211 220 306 271 331 239 275 221 198 45 144 135 138 847 782 813 761 806 114 164 169 107 176 174 152 168 163 135 139 166 134 108 182 185 173 179 131 87 177 374 350 379 387 302 368 364 305 373 392 100 139 136 115 207 119 210 151 99 131 133 143 417 419 421 419 416 455 442 447 18 17 16 26 0 22 1 12 23 24 22 16 14 10 20 21 18 667 - 977 1076 1017 995 1077 1043 1024 1103 1057 998 1027 937 919 207 221 303 271 330 238 279 226 195 35 146 119 122 840 774 806 752 799 92 142 149 86 155 153 131 147 141 114 117 145 119 98 164 165 155 162 113 70 165 392 370 398 405 322 388 383 323 390 409 113 145 131 122 221 133 223 156 101 128 138 146 432 434 437 434 432 469 456 463 9 20 23 5 22 0 21 11 14 5 19 6 15 13 27 28 20 656 - 960 1059 1001 977 1059 1025 1006 1086 1039 981 1011 918 902 211 220 306 271 332 240 276 222 198 44 143 135 137 846 781 812 761 806 113 163 168 107 175 174 152 168 162 135 138 166 133 108 181 185 172 178 130 87 176 374 351 380 387 303 369 365 306 374 392 99 139 136 115 207 119 209 151 98 130 133 143 418 419 422 420 416 455 443 448 18 17 17 26 1 21 0 12 22 23 21 15 14 9 21 22 18 666 - 967 1066 1007 985 1066 1032 1014 1093 1046 988 1017 926 909 205 216 300 267 327 235 273 220 200 42 149 129 131 846 781 812 760 806 103 153 159 96 165 162 141 157 152 125 127 155 128 106 174 176 165 172 124 80 173 382 359 387 395 311 377 373 313 380 399 109 145 137 122 217 129 220 157 103 133 139 148 422 424 427 425 422 460 447 453 6 19 14 15 12 11 12 0 12 14 21 6 6 7 18 19 20 664 - 966 1064 1006 986 1066 1033 1014 1093 1047 987 1016 927 908 194 206 290 257 316 224 264 211 209 49 159 132 134 854 789 820 766 813 100 149 159 92 162 156 134 151 148 123 120 150 132 112 175 175 166 174 125 83 179 382 361 387 395 312 378 373 313 379 398 121 157 145 134 229 141 231 168 114 142 150 159 419 422 425 422 420 457 444 452 6 31 13 17 23 14 22 12 0 19 31 15 9 19 15 16 31 670 - 981 1080 1021 999 1080 1046 1028 1107 1061 1002 1031 940 923 212 225 307 275 334 242 283 230 190 30 143 115 117 835 770 801 748 794 90 140 145 84 152 151 130 145 139 112 116 143 115 93 160 162 151 158 109 66 160 396 373 401 409 325 391 387 327 394 413 111 141 127 119 218 131 221 152 97 124 135 142 436 438 441 439 436 474 461 467 14 18 27 5 24 5 23 14 19 0 16 8 19 14 31 32 18 651 - 980 1080 1021 996 1079 1044 1026 1105 1058 1002 1031 937 922 225 237 321 288 347 255 294 240 179 24 128 115 117 826 761 792 740 786 98 150 151 94 161 163 142 156 148 119 129 153 112 87 162 167 154 158 111 67 155 394 369 400 407 322 387 384 325 394 413 94 126 116 103 202 114 204 137 82 112 119 127 438 440 443 441 437 476 464 468 25 5 34 21 22 19 21 21 31 16 0 17 27 15 38 39 4 646 - 973 1072 1013 991 1072 1038 1020 1099 1052 994 1023 932 915 209 221 304 271 331 239 279 225 195 36 145 123 125 841 776 807 754 800 98 148 154 92 160 159 137 152 147 120 123 150 122 100 168 170 159 166 118 74 167 388 365 393 401 317 383 378 318 386 405 108 142 131 119 216 128 219 153 99 128 136 144 428 430 433 431 428 466 453 459 9 16 20 11 16 6 15 6 15 8 17 0 12 7 24 25 17 658 - 962 1061 1003 981 1062 1028 1009 1088 1042 983 1012 922 904 200 210 295 261 321 229 267 214 206 48 154 134 136 852 787 818 766 812 106 155 163 99 168 164 142 158 154 128 128 157 134 111 178 179 170 177 128 85 179 378 355 383 391 307 373 369 308 376 394 113 151 143 127 221 133 223 162 108 139 144 153 417 419 422 419 417 455 442 448 6 25 8 19 14 15 14 6 9 19 27 12 0 13 12 14 25 670 - 969 1068 1009 986 1068 1033 1015 1094 1048 990 1019 927 911 212 223 308 274 334 242 280 226 193 37 141 126 129 841 776 807 755 800 104 155 159 98 167 165 144 159 153 126 130 157 125 101 173 176 164 170 122 78 169 383 360 389 396 312 378 374 314 382 401 102 138 131 115 210 122 213 150 96 126 132 141 425 427 430 428 424 463 450 456 13 12 19 17 10 13 9 7 19 14 15 7 13 0 24 25 13 660 - 951 1050 992 970 1051 1018 999 1078 1032 972 1001 912 893 190 200 286 251 311 219 256 202 217 60 164 146 148 864 799 830 778 824 116 163 174 107 177 170 148 166 163 138 134 165 146 123 189 190 181 188 140 97 191 367 346 372 380 297 363 358 298 364 383 119 159 154 135 226 138 228 171 118 150 153 163 405 407 411 408 405 443 430 437 17 35 4 30 20 27 21 18 15 31 38 24 12 24 0 1 36 682 - 950 1048 990 969 1049 1016 997 1076 1030 970 1000 911 891 190 199 285 250 310 218 255 201 218 61 165 147 149 866 800 831 779 825 117 165 175 108 178 171 149 167 164 139 135 166 147 125 191 191 182 190 141 98 192 366 344 371 379 296 362 357 296 363 381 119 160 156 136 226 138 228 172 120 151 154 164 404 406 409 406 404 441 428 436 19 37 5 32 21 28 22 19 16 32 39 25 14 25 1 0 37 683 - 976 1076 1017 992 1075 1040 1022 1102 1054 998 1027 933 919 225 236 320 286 347 255 292 239 181 27 129 118 121 829 763 795 743 788 102 154 155 98 165 167 146 160 152 123 133 157 116 90 166 171 158 162 115 71 158 390 365 396 403 318 384 380 322 390 409 92 126 118 103 200 112 203 137 83 113 119 128 435 437 439 438 433 473 460 464 25 1 32 23 18 20 18 20 31 18 4 17 25 13 36 37 0 649 - 1596 1701 1638 1592 1688 1643 1633 1714 1660 1623 1651 1527 1543 833 860 917 904 951 867 924 876 483 623 554 541 540 241 187 205 120 192 594 580 540 608 562 601 615 592 576 575 621 585 538 559 514 532 521 505 552 588 491 1016 980 1024 1029 941 1000 1001 954 1026 1044 630 573 535 593 617 628 621 562 584 546 573 555 1080 1080 1081 1083 1074 1118 1106 1103 665 650 678 653 667 656 666 664 670 651 646 658 670 660 682 683 649 0 - 0 0 0 3 0 120 0 280 179 392 1 0 0 0 0 0 1 0 394 0 0 47 59 736 184 0 0 0 3 0 0 3 0 6 0 269 1 0 1 0 867 86 0 212 0 1 0 1 899 0 0 32 362 0 40 0 32 0 212 0 0 1 2764 0 0 3 7489 187 0 0 60 4808 0 0 0 0 3015 131 0 0 1 0 0 936 0 0 0 39 0 48 0 0 32 0 0 0 0 0 0 0 - 0 0 0 0 0 172 0 0 0 0 0 439 0 319 0 0 9 0 408 4 0 0 4 0 0 0 0 662 7 6 4 0 0 6888 277 0 1 18 4 46 47 0 0 120 0 121 0 0 0 3 0 6855 0 3 0 0 5640 0 0 1707 5071 1655 0 0 0 0 13 22 0 1 7480 843 0 0 0 0 2 0 0 0 0 1714 0 0 2948 4 0 0 994 9 0 0 0 0 1 0 86 3119 1 19 - 0 16 0 6 0 0 0 3141 0 513 503 0 177 0 0 0 0 0 0 20 241 2 18 1546 0 0 0 0 1291 8 0 43 0 0 4 0 0 402 0 0 0 0 0 12 1 1 7215 0 1 0 0 0 0 0 0 92 3271 826 1819 0 0 172 0 21 0 0 0 0 0 1962 3 0 0 1438 0 0 0 3787 2889 0 0 0 0 0 0 1314 0 0 0 160 1 0 1 0 0 17 1 0 75 1913 - 0 6 0 0 0 0 2 0 4 233 11 0 0 0 2018 1254 0 0 0 3 0 7030 0 6 0 1807 0 0 0 0 38 2161 0 0 0 0 0 0 0 0 0 60 1 6669 0 0 0 0 0 20 148 1 13 0 0 0 410 262 7919 0 14 2611 229 89 5 0 0 0 8010 0 0 35 0 0 148 0 108 0 480 72 0 6 2126 16 0 0 0 0 0 0 0 0 42 2272 7 3 0 3 0 0 - 140 0 8 0 0 163 0 0 40 0 396 2 0 0 1 4802 0 0 0 57 0 172 0 0 0 0 0 0 920 0 8 0 9 0 379 0 1 0 0 0 2 80 0 0 0 36 42 0 4667 0 122 0 1760 5 1 37 1 0 137 0 0 0 0 225 0 0 0 2 2 714 2795 19 7117 489 0 92 0 711 0 5 0 0 0 1139 0 1 2 2 2 0 604 1 267 47 17 4 0 0 5316 2009 - 1 0 943 0 0 0 0 0 271 0 7942 13 0 0 0 1 0 0 0 0 2 1054 198 5135 0 0 0 0 0 59 649 25 0 2612 0 5 0 13 0 0 7474 0 0 207 0 460 146 460 89 0 0 0 0 0 0 0 5290 0 347 18 0 0 0 0 0 95 0 0 0 0 0 0 0 2 0 6602 0 5357 1024 0 1 1042 0 1 0 0 230 0 327 0 1 2651 0 0 0 0 0 0 52 0 - 399 0 0 3068 8088 1 0 70 4220 0 14 0 0 73 0 0 0 0 3 0 1423 0 4 0 0 0 0 3293 0 1 0 0 724 2337 0 5054 0 76 0 0 0 0 0 597 0 2793 0 0 0 0 0 500 0 26 0 0 0 0 0 957 3524 1879 0 0 0 0 28 0 5970 5 4 467 27 0 4 3990 12 0 0 3616 3 2669 1 43 314 0 188 13 3693 6 0 3 0 0 0 0 0 3918 86 2 - 0 0 0 0 0 102 1 0 0 0 0 0 2765 0 20 0 48 0 66 0 1 0 0 65 0 0 0 15 20 35 2 1 0 1222 1 0 2 0 0 0 0 64 0 6096 2 365 35 10 2 265 0 0 0 0 69 0 1399 0 853 4239 0 0 0 0 0 18 0 1 0 225 0 1 0 0 12 7861 106 0 3327 0 10 0 669 0 38 9 0 0 4 0 7553 0 0 42 0 0 1 0 0 1 - 3 33 0 717 725 1039 1027 0 0 2 0 3365 2 0 0 4591 2587 6 0 1275 0 1 75 332 0 0 0 510 0 0 18 0 4 0 0 0 74 2470 0 0 0 0 3447 0 543 0 0 0 764 0 0 0 18 0 0 0 0 0 0 0 0 0 0 0 0 209 0 4885 0 0 0 0 3316 0 5 0 0 1162 0 0 3786 7 376 8 0 0 731 3 0 70 0 10 94 851 2 121 20 176 0 0 - 14 0 44 1226 0 442 0 3766 12 0 0 0 0 0 1 17 2232 0 0 0 0 0 0 0 1 444 0 1 4 0 16 0 2 0 0 0 5 1221 4842 1 0 660 3 0 973 0 1505 0 0 0 1 0 0 670 0 0 107 0 167 0 4 0 22 3034 0 0 28 0 50 1699 0 0 1142 4693 14 7 0 25 0 0 0 0 0 16 0 7416 0 0 17 0 4636 0 0 0 0 127 584 1 0 1739 - 0 1566 0 0 0 62 0 0 0 7111 0 0 0 0 0 0 0 13 17 2571 5911 0 0 0 671 0 0 899 0 0 5 0 0 0 1785 0 2 15 0 0 0 2 8 2728 0 0 0 28 0 1 0 0 3821 39 3951 0 0 0 20 0 4711 33 9 0 0 232 4 0 204 0 1 0 0 1 0 0 28 0 0 0 8 655 3294 0 0 1 0 0 28 7 0 0 4436 25 0 0 0 182 8 2443 - 0 75 210 1 2 0 0 7 0 0 0 0 0 0 0 1 0 21 1 0 846 7249 1631 0 0 0 0 0 2 0 9 0 1185 0 40 0 0 0 0 0 0 495 1858 0 0 0 0 0 560 0 0 0 0 0 0 0 202 0 76 0 691 9 946 1178 45 0 0 0 5 4297 0 1671 51 0 55 0 840 24 0 0 4 2293 31 7831 429 0 3 2 0 14 0 0 360 0 0 6667 2077 2662 6 1 - 0 0 0 1 2 0 2 0 0 137 481 0 0 6 0 18 0 2 0 5 0 0 0 5 0 1013 0 0 0 6 11 0 0 558 0 1817 337 0 0 0 4 0 34 0 1 0 98 1186 22 0 0 0 14 766 0 0 0 1 2927 5779 184 81 0 12 0 78 0 0 60 192 0 0 0 0 6094 0 0 0 0 0 0 0 0 4 0 0 45 1630 0 0 0 0 7125 20 3 544 504 1254 92 428 - 0 1 0 0 1 0 0 199 1 1 237 0 39 0 0 0 0 0 0 0 0 0 0 5 111 5 106 0 0 0 0 30 0 3928 167 0 1 162 0 0 0 0 2197 7691 0 0 5156 3 4364 0 0 1 1189 0 0 0 1 0 346 2564 696 4296 0 0 68 2263 0 0 1742 1 7597 11 1 0 468 0 0 231 0 6 0 152 0 134 9 11 6 22 0 0 0 604 11 26 244 35 184 7 0 2 - 0 22 0 0 34 0 0 0 0 52 21 0 0 0 0 0 0 0 7362 45 4 12 0 16 0 31 0 0 1171 0 0 0 549 3 6610 0 0 0 489 0 0 22 35 67 607 0 0 9 36 38 0 0 0 426 1 0 0 348 97 54 0 0 1 0 0 0 0 0 0 0 0 0 7 0 20 600 1126 0 0 0 1141 0 160 0 0 0 451 5033 0 48 40 0 32 0 0 1804 0 0 0 0 - 170 517 2981 6186 25 0 30 4137 0 1122 19 0 0 0 0 0 0 0 113 3 1 6685 0 85 461 0 9 0 0 6250 2 7451 583 0 4 0 0 0 0 0 165 675 215 8 0 36 0 24 0 0 1100 0 8 0 1 1 165 0 0 0 0 225 0 0 57 0 2 0 2 0 2 0 4219 0 16 0 0 0 1573 2 70 0 555 3422 0 0 23 0 0 0 451 1 7868 0 0 0 0 0 0 0 - 0 0 0 665 0 2 0 1 0 1 0 1 27 8 2 0 0 0 0 0 0 0 734 10 2 368 0 0 0 0 0 0 11 17 0 3423 6 0 0 236 0 5029 0 765 5 33 0 0 4 1210 0 43 206 0 0 4032 169 128 0 3091 6 3989 1 0 0 646 0 0 4 0 0 126 3 4 0 0 52 0 18 4 22 0 0 7725 0 4305 121 116 0 115 228 0 0 0 0 16 0 33 0 0 - 57 1 952 1685 0 1601 0 50 0 5539 0 1 0 0 0 0 17 0 12 0 0 55 0 2397 0 0 6937 0 0 1 0 0 0 0 1155 0 1562 0 2876 40 0 3 1652 0 2406 0 85 0 23 0 1697 0 0 0 0 0 85 79 0 2 6208 0 0 0 0 0 0 114 0 1 9 6302 1089 5153 0 1428 0 0 0 0 0 0 0 0 3050 0 0 816 0 1547 59 0 0 125 2 232 8 122 0 3 - 2049 181 55 117 9 0 0 0 184 0 0 0 0 1 9 81 7233 0 0 0 0 0 0 0 0 121 0 0 0 0 3 12 1037 0 0 428 2 0 0 104 0 2 0 0 0 36 1 0 212 0 0 0 0 1316 0 0 0 4073 0 9 0 505 0 641 0 1 0 0 0 0 0 0 51 596 1171 4297 0 0 0 0 0 0 2 0 0 1036 0 3 0 0 1031 2047 302 111 0 0 0 0 102 0 - 0 0 1083 185 0 134 0 0 0 2 52 0 1389 0 0 736 97 0 0 0 1464 1 0 1 1106 488 1256 19 0 0 18 0 0 6 0 35 1371 302 2 50 1 0 556 1 0 0 1841 0 0 0 0 32 3457 0 0 0 23 0 0 0 1821 2 4 0 445 671 0 36 0 2 0 0 0 0 0 8 0 0 1 0 0 1 0 0 0 13 158 51 0 170 156 0 2 0 7640 0 0 443 0 24 - 0 0 23 0 1 338 20 1 0 974 197 0 0 0 0 0 103 0 3178 1511 0 1905 201 3833 0 0 24 0 0 0 0 0 1 0 0 0 6 0 9 0 0 0 0 0 0 0 0 0 3 0 95 0 21 18 637 0 0 4790 0 0 0 2460 0 0 0 0 7 0 0 0 20 0 74 0 331 14 2782 0 0 1 0 0 479 0 46 4 0 527 0 0 0 0 0 948 1532 1 0 0 0 0 - 483 0 9 0 0 10 0 0 0 0 2 4 36 0 0 1 0 29 0 0 0 0 0 0 0 0 0 1 69 20 191 706 227 0 154 3 42 11 0 7384 0 0 0 33 0 2 5 270 34 0 0 1 0 1430 0 0 0 0 6917 0 29 0 0 34 57 14 0 0 0 949 17 0 0 0 0 0 0 3125 0 2 209 98 617 0 146 2 0 40 0 0 0 5 0 0 0 26 14 2 0 0 - 280 0 2 146 0 0 0 70 0 0 7 0 0 0 5160 0 0 588 0 0 61 0 0 426 0 1 6064 1 3252 2 0 1 0 0 6392 23 1 628 0 1 95 0 503 0 4 0 0 5 0 0 7 0 2 6344 6206 0 0 0 0 0 8 5252 15 485 0 0 0 337 0 3349 527 170 0 1152 0 0 0 0 0 0 91 0 0 0 1 0 0 0 0 238 1170 1 339 0 0 0 0 579 4 0 - 0 0 0 339 0 0 0 44 831 0 1185 0 0 0 2386 206 0 40 0 1057 452 0 0 0 0 537 5 117 1 0 13 87 1 0 9 0 104 0 11 0 1727 0 0 0 5 1 0 0 0 1348 2794 1 0 0 187 1 15 0 4706 346 223 0 0 0 38 0 0 27 0 12 0 3312 0 5208 0 803 3619 0 74 0 0 0 4 0 365 0 2 1055 0 20 716 0 0 0 0 453 4996 1 428 1092 - 871 246 0 0 0 0 31 0 0 924 0 0 584 820 39 0 0 0 0 0 17 0 9 0 0 327 19 0 2440 0 22 7 789 123 4 0 0 35 0 0 0 0 6 1 1187 1 0 1 0 0 0 0 0 0 7926 0 0 0 5151 1312 1043 0 4237 31 3 28 46 0 0 307 0 2475 0 1 16 0 0 4 0 101 0 5 1 0 4960 0 0 0 0 0 1 0 225 0 0 0 18 3 0 34 - 2638 1 5 8 1 4 0 0 0 0 0 5 0 1 0 1 0 0 406 0 0 453 6615 0 0 0 0 0 6 0 0 500 0 3 0 747 480 2 0 0 167 0 80 0 3013 0 0 9 3 3637 0 0 0 5 7777 1 0 0 0 617 50 1292 0 0 0 6 1759 2185 335 0 0 0 0 2 303 434 0 0 0 0 2264 259 0 67 2575 0 0 0 0 0 0 1308 215 29 0 1446 1 0 0 0 - 4608 93 1 0 0 0 4 0 0 8 0 0 0 0 0 0 7 3 0 0 3 223 1 0 451 1425 0 0 785 0 151 0 0 1 0 2 0 0 0 182 0 0 984 2078 0 0 4 5599 2 0 344 0 4 4 0 0 0 148 0 116 7 3 0 0 0 2587 594 0 24 0 0 0 0 0 0 0 0 0 0 48 0 0 3 0 2224 0 0 0 0 19 119 15 0 166 0 1866 0 1453 0 5 - 0 47 0 2 0 5256 0 3 66 12 0 0 0 11 175 9 295 0 0 58 3549 0 0 0 0 0 0 0 0 525 0 3 456 0 1 0 0 0 771 2 7343 72 0 0 0 1 36 20 0 0 29 186 0 18 2384 0 0 95 0 0 2960 43 102 5 2 0 13 0 5 111 5 1367 0 0 0 0 4860 0 0 3 0 1 0 0 3564 0 4555 3861 43 0 0 6929 0 0 0 1103 0 183 13 21 - 0 0 0 0 0 0 8 0 0 0 0 0 0 0 3227 1 0 0 0 1400 0 142 0 0 0 0 0 0 0 0 0 1 0 3 0 1902 31 0 0 343 1 2 0 0 650 0 7812 0 0 0 0 17 1 0 0 0 528 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 21 0 150 0 0 81 0 0 0 4209 2 0 780 0 312 0 0 0 0 0 5 0 0 0 0 1047 1 - 5087 0 3 4 0 5 0 0 1065 3375 2120 201 0 0 0 0 0 3 0 0 1 0 1 0 150 106 0 0 0 0 0 5962 3 0 0 0 9 0 0 0 0 0 0 0 2335 0 5 0 0 0 1 329 42 3 0 2 2 0 0 0 0 215 6 4 0 0 0 0 0 0 1 516 2 0 0 1 0 72 0 7 0 334 0 0 2 25 1 201 1 0 5184 212 0 0 0 2342 2 0 3515 375 - 2 227 0 237 0 60 1896 0 0 0 0 0 0 0 178 0 2797 0 0 27 3 3327 1408 0 0 0 0 0 240 0 0 0 170 0 0 1 8 0 1017 0 0 6 0 1 0 0 17 0 2 0 153 1 930 297 598 1433 0 0 0 0 7 2 0 0 1269 0 0 11 0 11 0 146 261 442 0 0 0 0 99 781 0 0 0 0 0 0 0 2825 7076 0 16 0 0 288 0 0 1 0 0 0 - 0 0 0 1748 0 0 1182 1 0 0 27 0 835 22 4892 0 2424 0 543 27 3 0 0 0 0 0 0 0 386 2219 3 0 792 2850 74 0 262 4106 1 0 0 1 0 0 0 0 1343 0 0 0 0 0 41 0 0 0 243 1 39 0 17 0 37 6068 0 0 0 337 1795 0 2 7979 0 0 50 0 0 1 0 0 0 2 0 7911 3 2 0 0 0 5 0 839 0 11 7402 573 16 44 0 0 - 209 0 8 0 0 0 9 59 0 275 6 0 3 0 473 0 0 1 4 17 0 0 0 6 0 1706 2 1478 303 4 0 1386 0 49 0 1 0 0 7 3 3 0 4 0 0 111 2334 0 0 130 193 0 2203 399 0 20 1061 5062 3 4 0 0 0 264 0 0 0 0 0 54 132 0 1 0 0 0 0 289 2 0 133 0 5270 0 471 0 1765 262 0 0 14 0 1 0 0 1 0 0 1 0 - 0 0 295 926 0 0 0 0 36 2063 51 38 0 0 152 1 0 0 0 0 3 0 65 2 20 0 402 0 0 35 2 0 0 0 0 1 0 0 1 0 0 0 4 1955 338 3 0 2519 0 2217 34 0 7 0 1 0 12 0 0 0 0 203 812 1 0 8058 54 0 2 4 641 0 0 5 0 0 0 0 0 0 89 54 5 0 0 0 0 1 0 112 0 3010 0 2001 1 15 33 0 344 1 - 3 0 0 4 125 3 1172 25 0 304 7 0 0 380 108 0 747 0 67 0 89 5296 0 0 482 39 1 0 0 0 0 0 2 0 0 2919 0 0 1 0 100 0 8 6008 0 0 78 0 27 955 2 1727 0 1 36 427 319 44 927 0 27 280 0 0 1 2 0 0 0 0 0 1848 1493 4276 1 969 1 0 0 0 0 0 212 1111 26 0 0 1639 0 0 0 123 0 0 5 458 234 0 908 0 - 0 0 335 0 0 0 1 38 0 0 0 4238 194 10 27 0 0 0 0 0 1 5626 0 0 33 0 0 0 1 0 0 0 0 0 4373 0 294 0 2070 0 8 2 183 0 1 129 3 0 0 0 0 0 133 487 1 0 0 16 0 7972 0 0 2142 2 0 0 4 0 5 147 0 0 0 23 0 1 2 0 0 0 7312 0 24 0 0 0 0 264 2 21 0 52 324 5 0 0 1977 0 0 0 - 2 5 3139 2 5 665 0 0 0 0 1 0 0 1 0 0 24 0 0 0 0 1111 1584 0 1344 44 128 29 65 982 1 0 0 135 0 0 0 0 29 0 0 0 0 0 27 0 6315 0 919 0 15 0 0 0 0 981 2 0 0 21 6350 14 1 0 0 0 0 273 0 2 0 0 1 0 2 0 350 0 430 39 0 0 418 3 2754 5 1 0 0 0 0 0 1 0 0 16 0 0 0 0 - 0 306 27 1231 4 0 0 401 0 33 0 34 0 3 90 11 0 259 462 0 0 2 0 1 43 0 279 13 0 0 0 1 0 0 0 0 431 0 0 0 0 0 0 544 27 0 2836 433 16 1347 0 0 0 0 0 1844 0 0 397 1547 13 34 129 0 0 0 0 0 0 706 0 0 0 0 67 0 7 207 0 1 0 0 0 1 117 0 0 0 0 171 0 0 2 0 0 0 0 24 7 0 - 0 6 0 0 30 2 0 0 1 690 0 0 0 0 12 3258 804 0 0 0 0 0 0 407 1326 0 0 1 0 0 46 0 857 0 1 1 0 20 0 3 2 78 2 71 4 0 0 0 614 491 5707 0 7121 0 0 8 0 0 0 1 837 2 0 0 0 0 0 46 0 0 2 413 5 0 0 0 0 67 0 0 570 633 0 1 395 7 3191 5708 0 5401 0 1114 94 0 0 0 60 0 0 0 - 0 939 2181 0 18 0 0 0 0 0 0 4 22 0 0 2 0 30 0 0 0 1 34 16 4791 1 0 0 0 3 0 0 0 0 0 0 0 0 0 0 401 0 0 0 0 0 3034 1 914 0 0 26 0 112 6245 4802 0 4446 0 3520 0 0 140 0 0 962 0 0 18 0 1 2639 942 20 4 218 0 0 1199 0 0 0 213 0 0 0 205 564 0 0 66 0 26 0 0 0 0 7582 0 0 - 0 1216 0 0 0 0 0 0 144 389 14 0 0 112 0 0 29 0 0 28 84 0 3 284 0 0 4590 108 30 0 1 133 0 0 0 5 0 3306 0 0 0 0 3345 0 0 0 87 56 10 1 0 0 2 0 3996 588 0 1 0 0 0 851 0 0 0 1370 0 0 35 134 2 11 0 0 13 973 1696 0 0 0 3 0 0 0 0 4 0 0 2 1 0 226 0 2 0 0 3 0 425 25 - 10 0 0 1 2509 0 0 3 0 1 0 1073 1 0 0 173 0 0 5823 0 0 6485 394 0 558 2554 801 0 897 0 16 0 107 0 0 34 0 0 333 0 3 0 0 22 0 0 0 1 0 485 0 0 394 171 48 0 31 3892 269 3 0 0 0 7 0 4 0 0 0 0 0 2246 13 3200 0 3 0 0 0 5 0 0 246 116 55 2036 2 0 456 0 0 0 0 0 0 3 4521 0 0 0 - 0 0 0 0 1 5055 0 0 0 0 5 0 0 1 0 0 1891 0 0 0 256 27 81 19 0 0 0 107 65 9 0 47 11 2 0 0 0 38 0 0 3992 0 0 0 13 0 5 0 0 0 349 0 0 30 0 2 0 1882 2 0 10 0 4 0 1 11 446 1 1 0 0 0 0 0 0 730 107 0 0 0 485 0 0 1747 0 0 13 0 149 0 0 0 0 0 6457 0 0 0 502 0 - 3460 936 0 0 0 128 0 0 102 0 106 0 14 1 0 0 0 4 0 0 0 469 0 0 0 327 0 2 0 964 5 24 0 0 5 0 170 0 0 0 1 0 0 0 0 7798 10 0 0 0 12 0 0 0 0 0 0 1 0 0 5 0 2315 149 6839 0 0 23 0 0 0 0 1 5344 1995 0 0 0 28 0 0 0 0 0 664 0 0 0 61 0 0 4 0 7988 0 0 0 0 3 81 - 0 89 0 0 0 0 0 195 0 35 0 0 15 410 3356 0 0 1 1 0 3 0 0 0 386 20 0 0 20 0 0 0 0 0 7241 0 5639 0 5 0 0 0 0 0 0 0 0 10 42 0 0 0 0 0 186 0 0 0 27 0 0 1 0 103 0 0 3 396 0 446 0 1 18 0 1256 6 452 0 406 0 0 3 0 15 0 0 0 0 0 0 0 46 2554 1104 0 0 35 0 571 0 - 60 0 0 7977 0 0 0 0 0 27 1 2240 15 0 0 3181 1 0 0 4316 14 0 5 0 0 0 34 0 0 0 0 4936 0 223 176 0 0 0 4709 0 9 0 0 2 0 0 0 7690 0 14 0 0 4522 0 26 74 0 3049 0 296 40 0 0 0 0 0 6 9 0 2 1 110 0 109 10 0 447 571 5069 6 17 0 0 1 0 0 17 0 108 0 1 0 0 0 20 1 0 0 232 0 - 802 1 0 0 7 0 0 2 7703 0 0 0 25 145 0 0 0 0 0 17 513 0 0 515 0 179 0 0 4 1207 1 0 2 0 36 0 0 0 4255 4469 0 0 0 1 2 709 0 0 0 0 0 221 0 1 7 0 232 0 0 976 0 11 149 0 2 0 1 0 36 0 0 0 0 213 129 0 0 0 0 0 0 0 14 1 15 0 0 0 0 0 0 6 0 2 0 0 14 25 918 3 - 1 121 9 0 46 0 14 0 0 206 3940 0 0 1 5 0 12 0 71 0 0 30 4 2738 0 8 6081 5 5818 1249 0 0 0 0 0 2488 451 0 63 0 1 19 0 48 52 0 0 0 0 606 0 0 0 0 0 0 24 0 2 0 131 13 0 0 0 0 41 1 0 0 0 5 0 0 0 0 19 0 0 0 0 0 0 0 0 24 59 0 4 3 0 0 0 1 0 85 1318 0 0 0 - 0 0 0 0 0 0 0 0 0 0 1 0 2 1 2774 0 1128 0 169 0 7 34 0 7903 786 0 92 1 14 0 5 0 0 0 0 0 5 0 0 0 0 347 0 338 0 1501 778 0 0 0 125 0 1137 0 0 3 0 0 1 0 0 0 0 1389 0 0 6741 0 0 240 0 0 1258 12 14 6358 6 185 1 633 0 264 507 0 41 4272 0 355 0 302 525 1 3045 0 1 0 6 7198 1 623 - 591 0 174 3 0 125 4 0 0 48 0 0 0 0 0 3 4582 0 0 0 0 12 0 0 105 0 8027 120 27 0 10 3 36 0 873 0 109 0 0 0 9 4 324 0 0 0 1 0 0 0 0 684 69 0 0 189 0 0 1 0 0 0 12 0 48 0 0 725 0 0 0 0 0 0 0 0 17 0 0 0 4039 0 189 0 0 6 0 0 0 0 0 609 0 0 0 0 1273 0 53 1403 - 1 4 0 0 121 0 2 0 9 0 2 0 717 124 3 2792 0 43 6342 35 0 7 478 0 1748 0 0 1905 3264 0 591 264 0 4407 3 404 0 0 12 1 5797 0 0 0 0 106 25 0 2 1224 0 36 1933 0 0 0 1361 7318 0 0 0 0 18 0 0 0 0 0 0 0 0 0 176 0 0 1549 5746 0 0 109 0 2537 948 23 158 484 166 0 0 0 3 0 0 451 0 815 6825 517 0 5 - 0 0 0 34 1 1637 1383 0 0 0 0 0 0 0 0 0 0 269 387 15 151 1 0 0 0 0 40 0 0 0 6 2 168 6300 22 0 978 1 0 110 0 0 0 41 0 0 0 53 0 11 0 0 0 0 1358 0 0 258 1738 10 0 3 6 35 101 0 1171 0 3 0 0 1836 1 70 286 0 7 0 2 0 0 0 0 4222 4227 82 252 0 126 0 0 0 277 7 0 10 0 0 1 1 - 0 0 273 0 7724 0 0 7659 1551 0 1229 282 3 0 2 0 0 0 0 40 492 0 0 0 0 0 1420 0 0 0 6 717 863 2 0 0 0 0 0 1 556 1 1654 0 0 0 362 320 52 0 18 31 0 0 0 0 0 0 0 0 0 832 129 0 265 42 0 16 0 83 0 0 0 53 987 0 0 1 0 40 0 0 2 0 0 0 0 0 0 0 0 1 0 2 0 1265 0 34 0 0 - 0 64 0 0 1675 0 0 2123 1 0 0 0 1 46 0 3 0 269 9 0 26 0 0 0 111 0 0 9 0 0 278 4 0 0 1 44 3 1 4616 0 39 207 8 906 0 146 1468 5 2332 0 7548 29 0 0 0 5 7 0 209 5 3916 0 20 2052 3 246 5 0 0 0 605 0 0 0 0 0 0 4048 20 193 0 459 0 5973 0 608 6325 13 66 0 1 0 43 3 137 179 1 0 7989 0 - 0 0 19 8 257 0 0 0 0 43 0 0 0 0 6443 624 2460 0 0 1 312 0 0 0 0 0 195 296 0 0 0 3 0 860 11 5 1 7875 0 0 0 0 28 0 2 0 2515 0 0 0 0 66 1 0 0 1012 0 102 0 0 708 4909 0 177 0 0 1 0 3929 0 2917 0 0 315 12 0 2056 0 0 55 0 426 2963 0 0 239 2 0 344 99 0 13 0 2570 1 47 7924 871 0 0 - 0 0 17 963 0 67 0 0 0 0 0 0 0 166 13 0 0 0 0 0 0 0 5448 11 5614 3 212 56 1 0 0 2479 0 22 3359 0 0 173 0 0 6 0 0 0 0 7593 0 87 0 1 2 130 0 237 0 0 0 0 0 0 0 40 0 0 0 23 0 0 1684 42 0 0 0 0 1 1 13 1 0 0 0 11 1695 2011 0 9 1 3 0 63 0 5 770 0 0 71 0 0 0 10 - 160 0 72 0 304 0 18 0 0 0 2280 0 0 1618 0 0 7 4 0 6152 1 2 6 2 0 0 14 7067 0 458 0 34 0 0 458 1719 8 0 344 0 0 0 7922 15 919 0 0 216 154 1741 0 2322 0 0 0 35 0 23 106 0 154 0 0 0 0 0 0 0 115 0 0 1 0 0 0 381 79 1 3678 0 110 101 0 0 0 0 1 0 791 2 189 256 0 123 0 673 1823 0 0 0 - 4 0 1001 0 29 0 239 22 0 2 0 0 107 0 0 2 32 0 0 0 0 0 7866 0 0 124 204 0 0 0 3607 3 0 16 5299 0 0 25 4 0 0 0 569 318 0 0 0 0 0 56 0 0 49 9 29 0 0 0 7 1 6632 1158 1 0 0 238 0 0 0 0 133 0 14 0 2563 1 0 15 846 26 0 1958 0 0 0 0 1 0 0 0 45 1241 219 0 469 0 0 0 195 0 - 0 0 70 1 2 0 597 0 0 76 0 0 0 1 3 0 0 0 1719 0 16 0 6180 7658 275 0 0 0 1 0 0 0 0 0 0 64 0 0 0 1763 87 0 5 0 7 0 0 0 9 0 101 0 18 794 5993 2 0 2164 0 0 1147 0 0 383 0 0 71 46 0 847 0 0 0 0 2752 526 0 0 0 68 63 0 527 0 0 0 42 0 58 1159 0 21 705 0 72 4 218 14 0 6 - 0 5620 0 666 2 0 0 0 686 9 0 32 42 0 0 0 0 646 63 0 1 0 28 0 0 0 1 408 214 0 179 695 0 895 3004 137 0 0 0 0 0 2 44 1 0 0 0 0 1844 0 0 0 0 0 0 2411 70 0 1 0 0 0 0 0 0 6 2 66 1520 22 248 170 0 0 5268 0 0 0 0 4755 24 17 0 0 5534 3 0 1451 605 0 0 0 1 86 0 0 8000 0 218 0 - 0 0 74 2178 0 0 5 0 0 54 5798 0 0 2 0 0 195 0 1 23 5 0 0 0 0 0 18 0 0 0 0 1 0 0 104 917 0 1536 7 0 0 1 7588 156 470 1 50 17 489 0 0 9 31 384 0 0 0 85 0 0 0 0 7428 1 0 0 552 0 0 4 801 6253 2560 6 2680 5 0 0 0 173 1 0 94 1 45 60 2 0 0 0 777 0 60 197 4 42 174 0 13 1 - 90 0 0 0 0 0 48 647 1 4 2691 4486 0 2 621 5014 0 0 69 0 1 5117 64 0 0 5081 0 0 0 0 112 0 454 2 0 1 57 8 4 0 0 0 0 0 1391 320 8031 0 0 20 2 0 0 0 0 1 0 47 0 0 89 0 0 14 0 0 2 19 38 7 726 0 0 102 0 1213 0 0 0 0 3632 877 55 76 100 0 0 0 137 0 4254 86 0 0 28 40 167 0 0 0 - 2988 1681 0 0 0 0 2 6091 1344 0 0 0 0 0 0 0 0 0 5193 0 0 2 0 0 121 0 0 6133 0 5812 0 0 0 6441 1 0 30 948 106 0 0 6509 1 634 0 0 0 0 1151 0 0 0 0 709 0 0 1 0 30 0 23 29 0 0 0 1881 0 4843 379 0 1 5 1 0 1 0 0 0 0 134 0 0 54 0 1 42 0 30 0 0 1 20 6 189 0 0 151 0 13 4905 - 0 0 0 0 6 0 132 5144 316 0 0 0 0 6604 11 4 1 4 0 97 40 205 0 0 5936 0 0 38 0 0 0 0 0 0 5485 619 69 0 0 2 264 6 0 7 1100 0 1671 3828 0 256 0 3 89 0 111 0 0 0 1464 140 0 0 0 0 0 47 0 2 1 0 514 0 0 0 4010 1 0 1676 0 0 0 0 0 2 35 0 0 0 1298 946 1 0 0 562 93 78 0 0 163 19 - 132 2 641 19 0 0 0 5674 50 381 0 1 0 0 1 0 0 0 0 0 1002 0 1328 0 0 0 0 922 805 0 0 0 0 3 0 14 0 186 48 0 0 2866 0 0 6700 95 0 0 28 0 0 0 0 0 44 0 0 0 0 9 0 7 852 8 0 4698 0 54 293 1 39 0 0 1358 4 0 1 0 0 0 1363 0 0 0 5559 0 6 37 0 0 0 0 0 0 0 190 557 0 2 44 - 0 0 664 0 0 38 679 0 0 0 0 84 1897 8 0 20 104 0 184 0 0 0 0 0 0 12 580 184 0 61 0 0 16 221 2507 13 1227 313 877 0 0 0 0 4596 48 0 0 0 92 0 0 0 4 0 0 68 129 0 154 1 0 3421 0 17 0 0 574 0 0 0 21 0 0 2 3 0 0 0 0 0 0 0 0 0 187 0 244 0 0 16 23 68 1650 0 0 0 0 0 0 0 - 6 0 4 0 3 742 272 0 0 21 8 0 0 8 0 0 15 0 2 82 1 508 0 0 4159 0 0 0 0 0 59 0 0 0 0 0 0 0 0 6357 1 3423 11 0 0 0 0 0 3 3672 0 0 0 0 77 6181 0 0 5 0 0 6253 3928 114 0 0 0 0 0 0 0 0 78 1 0 0 39 1 113 0 0 0 0 0 214 0 38 0 34 0 872 0 2161 0 7 0 0 0 0 2922 - 272 5 1 10 0 0 1 1 116 4 0 116 0 0 0 223 6 3668 0 0 4012 0 0 27 0 0 0 0 0 0 4791 0 0 6 6 0 0 0 0 0 0 0 8 0 0 1012 92 0 0 0 4 0 1600 5 3041 0 0 172 14 0 20 0 0 0 19 0 352 0 0 178 71 0 0 0 51 109 0 0 0 3916 1 0 0 61 309 3 0 0 0 412 191 2 143 0 0 0 2141 0 0 0 - 0 0 185 0 2095 0 0 2 0 1 51 0 5 0 1 0 1 0 3457 0 0 42 0 8 0 0 0 0 0 0 7102 0 0 0 0 52 3 0 80 0 0 0 1049 0 0 0 0 5 1940 0 0 0 114 0 0 0 0 0 3 302 4 0 0 0 0 0 0 0 0 0 0 0 1199 0 5219 635 63 476 2 2496 0 3043 577 0 0 0 369 0 0 6204 5085 5553 0 47 3914 0 1 2 0 431 - 76 0 0 0 2625 8095 0 0 93 2 276 1 281 1 0 0 0 0 3 4051 0 0 17 0 13 0 576 1608 0 0 0 10 42 730 8 1749 6 0 0 0 0 0 0 0 3196 0 0 0 0 647 0 18 0 0 0 631 30 1 0 0 3 0 4 0 1 0 0 0 0 0 0 0 0 761 0 149 1 1 1429 0 68 1966 460 0 610 0 0 0 0 23 0 0 0 0 0 0 412 0 0 0 - 0 0 0 0 3 0 61 0 0 0 5 0 0 0 166 0 0 0 0 0 433 0 205 1 538 0 0 0 76 336 1 0 0 3 1669 3224 213 80 1 5 0 0 16 0 202 0 0 1 0 0 0 21 0 4 0 0 108 44 0 0 0 0 58 966 1231 0 0 0 0 0 0 1 0 0 0 0 0 1379 868 22 13 0 1 0 0 0 0 20 0 1 4576 0 0 0 7 0 8 2328 0 0 - 1 0 1234 0 9 0 0 29 110 0 142 2699 0 7455 0 745 0 0 0 0 0 13 4 7 0 0 0 3719 3739 0 37 0 2092 2 0 7 1 0 0 1266 66 78 0 292 67 0 0 0 205 0 0 0 0 0 334 1 5 49 238 1 0 0 0 0 1443 0 0 6 0 0 0 0 0 1729 11 0 0 0 0 1 505 0 3564 0 0 0 0 0 167 0 2815 0 0 1002 0 0 1362 0 10 0 - 0 70 0 0 2 0 0 252 2 0 82 0 0 0 14 0 554 0 730 10 0 18 0 1307 0 1709 0 0 368 609 95 0 0 313 0 0 9 0 0 0 10 0 2 1850 0 195 3213 0 4350 28 0 40 0 0 0 2881 6577 2 0 0 0 0 3 1 0 7 0 63 1 0 207 0 0 112 1 2 355 0 1 606 0 0 0 2 0 7 0 0 0 4859 0 0 163 0 0 0 0 0 0 5826 - 0 0 0 126 38 0 0 3 0 0 1 0 7 0 4 0 27 5649 0 386 0 0 0 0 45 407 29 1627 0 40 0 3 1 0 46 1515 0 5 0 0 5 0 444 0 0 75 0 0 0 1 0 655 6 7 0 419 0 0 4203 0 0 49 0 0 0 0 0 228 0 480 89 0 106 0 0 0 17 0 0 0 0 0 0 0 25 2438 0 0 0 0 0 0 0 0 0 0 0 0 212 1104 - 0 81 0 0 0 898 0 0 0 641 0 73 2 0 0 0 215 1 0 77 0 5 0 0 24 272 0 0 0 221 0 0 0 0 128 0 0 0 0 0 0 13 0 0 0 0 0 0 3587 0 0 0 236 0 0 4 0 0 0 1700 0 1 0 0 38 0 642 3 0 0 0 12 23 14 0 29 0 21 0 6 0 2 0 0 0 69 0 21 1 3 0 240 0 0 16 0 1 0 0 0 - 4 1104 3374 1 0 17 0 2 0 0 4647 0 0 0 0 3960 0 0 2265 0 0 0 5680 2 0 0 35 46 658 0 0 0 0 0 0 1 3579 30 0 0 0 0 0 0 0 1 1 9 0 16 788 0 7 35 0 0 9 0 3 3 0 0 406 75 0 0 0 0 0 33 0 2 0 0 0 0 0 317 288 1847 0 0 0 0 0 129 25 46 69 11 0 15 0 0 0 0 1609 0 17 0 - 0 0 0 2 713 0 0 0 1 109 1 0 260 1699 1 46 0 176 0 2965 6127 0 0 3 0 65 0 0 0 5 15 0 0 112 7745 0 1451 0 744 0 32 1 0 0 0 0 3058 2 3 0 5154 0 219 0 3 0 636 0 0 0 0 0 390 0 0 0 0 256 0 0 0 2957 835 0 0 0 0 124 2 3 16 0 0 0 0 0 2056 0 0 0 31 0 8 0 0 1 0 43 14 0 - 0 0 0 6434 35 4 0 0 8 0 1 0 4 0 0 0 33 0 0 0 41 0 1 0 18 183 0 0 0 55 1 565 217 0 62 2 4 2 0 0 4859 0 3985 1065 0 0 0 0 56 0 0 0 0 1 1 0 0 0 0 2 0 1210 0 0 0 0 0 459 0 0 0 9 3760 0 4251 0 0 0 0 0 0 3349 0 0 445 4 0 500 0 514 7 0 0 0 0 0 4 0 0 0 - 161 0 0 0 0 1240 0 0 6111 0 0 0 1427 0 9 0 0 0 0 66 0 199 14 0 0 0 0 0 0 0 0 0 1571 986 166 0 4 2 9 33 2620 0 3319 8088 1 461 37 2227 0 0 930 3253 22 132 404 0 1738 5283 0 0 2916 0 19 0 98 1 0 6520 6587 43 8 0 3 0 148 87 0 229 0 748 0 260 5638 1086 0 2902 0 0 1 91 3354 0 11 0 0 0 707 0 0 0 - 1877 0 0 0 2 0 1198 1978 636 1 0 0 83 181 202 0 0 0 0 0 0 2643 0 0 0 9 9 101 96 1 832 15 0 0 0 29 36 0 546 1529 0 142 0 0 2 1 0 1207 0 54 0 0 3 0 2351 3 297 0 2700 0 0 430 15 0 8 0 226 0 39 0 124 13 0 0 4084 1 6 0 0 0 0 50 0 0 3 0 0 148 0 29 0 0 146 0 0 1548 0 0 1 1 - 0 0 0 0 0 0 1 0 0 0 0 395 1729 578 34 0 4081 2974 0 11 12 0 0 0 877 0 209 0 0 94 0 0 0 1 0 0 0 1341 25 2215 0 0 0 0 13 0 0 0 0 0 0 94 0 113 53 0 0 780 12 0 0 0 96 0 595 4293 13 0 0 4052 1 0 382 0 16 0 0 482 0 0 0 24 0 0 0 2 0 0 0 756 0 0 1582 0 4175 0 0 83 7 12 - 0 0 0 208 0 0 368 100 0 0 10 0 7 14 38 1165 0 0 0 0 0 0 0 141 0 2677 1750 0 0 1 23 19 6 0 9 2 0 0 1 1466 223 0 0 1 0 63 827 0 274 536 1 0 0 0 10 0 98 0 1 4 0 0 0 968 0 0 61 0 1693 2840 0 0 0 0 0 0 0 1 0 0 10 0 47 0 0 0 0 3 0 0 0 0 0 0 0 394 0 0 0 0 - 1 2424 0 0 243 0 1844 0 155 0 0 0 0 0 0 6899 0 0 223 1101 0 5050 35 0 3 30 0 3 2288 0 0 1 0 0 144 327 23 0 0 4793 90 0 0 4 0 0 1 0 24 0 2278 0 0 1 4153 0 48 10 0 0 0 8 4 8 0 1647 3 0 1021 1 0 0 49 0 7084 0 5 53 654 0 1 0 0 1 137 4056 0 0 0 4825 997 0 3352 1 0 0 28 0 0 0 - 0 0 0 0 0 0 0 0 3 0 100 0 1072 0 29 59 0 16 0 0 13 0 0 1 494 1 151 0 0 204 53 0 97 0 0 0 0 7899 0 0 305 0 570 4132 0 0 0 3 0 0 745 0 1 66 0 0 6 679 0 373 0 0 0 7143 3 1 872 0 0 0 225 0 0 9 0 0 0 0 1786 14 33 0 0 0 300 4 0 0 0 2037 0 0 0 81 0 1609 105 0 0 0 - 0 0 59 0 45 84 13 1 0 3315 0 6 0 0 0 4 0 0 0 3 0 1 2309 51 0 26 1487 1947 108 0 0 4 7 0 0 92 2 0 579 1 0 327 0 0 0 398 806 1558 0 0 2 0 0 0 0 0 0 70 1 0 15 0 0 77 0 0 14 0 0 2233 0 0 0 0 0 0 0 146 121 0 13 3901 1 44 0 0 0 0 0 0 1078 22 0 0 9 0 0 0 151 0 - 0 2 731 0 3 0 0 0 0 769 0 337 0 0 1 1 0 0 0 30 0 0 0 1 0 0 543 1 0 0 5 0 0 1 0 0 1 1 0 0 0 0 10 0 4 0 0 2 0 0 0 0 0 3 0 0 72 0 0 97 0 72 9 0 0 0 0 77 30 5 555 0 0 353 0 0 0 1 0 0 0 0 5519 1 1 0 1 0 0 0 0 0 1 0 1964 0 759 1 3 710 - 0 0 0 7 0 9 0 0 0 0 0 0 50 10 2114 5 1 539 128 84 0 1389 1 26 0 0 0 1977 0 0 0 0 23 0 0 761 0 3261 8 55 0 943 4 0 0 0 3 0 0 47 23 0 0 2432 0 160 35 0 0 244 26 0 0 211 0 10 0 0 0 15 0 0 322 0 0 0 0 0 0 2 792 0 0 0 41 3027 0 475 0 0 0 173 185 0 950 56 1 297 0 847 - 1 0 1 0 11 2 0 627 0 0 150 3 722 0 0 4 15 0 0 0 0 0 0 0 0 0 10 0 1 1 0 0 45 0 4 399 0 112 0 419 0 3590 0 1 0 5 0 11 24 691 0 0 0 5190 7 6 4197 0 352 0 0 0 0 0 0 128 5092 0 1 115 0 1 0 0 255 351 3 129 2120 76 0 0 0 0 0 0 0 0 7 0 0 0 1 0 0 0 0 2320 4 25 - 0 0 44 693 0 210 0 15 0 0 4 0 0 1 0 0 0 0 31 0 1 0 0 1 51 0 2 0 0 0 0 208 242 0 1815 0 0 0 1742 58 0 0 18 0 0 0 496 5 477 1897 43 0 0 0 0 0 0 1381 0 0 0 0 1 0 0 0 245 0 3 18 2 29 1756 3163 0 1 1391 16 0 1 83 1 19 1 0 2 73 6 0 0 4129 338 0 0 0 42 11 0 0 582 - 1 0 1 94 0 2 2 0 56 203 0 0 0 2 389 0 33 0 67 1560 0 200 0 0 3427 4 1 0 136 3745 0 900 29 12 2390 0 0 0 3 0 0 0 12 0 0 1 0 1925 357 0 38 3 5 0 0 0 0 1 0 2 0 395 1 0 0 157 0 0 0 951 0 0 2 1141 0 1 0 0 0 0 0 0 0 0 0 36 7381 10 0 0 7956 6014 0 0 0 0 0 5238 13 30 - 0 0 869 0 11 2616 0 0 3877 114 0 5639 7970 0 0 94 0 15 0 338 4571 1 20 0 0 0 0 0 5 0 4 0 9 0 0 0 342 5 0 0 2124 0 0 1 1063 1970 0 0 0 5033 0 4950 0 0 4 0 0 0 6 0 0 1051 4377 0 10 2 27 11 163 0 2 47 0 6837 0 701 0 62 0 11 9 0 1 0 9 0 3 0 0 0 0 7 0 32 0 0 55 0 2 0 - 2 0 0 0 1 4 0 1381 0 0 63 8 13 0 0 14 0 0 0 0 30 7 0 0 4 0 0 0 10 817 0 0 0 7000 0 0 0 0 39 0 0 0 0 0 70 0 1 0 70 12 0 187 0 0 0 782 4 0 0 0 381 0 1 7287 2936 0 13 0 2 0 0 126 0 0 0 131 0 15 120 0 0 0 0 6 0 0 186 0 0 1534 0 0 0 0 6 12 6 6181 0 0 - 1454 41 139 1 6872 0 1181 1 0 0 5 0 5426 5 4 11 17 0 759 0 344 0 7 1 15 0 1 10 0 1283 0 0 0 0 37 0 0 0 0 7 1 0 0 0 0 1057 4149 4 0 352 4 0 0 2501 0 0 0 0 0 11 0 0 0 85 0 0 1677 7 0 0 0 0 0 0 5 7 0 0 0 83 0 30 89 0 0 0 0 1 1 2843 581 2393 0 0 0 0 94 0 205 2 - 3508 0 0 1 0 124 16 1499 467 0 0 0 0 17 0 0 0 0 0 20 4 60 0 911 0 0 4331 0 0 0 0 0 0 1958 345 1494 0 1483 334 0 2 0 4 188 0 2540 7 0 18 0 0 0 1 0 4 0 0 0 205 0 1344 0 0 237 42 0 0 862 0 0 0 0 0 5541 1 0 1 0 0 0 0 0 0 3 3516 0 0 290 51 0 33 442 0 0 4 0 2 0 0 92 - 6066 46 570 1 0 26 0 164 162 639 0 0 1 0 0 0 2 0 0 0 67 0 0 0 19 565 10 0 28 9 0 0 0 353 0 0 0 4 0 0 0 0 3 0 423 3 0 0 0 237 0 3 1 34 322 0 0 6 0 5 0 0 90 0 3061 0 1536 0 0 1 0 0 397 0 0 0 0 0 0 0 0 0 4848 0 0 5450 0 0 0 2 28 0 0 0 0 1009 0 62 472 0 - 0 0 14 794 0 0 0 4608 48 0 0 0 0 0 0 0 0 0 49 2304 0 0 887 2 1 0 678 11 0 0 112 0 469 216 2 0 0 4 3832 289 0 24 2894 0 0 0 21 254 524 0 16 6604 5 0 5 393 0 147 0 1345 477 0 10 50 13 0 0 0 44 5 0 0 2 1 9 8 30 0 0 207 0 0 534 0 4243 27 0 13 6 0 0 0 1448 0 0 0 0 1076 0 13 - 0 0 0 0 1 3 4 0 0 4 936 79 0 23 0 0 4 6 0 0 132 0 4330 0 0 0 1 0 0 2 0 43 0 0 0 0 5 347 18 6715 0 2287 0 708 268 2 0 0 30 0 0 0 135 0 0 3138 0 0 10 0 5 0 0 0 0 0 7625 0 10 0 1350 0 0 0 1 0 0 0 3971 0 0 0 2 0 0 0 6 5 0 0 34 1 5 0 718 1 0 2877 0 0 - 0 0 5698 4542 9 4284 0 0 0 0 0 6293 1587 0 0 0 0 0 118 0 742 0 434 0 291 7 1723 0 0 0 6209 1 1 14 2 0 0 0 0 1 7146 0 0 0 0 0 2 25 0 0 2089 0 64 0 0 1 0 4 0 2 0 0 1123 0 3056 1426 2 4 0 703 0 9 269 1 0 1 5488 0 5141 0 415 0 0 0 0 0 3343 0 0 0 11 0 0 92 10 45 7 0 64 6381 - 0 3238 0 0 56 2348 326 5453 0 0 14 259 58 0 3 0 0 0 665 339 0 0 7272 0 59 0 7 0 0 0 4 0 2 0 3974 50 93 0 0 0 0 3 0 0 0 0 42 0 0 4 0 371 1344 0 0 0 1 0 1 1362 0 0 0 63 799 203 0 506 19 0 68 0 0 0 0 0 263 0 0 0 580 3437 79 0 0 2101 7 24 8 68 0 0 0 0 0 0 0 0 0 5 - 1 0 2 6894 0 0 0 0 385 22 0 0 0 0 0 0 1 0 0 0 0 0 319 245 0 10 113 0 0 0 0 0 0 0 0 0 302 0 0 323 0 0 318 0 0 0 107 0 0 347 0 0 2 10 739 110 2866 6695 0 0 493 97 1 0 0 0 2988 138 0 1 0 0 3 0 528 0 0 0 1 13 4 0 0 0 0 0 0 0 0 0 0 614 0 0 0 0 0 12 897 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai12a.dat b/trunk/paradiseo-peo/tutorial/benchs/tai12a.dat deleted file mode 100755 index 19efeb4b0..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai12a.dat +++ /dev/null @@ -1,27 +0,0 @@ - 12 224416 - - 0 27 85 2 1 15 11 35 11 20 21 61 - 27 0 80 58 21 76 72 44 85 94 90 51 - 85 80 0 3 48 29 90 66 41 15 83 96 - 2 58 3 0 74 45 65 40 54 83 14 71 - 1 21 48 74 0 77 36 53 37 26 87 76 - 15 76 29 45 77 0 91 13 29 11 77 32 - 11 72 90 65 36 91 0 87 67 94 79 2 - 35 44 66 40 53 13 87 0 10 99 56 70 - 11 85 41 54 37 29 67 10 0 99 60 4 - 20 94 15 83 26 11 94 99 99 0 56 2 - 21 90 83 14 87 77 79 56 60 56 0 60 - 61 51 96 71 76 32 2 70 4 2 60 0 - - 0 21 95 82 56 41 6 25 10 4 63 6 - 21 0 44 40 75 79 0 89 35 9 1 85 - 95 44 0 84 12 0 26 91 11 35 82 26 - 82 40 84 0 69 56 86 45 91 59 18 76 - 56 75 12 69 0 39 18 57 36 61 36 21 - 41 79 0 56 39 0 71 11 29 82 82 6 - 6 0 26 86 18 71 0 71 8 77 74 30 - 25 89 91 45 57 11 71 0 89 76 76 40 - 10 35 11 91 36 29 8 89 0 93 56 1 - 4 9 35 59 61 82 77 76 93 0 50 4 - 63 1 82 18 36 82 74 76 56 50 0 36 - 6 85 26 76 21 6 30 40 1 4 36 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai12b.dat b/trunk/paradiseo-peo/tutorial/benchs/tai12b.dat deleted file mode 100755 index 65c234d49..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai12b.dat +++ /dev/null @@ -1,27 +0,0 @@ - 12 39464925 - - 0 0 0 255 293 328 331 318 362 221 314 390 - 0 0 1 255 293 329 331 318 363 222 314 390 - 0 1 0 255 293 328 330 318 362 221 313 390 - 255 255 255 0 93 120 106 106 113 81 63 195 - 293 293 293 93 0 35 42 25 95 72 75 107 - 328 329 328 120 35 0 24 13 82 107 82 75 - 331 331 330 106 42 24 0 20 59 111 60 91 - 318 318 318 106 25 13 20 0 78 97 71 89 - 362 363 362 113 95 82 59 78 0 152 50 129 - 221 222 221 81 72 107 111 97 152 0 111 173 - 314 314 313 63 75 82 60 71 50 111 0 150 - 390 390 390 195 107 75 91 89 129 173 150 0 - - 0 0 5 1 1 14261 246 55342 0 1 36 1828 - 1 0 14568 1064 4 0 58098 6273 2 3 0 57 - 25642 0 0 0 2 0 1 0 0 0 0 0 - 27 0 62 0 0 1 0 2491 0 0 490 0 - 0 57 0 0 0 0 456 9591 0 0 1036 0 - 0 3797 7 0 0 0 9 0 41986 19780 5 0 - 948 14543 1 93 0 5 0 3720 0 2 39 759 - 0 0 0 8 0 2 3516 0 0 2106 0 20364 - 2911 10710 9 30 5399 0 0 0 0 867 0 0 - 0 3 47029 264 4880 1 5417 0 0 0 0 0 - 0 1 0 0 12262 2791 0 0 5 7632 0 0 - 0 36146 0 0 525 49 1 19 0 0 35539 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai150b.dat b/trunk/paradiseo-peo/tutorial/benchs/tai150b.dat deleted file mode 100755 index 1d2d37020..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai150b.dat +++ /dev/null @@ -1,302 +0,0 @@ - 150 498896643 - - 0 1 135 131 132 136 134 135 132 130 135 131 130 132 134 132 136 135 123 130 138 129 115 122 128 140 118 119 131 121 130 119 138 129 127 128 127 129 129 129 128 129 129 77 80 86 78 74 79 81 85 74 83 78 84 72 84 64 96 79 76 63 79 73 73 76 70 82 82 76 79 80 82 84 42 48 61 67 57 49 68 56 56 63 56 55 60 55 63 65 62 64 79 87 77 87 78 88 87 80 85 80 85 81 113 116 119 119 114 120 113 118 112 114 118 116 119 113 116 117 23 23 23 23 23 23 22 22 22 22 22 22 23 22 23 22 22 23 24 24 114 20 16 16 18 18 17 18 18 15 - 1 0 134 129 131 135 133 134 131 129 133 129 129 131 133 131 135 134 122 129 137 128 114 121 127 139 117 118 130 120 129 118 137 128 126 127 126 128 128 128 127 128 128 76 80 85 77 73 78 80 84 73 82 78 83 71 83 63 95 79 76 63 79 73 73 77 71 82 82 77 79 81 82 84 42 47 60 66 55 48 67 55 55 62 55 54 59 54 62 64 61 63 79 87 76 87 77 87 86 79 84 79 84 81 113 116 118 119 114 120 112 117 112 114 117 116 118 113 116 117 23 23 23 23 23 23 22 22 22 22 22 23 23 23 23 22 22 23 24 24 113 21 17 17 19 19 18 19 19 16 - 135 134 0 5 3 2 2 0 3 5 2 5 5 4 1 3 2 1 49 47 61 59 52 51 57 55 49 51 57 50 48 54 62 77 77 77 76 78 76 75 76 78 77 93 91 86 95 93 95 88 87 87 87 92 82 91 87 72 109 146 140 145 150 154 145 159 152 153 146 160 142 162 150 158 129 99 96 81 85 94 78 97 100 79 101 99 94 94 92 88 88 92 86 87 88 84 87 84 85 86 82 91 94 83 141 145 147 146 142 147 140 149 141 146 144 146 145 139 148 148 134 135 134 135 134 135 134 136 134 136 135 135 135 134 136 136 136 136 135 134 44 151 148 148 149 148 148 150 150 147 - 131 129 5 0 2 6 4 5 2 2 4 2 1 2 4 2 6 5 48 46 62 59 51 50 57 56 48 50 57 49 48 53 62 77 76 77 75 78 75 75 75 77 76 90 89 83 92 89 92 85 84 83 84 89 79 87 84 68 107 143 137 141 147 150 142 155 149 150 143 157 139 158 147 155 125 94 91 76 81 89 73 93 95 74 97 94 89 89 88 83 83 88 83 84 84 82 84 81 82 83 80 88 91 80 139 143 145 143 140 145 138 147 139 144 142 144 143 137 146 145 130 131 130 130 130 131 130 132 130 131 131 131 131 130 132 132 132 132 131 130 43 146 144 144 145 144 143 146 146 142 - 132 131 3 2 0 5 2 3 2 2 3 2 2 2 3 0 4 3 49 47 62 59 51 50 57 55 48 50 57 50 48 54 62 77 77 77 75 78 76 75 75 78 76 91 90 84 93 91 93 86 86 85 85 91 80 89 85 70 108 145 138 143 148 152 143 157 150 151 145 158 141 160 149 156 127 96 93 78 82 91 75 94 97 76 98 96 91 91 90 85 85 89 84 85 86 83 85 82 84 84 81 89 92 82 140 144 146 144 141 145 139 148 140 145 143 145 143 138 147 146 132 133 132 132 132 133 132 133 132 133 133 132 132 132 133 134 133 133 133 132 44 148 146 146 146 146 145 148 148 144 - 136 135 2 6 5 0 5 2 5 6 5 6 7 6 2 5 1 2 48 45 60 58 51 50 56 53 48 50 56 49 47 53 60 76 76 76 75 77 75 74 75 77 75 93 92 86 95 93 95 88 87 87 87 92 82 91 87 73 109 147 140 145 150 154 146 159 153 153 147 161 142 162 151 158 129 100 98 83 87 95 80 99 102 81 103 100 96 95 94 90 90 94 86 87 88 84 87 83 85 86 82 91 94 84 140 145 147 145 142 146 140 148 141 146 144 145 144 138 147 147 135 136 135 136 135 136 135 137 135 137 136 136 136 135 137 137 137 137 136 135 44 152 149 150 150 150 149 152 152 148 - 134 133 2 4 2 5 0 3 4 5 0 5 4 2 3 2 4 3 51 49 64 61 54 53 59 57 50 52 59 52 50 56 64 79 79 79 77 80 78 77 78 80 78 93 92 87 96 93 96 88 88 87 88 93 83 91 87 72 110 147 140 145 150 154 146 159 153 154 147 161 143 162 151 159 129 97 94 79 84 92 76 96 98 78 100 97 92 92 91 86 87 90 87 88 88 85 88 84 86 87 83 92 94 84 142 147 149 147 143 148 141 150 142 147 146 147 146 140 149 149 134 135 134 134 134 135 134 136 134 135 135 134 134 134 135 136 135 136 135 134 46 150 148 148 148 148 147 150 150 146 - 135 134 0 5 3 2 3 0 3 5 3 5 5 4 1 3 2 0 49 46 61 59 52 51 57 55 49 51 57 50 48 54 61 77 77 77 75 78 76 75 75 78 76 93 91 86 95 93 95 87 87 87 87 92 82 91 86 72 109 146 140 145 150 154 145 159 152 153 146 160 142 161 150 158 129 99 96 81 85 94 78 97 100 79 101 99 94 94 92 88 88 92 86 87 87 84 87 83 85 86 82 91 93 83 141 145 147 145 142 146 140 149 141 146 144 146 144 139 148 147 134 135 134 135 134 135 134 136 134 135 135 135 135 134 136 136 136 136 135 134 44 151 148 148 149 148 148 150 150 147 - 132 131 3 2 2 5 4 3 0 1 4 1 3 3 3 2 4 3 47 45 60 57 50 49 55 54 46 48 55 48 47 52 60 75 75 75 74 76 74 73 74 76 74 89 88 83 92 89 92 84 84 83 84 89 79 87 83 69 106 143 136 141 147 150 142 155 149 150 143 157 139 158 147 155 125 96 93 78 82 91 75 94 97 76 99 96 91 91 90 85 85 89 83 84 84 81 84 80 82 83 79 88 90 80 138 142 144 143 139 144 137 146 138 143 142 143 142 136 145 145 131 132 131 131 131 132 131 133 131 132 132 131 131 131 132 133 132 133 132 131 42 147 145 145 146 145 144 147 147 143 - 130 129 5 2 2 6 5 5 1 0 5 0 2 3 4 2 5 5 47 45 60 58 49 48 55 54 46 48 56 48 47 52 60 75 75 75 73 76 74 73 74 76 74 89 87 82 91 88 91 83 83 82 83 88 78 86 82 67 105 142 135 140 146 149 141 154 148 149 142 156 138 157 146 154 124 94 92 77 81 89 74 93 96 75 97 94 90 89 88 84 84 88 82 83 83 80 83 80 81 82 78 87 90 79 137 142 144 142 139 143 136 145 138 143 141 142 141 135 144 144 130 131 130 130 130 130 130 131 129 131 130 130 130 130 131 131 131 131 130 130 41 146 143 144 144 144 143 146 146 142 - 135 133 2 4 3 5 0 3 4 5 0 5 5 2 3 3 4 3 51 49 64 62 54 53 59 57 51 53 60 52 51 56 64 80 79 79 78 80 78 77 78 80 79 94 93 87 96 94 96 89 88 87 88 93 83 92 88 72 111 147 141 145 151 154 146 160 153 154 147 161 143 162 151 159 129 98 94 80 84 93 76 96 99 78 100 97 92 92 91 87 87 91 87 88 89 86 88 85 86 87 84 92 95 84 142 147 149 147 144 148 142 150 143 148 146 147 146 140 149 149 134 135 134 135 134 135 134 136 134 135 135 135 135 134 136 136 136 136 135 134 46 151 148 148 149 148 147 150 150 146 - 131 129 5 2 2 6 5 5 1 0 5 0 2 4 4 2 5 4 47 45 60 57 49 48 55 54 46 48 55 48 47 52 60 75 75 75 73 76 74 73 73 76 74 89 87 82 91 88 91 84 83 82 83 88 78 86 83 68 106 142 136 140 146 149 141 155 148 149 142 156 138 157 146 154 124 95 92 77 81 90 74 93 96 75 97 95 90 90 89 84 84 88 82 83 83 80 83 80 81 82 78 87 90 79 137 142 144 142 139 143 137 145 138 143 141 142 141 135 144 144 130 131 130 130 130 130 130 131 129 131 131 130 130 130 131 131 131 131 131 130 41 146 144 144 144 144 143 146 146 142 - 130 129 5 1 2 7 4 5 3 2 5 2 0 3 5 2 6 5 48 46 62 59 50 50 57 55 47 49 57 49 48 53 62 77 76 76 75 77 75 75 75 77 76 89 88 83 91 89 91 84 84 83 83 89 79 87 83 67 106 143 136 141 146 150 142 155 148 149 143 156 139 158 147 154 124 94 91 76 80 89 73 92 95 74 96 94 89 89 87 83 83 87 83 83 84 81 84 80 82 82 79 87 90 80 138 143 145 143 140 144 137 146 139 143 142 143 142 136 145 145 130 131 130 130 130 130 130 131 129 131 130 130 130 130 131 131 131 131 130 130 42 146 143 143 144 144 143 145 145 142 - 132 131 4 2 2 6 2 4 3 3 2 4 3 0 4 1 5 4 50 48 63 61 53 52 59 57 50 52 59 51 50 55 63 79 78 78 77 79 77 77 77 79 78 92 91 85 94 92 94 87 86 85 86 91 81 89 86 70 109 145 139 143 149 152 144 157 151 152 145 159 141 160 149 157 127 95 92 77 82 90 74 94 96 75 98 95 90 90 89 84 84 88 85 86 87 84 86 83 85 85 82 90 93 83 141 145 147 146 142 147 140 149 141 146 144 146 145 139 148 148 132 133 132 132 132 133 132 134 132 133 133 132 132 132 133 134 133 134 133 132 45 148 145 146 146 146 145 148 148 144 - 134 133 1 4 3 2 3 1 3 4 3 4 5 4 0 3 2 1 48 46 61 59 51 50 56 54 48 50 56 49 47 53 61 77 76 76 75 77 75 74 75 77 76 92 91 85 94 92 94 87 86 86 86 91 81 90 86 71 108 145 139 144 149 153 144 158 151 152 146 159 141 161 149 157 128 98 95 81 85 93 77 97 100 78 101 98 93 93 92 88 88 92 85 86 87 83 86 83 84 85 81 90 93 82 140 144 146 144 141 146 139 148 140 145 143 145 144 138 147 147 134 135 134 134 134 134 134 135 133 135 134 134 134 134 135 135 135 135 134 134 43 150 147 148 148 148 147 150 150 146 - 132 131 3 2 0 5 2 3 2 2 3 2 2 1 3 0 4 3 49 47 62 60 52 51 57 56 48 50 57 50 49 54 62 77 77 77 76 78 76 75 76 78 76 91 90 84 93 91 93 86 86 85 85 91 80 89 85 69 108 145 138 143 148 152 143 157 150 151 145 158 141 160 149 156 126 96 93 78 82 91 75 94 97 76 98 96 91 91 89 85 85 89 84 85 86 83 85 82 84 84 81 89 92 82 140 144 146 144 141 146 139 148 140 145 143 145 143 138 147 146 132 133 132 132 132 132 132 133 131 133 133 132 132 132 133 133 133 133 133 132 44 148 145 146 146 146 145 148 148 144 - 136 135 2 6 4 1 4 2 4 5 4 5 6 5 2 4 0 1 48 45 60 58 51 50 56 53 48 50 56 49 47 53 60 76 76 76 74 77 75 74 74 77 75 92 91 85 95 92 95 87 87 86 86 92 82 90 86 72 108 146 139 145 150 154 145 159 152 153 146 160 142 161 150 158 129 100 97 82 86 95 79 98 101 80 102 100 95 95 94 89 89 93 86 86 87 84 87 83 85 85 82 90 93 83 140 145 146 145 141 146 139 148 140 145 144 145 144 138 147 147 135 136 135 135 135 135 135 136 134 136 136 135 135 135 136 136 136 136 136 135 44 151 149 149 150 149 148 151 151 147 - 135 134 1 5 3 2 3 0 3 5 3 4 5 4 1 3 1 0 48 46 61 59 52 50 57 54 48 50 57 49 48 54 61 77 76 77 75 78 75 75 75 78 76 92 91 86 94 92 95 87 87 86 86 92 82 90 86 72 109 146 139 144 150 153 145 158 152 153 146 160 142 161 150 158 129 99 96 81 85 94 78 97 100 79 101 99 94 94 92 88 88 92 86 86 87 84 87 83 85 85 82 90 93 83 140 145 147 145 142 146 139 148 141 146 144 145 144 138 147 147 134 135 134 134 134 135 134 136 134 135 135 135 134 134 136 136 136 136 135 134 44 151 148 148 149 148 148 150 150 147 - 123 122 49 48 49 48 51 49 47 47 51 47 48 50 48 49 48 48 0 7 19 12 8 2 10 17 5 4 11 2 7 6 18 29 28 28 27 29 27 27 27 29 28 57 55 48 59 59 58 51 49 55 50 56 46 59 49 61 66 109 102 111 112 118 109 123 118 115 108 125 104 125 112 120 102 103 107 92 90 97 89 106 109 87 110 107 104 101 104 100 98 104 51 48 54 46 53 45 47 51 46 55 55 48 95 99 101 99 96 100 94 103 96 101 98 100 98 93 102 102 114 115 114 114 114 115 114 116 114 115 115 115 114 114 116 116 116 116 115 114 11 134 132 132 132 131 131 134 134 131 - 130 129 47 46 47 45 49 46 45 45 49 45 46 48 46 47 45 46 7 0 16 13 15 9 11 12 11 12 11 9 2 13 16 31 31 31 30 32 30 29 30 32 30 64 62 55 66 66 65 59 56 62 57 63 53 66 56 68 72 116 109 118 119 125 116 130 125 122 115 132 111 132 119 127 109 109 112 97 96 102 93 111 114 91 115 112 109 106 109 104 103 109 58 55 61 53 60 52 54 58 53 62 62 56 101 105 106 104 102 105 100 108 101 106 104 105 103 98 107 107 121 122 121 121 121 122 121 123 121 122 122 122 121 121 123 123 123 123 122 121 16 141 139 139 139 138 138 141 141 137 - 138 137 61 62 62 60 64 61 60 60 64 60 62 63 61 62 60 61 19 16 0 9 25 19 11 7 23 21 8 19 14 20 1 21 22 21 21 22 20 19 20 22 20 67 64 58 68 69 67 62 59 67 60 66 57 70 59 79 69 114 109 120 118 125 116 130 125 120 113 131 110 131 118 126 114 121 126 111 109 115 107 124 127 105 129 125 123 119 123 119 117 123 62 57 65 55 64 55 56 62 56 64 63 60 94 98 99 97 95 98 93 101 95 100 97 99 96 92 101 100 127 128 127 128 127 128 128 129 127 129 128 128 128 128 129 129 129 129 128 127 30 148 146 146 146 145 145 148 148 145 - 129 128 59 59 59 58 61 59 57 58 62 57 59 61 59 60 58 59 12 13 9 0 16 11 2 13 15 13 3 12 11 11 9 18 18 18 17 19 17 16 17 19 17 59 56 49 59 60 59 53 50 57 51 58 48 61 50 70 62 107 101 112 111 117 108 122 117 113 106 124 102 124 110 118 105 113 117 103 100 106 99 116 119 97 120 117 114 110 115 110 108 115 53 48 56 47 55 46 48 53 48 56 54 51 89 93 95 93 90 94 88 97 90 95 92 94 92 87 96 96 118 119 118 119 118 119 119 120 118 120 119 119 119 118 120 120 120 120 119 118 22 138 137 137 137 136 136 139 139 135 - 115 114 52 51 51 51 54 52 50 49 54 49 50 53 51 52 51 52 8 15 25 16 0 7 14 25 4 4 17 7 15 5 24 29 27 28 26 29 27 27 27 29 28 49 47 40 51 51 50 43 41 46 42 48 38 50 41 54 59 101 95 104 105 111 102 115 110 108 101 117 97 117 105 113 94 97 101 87 84 91 84 100 103 81 104 101 98 95 99 94 92 99 43 40 46 38 45 37 39 43 38 47 47 40 89 94 96 94 91 95 89 97 90 95 93 94 93 87 96 96 106 107 106 106 106 106 106 108 106 107 107 106 106 106 107 108 107 107 106 106 8 126 124 124 124 123 123 126 126 122 - 122 121 51 50 50 50 53 51 49 48 53 48 50 52 50 51 50 50 2 9 19 11 7 0 9 18 4 3 11 1 9 4 18 27 26 27 25 28 25 25 25 28 26 56 53 46 57 57 56 50 47 53 48 55 44 57 47 61 64 107 100 110 110 116 107 121 116 113 106 123 102 123 110 118 100 103 107 93 90 97 89 106 109 87 110 107 104 100 104 100 98 104 50 46 52 44 51 43 45 49 44 53 53 47 93 97 99 97 94 98 92 101 94 98 96 98 96 91 100 100 112 114 113 113 113 113 113 115 113 114 114 113 113 113 114 115 114 114 113 112 11 132 130 131 131 130 130 133 133 129 - 128 127 57 57 57 56 59 57 55 55 59 55 57 59 56 57 56 57 10 11 11 2 14 9 0 13 13 11 3 10 9 9 10 20 20 20 19 21 19 18 19 21 19 58 56 49 59 60 59 53 50 57 51 57 48 61 50 68 63 108 102 112 111 118 109 122 117 114 106 124 103 124 111 119 104 111 115 101 98 105 97 114 117 95 118 115 112 109 113 108 106 113 53 48 55 47 54 46 47 52 47 55 54 50 90 95 96 94 92 95 90 98 91 96 93 95 93 88 97 97 117 119 118 118 117 118 118 120 118 119 119 118 118 118 119 119 119 119 118 117 20 138 136 136 136 135 135 138 138 135 - 140 139 55 56 55 53 57 55 54 54 57 54 55 57 54 56 53 54 17 12 7 13 25 18 13 0 22 21 10 19 11 21 8 28 29 28 27 29 27 26 27 29 27 71 68 62 72 73 72 65 63 70 64 70 60 73 63 79 75 120 114 124 124 130 121 135 130 126 119 137 115 136 123 131 117 120 124 109 107 114 105 123 126 104 127 124 121 118 121 117 115 121 66 61 68 59 67 59 60 65 60 68 67 63 101 105 106 104 102 105 100 108 102 107 103 105 103 99 108 107 130 131 130 130 130 131 131 132 130 131 131 131 130 130 132 132 132 132 131 130 28 150 148 149 148 148 147 150 151 147 - 118 117 49 48 48 48 50 49 46 46 51 46 47 50 48 48 48 48 5 11 23 15 4 4 13 22 0 2 15 3 12 6 23 30 29 30 28 31 29 28 28 31 29 54 51 45 55 55 55 48 46 51 46 53 42 55 46 57 63 106 99 108 109 115 106 120 114 112 105 122 101 122 109 117 98 99 103 88 86 93 85 101 105 82 106 102 100 96 100 96 94 100 48 44 50 43 49 42 43 47 42 51 51 45 93 98 100 98 95 99 93 101 94 99 97 98 97 91 100 100 109 111 110 110 110 110 110 112 110 111 111 110 110 110 111 112 111 111 110 109 7 129 127 128 128 127 127 130 130 126 - 119 118 51 50 50 50 52 51 48 48 53 48 49 52 50 50 50 50 4 12 21 13 4 3 11 21 2 0 14 3 11 4 21 28 27 28 26 29 27 26 26 29 27 53 51 44 54 54 54 47 45 50 46 52 42 54 45 58 62 105 98 107 108 114 105 119 113 111 104 121 100 121 108 116 98 100 104 90 87 94 86 103 106 84 107 104 101 98 101 97 95 102 47 44 49 42 48 41 43 46 42 50 50 44 92 96 98 96 93 97 91 100 92 97 95 97 95 90 99 99 110 111 110 110 110 110 110 112 110 111 111 110 110 110 111 112 111 111 110 109 9 129 127 128 128 127 127 130 130 126 - 131 130 57 57 57 56 59 57 55 56 60 55 57 59 56 57 56 57 11 11 8 3 17 11 3 10 15 14 0 12 9 12 7 21 21 21 20 22 19 19 19 22 20 61 58 52 62 63 62 55 53 60 54 60 50 64 53 71 65 110 104 114 114 120 111 125 120 116 109 127 105 127 113 121 107 114 118 103 101 107 100 116 120 97 121 117 115 111 115 111 109 115 56 51 58 49 57 49 50 55 50 58 57 53 92 96 98 96 93 97 91 100 93 98 95 97 95 90 99 99 120 122 121 121 120 121 121 122 121 122 122 121 121 121 122 122 122 122 121 120 22 140 139 139 139 138 138 141 141 138 - 121 120 50 49 50 49 52 50 48 48 52 48 49 51 49 50 49 49 2 9 19 12 7 1 10 19 3 3 12 0 9 5 19 28 27 28 26 29 26 26 26 29 27 56 53 46 57 57 56 50 47 53 48 55 44 57 47 60 64 107 101 110 111 117 107 121 116 113 106 123 102 123 111 118 100 102 106 92 89 96 88 105 108 86 109 106 103 100 103 99 97 103 50 46 52 44 51 43 45 49 44 53 53 47 93 98 100 98 95 99 93 101 94 99 97 98 97 91 100 100 112 113 112 113 112 113 113 114 112 114 113 113 113 113 114 114 114 114 113 112 10 132 130 131 130 130 129 132 133 129 - 130 129 48 48 48 47 50 48 47 47 51 47 48 50 47 49 47 48 7 2 14 11 15 9 9 11 12 11 9 9 0 12 14 30 29 29 28 30 28 27 28 30 29 64 61 55 65 65 65 58 56 62 57 63 53 65 56 68 71 115 109 118 119 125 115 129 124 121 114 131 110 131 118 126 109 110 113 98 97 103 95 112 115 93 116 113 110 107 110 106 104 110 58 54 61 53 59 52 53 58 53 61 61 55 99 104 105 103 100 104 99 107 100 105 102 104 102 97 106 106 121 122 121 122 121 122 122 123 121 123 122 122 122 121 123 123 123 123 122 121 17 141 139 139 139 139 138 141 141 138 - 119 118 54 53 54 53 56 54 52 52 56 52 53 55 53 54 53 54 6 13 20 11 5 4 9 21 6 4 12 5 12 0 19 25 23 24 22 25 23 22 23 25 23 52 49 42 53 53 52 46 43 49 44 51 40 53 43 59 59 103 96 106 106 112 103 117 112 109 102 119 98 119 106 114 97 102 106 92 89 96 89 105 108 86 109 106 103 100 104 99 97 104 46 42 48 40 47 39 41 45 40 49 49 43 89 93 95 93 90 94 88 96 89 94 92 94 92 87 96 95 109 110 109 110 109 110 110 111 109 111 110 110 110 110 111 111 111 111 110 109 12 129 127 128 128 127 127 130 130 126 - 138 137 62 62 62 60 64 61 60 60 64 60 62 63 61 62 60 61 18 16 1 9 24 18 10 8 23 21 7 19 14 19 0 20 21 21 20 21 19 19 19 21 20 67 64 57 67 69 67 61 58 66 59 66 56 70 58 78 68 114 108 119 118 125 115 129 124 120 113 131 109 131 117 125 113 121 125 111 108 115 107 124 127 105 128 125 122 119 122 118 116 123 62 56 64 55 63 54 56 61 56 64 62 59 94 98 99 97 95 98 93 101 95 99 96 98 96 91 100 100 127 128 127 127 127 127 127 129 127 128 128 127 127 127 128 129 128 128 127 127 29 147 145 146 145 145 145 148 148 144 - 129 128 77 77 77 76 79 77 75 75 80 75 77 79 77 77 76 77 29 31 21 18 29 27 20 28 30 28 21 28 30 25 20 0 2 1 3 1 2 2 2 1 1 54 50 44 54 56 53 49 45 55 47 53 45 58 46 76 50 96 91 103 100 107 98 112 107 102 94 113 91 113 99 107 100 120 126 113 108 113 109 124 127 106 128 125 123 118 124 120 117 124 50 43 53 42 51 42 43 49 45 51 48 48 73 77 79 76 74 77 73 81 74 79 76 78 75 71 80 80 115 117 116 116 115 116 116 118 116 117 117 116 116 116 117 118 117 117 116 115 37 136 135 135 135 134 134 137 137 134 - 127 126 77 76 77 76 79 77 75 75 79 75 76 78 76 77 76 76 28 31 22 18 27 26 20 29 29 27 21 27 29 23 21 2 0 1 1 2 2 3 2 2 2 52 48 42 52 54 51 47 43 53 45 51 43 56 44 74 48 94 89 101 98 106 96 110 105 100 93 112 90 111 98 105 98 118 124 111 106 111 107 122 125 104 126 123 121 116 122 118 115 122 48 41 51 40 49 40 41 47 42 49 46 46 72 76 78 76 74 77 72 80 74 78 75 77 75 70 79 79 113 114 114 114 113 114 114 116 114 115 115 114 114 114 115 115 115 115 114 113 36 134 133 133 133 132 132 135 135 132 - 128 127 77 77 77 76 79 77 75 75 79 75 76 78 76 77 76 77 28 31 21 18 28 27 20 28 30 28 21 28 29 24 21 1 1 0 2 1 2 2 2 1 1 53 49 43 53 55 52 48 44 54 46 51 44 57 45 75 49 95 90 102 99 106 97 111 106 101 93 112 91 112 98 106 99 119 125 112 107 112 108 123 126 105 127 124 122 117 123 119 116 123 49 42 52 41 50 41 42 48 43 50 46 47 73 77 78 76 74 77 72 80 74 79 75 77 75 71 80 79 114 115 115 115 114 115 115 116 115 116 116 115 115 115 116 116 116 116 115 114 36 135 134 134 133 133 133 136 136 133 - 127 126 76 75 75 75 77 75 74 73 78 73 75 77 75 76 74 75 27 30 21 17 26 25 19 27 28 26 20 26 28 22 20 3 1 2 0 3 1 2 1 3 1 52 49 43 52 54 51 47 43 53 45 51 43 56 44 73 49 95 90 102 99 106 97 111 106 101 94 113 91 112 98 106 98 117 124 110 106 111 107 121 124 103 126 122 121 116 121 117 115 121 48 41 51 40 49 40 41 47 42 49 46 46 74 78 79 77 75 78 73 81 75 79 76 78 76 71 80 80 114 115 114 114 114 114 114 116 114 115 115 114 114 114 115 116 115 115 114 113 34 134 133 133 133 132 132 135 135 132 - 129 128 78 78 78 77 80 78 76 76 80 76 77 79 77 78 77 78 29 32 22 19 29 28 21 29 31 29 22 29 30 25 21 1 2 1 3 0 2 3 3 0 2 53 50 44 53 56 52 48 44 55 46 52 45 58 45 76 49 95 90 102 99 107 97 111 106 101 94 113 91 112 98 106 99 120 126 113 108 113 109 124 127 106 128 125 123 118 124 120 117 124 50 42 52 42 51 41 42 49 44 50 47 48 72 76 78 76 74 76 72 80 74 78 75 77 75 70 79 79 115 116 115 116 115 116 116 117 115 117 116 116 116 115 117 117 117 117 115 115 37 136 134 135 134 134 134 137 137 133 - 129 128 76 75 76 75 78 76 74 74 78 74 75 77 75 76 75 75 27 30 20 17 27 25 19 27 29 27 19 26 28 23 19 2 2 2 1 2 0 1 0 2 1 54 50 44 53 56 53 48 45 55 46 52 45 58 45 75 50 96 91 103 100 108 98 112 107 102 95 114 92 113 100 107 100 119 125 111 107 112 108 123 126 105 127 123 122 117 122 118 116 123 50 43 52 42 51 41 43 49 44 50 47 47 74 78 80 78 75 78 74 82 75 80 77 79 77 72 81 81 115 116 115 116 115 116 116 117 115 117 116 116 116 116 117 117 117 117 116 115 35 136 134 135 134 134 134 137 137 133 - 129 128 75 75 75 74 77 75 73 73 77 73 75 77 74 75 74 75 27 29 19 16 27 25 18 26 28 26 19 26 27 22 19 2 3 2 2 3 1 0 1 3 1 54 50 44 54 56 53 49 45 55 47 52 45 58 46 75 51 97 91 103 101 108 99 112 108 103 95 114 92 114 100 108 100 118 125 111 107 112 108 122 126 104 127 123 122 117 122 118 116 122 50 43 52 42 51 41 43 49 44 51 48 48 75 79 80 78 76 79 74 82 76 81 77 79 77 73 82 81 115 116 115 116 115 116 116 117 116 117 116 116 116 116 117 117 117 117 116 115 35 136 135 135 134 134 134 137 137 133 - 128 127 76 75 75 75 78 75 74 74 78 73 75 77 75 76 74 75 27 30 20 17 27 25 19 27 28 26 19 26 28 23 19 2 2 2 1 3 0 1 0 2 1 53 50 44 53 55 52 48 44 54 46 52 44 57 45 74 50 96 91 103 100 107 98 112 107 102 95 113 92 113 99 107 99 118 124 111 107 112 107 122 125 104 126 123 121 117 122 118 115 122 49 42 52 41 50 41 42 48 44 50 47 47 74 78 80 77 75 78 74 82 75 80 77 79 76 72 81 81 115 116 115 115 115 115 115 117 115 116 116 115 115 115 116 117 116 116 115 114 35 135 134 134 134 133 133 136 136 133 - 129 128 78 77 78 77 80 78 76 76 80 76 77 79 77 78 77 78 29 32 22 19 29 28 21 29 31 29 22 29 30 25 21 1 2 1 3 0 2 3 2 0 2 53 50 44 53 56 53 48 45 55 47 52 45 58 45 76 49 95 90 102 99 107 98 111 107 101 94 113 91 112 99 106 99 120 126 113 108 113 109 124 127 106 128 125 123 118 124 120 117 124 50 43 52 42 51 41 43 49 44 50 47 48 73 77 78 76 74 77 72 80 74 78 75 77 75 70 79 79 115 116 115 116 115 116 116 117 115 117 116 116 116 116 117 117 117 117 116 115 37 136 134 135 134 134 134 137 137 133 - 129 128 77 76 76 75 78 76 74 74 79 74 76 78 76 76 75 76 28 30 20 17 28 26 19 27 29 27 20 27 29 23 20 1 2 1 1 2 1 1 1 2 0 53 50 44 53 56 53 48 44 55 46 52 44 57 45 75 50 96 91 103 100 107 98 111 107 102 94 113 91 113 99 107 99 119 125 112 107 112 108 123 126 105 127 124 122 117 123 119 116 123 50 42 52 42 51 41 42 49 44 50 47 47 74 78 79 77 75 78 73 81 75 79 76 78 76 72 80 80 115 116 115 115 115 116 116 117 115 116 116 116 115 115 116 117 117 116 115 115 36 135 134 135 134 134 133 136 136 133 - 77 76 93 90 91 93 93 93 89 89 94 89 89 92 92 91 92 92 57 64 67 59 49 56 58 71 54 53 61 56 64 52 67 54 52 53 52 53 54 54 53 53 53 0 3 10 3 3 3 6 9 8 7 1 12 7 8 42 26 54 47 54 57 62 53 67 61 60 54 68 50 69 58 65 46 80 90 81 72 74 79 87 89 73 90 87 87 81 89 86 83 90 7 11 6 12 6 13 11 7 12 3 8 9 57 61 64 62 58 64 56 64 56 61 61 61 62 55 63 63 62 63 62 62 62 62 63 64 62 63 63 62 62 62 63 64 63 63 62 61 53 82 81 82 81 80 80 83 83 80 - 80 80 91 89 90 92 92 91 88 87 93 87 88 91 91 90 91 91 55 62 64 56 47 53 56 68 51 51 58 53 61 49 64 50 48 49 49 50 50 50 50 50 50 3 0 7 4 6 4 4 6 10 5 2 10 10 6 43 24 55 49 57 59 64 55 69 63 62 55 71 51 71 59 67 50 83 93 83 75 77 80 89 92 75 92 89 90 84 91 88 85 92 6 8 6 9 6 10 8 6 9 1 5 8 56 60 63 61 57 63 55 63 55 60 60 61 61 54 62 62 65 66 65 66 65 66 66 67 65 67 66 66 66 66 67 67 67 67 66 65 51 86 85 85 84 84 84 87 87 84 - 86 85 86 83 84 86 87 86 83 82 87 82 83 85 85 84 85 86 48 55 58 49 40 46 49 62 45 44 52 46 55 42 57 44 42 43 43 44 44 44 44 44 44 10 7 0 10 12 10 4 1 12 3 9 5 14 1 43 26 61 55 63 65 70 61 75 70 68 61 77 57 77 65 73 56 84 94 83 75 78 80 90 93 76 94 91 91 85 92 89 86 93 6 2 9 2 7 3 1 6 4 7 8 6 59 63 65 64 60 65 58 66 58 63 63 63 63 57 65 65 71 72 71 72 71 72 72 73 71 73 72 72 72 72 73 73 73 73 72 71 45 92 90 91 90 90 90 93 93 89 - 78 77 95 92 93 95 96 95 92 91 96 91 91 94 94 93 95 94 59 66 68 59 51 57 59 72 55 54 62 57 65 53 67 54 52 53 52 53 53 54 53 53 53 3 4 10 0 5 1 7 9 11 9 3 13 9 9 44 23 52 45 53 55 60 51 65 59 58 52 67 47 67 56 63 46 82 93 84 75 77 81 89 92 76 92 89 90 84 92 89 85 92 9 11 8 13 8 13 12 9 13 4 7 11 54 58 61 60 55 61 53 61 53 58 58 59 59 53 60 60 62 63 62 63 62 63 63 64 63 64 63 63 63 63 64 64 64 64 63 62 55 83 82 82 82 81 81 84 84 81 - 74 73 93 89 91 93 93 93 89 88 94 88 89 92 92 91 92 92 59 66 69 60 51 57 60 73 55 54 63 57 65 53 69 56 54 55 54 56 56 56 55 56 56 3 6 12 5 0 6 8 11 7 9 4 13 4 11 39 28 54 47 53 57 61 53 66 60 60 54 68 50 69 58 65 44 77 88 79 70 72 76 84 87 71 87 84 85 79 86 84 80 87 7 13 5 14 6 15 13 8 13 6 11 10 59 63 66 65 60 66 58 66 58 63 63 63 64 57 65 65 59 60 59 60 59 60 60 61 60 61 60 60 60 60 61 61 61 61 60 59 54 80 79 79 78 78 78 81 81 78 - 79 78 95 92 93 95 96 95 92 91 96 91 91 94 94 93 95 95 58 65 67 59 50 56 59 72 55 54 62 56 65 52 67 53 51 52 51 52 53 53 52 53 53 3 4 10 1 6 0 7 9 11 8 3 13 10 9 45 22 52 45 53 55 60 51 65 59 58 52 67 47 68 56 63 47 83 94 85 76 78 82 90 93 77 93 90 91 84 92 90 86 93 9 11 9 12 8 13 11 9 13 4 6 12 53 58 60 59 55 60 52 61 53 57 58 58 58 52 59 60 63 64 63 64 63 64 64 65 63 64 64 64 63 63 64 65 65 64 63 63 54 84 83 83 82 82 82 85 85 82 - 81 80 88 85 86 88 88 87 84 83 89 84 84 87 87 86 87 87 51 59 62 53 43 50 53 65 48 47 55 50 58 46 61 49 47 48 47 48 48 49 48 48 48 6 4 4 7 8 7 0 4 8 2 5 6 9 3 40 27 59 53 60 63 68 59 72 67 66 59 74 55 75 63 71 52 81 91 81 72 75 78 87 90 73 91 87 88 82 89 86 83 90 3 6 4 6 3 7 6 2 6 3 8 4 59 64 66 65 61 66 58 67 59 63 64 64 64 58 65 66 67 68 67 67 67 67 68 69 67 68 68 67 67 67 68 69 68 68 67 66 47 87 86 87 86 85 85 88 88 85 - 85 84 87 84 86 87 88 87 84 83 88 83 84 86 86 86 87 87 49 56 59 50 41 47 50 63 46 45 53 47 56 43 58 45 43 44 43 44 45 45 44 45 44 9 6 1 9 11 9 4 0 12 2 8 6 14 1 44 25 60 54 62 64 69 60 74 68 67 60 76 56 76 64 72 55 85 94 84 76 79 81 91 94 76 94 91 91 85 93 90 86 93 6 2 9 3 7 4 2 6 5 6 6 6 57 62 64 63 59 64 56 65 57 62 62 62 62 56 64 64 70 72 71 71 70 71 71 73 71 72 72 71 71 71 72 73 72 72 71 70 46 91 90 90 90 89 89 92 92 89 - 74 73 87 83 85 87 87 87 83 82 87 82 83 85 86 85 86 86 55 62 67 57 46 53 57 70 51 50 60 53 62 49 66 55 53 54 53 55 55 55 54 55 55 8 10 12 11 7 11 8 12 0 10 9 10 4 11 34 34 60 53 59 63 67 59 72 66 66 60 74 56 75 64 72 48 73 83 73 65 67 71 79 82 66 83 80 80 74 82 79 75 82 6 14 4 13 5 14 13 6 11 9 15 7 65 69 72 71 66 72 64 72 64 69 69 70 70 63 71 71 61 62 61 61 61 61 62 63 61 62 62 62 61 61 62 63 63 62 61 61 49 81 80 80 80 79 79 82 82 79 - 83 82 87 84 85 87 88 87 84 83 88 83 83 86 86 85 86 86 50 57 60 51 42 48 51 64 46 46 54 48 57 44 59 47 45 46 45 46 46 47 46 47 46 7 5 3 9 9 8 2 2 10 0 6 5 11 1 42 27 60 54 61 64 69 60 74 68 67 60 75 56 76 64 72 54 82 92 82 74 76 79 88 91 74 92 89 89 83 90 87 84 91 4 4 6 5 5 5 4 3 4 5 7 4 59 63 66 64 60 66 58 66 59 63 63 64 64 57 65 65 69 70 69 69 69 69 69 71 69 70 70 69 69 69 70 71 70 70 69 68 46 89 88 88 88 87 87 90 90 87 - 78 78 92 89 91 92 93 92 89 88 93 88 89 91 91 91 92 92 56 63 66 58 48 55 57 70 53 52 60 55 63 51 66 53 51 51 51 52 52 52 52 52 52 1 2 9 3 4 3 5 8 9 6 0 11 8 7 42 25 54 48 55 58 63 54 68 62 61 54 69 50 70 58 66 48 81 91 82 73 75 79 87 90 74 91 88 88 82 90 87 84 91 6 10 6 11 5 12 10 6 11 2 7 9 56 61 63 62 58 63 55 64 56 60 61 61 61 55 62 63 63 64 63 64 63 64 64 65 63 65 64 64 63 63 64 65 65 65 63 63 52 84 82 83 82 82 82 85 85 81 - 84 83 82 79 80 82 83 82 79 78 83 78 79 81 81 80 82 82 46 53 57 48 38 44 48 60 42 42 50 44 53 40 56 45 43 44 43 45 45 45 44 45 44 12 10 5 13 13 13 6 6 10 5 11 0 13 5 39 31 65 58 66 68 73 64 78 72 71 65 80 61 81 69 77 57 81 90 79 71 75 76 86 89 71 90 87 87 81 88 85 82 89 5 7 8 5 7 5 5 5 1 9 12 3 63 68 70 69 65 70 62 71 63 68 68 68 68 62 70 70 71 72 71 71 71 71 72 73 71 72 72 72 71 71 72 73 73 72 71 71 41 91 90 90 90 89 89 92 92 89 - 72 71 91 87 89 91 91 91 87 86 92 86 87 89 90 89 90 90 59 66 70 61 50 57 61 73 55 54 64 57 65 53 70 58 56 57 56 58 58 58 57 58 57 7 10 14 9 4 10 9 14 4 11 8 13 0 13 35 32 56 49 55 59 63 55 68 62 63 56 70 52 71 60 68 44 73 84 75 66 68 72 80 83 67 83 80 81 75 82 80 76 83 8 16 5 16 7 16 15 9 14 9 15 11 63 67 69 68 64 70 62 70 62 66 67 67 68 61 68 69 57 59 58 58 58 58 58 60 58 59 59 58 58 58 59 60 59 59 58 57 53 78 77 77 77 76 76 79 79 76 - 84 83 87 84 85 87 87 86 83 82 88 83 83 86 86 85 86 86 49 56 59 50 41 47 50 63 46 45 53 47 56 43 58 46 44 45 44 45 45 46 45 45 45 8 6 1 9 11 9 3 1 11 1 7 5 13 0 42 26 61 54 62 64 69 60 74 69 67 60 76 56 77 65 72 55 83 93 83 75 77 80 89 92 75 93 90 90 84 91 88 85 92 5 3 7 3 6 4 3 4 4 5 7 5 59 63 65 64 60 65 58 66 58 63 63 64 63 57 65 65 70 71 70 70 70 70 71 72 70 71 71 70 70 70 71 72 71 71 70 69 45 90 89 90 89 88 88 91 91 88 - 64 63 72 68 70 73 72 72 69 67 72 68 67 70 71 69 72 72 61 68 79 70 54 61 68 79 57 58 71 60 68 59 78 76 74 75 73 76 75 75 74 76 75 42 43 43 44 39 45 40 44 34 42 42 39 35 42 0 67 86 79 79 89 90 83 95 88 92 87 96 83 98 90 97 59 44 51 40 33 38 37 48 52 33 53 49 48 43 49 46 43 50 38 45 37 43 38 43 44 38 40 42 48 37 98 102 105 104 99 105 97 105 97 102 103 103 103 97 104 104 62 63 62 63 62 63 62 64 62 64 63 63 63 62 64 64 64 64 63 62 51 79 76 77 77 77 76 79 79 75 - 96 95 109 107 108 109 110 109 106 105 111 106 106 109 108 108 108 109 66 72 69 62 59 64 63 75 63 62 65 64 71 59 68 50 48 49 49 49 50 51 50 49 50 26 24 26 23 28 22 27 25 34 27 25 31 32 26 67 0 46 41 55 50 58 49 62 58 52 45 64 42 63 49 57 58 105 116 107 98 100 104 112 115 99 115 112 113 107 115 112 109 116 30 24 30 27 30 27 26 29 30 25 19 31 33 37 40 38 34 39 32 40 33 37 37 38 37 31 39 39 77 78 77 77 77 77 78 79 77 78 78 78 77 77 78 79 79 78 77 76 65 97 97 97 96 95 96 99 99 96 - 79 79 146 143 145 147 147 146 143 142 147 142 143 145 145 145 146 146 109 116 114 107 101 107 108 120 106 105 110 107 115 103 114 96 94 95 95 95 96 97 96 95 96 54 55 61 52 54 52 59 60 60 60 54 65 56 61 86 46 0 7 17 4 13 6 16 14 6 4 18 5 17 4 12 38 109 123 119 108 105 117 117 119 112 120 117 120 113 123 121 118 124 60 61 59 63 59 64 63 61 65 56 54 63 41 42 44 45 41 45 40 42 39 39 44 42 45 42 41 42 56 56 56 57 56 56 57 57 57 57 57 57 56 57 57 57 57 56 56 56 106 71 72 72 70 70 71 73 73 72 - 76 76 140 137 138 140 140 140 136 135 141 136 136 139 139 138 139 139 102 109 109 101 95 100 102 114 99 98 104 101 109 96 108 91 89 90 90 90 91 91 91 90 91 47 49 55 45 47 45 53 54 53 54 48 58 49 54 79 41 7 0 16 10 17 8 21 17 13 8 23 4 23 11 18 34 104 117 113 102 100 111 112 114 105 114 111 114 107 117 116 112 118 54 55 52 57 53 58 56 54 58 49 48 56 41 42 44 45 41 46 40 43 39 40 44 42 45 41 42 42 53 53 53 53 53 53 54 54 54 54 54 53 53 53 53 54 54 53 52 52 99 69 70 70 68 68 69 71 71 69 - 63 63 145 141 143 145 145 145 141 140 145 140 141 143 144 143 145 144 111 118 120 112 104 110 112 124 108 107 114 110 118 106 119 103 101 102 102 102 103 103 103 102 103 54 57 63 53 53 53 60 62 59 61 55 66 55 62 79 55 17 16 0 16 11 10 16 9 19 20 17 18 20 19 21 24 97 110 108 97 94 107 105 107 101 107 105 108 101 111 110 106 112 61 64 59 65 59 66 65 61 66 57 57 64 56 58 60 61 57 61 56 58 54 55 60 58 61 57 57 58 40 40 40 41 40 40 42 41 41 41 41 41 40 41 41 41 41 40 40 40 107 54 55 56 54 54 54 56 57 55 - 79 79 150 147 148 150 150 150 147 146 151 146 146 149 149 148 150 150 112 119 118 111 105 110 111 124 109 108 114 111 119 106 118 100 98 99 99 99 100 101 100 99 100 57 59 65 55 57 55 63 64 63 64 58 68 59 64 89 50 4 10 16 0 10 7 12 11 3 6 14 8 13 2 8 39 111 124 121 110 107 119 119 121 114 121 119 122 115 124 123 119 125 64 65 62 67 63 68 66 64 68 59 58 67 43 44 46 47 44 48 43 44 41 41 46 44 47 44 43 44 56 56 56 57 56 56 57 57 57 57 57 57 56 57 57 57 57 56 56 56 110 70 71 72 70 69 70 72 73 71 - 73 73 154 150 152 154 154 154 150 149 154 149 150 152 153 152 154 153 118 125 125 117 111 116 118 130 115 114 120 117 125 112 125 107 106 106 106 107 108 108 107 107 107 62 64 70 60 61 60 68 69 67 69 63 73 63 69 90 58 13 17 11 10 0 9 5 3 11 16 7 17 9 12 11 35 108 122 119 108 105 118 116 118 112 118 116 119 112 122 121 117 123 68 71 67 72 67 73 72 69 73 64 64 71 53 54 56 57 53 57 53 54 51 51 56 54 57 54 53 53 50 50 50 50 50 50 51 51 51 51 51 51 50 51 50 51 51 50 49 50 115 62 64 64 62 62 63 65 65 64 - 73 73 145 142 143 146 146 145 142 141 146 141 142 144 144 143 145 145 109 116 116 108 102 107 109 121 106 105 111 107 115 103 115 98 96 97 97 97 98 99 98 98 98 53 55 61 51 53 51 59 60 59 60 54 64 55 60 83 49 6 8 10 7 9 0 14 9 10 10 16 9 16 9 14 33 104 118 114 103 101 113 112 114 107 114 112 115 108 118 117 113 119 60 61 58 63 59 64 63 60 64 55 55 63 47 48 50 51 47 51 46 48 44 45 50 48 51 47 47 48 50 50 50 50 50 50 51 51 51 51 51 50 50 51 50 51 51 50 49 49 106 64 66 66 64 64 65 67 67 65 - 76 77 159 155 157 159 159 159 155 154 160 155 155 157 158 157 159 158 123 130 130 122 115 121 122 135 120 119 125 121 129 117 129 112 110 111 111 111 112 112 112 111 111 67 69 75 65 66 65 72 74 72 74 68 78 68 74 95 62 16 21 16 12 5 14 0 7 12 18 2 20 4 14 9 40 112 126 124 113 109 123 121 122 117 122 120 124 117 127 126 122 128 73 75 72 77 72 78 76 74 78 69 68 76 55 55 56 58 55 58 54 54 52 52 57 55 58 56 53 54 54 54 54 54 53 54 55 54 55 54 54 54 54 54 54 54 54 54 53 53 120 64 66 67 65 64 65 67 67 66 - 70 71 152 149 150 153 153 152 149 148 153 148 148 151 151 150 152 152 118 125 125 117 110 116 117 130 114 113 120 116 124 112 124 107 105 106 106 106 107 108 107 107 107 61 63 70 59 60 59 67 68 66 68 62 72 62 69 88 58 14 17 9 11 3 9 7 0 13 17 8 18 11 14 13 33 105 119 117 106 102 116 114 115 110 115 113 117 110 119 119 115 120 67 70 65 72 66 72 71 68 72 63 63 70 55 55 57 58 55 59 54 55 52 52 58 55 59 56 54 55 47 48 48 48 47 47 49 48 49 48 48 48 48 48 48 48 48 48 47 47 114 60 61 62 60 59 60 62 62 61 - 82 82 153 150 151 153 154 153 150 149 154 149 149 152 152 151 153 153 115 122 120 113 108 113 114 126 112 111 116 113 121 109 120 102 100 101 101 101 102 103 102 101 102 60 62 68 58 60 58 66 67 66 67 61 71 63 67 92 52 6 13 19 3 11 10 12 13 0 7 13 11 11 3 5 42 114 128 124 113 111 123 122 124 117 124 122 125 118 128 127 123 129 67 68 65 70 66 71 69 67 71 62 61 70 43 43 45 46 43 47 42 43 41 40 45 43 47 44 42 43 59 59 59 59 59 59 60 60 60 60 60 60 59 60 59 60 60 59 58 59 112 72 74 74 72 72 73 75 75 74 - 82 82 146 143 145 147 147 146 143 142 147 142 143 145 146 145 146 146 108 115 113 106 101 106 106 119 105 104 109 106 114 102 113 94 93 93 94 94 95 95 95 94 94 54 55 61 52 54 52 59 60 60 60 54 65 56 60 87 45 4 8 20 6 16 10 18 17 7 0 20 4 19 5 12 41 112 125 121 110 108 119 120 122 113 122 119 122 115 125 124 120 126 60 61 59 63 59 64 62 61 64 56 54 63 37 38 40 41 38 42 37 38 35 35 40 38 41 38 37 38 59 60 60 60 59 59 61 61 60 60 60 60 60 60 60 60 60 60 59 59 106 74 75 76 74 74 74 77 77 75 - 76 77 160 157 158 161 161 160 157 156 161 156 156 159 159 158 160 160 125 132 131 124 117 123 124 137 122 121 127 123 131 119 131 113 112 112 113 113 114 114 113 113 113 68 71 77 67 68 67 74 76 74 75 69 80 70 76 96 64 18 23 17 14 7 16 2 8 13 20 0 22 4 15 11 41 113 127 125 113 110 124 121 123 118 123 121 125 118 127 127 123 128 75 77 73 79 74 80 78 76 80 71 70 78 56 56 58 59 56 60 56 56 54 53 59 56 60 58 55 56 54 54 54 54 54 54 55 55 55 54 54 54 54 54 54 54 54 54 53 53 121 64 66 66 64 64 65 67 67 66 - 79 79 142 139 141 142 143 142 139 138 143 138 139 141 141 141 142 142 104 111 110 102 97 102 103 115 101 100 105 102 110 98 109 91 90 91 91 91 92 92 92 91 91 50 51 57 47 50 47 55 56 56 56 50 61 52 56 83 42 5 4 18 8 17 9 20 18 11 4 22 0 21 8 16 38 107 121 117 105 104 115 116 118 109 118 115 118 111 121 119 116 122 56 57 55 59 55 60 58 56 60 52 50 59 38 39 42 42 38 43 37 40 36 37 41 39 42 39 39 39 56 57 57 57 56 56 58 58 57 57 57 57 57 57 57 58 57 57 56 56 102 72 73 74 72 71 72 74 75 73 - 80 81 162 158 160 162 162 161 158 157 162 157 158 160 161 160 161 161 125 132 131 124 117 123 124 136 122 121 127 123 131 119 131 113 111 112 112 112 113 114 113 112 113 69 71 77 67 69 68 75 76 75 76 70 81 71 77 98 63 17 23 20 13 9 16 4 11 11 19 4 21 0 14 7 44 116 130 128 117 113 127 125 126 121 126 124 128 121 131 130 126 132 76 77 74 79 75 80 79 76 80 72 70 79 53 53 55 56 53 57 53 53 51 50 56 53 57 55 52 52 58 58 58 58 57 58 59 59 59 58 58 58 58 58 58 58 58 58 57 57 122 68 70 70 68 68 69 71 71 70 - 82 82 150 147 149 151 151 150 147 146 151 146 147 149 149 149 150 150 112 119 118 110 105 110 111 123 109 108 113 111 118 106 117 99 98 98 98 98 100 100 99 99 99 58 59 65 56 58 56 63 64 64 64 58 69 60 65 90 49 4 11 19 2 12 9 14 14 3 5 15 8 14 0 8 41 113 126 123 111 109 121 121 123 115 123 121 124 117 126 125 121 127 64 65 63 67 63 68 66 65 69 60 58 67 41 42 44 45 41 45 41 42 39 39 44 42 45 42 41 41 58 59 59 59 58 59 60 60 59 59 59 59 59 59 59 60 59 59 58 58 110 72 74 74 72 72 73 75 75 74 - 84 84 158 155 156 158 159 158 155 154 159 154 154 157 157 156 158 158 120 127 126 118 113 118 119 131 117 116 121 118 126 114 125 107 105 106 106 106 107 108 107 106 107 65 67 73 63 65 63 71 72 72 72 66 77 68 72 97 57 12 18 21 8 11 14 9 13 5 12 11 16 7 8 0 45 117 131 128 117 114 127 126 128 121 128 125 129 122 131 130 127 132 72 73 71 75 71 76 74 72 76 68 66 75 46 46 48 49 46 49 46 45 44 43 48 46 49 48 44 45 61 61 61 61 61 61 62 62 62 62 62 61 61 62 61 62 62 61 60 60 118 73 75 75 73 73 74 75 76 75 - 42 42 129 125 127 129 129 129 125 124 129 124 124 127 128 126 129 129 102 109 114 105 94 100 104 117 98 98 107 100 109 97 113 100 98 99 98 99 100 100 99 99 99 46 50 56 46 44 47 52 55 48 54 48 57 44 55 59 58 38 34 24 39 35 33 40 33 42 41 41 38 44 41 45 0 72 86 85 73 70 84 81 83 78 83 80 84 77 87 86 82 88 51 57 49 58 50 59 57 52 57 49 52 54 72 74 77 77 72 78 71 76 70 72 76 74 77 72 74 75 20 21 20 20 20 20 21 22 21 21 21 21 20 20 21 21 21 21 20 19 96 39 39 40 38 38 38 41 41 38 - 48 47 99 94 96 100 97 99 96 94 98 95 94 95 98 96 100 99 103 109 121 113 97 103 111 120 99 100 114 102 110 102 121 120 118 119 117 120 119 118 118 120 119 80 83 84 82 77 83 81 85 73 82 81 81 73 83 44 105 109 104 97 111 108 104 112 105 114 112 113 107 116 113 117 72 0 14 20 14 6 22 9 10 20 10 8 12 7 15 17 14 16 78 86 77 85 78 85 85 79 82 82 88 79 133 136 139 138 134 139 131 139 131 135 137 137 138 132 137 138 62 63 62 62 63 63 61 63 62 63 62 62 62 62 63 63 63 63 63 63 92 68 65 65 66 66 65 66 66 63 - 61 60 96 91 93 98 94 96 93 92 94 92 91 92 95 93 97 96 107 112 126 117 101 107 115 124 103 104 118 106 113 106 125 126 124 125 124 126 125 125 124 126 125 90 93 94 93 88 94 91 94 83 92 91 90 84 93 51 116 123 117 110 124 122 118 126 119 128 125 127 121 130 126 131 86 14 0 15 18 17 19 5 6 20 7 6 3 10 3 8 9 4 88 96 87 94 88 94 94 89 91 92 98 88 144 148 151 150 146 151 143 151 143 147 149 149 150 144 149 150 76 77 76 76 77 77 75 77 75 76 76 76 76 76 77 77 77 77 77 77 96 81 78 78 80 79 78 79 79 77 - 67 66 81 76 78 83 79 81 78 77 80 77 76 77 81 78 82 81 92 97 111 103 87 93 101 109 88 90 103 92 98 92 111 113 111 112 110 113 111 111 111 113 112 81 83 83 84 79 85 81 84 73 82 82 79 75 83 40 107 119 113 108 121 119 114 124 117 124 121 125 117 128 123 128 85 20 15 0 12 18 4 16 19 8 20 18 13 14 12 7 7 12 78 85 77 84 78 83 84 78 80 82 88 78 137 141 144 143 138 144 136 144 136 140 141 141 142 136 142 143 78 79 78 78 78 79 77 79 77 79 78 78 78 78 79 79 79 79 79 78 82 87 83 83 85 84 83 85 85 82 - 57 55 85 81 82 87 84 85 82 81 84 81 80 82 85 82 86 85 90 96 109 100 84 90 98 107 86 87 101 89 97 89 108 108 106 107 106 108 107 107 107 108 107 72 75 75 75 70 76 72 76 65 74 73 71 66 75 33 98 108 102 97 110 108 103 113 106 113 110 113 105 117 111 117 73 14 18 12 0 9 12 16 19 7 20 17 15 10 17 14 11 17 70 78 68 76 70 76 76 70 72 74 80 70 127 131 134 133 128 134 126 134 126 130 132 131 132 126 132 133 67 67 66 67 67 67 66 67 66 67 67 67 67 66 67 67 67 68 67 67 80 76 72 73 74 73 72 74 74 71 - 49 48 94 89 91 95 92 94 91 89 93 90 89 90 93 91 95 94 97 102 115 106 91 97 105 114 93 94 107 96 103 96 115 113 111 112 111 113 112 112 112 113 112 74 77 78 77 72 78 75 79 67 76 75 75 68 77 38 100 105 100 94 107 105 101 109 102 111 108 110 104 113 109 114 70 6 17 18 9 0 19 12 15 15 16 13 15 8 17 17 13 18 72 81 71 79 72 79 79 73 76 76 82 73 128 131 134 133 129 135 126 134 126 130 132 132 133 127 132 133 61 62 61 61 61 61 60 62 60 61 61 61 61 61 62 62 62 62 62 61 86 69 65 65 67 66 65 67 67 64 - 68 67 78 73 75 80 76 78 75 74 76 74 73 74 77 75 79 78 89 93 107 99 84 89 97 105 85 86 100 88 95 89 107 109 107 108 107 109 108 108 107 109 108 79 80 80 81 76 82 78 81 71 79 79 76 72 80 37 104 117 111 107 119 118 113 123 116 123 119 124 115 127 121 127 84 22 19 4 12 19 0 19 22 6 23 21 16 16 16 11 10 16 75 82 74 81 75 80 81 75 77 79 85 75 134 139 141 140 136 141 133 141 134 138 139 139 140 133 140 140 78 79 78 78 78 78 77 79 77 78 78 78 78 78 79 79 79 79 79 78 78 87 84 84 85 85 84 86 86 83 - 56 55 97 93 94 99 96 97 94 93 96 93 92 94 97 94 98 97 106 111 124 116 100 106 114 123 101 103 116 105 112 105 124 124 122 123 121 124 123 122 122 124 123 87 89 90 89 84 90 87 91 79 88 87 86 80 89 48 112 117 112 105 119 116 112 121 114 122 120 121 116 125 121 126 81 9 5 16 16 12 19 0 3 19 4 2 4 5 7 10 9 8 84 92 83 91 84 91 91 85 87 88 94 85 140 144 146 146 141 147 139 146 139 143 145 144 145 139 145 145 71 71 71 71 71 71 70 71 70 71 71 71 71 70 71 71 71 72 72 71 95 76 73 73 74 74 73 74 74 71 - 56 55 100 95 97 102 98 100 97 96 99 96 95 96 100 97 101 100 109 114 127 119 103 109 117 126 105 106 120 108 115 108 127 127 125 126 124 127 126 126 125 127 126 89 92 93 92 87 93 90 94 82 91 90 89 83 92 52 115 119 114 107 121 118 114 122 115 124 122 123 118 126 123 128 83 10 6 19 19 15 22 3 0 23 1 2 6 9 9 12 12 9 87 95 86 94 87 94 94 88 90 91 97 87 142 146 149 148 144 149 141 149 141 145 147 147 148 142 147 148 72 72 71 72 72 72 71 72 71 72 72 72 72 71 72 72 72 73 73 72 98 76 73 73 74 74 73 74 74 71 - 63 62 79 74 76 81 78 79 76 75 78 75 74 75 78 76 80 79 87 91 105 97 81 87 95 104 82 84 97 86 93 86 105 106 104 105 103 106 105 104 104 106 105 73 75 76 76 71 77 73 76 66 74 74 71 67 75 33 99 112 105 101 114 112 107 117 110 117 113 118 109 121 115 121 78 20 20 8 7 15 6 19 23 0 24 21 17 15 18 14 11 18 70 78 69 76 70 76 76 71 72 74 80 70 129 133 136 135 130 136 128 136 128 132 134 133 134 128 134 135 73 73 72 73 73 73 72 73 72 73 73 73 73 72 74 74 73 74 74 73 76 82 79 79 81 80 79 81 81 78 - 56 55 101 97 98 103 100 101 99 97 100 97 96 98 101 98 102 101 110 115 129 120 104 110 118 127 106 107 121 109 116 109 128 128 126 127 126 128 127 127 126 128 127 90 92 94 92 87 93 91 94 83 92 91 90 83 93 53 115 120 114 107 121 118 114 122 115 124 122 123 118 126 123 128 83 10 7 20 20 16 23 4 1 24 0 3 8 10 10 14 13 10 88 96 86 95 88 95 95 89 91 92 98 88 143 147 149 149 144 150 142 149 142 145 148 147 148 142 148 148 72 72 71 71 72 72 70 72 71 72 71 71 72 71 72 72 72 72 72 72 99 75 72 72 74 73 72 73 73 71 - 55 54 99 94 96 100 97 99 96 94 97 95 94 95 98 96 100 99 107 112 125 117 101 107 115 124 102 104 117 106 113 106 125 125 123 124 122 125 123 123 123 125 124 87 89 91 89 84 90 87 91 80 89 88 87 80 90 49 112 117 111 105 119 116 112 120 113 122 119 121 115 124 121 125 80 8 6 18 17 13 21 2 2 21 3 0 6 6 9 12 11 10 85 93 83 91 84 91 91 85 88 88 95 85 140 144 147 146 141 147 139 146 139 143 145 144 145 139 145 145 70 70 70 70 70 70 69 70 69 70 70 70 70 70 71 70 70 71 71 70 96 75 71 71 73 73 72 73 73 70 - 60 59 94 89 91 96 92 94 91 90 92 90 89 90 93 91 95 94 104 109 123 114 98 104 112 121 100 101 115 103 110 103 122 123 121 122 121 123 122 122 121 123 122 87 90 91 90 85 91 88 91 80 89 88 87 81 90 48 113 120 114 108 122 119 115 124 117 125 122 125 118 128 124 129 84 12 3 13 15 15 16 4 6 17 8 6 0 7 3 6 6 4 85 93 84 91 85 91 91 85 88 89 95 85 142 146 148 147 143 149 141 148 141 144 146 146 147 141 147 147 75 75 74 74 75 75 74 75 74 75 74 74 75 74 75 75 75 75 75 75 93 80 77 77 78 78 77 78 78 76 - 55 54 94 89 91 95 92 94 91 89 92 90 89 90 93 91 95 94 101 106 119 110 95 100 109 118 96 98 111 100 107 100 119 118 116 117 116 118 117 117 117 118 117 81 84 85 84 79 84 82 85 74 83 82 81 75 84 43 107 113 107 101 115 112 108 117 110 118 115 118 111 121 117 122 77 7 10 14 10 8 16 5 9 15 10 6 7 0 10 10 7 11 79 87 77 86 79 85 86 80 82 83 89 79 135 139 141 141 136 142 134 141 134 138 140 139 140 134 140 140 68 69 68 68 68 68 67 68 67 68 68 68 68 68 69 69 68 69 69 68 90 74 71 71 73 72 71 73 73 70 - 63 62 92 88 90 94 91 92 90 88 91 89 87 89 92 89 94 92 104 109 123 115 99 104 113 121 100 101 115 103 110 104 122 124 122 123 121 124 122 122 122 124 123 89 91 92 92 86 92 89 93 82 90 90 88 82 91 49 115 123 117 111 124 122 118 127 119 128 125 127 121 131 126 131 87 15 3 12 17 17 16 7 9 18 10 9 3 10 0 4 6 1 86 94 85 93 86 93 93 87 89 90 97 86 144 148 150 149 145 151 143 150 143 146 148 148 149 143 149 149 77 78 77 77 78 78 76 78 77 78 77 77 78 77 78 78 78 78 78 78 93 83 80 80 81 81 80 81 81 78 - 65 64 88 83 85 90 86 88 85 84 87 84 83 84 88 85 89 88 100 104 119 110 94 100 108 117 96 97 111 99 106 99 118 120 118 119 117 120 118 118 118 120 119 86 88 89 89 84 90 86 90 79 87 87 85 80 88 46 112 121 116 110 123 121 117 126 119 127 124 127 119 130 125 130 86 17 8 7 14 17 11 10 12 14 14 12 6 10 4 0 4 4 84 91 82 90 83 89 90 84 86 87 94 83 141 145 148 147 143 148 140 148 140 144 146 146 147 140 147 147 78 79 78 78 78 78 77 78 77 78 78 78 78 78 79 79 78 79 79 78 89 85 81 81 83 82 81 83 83 80 - 62 61 88 83 85 90 87 88 85 84 87 84 83 84 88 85 89 88 98 103 117 108 92 98 106 115 94 95 109 97 104 97 116 117 115 116 115 117 116 116 115 117 116 83 85 86 85 80 86 83 86 75 84 84 82 76 85 43 109 118 112 106 119 117 113 122 115 123 120 123 116 126 121 127 82 14 9 7 11 13 10 9 12 11 13 11 6 7 6 4 0 7 80 88 79 86 80 86 86 81 83 84 90 80 138 142 144 144 139 145 137 144 137 141 142 142 143 137 143 143 74 75 74 74 74 75 73 75 73 75 74 74 74 74 75 75 75 75 75 74 87 81 78 78 80 79 78 80 80 77 - 64 63 92 88 89 94 90 92 89 88 91 88 87 88 92 89 93 92 104 109 123 115 99 104 113 121 100 102 115 103 110 104 123 124 122 123 121 124 123 122 122 124 123 90 92 93 92 87 93 90 93 82 91 91 89 83 92 50 116 124 118 112 125 123 119 128 120 129 126 128 122 132 127 132 88 16 4 12 17 18 16 8 9 18 10 10 4 11 1 4 7 0 87 95 86 93 87 93 93 88 90 91 97 87 144 148 151 150 146 151 143 151 143 147 149 149 150 143 149 150 79 79 78 78 79 79 78 79 78 79 78 78 79 78 79 79 79 79 79 79 93 84 81 81 82 82 81 82 82 80 - 79 79 86 83 84 86 87 86 83 82 87 82 83 85 85 84 86 86 51 58 62 53 43 50 53 66 48 47 56 50 58 46 62 50 48 49 48 50 50 50 49 50 50 7 6 6 9 7 9 3 6 6 4 6 5 8 5 38 30 60 54 61 64 68 60 73 67 67 60 75 56 76 64 72 51 78 88 78 70 72 75 84 87 70 88 85 85 79 86 84 80 87 0 8 3 8 1 8 8 1 6 5 10 3 62 66 69 67 63 68 61 69 61 66 66 66 66 60 68 68 65 67 66 66 66 66 66 68 66 67 67 66 66 66 67 68 67 67 66 65 47 86 85 85 85 84 84 87 87 84 - 87 87 87 84 85 87 88 87 84 83 88 83 83 86 86 85 86 86 48 55 57 48 40 46 48 61 44 44 51 46 54 42 56 43 41 42 41 42 43 43 42 43 42 11 8 2 11 13 11 6 2 14 4 10 7 16 3 45 24 61 55 64 65 71 61 75 70 68 61 77 57 77 65 73 57 86 96 85 78 81 82 92 95 78 96 93 93 87 94 91 88 95 8 0 11 2 9 3 2 8 6 8 7 8 57 62 64 62 58 64 56 65 57 62 61 62 62 55 64 64 73 74 73 73 73 73 73 75 73 74 74 73 73 73 74 75 74 74 73 72 45 93 92 93 92 91 91 94 94 91 - 77 76 88 84 86 88 88 87 84 83 89 83 84 87 87 86 87 87 54 61 65 56 46 52 55 68 50 49 58 52 61 48 64 53 51 52 51 52 52 52 52 52 52 6 6 9 8 5 9 4 9 4 6 6 8 5 7 37 30 59 52 59 62 67 58 72 65 65 59 73 55 74 63 71 49 77 87 77 68 71 74 83 86 69 86 83 84 77 85 82 79 86 3 11 0 10 1 11 10 3 8 5 11 5 62 66 69 68 63 69 61 69 61 66 66 67 67 60 68 68 63 64 63 63 63 64 64 65 63 65 64 64 63 63 65 65 65 65 63 63 49 83 82 83 82 81 81 84 84 81 - 87 87 84 82 83 84 85 84 81 80 86 80 81 84 83 83 84 84 46 53 55 47 38 44 47 59 43 42 49 44 53 40 55 42 40 41 40 42 42 42 41 42 42 12 9 2 13 14 12 6 3 13 5 11 5 16 3 43 27 63 57 65 67 72 63 77 72 70 63 79 59 79 67 75 58 85 94 84 76 79 81 91 94 76 95 91 91 86 93 90 86 93 8 2 10 0 9 1 1 7 4 9 9 7 59 64 66 65 61 66 58 67 59 64 64 64 64 58 66 66 73 74 73 74 73 74 74 75 73 75 74 74 74 74 75 75 75 75 74 73 43 94 92 93 92 92 92 95 95 91 - 78 77 87 84 85 87 88 87 84 83 88 83 84 86 86 85 87 87 53 60 64 55 45 51 54 67 49 48 57 51 59 47 63 51 49 50 49 51 51 51 50 51 51 6 6 7 8 6 8 3 7 5 5 5 7 7 6 38 30 59 53 59 63 67 59 72 66 66 59 74 55 75 63 71 50 78 88 78 70 72 75 84 87 70 88 84 85 79 86 83 80 87 1 9 1 9 0 10 9 2 7 5 10 4 61 66 68 67 63 68 60 69 61 65 66 66 66 60 67 68 64 65 64 65 64 65 65 66 65 66 66 65 65 65 66 66 66 66 65 64 48 85 84 84 83 83 83 86 86 82 - 88 87 84 81 82 83 84 83 80 80 85 80 80 83 83 82 83 83 45 52 55 46 37 43 46 59 42 41 49 43 52 39 54 42 40 41 40 41 41 41 41 41 41 13 10 3 13 15 13 7 4 14 5 12 5 16 4 43 27 64 58 66 68 73 64 78 72 71 64 80 60 80 68 76 59 85 94 83 76 79 80 91 94 76 95 91 91 85 93 89 86 93 8 3 11 1 10 0 2 8 4 10 10 7 60 65 67 65 61 66 59 68 60 65 64 65 64 58 67 67 74 75 74 74 74 74 75 76 74 75 75 75 74 74 75 76 76 75 74 74 42 94 93 94 93 92 92 95 95 92 - 87 86 85 82 84 85 86 85 82 81 86 81 82 85 84 84 85 85 47 54 56 48 39 45 47 60 43 43 50 45 53 41 56 43 41 42 41 42 43 43 42 43 42 11 8 1 12 13 11 6 2 13 4 10 5 15 3 44 26 63 56 65 66 72 63 76 71 69 62 78 58 79 66 74 57 85 94 84 76 79 81 91 94 76 95 91 91 86 93 90 86 93 8 2 10 1 9 2 0 7 4 8 8 7 59 63 66 64 60 65 58 66 59 63 63 64 63 57 65 65 72 74 73 73 73 73 73 75 73 74 74 73 73 73 74 75 74 74 73 72 43 93 92 92 92 91 91 94 94 91 - 80 79 86 83 84 86 87 86 83 82 87 82 82 85 85 84 85 85 51 58 62 53 43 49 52 65 47 46 55 49 58 45 61 49 47 48 47 49 49 49 48 49 49 7 6 6 9 8 9 2 6 6 3 6 5 9 4 38 29 61 54 61 64 69 60 74 68 67 61 76 56 76 65 72 52 79 89 78 70 73 75 85 88 71 89 85 85 80 87 84 81 88 1 8 3 7 2 8 7 0 5 5 10 2 61 66 68 67 63 68 60 69 61 66 66 66 66 60 68 68 66 67 66 67 66 67 67 68 67 68 67 67 67 67 68 68 68 68 67 66 46 87 85 86 85 85 85 88 88 84 - 85 84 82 80 81 82 83 82 79 78 84 78 79 82 81 81 82 82 46 53 56 48 38 44 47 60 42 42 50 44 53 40 56 45 42 43 42 44 44 44 44 44 44 12 9 4 13 13 13 6 5 11 4 11 1 14 4 40 30 65 58 66 68 73 64 78 72 71 64 80 60 80 69 76 57 82 91 80 72 76 77 87 90 72 91 88 88 82 89 86 83 90 6 6 8 4 7 4 4 5 0 9 11 3 62 67 69 68 64 69 61 70 62 67 67 67 67 61 69 69 71 72 72 72 71 72 72 73 72 73 73 72 72 72 73 73 73 73 72 71 42 92 90 91 90 90 90 93 93 89 - 80 79 91 88 89 91 92 91 88 87 92 87 87 90 90 89 90 90 55 62 64 56 47 53 55 68 51 50 58 53 61 49 64 51 49 50 49 50 50 51 50 50 50 3 1 7 4 6 4 3 6 9 5 2 9 9 5 42 25 56 49 57 59 64 55 69 63 62 56 71 52 72 60 68 49 82 92 82 74 76 79 88 91 74 92 88 89 83 90 87 84 91 5 8 5 9 5 10 8 5 9 0 6 7 57 61 64 62 58 64 56 64 56 61 61 62 62 55 63 63 65 66 65 65 65 65 66 67 65 66 66 65 65 65 66 67 66 66 65 64 50 85 84 85 84 83 83 86 87 83 - 85 84 94 91 92 94 94 93 90 90 95 90 90 93 93 92 93 93 55 62 63 54 47 53 54 67 51 50 57 53 61 49 62 48 46 46 46 47 47 48 47 47 47 8 5 8 7 11 6 8 6 15 7 7 12 15 7 48 19 54 48 57 58 64 55 68 63 61 54 70 50 70 58 66 52 88 98 88 80 82 85 94 97 80 98 95 95 89 97 94 90 97 10 7 11 9 10 10 8 10 11 6 0 12 51 56 58 57 53 58 50 59 51 56 56 56 56 50 58 58 69 70 69 69 69 69 70 71 69 70 70 69 69 69 70 71 70 70 69 68 52 89 88 89 88 87 87 90 91 87 - 81 81 83 80 82 84 84 83 80 79 84 79 80 83 82 82 83 83 48 56 60 51 40 47 50 63 45 44 53 47 55 43 59 48 46 47 46 48 47 48 47 48 47 9 8 6 11 10 12 4 6 7 4 9 3 11 5 37 31 63 56 64 67 71 63 76 70 70 63 78 59 79 67 75 54 79 88 78 70 73 75 85 87 70 88 85 85 79 86 83 80 87 3 8 5 7 4 7 7 2 3 7 12 0 63 68 70 69 65 70 62 71 63 68 68 68 68 62 70 70 68 69 68 69 68 69 69 70 68 70 69 69 69 68 70 70 70 70 69 68 44 88 87 88 87 86 86 89 89 86 - 113 113 141 139 140 140 142 141 138 137 142 137 138 141 140 140 140 140 95 101 94 89 89 93 90 101 93 92 92 93 99 89 94 73 72 73 74 72 74 75 74 73 74 57 56 59 54 59 53 59 57 65 59 56 63 63 59 98 33 41 41 56 43 53 47 55 55 43 37 56 38 53 41 46 72 133 144 137 127 128 134 140 142 129 143 140 142 135 144 141 138 144 62 57 62 59 61 60 59 61 62 57 51 63 0 5 7 6 1 7 1 8 2 6 5 5 5 2 7 7 91 92 92 92 91 92 93 93 92 93 92 92 92 92 92 93 93 92 91 91 97 109 110 110 108 108 108 111 111 109 - 116 116 145 143 144 145 147 145 142 142 147 142 143 145 144 144 145 145 99 105 98 93 94 97 95 105 98 96 96 98 104 93 98 77 76 77 78 76 78 79 78 77 78 61 60 63 58 63 58 64 62 69 63 61 68 67 63 102 37 42 42 58 44 54 48 55 55 43 38 56 39 53 42 46 74 136 148 141 131 131 139 144 146 133 147 144 146 139 148 145 142 148 66 62 66 64 66 65 63 66 67 61 56 68 5 0 3 3 3 4 6 3 5 3 2 1 3 6 3 2 94 94 94 94 94 94 95 96 95 95 95 95 94 95 95 95 95 95 94 93 101 111 112 112 111 110 111 113 113 111 - 119 118 147 145 146 147 149 147 144 144 149 144 145 147 146 146 146 147 101 106 99 95 96 99 96 106 100 98 98 100 105 95 99 79 78 78 79 78 80 80 80 78 79 64 63 65 61 66 60 66 64 72 66 63 70 69 65 105 40 44 44 60 46 56 50 56 57 45 40 58 42 55 44 48 77 139 151 144 134 134 141 146 149 136 149 147 148 141 150 148 144 151 69 64 69 66 68 67 66 68 69 64 58 70 7 3 0 2 6 2 8 3 8 5 3 2 3 9 3 2 96 97 97 97 96 97 98 98 97 98 97 97 97 97 97 98 98 97 96 96 103 113 114 115 113 112 113 115 116 114 - 119 119 146 143 144 145 147 145 143 142 147 142 143 146 144 144 145 145 99 104 97 93 94 97 94 104 98 96 96 98 103 93 97 76 76 76 77 76 78 78 77 76 77 62 61 64 60 65 59 65 63 71 64 62 69 68 64 104 38 45 45 61 47 57 51 58 58 46 41 59 42 56 45 49 77 138 150 143 133 133 140 146 148 135 149 146 147 141 149 147 144 150 67 62 68 65 67 65 64 67 68 62 57 69 6 3 2 0 5 1 7 5 7 6 1 3 1 7 5 4 97 97 97 97 96 97 98 98 97 98 98 97 97 97 98 98 98 97 96 96 101 114 115 115 113 113 113 116 116 114 - 114 114 142 140 141 142 143 142 139 139 144 139 140 142 141 141 141 142 96 102 95 90 91 94 92 102 95 93 93 95 100 90 95 74 74 74 75 74 75 76 75 74 75 58 57 60 55 60 55 61 59 66 60 58 65 64 60 99 34 41 41 57 44 53 47 55 55 43 38 56 38 53 41 46 72 134 146 138 128 129 136 141 144 130 144 141 143 136 145 143 139 146 63 58 63 61 63 61 60 63 64 58 53 65 1 3 6 5 0 6 2 7 3 5 4 4 4 3 6 5 92 93 92 93 92 92 93 94 93 93 93 93 92 93 93 94 93 93 92 92 98 110 110 111 109 109 109 112 112 110 - 120 120 147 145 145 146 148 146 144 143 148 143 144 147 146 146 146 146 100 105 98 94 95 98 95 105 99 97 97 99 104 94 98 77 77 77 78 76 78 79 78 77 78 64 63 65 61 66 60 66 64 72 66 63 70 70 65 105 39 45 46 61 48 57 51 58 59 47 42 60 43 57 45 49 78 139 151 144 134 135 141 147 149 136 150 147 149 142 151 148 145 151 68 64 69 66 68 66 65 68 69 64 58 70 7 4 2 1 6 0 8 4 8 6 2 4 2 8 5 4 97 98 98 98 97 98 99 99 98 99 99 98 98 98 98 99 99 98 97 97 102 115 115 116 114 114 114 117 117 115 - 113 112 140 138 139 140 141 140 137 136 142 137 137 140 139 139 139 139 94 100 93 88 89 92 90 100 93 91 91 93 99 88 93 73 72 72 73 72 74 74 74 72 73 56 55 58 53 58 52 58 56 64 58 55 62 62 58 97 32 40 40 56 43 53 46 54 54 42 37 56 37 53 41 46 71 131 143 136 126 126 133 139 141 128 142 139 141 134 143 140 137 143 61 56 61 58 60 59 58 60 61 56 50 62 1 6 8 7 2 8 0 9 2 6 6 6 6 2 8 8 90 91 91 91 90 91 92 92 91 92 92 91 91 91 91 92 92 91 90 90 96 108 109 109 108 107 108 110 110 108 - 118 117 149 147 148 148 150 149 146 145 150 145 146 149 148 148 148 148 103 108 101 97 97 101 98 108 101 100 100 101 107 96 101 81 80 80 81 80 82 82 82 80 81 64 63 66 61 66 61 67 65 72 66 64 71 70 66 105 40 42 43 58 44 54 48 54 55 43 38 56 40 53 42 45 76 139 151 144 134 134 141 146 149 136 149 146 148 141 150 148 144 151 69 65 69 67 69 68 66 69 70 64 59 71 8 3 3 5 7 4 9 0 8 4 5 3 6 10 1 1 95 96 95 96 95 95 96 97 96 96 96 96 95 96 96 96 96 96 95 95 104 112 113 113 111 111 112 114 114 112 - 112 112 141 139 140 141 142 141 138 138 143 138 139 141 140 140 140 141 96 101 95 90 90 94 91 102 94 92 93 94 100 89 95 74 74 74 75 74 75 76 75 74 75 56 55 58 53 58 53 59 57 64 59 56 63 62 58 97 33 39 39 54 41 51 44 52 52 41 35 54 36 51 39 44 70 131 143 136 126 126 134 139 141 128 142 139 141 134 143 140 137 143 61 57 61 59 61 60 59 61 62 56 51 63 2 5 8 7 3 8 2 8 0 5 6 5 7 4 7 7 89 90 90 90 89 90 91 91 90 91 91 90 90 90 90 91 91 90 89 89 97 107 108 108 106 106 107 109 109 107 - 114 114 146 144 145 146 147 146 143 143 148 143 143 146 145 145 145 146 101 106 100 95 95 98 96 107 99 97 98 99 105 94 99 79 78 79 79 78 80 81 80 78 79 61 60 63 58 63 57 63 62 69 63 60 68 66 63 102 37 39 40 55 41 51 45 52 52 40 35 53 37 50 39 43 72 135 147 140 130 130 138 143 145 132 145 143 144 138 146 144 141 147 66 62 66 64 65 65 63 66 67 61 56 68 6 3 5 6 5 6 6 4 5 0 5 3 6 8 2 3 91 92 92 92 91 92 93 93 92 93 93 92 92 92 92 93 93 92 91 91 102 108 109 110 108 108 108 111 111 109 - 118 117 144 142 143 144 146 144 142 141 146 141 142 144 143 143 144 144 98 104 97 92 93 96 93 103 97 95 95 97 102 92 96 76 75 75 76 75 77 77 77 75 76 61 60 63 58 63 58 64 62 69 63 61 68 67 63 103 37 44 44 60 46 56 50 57 58 45 40 59 41 56 44 48 76 137 149 141 132 132 139 145 147 134 148 145 146 140 148 146 142 149 66 61 66 64 66 64 63 66 67 61 56 68 5 2 3 1 4 2 6 5 6 5 0 3 1 6 5 4 95 96 96 96 95 96 97 97 96 97 97 96 96 96 96 97 97 96 95 95 100 113 113 114 112 112 112 115 115 113 - 116 116 146 144 145 145 147 146 143 142 147 142 143 146 145 145 145 145 100 105 99 94 94 98 95 105 98 97 97 98 104 94 98 78 77 77 78 77 79 79 79 77 78 61 61 63 59 63 58 64 62 70 64 61 68 67 64 103 38 42 42 58 44 54 48 55 55 43 38 56 39 53 42 46 74 137 149 141 131 132 139 144 147 133 147 144 146 139 148 146 142 149 66 62 67 64 66 65 64 66 67 62 56 68 5 1 2 3 4 4 6 3 5 3 3 0 4 7 2 2 94 94 94 94 94 94 95 96 95 95 95 95 94 95 95 95 95 95 94 93 102 111 112 112 110 110 111 113 113 111 - 119 118 145 143 143 144 146 144 142 141 146 141 142 145 144 143 144 144 98 103 96 92 93 96 93 103 97 95 95 97 102 92 96 75 75 75 76 75 77 77 76 75 76 62 61 63 59 64 58 64 62 70 64 61 68 68 63 103 37 45 45 61 47 57 51 58 59 47 41 60 42 57 45 49 77 138 150 142 132 133 140 145 148 134 148 145 147 140 149 147 143 150 66 62 67 64 66 64 63 66 67 62 56 68 5 3 3 1 4 2 6 6 7 6 1 4 0 6 6 5 96 97 97 97 96 97 98 98 97 98 98 97 97 97 97 98 98 97 96 96 100 114 114 115 113 113 113 116 116 114 - 113 113 139 137 138 138 140 139 136 135 140 135 136 139 138 138 138 138 93 98 92 87 87 91 88 99 91 90 90 91 97 87 91 71 70 71 71 70 72 73 72 70 72 55 54 57 53 57 52 58 56 63 57 55 62 61 57 97 31 42 41 57 44 54 47 56 56 44 38 58 39 55 42 48 72 132 144 136 126 127 133 139 142 128 142 139 141 134 143 140 137 143 60 55 60 58 60 58 57 60 61 55 50 62 2 6 9 7 3 8 2 10 4 8 6 7 6 0 9 9 91 92 92 92 91 92 93 93 92 93 93 92 92 92 92 93 93 92 91 91 95 109 110 110 109 108 109 111 112 109 - 116 116 148 146 147 147 149 148 145 144 149 144 145 148 147 147 147 147 102 107 101 96 96 100 97 108 100 99 99 100 106 96 100 80 79 80 80 79 81 82 81 79 80 63 62 65 60 65 59 65 64 71 65 62 70 68 65 104 39 41 42 57 43 53 47 53 54 42 37 55 39 52 41 44 74 137 149 142 132 132 140 145 147 134 148 145 147 140 149 147 143 149 68 64 68 66 67 67 65 68 69 63 58 70 7 3 3 5 6 5 8 1 7 2 5 2 6 9 0 1 94 94 94 94 93 94 95 95 95 95 95 94 94 94 95 95 95 94 93 93 103 110 111 112 110 110 110 113 113 111 - 117 117 148 145 146 147 149 147 145 144 149 144 145 148 147 146 147 147 102 107 100 96 96 100 97 107 100 99 99 100 106 95 100 80 79 79 80 79 81 81 81 79 80 63 62 65 60 65 60 66 64 71 65 63 70 69 65 104 39 42 42 58 44 53 48 54 55 43 38 56 39 52 41 45 75 138 150 143 133 133 140 145 148 135 148 145 147 140 149 147 143 150 68 64 68 66 68 67 65 68 69 63 58 70 7 2 2 4 5 4 8 1 7 3 4 2 5 9 1 0 94 95 95 95 94 95 96 96 95 96 95 95 95 95 95 96 96 95 94 94 103 111 112 112 111 110 111 113 114 112 - 23 23 134 130 132 135 134 134 131 130 134 130 130 132 134 132 135 134 114 121 127 118 106 112 117 130 109 110 120 112 121 109 127 115 113 114 114 115 115 115 115 115 115 62 65 71 62 59 63 67 70 61 69 63 71 57 70 62 77 56 53 40 56 50 50 54 47 59 59 54 56 58 58 61 20 62 76 78 67 61 78 71 72 73 72 70 75 68 77 78 74 79 65 73 63 73 64 74 72 66 71 65 69 68 91 94 96 97 92 97 90 95 89 91 95 94 96 91 94 94 0 1 0 1 0 1 2 2 1 2 1 1 1 1 2 2 2 2 1 0 106 21 20 20 19 19 19 22 22 19 - 23 23 135 131 133 136 135 135 132 131 135 131 131 133 135 133 136 135 115 122 128 119 107 114 119 131 111 111 122 113 122 110 128 117 114 115 115 116 116 116 116 116 116 63 66 72 63 60 64 68 72 62 70 64 72 59 71 63 78 56 53 40 56 50 50 54 48 59 60 54 57 58 59 61 21 63 77 79 67 62 79 71 72 73 72 70 75 69 78 79 75 79 67 74 64 74 65 75 74 67 72 66 70 69 92 94 97 97 93 98 91 96 90 92 96 94 97 92 94 95 1 0 1 1 1 0 2 1 2 1 1 1 1 1 0 1 1 1 1 1 107 20 19 19 18 18 18 21 21 18 - 23 23 134 130 132 135 134 134 131 130 134 130 130 132 134 132 135 134 114 121 127 118 106 113 118 130 110 110 121 112 121 109 127 116 114 115 114 115 115 115 115 115 115 62 65 71 62 59 63 67 71 61 69 63 71 58 70 62 77 56 53 40 56 50 50 54 48 59 60 54 57 58 59 61 20 62 76 78 66 61 78 71 71 72 71 70 74 68 77 78 74 78 66 73 63 73 64 74 73 66 72 65 69 68 92 94 97 97 92 98 91 95 90 92 96 94 97 92 94 95 0 1 0 0 1 1 1 2 1 1 1 1 0 0 2 2 2 2 1 1 106 20 20 20 19 19 19 22 22 19 - 23 23 135 130 132 136 134 135 131 130 135 130 130 132 134 132 135 134 114 121 128 119 106 113 118 130 110 110 121 113 122 110 127 116 114 115 114 116 116 116 115 116 115 62 66 72 63 60 64 67 71 61 69 64 71 58 70 63 77 57 53 41 57 50 50 54 48 59 60 54 57 58 59 61 20 62 76 78 67 61 78 71 72 73 71 70 74 68 77 78 74 78 66 73 63 74 65 74 73 67 72 65 69 69 92 94 97 97 93 98 91 96 90 92 96 94 97 92 94 95 1 1 0 0 1 1 1 2 1 1 1 0 0 0 1 2 1 1 1 1 107 20 19 20 19 18 18 21 21 18 - 23 23 134 130 132 135 134 134 131 130 134 130 130 132 134 132 135 134 114 121 127 118 106 113 117 130 110 110 120 112 121 109 127 115 113 114 114 115 115 115 115 115 115 62 65 71 62 59 63 67 70 61 69 63 71 58 70 62 77 56 53 40 56 50 50 53 47 59 59 54 56 57 58 61 20 63 77 78 67 61 78 71 72 73 72 70 75 68 78 78 74 79 66 73 63 73 64 74 73 66 71 65 69 68 91 94 96 96 92 97 90 95 89 91 95 94 96 91 93 94 0 1 1 1 0 1 2 2 1 2 1 1 1 1 2 2 2 2 1 0 106 21 20 20 19 19 19 22 22 19 - 23 23 135 131 133 136 135 135 132 130 135 130 130 133 134 132 135 135 115 122 128 119 106 113 118 131 110 110 121 113 122 110 127 116 114 115 114 116 116 116 115 116 116 62 66 72 63 60 64 67 71 61 69 64 71 58 70 63 77 56 53 40 56 50 50 54 47 59 59 54 56 58 59 61 20 63 77 79 67 61 78 71 72 73 72 70 75 68 78 78 75 79 66 73 64 74 65 74 73 67 72 65 69 69 92 94 97 97 92 98 91 95 90 92 96 94 97 92 94 95 1 0 1 1 1 0 2 2 1 1 1 1 0 1 1 1 1 1 1 1 107 20 19 20 19 18 18 21 21 18 - 22 22 134 130 132 135 134 134 131 130 134 130 130 132 134 132 135 134 114 121 128 119 106 113 118 131 110 110 121 113 122 110 127 116 114 115 114 116 116 116 115 116 116 63 66 72 63 60 64 68 71 62 69 64 72 58 71 62 78 57 54 42 57 51 51 55 49 60 61 55 58 59 60 62 21 61 75 77 66 60 77 70 71 72 70 69 74 67 76 77 73 78 66 73 64 74 65 75 73 67 72 66 70 69 93 95 98 98 93 99 92 96 91 93 97 95 98 93 95 96 2 2 1 1 2 2 0 2 1 1 1 1 1 1 2 2 2 2 2 2 107 20 19 19 18 18 18 21 21 18 - 22 22 136 132 133 137 136 136 133 131 136 131 131 134 135 133 136 136 116 123 129 120 108 115 120 132 112 112 122 114 123 111 129 118 116 116 116 117 117 117 117 117 117 64 67 73 64 61 65 69 73 63 71 65 73 60 72 64 79 57 54 41 57 51 51 54 48 60 61 55 58 59 60 62 22 63 77 79 67 62 79 71 72 73 72 70 75 68 78 78 75 79 68 75 65 75 66 76 75 68 73 67 71 70 93 96 98 98 94 99 92 97 91 93 97 96 98 93 95 96 2 1 2 2 2 2 2 0 2 1 1 1 2 2 1 0 0 1 2 2 108 19 18 18 17 17 17 20 20 17 - 22 22 134 130 132 135 134 134 131 129 134 129 129 132 133 131 134 134 114 121 127 118 106 113 118 130 110 110 121 112 121 109 127 116 114 115 114 115 115 116 115 115 115 62 65 71 63 60 63 67 71 61 69 63 71 58 70 62 77 57 54 41 57 51 51 55 49 60 60 55 57 59 59 62 21 62 75 77 66 60 77 70 71 72 71 69 74 67 77 77 73 78 66 73 63 73 65 74 73 67 72 65 69 68 92 95 97 97 93 98 91 96 90 92 96 95 97 92 95 95 1 2 1 1 1 1 1 2 0 2 1 1 1 0 2 2 2 2 2 1 106 20 19 20 19 18 18 21 22 18 - 22 22 136 131 133 137 135 135 132 131 135 131 131 133 135 133 136 135 115 122 129 120 107 114 119 131 111 111 122 114 123 111 128 117 115 116 115 117 117 117 116 117 116 63 67 73 64 61 64 68 72 62 70 65 72 59 71 64 78 57 54 41 57 51 51 54 48 60 60 54 57 58 59 62 21 63 76 79 67 61 78 71 72 73 72 70 75 68 78 78 75 79 67 74 65 75 66 75 74 68 73 66 70 70 93 95 98 98 93 99 92 96 91 93 97 95 98 93 95 96 2 1 1 1 2 1 1 1 2 0 0 1 1 1 1 1 0 1 2 2 108 19 18 19 18 17 17 20 20 17 - 22 22 135 131 133 136 135 135 132 130 135 131 130 133 134 133 136 135 115 122 128 119 107 114 119 131 111 111 122 113 122 110 128 117 115 116 115 116 116 116 116 116 116 63 66 72 63 60 64 68 72 62 70 64 72 59 71 63 78 57 54 41 57 51 51 54 48 60 60 54 57 58 59 62 21 62 76 78 67 61 78 71 72 73 71 70 74 68 77 78 74 78 67 74 64 74 66 75 74 67 73 66 70 69 92 95 97 98 93 99 92 96 91 93 97 95 98 93 95 95 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 2 107 19 19 19 18 18 18 21 21 18 - 22 23 135 131 132 136 134 135 131 130 135 130 130 132 134 132 135 135 115 122 128 119 106 113 118 131 110 110 121 113 122 110 127 116 114 115 114 116 116 116 115 116 116 62 66 72 63 60 64 67 71 62 69 64 72 58 70 63 78 57 53 41 57 51 50 54 48 60 60 54 57 58 59 61 21 62 76 78 67 61 78 71 72 73 71 70 74 68 77 78 74 78 66 73 64 74 65 75 73 67 72 65 69 69 92 95 97 97 93 98 91 96 90 92 96 95 97 92 94 95 1 1 1 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 107 20 19 20 19 18 18 21 21 18 - 23 23 135 131 132 136 134 135 131 130 135 130 130 132 134 132 135 134 114 121 128 119 106 113 118 130 110 110 121 113 122 110 127 116 114 115 114 116 116 116 115 116 115 62 66 72 63 60 63 67 71 61 69 63 71 58 70 63 77 56 53 40 56 50 50 54 48 59 60 54 57 58 59 61 20 62 76 78 67 61 78 71 72 73 72 70 75 68 78 78 74 79 66 73 63 74 65 74 73 67 72 65 69 69 92 94 97 97 92 98 91 95 90 92 96 94 97 92 94 95 1 1 0 0 1 0 1 2 1 1 1 0 0 1 1 2 1 1 1 1 107 20 19 20 19 18 18 21 21 18 - 22 23 134 130 132 135 134 134 131 130 134 130 130 132 134 132 135 134 114 121 128 118 106 113 118 130 110 110 121 113 121 110 127 116 114 115 114 115 116 116 115 116 115 62 66 72 63 60 63 67 71 61 69 63 71 58 70 62 77 57 53 41 57 51 51 54 48 60 60 54 57 58 59 62 20 62 76 78 66 61 78 70 71 72 71 70 74 68 77 78 74 78 66 73 63 74 65 74 73 67 72 65 69 68 92 95 97 97 93 98 91 96 90 92 96 95 97 92 94 95 1 1 0 0 1 1 1 2 0 1 1 0 1 0 1 2 1 2 1 1 107 20 19 20 19 18 18 21 21 18 - 23 23 136 132 133 137 135 136 132 131 136 131 131 133 135 133 136 136 116 123 129 120 107 114 119 132 111 111 122 114 123 111 128 117 115 116 115 117 117 117 116 117 116 63 67 73 64 61 64 68 72 62 70 64 72 59 71 64 78 57 53 41 57 50 50 54 48 59 60 54 57 58 59 61 21 63 77 79 67 62 79 71 72 74 72 71 75 69 78 79 75 79 67 74 65 75 66 75 74 68 73 66 70 70 92 95 97 98 93 98 91 96 90 92 96 95 97 92 95 95 2 0 2 1 2 1 2 1 2 1 1 1 1 1 0 1 0 0 1 2 108 19 18 19 18 17 17 20 21 18 - 22 22 136 132 134 137 136 136 133 131 136 131 131 134 135 133 136 136 116 123 129 120 108 115 119 132 112 112 122 114 123 111 129 118 115 116 116 117 117 117 117 117 117 64 67 73 64 61 65 69 73 63 71 65 73 60 72 64 79 57 54 41 57 51 51 54 48 60 60 54 58 58 60 62 21 63 77 79 67 62 79 71 72 74 72 70 75 69 78 79 75 79 68 75 65 75 66 76 75 68 73 67 71 70 93 95 98 98 94 99 92 96 91 93 97 95 98 93 95 96 2 1 2 2 2 1 2 0 2 1 1 1 2 2 1 0 0 1 2 2 108 19 18 18 17 17 17 20 20 17 - 22 22 136 132 133 137 135 136 132 131 136 131 131 133 135 133 136 136 116 123 129 120 107 114 119 132 111 111 122 114 123 111 128 117 115 116 115 117 117 117 116 117 117 63 67 73 64 61 65 68 72 63 70 65 73 59 71 64 79 57 54 41 57 51 51 54 48 60 60 54 57 58 59 62 21 63 77 79 67 62 79 71 72 73 72 70 75 68 78 78 75 79 67 74 65 75 66 76 74 68 73 66 70 70 93 95 98 98 93 99 92 96 91 93 97 95 98 93 95 96 2 1 2 1 2 1 2 0 2 0 1 1 1 1 0 0 0 1 2 2 108 19 18 19 18 17 17 20 20 17 - 23 23 136 132 133 137 136 136 133 131 136 131 131 134 135 133 136 136 116 123 129 120 107 114 119 132 111 111 122 114 123 111 128 117 115 116 115 117 117 117 116 117 116 63 67 73 64 61 64 68 72 62 70 65 72 59 71 64 78 56 53 40 56 50 50 54 48 59 60 54 57 58 59 61 21 63 77 79 68 62 79 72 73 74 72 71 75 69 78 79 75 79 67 74 65 75 66 75 74 68 73 66 70 70 92 95 97 97 93 98 91 96 90 92 96 95 97 92 94 95 2 1 2 1 2 1 2 1 2 1 1 1 1 2 0 1 1 0 1 2 108 19 18 19 18 17 17 20 21 18 - 24 24 135 131 133 136 135 135 132 130 135 131 130 133 134 133 136 135 115 122 128 119 106 113 118 131 110 110 121 113 122 110 127 116 114 115 114 115 116 116 115 116 115 62 66 72 63 60 63 67 71 61 69 63 71 58 70 63 77 56 52 40 56 49 49 53 47 58 59 53 56 57 58 60 20 63 77 79 67 62 79 72 73 74 72 71 75 69 78 79 75 79 66 73 63 74 65 74 73 67 72 65 69 69 91 94 96 96 92 97 90 95 89 91 95 94 96 91 93 94 1 1 1 1 1 1 2 2 2 2 1 1 1 1 1 2 2 1 0 1 107 20 20 20 19 19 19 22 22 19 - 24 24 134 130 132 135 134 134 131 130 134 130 130 132 134 132 135 134 114 121 127 118 106 112 117 130 109 109 120 112 121 109 127 115 113 114 113 115 115 115 114 115 115 61 65 71 62 59 63 66 70 61 68 63 71 57 69 62 76 56 52 40 56 50 49 53 47 59 59 53 56 57 58 60 19 63 77 78 67 61 78 71 72 73 72 70 75 68 78 78 74 79 65 72 63 73 64 74 72 66 71 64 68 68 91 93 96 96 92 97 90 95 89 91 95 93 96 91 93 94 0 1 1 1 0 1 2 2 1 2 2 1 1 1 2 2 2 2 1 0 106 21 20 21 20 19 19 22 22 19 - 114 113 44 43 44 44 46 44 42 41 46 41 42 45 43 44 44 44 11 16 30 22 8 11 20 28 7 9 22 10 17 12 29 37 36 36 34 37 35 35 35 37 36 53 51 45 55 54 54 47 46 49 46 52 41 53 45 51 65 106 99 107 110 115 106 120 114 112 106 121 102 122 110 118 96 92 96 82 80 86 78 95 98 76 99 96 93 90 93 89 87 93 47 45 49 43 48 42 43 46 42 50 52 44 97 101 103 101 98 102 96 104 97 102 100 102 100 95 103 103 106 107 106 107 106 107 107 108 106 108 107 107 107 107 108 108 108 108 107 106 0 126 124 124 124 123 123 126 126 122 - 20 21 151 146 148 152 150 151 147 146 151 146 146 148 150 148 151 151 134 141 148 138 126 132 138 150 129 129 140 132 141 129 147 136 134 135 134 136 136 136 135 136 135 82 86 92 83 80 84 87 91 81 89 84 91 78 90 79 97 71 69 54 70 62 64 64 60 72 74 64 72 68 72 73 39 68 81 87 76 69 87 76 76 82 75 75 80 74 83 85 81 84 86 93 83 94 85 94 93 87 92 85 89 88 109 111 113 114 110 115 108 112 107 108 113 111 114 109 110 111 21 20 20 20 21 20 20 19 20 19 19 20 20 20 19 19 19 19 20 21 126 0 3 3 2 2 3 3 3 5 - 16 17 148 144 146 149 148 148 145 143 148 144 143 145 147 145 149 148 132 139 146 137 124 130 136 148 127 127 139 130 139 127 145 135 133 134 133 134 134 135 134 134 134 81 85 90 82 79 83 86 90 80 88 82 90 77 89 76 97 72 70 55 71 64 66 66 61 74 75 66 73 70 74 75 39 65 78 83 72 65 84 73 73 79 72 71 77 71 80 81 78 81 85 92 82 92 84 93 92 85 90 84 88 87 110 112 114 115 110 115 109 113 108 109 113 112 114 110 111 112 20 19 20 19 20 19 19 18 19 18 19 19 19 19 18 18 18 18 20 20 124 3 0 1 2 2 1 2 2 1 - 16 17 148 144 146 150 148 148 145 144 148 144 143 146 148 146 149 148 132 139 146 137 124 131 136 149 128 128 139 131 139 128 146 135 133 134 133 135 135 135 134 135 135 82 85 91 82 79 83 87 90 80 88 83 90 77 90 77 97 72 70 56 72 64 66 67 62 74 76 66 74 70 74 75 40 65 78 83 73 65 84 73 73 79 72 71 77 71 80 81 78 81 85 93 83 93 84 94 92 86 91 85 89 88 110 112 115 115 111 116 109 113 108 110 114 112 115 110 112 112 20 19 20 20 20 20 19 18 20 19 19 20 20 20 19 18 19 19 20 21 124 3 1 0 2 2 2 2 2 2 - 18 19 149 145 146 150 148 149 146 144 149 144 144 146 148 146 150 149 132 139 146 137 124 131 136 148 128 128 139 130 139 128 145 135 133 133 133 134 134 134 134 134 134 81 84 90 82 78 82 86 90 80 88 82 90 77 89 77 96 70 68 54 70 62 64 65 60 72 74 64 72 68 72 73 38 66 80 85 74 67 85 74 74 81 74 73 78 73 81 83 80 82 85 92 82 92 83 93 92 85 90 84 88 87 108 111 113 113 109 114 108 111 106 108 112 110 113 109 110 111 19 18 19 19 19 19 18 17 19 18 18 19 19 19 18 17 18 18 19 20 124 2 2 2 0 1 1 3 3 3 - 18 19 148 144 146 150 148 148 145 144 148 144 144 146 148 146 149 148 131 138 145 136 123 130 135 148 127 127 138 130 139 127 145 134 132 133 132 134 134 134 133 134 134 80 84 90 81 78 82 85 89 79 87 82 89 76 88 77 95 70 68 54 69 62 64 64 59 72 74 64 71 68 72 73 38 66 79 84 73 66 85 74 74 80 73 73 78 72 81 82 79 82 84 91 81 92 83 92 91 85 90 83 87 86 108 110 112 113 109 114 107 111 106 108 112 110 113 108 110 110 19 18 19 18 19 18 18 17 18 17 18 18 18 18 17 17 17 17 19 19 123 2 2 2 1 0 1 3 3 3 - 17 18 148 143 145 149 147 148 144 143 147 143 143 145 147 145 148 148 131 138 145 136 123 130 135 147 127 127 138 129 138 127 145 134 132 133 132 134 134 134 133 134 133 80 84 90 81 78 82 85 89 79 87 82 89 76 88 76 96 71 69 54 70 63 65 65 60 73 74 65 72 69 73 74 38 65 78 83 72 65 84 73 73 79 72 72 77 71 80 81 78 81 84 91 81 92 83 92 91 85 90 83 87 86 108 111 113 113 109 114 108 112 107 108 112 111 113 109 110 111 19 18 19 18 19 18 18 17 18 17 18 18 18 18 17 17 17 17 19 19 123 3 1 2 1 1 0 3 3 2 - 18 19 150 146 148 152 150 150 147 146 150 146 145 148 150 148 151 150 134 141 148 139 126 133 138 150 130 130 141 132 141 130 148 137 135 136 135 137 137 137 136 137 136 83 87 93 84 81 85 88 92 82 90 85 92 79 91 79 99 73 71 56 72 65 67 67 62 75 77 67 74 71 75 75 41 66 79 85 74 67 86 74 74 81 73 73 78 73 81 83 80 82 87 94 84 95 86 95 94 88 93 86 90 89 111 113 115 116 112 117 110 114 109 111 115 113 116 111 113 113 22 21 22 21 22 21 21 20 21 20 21 21 21 21 20 20 20 20 22 22 126 3 2 2 3 3 3 0 0 4 - 18 19 150 146 148 152 150 150 147 146 150 146 145 148 150 148 151 150 134 141 148 139 126 133 138 151 130 130 141 133 141 130 148 137 135 136 135 137 137 137 136 137 136 83 87 93 84 81 85 88 92 82 90 85 92 79 91 79 99 73 71 57 73 65 67 67 62 75 77 67 75 71 75 76 41 66 79 85 74 67 86 74 74 81 73 73 78 73 81 83 80 82 87 94 84 95 86 95 94 88 93 87 91 89 111 113 116 116 112 117 110 114 109 111 115 113 116 112 113 114 22 21 22 21 22 21 21 20 22 20 21 21 21 21 21 20 20 21 22 22 126 3 2 2 3 3 3 0 0 4 - 15 16 147 142 144 148 146 147 143 142 146 142 142 144 146 144 147 147 131 137 145 135 122 129 135 147 126 126 138 129 138 126 144 134 132 133 132 133 133 133 133 133 133 80 84 89 81 78 82 85 89 79 87 81 89 76 88 75 96 72 69 55 71 64 65 66 61 74 75 66 73 70 74 75 38 63 77 82 71 64 83 71 71 78 71 70 76 70 78 80 77 80 84 91 81 91 82 92 91 84 89 83 87 86 109 111 114 114 110 115 108 112 107 109 113 111 114 109 111 112 19 18 19 18 19 18 18 17 18 17 18 18 18 18 18 17 17 18 19 19 122 5 1 2 3 3 2 4 4 0 - 0 0 26 0 4 3126 0 18 14 0 2919 619 0 0 1 5401 0 0 3618 0 0 0 6 1411 158 1 200 5508 0 1733 64 399 14 0 56 0 0 11 0 2571 1250 0 0 496 20 0 0 0 0 1 0 0 30 0 0 6579 204 0 6617 0 0 424 0 2 0 100 2 0 9 35 0 0 316 0 0 9 0 0 1 2 2337 0 0 0 577 7076 0 35 0 40 0 435 226 0 1 17 821 0 1 0 0 1 0 1 58 0 1 202 0 0 0 2716 402 0 0 1 0 1383 0 0 13 2 5 2 0 0 0 0 0 9 0 0 377 30 3203 142 0 2 0 83 921 1088 63 0 0 0 4094 0 157 971 - 3376 0 0 0 3 0 11 0 0 4 0 435 0 2585 0 638 132 23 0 0 0 659 25 4136 0 0 0 2794 1 0 0 0 0 113 6827 0 0 2 1 0 2 5308 119 0 0 121 0 0 0 0 0 5 950 0 2102 0 257 0 47 0 1262 2 4 3 0 71 0 2 1 0 674 15 0 0 0 0 0 0 0 1787 0 0 0 0 426 0 76 503 0 0 1614 0 4 0 0 0 25 408 1788 0 0 0 2 3921 0 0 0 0 0 0 2116 0 0 0 0 1 0 0 0 54 0 314 0 0 0 22 1 0 0 4621 0 0 0 333 0 0 1 31 345 0 0 170 0 0 2 0 0 0 0 0 - 0 312 0 0 784 60 0 0 0 0 13 1512 4 0 6146 35 0 0 0 0 0 6 7090 3007 46 0 0 0 0 0 1568 0 0 0 0 2 0 0 0 0 0 0 0 0 1 0 0 0 938 24 0 0 0 2 0 0 0 0 4 0 0 0 920 270 0 3 0 589 0 1810 2128 0 0 367 0 0 0 0 667 17 78 0 31 0 10 0 15 0 16 1007 0 0 205 0 0 10 2 0 0 2973 4033 1138 1 84 0 0 2202 1 1 0 1 0 1 1 0 1 0 2 1137 0 0 0 0 3 0 0 205 2 0 3 4 2 0 0 0 2394 0 0 0 5840 259 0 0 1 0 0 1 0 0 0 - 0 5870 4 0 132 1 0 2 8 5 1 0 34 0 0 0 211 0 0 0 747 45 1 0 0 6 0 72 144 1 0 2189 0 0 0 45 0 0 84 613 0 21 1374 0 1 0 0 16 0 0 0 0 0 0 0 3939 1681 0 15 0 0 1677 0 20 1 1 0 0 0 0 0 0 821 0 8 0 2342 43 0 3986 5274 499 0 2107 653 8 0 0 0 0 1748 0 0 0 2956 16 1786 412 0 2350 0 13 0 3124 1214 3 20 0 1110 0 0 0 0 954 47 0 46 0 130 9 2 1 0 91 0 0 1962 0 16 0 0 1040 0 0 0 1497 0 0 0 0 18 0 0 0 1019 0 0 0 12 0 - 41 0 4366 2 0 189 0 538 0 0 3483 1269 14 1 0 2 0 421 2 715 309 4236 0 0 0 0 0 48 0 3 1 1 0 6 0 0 0 0 7233 0 0 0 0 0 0 0 190 0 0 5 5573 0 0 5222 0 3 0 128 70 5234 0 0 48 0 396 19 35 2075 0 0 2473 0 0 0 69 16 7057 0 0 0 0 1 0 3241 757 1 0 0 3 0 0 0 0 0 537 0 0 0 0 0 0 225 0 0 31 1 753 1 0 7627 13 0 0 0 0 29 0 0 0 1172 450 0 1 0 0 2996 95 0 0 0 0 0 1487 0 0 0 4 2 0 0 329 42 0 30 1 0 0 39 18 0 - 0 668 0 0 0 0 0 1 63 19 229 1 76 0 28 0 12 3156 1 0 0 0 4 0 0 15 4075 288 2 4901 275 0 0 0 0 59 2579 0 0 0 0 0 47 0 0 20 0 3045 0 0 19 0 1 11 19 0 0 21 9 11 0 0 1 0 0 0 0 893 2297 1494 0 0 129 0 8 65 2138 0 3 0 1338 1011 23 0 0 0 37 2 1678 1874 0 0 15 0 6133 0 0 0 0 0 0 1 0 0 1337 0 12 2515 0 1 0 0 2370 972 1065 0 0 412 50 0 0 0 35 22 281 1 36 24 0 0 0 0 0 0 0 7500 3403 0 0 0 0 0 1 0 1 0 0 1 0 736 - 142 3241 1454 0 0 0 0 0 1065 136 0 0 1 0 0 3057 0 111 0 891 0 0 1135 0 0 583 29 2 3 0 24 7172 12 4096 42 165 0 0 992 0 0 1 3255 0 49 291 0 0 229 0 0 0 143 0 0 0 0 1398 64 0 1 806 0 1571 4 0 297 0 22 0 0 0 0 0 0 1 705 0 0 16 38 0 0 0 0 0 1272 3 0 6 0 0 38 0 283 0 0 0 4 0 328 791 172 51 40 405 1 0 0 0 0 0 0 0 0 0 4181 1 1 0 0 1 0 1 57 0 0 3 0 266 1 1 7 0 7 0 0 0 516 2932 0 0 2848 0 111 34 1 0 0 183 - 0 0 0 0 0 5 1 0 283 0 258 1393 1133 0 0 0 890 0 0 0 0 155 0 0 3271 3896 1 0 0 1614 0 0 0 694 0 1108 0 2 0 1 1650 0 0 0 0 263 0 0 0 37 20 0 0 0 0 0 0 0 0 1 7 294 0 0 134 0 3 0 0 0 0 127 371 3 463 11 0 0 0 2 0 0 0 32 4 3 0 427 0 0 0 0 0 5663 0 0 5974 0 64 0 0 1 0 3 26 0 0 0 0 0 4 1 0 0 0 1 0 0 0 0 3201 0 16 0 688 3256 0 0 3992 0 0 0 0 1 1 5047 0 1875 23 0 1 8 0 0 232 0 20 0 96 6094 - 0 1025 0 12 46 0 182 0 0 0 0 92 0 0 8 718 4 3 0 0 0 0 0 1 11 0 0 0 4 0 0 104 0 0 10 42 229 0 6275 2 3 85 0 0 0 0 2 213 0 0 0 0 0 0 0 158 238 0 0 0 20 3 0 0 42 561 27 0 3 710 78 1 51 0 416 0 0 2 1 3 0 186 0 0 0 0 99 0 15 0 0 0 0 0 68 0 0 0 0 0 6830 0 12 0 151 205 8 0 0 0 1 1369 24 0 0 0 44 38 3 1 0 0 0 5 0 0 0 2 6865 0 1 1 4182 2 0 472 0 0 0 0 0 0 0 33 0 0 0 0 0 0 - 534 8 77 0 40 0 438 0 0 0 332 6758 0 22 0 0 0 1 0 0 0 0 0 6930 0 0 0 7 0 0 3835 0 0 275 0 0 0 0 8 25 0 0 0 20 0 29 7 568 51 7 0 6254 0 0 1664 15 25 12 0 5672 0 0 454 98 0 5 0 2772 0 5090 106 0 0 168 0 0 0 0 0 9 308 45 194 8040 0 554 0 0 0 56 22 4 0 0 7 7 0 0 0 40 3551 8 0 0 799 0 0 1681 0 0 0 1 1 0 0 174 1 0 78 0 2 0 1 0 6 169 9 0 98 7 0 0 0 4 0 10 0 0 0 0 0 0 0 0 12 0 2 7 12 3515 - 450 0 0 967 0 1 9 0 5925 457 0 0 0 0 228 0 232 0 0 0 0 9 0 404 0 98 0 387 0 4 107 0 0 0 858 6276 292 1207 3 0 0 0 0 0 727 0 0 630 0 4131 0 0 0 0 0 0 1 4 1 2311 0 0 1377 0 0 28 0 45 4081 5302 2473 0 0 183 0 0 285 314 1 48 0 0 0 1929 2 2 0 0 2 0 0 0 0 42 0 0 1175 96 0 3419 649 0 142 169 0 1 0 0 3 0 0 0 0 0 111 2270 257 0 28 0 0 0 0 0 176 45 0 0 446 84 303 23 21 0 10 49 0 0 0 0 0 12 0 0 0 238 2 2 0 5 - 0 0 0 485 0 3736 0 0 25 0 65 0 0 0 0 6 0 398 0 2 70 4190 0 499 0 380 811 1147 0 0 0 1 0 1730 0 0 0 161 0 961 0 15 1030 0 16 0 191 0 0 0 0 227 0 19 0 433 0 4 5796 6931 1 3226 0 6 0 0 0 3 0 0 7 0 0 0 0 0 467 0 0 0 0 379 2 0 1 0 0 0 0 524 3 0 1893 5515 0 5 0 3 1 74 62 5055 1 91 72 0 0 0 54 20 0 66 1 0 57 0 23 0 0 0 149 11 176 18 0 501 626 0 510 220 0 245 64 0 0 0 488 1 0 1 0 0 0 380 2 0 1123 0 0 529 - 914 24 1 53 0 0 3084 0 1 0 0 0 0 0 1 0 0 3526 0 0 7105 1 0 4 0 107 0 0 0 218 31 0 0 46 5049 1 0 0 0 0 0 0 0 11 0 1429 0 7 1035 27 0 11 0 0 0 0 0 0 13 0 0 1 1 0 0 1994 4436 14 0 0 0 7315 509 0 0 0 76 629 0 0 0 18 0 0 0 285 0 0 71 23 4750 5697 322 9 114 42 0 0 3513 0 263 179 0 3318 1128 956 0 0 2 0 0 0 0 62 1837 0 0 0 0 2449 272 787 0 0 162 114 0 324 8 0 57 0 3 17 0 0 1 0 93 0 0 0 0 99 0 1 0 0 613 0 - 9 1258 0 0 0 0 6144 1 16 0 5 0 14 0 0 0 65 0 0 8 4561 0 1 0 0 0 0 318 0 0 5 0 0 0 1324 3177 3 0 1 1383 0 0 20 0 0 174 21 0 209 0 27 0 59 201 0 0 0 12 0 0 2 0 0 0 0 1 1397 3763 0 0 0 708 0 0 0 275 0 0 0 0 49 0 0 932 235 8 12 6037 0 0 0 0 865 0 0 0 0 0 86 16 0 54 2229 0 0 572 0 0 0 5 849 53 176 0 0 2769 11 0 0 609 0 0 0 1 0 1 0 1 5757 108 1 1 425 698 3 0 4385 205 4829 2 0 1 0 0 0 2 1 0 4 279 - 0 0 3 3908 6926 0 82 0 3 0 6463 0 3 2 0 11 0 0 0 0 904 86 18 26 0 0 5 0 0 2 0 1 7 923 149 0 0 2 3 1266 0 0 193 0 4 0 0 0 0 2 0 4763 0 0 137 0 0 25 0 17 0 7366 0 646 0 0 0 0 8 0 0 0 0 2583 0 0 0 0 0 2 0 0 0 0 11 0 0 12 373 0 7668 545 43 0 23 0 1 53 1 0 10 1122 4 0 7 0 1 6 0 0 5761 0 0 55 0 0 35 0 0 3 0 201 0 0 155 0 199 11 0 0 0 0 7180 1 0 4 1 1 3 64 1295 0 0 0 513 2 0 5277 0 13 - 3 0 1 9 0 0 736 0 365 10 0 121 2938 1156 0 0 0 0 101 0 0 186 0 2 3 2 199 0 0 0 60 0 2809 4 1807 0 0 0 0 6 56 0 470 0 3 0 481 0 0 12 0 21 0 3406 6031 0 43 4 0 0 0 67 0 0 10 0 29 50 0 162 969 0 0 9 0 88 0 9 0 0 1696 0 0 0 0 1444 0 1781 1 0 1 1731 2 180 0 1 0 0 0 0 113 487 0 0 0 0 0 0 0 0 0 0 0 23 1 920 0 0 0 5021 0 0 0 0 0 10 0 10 0 0 0 0 6108 0 0 3 4945 18 19 55 529 0 9 69 382 542 0 0 0 2534 - 5311 0 3375 2122 0 84 0 758 0 0 0 99 25 0 0 22 0 0 0 0 4 0 3542 20 0 0 0 0 3 0 1 0 0 19 2 0 0 0 0 0 0 1672 0 0 0 6 0 0 637 5854 3 1 1053 0 5 0 254 0 0 0 566 0 2 707 0 0 1 0 0 245 0 0 0 54 0 0 0 0 0 1356 0 284 0 196 4525 637 0 460 0 58 855 1 353 0 0 117 1 198 22 0 0 0 7 0 0 0 606 16 210 124 0 2 0 0 25 5 78 1 0 0 0 976 0 0 0 1145 0 5 149 3 1 8 2119 0 61 241 48 38 4 0 0 0 37 126 313 2 5 5 0 0 - 5486 0 2294 0 66 131 0 0 5371 283 0 2981 0 205 0 0 0 0 0 2 3923 1826 1 53 0 37 1 421 0 28 62 0 0 2 65 0 0 0 5719 234 0 2 10 0 5 0 0 0 1 9 556 1087 0 2075 0 0 0 1190 0 0 0 1 0 0 0 0 3 0 7 2 919 418 0 0 6473 0 0 24 0 0 0 0 14 1 0 0 0 0 2 0 3204 0 0 17 0 1 0 1 505 0 137 0 0 0 223 6478 0 482 169 0 0 1202 0 0 0 220 1165 4160 10 0 0 0 1 0 5630 41 0 1 79 243 3156 0 0 0 1227 5 0 233 3 5604 0 0 170 0 1 0 0 0 4657 2366 - 8 2327 283 3436 2 1086 3 1 0 637 3 325 8 7 3 0 0 11 0 0 1 0 0 0 0 0 0 0 5399 583 0 0 0 0 0 1 0 4 1083 0 555 34 0 0 79 0 2 0 0 2 0 0 6 0 0 0 0 93 0 0 0 0 0 552 0 6779 11 0 401 0 0 29 0 0 0 0 0 0 0 2977 0 6 0 9 0 0 0 0 0 0 0 0 1263 629 5 0 2355 1516 0 0 7 0 0 0 0 0 32 21 0 3970 0 267 17 0 0 0 57 0 0 0 0 0 4515 0 35 4 240 12 4 0 0 4219 0 181 0 29 0 0 0 0 4 41 110 175 0 0 0 0 1453 161 - 0 1073 11 224 0 0 0 0 0 0 0 0 0 14 1512 1 0 278 0 0 0 172 0 0 7070 271 0 329 0 2 0 105 0 0 688 132 42 0 2 0 0 0 0 6767 0 0 4 0 4 0 3 3 396 1 0 6 0 1 32 0 2731 0 2 11 1351 5 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 2 14 0 141 1156 1 1 0 0 0 0 0 5 0 0 0 0 374 0 478 0 3163 0 0 0 0 2539 0 29 2 0 2 0 6514 0 0 0 4 0 265 0 0 0 0 0 0 0 4 0 0 0 0 654 0 1 0 0 1449 10 212 0 0 0 889 0 3 - 2 0 0 0 0 33 6 0 0 0 0 520 1 4599 0 55 0 7323 15 0 0 241 0 3854 0 0 0 0 48 169 1 343 0 5936 0 0 1597 0 10 11 0 0 7596 3 0 1118 0 0 12 0 0 0 2021 0 0 0 94 0 2 0 0 0 5 0 0 0 0 849 521 63 18 0 3 10 1023 0 2 16 0 17 2 0 1 5873 0 0 2519 0 0 794 0 47 0 0 0 6 0 8 1 0 0 0 0 511 0 0 137 0 0 634 2 0 327 0 93 0 0 4151 0 0 0 25 9 0 21 792 0 0 0 0 1730 1 0 611 61 4 0 0 1 9 28 34 1537 1942 104 0 9 0 0 0 - 0 140 0 0 456 156 0 0 0 0 4 262 6531 0 0 163 2143 309 0 0 1981 0 301 0 0 0 0 0 199 1 0 1718 0 0 0 0 0 0 0 1529 6072 0 1 0 146 0 1 0 0 645 0 0 0 1 0 3 0 0 0 661 142 353 0 297 0 13 0 0 0 0 0 0 8005 13 0 0 2496 0 0 3 289 0 0 7 172 362 0 7 67 0 846 0 125 0 3 0 0 4563 0 0 0 0 0 2 10 5943 0 1 0 0 0 0 0 0 0 4206 0 0 2 0 1334 155 0 0 0 6257 0 0 0 6802 0 47 2 3048 2161 0 0 909 0 0 0 153 0 0 18 0 0 27 8 333 - 5907 0 0 0 2042 0 723 4280 0 0 5426 5 569 0 0 0 0 0 0 0 0 6056 0 0 47 915 0 0 0 133 424 0 0 1 0 3 0 0 8 0 0 298 1 1715 2 266 0 0 2 2093 1096 0 0 0 5 123 0 0 680 0 0 0 98 2474 0 0 0 43 3245 313 0 0 110 29 50 4454 442 0 2508 3008 779 0 0 2 6995 5 2722 4 4874 3 0 1 0 474 0 0 10 8 106 63 0 221 0 1727 658 0 0 0 21 0 990 1 0 2797 0 0 1170 0 0 44 16 0 0 264 184 204 0 0 0 0 0 3 0 0 498 0 0 0 2607 1 2785 0 0 0 2086 0 0 1506 0 321 - 3 6208 0 0 0 0 1155 2291 74 4005 1 14 0 25 471 0 14 15 3 0 104 0 0 0 0 0 0 0 105 0 0 0 6 0 4 0 0 3 0 0 1 0 1 0 223 0 0 0 18 2 0 0 0 1512 2 0 0 0 0 1679 0 0 1 0 543 0 169 0 0 0 0 0 0 0 0 22 0 0 477 5 96 0 0 0 0 0 7 24 0 0 0 0 0 0 467 26 0 756 1 0 0 579 3 0 198 0 0 245 0 0 5 8 2 0 0 3 273 0 1340 0 0 0 8 58 29 0 4 0 0 0 0 0 0 0 0 1061 0 0 0 25 825 0 0 0 5306 0 0 8 725 321 - 0 1 0 1208 0 593 4049 0 0 0 0 0 0 635 0 735 0 0 0 4 0 478 1 0 0 2 3 23 0 0 0 0 262 0 0 0 2 384 5733 2 0 0 87 135 5212 431 0 0 2060 0 0 0 711 0 0 0 0 6280 0 1026 0 0 0 0 0 1 0 455 109 0 0 195 0 0 0 0 0 0 0 0 203 804 0 814 56 0 0 0 0 0 107 0 0 37 0 0 0 0 1638 13 0 12 0 4 0 1949 1 0 240 0 0 0 0 0 0 0 0 0 4720 0 0 0 2 0 0 0 26 0 0 7 0 0 1 20 0 0 0 0 2 77 4 0 7 0 0 0 3325 1 0 0 - 0 0 524 15 86 0 0 0 0 0 0 0 1 1 1526 0 0 0 15 3329 0 40 1030 1 2 0 0 0 173 0 0 0 2079 392 150 0 1 212 0 0 0 0 0 0 0 1 61 75 0 0 22 5 1007 3 0 0 0 0 3529 0 375 5 0 104 1 0 0 1 0 6510 20 0 2376 22 9 0 6 10 0 0 0 3525 0 576 1 0 0 9 0 31 86 0 0 0 1 0 2 6504 0 8 3560 6 0 0 64 0 0 0 48 0 36 0 0 1948 0 0 0 0 0 0 0 0 4 5 0 34 7 1 0 7 59 0 0 0 0 0 264 1007 26 169 349 3454 0 0 0 0 1 7 3058 5 - 2231 0 22 0 0 0 0 225 7 0 555 0 78 0 0 2 0 0 41 0 1 0 0 11 0 40 0 0 0 2 15 0 10 0 0 0 0 6446 0 1294 0 3 0 1652 0 2 0 42 0 99 16 0 0 47 6841 4 2032 0 28 0 750 0 0 0 0 2146 165 673 2 274 0 0 0 0 2456 0 0 600 0 3 5 0 0 0 2 0 0 0 0 0 0 3754 0 0 1406 508 0 2 0 0 4420 2251 3 1768 2999 0 1212 15 0 2377 0 1732 0 0 0 15 0 0 1391 0 0 1 9 0 0 1 0 0 0 0 0 3369 0 0 634 28 1 2545 0 48 1 55 0 167 0 2 643 0 544 1807 - 5 539 0 0 100 0 575 2 2 0 390 13 0 0 1 0 0 3 680 0 2 0 0 0 7015 368 1 0 0 0 0 0 0 0 0 2200 578 535 321 4 0 4 0 0 0 0 0 1822 0 0 0 73 0 79 3 0 0 0 39 306 941 0 103 0 609 0 0 238 0 1 0 0 5279 10 0 311 0 0 0 43 1 0 0 0 0 0 0 95 7 0 1 2 0 573 44 0 0 0 0 0 0 0 0 0 0 3 0 2355 169 355 0 302 6 0 0 0 0 1 0 6 3509 4 980 1717 40 0 2 0 0 0 1 0 0 0 306 73 0 58 2641 0 0 9 0 17 1112 0 923 18 2 0 - 1839 0 0 0 10 71 0 0 0 0 0 2309 2702 839 0 874 2208 2 216 1325 0 1165 0 0 187 0 1029 0 0 0 23 0 0 5 0 22 1587 8 40 0 223 0 2532 0 496 1 0 5 1 0 2 0 0 0 19 6 0 0 0 0 0 0 0 1795 0 0 5 63 0 0 0 0 2352 1373 3 3335 299 1419 0 0 0 0 70 0 0 0 28 0 42 0 0 0 13 0 1 0 1 0 17 11 1 4014 0 283 0 268 0 0 0 1826 3 0 0 0 465 0 2087 4 16 55 1091 0 0 0 0 2624 9 3882 205 0 3205 0 20 6032 0 0 0 0 0 1 0 1875 1352 0 6 0 0 0 0 0 - 5 0 3 0 0 1 2228 1 21 2360 3 0 418 0 0 0 0 0 2729 1 0 0 0 49 229 0 2 0 140 0 0 0 0 7 0 1 0 766 0 1 0 0 1 0 1133 14 0 1584 124 0 5532 0 1 10 2 0 0 1 2 0 460 0 4043 475 4 82 0 0 3507 0 1377 51 31 1 875 0 0 0 0 0 0 251 1473 3 0 0 0 0 270 2 0 0 0 0 0 0 0 81 0 0 0 0 0 3 41 5 0 0 3 1 3575 141 47 0 6449 1 0 0 8 2 0 0 0 3 0 158 0 0 0 0 175 0 0 12 140 2 0 0 0 14 0 0 10 0 0 4347 0 0 3 0 - 0 0 29 3 0 0 0 196 85 0 0 14 6 0 0 0 60 0 0 0 0 0 0 0 0 0 4049 2447 0 0 0 0 0 0 83 872 0 415 122 0 0 430 0 1030 0 6531 0 1 0 0 1 0 0 259 0 0 0 0 0 0 1134 0 0 544 7186 0 1 0 0 0 0 38 83 0 0 3 2 138 0 185 0 0 0 0 2 0 33 865 4 0 0 346 0 0 36 0 32 0 63 1481 2 0 0 0 3988 0 0 0 1004 0 0 2432 0 0 0 0 0 0 0 180 5 0 2 1107 0 45 27 0 1 297 0 0 0 8 48 0 54 1 1988 7 0 0 0 0 0 30 0 0 6 0 - 169 0 1 0 0 27 931 0 0 165 0 0 0 0 0 0 45 0 0 0 0 0 0 493 0 0 1759 0 147 0 0 0 0 0 0 0 0 8 174 0 0 72 3 3 63 0 0 530 0 0 0 0 133 183 58 0 34 4 7 0 32 0 15 3575 2308 0 0 0 595 2 0 5616 1312 0 0 34 0 0 0 3894 0 0 41 1 0 53 0 458 0 0 16 50 3788 0 2978 0 498 10 265 0 3 0 1111 0 13 0 10 20 5225 96 2 12 0 4347 0 62 0 497 134 0 70 0 2 0 228 0 0 5 25 16 0 16 1 0 0 6 0 0 0 0 4480 0 4 0 14 0 13 1787 6884 0 - 3 955 63 4 1 0 1847 0 0 1 1322 6097 5 2411 1040 13 0 0 0 0 0 0 304 1 0 1 107 0 0 0 1877 1 0 0 0 6975 0 0 0 1544 1 77 2 0 0 0 15 0 1780 0 0 0 0 0 0 0 0 5 13 0 0 0 0 0 0 0 0 0 0 0 0 1114 0 0 1 342 1433 0 0 0 2 0 13 544 0 0 508 4 0 0 5 109 0 0 16 7 0 373 720 10 88 60 0 0 0 16 0 519 2490 0 0 0 0 0 0 5 0 0 20 0 0 0 0 0 179 69 4 0 0 0 0 13 0 0 0 4 0 1 0 137 631 1551 5174 0 11 0 764 755 0 1 - 0 0 415 0 0 40 0 171 497 120 0 700 1 0 0 2 0 0 0 0 0 189 444 0 0 0 0 0 815 0 53 1 26 0 315 4335 0 0 12 0 0 4 0 0 453 0 2566 1 0 116 0 0 23 0 0 0 2 0 67 0 120 0 2 0 0 4 0 2 0 3120 290 0 0 0 0 0 2384 0 1 28 147 0 0 0 0 0 568 740 296 0 0 0 0 0 0 637 0 0 29 798 0 0 0 65 0 8 0 0 135 0 3 80 0 172 1 0 10 0 0 0 0 0 0 0 3978 0 0 4590 22 13 5 0 0 0 110 0 1 0 0 9 143 0 501 7060 24 57 90 0 1130 5213 - 7092 0 3778 0 557 28 0 1084 0 1 0 1 0 0 0 137 11 0 71 0 0 7622 0 2 48 837 0 0 1 0 131 0 3247 0 0 6 0 0 0 0 0 1 0 0 2 434 32 0 0 0 5708 0 1 2399 0 15 6 3648 0 0 2607 0 4 3 3 0 2383 0 0 26 0 0 1 9 1 0 1 68 0 0 0 0 0 0 0 0 0 6128 0 1134 0 0 0 612 4633 669 0 0 0 261 2278 0 45 1697 406 34 0 7504 0 0 1 0 0 0 0 0 20 0 0 0 104 802 0 0 0 7247 6 1035 0 0 0 1 0 0 186 49 0 0 832 0 0 0 25 2 0 0 0 0 0 0 - 0 0 0 4 7 0 0 0 6 0 0 1 0 1 0 0 62 94 0 8 0 0 0 766 0 0 0 1119 29 0 0 0 0 0 0 0 0 0 0 361 540 5 6 0 0 0 1 19 22 0 0 18 0 1 0 0 0 0 0 0 17 0 0 0 0 1 311 0 595 1084 0 35 1716 0 0 0 0 0 67 0 0 0 95 0 0 0 530 0 0 0 0 693 5553 0 0 40 9 0 0 0 65 2 0 4252 0 324 0 0 51 0 0 0 0 0 0 0 0 14 0 1166 0 0 1 0 0 191 2781 0 96 0 7052 803 0 0 512 0 0 0 0 0 0 1 422 0 41 0 0 44 45 0 - 0 8033 0 249 519 1455 0 0 0 3 4 1 0 0 0 0 438 0 1 1 130 2890 0 0 6 0 409 0 0 0 25 0 1514 4 0 0 0 2 3504 2 0 0 0 0 4 0 3620 0 65 5 1192 44 3 1565 28 9 0 0 0 0 54 0 0 3683 0 451 11 4 0 585 27 251 0 0 833 0 0 0 0 0 0 0 183 0 26 0 349 0 3 9 0 1 0 0 0 0 15 7771 5841 441 0 0 0 0 0 95 1183 0 1149 0 0 230 0 2 0 0 0 0 1425 0 150 0 0 0 0 4604 0 1 0 1534 0 2 82 3400 0 27 342 1521 0 0 0 0 0 0 388 4933 624 26 0 890 - 7 0 0 0 0 1 0 3179 0 2836 769 0 0 22 213 0 112 387 0 2 0 0 0 2039 2105 0 0 0 3040 0 876 0 2593 2 0 0 2 0 0 0 30 1845 0 0 0 7 0 0 1508 0 0 18 0 0 0 2 737 0 81 0 1016 0 3148 2 0 0 0 6 3 0 1261 12 0 9 0 4944 0 0 0 347 11 2208 579 68 0 260 0 0 284 0 1 9 295 686 0 2399 0 578 0 47 722 3791 2 0 0 88 0 0 0 275 1 16 0 0 2 0 4 217 321 0 9 1 2 0 0 5 119 4405 0 0 0 0 3 2 12 0 0 0 26 0 0 0 255 2475 127 0 426 0 0 0 - 0 0 0 9 11 0 0 20 0 0 1 2090 41 0 9 8015 1 0 83 0 2415 0 0 4993 0 0 0 52 4335 0 0 5 2812 0 0 1 0 0 0 758 0 12 0 0 25 0 0 1140 1 9 781 0 6321 0 0 0 30 644 1617 501 419 2 1 2 792 0 0 0 0 2342 16 0 0 1 124 0 0 0 12 0 0 0 0 0 0 0 1 0 0 0 1 0 0 230 0 53 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1066 0 3995 64 0 1 10 88 0 20 0 2 0 0 8 0 0 3377 0 2163 279 0 0 1 394 0 59 0 0 0 4 0 0 0 - 0 48 0 0 36 0 6 0 0 0 0 1 530 1423 0 4 0 25 73 0 2670 1317 0 0 1 0 0 5566 0 0 0 2450 0 3 0 16 50 0 2 0 0 0 0 0 0 0 461 0 0 1792 0 4102 1488 0 24 3976 0 95 0 0 1 2 0 0 1 268 0 3369 2 3459 1 308 0 715 26 0 0 64 0 27 5 0 0 0 0 0 0 4 0 0 9 0 4 0 0 0 0 0 1710 0 27 0 104 0 0 0 0 0 0 0 0 278 0 0 0 0 1719 7 2676 0 0 0 0 0 0 0 0 0 23 0 0 3 0 1 0 7 0 71 0 0 3894 0 0 44 3 0 0 23 0 467 - 14 448 0 1 0 7 8 0 0 0 539 3768 3223 1 0 0 0 2 276 0 0 7 4738 0 247 126 2 0 2946 0 1 0 0 2 353 6286 4856 54 594 94 0 1860 1 0 292 381 0 653 161 411 574 0 1653 0 0 0 0 0 4975 0 12 290 0 0 0 241 14 0 0 4199 14 147 0 521 0 848 0 3 0 0 292 0 0 0 0 5 0 18 2 0 0 0 0 3 182 0 3 0 0 1913 0 6070 0 54 2 372 3561 1938 1299 7 0 72 2785 0 0 0 3199 4351 371 0 4213 0 3 700 3 12 93 7720 5364 439 0 0 0 0 169 317 3551 95 0 0 0 134 0 0 0 0 160 0 0 0 - 14 1 0 0 81 0 87 0 27 5915 0 13 0 0 6 0 0 6714 0 0 0 3 0 0 697 2 0 28 0 0 0 157 1 0 0 0 2794 0 0 0 0 0 0 300 95 7 0 0 4 2142 0 0 39 0 331 7332 1 0 0 8 0 19 0 0 29 233 0 0 45 0 154 168 290 5370 8 17 0 0 0 1 0 2 0 0 0 0 3 4 0 26 0 23 0 4928 0 0 10 13 5 0 0 559 2 0 0 3376 0 120 0 0 0 16 0 0 6830 0 0 0 1 0 0 0 5 2207 0 0 0 0 16 0 0 1102 284 0 0 0 291 0 0 26 0 122 0 0 3 3133 0 8 0 316 - 0 0 0 0 0 1148 0 0 0 31 254 7 0 0 0 0 38 0 0 54 0 142 23 174 381 0 0 0 661 0 0 171 3 1244 0 2 0 0 0 1 0 158 0 0 1172 2 0 0 1 492 0 7660 0 72 0 0 0 2 0 1526 0 4712 533 0 0 0 0 324 27 0 499 51 0 0 0 10 0 0 1 1442 0 0 3 0 0 1 0 57 9 0 0 919 536 383 34 0 0 7631 0 1339 1181 0 0 0 4 0 0 0 89 139 0 0 6 20 7 0 23 0 0 0 12 0 0 0 0 851 6357 1 0 0 0 1 0 3 0 0 90 6 7790 2362 0 0 6 6 7099 4464 0 4 0 568 - 26 0 163 0 0 0 0 77 0 4 5244 1 0 34 0 0 0 80 0 280 2542 0 0 0 0 0 0 2 122 5275 0 0 0 0 0 0 0 1265 0 2542 0 46 0 0 2184 0 0 0 0 0 4531 5055 1 0 0 0 2 0 168 0 0 66 0 2 2575 0 1715 18 816 0 9 0 0 0 74 75 0 0 2032 0 613 0 225 53 7715 0 0 0 0 0 6634 0 0 0 16 1 0 293 582 0 0 1 0 370 893 3661 7410 4 0 0 113 0 0 89 0 61 0 0 0 0 4745 0 0 5 1 0 0 771 1270 0 0 1995 0 0 0 70 22 0 0 13 0 0 3658 0 1352 0 0 0 5 1 - 5 28 0 1 0 6 0 152 0 0 0 297 0 5197 7 0 698 0 131 0 0 69 2 0 135 83 0 0 1526 2 0 173 996 6 0 0 0 51 1 0 12 0 263 3101 0 0 0 0 0 7636 3 0 0 0 280 4 0 9 3270 3 0 4076 6900 0 0 0 10 0 0 1712 0 0 0 0 79 4293 61 6 12 0 5066 0 25 5910 3168 0 0 0 0 0 83 175 0 16 0 36 3 394 0 0 22 0 0 0 1 0 4 17 0 42 23 349 1 205 153 0 2 0 0 0 0 0 6 0 0 0 95 1 668 183 1 155 0 0 0 0 0 0 13 438 58 0 0 0 0 151 33 42 55 0 - 0 15 260 86 223 0 0 0 96 0 2629 2903 1348 7 3 0 0 0 78 0 0 1450 6 584 0 0 0 0 0 0 0 0 0 620 0 11 54 6 379 0 0 0 0 6930 0 0 0 0 0 0 3 70 5815 0 0 156 1 1492 0 80 0 4425 30 0 138 34 0 0 20 0 0 0 0 0 7 0 0 0 0 84 318 69 20 0 0 4 0 93 0 4 0 3074 0 103 0 5291 0 0 183 58 0 0 0 1 0 0 9 154 0 0 0 4 0 101 0 2 0 0 20 3 0 0 3 1 0 5157 39 1886 0 0 0 3 0 0 0 0 1 0 86 0 0 6413 0 0 0 839 0 0 0 0 - 22 1 0 1 0 1 6 466 5 0 105 0 0 0 0 0 0 436 1 0 0 3365 1 0 3223 3 0 0 0 2703 0 5927 0 129 0 0 428 0 0 123 0 0 0 5 1 8 0 3 0 1 19 329 1090 0 1 0 0 1 6 3761 4 187 0 0 0 0 22 1349 0 0 32 0 0 0 0 298 294 7 56 194 28 256 183 0 586 0 0 0 0 3327 2212 0 0 0 27 2 0 0 0 0 0 0 0 0 0 0 1098 0 0 6 3 0 0 0 1324 40 0 0 33 0 2 0 0 3429 1472 0 5 31 0 29 6505 0 688 0 3 0 0 1 0 0 0 0 35 0 126 0 0 1 0 3314 - 0 49 1 0 1231 10 0 13 0 61 0 2 0 0 1234 0 0 1 118 0 0 0 0 22 5128 0 0 0 7 2 0 0 0 0 0 672 2 1362 0 14 1 1 0 0 0 0 4 0 0 38 0 11 0 0 0 1 13 0 3 0 0 29 94 74 246 0 0 0 0 0 0 267 1 0 50 32 0 0 0 2440 1808 532 0 3273 0 0 10 2 21 0 5 1405 0 418 0 1 1607 512 420 1 0 24 0 2 0 3757 39 0 0 42 2643 0 1949 0 0 1 2 1 5 786 0 0 0 0 0 0 0 0 1 16 0 6794 0 0 0 0 0 0 321 0 322 1 145 753 0 22 0 5208 0 0 - 0 0 0 0 112 18 58 2 909 2977 0 413 5876 0 0 0 0 0 3053 0 1 2035 0 37 36 1159 0 7 0 0 0 6 0 0 4996 1 2 250 0 0 0 94 95 0 0 0 0 4 0 0 9 100 0 2 271 9 0 0 0 23 0 0 0 0 5420 24 8097 0 0 1656 0 0 3928 37 0 65 0 1141 7 0 128 59 0 1249 64 403 0 0 254 3 0 0 0 177 7 2 92 28 285 0 211 2 0 0 0 0 1885 2680 430 0 402 0 8 0 1164 186 20 1017 31 0 0 0 4 2 0 0 1 0 0 515 0 0 388 0 7 79 0 0 174 15 1115 0 190 0 0 2347 0 0 0 0 - 2861 2 1 100 0 0 11 0 61 0 42 0 0 0 0 0 0 4 18 3413 0 0 12 0 0 0 8 1 1 0 1 581 7 313 0 3 9 2672 0 0 0 450 0 0 968 2 0 2 113 0 0 1 2 0 223 0 1903 0 7 0 560 1195 555 72 0 0 0 0 0 2 0 0 0 0 1 0 0 0 4 0 1 1735 2 0 1 0 908 0 0 0 0 0 0 1096 0 0 0 0 0 0 0 7102 0 0 0 0 0 0 0 69 0 3 0 0 2 0 8 0 34 138 0 17 2716 0 0 95 642 0 0 5 846 874 1 0 1 5 1 6735 17 3961 0 13 0 0 2013 0 0 1516 0 0 - 0 112 464 6 0 9 2 0 0 0 0 0 0 0 247 0 0 0 0 0 1 0 0 384 0 2 0 29 0 1146 346 0 0 2 16 34 345 0 0 665 0 1 0 106 1 0 4 0 0 1 0 2231 4 0 0 0 0 183 0 0 0 307 0 2 2 489 0 101 0 1 0 0 601 1 0 2 332 0 0 0 23 104 6 856 923 2 1 29 0 0 0 460 7 359 14 0 13 0 1643 2483 0 0 5 0 25 0 0 4 292 0 0 0 0 0 0 0 0 0 0 0 0 0 3343 3 0 0 0 0 0 0 0 0 0 0 0 27 0 0 0 0 4 0 3596 0 0 38 0 0 0 0 - 0 0 2666 580 0 66 3 2 0 3 20 30 0 0 0 4 747 367 58 29 0 0 663 0 155 342 0 0 109 0 358 0 0 0 2 2858 4526 0 0 10 33 0 0 1 0 0 0 0 0 0 7066 0 0 0 0 261 543 0 231 33 0 0 0 0 384 0 0 0 1 0 0 0 0 0 0 1156 0 0 72 0 0 0 571 18 0 0 750 70 0 0 0 1 0 1 0 647 0 3 0 0 0 116 238 1 0 0 16 0 0 0 0 0 4823 1 10 0 0 0 0 0 0 1565 1 0 0 1 0 0 260 0 0 314 1 378 2 0 2654 0 0 30 0 0 1 0 0 24 274 1808 0 0 - 1169 0 0 0 1009 0 1 83 3005 0 0 0 1 1223 0 516 49 5935 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 28 0 0 2832 73 5 0 0 0 0 2 60 754 0 0 0 4 1396 3 0 0 0 0 0 4584 64 8 0 0 631 3 6 0 0 0 2 0 0 567 54 0 0 0 55 102 28 145 4 0 1342 0 160 327 23 0 0 10 277 0 53 0 1581 0 0 20 2643 0 0 338 0 592 0 0 0 648 0 0 0 0 0 196 2273 156 15 1911 0 0 192 4379 195 0 101 0 0 0 275 4 1619 166 26 0 0 0 0 0 1 0 183 4596 105 0 - 0 0 0 0 1 225 0 9 1 0 0 0 0 0 0 0 0 0 0 0 0 203 0 31 7 31 0 72 0 1 2 282 0 0 0 1 213 5 0 0 0 2 3 0 0 103 17 0 35 0 0 0 5 0 2861 1 19 0 141 0 0 0 1781 11 2 1 944 2199 2 1 0 0 0 0 69 3 0 0 0 15 233 1 0 0 2388 4 0 2679 0 0 133 8 0 0 0 311 0 142 0 4872 0 338 0 66 0 0 0 0 3230 0 0 0 3 2 0 5632 0 15 0 0 0 0 0 2352 2095 11 20 0 0 782 1980 0 0 0 657 0 0 4 0 12 298 0 0 483 0 0 3132 23 0 339 - 1 1 5 0 1 0 0 262 0 0 9 0 0 171 1650 0 0 0 69 0 0 33 0 0 238 0 1481 368 0 57 0 1 0 0 137 2 0 26 20 0 0 0 3 0 189 0 188 0 0 0 0 6 0 0 0 3 0 0 76 4731 683 0 0 0 0 0 50 0 7472 0 7 6 7912 47 0 0 0 874 1 31 99 0 0 0 2422 0 0 0 0 0 4 0 2843 1233 3 0 0 8 0 148 85 0 3 510 1 0 0 0 4826 0 0 0 0 0 1 3242 0 0 0 3306 0 0 0 4104 0 0 1390 0 0 0 1356 0 0 4 6793 0 0 0 14 0 0 3 0 0 384 5 0 1 0 78 - 1 4 785 223 439 0 0 121 0 0 0 0 0 0 106 0 0 13 0 0 713 1 0 0 0 0 0 746 0 0 437 29 0 0 0 0 0 32 0 0 0 7517 1 0 0 0 0 0 5 107 0 7787 2 302 762 0 0 0 0 10 276 0 94 0 0 0 0 0 0 0 0 1 0 0 15 0 0 7 0 0 0 0 18 0 0 0 0 0 0 0 1723 0 0 0 6730 0 0 0 0 4 0 0 0 0 0 0 48 0 0 0 0 0 3 247 3218 0 5 7048 0 15 259 656 2 4 1894 0 1 259 0 52 0 0 0 0 1449 0 0 1073 0 36 53 0 0 0 0 0 29 0 4781 773 - 0 21 0 1 1 0 0 0 76 0 0 1743 705 6 0 77 0 1496 0 3384 0 5152 4349 6 5 0 491 0 0 0 11 0 85 0 0 68 64 0 0 0 6381 0 0 76 0 0 0 0 0 1129 0 0 64 5908 6 0 0 2480 0 37 307 0 350 3 0 37 0 0 1 0 14 75 77 27 0 0 0 47 0 10 1054 0 0 0 5 0 0 0 2 0 18 0 0 0 0 0 3 2 0 4575 0 1705 0 0 0 0 0 9 0 238 0 431 0 0 0 0 0 0 0 0 11 0 375 0 0 0 0 6 0 0 0 10 10 0 31 0 2192 0 0 38 2 0 0 0 0 0 0 0 0 58 - 0 5 0 0 0 0 0 0 0 45 0 0 0 0 0 0 18 1194 0 0 0 0 19 1182 1 1 4798 5 5413 288 5 0 0 0 37 0 0 0 0 0 3 149 0 0 0 0 0 0 0 681 1928 0 352 0 148 125 2 0 0 0 0 0 1 0 0 0 1 489 4 3 0 1 0 0 0 0 9 206 0 0 205 0 0 298 0 1217 0 2224 0 0 0 0 1 0 0 1 17 158 0 0 9 1 0 0 6314 0 82 0 0 0 0 0 87 0 94 0 1 0 0 240 0 0 0 0 0 5 58 0 106 0 70 0 120 0 455 1 0 0 0 0 536 1 0 3 111 0 24 2 2000 6127 - 0 817 0 0 1048 0 26 296 363 5 0 0 4808 0 0 283 3496 73 0 0 2 0 0 2639 0 3 148 0 3 0 0 0 1267 0 0 0 5 24 0 29 0 0 1411 0 0 0 349 0 0 17 0 107 0 0 0 0 1 6507 0 0 1085 0 1 0 0 4262 0 0 11 6 2 10 32 1895 0 226 0 0 0 0 0 0 1 614 1 0 0 0 1629 0 0 1 44 0 0 0 0 1 0 0 1204 28 0 0 1979 0 0 4685 0 56 22 0 0 0 0 1 100 230 0 0 0 1 0 0 55 1031 24 0 0 0 0 0 7 0 0 118 0 28 0 485 3 0 0 0 230 1244 1 4 0 0 - 2 0 0 0 62 1619 3 0 0 0 0 0 0 526 1 3703 17 0 2 0 101 0 15 15 0 0 4451 0 0 0 0 118 301 2 107 2 0 2 14 52 208 16 0 0 0 319 0 0 0 2663 2758 2 307 0 11 13 76 5342 34 0 0 0 0 0 11 0 2531 1292 0 0 60 24 0 0 0 0 5370 5 0 0 0 0 0 0 0 170 0 3 0 0 0 2 5 0 0 946 0 0 482 252 0 0 0 18 159 0 0 0 0 1 0 509 0 0 3 0 0 0 6006 0 0 0 377 1053 0 0 0 0 1 0 5 1 6 0 0 3564 1 0 0 3 3 0 0 337 419 8 1 1 15 0 - 0 958 699 1 0 0 0 0 1 0 0 0 0 0 0 394 0 11 0 0 18 0 0 5523 0 0 0 36 0 14 0 0 0 0 0 128 0 340 0 0 318 0 0 0 0 0 1892 1384 10 0 3141 5842 0 4288 141 0 0 729 0 2507 0 1034 206 33 19 0 1 93 0 0 0 0 1 0 58 0 122 1 2007 4708 0 10 24 173 0 0 153 30 0 0 0 6 0 0 1157 0 0 5 0 2698 555 0 4776 0 4 166 642 0 0 1 1357 105 0 0 37 2 394 1086 0 0 0 0 743 0 5701 0 0 0 0 7117 363 0 0 4415 0 0 718 3 0 0 0 0 147 0 217 0 0 5 0 0 - 2266 0 0 66 0 0 0 121 63 3213 0 9 0 118 6952 5150 40 2772 1 17 615 0 2 3782 777 0 0 417 1 5 0 6853 0 0 4 627 0 0 0 3331 1199 0 383 1678 0 0 0 0 0 0 0 0 0 268 0 1 29 0 0 7 1345 0 2876 24 0 0 94 0 0 0 2 328 257 18 1068 0 195 39 0 87 0 5 1 0 84 4075 2877 548 0 2 12 201 0 2 1775 6210 26 0 4 0 0 0 1 0 260 2 0 0 0 460 27 0 7294 4 0 0 6228 6486 1135 1 1 0 2476 0 0 926 0 9 19 0 0 0 0 1 0 0 0 0 8 1 0 0 0 0 0 0 0 659 0 0 - 6 11 1 135 0 0 0 0 0 0 27 0 1 0 0 0 0 0 5 61 0 0 0 0 0 576 5284 0 0 0 4 6164 0 0 0 0 541 0 0 0 3782 412 47 0 6157 0 0 112 0 17 1 0 16 0 337 6 221 11 6041 6 0 0 0 0 0 0 4660 0 614 8 2 34 0 0 0 0 2 0 295 0 144 33 0 0 592 1341 1 0 0 0 0 0 0 0 0 401 31 112 1762 0 0 0 790 40 0 1 1606 0 0 0 0 18 554 474 0 37 0 459 0 23 1 0 0 48 1585 0 0 0 2 0 5 0 0 0 0 0 73 0 0 1750 0 0 14 5892 1 0 3333 0 19 0 - 1114 0 0 0 0 4727 0 0 22 0 0 0 0 2 137 0 275 19 1455 0 0 3633 0 0 0 0 0 3 227 0 0 0 1971 3895 0 238 0 0 1 4743 742 0 0 1 0 0 28 0 0 0 450 0 0 0 0 0 0 697 5 1 5977 0 1642 0 0 1 2 0 0 0 0 167 0 1 0 664 0 0 22 12 1 895 38 0 188 190 0 91 1 20 829 0 0 1 0 0 0 65 628 2 0 0 26 2226 1741 0 727 10 7 2762 11 0 0 0 0 115 10 0 1 0 0 8 0 2913 0 63 0 0 5976 0 1 0 0 0 253 0 0 77 0 0 132 86 0 4489 308 0 1026 1 1 0 - 0 53 0 0 0 0 0 0 0 0 70 0 0 0 1337 57 0 0 198 105 191 0 0 0 0 14 3830 0 0 148 0 0 0 0 0 0 661 1183 154 0 9 0 461 0 0 3 0 43 0 0 0 0 0 33 0 0 13 0 0 0 78 352 1791 5116 0 24 4 336 0 0 2 2 5749 346 0 0 0 0 0 0 0 8 516 0 463 0 0 24 0 0 0 0 0 15 5 6 0 0 17 4 0 96 0 0 0 0 2 5 6 0 0 22 1 0 0 12 10 1243 67 0 0 0 1 0 2584 1582 0 0 3 9 124 0 510 2 0 1 3 1081 0 1 0 0 0 2262 0 0 69 0 4095 1 - 58 0 0 0 0 0 0 0 0 0 0 0 61 1 101 5810 620 0 61 0 31 0 0 5 0 1874 0 0 0 0 0 1 0 0 0 0 0 0 337 0 9 0 6955 0 254 15 0 39 0 35 0 0 0 5 2838 2 1 0 122 0 0 0 0 1 0 0 1 2 222 0 0 0 0 230 0 31 53 63 0 1 2073 0 0 0 0 0 0 2 1 30 2 0 0 0 0 0 3146 0 0 1 3526 0 0 0 0 0 798 0 4648 0 0 691 0 4 4355 4 0 3881 1 0 1 3 526 9 0 38 7031 0 0 0 0 0 1 5639 0 1551 0 0 1928 0 0 0 0 0 0 36 44 78 0 1 - 0 322 813 7714 0 1 0 4 374 237 0 0 0 0 86 0 0 1 0 0 1 57 0 0 0 7914 1691 572 14 1 364 0 0 0 0 0 100 0 0 0 0 17 6718 33 0 0 0 0 0 0 0 3993 0 0 7593 0 143 0 0 1 7 0 0 1 230 0 0 48 12 0 143 625 6213 0 0 61 0 42 37 0 0 10 543 1 0 0 548 20 0 1 0 1 2302 0 0 0 0 0 422 0 0 23 0 0 0 384 229 2881 0 0 0 29 1285 0 3 48 45 185 0 0 68 0 0 0 74 1 0 0 0 0 0 113 35 23 0 10 0 121 99 1166 0 26 0 1238 1479 154 0 6 0 438 - 0 0 69 0 3 0 0 1 39 3 0 990 0 3409 3 0 1 1 163 0 0 198 0 1 61 1 0 0 0 1 0 38 0 0 0 267 7619 1362 0 1 0 0 5 92 584 4188 139 0 4132 0 2 2638 1 6871 0 0 0 0 49 0 0 0 1 6589 0 0 0 0 101 60 0 154 7 0 0 2849 0 708 6 0 0 125 0 7 0 0 0 64 854 4856 138 0 0 3962 0 488 3 0 0 2 0 0 0 0 0 0 0 218 0 289 1 0 5 0 56 570 0 0 0 42 11 160 0 1396 5 0 0 1155 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 1 0 0 0 0 - 0 0 0 6098 211 0 7 5405 2 2 0 265 0 10 0 0 257 0 0 434 8 2393 0 0 468 0 1 0 138 0 74 2357 0 0 0 0 7 0 0 630 22 0 0 88 1377 0 0 0 194 0 0 0 0 0 0 0 6 9 0 416 0 0 0 24 0 258 0 598 0 0 59 5 0 0 20 0 0 3662 0 0 0 1 0 1 105 22 0 0 1 878 440 82 0 40 0 0 0 20 7 399 0 0 0 471 230 0 3403 0 411 0 0 0 0 54 2 0 0 1052 0 0 0 0 1495 184 6425 8 45 0 0 0 130 7707 13 0 197 2288 237 4821 0 0 0 166 0 0 0 129 3 0 1 11 - 0 2874 0 0 3646 627 2404 18 174 6188 0 1 0 0 7480 193 6 0 0 0 7597 19 0 0 0 0 91 10 0 0 355 0 0 103 0 152 1 0 180 0 403 0 4947 0 0 0 0 0 402 207 0 2 0 1 0 1235 1 0 0 0 0 1 0 0 0 176 4571 1 96 0 0 0 75 0 0 0 0 0 29 0 0 1002 6999 0 0 0 2363 1 1 0 2485 0 1 0 328 65 0 0 0 8 0 773 0 0 0 0 61 0 1130 0 0 0 0 0 0 1 25 2849 0 0 17 0 48 0 0 7 0 0 2 538 0 32 1811 0 118 0 7162 4 0 2 1 0 0 0 0 0 0 3 52 0 - 0 623 0 0 95 0 2631 0 4442 8 0 0 0 0 0 0 3376 0 0 0 0 0 0 4983 2 0 53 0 72 0 0 0 4 0 0 0 0 5 0 0 1136 0 0 8 0 3 0 252 1860 0 13 0 0 0 2 0 0 0 88 0 0 1 0 0 0 0 1 0 0 522 0 822 0 0 0 1 0 36 0 0 0 15 0 2 0 0 0 0 0 5778 2 587 0 865 0 0 0 8 1843 0 3208 0 0 0 0 16 0 1 0 4 40 2 117 0 0 0 5487 0 348 1 0 11 5 1 53 0 120 2 0 0 0 23 63 7 0 1175 246 0 2 70 0 0 0 0 3847 2259 0 113 1446 0 - 13 0 0 870 0 0 0 0 13 34 0 14 0 0 0 0 0 1 647 0 2 0 19 31 41 761 0 14 0 116 0 6 0 260 0 1315 136 1 125 31 2074 2316 0 1 0 5 8 0 0 0 0 0 0 94 0 0 0 0 440 19 293 0 0 17 336 0 1 0 0 0 0 0 0 3732 12 0 0 0 473 0 0 0 0 4513 121 0 0 0 0 2752 1875 172 0 0 1 11 0 848 4 0 0 0 2424 1313 0 1 129 11 24 0 12 0 0 7 0 0 8 0 3485 0 0 0 0 0 4700 249 2 0 0 3 0 3 0 0 0 0 221 583 0 1240 0 0 3 3 0 4 0 4255 338 1383 - 0 43 0 395 71 1 42 0 0 167 1 0 0 1012 4 0 192 0 0 0 0 5283 0 0 0 0 37 2003 0 0 1 0 0 9 0 0 7 20 0 2 0 0 35 0 0 0 4720 0 0 0 2 0 14 356 75 5 9 887 2 0 0 4 4453 6 25 2 0 0 0 2 4 0 0 131 0 0 15 0 0 6 50 201 0 1685 0 0 0 0 7203 0 0 0 0 0 0 1 1 0 1 0 1 0 6666 139 0 3 2872 0 1964 0 15 2182 111 0 0 3584 789 0 4059 2451 2 1 49 0 5634 0 0 3864 0 0 0 0 0 0 0 0 0 44 1 1468 47 7 1 3285 0 1 2762 43 0 0 - 0 2 0 561 0 0 0 0 611 2 20 0 0 1523 1597 0 24 1 110 0 0 0 1375 6695 0 0 111 0 0 0 0 0 3218 0 4 271 80 0 0 5480 0 122 2 214 0 5433 6 0 11 0 0 0 0 0 2 0 4 0 809 0 0 0 0 274 0 0 11 4 0 0 0 0 1523 0 0 0 0 0 0 4 0 0 0 23 420 0 0 646 0 0 726 0 0 937 0 2 0 2 0 19 0 5785 1 0 222 0 0 2 0 0 0 3611 0 20 33 0 0 0 1 0 0 3 0 3 30 0 0 0 2 34 353 0 31 9 0 36 0 109 37 0 0 6726 11 77 2 18 201 831 1845 3 - 1 0 1 2 6 0 0 1 50 3 0 1 113 0 0 0 0 0 0 3 388 1163 0 0 0 0 7 1 0 1699 0 0 21 0 0 0 0 3316 0 0 5 278 83 5 0 0 2 0 0 0 0 0 0 1 0 5 0 0 0 3 1 21 0 5 612 6207 0 4224 0 0 69 237 0 0 0 0 0 313 1774 0 0 5310 0 3025 0 0 0 602 0 1 0 0 0 16 0 0 32 3 0 419 0 0 361 1156 0 16 4 18 1 3 0 0 4 51 0 0 0 0 0 2845 0 0 0 0 4 0 0 200 0 2 37 276 0 0 2976 40 3571 1813 3945 0 206 0 0 6835 2989 0 0 5029 2 1 - 0 0 0 10 819 4 0 0 0 0 110 1 6319 0 0 203 0 0 15 0 0 22 0 1418 0 5 0 0 3 0 0 0 0 1 60 32 0 0 0 0 0 0 0 0 38 43 20 0 679 26 0 0 70 18 0 0 63 5 20 0 3365 3 0 2500 11 0 1 1 0 5344 0 0 0 0 0 0 119 0 0 14 0 4 13 0 4374 0 0 1739 0 0 0 3 0 0 76 103 40 1479 5 0 579 0 50 3902 109 0 199 0 0 0 149 0 0 997 3903 1004 388 17 0 0 371 0 0 1 0 0 4 2599 0 1 1732 0 48 1 75 2296 0 9 1 1 0 1 84 5534 27 6 4022 134 4 0 - 0 0 295 0 3858 0 0 0 4 0 0 0 0 2 426 0 0 2363 0 0 3 1323 5 458 36 0 697 163 1956 0 0 2 3 0 0 647 0 0 381 0 920 0 0 227 0 10 323 0 213 0 0 0 0 0 364 6594 0 411 11 0 0 2 55 0 135 1 6 1 77 238 175 7 0 4 0 0 0 0 1 1 0 2129 0 0 0 7390 1 0 81 37 5 12 2415 0 0 2964 1 0 102 10 0 31 0 0 0 0 2 28 0 0 0 5073 0 0 0 536 0 0 0 0 157 0 0 0 0 0 0 0 106 0 0 0 0 0 0 0 0 49 0 0 88 0 0 0 0 0 62 0 0 0 - 83 0 8 202 0 0 0 9 9 0 0 0 0 509 0 0 8 0 9 0 45 0 0 585 2 0 0 4 0 4 6 1 108 26 0 0 0 26 0 1843 75 675 4830 74 78 123 0 0 0 1 17 0 0 1490 0 0 0 108 17 0 0 0 0 1256 0 12 72 1010 484 0 0 11 0 71 5 1 12 0 17 1084 0 618 0 0 33 1 1756 46 0 0 0 0 1157 3385 0 0 0 178 950 0 91 0 0 0 1 5 2 25 48 0 1 0 122 0 199 177 0 1071 0 3109 0 0 423 0 0 0 0 0 0 0 0 0 464 0 0 11 0 1403 0 5 0 1574 0 34 0 2922 6 0 0 1 - 0 0 0 0 0 4273 0 0 0 7538 151 0 1 166 0 0 0 0 211 0 0 0 6 0 621 1424 1 115 1 5057 48 0 1 17 2815 0 0 0 0 3 0 7 1 0 0 0 63 7 0 7630 0 54 2 2269 0 0 1 0 0 0 784 3692 0 1147 0 0 6 0 2 0 0 0 2 0 35 49 0 0 0 212 0 0 0 0 87 0 0 0 0 35 2 0 6593 0 10 3771 1 224 0 0 6157 0 909 0 0 85 4 2779 0 5502 0 0 123 2982 0 12 18 0 3 196 3 0 5 0 0 0 1821 1 0 0 0 0 891 491 0 42 2 0 1 107 152 2634 0 1 0 16 0 0 494 0 - 0 0 2 827 3 436 0 326 129 13 0 0 0 0 0 0 0 0 42 1404 81 0 0 0 3 2 0 0 220 0 2 4591 4099 0 0 686 0 363 0 0 0 3 0 0 8 10 2 0 3 22 0 7 20 9 1 0 166 2165 69 7015 259 83 97 0 0 0 1 122 45 654 0 0 0 31 13 0 0 2 61 0 0 0 0 0 2946 0 0 0 1 0 1434 4591 3155 0 0 0 0 0 0 0 0 235 2 0 0 0 0 0 0 0 54 0 1 0 1647 24 0 0 0 9 2185 8 0 46 44 4004 0 0 74 861 1793 1 0 0 5902 673 395 0 0 0 2932 0 153 0 220 0 4 7 0 0 - 676 3355 0 0 2740 1 0 20 6671 0 0 1 13 1990 0 0 128 5 9 10 0 2 0 0 2 22 5 130 0 0 0 0 0 0 58 122 0 27 2546 7 0 0 0 0 2 5556 16 5360 0 30 2 2 0 0 0 2 0 0 10 16 0 0 1300 308 0 0 922 58 18 42 166 0 1 145 4205 277 2 23 1 0 0 9 1 0 0 2480 2 0 0 2 0 0 0 1 488 0 699 100 0 0 0 0 0 31 1153 2 5336 570 5 815 772 0 158 983 40 2 0 0 29 0 0 1 0 1527 6175 0 8 1551 42 0 0 0 2774 4142 0 289 26 1 0 0 0 0 0 107 0 0 0 0 0 0 - 505 0 9 238 418 0 0 6 0 3551 146 0 30 0 0 0 298 4795 0 9 0 10 0 0 7 791 3326 5 0 9 0 13 0 5562 0 0 2 0 0 0 0 0 23 0 0 0 72 1 4 296 0 2 0 0 0 91 0 2 38 0 7133 0 0 0 0 0 26 24 0 40 392 0 0 0 0 0 0 0 0 0 1306 0 1 104 0 0 0 0 3 0 58 1 1435 20 1281 81 2 1008 0 160 0 0 8 0 0 219 0 0 692 0 0 0 0 42 7034 3537 6 1 0 0 5437 0 0 0 3902 35 30 2484 2 3 2 0 94 136 1 0 53 16 7 0 0 0 0 0 39 8 3 7 115 0 - 9 5 462 53 0 1165 0 29 0 0 0 0 0 0 2 0 0 0 197 0 164 151 0 0 167 2088 0 0 0 0 0 330 0 314 0 0 0 7084 0 0 1 0 130 19 0 1 2 0 67 0 0 0 147 2 0 4709 0 0 0 19 0 0 0 0 0 1 0 0 268 13 60 5432 0 4400 0 0 0 38 0 0 0 0 0 3 0 22 0 0 0 0 0 0 0 0 0 1 19 0 0 559 0 0 0 4 16 0 8 10 0 485 22 5471 1337 0 0 0 0 0 103 0 0 0 0 989 291 81 105 0 78 2670 0 0 0 4 0 76 1551 0 6969 53 0 0 1906 0 0 1324 1053 0 0 0 - 0 0 0 0 0 1830 0 14 0 0 0 56 0 0 6154 255 0 159 1 0 3 0 12 85 0 1 8 2367 327 9 113 0 61 0 2 0 1 0 0 0 0 3 0 28 0 0 0 0 0 0 0 0 0 0 9 11 13 2160 0 216 0 0 6172 0 0 0 267 0 2 0 0 0 0 3 2082 208 0 22 0 0 134 95 34 0 0 0 48 0 1 0 0 6829 0 1771 0 39 15 0 0 2158 0 129 0 63 0 2875 0 822 89 0 0 9 0 851 0 0 1 0 351 154 53 0 1296 0 0 0 0 0 0 0 4 6 0 621 2 0 115 0 0 0 0 0 0 0 0 1802 0 0 0 0 - 493 6 1229 0 399 0 0 2 0 0 0 0 0 947 0 1 17 0 0 0 0 0 0 0 0 0 1 0 1 1528 3 0 0 0 0 0 0 0 0 0 1 0 55 0 0 0 1 11 0 0 6 111 0 0 6507 0 0 0 0 2 0 0 0 3 0 0 3999 0 1630 1136 5645 116 316 23 83 0 4 281 0 0 6223 0 0 312 0 0 0 3 30 26 0 0 0 2351 5 0 148 7499 74 1868 0 0 0 0 5 4 0 6 93 0 5016 0 0 0 0 0 10 3 9 0 20 0 0 0 1205 5693 0 0 0 0 0 42 13 0 0 0 0 0 0 3673 0 0 0 0 1 0 1955 1 0 0 - 0 1 0 0 0 0 0 32 0 0 0 0 1 367 2 0 5647 0 0 0 0 0 833 9 0 0 2 16 124 306 0 0 0 0 1 0 3 1 0 1 0 0 214 4 4916 0 38 19 0 0 0 3 0 0 0 0 1 0 0 0 0 0 0 0 0 0 13 0 0 75 0 0 0 263 0 0 213 0 0 5 0 442 6 7196 0 0 1 340 5 0 113 0 2 0 5829 0 0 0 661 68 5 0 0 11 0 0 110 1053 6466 1 347 0 0 1792 0 3193 4 0 0 0 0 2 0 0 77 44 7 1 0 62 2 0 0 1 0 0 151 0 3274 3 0 0 0 386 0 0 2289 0 87 0 - 10 6753 29 0 3 0 2 0 40 117 5 0 20 85 0 0 0 0 1 0 0 753 0 1736 0 0 30 29 0 4 53 0 0 184 0 0 818 5428 398 0 4021 2 0 5244 1 0 0 0 1 3522 1 0 1574 0 3371 0 0 0 0 0 0 0 1 0 0 6 0 0 0 3 0 352 0 95 0 0 0 0 3702 0 0 0 0 0 0 0 0 6 2 0 43 0 1 0 0 30 108 4840 0 0 0 1 0 0 0 50 0 0 2 16 0 3 2 101 58 0 0 0 0 117 125 1 0 1402 3 0 13 4 0 0 6820 0 0 0 0 980 1845 2 0 481 1 0 5 10 0 0 0 0 0 0 - 0 210 0 0 1 0 125 0 2 775 1 0 243 2 2 45 1 0 0 0 0 0 395 14 0 0 1172 77 0 0 0 0 0 0 2 0 1738 0 0 0 2002 56 2 0 6 1310 8 0 0 19 0 0 151 574 0 0 5 69 69 20 0 0 0 0 0 3 1539 2715 35 0 0 0 0 1156 0 0 3 0 0 136 3170 0 0 0 0 0 11 0 0 2 0 0 57 18 709 4 474 136 0 0 1 0 3 76 0 27 0 0 1873 204 3465 1594 9 5 0 400 0 1798 36 3426 0 0 2 0 1 0 112 2439 277 307 0 37 0 0 140 3 0 0 19 0 0 3365 13 93 0 2632 444 478 0 0 - 0 7361 1 0 0 0 0 0 2 2 6 0 0 0 1 0 0 4352 0 0 0 0 12 0 0 0 0 3259 0 42 0 0 0 4098 0 0 5 0 0 0 0 89 5291 0 0 124 38 0 34 0 55 0 0 0 0 1 486 0 0 0 7374 4478 484 222 0 1154 423 0 0 0 4 0 0 0 3373 0 0 0 18 0 0 0 0 0 99 0 1303 16 0 843 1143 19 0 0 0 16 0 0 53 166 2926 1739 0 8 6 0 1937 1 0 0 0 0 2432 1 0 0 96 0 0 41 0 4 0 77 16 83 0 32 0 1266 0 1632 0 0 600 155 511 1 0 0 0 0 253 0 35 0 0 74 1 0 - 0 0 0 1 0 0 984 0 0 0 14 0 94 1 0 6458 7 0 0 1 17 0 4218 0 0 0 0 0 0 49 0 0 4 0 0 0 0 0 0 36 0 44 13 0 0 105 8 1106 117 0 0 4 63 1 0 0 0 1660 2 1 0 0 1 141 0 1448 0 273 8 0 139 0 0 0 12 0 7986 893 0 0 0 50 0 3528 5 0 5217 3 0 0 0 747 2 99 0 0 0 17 94 3 0 777 4 0 1069 1 0 1 0 296 0 0 39 104 391 0 103 0 0 0 3 488 0 1 3 0 3 1 19 0 0 64 0 0 1 0 0 47 326 0 577 0 7 2820 0 0 10 4 0 134 - 0 1684 334 5728 3200 0 5 0 0 0 2 0 2052 38 0 0 856 1 0 0 0 18 0 0 0 7 0 0 0 0 6 0 110 5063 19 0 0 6 0 0 3659 1 0 0 0 0 279 0 0 73 2 0 5274 1895 0 0 99 0 20 0 7 0 1 20 0 529 6757 0 10 0 0 1 2 0 0 0 1 4725 0 0 29 1 16 30 0 11 40 0 1 0 0 0 0 0 319 32 1 0 0 0 0 300 0 0 0 0 0 833 0 0 0 1 0 0 0 2 0 0 0 0 11 0 0 0 0 0 259 4 0 19 0 16 5417 0 62 0 0 0 1 16 1 0 4 0 0 0 270 3237 4817 5 - 0 573 2 0 0 0 0 13 0 0 0 0 70 1597 0 4407 21 0 0 0 0 0 0 0 11 389 2 5 3 0 0 0 1 3235 1 523 0 0 4627 4437 1114 0 0 0 0 0 1 0 0 2 1 0 3543 0 0 0 0 0 0 0 0 1 951 0 0 0 0 2702 0 1064 5 0 0 7121 0 124 0 0 285 0 0 0 0 0 4150 52 459 0 0 0 6639 0 69 0 0 0 999 0 0 318 325 0 45 0 0 1 16 0 90 0 9 718 2 61 18 0 41 0 23 0 0 13 287 0 1118 265 0 0 163 47 0 0 46 21 0 0 0 28 626 0 0 0 0 0 133 21 1 0 1576 1356 - 0 0 28 0 1 6116 0 1 4794 0 149 0 1 1187 0 1 0 45 339 0 0 0 0 0 0 88 0 4219 0 0 130 28 0 22 0 0 5991 0 0 0 0 359 0 0 0 0 1 0 49 0 2 0 610 0 1 0 1136 3136 25 0 938 1533 0 0 0 0 0 14 4708 0 164 0 2 0 0 40 0 103 13 0 0 18 621 0 0 14 0 0 670 0 2 5 0 2093 260 0 0 14 0 4 284 0 1797 0 0 0 0 153 0 0 0 0 0 302 0 1620 0 0 0 0 46 0 2367 859 584 0 0 5 0 3 0 94 1785 0 0 0 4 0 0 0 0 582 0 0 0 1 0 629 0 90 - 0 0 0 105 0 0 2 568 0 0 0 0 0 7938 0 3696 0 1 0 6 124 1 478 1263 0 0 1 2474 18 0 0 1 0 0 28 0 19 3870 0 0 1030 0 0 1073 0 89 0 18 34 22 0 0 0 0 947 25 0 0 0 0 1 0 0 0 297 0 0 62 24 0 530 0 12 0 1 0 0 1 25 0 0 2 129 0 2596 0 5064 269 22 0 0 0 0 0 0 384 0 1665 0 0 1 15 106 0 0 0 0 0 0 0 0 6 0 0 624 0 0 0 1 0 8059 113 2796 0 0 0 0 0 189 0 0 0 1442 0 0 0 980 0 1 2 64 1 7691 0 0 1844 0 34 0 0 - 1 0 0 0 0 1 982 0 6 7007 1702 227 0 0 3 0 0 0 0 1131 2 1 0 1 2 53 0 0 0 4 0 3 0 0 98 0 276 0 3964 17 0 0 0 0 0 2 0 0 0 1 0 0 11 2 0 0 17 0 0 0 0 21 1 25 21 3363 0 0 0 0 0 0 175 0 2 10 41 0 39 1 0 128 2992 2843 1110 0 13 396 0 3 0 0 0 0 0 0 0 0 0 17 0 0 100 3891 3 0 6060 0 62 0 0 50 0 0 23 44 5 0 1365 0 0 3446 35 106 0 15 4 9 3988 0 0 1 1 0 4 53 3946 0 0 0 0 0 0 0 706 0 1 25 1 4225 - 0 0 116 3195 0 0 0 0 674 0 10 0 0 0 97 0 0 2 88 0 0 0 3 0 2 9 0 42 266 1 1 0 0 0 106 0 0 7744 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 7218 1 0 44 16 8 0 1 0 51 0 2755 247 7672 0 0 101 0 101 0 0 0 0 0 1146 0 0 5046 0 25 0 0 1 0 4521 0 822 158 1091 0 1340 0 19 0 104 0 0 726 5369 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 5274 906 0 0 0 0 0 0 30 0 0 0 1 0 301 0 1797 0 0 2 0 0 0 0 - 5 0 0 0 11 0 0 0 0 0 0 0 0 0 0 2 1 0 0 5458 0 0 0 3464 580 3413 0 0 0 2 1419 328 0 2 0 0 40 46 33 0 0 7 0 0 0 1860 0 2390 0 0 2582 0 1 0 0 771 5838 1 0 0 0 0 0 279 2 4326 0 0 1 30 1 0 2 0 0 1 0 19 0 0 1 2 2540 25 422 5 2111 1 0 0 0 116 0 0 0 1 0 0 118 0 44 0 0 0 0 6619 0 0 302 109 0 3 40 1 0 1723 0 1684 216 0 0 0 0 0 524 2 1 43 41 0 3926 0 0 98 0 2340 0 0 0 0 0 0 0 0 0 1 0 106 0 115 - 0 0 0 1 17 0 8 0 0 5 0 81 0 1729 2055 0 0 43 1283 631 0 0 0 0 0 0 228 1 0 42 0 0 326 4496 0 0 1 2 0 6 2 46 7 1 2 0 0 0 0 2387 0 0 34 0 0 0 3 6 1896 0 1538 0 43 15 264 0 0 0 0 0 0 0 0 0 1214 0 25 0 0 0 42 0 0 488 0 0 0 0 530 0 2 2 0 39 0 0 0 0 0 80 124 0 864 0 18 487 1 0 0 0 0 0 0 0 35 0 7247 26 0 146 10 2481 100 0 0 0 0 4 7134 3 1 0 0 0 0 0 0 0 5931 4 1 0 0 0 0 0 99 15 0 1237 - 0 0 2 0 0 0 85 0 0 1 316 0 0 0 48 817 1 0 0 0 0 1252 1 0 2205 259 2428 0 0 0 1149 0 0 0 2343 0 1 476 10 1008 0 0 0 1 0 0 0 2 186 0 54 383 0 0 0 814 0 0 0 1860 1 14 0 207 4 0 2 0 1395 1262 0 0 2 7 2 1 5 0 0 2 62 0 6667 5439 0 0 0 0 727 0 147 0 0 0 25 0 0 189 0 0 28 0 70 0 0 0 0 0 2001 4 1902 601 0 1 34 0 0 0 0 3 1 0 133 190 880 1 0 0 0 0 0 557 0 0 0 0 322 3 0 154 0 0 8 749 0 0 0 374 0 0 - 5925 54 8 0 0 901 0 0 29 0 0 0 30 0 2 0 45 0 20 295 2 0 0 5 2873 3966 0 0 68 18 0 0 887 42 0 0 3213 0 0 342 0 0 15 152 0 0 123 259 0 0 52 0 14 0 2587 12 0 0 0 4685 0 0 0 0 0 0 28 210 1 0 0 0 0 0 5085 7760 7004 5 1 158 0 0 467 0 195 3 0 4 0 1713 5873 0 44 4161 76 0 1867 0 535 0 0 38 0 344 6 0 0 0 15 5240 0 3933 58 60 1292 1 2085 231 28 0 0 4382 0 0 5 2 0 145 8 0 2 684 0 1 0 0 0 0 155 0 1283 0 7077 0 2 0 0 0 667 0 - 3293 0 0 245 42 0 0 1 2958 0 0 0 0 0 21 0 0 0 0 5518 0 2 0 2 287 237 2619 0 0 30 10 0 0 0 0 0 0 80 39 13 0 3991 4964 7 0 0 0 955 4 1 32 5142 0 0 0 4 0 0 0 68 0 0 0 5 0 0 0 3534 0 3730 0 0 0 180 0 1592 83 30 220 1 61 530 102 0 457 959 0 212 0 1 3771 2 0 0 0 0 114 1 0 0 0 0 0 0 29 0 0 144 0 1023 3 17 0 367 4 0 0 0 3 0 398 0 3783 0 0 0 0 0 48 0 0 128 0 0 3 0 73 0 24 1486 0 1 0 1642 0 272 0 0 1437 1 - 52 956 0 0 0 3 1 3187 0 1788 2 0 0 0 170 0 0 0 1066 1 11 0 3 0 0 0 0 0 0 2161 0 63 686 0 0 0 0 0 401 0 1 6941 20 0 0 0 0 0 2647 0 9 0 0 15 0 0 0 54 0 0 2 9 0 0 0 0 0 2 0 6 0 2180 503 0 0 0 2049 76 17 0 38 0 0 0 0 1 0 0 4955 0 766 0 195 474 0 1 0 11 898 0 0 0 4820 0 0 0 0 0 0 4 0 656 0 177 29 0 94 0 0 17 66 75 0 1010 0 0 18 0 527 0 0 1 23 0 7 0 0 5 0 0 0 1 1472 99 176 0 0 0 0 4 - 6018 14 0 127 284 3671 0 830 0 0 516 0 4 5 6 75 3 0 145 0 0 0 106 0 0 0 187 2496 0 0 0 0 0 665 0 0 1 19 2 0 0 0 1 0 0 0 0 0 0 1 13 0 226 0 0 23 0 3402 0 0 4 0 0 0 0 3 0 3 0 2 0 558 0 134 0 531 7560 0 5654 0 281 43 0 0 202 0 3 0 0 0 0 2 0 3 0 0 8 151 0 5 4 0 0 0 0 320 0 2411 5573 0 1 8 0 0 6194 112 0 1159 0 0 637 0 0 0 4084 2 0 918 0 48 0 286 0 1 0 7 295 0 140 0 0 5 0 0 6 0 9 16 0 0 - 574 0 244 0 0 0 175 2 52 0 1 0 5 23 3987 0 0 0 0 0 59 1 0 0 234 0 2 5333 0 528 1504 0 1 0 0 3 0 0 0 14 0 3 0 0 0 0 181 2325 0 24 1479 310 0 0 0 0 523 1238 219 0 0 0 3 2 6 0 0 0 1 44 0 0 439 0 0 0 0 7 17 0 197 0 199 1254 0 465 1215 0 0 132 0 58 487 0 0 0 1 26 20 0 10 0 0 0 0 0 86 0 7076 0 1547 837 1 17 411 0 2202 0 0 0 0 1 0 1042 0 0 0 918 0 0 0 0 1 559 0 0 0 189 407 0 0 1288 11 0 3 0 0 9 0 3739 - 0 0 9 0 570 0 0 0 2 0 0 0 0 536 139 0 0 0 526 0 1797 0 0 0 0 0 0 0 0 92 7014 68 2 12 104 0 335 71 0 46 1012 10 1040 9 0 0 0 0 0 172 0 66 0 1 699 1 0 0 277 0 2 0 574 1323 0 0 3652 0 37 1 0 0 1 2573 31 6256 0 0 17 0 0 237 0 54 0 0 815 0 0 70 1 0 0 0 7 0 0 0 0 225 2 3 17 1 0 0 0 0 2 0 0 3515 2224 0 1 0 0 0 0 79 1 0 5 0 21 111 0 1 0 1 40 2103 2 0 1486 0 2 0 5 0 87 4 155 0 911 0 54 0 0 0 - 0 1192 4 0 0 0 4672 0 5293 16 120 4981 0 16 7 42 0 0 0 0 0 74 0 1119 0 0 21 0 4 0 0 2 199 49 0 0 0 44 1121 1 5 5 108 0 0 0 0 4535 2 0 0 25 0 0 1 5 0 0 0 137 0 0 2 3435 0 22 14 0 99 0 0 0 2609 0 0 0 0 0 27 1634 0 0 1798 27 0 0 0 0 198 0 0 684 0 0 0 0 6 395 80 158 0 67 0 0 0 0 12 262 2 0 688 0 1560 0 0 2264 38 563 2 0 4878 0 0 0 0 0 3 0 8071 4301 0 0 0 0 0 183 14 4 17 0 956 0 5 0 0 0 146 1119 0 44 - 0 0 2045 0 2 53 6 0 3 4 618 0 0 68 0 0 4 0 5 0 0 466 96 2 13 2 0 77 4 0 44 51 1 0 0 30 131 0 20 0 4 0 718 0 0 1 0 0 0 0 39 849 0 148 0 3 1 0 0 0 301 0 0 0 3103 1 0 99 0 0 0 102 0 0 185 1 0 36 0 0 1228 0 0 7 22 1 0 5262 0 0 0 0 0 1 0 0 1 6 1131 1447 1982 0 0 1707 0 2 0 7818 3 212 0 1 3 0 0 0 0 0 2770 1142 0 10 0 3 787 0 0 0 1 276 0 0 0 0 0 0 4 0 521 0 24 268 0 0 385 0 0 0 0 6 - 0 310 6440 0 0 0 0 2400 0 6745 334 26 0 468 0 0 0 0 810 3770 0 0 169 0 0 0 11 0 0 42 46 0 5 0 0 0 0 133 0 111 135 154 1361 0 6 284 214 0 0 0 21 1525 0 0 6327 4698 0 0 14 0 0 0 0 135 0 9 0 176 0 152 6 0 0 0 1 1 320 0 0 3 17 187 0 134 1163 39 0 500 0 0 0 7 104 13 4 3252 3 140 3 0 0 3090 0 0 6411 0 0 0 23 813 0 4773 3 0 15 0 3 0 0 0 4 0 0 0 0 1 0 0 2 1 6 0 1 303 770 1 0 0 1 0 0 4 0 0 0 48 0 52 0 0 - 0 90 5 80 84 12 546 7 0 8 47 0 0 4512 56 0 0 0 0 1 1 540 5 4 0 0 0 0 35 693 821 92 30 0 3 0 421 0 0 0 0 0 0 0 0 0 50 0 0 47 0 0 0 0 4 0 68 3 86 0 10 11 1 0 2 0 27 0 0 3192 0 4 5 0 62 0 680 0 0 18 128 0 967 7 3 0 31 628 10 0 0 0 4 0 412 0 0 0 0 628 0 844 8 0 0 0 25 449 0 7 16 268 15 2985 0 0 1985 1 0 0 32 52 0 0 95 205 2 0 0 3 0 4 1 0 0 582 31 0 0 0 0 417 0 5954 2 2 3022 0 0 0 - 0 115 29 202 0 0 0 0 0 3985 38 23 1 3844 0 0 0 0 0 0 0 0 0 0 11 13 0 109 0 0 0 2 7675 0 0 353 147 0 0 0 3083 215 1 0 0 1 0 0 0 0 40 0 0 0 0 0 0 0 0 2475 0 0 0 0 1 0 0 3825 0 54 0 0 0 7 36 0 0 1 1230 815 0 0 0 0 0 0 0 0 51 795 1752 0 7297 1011 1010 3200 0 6920 0 0 387 5437 0 5464 4614 261 0 20 2365 0 0 0 0 0 34 796 0 557 0 0 3 0 14 0 0 0 0 1384 8 3953 1 3258 537 0 0 0 0 0 10 716 1728 0 0 6011 896 174 0 0 0 4040 - 0 2 0 0 18 3182 6364 0 305 0 0 142 3 0 3 0 1612 0 864 0 21 0 0 0 44 0 420 0 0 0 0 7 0 0 0 0 0 11 591 65 0 1504 4 1 0 80 0 2 6 161 0 89 0 0 0 0 0 0 1 0 0 0 3 3899 0 161 0 54 1 0 0 26 42 100 0 0 17 0 11 0 0 102 0 29 14 0 6 0 5 0 8 5 5094 0 0 0 0 0 0 2738 0 5432 0 0 156 1 0 400 0 13 0 0 7186 0 0 0 2046 0 0 1 1 2 1 784 5 0 0 0 0 0 0 0 0 0 0 5 1367 0 0 0 9 9 258 5301 58 0 641 0 0 1 - 39 0 0 0 0 0 0 610 1 0 321 2 1959 0 0 1982 0 0 8 0 0 0 443 0 549 5977 0 1 0 0 1 0 0 103 3438 4665 0 425 0 1 0 0 5 2 0 0 0 0 847 0 17 2 0 167 0 1 639 0 0 3 0 0 0 0 0 0 90 0 2401 129 1025 0 5328 21 0 0 0 4519 492 6995 12 0 1 0 1 456 0 0 747 0 4130 0 0 2 206 0 0 1 0 0 3 0 5 1703 0 0 928 0 1 0 0 0 0 0 0 0 408 865 1 0 2972 7 0 0 2 8 0 48 3 392 4 104 0 420 26 0 3038 1 4647 0 1871 0 0 0 9 0 131 0 0 0 - 587 4 214 0 0 0 0 30 0 0 12 7 24 0 0 0 0 1 0 9 3884 0 9 0 0 0 0 1010 0 0 54 1 0 0 1976 0 0 1270 2231 0 13 790 0 0 0 0 7541 0 0 196 1 0 0 233 5 0 0 2 455 16 7640 0 188 0 3228 2923 5663 0 6 6551 1 0 0 0 0 4019 0 15 0 22 4245 0 0 18 0 473 0 0 7 6340 0 0 135 0 0 0 0 304 897 14 0 0 0 64 0 0 142 57 99 22 11 17 0 6 0 7 0 85 0 0 3 1 8 349 7040 1 1 0 0 0 0 0 0 0 0 4 0 0 0 196 2194 889 838 12 0 0 0 3 0 1 - 42 0 0 0 5167 0 101 0 104 0 4115 0 170 0 0 1 15 0 0 0 31 0 0 0 1491 1 0 2953 107 0 20 0 3090 0 211 0 0 0 0 1 0 0 0 0 0 0 108 0 0 0 9 2 0 0 0 0 0 2 0 0 120 564 10 5 1498 0 0 0 17 770 2124 0 0 158 0 0 264 4352 0 2136 0 143 0 0 11 0 480 0 0 0 0 5854 2 0 1 0 0 26 2 0 0 3 0 2306 174 2347 0 7272 0 1131 149 517 0 0 0 0 0 3 20 5 0 0 0 0 0 5 975 2939 0 132 0 1 495 10 0 18 1 0 551 4 0 43 0 0 215 0 0 0 1 0 - 0 3 0 934 0 0 0 0 0 0 587 0 41 0 2234 11 0 0 0 4 0 0 0 0 1978 640 0 0 0 0 1688 1 0 0 42 0 7 0 0 0 665 0 4749 566 0 0 0 9 0 0 6771 29 2116 0 0 0 0 15 1 75 0 0 1 87 0 4 0 1776 0 34 0 0 0 2167 0 0 0 0 0 0 0 8 38 0 19 0 0 1193 0 6 0 142 3428 25 24 0 3 0 0 450 167 0 0 7118 7544 0 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 120 0 25 0 0 0 2 0 0 1 948 2053 0 21 146 0 0 284 0 0 0 0 12 88 0 0 0 1 28 - 1 15 0 0 2 0 41 0 27 28 27 0 63 83 26 0 0 184 0 24 0 814 1 0 0 64 1 1 174 0 0 0 5 112 0 0 0 0 5 0 1 0 3478 120 1690 0 0 0 14 0 2688 0 1192 0 0 26 0 0 346 1 0 0 0 0 1807 0 3 0 0 0 0 0 0 0 0 4370 0 0 0 0 0 2 0 0 602 0 0 5 0 143 0 0 0 0 1 0 0 0 132 226 0 13 299 0 5232 228 510 0 2 15 4297 0 474 0 0 0 1363 0 15 1 0 0 0 48 0 1492 0 0 0 3943 138 0 20 0 0 0 896 0 0 0 0 47 0 0 0 0 422 1505 173 42 - 0 3641 40 0 0 452 10 8 911 2 1 762 0 1 0 5 0 1 0 44 0 115 10 0 0 511 10 274 0 0 788 0 0 1 2 107 25 0 0 4208 0 2313 0 2132 1555 3529 0 5 0 2 0 384 0 2 0 0 25 8 12 0 1 0 2358 118 2 133 0 0 0 1 1667 0 18 27 0 5466 0 147 0 0 81 0 0 0 2 2 0 0 0 0 70 0 2 3 62 1 81 0 0 0 73 0 0 0 0 0 4656 3 0 4 1813 0 2 630 0 1 0 3 0 0 0 12 44 0 0 0 0 0 0 0 0 0 0 0 0 416 0 21 80 0 0 0 5731 0 2 44 0 0 6 3548 - 0 2 0 1 0 0 1 1871 0 0 1 4 0 13 5009 1 380 0 1326 0 0 0 6000 0 0 177 0 0 4760 4 0 411 0 0 0 34 0 80 0 1180 0 1 0 0 8 0 0 0 0 0 565 724 0 0 6500 2 0 0 0 0 0 58 2 0 15 0 3 0 1 0 4 1686 1 64 0 0 0 0 4712 39 3971 0 0 0 0 0 0 0 0 0 4 931 36 0 0 374 0 5 0 0 0 0 163 0 695 0 0 294 0 1 3 5 2 747 0 0 1 0 0 15 0 0 59 0 6 1 0 0 0 28 0 282 0 1843 4 961 0 0 0 0 52 126 26 11 139 0 0 15 0 67 - 2 180 0 0 0 0 0 0 0 0 0 0 0 0 0 5 2 0 4189 7710 6712 0 0 0 45 0 0 0 5 0 0 785 0 0 3318 69 0 3275 380 0 0 0 0 0 0 0 881 1 2138 0 0 0 373 166 0 0 0 0 12 0 0 0 0 4639 5357 884 0 203 0 0 0 0 3 0 4087 0 5089 1 0 1332 61 7 0 142 0 0 0 0 1 0 0 3 0 0 0 1616 0 0 72 3 110 0 1435 21 0 40 77 0 92 0 0 6742 1 2 0 0 0 0 0 6 297 0 0 1 0 1663 0 0 0 0 0 0 0 3374 1 5 0 0 99 2 0 91 99 0 0 6867 1 0 0 18 - 0 1145 2423 9 184 1476 5349 6 112 0 89 556 518 25 80 0 0 3946 0 5 84 105 0 5 0 0 12 10 0 0 523 2400 0 348 0 6 0 0 0 0 0 0 14 0 2659 3 0 0 422 7740 0 0 6201 3 0 531 151 0 0 0 1 36 0 0 1243 0 0 15 2999 17 1 0 5 0 239 6305 0 375 0 147 0 3 0 9 0 0 1 0 236 0 0 1275 0 0 4 0 0 5153 0 0 0 0 0 0 0 0 29 0 172 31 19 0 0 0 4 0 8 2507 233 0 0 0 0 0 0 0 0 3 0 0 0 1 0 0 0 0 0 30 0 0 0 0 0 0 0 1 0 0 0 0 - 570 0 0 0 0 1167 818 0 0 0 0 0 322 2 3 0 1 16 1007 0 2 0 661 0 0 0 0 0 938 0 0 1 0 5949 2745 0 38 0 0 268 966 0 0 0 0 1 2 0 60 57 0 887 551 16 0 0 0 51 1 45 0 0 23 4558 0 0 160 0 0 0 68 0 0 0 2311 0 0 6032 0 3761 4 1855 63 2779 1 39 96 0 0 0 791 1 0 0 2 0 0 2349 4512 18 6389 0 1 0 0 0 5653 1794 0 20 0 0 6 0 0 31 0 0 285 243 0 0 0 62 0 3 1 0 0 4 0 0 2 0 0 4158 0 0 6551 1 547 0 270 141 37 0 0 5295 2469 0 - 0 0 853 0 0 239 0 56 103 110 520 0 0 7176 0 233 0 0 0 2 0 4 0 13 0 0 0 0 0 372 0 42 346 0 315 0 703 393 0 0 55 32 0 0 1634 10 1 0 4 0 0 0 1 0 0 4654 0 161 0 0 0 0 1 1849 0 0 381 0 1 3 0 66 2 0 0 236 0 0 0 0 736 0 19 0 6582 0 0 0 1019 2405 0 0 1 27 52 0 5882 0 22 0 1 0 0 0 12 0 0 6629 3 701 4 3591 0 0 1 176 0 1563 559 40 0 0 1077 0 0 12 0 0 2955 0 1 41 0 0 0 0 0 11 0 0 0 44 0 0 1621 44 287 0 103 0 - 1 17 0 0 0 4348 0 0 1022 0 9 0 0 0 0 32 48 0 0 4933 886 2359 0 0 6459 16 0 9 0 0 0 0 0 0 923 0 171 0 2 0 0 0 2758 53 1 0 0 0 0 0 0 0 0 70 51 0 864 2437 0 0 0 15 0 232 0 21 0 0 24 0 0 0 0 2 0 0 0 1 0 0 0 0 1225 0 0 0 0 0 1 571 2 899 5967 0 359 0 0 1 12 6928 0 25 0 0 0 0 2402 0 26 2787 3 0 0 0 4350 113 0 0 0 0 0 0 0 0 0 0 0 5 1617 0 250 0 238 3 86 71 0 0 0 3 1 0 26 5 0 0 2744 10 3 0 - 0 0 6953 0 29 0 0 1 0 0 0 17 144 0 0 0 0 0 3 0 2543 4 0 0 1 0 0 0 1 5 894 0 20 1586 0 90 0 0 0 1558 0 0 2 2979 5 7957 0 3509 1 0 1233 0 0 0 0 0 258 0 0 2 8 0 0 0 15 0 7 1 2 0 0 0 0 8 0 20 0 0 0 4 0 312 0 0 1 0 136 1 0 0 0 209 0 0 0 179 0 0 44 0 0 0 33 0 0 0 7 6 3 0 9 1 0 486 133 5387 0 0 4283 2406 0 110 0 0 0 1 525 0 0 4167 5386 3042 3 0 0 0 0 3717 0 12 0 0 0 170 0 0 0 2247 0 0 - 2 2483 0 1 137 0 1306 0 6 37 0 135 0 0 0 0 0 0 0 5 145 295 0 0 0 0 0 2617 2 0 2 1 4329 0 1185 0 0 0 115 0 5 25 0 0 45 0 0 0 0 0 6 0 1273 0 12 0 1 0 1 0 6 0 0 0 0 114 0 42 10 391 0 0 0 188 0 163 1 0 0 0 0 0 4168 0 26 0 1191 0 0 0 0 0 0 393 1425 0 4 0 94 0 0 32 0 0 0 2 0 8 4713 0 0 0 1 0 5390 1 542 0 18 0 0 7801 0 1159 0 0 0 7 0 0 17 0 253 0 0 0 0 0 1002 0 20 0 1 3 5 1 0 366 2 0 - 0 1 152 0 40 207 0 0 1 0 0 2 0 0 12 0 1 0 0 0 2605 0 0 80 0 0 0 0 0 0 137 0 0 0 19 7 347 0 0 2 0 0 0 0 10 0 75 0 0 0 0 0 5126 0 0 0 0 0 27 0 0 0 0 0 4 2 0 966 0 0 417 3968 1 0 7 0 1455 7248 136 0 808 0 0 0 0 0 0 4582 0 2675 0 0 0 0 0 0 0 2213 0 0 1 1 2284 0 4 0 0 0 0 71 0 177 90 4 0 0 0 0 0 0 0 0 7670 0 380 0 2 21 0 0 0 182 3934 2014 0 0 0 4084 0 29 0 0 1 0 4903 0 0 0 110 0 - 2 18 192 0 0 101 0 0 0 0 14 68 0 3 0 0 4 9 0 54 0 23 0 0 0 0 7 0 5 0 0 0 265 0 0 0 0 755 1 2 0 0 0 0 0 0 1 0 365 0 42 6557 0 0 0 103 1 0 0 1 0 0 0 43 1 0 0 4398 0 33 0 1 1 317 2868 3 6508 0 0 0 0 435 0 1 11 16 1 1010 0 0 0 7449 9 21 5492 114 0 1 463 352 11 3 120 0 0 0 11 13 0 1 4235 0 3 0 0 0 0 0 0 0 0 56 0 0 0 1 0 2 4 12 0 0 0 39 0 3646 314 0 0 0 6920 0 56 0 0 0 221 0 4 5 - 17 0 0 0 13 0 1772 60 0 0 0 0 0 329 0 0 11 437 0 0 2 5 0 0 5921 0 24 1 0 3 0 1 515 2181 0 7 4275 0 0 105 0 969 0 6985 1 0 0 0 18 0 30 0 33 0 5 0 0 2 138 0 0 0 244 0 0 0 1199 0 1818 0 6 12 0 0 0 2179 1 0 1 1302 0 4115 0 0 0 0 1 67 0 0 0 4665 0 0 0 0 517 0 1059 1 0 0 2 2 0 0 0 0 1 0 9 0 0 0 489 0 0 2368 0 0 0 0 26 3981 5160 0 0 0 1 3067 112 0 0 0 0 0 0 88 2 0 0 1558 0 1 160 1758 0 0 0 0 - 0 0 0 1 0 0 878 0 0 766 0 0 0 0 529 0 0 52 1 0 0 334 0 0 0 0 0 7104 0 0 4 0 0 0 670 1 2675 0 0 0 0 0 0 4 1 0 14 0 0 0 0 0 0 28 100 0 0 0 4 123 0 33 0 0 0 0 1962 0 16 0 0 3 2169 4047 2 0 18 0 0 0 482 38 0 0 1 1 56 0 16 0 3593 49 0 0 0 0 0 0 0 0 0 31 0 0 119 4057 0 2 7 0 8 0 2495 0 152 1 0 0 0 7276 23 10 0 1 0 0 0 2 0 2493 1 9 0 0 0 0 0 377 6936 0 3714 0 0 0 0 0 169 35 0 0 - 0 0 1 2 13 1053 0 1312 0 3859 0 0 1 0 290 816 285 162 462 0 1 5 0 68 84 0 664 9 1 0 176 0 488 0 0 2 12 0 101 286 0 0 2 216 2 0 0 0 0 0 5 55 2 3 73 0 0 5 36 0 0 0 0 5604 0 0 0 0 0 0 0 1 1 3687 0 6728 869 2683 0 2 0 1 0 0 0 0 153 1 3 0 1499 16 13 585 0 0 0 8 0 464 293 4 0 0 0 5 0 0 5545 0 594 1830 0 0 0 0 0 0 0 1109 1 443 0 7448 1 276 0 7829 6 0 0 7153 19 3 0 13 0 1370 654 20 0 3852 648 0 1 4875 27 0 0 0 - 0 14 2 134 0 0 781 3040 3585 3093 0 0 0 0 0 0 1 0 0 0 1 0 290 0 0 1522 5 6 3 933 7 0 93 84 1239 0 0 4007 1650 0 0 0 268 0 112 3 0 0 940 3781 4 3 0 194 0 0 265 0 1854 0 0 0 0 0 5 0 9 1 0 0 3 0 0 0 0 0 1 0 0 939 0 0 2773 28 0 0 0 7 0 0 0 3 7 196 0 1763 9 0 0 0 151 966 1943 0 2 481 1278 6541 0 0 0 4401 32 0 0 2 1 0 1 5976 0 0 294 0 0 122 0 1279 0 0 0 6 1992 0 93 0 6918 0 0 2 6 0 1932 603 0 3540 0 113 4 7 - 0 0 0 0 0 174 0 0 0 0 0 126 7 0 0 8 0 31 0 0 4 0 25 0 11 0 105 0 3109 0 0 0 0 28 0 0 0 5497 1 1 0 236 0 0 0 0 0 74 0 19 0 0 3627 0 18 3 0 0 0 5939 2 1 2 0 0 1 16 1 0 176 5883 0 0 0 1 66 0 0 0 2 0 0 0 0 0 0 0 34 0 1927 3 0 0 3850 0 0 0 0 3 0 1726 1 0 2759 6396 0 4 0 0 0 10 0 0 3 0 14 0 0 0 0 3 117 6 22 7698 433 2 0 1 4365 0 0 0 42 0 0 0 0 162 130 0 9 7 136 0 1309 0 0 68 418 - 2 0 0 1 0 23 0 1 0 10 1 0 0 0 0 0 0 0 0 0 1688 25 0 0 15 223 0 0 0 6315 0 351 68 0 0 0 0 0 0 0 2 0 0 24 0 1 1138 3 211 229 8 0 306 1327 1 18 1 8 1052 0 144 0 0 47 10 0 1 1223 0 173 24 0 5003 3 27 0 0 674 0 0 0 47 1 242 7 0 0 56 0 0 9 8 0 31 5 0 0 0 0 0 0 0 2 471 4176 0 0 0 0 482 1 0 0 1964 0 505 43 0 4 0 0 957 0 0 472 2 17 3 0 0 1 3 0 0 0 0 0 125 0 9 0 0 0 0 9 4 2223 3283 69 176 - 103 1 0 1890 0 0 0 0 0 0 0 0 7066 0 0 0 0 0 0 0 0 0 39 6 0 74 3 0 0 1 1301 922 176 9 143 0 0 91 0 4880 4 2 7 284 0 2 452 6610 0 117 0 0 0 252 0 25 0 0 0 103 0 0 0 3196 0 0 163 17 0 650 1743 0 24 504 1 597 13 9 349 398 0 0 0 1 0 0 0 0 0 1 2 0 0 0 0 99 0 0 0 0 0 0 0 0 0 0 1 0 0 0 29 5841 1297 0 4 0 0 0 0 3622 104 3227 0 0 0 0 0 0 0 4 0 0 0 0 0 3 19 0 0 360 5628 1 0 0 0 0 0 0 501 0 - 0 100 395 0 0 0 2 127 0 0 1378 0 0 9 0 0 10 0 27 0 0 0 0 720 0 0 0 0 0 16 4638 43 264 0 53 0 349 0 0 17 3 46 4811 91 2019 0 0 1 0 19 0 887 0 0 0 1 0 0 0 257 19 0 0 9 160 0 0 263 0 0 0 0 7 0 0 42 0 0 2965 4124 1507 0 34 10 0 2472 7033 33 442 4 26 687 0 0 0 0 0 0 64 0 0 125 0 201 0 0 2 254 3 0 0 0 263 4 0 140 0 6 0 1182 0 29 9 1 0 0 0 0 2 0 0 0 1827 0 0 0 154 0 0 0 0 0 0 3 0 82 0 53 0 0 - 5 0 0 40 0 315 0 0 964 4853 0 14 0 0 8 0 409 0 0 307 87 0 6058 42 4915 6937 0 0 0 0 17 0 0 1 0 1 0 0 0 0 0 43 1 0 0 3572 0 0 0 7109 0 0 0 0 8 2858 279 5065 0 5784 0 0 121 0 0 0 2399 0 0 0 5 1 0 0 554 4069 8 24 1 0 0 0 0 0 296 8 400 3 0 752 0 0 0 0 5261 0 1 0 0 8 63 0 0 0 0 0 0 0 1 203 0 0 179 0 0 5872 1547 2009 24 0 0 0 73 110 17 0 376 0 4 0 0 0 662 0 0 0 1 0 0 0 0 0 107 23 4 0 3 0 17 0 - 0 0 0 1436 1517 630 0 1 13 1579 11 0 51 68 0 0 0 0 0 50 0 0 0 0 0 0 0 0 0 1 3 0 0 0 1499 780 0 0 577 27 0 0 0 0 0 1573 1 1981 105 3 0 1 0 0 10 0 0 0 0 116 0 1167 1 166 0 2 0 20 21 0 3917 2 0 4356 973 879 0 143 0 0 0 1699 1 86 108 6123 904 0 13 0 0 1 0 32 0 2110 0 1397 0 1 0 9 978 1098 0 4 337 0 0 641 10 0 0 11 0 5 2083 0 0 0 9 0 0 0 0 16 176 81 0 0 0 26 307 0 11 0 0 2 0 6291 1 124 0 0 8 3890 0 10 111 295 - 0 0 5978 10 0 0 260 1 0 3613 2634 0 5365 2758 19 1 0 7 0 0 258 0 460 668 0 0 0 0 2664 0 8071 5003 2 6 0 1230 0 0 37 0 0 0 2722 5 0 0 0 99 1 0 521 0 0 0 378 0 0 0 125 0 0 1423 0 4 0 0 0 1 69 3 0 0 8 0 0 4 0 0 625 0 184 0 0 0 4265 1 0 1072 2987 1 935 0 2 0 0 31 18 0 0 0 0 4838 0 0 122 1997 0 155 1 0 2 0 1431 0 3 0 10 6580 1369 0 0 86 0 6860 40 0 1 0 1166 0 197 0 30 0 0 3 3 0 0 0 0 344 0 0 0 0 0 5 1 0 - 0 0 127 0 87 0 0 0 0 3 0 3 0 0 2 1 0 0 6876 0 0 0 0 0 319 17 0 0 0 0 2813 43 0 2377 5847 33 0 1 922 1009 6 0 0 0 0 5308 57 187 151 235 0 1765 0 0 1334 806 1993 0 0 1 868 34 25 362 0 585 0 0 89 0 0 100 0 0 4163 0 10 4060 0 1863 59 268 9 4078 0 0 37 0 0 0 0 0 0 0 0 175 653 0 438 0 4 0 5 398 176 0 0 0 41 0 1427 0 0 6145 7 0 285 0 82 0 0 9 2 0 2 0 0 0 0 0 457 93 0 1 0 0 0 0 0 0 0 0 0 1 0 142 0 0 18 0 - 0 111 1 0 913 23 108 15 0 1 4006 139 4142 0 1 5206 7060 56 0 0 40 4908 2824 7 224 46 0 7 58 0 943 5 0 19 3 9 0 0 1 62 0 1589 0 0 0 34 17 0 21 0 0 0 4 256 1 2 0 0 2302 0 0 1 0 3 0 0 0 2704 2 0 0 0 0 12 0 689 26 0 0 0 0 0 0 298 0 0 0 1 1155 1 0 460 0 0 0 0 6878 24 3 0 0 0 0 1 0 209 0 2 0 0 0 0 11 0 0 1585 0 0 0 43 0 0 0 0 0 0 0 3848 0 4028 2709 1060 0 13 0 0 0 0 245 0 0 0 0 1 24 84 862 0 0 36 - 0 0 0 165 0 0 4 0 0 14 1587 4 0 0 59 20 4 27 0 0 1019 0 0 8 0 0 0 6 536 3 1379 2656 115 328 0 156 459 0 0 0 8 0 0 0 941 0 0 0 0 0 2694 113 1 105 0 0 3 152 0 1 1 0 0 1503 0 1 0 0 0 236 0 0 1378 7 0 3851 2 0 882 24 1 140 0 2 0 3 44 0 0 0 0 0 68 0 0 0 0 361 6 0 0 1523 39 0 151 0 1528 3 90 0 12 351 1 0 2 0 5 0 3 150 0 0 0 9 715 0 4 74 0 818 0 0 0 0 265 5 0 0 28 0 0 0 0 2 0 2389 0 4 0 0 - 5203 0 0 0 0 0 24 0 3448 0 0 0 0 1 0 0 0 0 0 124 115 0 0 0 63 0 0 0 46 0 0 71 204 0 1 0 27 4139 340 0 3 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 26 0 0 0 2 0 3662 0 0 0 12 2 0 0 267 0 0 0 0 0 0 6076 0 534 0 3 2454 0 3727 3 1 0 0 0 3 0 3877 1028 7021 0 0 0 0 3 0 2818 0 7698 440 0 0 0 1 0 17 0 62 3449 0 152 45 0 0 0 0 0 6 0 26 25 24 0 0 0 0 18 1655 0 2456 4387 0 0 0 0 0 0 0 7 107 55 37 335 1 165 - 3 0 0 2 0 6358 9 5 0 6 6 0 0 5 0 0 0 0 1 0 5783 0 0 0 1 0 0 0 4 0 0 0 6 1027 758 0 1 0 7 0 0 0 7 3 0 34 0 733 1 747 6 0 1 0 6 1 0 2 0 5 0 103 5271 0 0 0 385 0 0 0 7 0 3265 1 160 0 1 82 0 17 49 20 5 0 19 0 0 0 1 0 2642 335 2770 3041 0 163 897 0 0 4 24 0 0 164 0 105 2248 0 0 1442 0 1 0 1 0 0 1 7 0 0 0 1854 0 6 1424 0 1402 1 0 0 0 4603 4283 934 2 0 0 0 3 0 0 2687 0 48 0 0 0 0 0 6675 - 2255 6 0 0 0 5993 1 0 0 1 54 0 32 8 0 0 1 97 65 4714 0 5 1281 1 0 8 0 0 165 0 632 3021 0 0 10 0 57 0 0 0 0 0 0 0 0 15 0 0 0 1 443 192 80 0 61 0 31 2190 0 1 0 0 0 106 3 19 26 689 0 0 65 0 1 0 0 0 1160 0 1 5617 0 0 0 8 0 0 0 0 50 0 0 81 0 0 1 0 0 0 146 0 0 0 319 3 0 752 1 24 0 0 292 0 3024 1442 0 0 0 241 1 0 3 0 4383 0 0 0 0 0 12 157 17 17 0 0 215 28 2 0 0 906 0 0 48 0 3 152 0 1 0 0 - 3 677 3 5404 0 8 175 0 0 0 0 1 0 0 179 0 607 0 0 9 283 367 6696 0 5 0 47 0 0 61 7655 0 0 0 0 128 0 0 1840 0 0 16 0 1175 0 3 4 16 0 2238 0 0 2 2 0 0 398 1 0 0 0 1544 0 8 0 0 0 38 0 0 1 0 0 255 0 0 0 1 1473 0 0 38 0 2 3 11 22 0 12 24 2572 0 115 7 1 0 0 0 0 127 9 0 0 1 0 0 3 0 0 9 4 241 131 0 0 1053 53 5 37 0 122 4 0 216 0 271 0 1499 2 24 28 11 0 9 132 0 0 18 93 0 0 0 68 0 0 2 0 0 0 4461 - 2527 30 4 0 845 0 0 0 1729 0 25 2 1 0 0 3 31 0 2047 17 41 1 1245 0 0 23 0 0 2647 0 33 0 0 0 0 0 0 9 0 5 207 0 0 0 0 14 0 0 15 4 0 0 92 3727 37 0 1 1 2303 929 0 0 0 0 2107 0 86 0 72 0 0 4503 0 0 0 6 45 0 262 0 0 0 807 699 0 357 0 534 0 3 1 1 1 0 1 97 0 0 0 0 0 0 0 5344 0 0 7 6 0 6411 0 39 946 1 457 0 0 2 0 1 85 1 0 0 13 0 0 1 0 1573 40 0 7 714 1507 49 607 0 32 0 7 0 0 6133 0 0 534 486 426 0 - 0 0 0 1843 16 2278 0 1 0 6 0 0 34 0 0 0 0 0 0 0 0 0 267 15 0 0 87 0 0 1206 2 0 0 1 54 19 21 265 0 0 213 1487 16 0 1 249 610 0 0 1 2481 66 0 394 0 7 0 5 0 0 0 3 0 32 1170 0 0 0 0 1921 0 17 0 5 0 0 0 323 2 606 0 4 0 0 406 1 0 0 0 0 0 2665 0 556 0 0 0 31 0 0 1 0 0 0 1 0 0 0 0 2 4 0 4268 0 0 53 595 0 0 0 2 888 0 672 0 1253 63 0 35 0 0 96 0 0 0 15 200 423 0 541 0 0 980 0 2 3 0 0 0 16 - 1 1 0 0 17 5087 0 0 0 5597 0 0 0 0 0 0 0 654 0 5 0 0 190 9 0 0 0 503 0 95 59 197 0 0 0 341 7 1027 59 0 0 0 7195 0 0 0 0 3 7033 35 1137 5400 5190 2 3652 0 0 1 3396 0 0 3 0 0 0 0 0 1475 0 0 17 0 361 710 0 0 5 6719 1299 0 0 308 0 0 0 440 3 0 0 1 0 1888 3598 56 0 0 0 0 0 0 0 1 1006 0 1898 0 3 155 0 124 0 0 0 487 0 7387 0 0 1421 0 3 17 0 0 1246 39 0 1 0 15 0 0 1 771 0 20 0 0 40 0 3 0 0 1385 0 0 0 0 0 0 - 0 0 0 284 383 6951 258 45 0 9 39 1 1932 2 0 421 0 0 0 41 0 76 0 0 0 7594 0 0 3 2384 0 0 0 0 0 0 145 74 0 0 235 2287 6 0 1 7764 0 0 0 1462 2060 14 55 0 77 8 638 17 0 34 2800 0 4 0 64 7192 412 4 1034 0 0 271 0 0 1 0 0 476 32 0 0 0 1685 0 1 1 0 0 722 3 486 0 31 0 0 0 93 1605 0 8 61 18 0 0 3 1864 0 0 0 0 0 0 2025 33 0 140 325 0 2 0 0 1 0 0 0 37 12 0 0 1 0 0 3 1569 39 97 0 40 0 1767 1 0 1 229 0 249 8 0 0 2710 - 0 601 0 945 0 145 0 7120 0 0 0 2449 5492 661 0 336 0 26 0 0 113 0 108 1316 0 0 0 2786 0 0 0 2798 3 601 0 1 0 0 0 4 0 2 0 0 0 1483 80 49 10 29 0 0 19 1 31 0 0 0 0 0 228 0 0 0 6 14 0 0 0 2 0 140 0 0 0 3 90 7995 23 0 0 0 0 1671 100 103 1 2 0 0 0 5 44 0 106 0 5 57 0 0 4 3 721 0 0 0 0 0 215 4 0 0 0 11 0 0 0 45 0 0 0 26 0 145 0 5 0 0 21 5 0 269 0 212 96 1 0 0 0 0 0 73 0 2 0 0 0 0 0 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai15a.dat b/trunk/paradiseo-peo/tutorial/benchs/tai15a.dat deleted file mode 100755 index fd6b7b89a..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai15a.dat +++ /dev/null @@ -1,33 +0,0 @@ - 15 388214 - - 0 36 53 37 26 87 76 91 13 29 11 77 32 87 67 - 36 0 94 79 2 10 99 56 70 99 60 4 56 2 60 - 53 94 0 72 74 46 13 20 86 4 77 15 89 48 14 - 37 79 72 0 89 44 59 22 57 63 6 0 62 41 62 - 26 2 74 89 0 46 25 75 76 40 66 58 30 68 78 - 87 10 46 44 46 0 91 13 59 49 85 84 8 38 41 - 76 99 13 59 25 91 0 56 39 53 77 50 30 58 55 - 91 56 20 22 75 13 56 0 19 85 52 34 53 40 69 - 13 70 86 57 76 59 39 19 0 12 85 72 7 49 46 - 29 99 4 63 40 49 53 85 12 0 87 58 17 68 27 - 11 60 77 6 66 85 77 52 85 87 0 21 6 67 26 - 77 4 15 0 58 84 50 34 72 58 21 0 82 44 35 - 32 56 89 62 30 8 30 53 7 17 6 82 0 3 62 - 87 2 48 41 68 38 58 40 49 68 67 44 3 0 8 - 67 60 14 62 78 41 55 69 46 27 26 35 62 8 0 - - 0 21 95 82 56 41 6 25 10 4 63 6 44 40 75 - 21 0 79 0 89 35 9 1 85 84 12 0 26 91 11 - 95 79 0 35 82 26 69 56 86 45 91 59 18 76 39 - 82 0 35 0 18 57 36 61 36 21 71 11 29 82 82 - 56 89 82 18 0 6 71 8 77 74 30 89 76 76 40 - 41 35 26 57 6 0 93 56 1 50 4 36 27 85 2 - 6 9 69 36 71 93 0 1 15 11 35 11 20 21 61 - 25 1 56 61 8 56 1 0 80 58 21 76 72 44 85 - 10 85 86 36 77 1 15 80 0 94 90 51 3 48 29 - 4 84 45 21 74 50 11 58 94 0 90 66 41 15 83 - 63 12 91 71 30 4 35 21 90 90 0 96 74 45 65 - 6 0 59 11 89 36 11 76 51 66 96 0 40 54 83 - 44 26 18 29 76 27 20 72 3 41 74 40 0 14 71 - 40 91 76 82 76 85 21 44 48 15 45 54 14 0 77 - 75 11 39 82 40 2 61 85 29 83 65 83 71 77 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai15b.dat b/trunk/paradiseo-peo/tutorial/benchs/tai15b.dat deleted file mode 100755 index 7dd45683c..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai15b.dat +++ /dev/null @@ -1,33 +0,0 @@ -15 51765268 - - 0 12 12 12 8 12 9 5 8 5 6 2 8 9 5055 - 12 0 10 11 7 9 6 10 9 11 6 14 4 7 5043 - 12 10 0 2 5 1 13 14 4 8 9 14 8 4 5045 - 12 11 2 0 6 2 14 14 4 8 9 14 9 5 5046 - 8 7 5 6 0 4 9 9 3 5 4 10 4 1 5047 - 12 9 1 2 4 0 13 13 3 8 8 13 8 4 5045 - 9 6 13 14 9 13 0 4 11 11 5 10 5 9 5049 - 5 10 14 14 9 13 4 0 10 8 5 6 6 10 5053 - 8 9 4 4 3 3 11 10 0 4 6 10 6 3 5048 - 5 11 8 8 5 8 11 8 4 0 6 6 7 6 5052 - 6 6 9 9 4 8 5 5 6 6 0 8 2 5 5049 - 2 14 14 14 10 13 10 6 10 6 8 0 10 11 5057 - 8 4 8 9 4 8 5 6 6 7 2 10 0 4 5047 - 9 7 4 5 1 4 9 10 3 6 5 11 4 0 5046 - 5055 5043 5045 5046 5047 5045 5049 5053 5048 5052 5049 5057 5047 5046 0 - - 0 0 11 0 109 11749 103 2 0 0 28204 4 0 21871 0 - 44 0 8941 0 0 2 0 0 45 55 0 4721 34798 57 2 - 0 390 0 0 38976 0 0 0 0 118 14696 1170 69 0 248 - 533 0 0 0 0 1993 88 0 0 0 0 0 0 0 24586 - 34 0 1446 1160 0 1 0 0 5894 13 882 0 0 0 8 - 236 4 785 545 11 0 1 397 2249 0 0 15215 6 1621 0 - 6 2 0 0 4338 0 0 0 21168 2892 5848 0 124 20 0 - 30 20274 0 0 0 6741 0 0 106 3 0 0 3321 6 0 - 0 88 2 0 0 0 0 0 0 534 0 31 42110 0 243 - 810 4403 0 392 0 0 0 0 26 0 116 0 59 0 372 - 0 0 0 1 1017 0 11003 0 0 0 0 0 91 16876 1 - 2541 0 28037 420 2 0 0 53851 0 0 0 0 13598 43 2 - 1 174 0 0 0 0 0 0 44 0 10 0 0 0 1732 - 0 7510 1 35 4216 0 0 0 0 0 110 0 1323 0 215 - 1851 37 26412 57857 8 12765 0 0 10454 0 9 1524 0 1 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai17a.dat b/trunk/paradiseo-peo/tutorial/benchs/tai17a.dat deleted file mode 100755 index 1b142d85b..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai17a.dat +++ /dev/null @@ -1,37 +0,0 @@ - 17 491812 - - 0 20 86 4 77 15 89 48 14 89 44 59 22 57 63 6 0 - 20 0 62 41 62 46 25 75 76 40 66 58 30 68 78 91 13 - 86 62 0 59 49 85 84 8 38 41 56 39 53 77 50 30 58 - 4 41 59 0 55 19 85 52 34 53 40 69 12 85 72 7 49 - 77 62 49 55 0 46 87 58 17 68 27 21 6 67 26 82 44 - 15 46 85 19 46 0 35 3 62 8 51 1 91 39 87 72 45 - 89 25 84 85 87 35 0 96 7 87 68 33 3 21 90 45 47 - 48 75 8 52 58 3 96 0 25 30 43 97 33 35 61 42 36 - 14 76 38 34 17 62 7 25 0 43 7 84 6 0 0 48 62 - 89 40 41 53 68 8 87 30 43 0 59 29 94 82 29 3 3 - 44 66 56 40 27 51 68 43 7 59 0 51 67 39 15 66 42 - 59 58 39 69 21 1 33 97 84 29 51 0 23 62 62 28 76 - 22 30 53 12 6 91 3 33 6 94 67 23 0 66 82 98 35 - 57 68 77 85 67 39 21 35 0 82 39 62 66 0 15 17 77 - 63 78 50 72 26 87 90 61 0 29 15 62 82 15 0 44 26 - 6 91 30 7 82 72 45 42 48 3 66 28 98 17 44 0 76 - 0 13 58 49 44 45 47 36 62 3 42 76 35 77 26 76 0 - - 0 21 95 82 56 41 6 25 10 4 63 6 44 40 75 79 0 - 21 0 89 35 9 1 85 84 12 0 26 91 11 35 82 26 69 - 95 89 0 56 86 45 91 59 18 76 39 18 57 36 61 36 21 - 82 35 56 0 71 11 29 82 82 6 71 8 77 74 30 89 76 - 56 9 86 71 0 76 40 93 56 1 50 4 36 27 85 2 1 - 41 1 45 11 76 0 15 11 35 11 20 21 61 80 58 21 76 - 6 85 91 29 40 15 0 72 44 85 94 90 51 3 48 29 90 - 25 84 59 82 93 11 72 0 66 41 15 83 96 74 45 65 40 - 10 12 18 82 56 35 44 66 0 54 83 14 71 77 36 53 37 - 4 0 76 6 1 11 85 41 54 0 26 87 76 91 13 29 11 - 63 26 39 71 50 20 94 15 83 26 0 77 32 87 67 94 79 - 6 91 18 8 4 21 90 83 14 87 77 0 2 10 99 56 70 - 44 11 57 77 36 61 51 96 71 76 32 2 0 99 60 4 56 - 40 35 36 74 27 80 3 74 77 91 87 10 99 0 2 60 72 - 75 82 61 30 85 58 48 45 36 13 67 99 60 2 0 74 46 - 79 26 36 89 2 21 29 65 53 29 94 56 4 60 74 0 13 - 0 69 21 76 1 76 90 40 37 11 79 70 56 72 46 13 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai20a.dat b/trunk/paradiseo-peo/tutorial/benchs/tai20a.dat deleted file mode 100755 index 100d6e886..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai20a.dat +++ /dev/null @@ -1,43 +0,0 @@ - 20 703482 - - 0 85 72 7 49 46 87 58 17 68 27 21 6 67 26 82 44 35 3 62 - 85 0 8 51 1 91 39 87 72 45 96 7 87 68 33 3 21 90 45 47 - 72 8 0 25 30 43 97 33 35 61 42 36 43 7 84 6 0 0 48 62 - 7 51 25 0 59 29 94 82 29 3 3 51 67 39 15 66 42 23 62 62 - 49 1 30 59 0 28 76 66 82 98 35 15 17 77 44 26 76 86 60 62 - 46 91 43 29 28 0 62 83 91 57 62 36 2 2 43 65 37 49 61 5 - 87 39 97 94 76 62 0 34 53 96 82 48 28 31 75 1 95 7 92 69 - 58 87 33 82 66 83 34 0 62 32 97 5 39 50 82 93 71 35 14 20 - 17 72 35 29 82 91 53 62 0 74 49 50 37 79 19 51 70 42 26 79 - 68 45 61 3 98 57 96 32 74 0 98 60 35 9 96 70 21 37 37 67 - 27 96 42 3 35 62 82 97 49 98 0 93 93 39 2 52 26 90 26 1 - 21 7 36 51 15 36 48 5 50 60 93 0 68 93 7 94 19 54 37 0 - 6 87 43 67 17 2 28 39 37 35 93 68 0 20 12 11 66 84 80 1 - 67 68 7 39 77 2 31 50 79 9 39 93 20 0 55 9 21 12 65 7 - 26 33 84 15 44 43 75 82 19 96 2 7 12 55 0 17 51 84 87 2 - 82 3 6 66 26 65 1 93 51 70 52 94 11 9 17 0 27 82 71 71 - 44 21 0 42 76 37 95 71 70 21 26 19 66 21 51 27 0 40 93 27 - 35 90 0 23 86 49 7 35 42 37 90 54 84 12 84 82 40 0 93 92 - 3 45 48 62 60 61 92 14 26 37 26 37 80 65 87 71 93 93 0 34 - 62 47 62 62 62 5 69 20 79 67 1 0 1 7 2 71 27 92 34 0 - - 0 21 95 82 56 41 6 25 10 4 63 6 44 40 75 79 0 89 35 9 - 21 0 1 85 84 12 0 26 91 11 35 82 26 69 56 86 45 91 59 18 - 95 1 0 76 39 18 57 36 61 36 21 71 11 29 82 82 6 71 8 77 - 82 85 76 0 74 30 89 76 76 40 93 56 1 50 4 36 27 85 2 1 - 56 84 39 74 0 15 11 35 11 20 21 61 80 58 21 76 72 44 85 94 - 41 12 18 30 15 0 90 51 3 48 29 90 66 41 15 83 96 74 45 65 - 6 0 57 89 11 90 0 40 54 83 14 71 77 36 53 37 26 87 76 91 - 25 26 36 76 35 51 40 0 13 29 11 77 32 87 67 94 79 2 10 99 - 10 91 61 76 11 3 54 13 0 56 70 99 60 4 56 2 60 72 74 46 - 4 11 36 40 20 48 83 29 56 0 13 20 86 4 77 15 89 48 14 89 - 63 35 21 93 21 29 14 11 70 13 0 44 59 22 57 63 6 0 62 41 - 6 82 71 56 61 90 71 77 99 20 44 0 62 46 25 75 76 40 66 58 - 44 26 11 1 80 66 77 32 60 86 59 62 0 30 68 78 91 13 59 49 - 40 69 29 50 58 41 36 87 4 4 22 46 30 0 85 84 8 38 41 56 - 75 56 82 4 21 15 53 67 56 77 57 25 68 85 0 39 53 77 50 30 - 79 86 82 36 76 83 37 94 2 15 63 75 78 84 39 0 58 55 19 85 - 0 45 6 27 72 96 26 79 60 89 6 76 91 8 53 58 0 52 34 53 - 89 91 71 85 44 74 87 2 72 48 0 40 13 38 77 55 52 0 40 69 - 35 59 8 2 85 45 76 10 74 14 62 66 59 41 50 19 34 40 0 12 - 9 18 77 1 94 65 91 99 46 89 41 58 49 56 30 85 53 69 12 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai20b.dat b/trunk/paradiseo-peo/tutorial/benchs/tai20b.dat deleted file mode 100755 index 39b28a277..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai20b.dat +++ /dev/null @@ -1,42 +0,0 @@ - 20 122455319 - - 0 23 29 36 46 53 32 28 64 13 65 36 48 8 47 27 761 812 795 795 - 23 0 8 33 42 45 10 25 48 13 51 15 32 27 26 37 738 789 772 772 - 29 8 0 40 49 52 3 33 51 21 55 7 35 31 25 45 732 782 765 765 - 36 33 40 0 10 17 40 9 34 27 32 46 23 44 35 19 750 803 787 784 - 46 42 49 10 0 8 48 19 30 37 26 54 24 54 39 26 749 802 787 782 - 53 45 52 17 8 0 51 25 23 43 19 56 22 60 38 34 743 797 781 776 - 32 10 3 40 48 51 0 33 49 23 53 6 33 34 22 46 729 780 762 762 - 28 25 33 9 19 25 33 0 39 18 38 39 25 35 33 17 750 802 786 784 - 64 48 51 34 30 23 49 39 0 52 7 53 17 71 29 53 719 774 758 753 - 13 13 21 27 37 43 23 18 52 0 53 27 35 19 35 25 750 801 784 784 - 65 51 55 32 26 19 53 38 7 53 0 57 20 72 34 51 725 779 764 758 - 36 15 7 46 54 56 6 39 53 27 57 0 38 37 25 52 725 776 759 759 - 48 32 35 23 24 22 33 25 17 35 20 38 0 54 17 41 727 780 764 760 - 8 27 31 44 54 60 34 35 71 19 72 37 54 0 52 35 762 813 795 796 - 47 26 25 35 39 38 22 33 29 35 34 25 17 52 0 50 718 770 753 751 - 27 37 45 19 26 34 46 17 53 25 51 52 41 35 50 0 767 819 803 801 - 761 738 732 750 749 743 729 750 719 750 725 725 727 762 718 767 0 73 86 34 - 812 789 782 803 802 797 780 802 774 801 779 776 780 813 770 819 73 0 32 53 - 795 772 765 787 787 781 762 786 758 784 764 759 764 795 753 803 86 32 0 77 - 795 772 765 784 782 776 762 784 753 784 758 759 760 796 751 801 34 53 77 0 - 0 1341 283 17514 0 5387 10 0 0 0 17307 98 122 1325 0 0 378 239 1 1 - 0 0 336 0 1 0 0 3 0 1 2109 0 130 0 0 0 2 0 0 241 - 5134 0 0 0 5811 0 0 458 11 127 0 18012 28 0 7 0 97 4 23 0 - 3896 0 0 0 2 41453 206 6590 16724 0 0 375 0 0 2474 1868 43487 0 0 0 - 8 0 0 35 0 18 0 2447 0 23862 168 55344 0 0 22946 0 1 9818 0 582 - 0 3 1009 635 14785 0 20 52 0 24683 743 0 0 1 0 0 2 0 1 1 - 54212 1 0 7 3443 0 0 0 59 955 0 0 0 0 2 6 0 0 29 0 - 1 0 38645 11 0 31 24 0 8407 2101 0 1 0 0 0 2142 61 0 37 1316 - 0 251 52 0 0 0 2 0 0 0 5 3 9610 1608 3021 397 10 2 0 1 - 0 0 0 7 0 0 4152 0 0 0 9 1 1 0 7 0 2 344 3723 2242 - 1945 0 3007 53507 0 1 63 0 0 1150 0 0 0 0 268 276 0 0 0 0 - 1038 2 670 0 0 0 3057 0 0 38 341 0 1 0 1 518 0 24 2 22242 - 1 6248 0 0 4845 297 2195 16251 0 0 122 0 0 0 151 3854 57 16 117 1952 - 0 268 50058 82 0 0 0 0 18299 0 72 176 1919 0 4 0 0 0 750 0 - 2 0 0 0 324 3918 430 398 0 0 4597 340 0 55597 0 88 0 7 0 0 - 28 3664 0 60 0 0 2798 0 31854 11338 0 0 0 51089 0 0 32 0 2785 2 - 10152 423 10 30671 32 1 10 0 2 453 10 0 92 1149 0 0 0 6622 427 0 - 955 477 0 0 0 0 1 0 0 1 1230 1 0 2 0 0 311 0 0 319 - 1 59559 534 2547 0 48114 41993 0 16916 0 0 0 2 5583 0 106 40778 13 0 0 - 1 0 0 211 12 102 15831 0 26 19 0 0 129 3 0 524 0 0 4 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai256c.dat b/trunk/paradiseo-peo/tutorial/benchs/tai256c.dat deleted file mode 100755 index df795d4b5..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai256c.dat +++ /dev/null @@ -1,514 +0,0 @@ - 256 44759294 - - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 - 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 - 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 - 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 - 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 - 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 - 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 - 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 - 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 - 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 - 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 - 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 - 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 - 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 - 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 - 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 - 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 - 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 - 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 - 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 - 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 - 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 - 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 - 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 - 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 - 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 - 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 - 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 - 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 - 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 - 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 - 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 - 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 - 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 - 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 - 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 - 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 - 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 - 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 - 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 - 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 - 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 - 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 - 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 - 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 - 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 - 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 - 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 - 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 - 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 - 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 - 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 - 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 - 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 - 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 - 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 - 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 - 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 - 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 - 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 - 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 - 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 - 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 - 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 - 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 - 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 - 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 - 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 - 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 - 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 - 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 - 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 - 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 - 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 - 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 - 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 - 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 - 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 - 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 - 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 - 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 - 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 - 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 - 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 - 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 - 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 - 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 - 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 - 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 - 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 - 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 - 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 - 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 - 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 - 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 - 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 - 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 - 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 - 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 - 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 - 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 - 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 - 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 - 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 - 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 - 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 - 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 - 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 - 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 - 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 - 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 - 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 - 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 - 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 - 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 - 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 - 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 - 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 - 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 - 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 - 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 - 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 - 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 - 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 - 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 - 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 - 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 - 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 - 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 - 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 - 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 - 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 - 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 - 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 - 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 - 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 - 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 - 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 - 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 - 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 - 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 - 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 - 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 - 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 - 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 - 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 - 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 - 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 - 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 - 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 - 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 - 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 - 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 - 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 - 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 - 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 - 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 - 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 - 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 - 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 - 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 - 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 - 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 - 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 - 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 - 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 - 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 - 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 - 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 - 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 - 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 - 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 - 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 - 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 - 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 - 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 - 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 - 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 - 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 - 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 - 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 - 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 - 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 - 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 - 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 - 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 - 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 - 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 - 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 - 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 - 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 - 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 - 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 - 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 - 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 - 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 - 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 - 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 - 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 - 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 - 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 - 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 - 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 - 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 - 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 - 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 - 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 - 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 - 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 - 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 - 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 - 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 - 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 - 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 - 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 - 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 - 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 - 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 - 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 - 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 - 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 - 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 - 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 - 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 - 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 - 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 - 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 - 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 - 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 - 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 - 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 - 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 - 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 - 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 - 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 - 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 - 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 - 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 - 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 - 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 - 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 - 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 - 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 - 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 - 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 - 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1000 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 - 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 885 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1020 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1176 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1351 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1538 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1724 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 2041 - 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 781 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 885 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1000 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1124 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1250 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1370 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1471 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1538 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 1562 - 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 885 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1020 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1176 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1351 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1538 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1724 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1887 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2000 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 2041 - 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1000 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1176 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1389 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1639 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1923 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2222 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2500 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2703 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 2778 - 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1124 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1351 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1639 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2000 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2439 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2941 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3448 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3846 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 4000 - 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1250 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1538 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1923 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 2439 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 3125 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 4000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5000 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5882 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 6250 - 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1370 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1724 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2222 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2941 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 4000 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 5556 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 7692 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 10000 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 11111 - 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1471 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1887 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 2500 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 3448 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 5000 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 7692 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 12500 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 20000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 25000 - 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 1538 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2000 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2703 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 3846 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 5882 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 10000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 20000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 50000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 100000 - 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 1538 1471 1370 1250 1124 1000 885 781 885 1000 1124 1250 1370 1471 1538 1562 2000 1887 1724 1538 1351 1176 1020 885 1020 1176 1351 1538 1724 1887 2000 2041 2703 2500 2222 1923 1639 1389 1176 1000 1176 1389 1639 1923 2222 2500 2703 2778 3846 3448 2941 2439 2000 1639 1351 1124 1351 1639 2000 2439 2941 3448 3846 4000 5882 5000 4000 3125 2439 1923 1538 1250 1538 1923 2439 3125 4000 5000 5882 6250 10000 7692 5556 4000 2941 2222 1724 1370 1724 2222 2941 4000 5556 7692 10000 11111 20000 12500 7692 5000 3448 2500 1887 1471 1887 2500 3448 5000 7692 12500 20000 25000 50000 20000 10000 5882 3846 2703 2000 1538 2000 2703 3846 5882 10000 20000 50000 100000 100000 25000 11111 6250 4000 2778 2041 1562 2041 2778 4000 6250 11111 25000 100000 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai25a.dat b/trunk/paradiseo-peo/tutorial/benchs/tai25a.dat deleted file mode 100755 index 68ee91b1f..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai25a.dat +++ /dev/null @@ -1,53 +0,0 @@ - 25 1167256 - - 0 92 69 62 32 97 5 39 50 82 93 71 35 14 20 74 49 50 37 79 19 51 70 42 26 - 92 0 79 98 60 35 9 96 70 21 37 37 67 93 93 39 2 52 26 90 26 1 68 93 7 - 69 79 0 94 19 54 37 0 20 12 11 66 84 80 1 55 9 21 12 65 7 17 51 84 87 - 62 98 94 0 2 27 82 71 71 40 93 27 93 92 34 39 31 26 1 87 72 59 97 46 62 - 32 60 19 2 0 12 91 63 70 1 22 49 24 58 62 49 94 92 63 13 45 22 69 70 18 - 97 35 54 27 12 0 1 44 32 3 72 99 34 45 18 96 82 79 75 83 43 26 81 39 66 - 5 9 37 82 91 1 0 22 71 58 42 91 56 27 56 28 64 98 69 69 93 35 41 67 12 - 39 96 0 71 63 44 22 0 33 1 71 72 26 86 67 67 24 10 46 56 56 69 53 48 74 - 50 70 20 71 70 32 71 33 0 43 94 29 64 97 38 12 99 51 87 76 71 47 47 9 71 - 82 21 12 40 1 3 58 1 43 0 20 81 99 45 56 15 99 64 57 84 83 61 25 41 8 - 93 37 11 93 22 72 42 71 94 20 0 46 52 22 33 68 52 28 75 99 6 85 65 47 90 - 71 37 66 27 49 99 91 72 29 81 46 0 24 79 70 28 19 87 80 4 21 34 12 20 67 - 35 67 84 93 24 34 56 26 64 99 52 24 0 24 94 10 64 52 92 49 68 65 66 28 81 - 14 93 80 92 58 45 27 86 97 45 22 79 24 0 17 58 99 90 70 17 57 37 2 37 3 - 20 93 1 34 62 18 56 67 38 56 33 70 94 17 0 43 20 68 35 60 23 48 40 10 42 - 74 39 55 39 49 96 28 67 12 15 68 28 10 58 43 0 83 82 27 49 15 34 50 42 26 - 49 2 9 31 94 82 64 24 99 99 52 19 64 99 20 83 0 33 23 16 69 97 13 35 80 - 50 52 21 26 92 79 98 10 51 64 28 87 52 90 68 82 33 0 40 55 30 22 76 55 56 - 37 26 12 1 63 75 69 46 87 57 75 80 92 70 35 27 23 40 0 91 74 82 96 2 13 - 79 90 65 87 13 83 69 56 76 84 99 4 49 17 60 49 16 55 91 0 4 4 35 48 29 - 19 26 7 72 45 43 93 56 71 83 6 21 68 57 23 15 69 30 74 4 0 42 56 3 30 - 51 1 17 59 22 26 35 69 47 61 85 34 65 37 48 34 97 22 82 4 42 0 60 81 37 - 70 68 51 97 69 81 41 53 47 25 65 12 66 2 40 50 13 76 96 35 56 60 0 42 3 - 42 93 84 46 70 39 67 48 9 41 47 20 28 37 10 42 35 55 2 48 3 81 42 0 17 - 26 7 87 62 18 66 12 74 71 8 90 67 81 3 42 26 80 56 13 29 30 37 3 17 0 - - 0 21 95 82 56 41 6 25 10 4 63 6 44 40 75 79 0 89 35 9 1 85 84 12 0 - 21 0 26 91 11 35 82 26 69 56 86 45 91 59 18 76 39 18 57 36 61 36 21 71 11 - 95 26 0 29 82 82 6 71 8 77 74 30 89 76 76 40 93 56 1 50 4 36 27 85 2 - 82 91 29 0 1 15 11 35 11 20 21 61 80 58 21 76 72 44 85 94 90 51 3 48 29 - 56 11 82 1 0 90 66 41 15 83 96 74 45 65 40 54 83 14 71 77 36 53 37 26 87 - 41 35 82 15 90 0 76 91 13 29 11 77 32 87 67 94 79 2 10 99 56 70 99 60 4 - 6 82 6 11 66 76 0 56 2 60 72 74 46 13 20 86 4 77 15 89 48 14 89 44 59 - 25 26 71 35 41 91 56 0 22 57 63 6 0 62 41 62 46 25 75 76 40 66 58 30 68 - 10 69 8 11 15 13 2 22 0 78 91 13 59 49 85 84 8 38 41 56 39 53 77 50 30 - 4 56 77 20 83 29 60 57 78 0 58 55 19 85 52 34 53 40 69 12 85 72 7 49 46 - 63 86 74 21 96 11 72 63 91 58 0 87 58 17 68 27 21 6 67 26 82 44 35 3 62 - 6 45 30 61 74 77 74 6 13 55 87 0 8 51 1 91 39 87 72 45 96 7 87 68 33 - 44 91 89 80 45 32 46 0 59 19 58 8 0 3 21 90 45 47 25 30 43 97 33 35 61 - 40 59 76 58 65 87 13 62 49 85 17 51 3 0 42 36 43 7 84 6 0 0 48 62 59 - 75 18 76 21 40 67 20 41 85 52 68 1 21 42 0 29 94 82 29 3 3 51 67 39 15 - 79 76 40 76 54 94 86 62 84 34 27 91 90 36 29 0 66 42 23 62 62 28 76 66 82 - 0 39 93 72 83 79 4 46 8 53 21 39 45 43 94 66 0 98 35 15 17 77 44 26 76 - 89 18 56 44 14 2 77 25 38 40 6 87 47 7 82 42 98 0 86 60 62 62 83 91 57 - 35 57 1 85 71 10 15 75 41 69 67 72 25 84 29 23 35 86 0 62 36 2 2 43 65 - 9 36 50 94 77 99 89 76 56 12 26 45 30 6 3 62 15 60 62 0 37 49 61 5 34 - 1 61 4 90 36 56 48 40 39 85 82 96 43 0 3 62 17 62 36 37 0 53 96 82 48 - 85 36 36 51 53 70 14 66 53 72 44 7 97 0 51 28 77 62 2 49 53 0 28 31 75 - 84 21 27 3 37 99 89 58 77 7 35 87 33 48 67 76 44 83 2 61 96 28 0 1 95 - 12 71 85 48 26 60 44 30 50 49 3 68 35 62 39 66 26 91 43 5 82 31 1 0 7 - 0 11 2 29 87 4 59 68 30 46 62 33 61 59 15 82 76 57 65 34 48 75 95 7 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai25b.dat b/trunk/paradiseo-peo/tutorial/benchs/tai25b.dat deleted file mode 100755 index 6a9facfd3..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai25b.dat +++ /dev/null @@ -1,52 +0,0 @@ - 25 344355646 - - 0 29 68 39 61 52 59 27 54 47 32 68 43 20 67 980 896 931 1011 618 650 565 695 709 720 - 29 0 39 46 71 32 31 33 58 36 3 45 31 42 47 988 903 938 1017 617 645 564 696 709 719 - 68 39 0 70 92 33 24 68 77 47 36 27 44 81 37 1006 920 955 1033 626 648 573 706 718 727 - 39 46 70 0 25 39 74 64 15 26 47 55 26 57 48 1018 934 970 1050 656 687 603 734 747 758 - 61 71 92 25 0 58 98 87 15 45 72 72 47 78 63 1037 954 989 1070 679 711 626 756 770 781 - 52 32 33 39 58 0 46 65 43 14 31 17 13 70 15 1020 934 970 1049 647 673 594 726 739 749 - 59 31 24 74 98 46 0 50 84 56 29 47 52 67 55 983 897 932 1010 604 628 552 684 696 706 - 27 33 68 64 87 65 50 0 79 65 35 78 60 20 80 958 873 908 988 592 623 539 670 683 695 - 54 58 77 15 15 43 84 79 0 30 59 57 33 72 48 1033 949 985 1065 671 701 618 749 762 773 - 47 36 47 26 45 14 56 65 30 0 36 29 5 66 23 1022 938 973 1052 653 680 600 732 745 755 - 32 3 36 47 72 31 29 35 59 36 0 43 31 45 45 989 904 939 1018 617 645 565 696 709 719 - 68 45 27 55 72 17 47 78 57 29 43 0 30 85 10 1028 942 977 1056 651 674 598 731 743 752 - 43 31 44 26 47 13 52 60 33 5 31 30 0 62 25 1018 933 968 1048 648 676 595 727 740 750 - 20 42 81 57 78 70 67 20 72 66 45 85 62 0 85 961 877 912 993 601 634 548 678 692 704 - 67 47 37 48 63 15 55 80 48 23 45 10 25 85 0 1033 948 983 1062 659 683 606 738 750 760 - 980 988 1006 1018 1037 1020 983 958 1033 1022 989 1028 1018 961 1033 0 90 63 75 429 476 470 349 353 366 - 896 903 920 934 954 934 897 873 949 938 904 942 933 877 948 90 0 36 120 339 389 379 260 265 280 - 931 938 955 970 989 970 932 908 985 973 939 977 968 912 983 63 36 0 84 368 413 410 287 290 303 - 1011 1017 1033 1050 1070 1049 1010 988 1065 1052 1018 1056 1048 993 1062 75 120 84 0 433 466 478 349 348 355 - 618 617 626 656 679 647 604 592 671 653 617 651 648 601 659 429 339 368 433 0 92 53 84 92 103 - 650 645 648 687 711 673 628 623 701 680 645 674 676 634 683 476 389 413 466 92 0 118 134 124 111 - 565 564 573 603 626 594 552 539 618 600 565 598 595 548 606 470 379 410 478 53 118 0 134 145 156 - 695 696 706 734 756 726 684 670 749 732 696 731 727 678 738 349 260 287 349 84 134 134 0 23 51 - 709 709 718 747 770 739 696 683 762 745 709 743 740 692 750 353 265 290 348 92 124 145 23 0 29 - 720 719 727 758 781 749 706 695 773 755 719 752 750 704 760 366 280 303 355 103 111 156 51 29 0 - 0 4 9 3 362 0 1 5476 53 0 63 0 0 0 1 1 0 193 0 8 5713 16 7328 6602 0 - 0 0 0 224 0 0 639 18903 0 955 0 10 678 992 0 0 253 0 6557 13210 1 0 180 0 6 - 0 47 0 5 589 43 134 7 0 313 1 406 7280 11 17 121 1 35750 0 0 0 1079 99 12 0 - 3500 0 0 0 9687 0 115 31 0 15485 47 1 116 0 2 1858 256 0 0 25326 0 25715 9 0 0 - 2 623 3 87 0 0 0 0 0 47827 0 2862 0 3839 1 41 45654 53531 0 0 0 0 0 0 0 - 374 0 3904 2060 0 0 0 125 16 31971 3001 0 13 389 539 0 0 0 12025 0 635 5806 4 2 0 - 0 33 184 22120 0 0 0 3 44943 0 0 0 34014 0 0 0 0 8 33 1 0 0 2951 0 0 - 0 0 31 0 1 0 289 0 0 0 168 0 0 19 4 6 0 270 0 3231 0 9125 0 2 0 - 299 86 27831 3362 0 92 28524 5 0 30 0 7 46004 0 1 0 37165 0 0 0 1610 0 0 283 7437 - 30 59 0 0 17751 15918 105 0 0 0 0 6342 0 7 0 63 1 0 0 85 3 305 0 0 56045 - 0 2 615 2 888 777 21 17 0 109 0 39870 7 135 15740 276 28 0 0 0 50543 0 3346 4 5868 - 51309 1 359 0 1126 9 0 0 1066 148 0 0 69 0 0 1 43 0 0 0 0 1 0 9364 0 - 0 3 22 19781 16 14 0 0 183 0 1 93 0 2314 0 0 0 0 2 1 0 0 31 5 0 - 39295 16056 24 10350 0 2085 751 5492 0 0 0 29671 0 0 0 0 2 27718 15 2989 0 3 0 5176 6 - 2820 12 0 56950 14522 0 811 5 21 0 11944 2803 950 180 0 1 48579 82 1 110 1 2871 610 16575 0 - 0 2 42760 6 73 5286 2 763 0 2 27 0 1553 0 14387 0 597 316 176 2 3876 0 17 1906 0 - 83 0 0 0 596 224 189 0 2521 660 0 199 4607 0 0 0 0 4791 1769 4 0 0 30 22140 488 - 0 0 54696 14 37455 7 2544 0 2137 263 122 0 0 0 8 0 3873 0 2 218 8144 0 69 0 0 - 0 60 1456 1 4 7 1918 0 9 2 0 0 2 7302 31848 641 1 0 0 33 0 1 1 0 1 - 1338 1803 1 27 668 0 0 9 12 17945 27 13 0 233 2 6 296 156 4510 0 0 827 0 0 2 - 1548 6 0 0 0 0 0 0 0 0 0 0 1 1652 16 16 0 2 0 2925 0 159 1 0 6 - 22623 0 4341 777 2306 4 0 0 3266 0 1094 0 0 0 0 0 0 1 35562 0 0 0 54970 18 13 - 2 1 1719 22 30 0 0 6 8 0 0 757 3 389 0 0 525 0 0 0 0 0 0 27 1 - 2155 0 0 0 1 0 0 6 16242 1636 20674 30978 17 0 0 0 0 15 2320 0 21 896 10 0 0 - 0 5 0 0 0 346 4 33 2 30468 0 917 0 21429 41 11011 581 0 43 0 0 20 0 20865 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai30a.dat b/trunk/paradiseo-peo/tutorial/benchs/tai30a.dat deleted file mode 100755 index 0ee1acc80..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai30a.dat +++ /dev/null @@ -1,63 +0,0 @@ - 30 1818146 - - 0 27 56 28 64 98 69 69 93 35 41 67 12 33 1 71 72 26 86 67 67 24 10 46 56 56 69 53 48 74 - 27 0 43 94 29 64 97 38 12 99 51 87 76 71 47 47 9 71 20 81 99 45 56 15 99 64 57 84 83 61 - 56 43 0 25 41 8 46 52 22 33 68 52 28 75 99 6 85 65 47 90 24 79 70 28 19 87 80 4 21 34 - 28 94 25 0 12 20 67 24 94 10 64 52 92 49 68 65 66 28 81 17 58 99 90 70 17 57 37 2 37 3 - 64 29 41 12 0 43 20 68 35 60 23 48 40 10 42 83 82 27 49 15 34 50 42 26 33 23 16 69 97 13 - 98 64 8 20 43 0 35 80 40 55 30 22 76 55 56 91 74 82 96 2 13 4 4 35 48 29 42 56 3 30 - 69 97 46 67 20 35 0 60 81 37 42 3 17 25 37 26 88 95 55 53 62 22 44 86 43 43 40 36 53 34 - 69 38 52 24 68 80 60 0 59 43 50 58 62 43 9 22 64 46 68 53 8 30 30 92 6 13 95 76 81 91 - 93 12 22 94 35 40 81 59 0 37 78 90 64 49 46 19 60 93 35 47 69 54 87 12 39 33 54 12 10 4 - 35 99 33 10 60 55 37 43 37 0 88 54 46 82 84 8 29 10 92 62 62 74 48 22 85 23 3 30 12 98 - 41 51 68 64 23 30 42 50 78 88 0 69 29 61 34 53 98 94 33 77 31 54 71 78 8 78 50 76 56 80 - 67 87 52 52 48 22 3 58 90 54 69 0 72 26 20 57 39 68 55 71 19 32 87 41 94 21 21 20 61 13 - 12 76 28 92 40 76 17 62 64 46 29 72 0 5 46 97 61 8 92 33 73 0 16 73 74 44 55 96 67 94 - 33 71 75 49 10 55 25 43 49 82 61 26 5 0 83 28 22 78 55 89 11 99 84 56 30 90 87 80 20 66 - 1 47 99 68 42 56 37 9 46 84 34 20 46 83 0 59 93 79 80 28 68 99 54 69 99 1 49 63 23 33 - 71 47 6 65 83 91 26 22 19 8 53 57 97 28 59 0 99 40 29 60 95 28 44 30 88 66 9 41 3 4 - 72 9 85 66 82 74 88 64 60 29 98 39 61 22 93 99 0 63 61 87 34 28 55 63 10 78 17 90 0 66 - 26 71 65 28 27 82 95 46 93 10 94 68 8 78 79 40 63 0 62 30 76 0 91 62 73 38 49 85 86 88 - 86 20 47 81 49 96 55 68 35 92 33 55 92 55 80 29 61 62 0 13 71 46 75 98 53 52 10 84 70 44 - 67 81 90 17 15 2 53 53 47 62 77 71 33 89 28 60 87 30 13 0 8 52 59 48 85 29 94 79 4 85 - 67 99 24 58 34 13 62 8 69 62 31 19 73 11 68 95 34 76 71 8 0 31 54 95 75 81 11 56 38 95 - 24 45 79 99 50 4 22 30 54 74 54 32 0 99 99 28 28 0 46 52 31 0 37 67 54 88 93 53 44 68 - 10 56 70 90 42 4 44 30 87 48 71 87 16 84 54 44 55 91 75 59 54 37 0 58 98 55 84 76 19 46 - 46 15 28 70 26 35 86 92 12 22 78 41 73 56 69 30 63 62 98 48 95 67 58 0 89 89 5 23 63 19 - 56 99 19 17 33 48 43 6 39 85 8 94 74 30 99 88 10 73 53 85 75 54 98 89 0 53 20 47 17 66 - 56 64 87 57 23 29 43 13 33 23 78 21 44 90 1 66 78 38 52 29 81 88 55 89 53 0 60 86 14 52 - 69 57 80 37 16 42 40 95 54 3 50 21 55 87 49 9 17 49 10 94 11 93 84 5 20 60 0 27 77 5 - 53 84 4 2 69 56 36 76 12 30 76 20 96 80 63 41 90 85 84 79 56 53 76 23 47 86 27 0 37 27 - 48 83 21 37 97 3 53 81 10 12 56 61 67 20 23 3 0 86 70 4 38 44 19 63 17 14 77 37 0 53 - 74 61 34 3 13 30 34 91 4 98 80 13 94 66 33 4 66 88 44 85 95 68 46 19 66 52 5 27 53 0 - - 0 21 95 82 56 41 6 25 10 4 63 6 44 40 75 79 0 89 35 9 1 85 84 12 0 26 91 11 35 82 - 21 0 26 69 56 86 45 91 59 18 76 39 18 57 36 61 36 21 71 11 29 82 82 6 71 8 77 74 30 89 - 95 26 0 76 76 40 93 56 1 50 4 36 27 85 2 1 15 11 35 11 20 21 61 80 58 21 76 72 44 85 - 82 69 76 0 94 90 51 3 48 29 90 66 41 15 83 96 74 45 65 40 54 83 14 71 77 36 53 37 26 87 - 56 56 76 94 0 76 91 13 29 11 77 32 87 67 94 79 2 10 99 56 70 99 60 4 56 2 60 72 74 46 - 41 86 40 90 76 0 13 20 86 4 77 15 89 48 14 89 44 59 22 57 63 6 0 62 41 62 46 25 75 76 - 6 45 93 51 91 13 0 40 66 58 30 68 78 91 13 59 49 85 84 8 38 41 56 39 53 77 50 30 58 55 - 25 91 56 3 13 20 40 0 19 85 52 34 53 40 69 12 85 72 7 49 46 87 58 17 68 27 21 6 67 26 - 10 59 1 48 29 86 66 19 0 82 44 35 3 62 8 51 1 91 39 87 72 45 96 7 87 68 33 3 21 90 - 4 18 50 29 11 4 58 85 82 0 45 47 25 30 43 97 33 35 61 42 36 43 7 84 6 0 0 48 62 59 - 63 76 4 90 77 77 30 52 44 45 0 29 94 82 29 3 3 51 67 39 15 66 42 23 62 62 28 76 66 82 - 6 39 36 66 32 15 68 34 35 47 29 0 98 35 15 17 77 44 26 76 86 60 62 62 83 91 57 62 36 2 - 44 18 27 41 87 89 78 53 3 25 94 98 0 2 43 65 37 49 61 5 34 53 96 82 48 28 31 75 1 95 - 40 57 85 15 67 48 91 40 62 30 82 35 2 0 7 92 69 62 32 97 5 39 50 82 93 71 35 14 20 74 - 75 36 2 83 94 14 13 69 8 43 29 15 43 7 0 49 50 37 79 19 51 70 42 26 79 98 60 35 9 96 - 79 61 1 96 79 89 59 12 51 97 3 17 65 92 49 0 70 21 37 37 67 93 93 39 2 52 26 90 26 1 - 0 36 15 74 2 44 49 85 1 33 3 77 37 69 50 70 0 68 93 7 94 19 54 37 0 20 12 11 66 84 - 89 21 11 45 10 59 85 72 91 35 51 44 49 62 37 21 68 0 80 1 55 9 21 12 65 7 17 51 84 87 - 35 71 35 65 99 22 84 7 39 61 67 26 61 32 79 37 93 80 0 2 27 82 71 71 40 93 27 93 92 34 - 9 11 11 40 56 57 8 49 87 42 39 76 5 97 19 37 7 1 2 0 39 31 26 1 87 72 59 97 46 62 - 1 29 20 54 70 63 38 46 72 36 15 86 34 5 51 67 94 55 27 39 0 12 91 63 70 1 22 49 24 58 - 85 82 21 83 99 6 41 87 45 43 66 60 53 39 70 93 19 9 82 31 12 0 62 49 94 92 63 13 45 22 - 84 82 61 14 60 0 56 58 96 7 42 62 96 50 42 93 54 21 71 26 91 62 0 69 70 18 1 44 32 3 - 12 6 80 71 4 62 39 17 7 84 23 62 82 82 26 39 37 12 71 1 63 49 69 0 72 99 34 45 18 96 - 0 71 58 77 56 41 53 68 87 6 62 83 48 93 79 2 0 65 40 87 70 94 70 72 0 82 79 75 83 43 - 26 8 21 36 2 62 77 27 68 0 62 91 28 71 98 52 20 7 93 72 1 92 18 99 82 0 26 81 39 66 - 91 77 76 53 60 46 50 21 33 0 28 57 31 35 60 26 12 17 27 59 22 63 1 34 79 26 0 22 71 58 - 11 74 72 37 72 25 30 6 3 48 76 62 75 14 35 90 11 51 93 97 49 13 44 45 75 81 22 0 42 91 - 35 30 44 26 74 75 58 67 21 62 66 36 1 20 9 26 66 84 92 46 24 45 32 18 83 39 71 42 0 56 - 82 89 85 87 46 76 55 26 90 59 82 2 95 74 96 1 84 87 34 62 58 22 3 96 43 66 58 91 56 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai30b.dat b/trunk/paradiseo-peo/tutorial/benchs/tai30b.dat deleted file mode 100755 index 456b73b68..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai30b.dat +++ /dev/null @@ -1,62 +0,0 @@ - 30 637117113 - - 0 51 61 27 49 39 41 78 72 33 986 1094 1040 1043 1054 999 1001 1053 981 1041 1087 1004 1101 1042 1084 997 320 319 319 319 - 51 0 35 33 24 12 24 54 31 22 1036 1144 1090 1093 1105 1050 1052 1103 1032 1092 1137 1054 1152 1092 1134 1048 313 312 311 311 - 61 35 0 58 58 40 56 20 63 49 1032 1141 1087 1090 1101 1046 1051 1101 1028 1089 1134 1052 1151 1090 1130 1048 348 347 346 346 - 27 33 58 0 23 21 15 77 47 11 1009 1117 1063 1066 1078 1023 1024 1076 1005 1064 1110 1027 1124 1065 1108 1019 301 300 299 299 - 49 24 58 23 0 20 8 77 24 18 1032 1140 1086 1088 1100 1045 1046 1098 1027 1086 1132 1049 1146 1087 1130 1041 291 290 290 289 - 39 12 40 21 20 0 16 60 36 10 1025 1133 1079 1082 1093 1039 1041 1092 1021 1080 1126 1043 1140 1081 1123 1036 310 310 309 309 - 41 24 56 15 8 16 0 75 32 10 1024 1132 1078 1081 1092 1037 1038 1090 1019 1079 1124 1042 1138 1079 1122 1033 295 295 294 294 - 78 54 20 77 77 60 75 0 80 68 1037 1146 1092 1095 1106 1051 1057 1106 1033 1095 1140 1057 1157 1096 1135 1054 366 365 365 365 - 72 31 63 47 24 36 32 80 0 40 1056 1164 1110 1113 1124 1070 1070 1123 1052 1111 1157 1074 1170 1111 1154 1065 287 286 285 285 - 33 22 49 11 18 10 10 68 40 0 1018 1126 1072 1075 1086 1031 1033 1085 1013 1073 1118 1036 1133 1073 1116 1028 305 304 304 304 - 986 1036 1032 1009 1032 1025 1024 1037 1056 1018 0 108 55 60 70 16 82 76 4 67 105 35 144 75 98 109 1135 1135 1134 1136 - 1094 1144 1141 1117 1140 1133 1132 1146 1164 1126 108 0 54 53 40 95 120 51 113 62 25 93 84 69 16 145 1238 1237 1237 1238 - 1040 1090 1087 1063 1086 1079 1078 1092 1110 1072 55 54 0 8 15 40 80 27 59 26 50 41 98 40 47 109 1184 1184 1183 1185 - 1043 1093 1090 1066 1088 1082 1081 1095 1113 1075 60 53 8 0 13 45 75 19 64 18 45 41 90 32 48 103 1185 1185 1184 1186 - 1054 1105 1101 1078 1100 1093 1092 1106 1124 1086 70 40 15 13 0 55 87 22 74 28 36 53 88 40 35 114 1198 1197 1197 1198 - 999 1050 1046 1023 1045 1039 1037 1051 1070 1031 16 95 40 45 55 0 72 60 20 50 90 22 128 60 86 101 1146 1146 1145 1147 - 1001 1052 1051 1024 1046 1041 1038 1057 1070 1033 82 120 80 75 87 72 0 70 82 60 101 50 100 51 121 30 1129 1128 1128 1129 - 1053 1103 1101 1076 1098 1092 1090 1106 1123 1085 76 51 27 19 22 60 70 0 79 12 34 49 71 20 52 95 1191 1190 1190 1191 - 981 1032 1028 1005 1027 1021 1019 1033 1052 1013 4 113 59 64 74 20 82 79 0 70 109 37 147 78 103 109 1131 1130 1130 1131 - 1041 1092 1089 1064 1086 1080 1079 1095 1111 1073 67 62 26 18 28 50 60 12 70 0 46 38 78 14 61 87 1179 1178 1178 1179 - 1087 1137 1134 1110 1132 1126 1124 1140 1157 1118 105 25 50 45 36 90 101 34 109 46 0 83 61 50 36 123 1225 1225 1224 1226 - 1004 1054 1052 1027 1049 1043 1042 1057 1074 1036 35 93 41 41 53 22 50 49 37 38 83 0 112 43 88 80 1144 1144 1144 1145 - 1101 1152 1151 1124 1146 1140 1138 1157 1170 1133 144 84 98 90 88 128 100 71 147 78 61 112 0 69 97 108 1224 1224 1223 1225 - 1042 1092 1090 1065 1087 1081 1079 1096 1111 1073 75 69 40 32 40 60 51 20 78 14 50 43 69 0 72 76 1176 1176 1175 1177 - 1084 1134 1130 1108 1130 1123 1122 1135 1154 1116 98 16 47 48 35 86 121 52 103 61 36 88 97 72 0 147 1231 1231 1230 1232 - 997 1048 1048 1019 1041 1036 1033 1054 1065 1028 109 145 109 103 114 101 30 95 109 87 123 80 108 76 147 0 1116 1116 1116 1117 - 320 313 348 301 291 310 295 366 287 305 1135 1238 1184 1185 1198 1146 1129 1191 1131 1179 1225 1144 1224 1176 1231 1116 0 1 1 2 - 319 312 347 300 290 310 295 365 286 304 1135 1237 1184 1185 1197 1146 1128 1190 1130 1178 1225 1144 1224 1176 1231 1116 1 0 0 2 - 319 311 346 299 290 309 294 365 285 304 1134 1237 1183 1184 1197 1145 1128 1190 1130 1178 1224 1144 1223 1175 1230 1116 1 0 0 2 - 319 311 346 299 289 309 294 365 285 304 1136 1238 1185 1186 1198 1147 1129 1191 1131 1179 1226 1145 1225 1177 1232 1117 2 2 2 0 - 0 0 0 0 50 146 0 0 0 5 0 723 0 0 0 0 84 0 0 2358 3 585 0 0 2392 1781 38 2 45 0 - 1207 0 3 91 14 0 0 21 9677 0 0 3849 7 0 13427 2 0 0 0 1 0 0 8 0 73 31413 538 1388 0 0 - 1062 0 0 358 2546 1044 0 616 4771 0 5 14 5372 0 3 1 0 75 0 2 172 0 0 0 1 0 0 0 0 24673 - 1 11999 3 0 0 0 88 0 285 8 27238 27 0 0 2976 6 3065 0 5560 13681 3 7917 88 2 3201 25876 7 55 0 0 - 85 2007 0 0 0 0 0 1 43 771 31752 0 0 7 5 0 0 1838 11832 0 1972 0 2 616 0 0 17 0 0 0 - 6137 3939 0 422 4 0 8108 701 156 13660 0 2205 74 3 24111 0 0 359 6853 0 3 0 0 355 0 11993 0 3355 4 157 - 2 274 1 143 15940 1949 0 2257 0 90 0 4 12 2375 0 1470 0 7342 0 3 12 0 0 0 2 3 0 0 3067 506 - 2 0 12642 0 0 0 0 0 2 0 436 0 6 14218 0 0 67 0 8 38921 0 0 48 6 14872 0 6369 49 0 217 - 60 0 1 1 0 14747 7 0 0 0 0 17 0 3 0 0 0 0 2 230 24 1014 22 0 544 0 12020 7456 235 29 - 0 6538 2 123 5839 0 47 1492 28737 0 2 0 3 0 465 16 0 11 0 6 0 1803 156 45193 2888 38 42 0 38982 3 - 0 0 1 0 5295 634 0 23998 0 6063 0 0 0 0 0 0 1 0 1054 38106 0 0 377 0 0 0 0 0 11440 0 - 469 7 0 0 0 0 0 77 8 87 1 0 189 0 2446 14 0 12091 19 1 0 0 1 1 64 0 1 4 10808 6901 - 1581 55 0 118 0 0 0 147 3 6624 0 54233 0 1050 5 391 726 0 29129 0 503 37 0 0 0 0 119 5 13 801 - 1 1017 1 14522 0 4675 0 560 76 0 0 5 0 0 0 0 1679 4 0 0 18 6 4120 0 0 0 0 18 482 1 - 0 0 314 1 706 352 0 0 2209 0 2807 863 20 36 0 0 333 0 0 0 3 7 0 0 0 26 16 4 0 52381 - 57116 0 18969 0 1015 2 0 203 59 495 1 0 1 5 59 0 1 5078 0 0 3111 0 1 10096 0 226 0 4 1 0 - 34468 0 0 1 0 102 0 0 222 0 2482 0 440 0 32162 21 0 1 0 41725 32593 0 0 53 0 0 1 6173 5 5668 - 0 4 1 9178 0 3 0 3118 0 0 0 1 11 0 0 0 0 0 0 0 34201 1461 0 23 9 3 0 0 0 48 - 5 5592 1 6062 0 9561 209 32 8 0 0 18783 0 1 0 3269 573 0 0 0 0 4 0 1943 0 7987 338 7807 1 18894 - 4374 5355 5481 0 49 1 0 4380 11654 0 0 30 0 0 1 0 48 52 0 0 45804 16 0 0 0 32 0 0 1 39162 - 0 1248 0 234 0 0 3033 961 0 0 0 0 0 40 0 2 435 0 0 0 0 1 4 0 9 18 0 0 44 932 - 910 22109 67 5 0 3 0 2523 50 93 130 37 0 0 4394 5 7961 0 0 0 0 0 0 55506 0 1624 0 14435 1 14539 - 0 1 0 53 0 74 22618 4133 1 0 0 0 5 4626 92 0 0 0 782 0 0 19 0 0 0 3 0 147 0 0 - 0 296 35 0 0 8 0 48 9 0 0 0 0 0 0 0 0 16835 7 0 3296 0 8716 0 61 15719 57 0 0 0 - 21 0 0 0 607 16 250 1 1 596 345 4 254 31 0 0 0 18 0 16 0 0 0 0 0 219 7940 0 0 485 - 0 692 3 0 0 0 0 0 53067 0 0 24 0 0 0 8 850 167 0 0 5796 0 0 0 3405 0 2 9881 0 0 - 3 0 0 4 19 621 22 0 22789 8731 0 68 0 0 78 0 0 35125 0 0 2 0 50751 100 800 1721 0 0 21 577 - 0 21 17468 0 0 0 101 0 19468 1891 8015 8 0 10 0 0 45 0 0 1 1 0 0 3531 2 0 0 0 25235 1 - 0 0 9 2 2 38543 1 20324 0 66 0 0 436 245 339 0 0 0 135 12430 462 9456 20627 0 0 0 132 0 0 0 - 0 1233 1 0 3 3589 14 212 0 1 10250 0 96 25777 2 199 0 0 0 0 0 2 0 0 3 139 0 45268 0 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai35a.dat b/trunk/paradiseo-peo/tutorial/benchs/tai35a.dat deleted file mode 100755 index d314aab6c..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai35a.dat +++ /dev/null @@ -1,73 +0,0 @@ - 35 2422002 - - 0 81 37 42 3 17 25 37 26 88 95 55 53 62 22 44 86 43 43 40 36 53 34 59 43 50 58 62 43 9 22 64 46 68 53 - 81 0 8 30 30 92 6 13 95 76 81 91 37 78 90 64 49 46 19 60 93 35 47 69 54 87 12 39 33 54 12 10 4 88 54 - 37 8 0 46 82 84 8 29 10 92 62 62 74 48 22 85 23 3 30 12 98 69 29 61 34 53 98 94 33 77 31 54 71 78 8 - 42 30 46 0 78 50 76 56 80 72 26 20 57 39 68 55 71 19 32 87 41 94 21 21 20 61 13 5 46 97 61 8 92 33 73 - 3 30 82 78 0 0 16 73 74 44 55 96 67 94 83 28 22 78 55 89 11 99 84 56 30 90 87 80 20 66 59 93 79 80 28 - 17 92 84 50 0 0 68 99 54 69 99 1 49 63 23 33 99 40 29 60 95 28 44 30 88 66 9 41 3 4 63 61 87 34 28 - 25 6 8 76 16 68 0 55 63 10 78 17 90 0 66 62 30 76 0 91 62 73 38 49 85 86 88 13 71 46 75 98 53 52 10 - 37 13 29 56 73 99 55 0 84 70 44 8 52 59 48 85 29 94 79 4 85 31 54 95 75 81 11 56 38 95 37 67 54 88 93 - 26 95 10 80 74 54 63 84 0 53 44 68 58 98 55 84 76 19 46 89 89 5 23 63 19 53 20 47 17 66 60 86 14 52 27 - 88 76 92 72 44 69 10 70 53 0 77 5 37 27 53 88 84 63 1 26 18 85 59 24 64 81 12 72 32 64 18 79 23 56 63 - 95 81 62 26 55 99 78 44 44 77 0 2 78 3 32 3 2 18 89 50 69 66 20 97 52 81 42 28 71 71 53 87 31 36 99 - 55 91 62 20 96 1 17 8 68 5 2 0 98 38 97 26 31 60 83 43 16 91 96 52 48 12 17 13 35 7 96 17 59 26 30 - 53 37 74 57 67 49 90 52 58 37 78 98 0 43 53 26 37 93 35 49 33 87 55 48 63 81 55 12 28 79 62 63 11 56 0 - 62 78 48 39 94 63 0 59 98 27 3 38 43 0 10 34 1 75 62 33 68 51 53 80 84 40 3 32 27 32 61 27 92 25 2 - 22 90 22 68 83 23 66 48 55 53 32 97 53 10 0 15 9 30 0 97 24 14 10 84 56 83 0 16 67 2 5 98 73 47 81 - 44 64 85 55 28 33 62 85 84 88 3 26 26 34 15 0 88 39 46 13 9 89 96 30 66 37 2 0 1 8 84 99 7 62 58 - 86 49 23 71 22 99 30 29 76 84 2 31 37 1 9 88 0 49 93 47 53 34 39 8 86 18 52 4 95 3 80 9 3 5 26 - 43 46 3 19 78 40 76 94 19 63 18 60 93 75 30 39 49 0 36 92 8 94 75 8 64 73 47 68 78 8 40 6 31 85 47 - 43 19 30 32 55 29 0 79 46 1 89 83 35 62 0 46 93 36 0 96 5 98 44 86 0 93 53 16 87 94 23 61 80 35 17 - 40 60 12 87 89 60 91 4 89 26 50 43 49 33 97 13 47 92 96 0 45 51 26 54 59 57 25 99 87 34 79 24 41 29 7 - 36 93 98 41 11 95 62 85 89 18 69 16 33 68 24 9 53 8 5 45 0 26 71 36 18 57 16 28 1 24 68 56 81 1 54 - 53 35 69 94 99 28 73 31 5 85 66 91 87 51 14 89 34 94 98 51 26 0 22 67 44 6 46 30 0 86 73 15 81 68 36 - 34 47 29 21 84 44 38 54 23 59 20 96 55 53 10 96 39 75 44 26 71 22 0 12 65 18 59 93 34 92 82 69 3 24 94 - 59 69 61 21 56 30 49 95 63 24 97 52 48 80 84 30 8 8 86 54 36 67 12 0 53 66 98 6 98 30 31 41 74 23 56 - 43 54 34 20 30 88 85 75 19 64 52 48 63 84 56 66 86 64 0 59 18 44 65 53 0 15 63 91 67 10 63 5 20 27 20 - 50 87 53 61 90 66 86 81 53 81 81 12 81 40 83 37 18 73 93 57 57 6 18 66 15 0 15 75 56 89 93 60 37 44 41 - 58 12 98 13 87 9 88 11 20 12 42 17 55 3 0 2 52 47 53 25 16 46 59 98 63 15 0 76 25 6 62 60 51 57 79 - 62 39 94 5 80 41 13 56 47 72 28 13 12 32 16 0 4 68 16 99 28 30 93 6 91 75 76 0 34 41 82 95 15 94 12 - 43 33 33 46 20 3 71 38 17 32 71 35 28 27 67 1 95 78 87 87 1 0 34 98 67 56 25 34 0 90 49 82 56 75 39 - 9 54 77 97 66 4 46 95 66 64 71 7 79 32 2 8 3 8 94 34 24 86 92 30 10 89 6 41 90 0 48 84 15 45 93 - 22 12 31 61 59 63 75 37 60 18 53 96 62 61 5 84 80 40 23 79 68 73 82 31 63 93 62 82 49 48 0 74 87 39 10 - 64 10 54 8 93 61 98 67 86 79 87 17 63 27 98 99 9 6 61 24 56 15 69 41 5 60 60 95 82 84 74 0 81 54 80 - 46 4 71 92 79 87 53 54 14 23 31 59 11 92 73 7 3 31 80 41 81 81 3 74 20 37 51 15 56 15 87 81 0 88 13 - 68 88 78 33 80 34 52 88 52 56 36 26 56 25 47 62 5 85 35 29 1 68 24 23 27 44 57 94 75 45 39 54 88 0 62 - 53 54 8 73 28 28 10 93 27 63 99 30 0 2 81 58 26 47 17 7 54 36 94 56 20 41 79 12 39 93 10 80 13 62 0 - - 0 21 95 82 56 41 6 25 10 4 63 6 44 40 75 79 0 89 35 9 1 85 84 12 0 26 91 11 35 82 26 69 56 86 45 - 21 0 91 59 18 76 39 18 57 36 61 36 21 71 11 29 82 82 6 71 8 77 74 30 89 76 76 40 93 56 1 50 4 36 27 - 95 91 0 85 2 1 15 11 35 11 20 21 61 80 58 21 76 72 44 85 94 90 51 3 48 29 90 66 41 15 83 96 74 45 65 - 82 59 85 0 40 54 83 14 71 77 36 53 37 26 87 76 91 13 29 11 77 32 87 67 94 79 2 10 99 56 70 99 60 4 56 - 56 18 2 40 0 2 60 72 74 46 13 20 86 4 77 15 89 48 14 89 44 59 22 57 63 6 0 62 41 62 46 25 75 76 40 - 41 76 1 54 2 0 66 58 30 68 78 91 13 59 49 85 84 8 38 41 56 39 53 77 50 30 58 55 19 85 52 34 53 40 69 - 6 39 15 83 60 66 0 12 85 72 7 49 46 87 58 17 68 27 21 6 67 26 82 44 35 3 62 8 51 1 91 39 87 72 45 - 25 18 11 14 72 58 12 0 96 7 87 68 33 3 21 90 45 47 25 30 43 97 33 35 61 42 36 43 7 84 6 0 0 48 62 - 10 57 35 71 74 30 85 96 0 59 29 94 82 29 3 3 51 67 39 15 66 42 23 62 62 28 76 66 82 98 35 15 17 77 44 - 4 36 11 77 46 68 72 7 59 0 26 76 86 60 62 62 83 91 57 62 36 2 2 43 65 37 49 61 5 34 53 96 82 48 28 - 63 61 20 36 13 78 7 87 29 26 0 31 75 1 95 7 92 69 62 32 97 5 39 50 82 93 71 35 14 20 74 49 50 37 79 - 6 36 21 53 20 91 49 68 94 76 31 0 19 51 70 42 26 79 98 60 35 9 96 70 21 37 37 67 93 93 39 2 52 26 90 - 44 21 61 37 86 13 46 33 82 86 75 19 0 26 1 68 93 7 94 19 54 37 0 20 12 11 66 84 80 1 55 9 21 12 65 - 40 71 80 26 4 59 87 3 29 60 1 51 26 0 7 17 51 84 87 2 27 82 71 71 40 93 27 93 92 34 39 31 26 1 87 - 75 11 58 87 77 49 58 21 3 62 95 70 1 7 0 72 59 97 46 62 12 91 63 70 1 22 49 24 58 62 49 94 92 63 13 - 79 29 21 76 15 85 17 90 3 62 7 42 68 17 72 0 45 22 69 70 18 1 44 32 3 72 99 34 45 18 96 82 79 75 83 - 0 82 76 91 89 84 68 45 51 83 92 26 93 51 59 45 0 43 26 81 39 66 22 71 58 42 91 56 27 56 28 64 98 69 69 - 89 82 72 13 48 8 27 47 67 91 69 79 7 84 97 22 43 0 93 35 41 67 12 33 1 71 72 26 86 67 67 24 10 46 56 - 35 6 44 29 14 38 21 25 39 57 62 98 94 87 46 69 26 93 0 56 69 53 48 74 43 94 29 64 97 38 12 99 51 87 76 - 9 71 85 11 89 41 6 30 15 62 32 60 19 2 62 70 81 35 56 0 71 47 47 9 71 20 81 99 45 56 15 99 64 57 84 - 1 8 94 77 44 56 67 43 66 36 97 35 54 27 12 18 39 41 69 71 0 83 61 25 41 8 46 52 22 33 68 52 28 75 99 - 85 77 90 32 59 39 26 97 42 2 5 9 37 82 91 1 66 67 53 47 83 0 6 85 65 47 90 24 79 70 28 19 87 80 4 - 84 74 51 87 22 53 82 33 23 2 39 96 0 71 63 44 22 12 48 47 61 6 0 21 34 12 20 67 24 94 10 64 52 92 49 - 12 30 3 67 57 77 44 35 62 43 50 70 20 71 70 32 71 33 74 9 25 85 21 0 68 65 66 28 81 17 58 99 90 70 17 - 0 89 48 94 63 50 35 61 62 65 82 21 12 40 1 3 58 1 43 71 41 65 34 68 0 57 37 2 37 3 43 20 68 35 60 - 26 76 29 79 6 30 3 42 28 37 93 37 11 93 22 72 42 71 94 20 8 47 12 65 57 0 23 48 40 10 42 83 82 27 49 - 91 76 90 2 0 58 62 36 76 49 71 37 66 27 49 99 91 72 29 81 46 90 20 66 37 23 0 15 34 50 42 26 33 23 16 - 11 40 66 10 62 55 8 43 66 61 35 67 84 93 24 34 56 26 64 99 52 24 67 28 2 48 15 0 69 97 13 35 80 40 55 - 35 93 41 99 41 19 51 7 82 5 14 93 80 92 58 45 27 86 97 45 22 79 24 81 37 40 34 69 0 30 22 76 55 56 91 - 82 56 15 56 62 85 1 84 98 34 20 93 1 34 62 18 56 67 38 56 33 70 94 17 3 10 50 97 30 0 74 82 96 2 13 - 26 1 83 70 46 52 91 6 35 53 74 39 55 39 49 96 28 67 12 15 68 28 10 58 43 42 42 13 22 74 0 4 4 35 48 - 69 50 96 99 25 34 39 0 15 96 49 2 9 31 94 82 64 24 99 99 52 19 64 99 20 83 26 35 76 82 4 0 29 42 56 - 56 4 74 60 75 53 87 0 17 82 50 52 21 26 92 79 98 10 51 64 28 87 52 90 68 82 33 80 55 96 4 29 0 3 30 - 86 36 45 4 76 40 72 48 77 48 37 26 12 1 63 75 69 46 87 57 75 80 92 70 35 27 23 40 56 2 35 42 3 0 60 - 45 27 65 56 40 69 45 62 44 28 79 90 65 87 13 83 69 56 76 84 99 4 49 17 60 49 16 55 91 13 48 56 30 60 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai35b.dat b/trunk/paradiseo-peo/tutorial/benchs/tai35b.dat deleted file mode 100755 index 5ea3940bf..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai35b.dat +++ /dev/null @@ -1,72 +0,0 @@ - 35 283315445 - - 0 15 31 38 42 35 57 50 13 27 27 36 49 15 24 33 42 60 622 625 704 659 588 697 705 586 702 644 689 618 635 695 606 631 617 - 15 0 42 46 31 45 47 46 9 19 39 20 41 3 18 45 47 47 634 637 694 646 577 686 693 574 691 633 676 607 625 682 593 617 603 - 31 42 0 13 52 6 60 43 44 39 6 56 51 40 34 4 19 70 592 595 697 661 585 694 703 586 699 640 691 615 628 696 611 638 622 - 38 46 13 0 47 7 52 34 50 37 18 56 44 43 33 15 7 64 590 593 685 650 574 682 692 575 687 629 680 603 616 685 602 628 612 - 42 31 52 47 0 51 16 24 40 15 52 19 13 29 19 56 44 18 633 636 663 617 547 656 663 544 661 602 647 576 594 652 565 590 575 - 35 45 6 7 51 0 57 40 47 39 12 57 49 42 35 8 14 68 590 593 692 657 580 689 698 581 694 635 687 610 623 692 608 634 619 - 57 47 60 52 16 57 0 20 56 30 62 35 9 45 33 64 47 16 628 632 648 604 532 641 648 530 646 587 633 562 578 639 553 579 563 - 50 46 43 34 24 40 20 0 54 27 47 42 13 43 28 48 28 35 610 613 656 617 543 651 660 542 657 598 647 572 587 653 568 595 579 - 13 9 44 50 40 47 56 54 0 27 40 27 50 11 26 46 52 55 636 638 703 654 586 695 701 582 700 641 684 615 633 690 600 624 610 - 27 19 39 37 15 39 30 27 27 0 38 19 23 16 4 43 36 34 626 629 677 632 561 670 678 559 675 617 662 591 608 668 580 606 591 - 27 39 6 18 52 12 62 47 40 38 0 55 53 37 34 7 25 71 596 599 702 664 589 698 707 589 703 645 694 619 633 700 614 641 625 - 36 20 56 56 19 57 35 42 27 19 55 0 32 20 23 60 55 29 645 649 677 627 559 668 674 555 673 615 656 589 608 662 573 597 583 - 49 41 51 44 13 49 9 13 50 23 53 32 0 39 26 55 39 22 623 627 655 612 539 648 656 538 653 595 642 569 585 647 561 587 572 - 15 3 40 43 29 42 45 43 11 16 37 20 39 0 15 43 44 45 632 635 692 645 575 684 691 572 690 631 675 605 623 680 592 616 602 - 24 18 34 33 19 35 33 28 26 4 34 23 26 15 0 38 33 38 623 626 680 636 565 674 681 562 679 620 666 595 611 672 584 610 595 - 33 45 4 15 56 8 64 48 46 43 7 60 55 43 38 0 22 74 589 592 701 665 589 697 706 589 702 644 695 618 632 700 616 642 626 - 42 47 19 7 44 14 47 28 52 36 25 55 39 44 33 22 0 60 590 594 678 644 567 675 685 568 680 622 673 596 609 679 595 622 606 - 60 47 70 64 18 68 16 35 55 34 71 29 22 45 38 74 60 0 644 648 648 600 531 640 646 527 645 586 629 560 579 635 547 572 557 - 622 634 592 590 633 590 628 610 636 626 596 645 623 632 623 589 590 644 0 11 936 1018 898 974 1009 935 980 933 1044 919 885 1045 1014 1053 1028 - 625 637 595 593 636 593 632 613 638 629 599 649 627 635 626 592 594 648 11 0 946 1027 907 983 1018 944 990 943 1054 929 895 1054 1022 1061 1036 - 704 694 697 685 663 692 648 656 703 677 702 677 655 692 680 701 678 648 936 946 0 191 134 66 113 177 70 87 194 111 69 186 264 294 272 - 659 646 661 650 617 657 604 617 654 632 664 627 612 645 636 665 644 600 1018 1027 191 0 125 127 89 84 125 118 30 114 178 36 84 105 88 - 588 577 585 574 547 580 532 543 586 561 589 559 539 575 565 589 567 531 898 907 134 125 0 109 121 59 114 56 148 30 80 147 162 201 175 - 697 686 694 682 656 689 641 651 695 670 698 668 648 684 674 697 675 640 974 983 66 127 109 0 48 133 7 53 128 80 88 120 205 232 212 - 705 693 703 692 663 698 648 660 701 678 707 674 656 691 681 706 685 646 1009 1018 113 89 121 48 0 122 43 76 84 94 128 75 172 194 177 - 586 574 586 575 544 581 530 542 582 559 589 555 538 572 562 589 568 527 935 944 177 84 59 133 122 0 135 90 113 68 135 115 104 143 117 - 702 691 699 687 661 694 646 657 700 675 703 673 653 690 679 702 680 645 980 990 70 125 114 7 43 135 0 59 125 84 95 117 204 230 211 - 644 633 640 629 602 635 587 598 641 617 645 615 595 631 620 644 622 586 933 943 87 118 56 53 76 90 59 0 131 27 60 126 181 214 191 - 689 676 691 680 647 687 633 647 684 662 694 656 642 675 666 695 673 629 1044 1054 194 30 148 128 84 113 125 131 0 133 191 10 104 115 104 - 618 607 615 603 576 610 562 572 615 591 619 589 569 605 595 618 596 560 919 929 111 114 30 80 94 68 84 27 133 0 69 130 166 202 177 - 635 625 628 616 594 623 578 587 633 608 633 608 585 623 611 632 609 579 885 895 69 178 80 88 128 135 95 60 191 69 0 187 234 270 246 - 695 682 696 685 652 692 639 653 690 668 700 662 647 680 672 700 679 635 1045 1054 186 36 147 120 75 115 117 126 10 130 187 0 113 125 114 - 606 593 611 602 565 608 553 568 600 580 614 573 561 592 584 616 595 547 1014 1022 264 84 162 205 172 104 204 181 104 166 234 113 0 41 15 - 631 617 638 628 590 634 579 595 624 606 641 597 587 616 610 642 622 572 1053 1061 294 105 201 232 194 143 230 214 115 202 270 125 41 0 27 - 617 603 622 612 575 619 563 579 610 591 625 583 572 602 595 626 606 557 1028 1036 272 88 175 212 177 117 211 191 104 177 246 114 15 27 0 - 0 658 0 0 2 3 8 8668 0 0 69 61 0 16565 101 0 2 0 0 0 73 1 30 9 1028 0 0 1 68 0 0 0 0 0 1531 - 0 0 1587 8 134 226 0 8324 6090 1 0 462 0 6 174 9 0 318 0 0 4 0 412 0 0 0 0 0 5 25 2 0 1 12850 0 - 1342 2 0 0 0 0 0 0 431 4485 8648 392 0 45 0 5617 0 12 0 2 2 12646 0 0 4169 32 23 0 0 0 0 3932 1282 91 0 - 0 5 0 0 72 6882 1115 331 147 0 0 0 0 0 273 35 0 0 0 0 84 0 0 0 0 0 0 0 172 0 20144 29 0 0 0 - 1 0 10347 2496 0 12 0 1 12093 906 7721 17369 0 9 0 1 0 0 3516 0 542 35 0 2 0 0 0 0 9 159 0 1 0 0 0 - 312 0 0 188 0 0 19041 1 22 0 269 0 0 0 236 11744 0 0 5 0 0 0 18970 431 0 0 0 0 4 0 0 0 0 0 14721 - 0 0 7 3 0 18358 0 884 1174 0 0 8 0 0 0 18 46 0 1 0 20 279 0 0 143 57 0 15 0 0 0 0 107 0 0 - 1 0 6754 0 4673 0 0 0 0 56 0 0 1008 0 0 0 0 99 28 4337 0 0 9472 0 0 0 778 11 183 0 0 0 7005 213 1411 - 0 7455 0 320 0 0 245 0 0 0 171 0 7 0 1698 0 0 0 739 0 0 0 0 0 0 2332 0 0 701 0 0 3 161 0 0 - 0 0 2128 0 0 0 1222 7948 0 0 20942 0 0 26 80 0 0 0 10984 1 0 0 0 1154 279 1158 0 20 0 8 0 0 584 0 0 - 41 1 0 13289 129 8 0 0 0 0 0 1 1 640 0 6 0 1324 0 31 0 152 32 17050 718 9002 0 0 0 16 37 802 0 3322 17 - 15113 57 289 0 0 1 0 0 0 0 0 0 122 1 0 251 15748 257 0 16155 0 0 0 1383 0 4537 0 2 0 0 8013 0 0 0 0 - 0 0 135 1 1259 2690 0 0 2 341 0 0 0 18 29 0 632 273 39 3 1585 0 184 0 250 1 0 4900 5 0 0 2685 18400 0 0 - 12 31 0 5945 0 0 1 49 0 0 0 0 0 0 0 0 14549 9146 33 0 34 0 246 0 0 0 0 1521 2 9 2 0 0 0 0 - 0 0 0 0 0 1 1 0 0 44 0 2257 0 0 0 4404 104 268 1 835 0 239 118 1 2 31 254 0 0 0 4 0 2 4103 10091 - 1 0 0 39 0 0 0 11309 746 0 0 26 0 0 8823 0 0 0 0 15 0 0 466 983 2 0 0 0 0 0 0 0 0 0 1 - 0 0 0 5029 4 470 1787 34 6 1 0 0 0 4357 850 2226 0 0 0 10610 0 0 1 0 0 0 0 1 0 521 0 0 194 22 0 - 0 2552 18348 0 2647 92 0 4677 48 1 735 3072 0 0 6 4 92 0 1 0 0 0 0 0 642 0 0 72 8 9584 2615 4797 0 2607 13 - 145 15513 371 0 0 44 0 18 152 5991 5 0 2966 2608 2735 0 17397 1 0 6334 0 1589 2609 0 2 0 0 6 0 361 12 0 5 1 1 - 42 0 1 0 2 0 179 13 92 43 114 0 4 0 0 5802 0 0 0 0 0 0 158 0 0 154 0 0 0 0 0 8594 0 1 0 - 595 0 2 0 0 46 9 0 1 1 0 0 0 6 13 13 12 0 7 4989 0 1837 173 0 3 0 0 43 1 966 16629 3 2390 7542 255 - 2442 899 2 0 0 0 1082 0 0 0 10756 0 0 53 9432 0 0 21763 0 2936 0 0 0 0 6058 122 10287 10 0 0 0 3610 0 12 0 - 3 2 0 0 0 0 0 4 12 0 203 0 0 0 2653 0 0 23 0 2174 12116 0 0 5811 0 0 0 6 0 6574 0 0 0 0 0 - 2453 0 1 3 0 1 388 7982 0 0 0 1185 0 2 1921 0 983 5913 0 15 42 0 1 0 0 0 0 0 14127 0 0 5 2 0 0 - 0 0 0 17 0 0 0 1731 0 1 850 2 0 0 0 71 1 49 0 0 0 0 0 161 0 1 0 18 0 18 20727 1 10472 7 0 - 0 157 0 0 348 0 0 0 0 402 0 0 0 0 25 0 60 0 0 0 0 9078 0 105 19456 0 0 3 0 232 42 0 0 0 0 - 0 0 0 0 11 0 25 14 0 2 129 0 1 0 169 0 0 8 50 0 3 0 0 2891 0 0 0 0 16 0 0 0 707 4430 0 - 5 0 0 0 0 0 12 0 0 0 18 5 827 195 685 0 0 408 17314 0 8581 0 8490 0 0 8282 0 0 2 1237 0 0 268 50 18 - 7703 0 0 1 4 0 1427 0 0 0 0 0 0 0 0 8065 582 0 0 2554 16 0 0 331 5052 8417 0 358 0 0 0 0 1135 4778 0 - 0 170 0 607 4 3 14127 0 10243 1 0 0 0 11216 516 1 3496 5084 3 0 0 2710 1376 0 0 0 1 2 0 0 0 0 10804 0 0 - 0 0 38 0 0 8 12 0 0 53 0 364 2163 0 885 0 1 0 0 65 1 0 0 3734 0 0 0 0 7951 0 0 0 0 31 0 - 0 7221 0 0 0 0 0 0 0 0 14828 383 0 0 463 0 0 16 0 0 0 95 1428 0 30 1 0 7261 0 0 0 0 0 0 25 - 16 0 0 1 20188 0 15 0 0 12 3037 0 0 0 0 0 4 410 8 326 9 236 41 0 1657 0 0 0 0 4 0 0 0 0 0 - 0 2 0 0 0 0 725 12460 15 0 0 0 1607 0 416 2 0 0 0 2915 0 0 0 0 4 0 0 1 566 0 0 241 0 0 0 - 0 0 0 0 0 12898 4814 101 1177 9 0 2 0 183 0 0 0 5377 0 0 0 0 10 2316 4726 0 0 19427 0 0 0 1574 16 0 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai40a.dat b/trunk/paradiseo-peo/tutorial/benchs/tai40a.dat deleted file mode 100755 index b9fa67645..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai40a.dat +++ /dev/null @@ -1,83 +0,0 @@ - 40 3139370 - - 0 61 87 34 28 55 63 10 78 17 90 0 66 62 30 76 0 91 62 73 38 49 85 86 88 13 71 46 75 98 53 52 10 84 70 44 8 52 59 48 - 61 0 85 29 94 79 4 85 31 54 95 75 81 11 56 38 95 37 67 54 88 93 53 44 68 58 98 55 84 76 19 46 89 89 5 23 63 19 53 20 - 87 85 0 47 17 66 60 86 14 52 27 77 5 37 27 53 88 84 63 1 26 18 85 59 24 64 81 12 72 32 64 18 79 23 56 63 2 78 3 32 - 34 29 47 0 3 2 18 89 50 69 66 20 97 52 81 42 28 71 71 53 87 31 36 99 98 38 97 26 31 60 83 43 16 91 96 52 48 12 17 13 - 28 94 17 3 0 35 7 96 17 59 26 30 43 53 26 37 93 35 49 33 87 55 48 63 81 55 12 28 79 62 63 11 56 0 10 34 1 75 62 33 - 55 79 66 2 35 0 68 51 53 80 84 40 3 32 27 32 61 27 92 25 2 15 9 30 0 97 24 14 10 84 56 83 0 16 67 2 5 98 73 47 - 63 4 60 18 7 68 0 81 88 39 46 13 9 89 96 30 66 37 2 0 1 8 84 99 7 62 58 49 93 47 53 34 39 8 86 18 52 4 95 3 - 10 85 86 89 96 51 81 0 80 9 3 5 26 36 92 8 94 75 8 64 73 47 68 78 8 40 6 31 85 47 96 5 98 44 86 0 93 53 16 87 - 78 31 14 50 17 53 88 80 0 94 23 61 80 35 17 45 51 26 54 59 57 25 99 87 34 79 24 41 29 7 26 71 36 18 57 16 28 1 24 68 - 17 54 52 69 59 80 39 9 94 0 56 81 1 54 22 67 44 6 46 30 0 86 73 15 81 68 36 12 65 18 59 93 34 92 82 69 3 24 94 53 - 90 95 27 66 26 84 46 3 23 56 0 66 98 6 98 30 31 41 74 23 56 15 63 91 67 10 63 5 20 27 20 15 75 56 89 93 60 37 44 41 - 0 75 77 20 30 40 13 5 61 81 66 0 76 25 6 62 60 51 57 79 34 41 82 95 15 94 12 90 49 82 56 75 39 48 84 15 45 93 74 87 - 66 81 5 97 43 3 9 26 80 1 98 76 0 39 10 81 54 80 88 13 62 11 65 72 18 81 55 82 20 33 20 77 99 5 70 31 33 52 47 55 - 62 11 37 52 53 32 89 36 35 54 6 25 39 0 29 74 7 30 64 45 13 7 96 98 47 0 60 94 53 6 97 20 94 42 4 30 25 64 12 44 - 30 56 27 81 26 27 96 92 17 22 98 6 10 29 0 74 96 54 44 32 74 5 84 4 44 64 68 38 35 29 11 39 69 85 79 60 83 12 5 55 - 76 38 53 42 37 32 30 8 45 67 30 62 81 74 74 0 9 49 88 61 92 23 54 81 58 29 27 80 10 78 55 72 49 31 63 37 68 36 5 74 - 0 95 88 28 93 61 66 94 51 44 31 60 54 7 96 9 0 74 57 65 82 51 27 28 85 5 73 48 23 44 0 39 53 80 33 43 99 80 98 61 - 91 37 84 71 35 27 37 75 26 6 41 51 80 30 54 49 74 0 46 15 4 33 66 6 77 84 82 33 12 24 91 45 83 85 44 45 51 78 88 31 - 62 67 63 71 49 92 2 8 54 46 74 57 88 64 44 88 57 46 0 3 42 34 46 71 12 80 15 81 21 54 1 72 84 9 35 21 64 8 66 94 - 73 54 1 53 33 25 0 64 59 30 23 79 13 45 32 61 65 15 3 0 50 37 42 40 6 30 12 34 27 29 33 82 54 75 75 54 19 67 42 63 - 38 88 26 87 87 2 1 73 57 0 56 34 62 13 74 92 82 4 42 50 0 79 10 79 93 87 13 21 48 40 63 97 32 73 94 16 2 30 89 9 - 49 93 18 31 55 15 8 47 25 86 15 41 11 7 5 23 51 33 34 37 79 0 89 0 90 9 2 79 37 54 71 49 19 9 29 53 17 79 33 12 - 85 53 85 36 48 9 84 68 99 73 63 82 65 96 84 54 27 66 46 42 10 89 0 6 9 18 80 29 45 9 81 2 97 39 92 76 21 69 1 24 - 86 44 59 99 63 30 99 78 87 15 91 95 72 98 4 81 28 6 71 40 79 0 6 0 22 28 47 80 22 18 89 97 52 13 99 66 27 67 89 64 - 88 68 24 98 81 0 7 8 34 81 67 15 18 47 44 58 85 77 12 6 93 90 9 22 0 80 50 34 46 18 52 31 52 22 28 21 91 9 49 75 - 13 58 64 38 55 97 62 40 79 68 10 94 81 0 64 29 5 84 80 30 87 9 18 28 80 0 37 35 47 47 61 80 34 75 98 11 10 49 1 47 - 71 98 81 97 12 24 58 6 24 36 63 12 55 60 68 27 73 82 15 12 13 2 80 47 50 37 0 85 13 41 22 65 61 42 33 77 91 12 91 56 - 46 55 12 26 28 14 49 31 41 12 5 90 82 94 38 80 48 33 81 34 21 79 29 80 34 35 85 0 35 45 31 45 25 58 7 86 58 24 6 37 - 75 84 72 31 79 10 93 85 29 65 20 49 20 53 35 10 23 12 21 27 48 37 45 22 46 47 13 35 0 69 57 6 50 87 63 85 35 20 72 91 - 98 76 32 60 62 84 47 47 7 18 27 82 33 6 29 78 44 24 54 29 40 54 9 18 18 47 41 45 69 0 86 11 22 84 57 73 6 1 19 72 - 53 19 64 83 63 56 53 96 26 59 20 56 20 97 11 55 0 91 1 33 63 71 81 89 52 61 22 31 57 86 0 79 70 22 19 5 94 2 72 38 - 52 46 18 43 11 83 34 5 71 93 15 75 77 20 39 72 39 45 72 82 97 49 2 97 31 80 65 45 6 11 79 0 95 93 24 17 85 89 99 17 - 10 89 79 16 56 0 39 98 36 34 75 39 99 94 69 49 53 83 84 54 32 19 97 52 52 34 61 25 50 22 70 95 0 85 78 14 63 11 97 6 - 84 89 23 91 0 16 8 44 18 92 56 48 5 42 85 31 80 85 9 75 73 9 39 13 22 75 42 58 87 84 22 93 85 0 94 61 32 9 39 56 - 70 5 56 96 10 67 86 86 57 82 89 84 70 4 79 63 33 44 35 75 94 29 92 99 28 98 33 7 63 57 19 24 78 94 0 76 48 9 93 47 - 44 23 63 52 34 2 18 0 16 69 93 15 31 30 60 37 43 45 21 54 16 53 76 66 21 11 77 86 85 73 5 17 14 61 76 0 40 55 3 55 - 8 63 2 48 1 5 52 93 28 3 60 45 33 25 83 68 99 51 64 19 2 17 21 27 91 10 91 58 35 6 94 85 63 32 48 40 0 81 58 29 - 52 19 78 12 75 98 4 53 1 24 37 93 52 64 12 36 80 78 8 67 30 79 69 67 9 49 12 24 20 1 2 89 11 9 9 55 81 0 44 33 - 59 53 3 17 62 73 95 16 24 94 44 74 47 12 5 5 98 88 66 42 89 33 1 89 49 1 91 6 72 19 72 99 97 39 93 3 58 44 0 30 - 48 20 32 13 33 47 3 87 68 53 41 87 55 44 55 74 61 31 94 63 9 12 24 64 75 47 56 37 91 72 38 17 6 56 47 55 29 33 30 0 - - 0 21 95 82 56 41 6 25 10 4 63 6 44 40 75 79 0 89 35 9 1 85 84 12 0 26 91 11 35 82 26 69 56 86 45 91 59 18 76 39 - 21 0 18 57 36 61 36 21 71 11 29 82 82 6 71 8 77 74 30 89 76 76 40 93 56 1 50 4 36 27 85 2 1 15 11 35 11 20 21 61 - 95 18 0 80 58 21 76 72 44 85 94 90 51 3 48 29 90 66 41 15 83 96 74 45 65 40 54 83 14 71 77 36 53 37 26 87 76 91 13 29 - 82 57 80 0 11 77 32 87 67 94 79 2 10 99 56 70 99 60 4 56 2 60 72 74 46 13 20 86 4 77 15 89 48 14 89 44 59 22 57 63 - 56 36 58 11 0 6 0 62 41 62 46 25 75 76 40 66 58 30 68 78 91 13 59 49 85 84 8 38 41 56 39 53 77 50 30 58 55 19 85 52 - 41 61 21 77 6 0 34 53 40 69 12 85 72 7 49 46 87 58 17 68 27 21 6 67 26 82 44 35 3 62 8 51 1 91 39 87 72 45 96 7 - 6 36 76 32 0 34 0 87 68 33 3 21 90 45 47 25 30 43 97 33 35 61 42 36 43 7 84 6 0 0 48 62 59 29 94 82 29 3 3 51 - 25 21 72 87 62 53 87 0 67 39 15 66 42 23 62 62 28 76 66 82 98 35 15 17 77 44 26 76 86 60 62 62 83 91 57 62 36 2 2 43 - 10 71 44 67 41 40 68 67 0 65 37 49 61 5 34 53 96 82 48 28 31 75 1 95 7 92 69 62 32 97 5 39 50 82 93 71 35 14 20 74 - 4 11 85 94 62 69 33 39 65 0 49 50 37 79 19 51 70 42 26 79 98 60 35 9 96 70 21 37 37 67 93 93 39 2 52 26 90 26 1 68 - 63 29 94 79 46 12 3 15 37 49 0 93 7 94 19 54 37 0 20 12 11 66 84 80 1 55 9 21 12 65 7 17 51 84 87 2 27 82 71 71 - 6 82 90 2 25 85 21 66 49 50 93 0 40 93 27 93 92 34 39 31 26 1 87 72 59 97 46 62 12 91 63 70 1 22 49 24 58 62 49 94 - 44 82 51 10 75 72 90 42 61 37 7 40 0 92 63 13 45 22 69 70 18 1 44 32 3 72 99 34 45 18 96 82 79 75 83 43 26 81 39 66 - 40 6 3 99 76 7 45 23 5 79 94 93 92 0 22 71 58 42 91 56 27 56 28 64 98 69 69 93 35 41 67 12 33 1 71 72 26 86 67 67 - 75 71 48 56 40 49 47 62 34 19 19 27 63 22 0 24 10 46 56 56 69 53 48 74 43 94 29 64 97 38 12 99 51 87 76 71 47 47 9 71 - 79 8 29 70 66 46 25 62 53 51 54 93 13 71 24 0 20 81 99 45 56 15 99 64 57 84 83 61 25 41 8 46 52 22 33 68 52 28 75 99 - 0 77 90 99 58 87 30 28 96 70 37 92 45 58 10 20 0 6 85 65 47 90 24 79 70 28 19 87 80 4 21 34 12 20 67 24 94 10 64 52 - 89 74 66 60 30 58 43 76 82 42 0 34 22 42 46 81 6 0 92 49 68 65 66 28 81 17 58 99 90 70 17 57 37 2 37 3 43 20 68 35 - 35 30 41 4 68 17 97 66 48 26 20 39 69 91 56 99 85 92 0 60 23 48 40 10 42 83 82 27 49 15 34 50 42 26 33 23 16 69 97 13 - 9 89 15 56 78 68 33 82 28 79 12 31 70 56 56 45 65 49 60 0 35 80 40 55 30 22 76 55 56 91 74 82 96 2 13 4 4 35 48 29 - 1 76 83 2 91 27 35 98 31 98 11 26 18 27 69 56 47 68 23 35 0 42 56 3 30 60 81 37 42 3 17 25 37 26 88 95 55 53 62 22 - 85 76 96 60 13 21 61 35 75 60 66 1 1 56 53 15 90 65 48 80 42 0 44 86 43 43 40 36 53 34 59 43 50 58 62 43 9 22 64 46 - 84 40 74 72 59 6 42 15 1 35 84 87 44 28 48 99 24 66 40 40 56 44 0 68 53 8 30 30 92 6 13 95 76 81 91 37 78 90 64 49 - 12 93 45 74 49 67 36 17 95 9 80 72 32 64 74 64 79 28 10 55 3 86 68 0 46 19 60 93 35 47 69 54 87 12 39 33 54 12 10 4 - 0 56 65 46 85 26 43 77 7 96 1 59 3 98 43 57 70 81 42 30 30 43 53 46 0 88 54 46 82 84 8 29 10 92 62 62 74 48 22 85 - 26 1 40 13 84 82 7 44 92 70 55 97 72 69 94 84 28 17 83 22 60 43 8 19 88 0 23 3 30 12 98 69 29 61 34 53 98 94 33 77 - 91 50 54 20 8 44 84 26 69 21 9 46 99 69 29 83 19 58 82 76 81 40 30 60 54 23 0 31 54 71 78 8 78 50 76 56 80 72 26 20 - 11 4 83 86 38 35 6 76 62 37 21 62 34 93 64 61 87 99 27 55 37 36 30 93 46 3 31 0 57 39 68 55 71 19 32 87 41 94 21 21 - 35 36 14 4 41 3 0 86 32 37 12 12 45 35 97 25 80 90 49 56 42 53 92 35 82 30 54 57 0 20 61 13 5 46 97 61 8 92 33 73 - 82 27 71 77 56 62 0 60 97 67 65 91 18 41 38 41 4 70 15 91 3 34 6 47 84 12 71 39 20 0 0 16 73 74 44 55 96 67 94 83 - 26 85 77 15 39 8 48 62 5 93 7 63 96 67 12 8 21 17 34 74 17 59 13 69 8 98 78 68 61 0 0 28 22 78 55 89 11 99 84 56 - 69 2 36 89 53 51 62 62 39 93 17 70 82 12 99 46 34 57 50 82 25 43 95 54 29 69 8 55 13 16 28 0 30 90 87 80 20 66 59 93 - 56 1 53 48 77 1 59 83 50 39 51 1 79 33 51 52 12 37 42 96 37 50 76 87 10 29 78 71 5 73 22 30 0 79 80 28 68 99 54 69 - 86 15 37 14 50 91 29 91 82 2 84 22 75 1 87 22 20 2 26 2 26 58 81 12 92 61 50 19 46 74 78 90 79 0 99 1 49 63 23 33 - 45 11 26 89 30 39 94 57 93 52 87 49 83 71 76 33 67 37 33 13 88 62 91 39 62 34 76 32 97 44 55 87 80 99 0 99 40 29 60 95 - 91 35 87 44 58 87 82 62 71 26 2 24 43 72 71 68 24 3 23 4 95 43 37 33 62 53 56 87 61 55 89 80 28 1 99 0 28 44 30 88 - 59 11 76 59 55 72 29 36 35 90 27 58 26 26 47 52 94 43 16 4 55 9 78 54 74 98 80 41 8 96 11 20 68 49 40 28 0 66 9 41 - 18 20 91 22 19 45 3 2 14 26 82 62 81 86 47 28 10 20 69 35 53 22 90 12 48 94 72 94 92 67 99 66 99 63 29 44 66 0 3 4 - 76 21 13 57 85 96 3 2 20 1 71 49 39 67 9 75 64 68 97 48 62 64 64 10 22 33 26 21 33 94 84 59 54 23 60 30 9 3 0 63 - 39 61 29 63 52 7 51 43 74 68 71 94 66 67 71 99 52 35 13 29 22 46 49 4 85 77 20 21 73 83 56 93 69 33 95 88 41 4 63 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai40b.dat b/trunk/paradiseo-peo/tutorial/benchs/tai40b.dat deleted file mode 100755 index 8c6ee6198..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai40b.dat +++ /dev/null @@ -1,82 +0,0 @@ - 40 637250948 - - 0 22 59 67 52 26 41 51 19 781 791 841 803 840 721 806 1201 1232 1178 1190 1255 1225 1212 1274 1251 1251 1208 1283 986 1004 984 1025 1010 1014 1037 991 1002 1006 965 979 - 22 0 63 84 54 34 60 42 21 786 795 848 810 845 726 810 1185 1216 1162 1174 1239 1209 1197 1258 1235 1235 1192 1267 987 1006 985 1027 1012 1015 1039 993 1003 1008 967 981 - 59 63 0 52 9 34 50 37 44 723 733 785 747 782 663 748 1163 1193 1139 1152 1215 1187 1171 1236 1211 1210 1169 1243 927 945 925 966 951 955 978 932 943 947 906 920 - 67 84 52 0 56 53 27 81 65 728 740 786 745 788 668 755 1212 1241 1187 1200 1262 1235 1217 1285 1259 1258 1216 1290 942 959 939 978 963 967 990 945 958 958 918 933 - 52 54 9 56 0 27 49 28 35 732 741 793 756 790 672 757 1164 1193 1139 1153 1216 1187 1172 1237 1212 1211 1169 1244 935 953 932 974 959 963 986 940 951 955 914 928 - 26 34 34 53 27 0 34 35 13 756 766 817 779 815 696 781 1185 1215 1161 1174 1238 1209 1194 1258 1234 1233 1191 1266 960 979 958 999 984 988 1012 966 977 980 939 954 - 41 60 50 27 49 34 0 68 44 752 764 811 771 812 692 779 1213 1242 1188 1202 1265 1236 1221 1286 1261 1260 1218 1292 963 981 961 1001 985 989 1013 967 979 981 940 955 - 51 42 37 81 28 35 68 0 33 749 758 812 776 807 690 773 1151 1181 1127 1140 1204 1175 1161 1224 1201 1200 1157 1232 947 966 945 988 973 976 1000 953 964 969 928 942 - 19 21 44 65 35 13 44 33 0 767 777 828 791 826 707 792 1184 1214 1160 1172 1237 1207 1194 1256 1233 1233 1190 1265 970 989 968 1009 994 998 1021 975 986 990 949 964 - 781 786 723 728 732 756 752 749 767 0 37 80 96 62 60 42 1077 1085 1040 1066 1081 1089 1024 1138 1084 1074 1057 1102 264 267 259 276 259 266 286 250 277 252 218 238 - 791 795 733 740 741 766 764 758 777 37 0 102 130 53 80 15 1044 1051 1007 1034 1047 1056 990 1105 1050 1040 1024 1068 233 239 228 250 233 240 261 222 247 227 191 210 - 841 848 785 786 793 817 811 812 828 80 102 0 59 72 129 95 1143 1149 1106 1132 1144 1154 1086 1202 1146 1136 1122 1164 272 266 267 266 250 259 274 250 282 242 218 238 - 803 810 747 745 756 779 771 776 791 96 130 59 0 120 119 129 1173 1181 1137 1163 1178 1186 1120 1234 1180 1170 1154 1198 328 324 323 324 308 318 333 307 339 300 276 295 - 840 845 782 788 790 815 812 807 826 62 53 72 120 0 121 38 1073 1078 1036 1063 1073 1084 1015 1131 1076 1065 1052 1092 211 211 206 217 200 208 227 194 223 193 162 182 - 721 726 663 668 672 696 692 690 707 60 80 129 119 121 0 93 1071 1081 1035 1060 1080 1085 1023 1134 1082 1073 1054 1102 312 319 308 330 313 320 341 302 326 307 271 290 - 806 810 748 755 757 781 779 773 792 42 15 95 129 38 93 0 1049 1055 1012 1039 1051 1061 993 1109 1053 1044 1028 1071 222 227 218 237 220 227 248 210 236 214 179 197 - 1201 1185 1163 1212 1164 1185 1213 1151 1184 1077 1044 1143 1173 1073 1071 1049 0 40 38 12 80 26 97 73 72 82 39 103 958 986 962 1013 1015 1007 1018 992 963 1021 1003 994 - 1232 1216 1193 1241 1193 1215 1242 1181 1214 1085 1051 1149 1181 1078 1081 1055 40 0 54 47 42 17 75 53 33 45 27 63 956 984 961 1010 1013 1005 1015 990 961 1019 1003 993 - 1178 1162 1139 1187 1139 1161 1188 1127 1160 1040 1007 1106 1137 1036 1035 1012 38 54 0 29 83 51 75 103 77 81 32 110 921 948 925 976 978 969 981 954 926 983 966 956 - 1190 1174 1152 1200 1153 1174 1202 1140 1172 1066 1034 1132 1163 1063 1060 1039 12 47 29 0 86 35 96 85 78 87 40 110 949 976 953 1004 1006 998 1009 982 954 1011 994 984 - 1255 1239 1215 1262 1216 1238 1265 1204 1237 1081 1047 1144 1178 1073 1080 1051 80 42 83 86 0 59 58 70 9 8 51 28 944 971 948 997 1000 991 1001 978 948 1006 992 981 - 1225 1209 1187 1235 1187 1209 1236 1175 1207 1089 1056 1154 1186 1084 1085 1061 26 17 51 35 59 0 89 52 50 62 34 79 965 992 969 1019 1022 1013 1024 999 970 1028 1011 1001 - 1212 1197 1171 1217 1172 1194 1221 1161 1194 1024 990 1086 1120 1015 1023 993 97 75 75 96 58 89 0 122 61 50 58 80 887 914 892 940 944 935 945 921 891 949 935 924 - 1274 1258 1236 1285 1237 1258 1286 1224 1256 1138 1105 1202 1234 1131 1134 1109 73 53 103 85 70 52 122 0 63 77 81 71 1008 1035 1013 1062 1065 1056 1067 1042 1012 1071 1055 1045 - 1251 1235 1211 1259 1212 1234 1261 1201 1233 1084 1050 1146 1180 1076 1082 1053 72 33 77 78 9 50 61 63 0 15 45 33 948 975 953 1001 1005 996 1006 982 952 1010 996 985 - 1251 1235 1210 1258 1211 1233 1260 1200 1233 1074 1040 1136 1170 1065 1073 1044 82 45 81 87 8 62 50 77 15 0 50 33 936 963 941 989 993 984 994 970 940 999 984 973 - 1208 1192 1169 1216 1169 1191 1218 1157 1190 1057 1024 1122 1154 1052 1054 1028 39 27 32 40 51 34 58 81 45 50 0 78 931 958 935 985 988 979 990 965 936 994 977 967 - 1283 1267 1243 1290 1244 1266 1292 1232 1265 1102 1068 1164 1198 1092 1102 1071 103 63 110 110 28 79 80 71 33 33 78 0 960 987 965 1012 1016 1007 1017 994 964 1022 1009 997 - 986 987 927 942 935 960 963 947 970 264 233 272 328 211 312 222 958 956 921 949 944 965 887 1008 948 936 931 960 0 30 5 60 58 51 70 34 16 63 56 39 - 1004 1006 945 959 953 979 981 966 989 267 239 266 324 211 319 227 986 984 948 976 971 992 914 1035 975 963 958 987 30 0 28 30 30 21 41 17 23 36 49 29 - 984 985 925 939 932 958 961 945 968 259 228 267 323 206 308 218 962 961 925 953 948 969 892 1013 953 941 935 965 5 28 0 58 54 48 68 29 19 59 51 34 - 1025 1027 966 978 974 999 1001 988 1009 276 250 266 324 217 330 237 1013 1010 976 1004 997 1019 940 1062 1001 989 985 1012 60 30 58 0 17 12 12 36 51 24 60 46 - 1010 1012 951 963 959 984 985 973 994 259 233 250 308 200 313 220 1015 1013 978 1006 1000 1022 944 1065 1005 993 988 1016 58 30 54 17 0 11 28 27 53 8 45 33 - 1014 1015 955 967 963 988 989 976 998 266 240 259 318 208 320 227 1007 1005 969 998 991 1013 935 1056 996 984 979 1007 51 21 48 12 11 0 24 24 44 19 50 34 - 1037 1039 978 990 986 1012 1013 1000 1021 286 261 274 333 227 341 248 1018 1015 981 1009 1001 1024 945 1067 1006 994 990 1017 70 41 68 12 28 24 0 48 59 34 72 58 - 991 993 932 945 940 966 967 953 975 250 222 250 307 194 302 210 992 990 954 982 978 999 921 1042 982 970 965 994 34 17 29 36 27 24 48 0 35 30 32 13 - 1002 1003 943 958 951 977 979 964 986 277 247 282 339 223 326 236 963 961 926 954 948 970 891 1012 952 940 936 964 16 23 19 51 53 44 59 35 0 59 64 44 - 1006 1008 947 958 955 980 981 969 990 252 227 242 300 193 307 214 1021 1019 983 1011 1006 1028 949 1071 1010 999 994 1022 63 36 59 24 8 19 34 30 59 0 41 33 - 965 967 906 918 914 939 940 928 949 218 191 218 276 162 271 179 1003 1003 966 994 992 1011 935 1055 996 984 977 1009 56 49 51 60 45 50 72 32 64 41 0 20 - 979 981 920 933 928 954 955 942 964 238 210 238 295 182 290 197 994 993 956 984 981 1001 924 1045 985 973 967 997 39 29 34 46 33 34 58 13 44 33 20 0 - 0 0 16 323 5 0 0 2771 0 18 0 0 530 0 0 0 416 0 11 0 0 0 336 1 91 0 59 0 0 0 0 0 4447 428 4893 1 6483 0 15346 2578 - 1 0 0 298 87 17863 3340 2 10 0 0 222 5406 1 374 0 0 0 4 0 0 4465 42 0 0 5603 18 8167 12236 0 791 0 0 1498 2 0 0 2 85 541 - 18 33 0 2 603 30 0 0 0 1462 0 3581 1 10 0 15 0 0 6 307 0 0 178 5698 2497 0 0 9962 0 1190 117 0 14 2 0 0 81 0 0 3 - 0 23 4 0 98 2 0 0 19 2 0 2187 0 0 1632 0 98 0 1390 0 0 0 3296 1274 0 0 0 0 11 0 3797 0 17102 0 0 0 1874 0 0 929 - 0 0 0 0 0 0 0 1 0 1 1619 0 0 401 0 171 1343 2533 0 0 0 0 0 2 0 0 210 0 0 7353 0 0 4067 0 766 0 0 0 346 45 - 0 3244 0 0 0 0 278 21459 5943 20 0 3 398 0 986 0 17211 27 30 79 11866 0 4 13789 41 0 0 0 0 0 37 2735 22 0 0 0 1333 0 2656 0 - 0 0 0 0 0 12 0 14 0 0 0 0 7 0 0 12 0 8316 0 61 0 938 6 0 0 57 10 0 224 11 2016 2 20712 0 1 6 0 0 0 0 - 0 15 113 0 0 3817 0 0 0 1 0 0 8 0 0 3733 1030 20543 0 0 4745 0 0 8737 0 11713 0 0 0 0 0 0 0 66 124 427 46 0 55 911 - 0 0 0 51 11242 0 0 1093 0 0 180 0 7 0 0 0 0 0 1046 0 0 0 9972 5627 118 1 0 1 840 0 0 0 0 6842 16 1 0 0 173 0 - 25 0 0 0 3 0 57 6660 13738 0 0 7536 0 250 0 5420 0 1512 0 0 0 1693 0 1 0 32 0 0 0 0 0 0 1854 1 326 7 27 0 0 0 - 0 653 0 5 0 7144 0 0 23 0 0 42 0 0 0 0 0 2 0 0 0 20 1854 0 0 6321 71 3 316 4 44 0 3 1 0 10680 0 0 0 581 - 0 1 205 0 19967 0 5 0 11810 0 0 0 14 18 14 0 0 0 268 0 3430 0 0 2 0 10 2 1 163 0 0 0 1762 0 20958 8 17 1 4 39 - 181 0 1 841 13 0 19255 34 16 122 2 0 0 935 0 0 0 0 0 34 0 2 761 4 9336 114 4 0 1 0 0 0 0 0 5366 0 0 9 0 187 - 5 0 0 0 356 20 8 2 290 1907 0 0 2 0 42 8475 0 17 2477 0 0 1432 249 84 0 0 0 1002 29 44 3839 0 0 2 0 0 0 51 0 6972 - 0 0 38 1664 0 0 22 0 49 23 1 18 529 0 0 0 6627 0 601 0 16703 761 0 0 17956 16 15297 1 0 0 2049 1 0 3 0 0 13363 196 0 706 - 0 162 468 0 5952 672 0 0 0 0 0 1395 5 8418 0 0 0 861 125 4 0 1156 20923 0 0 308 0 1 0 4808 2345 0 41 3021 0 0 0 10 0 130 - 0 13 0 0 0 14 0 5368 0 1 1 0 0 0 0 0 0 640 116 0 0 488 1 0 5 0 0 0 0 0 3 0 0 0 0 53 45 0 38 0 - 1 0 0 743 31 0 0 0 0 0 127 4225 0 0 0 0 33 0 0 166 7056 0 0 330 0 2 17 3299 21 1492 104 0 1 5 498 0 542 0 0 0 - 0 194 0 14 8 85 0 0 0 15142 0 34 0 65 0 11 0 10 0 33 1263 58 343 19 1 23 0 76 3342 0 26 0 212 0 31 0 22 0 0 0 - 4 0 0 0 14756 0 0 20689 0 229 371 0 0 203 4 0 8194 0 0 0 0 0 6592 0 6305 4550 0 7 0 17 654 0 140 0 0 1747 0 0 0 582 - 0 0 0 9922 0 41 216 13605 5550 50 0 0 0 2629 145 0 0 1 0 0 0 0 6 257 1 3 0 0 0 19574 48 511 30 447 0 1 15 38 0 18011 - 3035 3 0 0 7230 9975 0 1 1 10175 9 11 20381 0 481 8122 10648 730 5187 0 3 0 0 0 0 0 0 0 132 3 0 0 768 483 50 0 0 0 0 0 - 14 0 0 0 0 917 35 0 473 21 0 0 0 0 0 3 0 0 11 24 0 0 0 37 89 0 21 13 83 0 0 0 2 0 3021 0 1706 406 0 0 - 1 0 0 1321 26 0 0 6 6 0 0 29 0 0 0 8820 0 0 0 0 1060 3603 0 0 188 0 0 5476 641 10502 66 8 5 0 0 467 0 0 3630 0 - 1280 995 0 2958 170 0 0 5590 5749 0 0 0 18 954 0 7302 0 4903 0 0 971 0 5 0 0 10 11 1253 0 1372 0 0 0 0 103 10841 21748 31 5410 0 - 1452 0 0 1 0 0 0 1843 0 0 6 0 10555 0 0 0 0 0 0 7018 0 0 0 0 3 0 0 277 1 0 1 0 87 1287 2781 42 100 0 53 0 - 161 5901 1 0 5012 0 0 0 0 0 4 1 0 0 1 0 122 10813 0 126 0 310 1 0 35 0 0 0 348 0 0 0 15751 10257 1 254 0 0 8 1 - 0 5 22 0 0 1 0 0 0 0 0 0 0 1 0 0 10981 0 50 0 20 2 11 24 1 0 0 0 28 0 2 0 1 0 1 0 1 0 6 0 - 165 20 0 0 0 998 0 2558 2 13 473 80 101 0 0 0 0 0 48 19286 3400 1 9776 0 227 0 210 0 0 3 0 0 14387 58 0 11 1 0 169 0 - 3 0 13 0 0 0 0 47 0 44 323 0 0 867 0 0 2 0 0 8 0 0 635 0 0 0 469 0 0 0 0 8939 0 2 0 5 0 64 0 0 - 0 0 0 0 0 239 0 0 4381 1239 16951 2 4296 2 3 0 0 0 9254 0 0 10 0 0 0 0 0 0 458 0 0 12 0 1 0 0 13883 14 6564 0 - 5197 75 0 0 0 0 74 0 6 0 51 0 0 0 0 0 1 0 0 0 175 0 5828 0 357 319 87 0 0 0 18 0 107 1 1 1 0 0 1 0 - 0 869 0 1855 56 117 0 0 1617 0 6527 0 69 1151 3418 1 0 0 0 0 0 0 1 20800 0 380 1336 0 0 0 1175 0 0 439 0 1020 435 0 697 13 - 2 258 0 0 0 0 45 1 1 0 14 0 0 2 0 5485 0 0 0 0 1 0 17662 5 1326 0 0 0 134 0 0 8290 6190 0 0 0 224 0 0 4229 - 0 10269 0 2586 5 3 0 134 11 1 901 0 0 2461 0 12 0 1133 2 3 0 1 374 338 258 1 23 2443 0 0 0 2134 0 11788 0 0 0 1061 1 0 - 714 1 0 1 2229 0 6 111 0 2422 191 0 9794 78 131 0 1 1 1442 85 1 0 0 19 40 46 58 0 0 3 0 1110 14 0 0 0 0 0 11140 391 - 0 149 0 1 0 8015 0 348 14167 0 1330 0 16 32 0 12 0 965 0 0 0 0 0 3 0 1 0 0 15 0 36 0 0 0 7 0 0 0 0 2 - 0 0 4765 0 9358 0 1 0 0 0 3 11226 0 0 1012 0 0 0 0 20865 0 69 0 10832 0 0 0 0 0 4 0 378 738 0 6513 2 0 0 216 0 - 0 2711 0 0 59 1 0 4 0 881 0 430 16 0 950 40 0 76 5790 11 0 3 5827 0 0 9 0 5 0 0 0 3 0 0 77 0 19070 10 0 14162 - 0 263 0 0 0 0 15631 0 35 0 0 0 5 0 0 0 3625 1 11 61 0 0 11 0 0 0 153 0 0 0 0 202 3 3 0 19 0 17 650 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai50a.dat b/trunk/paradiseo-peo/tutorial/benchs/tai50a.dat deleted file mode 100755 index bf00b1d51..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai50a.dat +++ /dev/null @@ -1,102 +0,0 @@ - 50 4941410 - - 0 21 95 82 56 41 6 25 10 4 63 6 44 40 75 79 0 89 35 9 1 85 84 12 0 26 91 11 35 82 26 69 56 86 45 91 59 18 76 39 18 57 36 61 36 21 71 11 29 82 - 21 0 82 6 71 8 77 74 30 89 76 76 40 93 56 1 50 4 36 27 85 2 1 15 11 35 11 20 21 61 80 58 21 76 72 44 85 94 90 51 3 48 29 90 66 41 15 83 96 74 - 95 82 0 45 65 40 54 83 14 71 77 36 53 37 26 87 76 91 13 29 11 77 32 87 67 94 79 2 10 99 56 70 99 60 4 56 2 60 72 74 46 13 20 86 4 77 15 89 48 14 - 82 6 45 0 89 44 59 22 57 63 6 0 62 41 62 46 25 75 76 40 66 58 30 68 78 91 13 59 49 85 84 8 38 41 56 39 53 77 50 30 58 55 19 85 52 34 53 40 69 12 - 56 71 65 89 0 85 72 7 49 46 87 58 17 68 27 21 6 67 26 82 44 35 3 62 8 51 1 91 39 87 72 45 96 7 87 68 33 3 21 90 45 47 25 30 43 97 33 35 61 42 - 41 8 40 44 85 0 36 43 7 84 6 0 0 48 62 59 29 94 82 29 3 3 51 67 39 15 66 42 23 62 62 28 76 66 82 98 35 15 17 77 44 26 76 86 60 62 62 83 91 57 - 6 77 54 59 72 36 0 62 36 2 2 43 65 37 49 61 5 34 53 96 82 48 28 31 75 1 95 7 92 69 62 32 97 5 39 50 82 93 71 35 14 20 74 49 50 37 79 19 51 70 - 25 74 83 22 7 43 62 0 42 26 79 98 60 35 9 96 70 21 37 37 67 93 93 39 2 52 26 90 26 1 68 93 7 94 19 54 37 0 20 12 11 66 84 80 1 55 9 21 12 65 - 10 30 14 57 49 7 36 42 0 7 17 51 84 87 2 27 82 71 71 40 93 27 93 92 34 39 31 26 1 87 72 59 97 46 62 12 91 63 70 1 22 49 24 58 62 49 94 92 63 13 - 4 89 71 63 46 84 2 26 7 0 45 22 69 70 18 1 44 32 3 72 99 34 45 18 96 82 79 75 83 43 26 81 39 66 22 71 58 42 91 56 27 56 28 64 98 69 69 93 35 41 - 63 76 77 6 87 6 2 79 17 45 0 67 12 33 1 71 72 26 86 67 67 24 10 46 56 56 69 53 48 74 43 94 29 64 97 38 12 99 51 87 76 71 47 47 9 71 20 81 99 45 - 6 76 36 0 58 0 43 98 51 22 67 0 56 15 99 64 57 84 83 61 25 41 8 46 52 22 33 68 52 28 75 99 6 85 65 47 90 24 79 70 28 19 87 80 4 21 34 12 20 67 - 44 40 53 62 17 0 65 60 84 69 12 56 0 24 94 10 64 52 92 49 68 65 66 28 81 17 58 99 90 70 17 57 37 2 37 3 43 20 68 35 60 23 48 40 10 42 83 82 27 49 - 40 93 37 41 68 48 37 35 87 70 33 15 24 0 15 34 50 42 26 33 23 16 69 97 13 35 80 40 55 30 22 76 55 56 91 74 82 96 2 13 4 4 35 48 29 42 56 3 30 60 - 75 56 26 62 27 62 49 9 2 18 1 99 94 15 0 81 37 42 3 17 25 37 26 88 95 55 53 62 22 44 86 43 43 40 36 53 34 59 43 50 58 62 43 9 22 64 46 68 53 8 - 79 1 87 46 21 59 61 96 27 1 71 64 10 34 81 0 30 30 92 6 13 95 76 81 91 37 78 90 64 49 46 19 60 93 35 47 69 54 87 12 39 33 54 12 10 4 88 54 46 82 - 0 50 76 25 6 29 5 70 82 44 72 57 64 50 37 30 0 84 8 29 10 92 62 62 74 48 22 85 23 3 30 12 98 69 29 61 34 53 98 94 33 77 31 54 71 78 8 78 50 76 - 89 4 91 75 67 94 34 21 71 32 26 84 52 42 42 30 84 0 56 80 72 26 20 57 39 68 55 71 19 32 87 41 94 21 21 20 61 13 5 46 97 61 8 92 33 73 0 16 73 74 - 35 36 13 76 26 82 53 37 71 3 86 83 92 26 3 92 8 56 0 44 55 96 67 94 83 28 22 78 55 89 11 99 84 56 30 90 87 80 20 66 59 93 79 80 28 68 99 54 69 99 - 9 27 29 40 82 29 96 37 40 72 67 61 49 33 17 6 29 80 44 0 1 49 63 23 33 99 40 29 60 95 28 44 30 88 66 9 41 3 4 63 61 87 34 28 55 63 10 78 17 90 - 1 85 11 66 44 3 82 67 93 99 67 25 68 23 25 13 10 72 55 1 0 0 66 62 30 76 0 91 62 73 38 49 85 86 88 13 71 46 75 98 53 52 10 84 70 44 8 52 59 48 - 85 2 77 58 35 3 48 93 27 34 24 41 65 16 37 95 92 26 96 49 0 0 85 29 94 79 4 85 31 54 95 75 81 11 56 38 95 37 67 54 88 93 53 44 68 58 98 55 84 76 - 84 1 32 30 3 51 28 93 93 45 10 8 66 69 26 76 62 20 67 63 66 85 0 19 46 89 89 5 23 63 19 53 20 47 17 66 60 86 14 52 27 77 5 37 27 53 88 84 63 1 - 12 15 87 68 62 67 31 39 92 18 46 46 28 97 88 81 62 57 94 23 62 29 19 0 26 18 85 59 24 64 81 12 72 32 64 18 79 23 56 63 2 78 3 32 3 2 18 89 50 69 - 0 11 67 78 8 39 75 2 34 96 56 52 81 13 95 91 74 39 83 33 30 94 46 26 0 66 20 97 52 81 42 28 71 71 53 87 31 36 99 98 38 97 26 31 60 83 43 16 91 96 - 26 35 94 91 51 15 1 52 39 82 56 22 17 35 55 37 48 68 28 99 76 79 89 18 66 0 52 48 12 17 13 35 7 96 17 59 26 30 43 53 26 37 93 35 49 33 87 55 48 63 - 91 11 79 13 1 66 95 26 31 79 69 33 58 80 53 78 22 55 22 40 0 4 89 85 20 52 0 81 55 12 28 79 62 63 11 56 0 10 34 1 75 62 33 68 51 53 80 84 40 3 - 11 20 2 59 91 42 7 90 26 75 53 68 99 40 62 90 85 71 78 29 91 85 5 59 97 48 81 0 32 27 32 61 27 92 25 2 15 9 30 0 97 24 14 10 84 56 83 0 16 67 - 35 21 10 49 39 23 92 26 1 83 48 52 90 55 22 64 23 19 55 60 62 31 23 24 52 12 55 32 0 2 5 98 73 47 81 88 39 46 13 9 89 96 30 66 37 2 0 1 8 84 - 82 61 99 85 87 62 69 1 87 43 74 28 70 30 44 49 3 32 89 95 73 54 63 64 81 17 12 27 2 0 99 7 62 58 49 93 47 53 34 39 8 86 18 52 4 95 3 80 9 3 - 26 80 56 84 72 62 62 68 72 26 43 75 17 22 86 46 30 87 11 28 38 95 19 81 42 13 28 32 5 99 0 5 26 36 92 8 94 75 8 64 73 47 68 78 8 40 6 31 85 47 - 69 58 70 8 45 28 32 93 59 81 94 99 57 76 43 19 12 41 99 44 49 75 53 12 28 35 79 61 98 7 5 0 96 5 98 44 86 0 93 53 16 87 94 23 61 80 35 17 45 51 - 56 21 99 38 96 76 97 7 97 39 29 6 37 55 43 60 98 94 84 30 85 81 20 72 71 7 62 27 73 62 26 96 0 26 54 59 57 25 99 87 34 79 24 41 29 7 26 71 36 18 - 86 76 60 41 7 66 5 94 46 66 64 85 2 56 40 93 69 21 56 88 86 11 47 32 71 96 63 92 47 58 36 5 26 0 57 16 28 1 24 68 56 81 1 54 22 67 44 6 46 30 - 45 72 4 56 87 82 39 19 62 22 97 65 37 91 36 35 29 21 30 66 88 56 17 64 53 17 11 25 81 49 92 98 54 57 0 0 86 73 15 81 68 36 12 65 18 59 93 34 92 82 - 91 44 56 39 68 98 50 54 12 71 38 47 3 74 53 47 61 20 90 9 13 38 66 18 87 59 56 2 88 93 8 44 59 16 0 0 69 3 24 94 53 66 98 6 98 30 31 41 74 23 - 59 85 2 53 33 35 82 37 91 58 12 90 43 82 34 69 34 61 87 41 71 95 60 79 31 26 0 15 39 47 94 86 57 28 86 69 0 56 15 63 91 67 10 63 5 20 27 20 15 75 - 18 94 60 77 3 15 93 0 63 42 99 24 20 96 59 54 53 13 80 3 46 37 86 23 36 30 10 9 46 53 75 0 25 1 73 3 56 0 56 89 93 60 37 44 41 76 25 6 62 60 - 76 90 72 50 21 17 71 20 70 91 51 79 68 2 43 87 98 5 20 4 75 67 14 56 99 43 34 30 13 34 8 93 99 24 15 24 15 56 0 51 57 79 34 41 82 95 15 94 12 90 - 39 51 74 30 90 77 35 12 1 56 87 70 35 13 50 12 94 46 66 63 98 54 52 63 98 53 1 0 9 39 64 53 87 68 81 94 63 89 51 0 49 82 56 75 39 48 84 15 45 93 - 18 3 46 58 45 44 14 11 22 27 76 28 60 4 58 39 33 97 59 61 53 88 27 2 38 26 75 97 89 8 73 16 34 56 68 53 91 93 57 49 0 74 87 39 10 81 54 80 88 13 - 57 48 13 55 47 26 20 66 49 56 71 19 23 4 62 33 77 61 93 87 52 93 77 78 97 37 62 24 96 86 47 87 79 81 36 66 67 60 79 82 74 0 62 11 65 72 18 81 55 82 - 36 29 20 19 25 76 74 84 24 28 47 87 48 35 43 54 31 8 79 34 10 53 5 3 26 93 33 14 30 18 68 94 24 1 12 98 10 37 34 56 87 62 0 20 33 20 77 99 5 70 - 61 90 86 85 30 86 49 80 58 64 47 80 40 48 9 12 54 92 80 28 84 44 37 32 31 35 68 10 66 52 78 23 41 54 65 6 63 44 41 75 39 11 20 0 31 33 52 47 55 29 - 36 66 4 52 43 60 50 1 62 98 9 4 10 29 22 10 71 33 28 55 70 68 27 3 60 49 51 84 37 4 8 61 29 22 18 98 5 41 82 39 10 65 33 31 0 74 7 30 64 45 - 21 41 77 34 97 62 37 55 49 69 71 21 42 42 64 4 78 73 68 63 44 58 53 2 83 33 53 56 2 95 40 80 7 67 59 30 20 76 95 48 81 72 20 33 74 0 13 7 96 98 - 71 15 15 53 33 62 79 9 94 69 20 34 83 56 46 88 8 0 99 10 8 98 88 18 43 87 80 83 0 3 6 35 26 44 93 31 27 25 15 84 54 18 77 52 7 13 0 47 0 60 - 11 83 89 40 35 83 19 21 92 93 81 12 82 3 68 54 78 16 54 78 52 55 84 89 16 55 84 0 1 80 31 17 71 6 34 41 20 6 94 15 80 81 99 47 30 7 47 0 94 53 - 29 96 48 69 61 91 51 12 63 35 99 20 27 30 53 46 50 73 69 17 59 84 63 50 91 48 40 16 8 9 85 45 36 46 92 74 15 62 12 45 88 55 5 55 64 96 0 94 0 6 - 82 74 14 12 42 57 70 65 13 41 45 67 49 60 8 82 76 74 99 90 48 76 1 69 96 63 3 67 84 3 47 51 18 30 82 23 75 60 90 93 13 82 70 29 45 98 60 53 6 0 - 0 97 20 94 42 4 30 25 64 12 44 74 96 54 44 32 74 5 84 4 44 64 68 38 35 29 11 39 69 85 79 60 83 12 5 55 9 49 88 61 92 23 54 81 58 29 27 80 10 78 - 97 0 55 72 49 31 63 37 68 36 5 74 74 57 65 82 51 27 28 85 5 73 48 23 44 0 39 53 80 33 43 99 80 98 61 46 15 4 33 66 6 77 84 82 33 12 24 91 45 83 - 20 55 0 85 44 45 51 78 88 31 3 42 34 46 71 12 80 15 81 21 54 1 72 84 9 35 21 64 8 66 94 50 37 42 40 6 30 12 34 27 29 33 82 54 75 75 54 19 67 42 - 94 72 85 0 63 79 10 79 93 87 13 21 48 40 63 97 32 73 94 16 2 30 89 9 89 0 90 9 2 79 37 54 71 49 19 9 29 53 17 79 33 12 6 9 18 80 29 45 9 81 - 42 49 44 63 0 2 97 39 92 76 21 69 1 24 22 28 47 80 22 18 89 97 52 13 99 66 27 67 89 64 80 50 34 46 18 52 31 52 22 28 21 91 9 49 75 37 35 47 47 61 - 4 31 45 79 2 0 80 34 75 98 11 10 49 1 47 85 13 41 22 65 61 42 33 77 91 12 91 56 35 45 31 45 25 58 7 86 58 24 6 37 69 57 6 50 87 63 85 35 20 72 - 30 63 51 10 97 80 0 91 86 11 22 84 57 73 6 1 19 72 79 70 22 19 5 94 2 72 38 95 93 24 17 85 89 99 17 85 78 14 63 11 97 6 94 61 32 9 39 56 76 48 - 25 37 78 79 39 34 91 0 9 93 47 40 55 3 55 81 58 29 44 33 30 48 3 80 43 88 43 17 27 56 4 86 32 76 6 41 55 32 41 20 61 75 46 60 10 38 99 62 70 30 - 64 68 88 93 92 75 86 9 0 49 3 22 17 26 2 29 62 69 28 61 33 21 55 27 73 89 88 42 26 1 22 41 66 1 88 78 68 30 9 60 44 24 42 35 90 0 13 71 61 67 - 12 36 31 87 76 98 11 93 49 0 68 65 78 33 92 21 34 27 9 26 79 33 1 22 2 10 27 38 25 59 44 28 72 91 32 30 55 30 3 57 9 34 94 18 7 17 85 28 38 40 - 44 5 3 13 21 11 22 47 3 68 0 29 91 81 85 74 18 19 69 69 43 64 29 32 33 25 70 76 31 89 56 49 29 2 26 84 34 64 67 33 59 89 45 63 45 75 76 52 40 44 - 74 74 42 21 69 10 84 40 22 65 29 0 32 10 6 35 25 75 56 78 92 4 92 98 29 9 79 98 86 40 18 53 12 48 71 15 87 79 94 1 97 40 31 87 97 57 26 41 21 51 - 96 74 34 48 1 49 57 55 17 78 91 32 0 38 82 68 68 12 48 2 66 17 49 90 31 39 61 73 6 19 45 13 21 32 56 26 79 71 7 70 35 96 47 30 32 23 35 39 56 80 - 54 57 46 40 24 1 73 3 26 33 81 10 38 0 28 78 62 81 80 13 85 26 5 62 3 26 46 91 49 27 73 21 58 3 21 27 57 83 30 60 94 44 97 94 66 5 36 21 99 83 - 44 65 71 63 22 47 6 55 2 92 85 6 82 28 0 28 2 26 60 34 76 64 87 53 98 76 40 70 43 41 79 88 14 49 72 89 52 55 12 7 31 31 98 45 59 22 87 6 36 26 - 32 82 12 97 28 85 1 81 29 21 74 35 68 78 28 0 85 6 33 35 48 59 88 25 58 76 98 28 46 79 25 18 48 95 78 77 90 23 9 85 55 54 66 11 57 69 81 99 83 16 - 74 51 80 32 47 13 19 58 62 34 18 25 68 62 2 85 0 40 23 10 67 58 30 4 4 39 58 31 92 11 53 97 56 53 64 77 51 36 52 18 53 86 40 55 78 74 23 2 8 7 - 5 27 15 73 80 41 72 29 69 27 19 75 12 81 26 6 40 0 88 72 27 21 50 1 48 81 93 96 43 12 60 10 36 91 83 66 3 17 24 27 95 51 84 18 5 90 69 61 57 4 - 84 28 81 94 22 22 79 44 28 9 69 56 48 80 60 33 23 88 0 75 3 37 27 3 80 24 14 91 48 55 9 62 70 76 99 57 83 84 64 74 13 17 47 96 86 14 84 7 30 95 - 4 85 21 16 18 65 70 33 61 26 69 78 2 13 34 35 10 72 75 0 79 8 91 76 25 42 66 70 91 67 2 98 3 71 61 74 87 12 10 40 42 93 69 79 12 23 72 37 81 82 - 44 5 54 2 89 61 22 30 33 79 43 92 66 85 76 48 67 27 3 79 0 87 25 5 89 67 70 30 89 29 68 20 78 45 99 9 16 22 83 46 86 17 66 45 3 13 3 19 88 49 - 64 73 1 30 97 42 19 48 21 33 64 4 17 26 64 59 58 21 37 8 87 0 84 57 93 76 49 29 25 36 24 95 48 11 58 17 45 19 52 44 92 75 95 32 9 44 1 62 62 82 - 68 48 72 89 52 33 5 3 55 1 29 92 49 5 87 88 30 50 27 91 25 84 0 28 28 94 19 41 80 94 35 7 41 65 3 70 29 13 31 50 30 26 98 38 84 65 11 58 44 48 - 38 23 84 9 13 77 94 80 27 22 32 98 90 62 53 25 4 1 3 76 5 57 28 0 15 48 3 92 92 71 44 4 98 93 16 78 10 15 88 81 92 45 61 38 28 94 86 22 0 55 - 35 44 9 89 99 91 2 43 73 2 33 29 31 3 98 58 4 48 80 25 89 93 28 15 0 91 67 91 3 60 38 24 90 93 12 65 25 33 46 98 91 10 46 49 77 4 13 46 80 45 - 29 0 35 0 66 12 72 88 89 10 25 9 39 26 76 76 39 81 24 42 67 76 94 48 91 0 25 67 3 14 93 54 20 19 5 17 75 24 15 77 27 23 15 77 36 15 31 46 21 81 - 11 39 21 90 27 91 38 43 88 27 70 79 61 46 40 98 58 93 14 66 70 49 19 3 67 25 0 27 70 89 54 96 62 46 60 18 97 12 6 43 6 73 14 66 69 97 32 97 63 72 - 39 53 64 9 67 56 95 17 42 38 76 98 73 91 70 28 31 96 91 70 30 29 41 92 91 67 27 0 27 3 86 77 94 8 56 28 79 54 73 65 85 25 38 76 24 38 4 91 28 21 - 69 80 8 2 89 35 93 27 26 25 31 86 6 49 43 46 92 43 48 91 89 25 80 92 3 3 70 27 0 27 38 30 45 17 93 57 85 57 97 9 78 93 1 87 16 17 9 50 7 25 - 85 33 66 79 64 45 24 56 1 59 89 40 19 27 41 79 11 12 55 67 29 36 94 71 60 14 89 3 27 0 13 20 14 9 85 46 41 17 35 1 44 89 5 2 0 42 81 57 75 58 - 79 43 94 37 80 31 17 4 22 44 56 18 45 73 79 25 53 60 9 2 68 24 35 44 38 93 54 86 38 13 0 10 1 35 29 88 9 87 21 30 8 42 91 26 2 74 99 63 83 70 - 60 99 50 54 50 45 85 86 41 28 49 53 13 21 88 18 97 10 62 98 20 95 7 4 24 54 96 77 30 20 10 0 84 83 12 84 45 19 32 74 41 32 70 32 48 41 99 6 53 8 - 83 80 37 71 34 25 89 32 66 72 29 12 21 58 14 48 56 36 70 3 78 48 41 98 90 20 62 94 45 14 1 84 0 73 29 75 84 58 26 79 73 91 85 21 26 17 90 13 62 54 - 12 98 42 49 46 58 99 76 1 91 2 48 32 3 49 95 53 91 76 71 45 11 65 93 93 19 46 8 17 9 35 83 73 0 87 28 70 81 95 11 98 56 46 69 17 47 96 14 18 57 - 5 61 40 19 18 7 17 6 88 32 26 71 56 21 72 78 64 83 99 61 99 58 3 16 12 5 60 56 93 85 29 12 29 87 0 44 25 29 97 27 86 68 22 74 21 30 66 48 73 17 - 55 46 6 9 52 86 85 41 78 30 84 15 26 27 89 77 77 66 57 74 9 17 70 78 65 17 18 28 57 46 88 84 75 28 44 0 45 13 91 81 66 7 89 55 71 60 33 89 31 46 - 9 15 30 29 31 58 78 55 68 55 34 87 79 57 52 90 51 3 83 87 16 45 29 10 25 75 97 79 85 41 9 45 84 70 25 45 0 60 17 15 84 98 12 67 56 23 24 70 46 65 - 49 4 12 53 52 24 14 32 30 30 64 79 71 83 55 23 36 17 84 12 22 19 13 15 33 24 12 54 57 17 87 19 58 81 29 13 60 0 28 63 80 81 29 10 58 92 20 5 26 19 - 88 33 34 17 22 6 63 41 9 3 67 94 7 30 12 9 52 24 64 10 83 52 31 88 46 15 6 73 97 35 21 32 26 95 97 91 17 28 0 69 22 90 1 67 80 75 20 32 30 21 - 61 66 27 79 28 37 11 20 60 57 33 1 70 60 7 85 18 27 74 40 46 44 50 81 98 77 43 65 9 1 30 74 79 11 27 81 15 63 69 0 46 25 89 22 98 78 50 90 81 17 - 92 6 29 33 21 69 97 61 44 9 59 97 35 94 31 55 53 95 13 42 86 92 30 92 91 27 6 85 78 44 8 41 73 98 86 66 84 80 22 46 0 39 58 49 51 26 96 28 22 54 - 23 77 33 12 91 57 6 75 24 34 89 40 96 44 31 54 86 51 17 93 17 75 26 45 10 23 73 25 93 89 42 32 91 56 68 7 98 81 90 25 39 0 83 93 21 79 44 22 62 95 - 54 84 82 6 9 6 94 46 42 94 45 31 47 97 98 66 40 84 47 69 66 95 98 61 46 15 14 38 1 5 91 70 85 46 22 89 12 29 1 89 58 83 0 39 50 99 19 82 84 85 - 81 82 54 9 49 50 61 60 35 18 63 87 30 94 45 11 55 18 96 79 45 32 38 38 49 77 66 76 87 2 26 32 21 69 74 55 67 10 67 22 49 93 39 0 76 85 31 44 48 1 - 58 33 75 18 75 87 32 10 90 7 45 97 32 66 59 57 78 5 86 12 3 9 84 28 77 36 69 24 16 0 2 48 26 17 21 71 56 58 80 98 51 21 50 76 0 30 40 91 44 40 - 29 12 75 80 37 63 9 38 0 17 75 57 23 5 22 69 74 90 14 23 13 44 65 94 4 15 97 38 17 42 74 41 17 47 30 60 23 92 75 78 26 79 99 85 30 0 14 17 48 62 - 27 24 54 29 35 85 39 99 13 85 76 26 35 36 87 81 23 69 84 72 3 1 11 86 13 31 32 4 9 81 99 99 90 96 66 33 24 20 20 50 96 44 19 31 40 14 0 95 69 2 - 80 91 19 45 47 35 56 62 71 28 52 41 39 21 6 99 2 61 7 37 19 62 58 22 46 46 97 91 50 57 63 6 13 14 48 89 70 5 32 90 28 22 82 44 91 17 95 0 80 40 - 10 45 67 9 47 20 76 70 61 38 40 21 56 99 36 83 8 57 30 81 88 62 44 0 80 21 63 28 7 75 83 53 62 18 73 31 46 26 30 81 22 62 84 48 44 48 69 80 0 20 - 78 83 42 81 61 72 48 30 67 40 44 51 80 83 26 16 7 4 95 82 49 82 48 55 45 81 72 21 25 58 70 8 54 57 17 46 65 19 21 17 54 95 85 1 40 62 2 40 20 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai50b.dat b/trunk/paradiseo-peo/tutorial/benchs/tai50b.dat deleted file mode 100755 index d662df9bf..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai50b.dat +++ /dev/null @@ -1,102 +0,0 @@ - 50 458821517 - - 0 34 67 83 76 93 37 64 23 46 81 25 51 50 35 932 926 903 948 456 547 502 488 542 526 435 531 518 536 559 555 889 913 903 1190 1259 1214 1153 1187 1232 1262 1234 1207 1251 1226 1286 1233 1228 1169 1215 - 34 0 100 114 108 127 68 89 56 79 115 9 44 79 19 943 938 913 957 430 520 480 466 517 500 412 509 494 514 537 535 918 940 930 1212 1280 1232 1173 1207 1252 1282 1255 1228 1272 1247 1307 1255 1247 1189 1234 - 67 100 0 55 49 42 54 38 44 28 37 91 111 28 94 935 925 906 953 496 589 535 521 581 567 470 560 554 567 590 583 848 876 865 1167 1237 1198 1134 1169 1211 1244 1210 1184 1230 1207 1267 1209 1212 1151 1197 - 83 114 55 0 8 29 47 91 65 45 22 108 103 76 118 879 869 850 897 537 628 580 566 623 607 514 606 597 613 636 630 807 833 822 1117 1186 1145 1082 1117 1160 1192 1160 1133 1178 1155 1215 1159 1159 1099 1145 - 76 108 49 8 0 29 40 84 58 37 19 100 99 69 111 886 876 857 904 529 621 572 558 615 599 506 599 589 605 628 622 815 841 830 1124 1194 1153 1090 1124 1168 1199 1168 1141 1186 1163 1223 1167 1167 1107 1153 - 93 127 42 29 29 0 63 80 72 48 13 119 125 69 126 898 888 870 917 537 630 577 563 622 608 512 602 595 609 632 625 806 835 823 1126 1195 1157 1093 1128 1170 1203 1169 1142 1188 1166 1226 1167 1171 1110 1156 - 37 68 54 47 40 63 0 72 27 26 51 61 62 54 73 903 895 874 919 493 584 539 525 579 564 472 567 555 572 595 591 852 876 865 1154 1223 1179 1118 1152 1196 1227 1198 1171 1215 1191 1251 1197 1194 1134 1180 - 64 89 38 91 84 80 72 0 49 51 74 79 115 17 77 969 960 940 987 460 553 497 484 545 531 433 522 516 529 552 545 885 914 902 1205 1275 1235 1172 1207 1249 1282 1249 1222 1268 1245 1305 1247 1249 1189 1235 - 23 56 44 65 58 72 27 49 0 24 60 48 69 32 54 930 922 900 946 471 563 515 501 557 542 449 542 532 548 571 566 873 898 887 1179 1248 1205 1144 1178 1222 1253 1223 1196 1241 1217 1277 1222 1220 1160 1206 - 46 79 28 45 37 48 26 51 24 0 36 71 85 34 78 918 910 889 936 493 585 535 522 579 564 470 562 553 568 591 586 850 877 866 1161 1230 1189 1126 1161 1204 1236 1204 1178 1223 1199 1259 1203 1203 1143 1189 - 81 115 37 22 19 13 51 74 60 36 0 107 112 62 115 899 889 870 917 528 620 569 555 614 599 504 595 587 601 624 618 815 843 831 1131 1200 1161 1098 1132 1175 1207 1174 1148 1193 1171 1230 1173 1175 1115 1161 - 25 9 91 108 100 119 61 79 48 71 107 0 48 69 15 944 938 914 959 434 525 483 468 521 504 415 512 497 516 540 537 913 936 925 1209 1278 1231 1171 1205 1250 1280 1253 1226 1269 1244 1304 1252 1246 1187 1232 - 51 44 111 103 99 125 62 115 69 85 112 48 0 100 62 899 895 870 914 465 553 518 503 551 534 449 548 531 552 575 574 890 910 900 1175 1243 1193 1135 1168 1214 1243 1218 1191 1234 1208 1268 1218 1208 1150 1195 - 50 79 28 76 69 69 54 17 32 34 62 69 100 0 70 953 944 924 970 468 561 507 494 553 539 443 533 526 540 563 556 876 904 892 1192 1261 1221 1158 1193 1236 1268 1236 1209 1254 1231 1291 1234 1235 1175 1221 - 35 19 94 118 111 126 73 77 54 78 115 15 62 70 0 959 954 930 974 421 512 468 454 507 491 401 497 484 502 525 522 924 948 938 1224 1292 1246 1186 1220 1265 1295 1267 1240 1284 1259 1319 1266 1261 1202 1247 - 932 943 935 879 886 898 903 969 930 918 899 944 899 953 959 0 48 29 37 1337 1410 1402 1387 1418 1398 1332 1436 1408 1436 1459 1464 627 559 571 474 513 400 395 411 467 470 505 480 493 452 500 513 423 393 417 - 926 938 925 869 876 888 895 960 922 910 889 938 895 944 954 48 0 55 85 1339 1415 1402 1387 1421 1401 1333 1436 1410 1437 1460 1464 580 512 524 433 476 367 356 374 431 436 466 439 456 416 466 474 390 356 383 - 903 913 906 850 857 870 874 940 900 889 870 914 870 924 930 29 55 0 54 1307 1381 1372 1357 1389 1369 1303 1406 1379 1406 1430 1435 619 553 564 488 530 420 411 428 485 489 521 495 510 470 520 529 443 410 437 - 948 957 953 897 904 917 919 987 946 936 917 959 914 970 974 37 85 54 0 1346 1418 1412 1397 1426 1406 1342 1446 1417 1446 1469 1475 664 596 608 500 536 419 420 434 490 489 530 505 515 474 519 539 442 416 438 - 456 430 496 537 529 537 493 460 471 493 528 434 465 468 421 1337 1339 1307 1346 0 95 79 67 86 71 47 117 73 108 129 147 1343 1369 1358 1639 1707 1653 1598 1631 1678 1706 1683 1655 1698 1671 1731 1683 1670 1612 1656 - 547 520 589 628 621 630 584 553 563 585 620 525 553 561 512 1410 1415 1381 1418 95 0 106 108 33 27 132 127 75 109 115 147 1435 1460 1450 1725 1792 1735 1682 1714 1762 1789 1768 1741 1782 1755 1815 1769 1752 1696 1739 - 502 480 535 580 572 577 539 497 515 535 569 483 518 507 468 1402 1402 1372 1412 79 106 0 15 76 82 70 38 32 34 58 69 1382 1411 1400 1692 1760 1710 1652 1686 1732 1761 1735 1708 1751 1726 1786 1735 1726 1668 1712 - 488 466 521 566 558 563 525 484 501 522 555 468 503 494 454 1387 1387 1357 1397 67 108 15 0 81 82 55 52 38 49 73 82 1368 1398 1386 1677 1746 1696 1638 1671 1717 1747 1721 1694 1737 1711 1771 1720 1711 1653 1698 - 542 517 581 623 615 622 579 545 557 579 614 521 551 553 507 1418 1421 1389 1426 86 33 76 81 0 21 115 94 44 76 83 115 1429 1455 1444 1725 1793 1738 1683 1716 1763 1791 1769 1741 1783 1757 1817 1769 1755 1698 1742 - 526 500 567 607 599 608 564 531 542 564 599 504 534 539 491 1398 1401 1369 1406 71 27 82 82 21 0 106 107 51 89 100 130 1414 1440 1429 1707 1775 1719 1665 1698 1745 1773 1751 1723 1765 1738 1798 1751 1736 1679 1723 - 435 412 470 514 506 512 472 433 449 470 504 415 449 443 401 1332 1333 1303 1342 47 132 70 55 115 106 0 104 83 104 127 134 1318 1346 1335 1623 1692 1641 1584 1617 1663 1692 1667 1640 1683 1657 1717 1667 1657 1599 1643 - 531 509 560 606 599 602 567 522 542 562 595 512 548 533 497 1436 1436 1406 1446 117 127 38 52 94 107 104 0 56 19 32 31 1405 1436 1424 1721 1789 1741 1682 1716 1761 1791 1764 1737 1781 1756 1816 1763 1756 1698 1743 - 518 494 554 597 589 595 555 516 532 553 587 497 531 526 484 1408 1410 1379 1417 73 75 32 38 44 51 83 56 0 41 59 83 1401 1429 1418 1705 1774 1722 1665 1698 1745 1773 1749 1722 1764 1738 1798 1749 1738 1680 1724 - 536 514 567 613 605 609 572 529 548 568 601 516 552 540 502 1436 1437 1406 1446 108 109 34 49 76 89 104 19 41 0 24 41 1413 1443 1432 1725 1794 1744 1686 1720 1766 1795 1769 1742 1785 1760 1820 1768 1760 1702 1746 - 559 537 590 636 628 632 595 552 571 591 624 540 575 563 525 1459 1460 1430 1469 129 115 58 73 83 100 127 32 59 24 0 33 1435 1466 1454 1749 1817 1768 1710 1743 1789 1819 1792 1765 1809 1783 1843 1792 1783 1725 1770 - 555 535 583 630 622 625 591 545 566 586 618 537 574 556 522 1464 1464 1435 1475 147 147 69 82 115 130 134 31 83 41 33 0 1425 1458 1446 1745 1814 1767 1708 1742 1787 1817 1789 1762 1806 1781 1841 1788 1782 1724 1769 - 889 918 848 807 815 806 852 885 873 850 815 913 890 876 924 627 580 619 664 1343 1435 1382 1368 1429 1414 1318 1405 1401 1413 1435 1425 0 81 63 447 510 553 468 501 511 557 480 464 517 518 565 472 551 493 535 - 913 940 876 833 841 835 876 914 898 877 843 936 910 904 948 559 512 553 596 1369 1460 1411 1398 1455 1440 1346 1436 1429 1443 1466 1458 81 0 19 370 436 473 388 421 434 479 406 388 441 440 489 399 472 413 456 - 903 930 865 822 830 823 865 902 887 866 831 925 900 892 938 571 524 564 608 1358 1450 1400 1386 1444 1429 1335 1424 1418 1432 1454 1446 63 19 0 389 454 491 407 440 453 498 424 407 459 459 507 417 490 431 474 - 1190 1212 1167 1117 1124 1126 1154 1205 1179 1161 1131 1209 1175 1192 1224 474 433 488 500 1639 1725 1692 1677 1725 1707 1623 1721 1705 1725 1749 1745 447 370 389 0 70 136 82 85 66 112 43 18 71 78 119 45 123 94 110 - 1259 1280 1237 1186 1194 1195 1223 1275 1248 1230 1200 1278 1243 1261 1292 513 476 530 536 1707 1792 1760 1746 1793 1775 1692 1789 1774 1794 1817 1814 510 436 454 70 0 132 122 103 47 74 30 53 24 65 63 39 109 120 106 - 1214 1232 1198 1145 1153 1157 1179 1235 1205 1189 1161 1231 1193 1221 1246 400 367 420 419 1653 1735 1710 1696 1738 1719 1641 1741 1722 1744 1768 1767 553 473 491 136 132 0 85 55 86 71 140 128 108 68 101 152 24 60 27 - 1153 1173 1134 1082 1090 1093 1118 1172 1144 1126 1098 1171 1135 1158 1186 395 356 411 420 1598 1682 1652 1638 1683 1665 1584 1682 1665 1686 1710 1708 468 388 407 82 122 85 0 36 82 110 110 85 105 74 133 118 86 25 69 - 1187 1207 1169 1117 1124 1128 1152 1207 1178 1161 1132 1205 1168 1193 1220 411 374 428 434 1631 1714 1686 1671 1716 1698 1617 1716 1698 1720 1743 1742 501 421 440 85 103 55 36 0 57 75 100 81 82 43 101 111 51 19 35 - 1232 1252 1211 1160 1168 1170 1196 1249 1222 1204 1175 1250 1214 1236 1265 467 431 485 490 1678 1762 1732 1717 1763 1745 1663 1761 1745 1766 1789 1787 511 434 453 66 47 86 82 57 0 46 54 51 25 18 57 67 66 75 60 - 1262 1282 1244 1192 1199 1203 1227 1282 1253 1236 1207 1280 1243 1268 1295 470 436 489 489 1706 1789 1761 1747 1791 1773 1692 1791 1773 1795 1819 1817 557 479 498 112 74 71 110 75 46 0 94 97 53 40 30 106 47 94 53 - 1234 1255 1210 1160 1168 1169 1198 1249 1223 1204 1174 1253 1218 1236 1267 505 466 521 530 1683 1768 1735 1721 1769 1751 1667 1764 1749 1769 1792 1789 480 406 424 43 30 140 110 100 54 94 0 29 42 72 89 13 120 115 113 - 1207 1228 1184 1133 1141 1142 1171 1222 1196 1178 1148 1226 1191 1209 1240 480 439 495 505 1655 1741 1708 1694 1741 1723 1640 1737 1722 1742 1765 1762 464 388 407 18 53 128 85 81 51 97 29 0 53 65 101 34 112 93 101 - 1251 1272 1230 1178 1186 1188 1215 1268 1241 1223 1193 1269 1234 1254 1284 493 456 510 515 1698 1782 1751 1737 1783 1765 1683 1781 1764 1785 1809 1806 517 441 459 71 24 108 105 82 25 53 42 53 0 42 49 54 86 100 82 - 1226 1247 1207 1155 1163 1166 1191 1245 1217 1199 1171 1244 1208 1231 1259 452 416 470 474 1671 1755 1726 1711 1757 1738 1657 1756 1738 1760 1783 1781 518 440 459 78 65 68 74 43 18 40 72 65 42 0 60 84 48 62 41 - 1286 1307 1267 1215 1223 1226 1251 1305 1277 1259 1230 1304 1268 1291 1319 500 466 520 519 1731 1815 1786 1771 1817 1798 1717 1816 1798 1820 1843 1841 565 489 507 119 63 101 133 101 57 30 89 101 49 60 0 100 77 120 83 - 1233 1255 1209 1159 1167 1167 1197 1247 1222 1203 1173 1252 1218 1234 1266 513 474 529 539 1683 1769 1735 1720 1769 1751 1667 1763 1749 1768 1792 1788 472 399 417 45 39 152 118 111 67 106 13 34 54 84 100 0 133 125 125 - 1228 1247 1212 1159 1167 1171 1194 1249 1220 1203 1175 1246 1208 1235 1261 423 390 443 442 1670 1752 1726 1711 1755 1736 1657 1756 1738 1760 1783 1782 551 472 490 123 109 24 86 51 66 47 120 112 86 48 77 133 0 63 16 - 1169 1189 1151 1099 1107 1110 1134 1189 1160 1143 1115 1187 1150 1175 1202 393 356 410 416 1612 1696 1668 1653 1698 1679 1599 1698 1680 1702 1725 1724 493 413 431 94 120 60 25 19 75 94 115 93 100 62 120 125 63 0 47 - 1215 1234 1197 1145 1153 1156 1180 1235 1206 1189 1161 1232 1195 1221 1247 417 383 437 438 1656 1739 1712 1698 1742 1723 1643 1743 1724 1746 1770 1769 535 456 474 110 106 27 69 35 60 53 113 101 82 41 83 125 16 47 0 - 0 0 6113 7 0 15 21 12 344 0 0 1 0 0 0 4 19 0 888 2 0 519 0 13 0 0 318 0 96 1 0 0 6597 809 1 91 0 0 0 0 0 0 309 0 10 1864 0 0 2 3163 - 0 0 0 0 0 256 31 516 2 0 256 0 0 1 0 0 13 0 128 0 0 0 0 0 5497 0 1 0 0 0 0 11 1 0 0 2690 0 0 0 1 0 0 59 0 6503 2506 0 94 0 0 - 0 3 0 0 2864 0 0 0 1890 0 444 741 1 0 0 0 0 0 2171 1018 1 10 5 0 426 0 14 0 0 0 755 5046 0 34 2 0 856 2 0 0 0 0 0 0 0 607 8 192 61 0 - 3 0 127 0 60 0 150 0 10 1017 0 0 0 0 2789 0 1 0 0 0 6388 0 2982 0 0 291 842 0 53 0 4 8054 0 0 0 115 0 0 0 19 0 0 0 0 1353 1 0 0 0 0 - 0 5 1 0 0 0 0 0 0 5 0 0 7775 0 0 2 262 0 5129 1 0 0 0 0 0 0 81 1975 2 1 0 0 0 5 0 35 0 1621 0 0 109 2 84 26 0 0 0 0 0 18 - 0 75 4 0 8 0 1483 0 0 0 0 0 13 6134 0 0 12 0 1 238 0 0 9 30 0 484 306 999 0 35 0 0 17 681 0 315 327 996 0 0 20 4157 0 71 0 1 0 486 7918 0 - 4531 2284 0 0 0 0 0 0 0 399 0 0 1365 0 15 0 0 0 0 0 4 0 37 2072 0 161 20 21 6053 0 0 690 0 0 0 2641 0 34 66 0 1 2878 0 0 0 5246 196 13 333 3140 - 176 0 0 0 0 0 3078 0 1 0 0 0 0 0 0 0 0 0 15 0 41 0 2 0 0 1690 0 0 2 0 62 897 3006 1 213 0 0 168 0 305 0 0 0 0 0 0 0 0 0 8 - 0 12 2 0 2319 0 0 0 0 0 16 403 92 5392 371 0 1 1695 37 527 24 3699 0 0 399 0 15 303 39 0 846 24 80 1257 0 4 517 0 3 951 0 28 0 0 211 2 0 0 0 1090 - 41 6487 0 507 3178 582 0 62 0 0 2 0 0 0 75 0 0 11 0 28 0 3952 0 71 1 560 0 0 0 152 3 259 1415 20 0 8 2 7 27 49 6615 2700 0 0 3180 0 22 2 13 0 - 1 161 0 0 0 2 0 656 0 0 0 0 0 3 0 0 0 0 0 2 4530 49 0 5 0 1912 3 0 0 0 0 0 0 0 3 0 0 45 30 73 0 0 0 0 6 0 0 18 2 0 - 0 1 299 0 58 0 0 25 145 0 0 0 2 0 0 5 525 0 0 0 0 0 4064 384 1 0 0 0 3358 4092 0 0 19 0 793 3 0 7788 4 3407 0 0 3 0 5 5 0 0 0 0 - 11 0 0 2117 0 14 0 0 0 5524 0 0 0 0 0 4313 0 55 122 38 0 0 126 0 0 3607 2 0 444 625 3603 53 422 0 22 8 182 0 0 549 605 0 0 0 16 251 1 1 0 0 - 0 837 9 86 4 0 0 0 2943 0 3 5 0 0 2873 32 2 5 0 408 0 0 0 1761 379 0 0 0 9 8 0 0 248 0 151 1325 0 42 0 0 3 0 0 0 0 0 0 0 0 48 - 0 84 0 0 0 0 0 6650 4257 0 0 0 0 2598 0 0 2786 0 6734 3 0 0 0 85 0 0 0 0 81 216 0 739 233 0 46 16 0 152 2 1 0 48 0 0 0 0 0 1989 34 0 - 2 0 1 55 0 0 8 3481 1 6273 0 3157 165 22 0 0 0 0 0 7 14 7665 0 3781 6 0 200 0 13 0 0 760 1 85 0 22 1 4716 0 53 0 0 0 58 0 0 0 0 1 0 - 415 0 136 0 0 248 8 0 0 114 0 5 7235 0 27 17 0 1233 1 0 0 0 0 0 0 1500 0 0 0 9 2 0 76 0 0 0 3 0 0 0 1444 0 5737 0 0 52 0 1464 74 55 - 12 51 1 0 0 6 0 109 0 2560 215 1016 0 0 0 1 3 0 43 0 0 0 738 0 475 0 0 0 16 5106 0 0 0 0 1 0 58 244 143 18 1045 1 0 0 0 0 18 0 0 24 - 1 0 0 0 3 1157 0 0 7083 0 303 863 73 0 0 163 3 0 0 28 16 0 21 0 0 9 2 0 0 889 468 0 1 0 0 1 0 0 26 1357 5137 396 0 0 0 2 0 0 0 0 - 18 478 117 20 6 0 14 0 6 0 0 124 201 0 0 0 0 3 0 0 0 3731 0 0 20 0 10 0 0 6 0 0 0 2 0 0 0 0 0 1 1005 0 0 0 0 0 6615 4504 0 0 - 1 0 0 0 2 2 1 0 1 0 1473 0 0 470 0 0 0 2 0 0 0 0 7883 6158 0 0 1063 0 1 0 3618 2783 0 23 163 0 19 0 0 0 6 57 699 15 0 0 0 922 0 125 - 0 0 37 0 0 0 104 0 1 0 7 0 0 0 0 2915 902 23 9 0 521 0 181 0 0 2560 190 1 0 0 0 1 965 0 0 0 0 0 6 0 4835 0 0 0 0 0 0 1 58 0 - 296 4001 937 3114 0 0 974 418 0 0 1 0 0 57 0 4 0 317 1703 0 55 0 0 3 4 2 2344 0 0 241 0 0 0 0 0 140 10 0 0 0 2421 0 0 0 262 0 0 1 1 11 - 0 0 0 0 0 4529 2 53 1 18 7324 70 152 0 0 0 46 1 0 6930 0 594 0 0 0 7104 0 4389 1 7 1 5 0 47 10 19 45 0 0 0 0 0 0 0 0 253 3660 95 0 0 - 0 0 30 0 0 706 27 0 0 8 0 0 0 0 0 176 0 5424 0 1 324 0 0 0 0 0 723 8 158 0 0 111 706 14 379 0 0 0 0 1 113 51 0 0 4 0 0 0 0 41 - 0 3 0 0 0 0 929 0 0 18 2804 0 731 0 0 196 0 0 0 0 0 0 0 3 1795 0 0 0 0 0 0 0 0 0 0 0 0 4947 3940 0 0 0 0 0 0 1835 0 0 0 3 - 0 1249 0 1653 0 0 72 0 0 259 0 0 1 4418 0 0 0 0 1 0 0 2 3 145 0 2258 0 0 0 15 0 0 33 0 0 2 0 99 6 0 1303 3 0 0 0 4 178 1508 0 0 - 0 7304 12 487 0 5 0 0 0 2183 0 0 0 0 18 0 0 0 1 0 0 10 7 0 0 0 1119 0 0 0 0 0 0 32 0 167 0 3352 30 3 0 0 0 0 0 6609 0 0 0 48 - 31 5500 0 7613 0 342 0 0 22 0 0 0 0 1688 0 1918 0 6 1607 5225 70 7 139 3 0 0 6 3104 0 0 2955 0 0 0 0 0 2 0 0 0 151 0 205 0 0 6 78 0 2 11 - 199 1 0 1 84 2361 1956 0 0 0 0 0 0 2 3233 0 0 0 0 4134 1680 4418 11 320 0 0 10 1 0 0 0 48 828 5 1 17 37 25 0 5 1074 703 0 0 0 0 2312 126 0 9 - 0 2 0 0 1350 342 0 0 635 0 1164 13 0 2175 0 0 12 6 0 0 0 25 0 0 20 1 4050 0 0 15 0 1 0 0 0 66 158 0 1 934 1 0 0 0 0 0 0 0 7542 0 - 4 0 3 0 0 0 0 63 0 0 4459 6 0 0 0 0 0 0 0 312 4507 297 45 2 0 0 2191 14 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 3043 939 1 6 0 1 39 - 0 0 0 0 1 15 1 3402 471 5 0 4 326 0 0 154 35 0 908 0 0 0 0 1775 0 1 298 80 0 0 0 2 0 0 0 235 0 230 0 7 2 245 0 0 26 2205 479 1 1295 0 - 14 0 561 0 706 0 0 0 0 0 0 13 4 3 0 0 0 0 6131 1747 6590 0 1161 22 195 0 0 0 0 0 3 6955 0 0 3 46 210 7783 0 0 0 0 0 0 0 0 0 0 6428 0 - 0 0 0 227 112 0 0 427 0 4 0 0 0 0 5 0 2 22 1 0 0 0 0 2 0 983 0 0 5 14 2451 0 0 0 0 0 129 1 8 0 0 0 1 0 0 36 0 326 182 2 - 0 0 0 0 0 0 0 50 0 0 0 560 0 0 0 0 4 1235 4 0 175 499 0 0 0 585 0 0 1516 0 3 0 3 0 150 0 0 1 989 0 1 2 1968 647 0 10 441 0 491 0 - 0 18 0 0 703 0 2487 19 73 24 7213 0 0 3 2 18 4230 0 0 0 10 0 79 0 0 0 1533 0 87 3 0 1804 0 0 0 2970 0 0 0 5 1368 0 70 0 69 0 0 0 953 46 - 0 0 1 16 0 0 64 0 1310 0 75 0 2 3884 0 2 26 2921 3 0 0 2816 3 7 0 1 130 0 0 296 1 0 0 0 0 15 2705 0 77 0 0 373 0 0 6 0 0 0 0 0 - 368 2478 196 0 0 1003 3 0 0 3 0 285 2033 12 0 3 1 11 11 0 24 0 0 1328 0 1 1 0 0 0 1993 2 0 0 0 3 0 7 0 0 23 0 439 2 158 4 0 0 7 435 - 0 3 0 1 0 0 0 15 2 4438 0 1 0 0 1 0 0 0 0 1 0 0 49 0 21 0 0 7 0 150 0 16 0 95 8071 2023 485 2395 4190 0 0 4436 19 1 4 189 0 0 2 0 - 0 0 0 0 0 0 38 1 1131 10 0 0 496 302 1 20 0 10 0 0 0 0 0 156 63 0 0 0 804 0 0 0 0 0 0 27 0 153 0 0 0 0 1 0 0 0 0 60 0 0 - 0 7559 878 2 0 4739 0 39 194 0 0 7228 4 0 0 0 0 9 2 15 0 0 1614 0 4935 0 0 0 0 0 0 0 1 0 0 522 0 0 4028 0 0 0 0 0 0 0 0 0 382 4242 - 0 0 0 0 0 0 0 0 0 3778 0 0 0 0 9 2647 0 10 0 1507 0 0 0 0 330 7 0 0 608 0 0 1 0 0 17 0 0 5 0 0 0 0 0 0 0 0 3504 0 0 2187 - 1 2 0 0 1649 454 2725 1 0 1 177 0 768 0 4804 5 0 0 0 1 0 0 0 0 0 150 0 0 0 158 0 0 1 15 0 40 0 0 43 0 0 5387 0 0 1679 15 304 0 0 2486 - 0 1 0 0 0 2 568 317 4541 3 0 2962 0 0 0 1255 0 0 0 28 13 0 0 0 0 0 0 94 3676 0 98 4 565 0 108 1456 18 0 0 0 0 4981 0 0 0 1 14 0 0 126 - 168 0 0 1 2 0 109 32 0 0 33 11 42 0 0 1 4 0 2 0 0 0 0 0 0 0 0 0 1408 0 26 0 0 0 1 0 0 0 1496 0 72 0 1902 7 222 0 0 1 2411 0 - 0 4 208 0 22 0 0 13 0 177 1337 20 560 0 0 0 132 0 0 0 3652 0 0 0 0 0 0 0 1 0 28 0 81 0 0 6120 2 1 25 863 0 23 0 0 0 0 0 1 6500 0 - 0 0 0 0 5 0 1 1 7 0 0 185 45 14 0 11 970 0 3 4 582 1 0 86 78 4531 2829 0 0 1467 0 0 661 0 0 0 7360 1 0 0 1928 0 0 2420 2 0 0 0 0 103 - 0 0 0 0 1 1476 0 23 0 0 7242 0 0 69 0 0 0 0 0 0 0 0 0 1 0 0 0 18 14 0 0 599 11 1 0 0 3 0 17 0 0 116 0 0 2 0 0 0 0 0 - 2 0 0 0 297 0 0 0 0 78 1320 1 1496 0 15 21 0 5 0 0 0 6 0 0 0 1669 25 0 0 0 0 0 0 0 1107 5505 4 0 0 0 0 0 0 0 0 2 0 0 0 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai60a.dat b/trunk/paradiseo-peo/tutorial/benchs/tai60a.dat deleted file mode 100755 index d1d228458..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai60a.dat +++ /dev/null @@ -1,123 +0,0 @@ - 60 7208572 - - 0 79 71 7 70 35 96 47 30 32 23 35 39 56 80 28 78 62 81 80 13 85 26 5 62 3 26 46 91 49 27 73 21 58 3 21 27 57 83 30 60 94 44 97 94 66 5 36 21 99 83 28 2 26 60 34 76 64 87 53 - 79 0 98 76 40 70 43 41 79 88 14 49 72 89 52 55 12 7 31 31 98 45 59 22 87 6 36 26 85 6 33 35 48 59 88 25 58 76 98 28 46 79 25 18 48 95 78 77 90 23 9 85 55 54 66 11 57 69 81 99 - 71 98 0 83 16 40 23 10 67 58 30 4 4 39 58 31 92 11 53 97 56 53 64 77 51 36 52 18 53 86 40 55 78 74 23 2 8 7 88 72 27 21 50 1 48 81 93 96 43 12 60 10 36 91 83 66 3 17 24 27 - 7 76 83 0 95 51 84 18 5 90 69 61 57 4 75 3 37 27 3 80 24 14 91 48 55 9 62 70 76 99 57 83 84 64 74 13 17 47 96 86 14 84 7 30 95 79 8 91 76 25 42 66 70 91 67 2 98 3 71 61 - 70 40 16 95 0 74 87 12 10 40 42 93 69 79 12 23 72 37 81 82 87 25 5 89 67 70 30 89 29 68 20 78 45 99 9 16 22 83 46 86 17 66 45 3 13 3 19 88 49 84 57 93 76 49 29 25 36 24 95 48 - 35 70 40 51 74 0 11 58 17 45 19 52 44 92 75 95 32 9 44 1 62 62 82 28 28 94 19 41 80 94 35 7 41 65 3 70 29 13 31 50 30 26 98 38 84 65 11 58 44 48 15 48 3 92 92 71 44 4 98 93 - 96 43 23 84 87 11 0 16 78 10 15 88 81 92 45 61 38 28 94 86 22 0 55 91 67 91 3 60 38 24 90 93 12 65 25 33 46 98 91 10 46 49 77 4 13 46 80 45 25 67 3 14 93 54 20 19 5 17 75 24 - 47 41 10 18 12 58 16 0 15 77 27 23 15 77 36 15 31 46 21 81 27 70 89 54 96 62 46 60 18 97 12 6 43 6 73 14 66 69 97 32 97 63 72 27 3 86 77 94 8 56 28 79 54 73 65 85 25 38 76 24 - 30 79 67 5 10 17 78 15 0 38 4 91 28 21 27 38 30 45 17 93 57 85 57 97 9 78 93 1 87 16 17 9 50 7 25 13 20 14 9 85 46 41 17 35 1 44 89 5 2 0 42 81 57 75 58 10 1 35 29 88 - 32 88 58 90 40 45 10 77 38 0 9 87 21 30 8 42 91 26 2 74 99 63 83 70 84 83 12 84 45 19 32 74 41 32 70 32 48 41 99 6 53 8 73 29 75 84 58 26 79 73 91 85 21 26 17 90 13 62 54 87 - 23 14 30 69 42 19 15 27 4 9 0 28 70 81 95 11 98 56 46 69 17 47 96 14 18 57 44 25 29 97 27 86 68 22 74 21 30 66 48 73 17 45 13 91 81 66 7 89 55 71 60 33 89 31 46 60 17 15 84 98 - 35 49 4 61 93 52 88 23 91 87 28 0 12 67 56 23 24 70 46 65 28 63 80 81 29 10 58 92 20 5 26 19 69 22 90 1 67 80 75 20 32 30 21 46 25 89 22 98 78 50 90 81 17 39 58 49 51 26 96 28 - 39 72 4 57 69 44 81 15 28 21 70 12 0 22 54 83 93 21 79 44 22 62 95 39 50 99 19 82 84 85 76 85 31 44 48 1 30 40 91 44 40 14 17 48 62 95 69 2 80 40 20 64 99 47 64 4 91 55 80 59 - 56 89 39 4 79 92 92 77 21 30 81 67 22 0 47 25 60 37 17 5 21 31 21 21 3 87 72 25 15 35 56 91 15 69 54 72 69 21 2 91 43 24 35 98 4 96 54 67 79 51 53 36 27 75 81 97 44 21 31 50 - 80 52 58 75 12 75 45 36 27 8 95 56 54 47 0 91 13 69 80 16 74 72 84 18 85 11 97 74 85 76 25 23 77 18 32 32 81 75 23 24 51 63 12 39 61 98 0 16 73 18 1 2 69 18 91 92 63 53 52 23 - 28 55 31 3 23 95 61 15 38 42 11 23 83 25 91 0 79 97 5 66 86 3 86 99 13 1 30 69 75 87 67 62 59 29 65 12 57 76 77 5 55 59 92 13 72 71 28 72 4 75 41 68 96 1 89 0 78 21 21 87 - 78 12 92 37 72 32 38 31 30 91 98 24 93 60 13 79 0 38 21 50 28 19 14 31 80 9 5 90 58 90 24 96 62 71 12 52 30 29 69 90 69 48 10 94 57 3 20 87 17 37 69 96 57 76 64 60 99 97 88 29 - 62 7 11 27 37 9 28 46 45 26 56 70 21 37 69 97 38 0 73 81 72 19 22 0 44 48 8 63 38 46 51 77 53 44 73 51 24 56 56 57 63 87 58 66 71 10 73 18 92 86 77 23 62 41 26 94 68 79 52 96 - 81 31 53 3 81 44 94 21 17 2 46 46 79 17 80 5 21 73 0 15 84 18 81 45 78 84 93 25 31 95 71 70 47 27 17 40 71 10 82 88 87 65 96 68 54 24 15 26 42 29 23 36 92 47 61 89 63 2 6 26 - 80 31 97 80 82 1 86 81 93 74 69 65 44 5 16 66 50 81 15 0 32 26 48 17 28 67 15 59 62 96 50 53 84 41 24 32 64 8 43 46 2 10 46 50 25 36 22 12 22 92 92 66 51 51 57 55 39 16 79 77 - 13 98 56 24 87 62 22 27 57 99 17 28 22 21 74 86 28 72 84 32 0 64 57 33 90 78 66 84 70 81 23 86 70 88 52 27 19 71 69 49 46 11 92 13 32 51 54 44 77 84 78 78 56 49 77 72 92 99 93 81 - 85 45 53 14 25 62 0 70 85 63 47 63 62 31 72 3 19 19 18 26 64 0 67 94 44 32 37 31 72 98 80 3 37 50 35 31 37 42 49 15 20 41 35 74 26 89 5 67 17 17 67 8 84 80 91 58 4 47 82 23 - 26 59 64 91 5 82 55 89 57 83 96 80 95 21 84 86 14 22 81 48 57 67 0 87 90 31 71 80 22 33 54 75 61 72 73 52 88 49 37 37 62 74 10 36 42 89 88 48 4 47 15 35 5 37 8 60 65 63 96 64 - 5 22 77 48 89 28 91 54 97 70 14 81 39 21 18 99 31 0 45 17 33 94 87 0 76 85 30 23 64 96 23 49 74 73 35 75 14 16 31 8 16 80 74 42 92 54 64 15 16 42 45 54 25 27 38 0 28 48 23 47 - 62 87 51 55 67 28 67 96 9 84 18 29 50 3 85 13 80 44 78 28 90 44 90 76 0 84 58 11 54 17 87 2 53 6 92 1 32 79 90 0 79 59 88 50 13 30 90 70 4 25 76 39 89 52 52 3 0 28 51 66 - 3 6 36 9 70 94 91 62 78 83 57 10 99 87 11 1 9 48 84 67 78 32 31 85 84 0 1 61 36 13 54 73 42 9 54 82 27 73 9 85 51 3 84 48 5 99 29 69 18 73 61 84 14 92 65 23 83 37 19 0 - 26 36 52 62 30 19 3 46 93 12 44 58 19 72 97 30 5 8 93 15 66 37 71 30 58 1 0 80 38 87 96 55 99 9 53 48 68 11 92 31 90 94 58 94 78 72 58 3 70 25 94 3 17 49 9 64 19 87 97 16 - 46 26 18 70 89 41 60 60 1 84 25 92 82 25 74 69 90 63 25 59 84 31 80 23 11 61 80 0 63 4 16 18 78 57 36 82 57 73 35 56 7 27 54 86 49 2 10 89 11 91 36 74 54 3 33 45 93 45 17 43 - 91 85 53 76 29 80 38 18 87 45 29 20 84 15 85 75 58 38 31 62 70 72 22 64 54 36 38 63 0 8 26 30 63 23 62 14 11 11 67 19 60 91 7 91 29 34 40 40 97 25 23 22 13 13 47 31 85 96 26 57 - 49 6 86 99 68 94 24 97 16 19 97 5 85 35 76 87 90 46 95 96 81 98 33 96 17 13 87 4 8 0 77 77 46 22 13 54 99 22 54 64 51 44 45 42 87 81 50 10 96 89 52 28 85 32 62 74 21 18 10 50 - 27 33 40 57 20 35 90 12 17 32 27 26 76 56 25 67 24 51 71 50 23 80 54 23 87 54 96 16 26 77 0 60 22 45 3 33 26 27 57 20 81 55 63 21 26 17 67 90 85 76 20 19 39 36 17 85 22 20 80 15 - 73 35 55 83 78 7 93 6 9 74 86 19 85 91 23 62 96 77 70 53 86 3 75 49 2 73 55 18 30 77 60 0 55 32 32 20 23 75 8 3 5 41 71 50 1 55 99 83 8 41 30 16 20 85 12 66 43 82 64 51 - 21 48 78 84 45 41 12 43 50 41 68 69 31 15 77 59 62 53 47 84 70 37 61 74 53 42 99 78 63 46 22 55 0 3 95 13 54 71 64 7 62 20 49 22 20 24 83 86 92 58 8 9 66 95 83 42 26 88 93 65 - 58 59 74 64 99 65 65 6 7 32 22 22 44 69 18 29 71 44 27 41 88 50 72 73 6 9 9 57 23 22 45 32 3 0 85 87 87 75 33 40 80 93 53 74 37 1 27 55 32 49 15 6 88 38 10 71 99 23 89 0 - 3 88 23 74 9 3 25 73 25 70 74 90 48 54 32 65 12 73 17 24 52 35 73 35 92 54 53 36 62 13 3 32 95 85 0 6 16 75 81 46 15 84 17 71 49 15 14 58 8 30 8 14 90 64 2 48 66 87 45 28 - 21 25 2 13 16 70 33 14 13 32 21 1 1 72 32 12 52 51 40 32 27 31 52 75 1 82 48 82 14 54 33 20 13 87 6 0 89 7 20 5 43 0 63 46 19 72 45 33 36 14 2 82 55 77 1 24 61 71 91 87 - 27 58 8 17 22 29 46 66 20 48 30 67 30 69 81 57 30 24 71 64 19 37 88 14 32 27 68 57 11 99 26 23 54 87 16 89 0 31 70 19 11 88 56 47 86 88 35 60 21 18 96 57 75 31 19 19 3 53 10 4 - 57 76 7 47 83 13 98 69 14 41 66 80 40 21 75 76 29 56 10 8 71 42 49 16 79 73 11 73 11 22 27 75 71 75 75 7 31 0 51 77 21 70 2 26 37 17 41 28 44 20 26 11 82 43 76 85 64 54 18 72 - 83 98 88 96 46 31 91 97 9 99 48 75 91 2 23 77 69 56 82 43 69 49 37 31 90 9 92 35 67 54 57 8 64 33 81 20 70 51 0 84 26 28 3 65 21 69 21 50 56 28 70 51 47 18 54 88 94 37 18 83 - 30 28 72 86 86 50 10 32 85 6 73 20 44 91 24 5 90 57 88 46 49 15 37 8 0 85 31 56 19 64 20 3 7 40 46 5 19 77 84 0 64 21 2 35 58 83 22 89 3 10 81 0 61 25 91 9 60 56 13 40 - 60 46 27 14 17 30 46 97 46 53 17 32 40 43 51 55 69 63 87 2 46 20 62 16 79 51 90 7 60 51 81 5 62 80 15 43 11 21 26 64 0 5 49 69 79 19 45 87 94 77 16 71 19 22 85 24 71 5 75 17 - 94 79 21 84 66 26 49 63 41 8 45 30 14 24 63 59 48 87 65 10 11 41 74 80 59 3 94 27 91 44 55 41 20 93 84 0 88 70 28 21 5 0 95 6 41 49 72 91 36 87 67 39 20 0 95 50 48 79 69 7 - 44 25 50 7 45 98 77 72 17 73 13 21 17 35 12 92 10 58 96 46 92 35 10 74 88 84 58 54 7 45 63 71 49 53 17 63 56 2 3 2 49 95 0 48 86 94 9 96 7 4 84 70 44 51 58 94 92 70 26 98 - 97 18 1 30 3 38 4 27 35 29 91 46 48 98 39 13 94 66 68 50 13 74 36 42 50 48 94 86 91 42 21 50 22 74 71 46 47 26 65 35 69 6 48 0 23 23 23 26 15 54 50 77 81 1 39 57 94 21 20 93 - 94 48 48 95 13 84 13 3 1 75 81 25 62 4 61 72 57 71 54 25 32 26 42 92 13 5 78 49 29 87 26 1 20 37 49 19 86 37 21 58 79 41 86 23 0 71 36 27 55 88 36 21 77 68 4 51 98 16 73 94 - 66 95 81 79 3 65 46 86 44 84 66 89 95 96 98 71 3 10 24 36 51 89 89 54 30 99 72 2 34 81 17 55 24 1 15 72 88 17 69 83 19 49 94 23 71 0 65 45 14 95 17 74 57 7 30 48 12 36 92 78 - 5 78 93 8 19 11 80 77 89 58 7 22 69 54 0 28 20 73 15 22 54 5 88 64 90 29 58 10 40 50 67 99 83 27 14 45 35 41 21 22 45 72 9 23 36 65 0 70 25 22 29 18 35 26 79 30 60 71 75 68 - 36 77 96 91 88 58 45 94 5 26 89 98 2 67 16 72 87 18 26 12 44 67 48 15 70 69 3 89 40 10 90 83 86 55 58 33 60 28 50 89 87 91 96 26 27 45 70 0 94 34 67 47 85 77 72 62 93 37 74 40 - 21 90 43 76 49 44 25 8 2 79 55 78 80 79 73 4 17 92 42 22 77 17 4 16 4 18 70 11 97 96 85 8 92 32 8 36 21 44 56 3 94 36 7 15 55 14 25 94 0 14 56 86 51 54 83 50 36 21 55 95 - 99 23 12 25 84 48 67 56 0 73 71 50 40 51 18 75 37 86 29 92 84 17 47 42 25 73 25 91 25 89 76 41 58 49 30 14 18 20 28 10 77 87 4 54 88 95 22 34 14 0 6 71 12 88 16 3 22 85 88 64 - 83 9 60 42 57 15 3 28 42 91 60 90 20 53 1 41 69 77 23 92 78 67 15 45 76 61 94 36 23 52 20 30 8 15 8 2 96 26 70 81 16 67 84 50 36 17 29 67 56 6 0 18 52 1 54 20 1 40 95 43 - 28 85 10 66 93 48 14 79 81 85 33 81 64 36 2 68 96 23 36 66 78 8 35 54 39 84 3 74 22 28 19 16 9 6 14 82 57 11 51 0 71 39 70 77 21 74 18 47 86 71 18 0 16 12 1 34 69 66 15 67 - 2 55 36 70 76 3 93 54 57 21 89 17 99 27 69 96 57 62 92 51 56 84 5 25 89 14 17 54 13 85 39 20 66 88 90 55 75 82 47 61 19 20 44 81 77 57 35 85 51 12 52 16 0 50 58 25 61 59 36 61 - 26 54 91 91 49 92 54 73 75 26 31 39 47 75 18 1 76 41 47 51 49 80 37 27 52 92 49 3 13 32 36 85 95 38 64 77 31 43 18 25 22 0 51 1 68 7 26 77 54 88 1 12 50 0 7 25 96 2 66 12 - 60 66 83 67 29 92 20 65 58 17 46 58 64 81 91 89 64 26 61 57 77 91 8 38 52 65 9 33 47 62 17 12 83 10 2 1 19 76 54 91 85 95 58 39 4 30 79 72 83 16 54 1 58 7 0 68 45 42 70 19 - 34 11 66 2 25 71 19 85 10 90 60 49 4 97 92 0 60 94 89 55 72 58 60 0 3 23 64 45 31 74 85 66 42 71 48 24 19 85 88 9 24 50 94 57 51 48 30 62 50 3 20 34 25 25 68 0 64 2 56 77 - 76 57 3 98 36 44 5 25 1 13 17 51 91 44 63 78 99 68 63 39 92 4 65 28 0 83 19 93 85 21 22 43 26 99 66 61 3 64 94 60 71 48 92 94 98 12 60 93 36 22 1 69 61 96 45 64 0 83 10 96 - 64 69 17 3 24 4 17 38 35 62 15 26 55 21 53 21 97 79 2 16 99 47 63 48 28 37 87 45 96 18 20 82 88 23 87 71 53 54 37 56 5 79 70 21 16 36 71 37 21 85 40 66 59 2 42 2 83 0 73 78 - 87 81 24 71 95 98 75 76 29 54 84 96 80 31 52 21 88 52 6 79 93 82 96 23 51 19 97 17 26 10 80 64 93 89 45 91 10 18 18 13 75 69 26 20 73 92 75 74 55 88 95 15 36 66 70 56 10 73 0 3 - 53 99 27 61 48 93 24 24 88 87 98 28 59 50 23 87 29 96 26 77 81 23 64 47 66 0 16 43 57 50 15 51 65 0 28 87 4 72 83 40 17 7 98 93 94 78 68 40 95 64 43 67 61 12 19 77 96 78 3 0 - - 0 21 95 82 56 41 6 25 10 4 63 6 44 40 75 79 0 89 35 9 1 85 84 12 0 26 91 11 35 82 26 69 56 86 45 91 59 18 76 39 18 57 36 61 36 21 71 11 29 82 82 6 71 8 77 74 30 89 76 76 - 21 0 40 93 56 1 50 4 36 27 85 2 1 15 11 35 11 20 21 61 80 58 21 76 72 44 85 94 90 51 3 48 29 90 66 41 15 83 96 74 45 65 40 54 83 14 71 77 36 53 37 26 87 76 91 13 29 11 77 32 - 95 40 0 87 67 94 79 2 10 99 56 70 99 60 4 56 2 60 72 74 46 13 20 86 4 77 15 89 48 14 89 44 59 22 57 63 6 0 62 41 62 46 25 75 76 40 66 58 30 68 78 91 13 59 49 85 84 8 38 41 - 82 93 87 0 56 39 53 77 50 30 58 55 19 85 52 34 53 40 69 12 85 72 7 49 46 87 58 17 68 27 21 6 67 26 82 44 35 3 62 8 51 1 91 39 87 72 45 96 7 87 68 33 3 21 90 45 47 25 30 43 - 56 56 67 56 0 97 33 35 61 42 36 43 7 84 6 0 0 48 62 59 29 94 82 29 3 3 51 67 39 15 66 42 23 62 62 28 76 66 82 98 35 15 17 77 44 26 76 86 60 62 62 83 91 57 62 36 2 2 43 65 - 41 1 94 39 97 0 37 49 61 5 34 53 96 82 48 28 31 75 1 95 7 92 69 62 32 97 5 39 50 82 93 71 35 14 20 74 49 50 37 79 19 51 70 42 26 79 98 60 35 9 96 70 21 37 37 67 93 93 39 2 - 6 50 79 53 33 37 0 52 26 90 26 1 68 93 7 94 19 54 37 0 20 12 11 66 84 80 1 55 9 21 12 65 7 17 51 84 87 2 27 82 71 71 40 93 27 93 92 34 39 31 26 1 87 72 59 97 46 62 12 91 - 25 4 2 77 35 49 52 0 63 70 1 22 49 24 58 62 49 94 92 63 13 45 22 69 70 18 1 44 32 3 72 99 34 45 18 96 82 79 75 83 43 26 81 39 66 22 71 58 42 91 56 27 56 28 64 98 69 69 93 35 - 10 36 10 50 61 61 26 63 0 41 67 12 33 1 71 72 26 86 67 67 24 10 46 56 56 69 53 48 74 43 94 29 64 97 38 12 99 51 87 76 71 47 47 9 71 20 81 99 45 56 15 99 64 57 84 83 61 25 41 8 - 4 27 99 30 42 5 90 70 41 0 46 52 22 33 68 52 28 75 99 6 85 65 47 90 24 79 70 28 19 87 80 4 21 34 12 20 67 24 94 10 64 52 92 49 68 65 66 28 81 17 58 99 90 70 17 57 37 2 37 3 - 63 85 56 58 36 34 26 1 67 46 0 43 20 68 35 60 23 48 40 10 42 83 82 27 49 15 34 50 42 26 33 23 16 69 97 13 35 80 40 55 30 22 76 55 56 91 74 82 96 2 13 4 4 35 48 29 42 56 3 30 - 6 2 70 55 43 53 1 22 12 52 43 0 60 81 37 42 3 17 25 37 26 88 95 55 53 62 22 44 86 43 43 40 36 53 34 59 43 50 58 62 43 9 22 64 46 68 53 8 30 30 92 6 13 95 76 81 91 37 78 90 - 44 1 99 19 7 96 68 49 33 22 20 60 0 64 49 46 19 60 93 35 47 69 54 87 12 39 33 54 12 10 4 88 54 46 82 84 8 29 10 92 62 62 74 48 22 85 23 3 30 12 98 69 29 61 34 53 98 94 33 77 - 40 15 60 85 84 82 93 24 1 33 68 81 64 0 31 54 71 78 8 78 50 76 56 80 72 26 20 57 39 68 55 71 19 32 87 41 94 21 21 20 61 13 5 46 97 61 8 92 33 73 0 16 73 74 44 55 96 67 94 83 - 75 11 4 52 6 48 7 58 71 68 35 37 49 31 0 28 22 78 55 89 11 99 84 56 30 90 87 80 20 66 59 93 79 80 28 68 99 54 69 99 1 49 63 23 33 99 40 29 60 95 28 44 30 88 66 9 41 3 4 63 - 79 35 56 34 0 28 94 62 72 52 60 42 46 54 28 0 61 87 34 28 55 63 10 78 17 90 0 66 62 30 76 0 91 62 73 38 49 85 86 88 13 71 46 75 98 53 52 10 84 70 44 8 52 59 48 85 29 94 79 4 - 0 11 2 53 0 31 19 49 26 28 23 3 19 71 22 61 0 85 31 54 95 75 81 11 56 38 95 37 67 54 88 93 53 44 68 58 98 55 84 76 19 46 89 89 5 23 63 19 53 20 47 17 66 60 86 14 52 27 77 5 - 89 20 60 40 48 75 54 94 86 75 48 17 60 78 78 87 85 0 37 27 53 88 84 63 1 26 18 85 59 24 64 81 12 72 32 64 18 79 23 56 63 2 78 3 32 3 2 18 89 50 69 66 20 97 52 81 42 28 71 71 - 35 21 72 69 62 1 37 92 67 99 40 25 93 8 55 34 31 37 0 53 87 31 36 99 98 38 97 26 31 60 83 43 16 91 96 52 48 12 17 13 35 7 96 17 59 26 30 43 53 26 37 93 35 49 33 87 55 48 63 81 - 9 61 74 12 59 95 0 63 67 6 10 37 35 78 89 28 54 27 53 0 55 12 28 79 62 63 11 56 0 10 34 1 75 62 33 68 51 53 80 84 40 3 32 27 32 61 27 92 25 2 15 9 30 0 97 24 14 10 84 56 - 1 80 46 85 29 7 20 13 24 85 42 26 47 50 11 55 95 53 87 55 0 83 0 16 67 2 5 98 73 47 81 88 39 46 13 9 89 96 30 66 37 2 0 1 8 84 99 7 62 58 49 93 47 53 34 39 8 86 18 52 - 85 58 13 72 94 92 12 45 10 65 83 88 69 76 99 63 75 88 31 12 83 0 4 95 3 80 9 3 5 26 36 92 8 94 75 8 64 73 47 68 78 8 40 6 31 85 47 96 5 98 44 86 0 93 53 16 87 94 23 61 - 84 21 20 7 82 69 11 22 46 47 82 95 54 56 84 10 81 84 36 28 0 4 0 80 35 17 45 51 26 54 59 57 25 99 87 34 79 24 41 29 7 26 71 36 18 57 16 28 1 24 68 56 81 1 54 22 67 44 6 46 - 12 76 86 49 29 62 66 69 56 90 27 55 87 80 56 78 11 63 99 79 16 95 80 0 30 0 86 73 15 81 68 36 12 65 18 59 93 34 92 82 69 3 24 94 53 66 98 6 98 30 31 41 74 23 56 15 63 91 67 10 - 0 72 4 46 3 32 84 70 56 24 49 53 12 72 30 17 56 1 98 62 67 3 35 30 0 63 5 20 27 20 15 75 56 89 93 60 37 44 41 76 25 6 62 60 51 57 79 34 41 82 95 15 94 12 90 49 82 56 75 39 - 26 44 77 87 3 97 80 18 69 79 15 62 39 26 90 90 38 26 38 63 2 80 17 0 63 0 48 84 15 45 93 74 87 39 10 81 54 80 88 13 62 11 65 72 18 81 55 82 20 33 20 77 99 5 70 31 33 52 47 55 - 91 85 15 58 51 5 1 1 53 70 34 22 33 20 87 0 95 18 97 11 5 9 45 86 5 48 0 29 74 7 30 64 45 13 7 96 98 47 0 60 94 53 6 97 20 94 42 4 30 25 64 12 44 74 96 54 44 32 74 5 - 11 94 89 17 67 39 55 44 48 28 50 44 54 57 80 66 37 85 26 56 98 3 51 73 20 84 29 0 84 4 44 64 68 38 35 29 11 39 69 85 79 60 83 12 5 55 9 49 88 61 92 23 54 81 58 29 27 80 10 78 - 35 90 48 68 39 50 9 32 74 19 42 86 12 39 20 62 67 59 31 0 73 5 26 15 27 15 74 84 0 55 72 49 31 63 37 68 36 5 74 74 57 65 82 51 27 28 85 5 73 48 23 44 0 39 53 80 33 43 99 80 - 82 51 14 27 15 82 21 3 43 87 26 43 10 68 66 30 54 24 60 10 47 26 54 81 20 45 7 4 55 0 98 61 46 15 4 33 66 6 77 84 82 33 12 24 91 45 83 85 44 45 51 78 88 31 3 42 34 46 71 12 - 26 3 89 21 66 93 12 72 94 80 33 43 4 55 59 76 88 64 83 34 81 36 59 68 15 93 30 44 72 98 0 80 15 81 21 54 1 72 84 9 35 21 64 8 66 94 50 37 42 40 6 30 12 34 27 29 33 82 54 75 - 69 48 44 6 42 71 65 99 29 4 23 40 88 71 93 0 93 81 43 1 88 92 57 36 75 74 64 64 49 61 80 0 75 54 19 67 42 63 79 10 79 93 87 13 21 48 40 63 97 32 73 94 16 2 30 89 9 89 0 90 - 56 29 59 67 23 35 7 34 64 21 16 36 54 19 79 91 53 12 16 75 39 8 25 12 56 87 45 68 31 46 15 75 0 9 2 79 37 54 71 49 19 9 29 53 17 79 33 12 6 9 18 80 29 45 9 81 2 97 39 92 - 86 90 22 26 62 14 17 45 97 34 69 53 46 32 80 62 44 72 91 62 46 94 99 65 89 39 13 38 63 15 81 54 9 0 76 21 69 1 24 22 28 47 80 22 18 89 97 52 13 99 66 27 67 89 64 80 50 34 46 18 - 45 66 57 82 62 20 51 18 38 12 97 34 82 87 28 73 68 32 96 33 13 75 87 18 93 10 7 35 37 4 21 19 2 76 0 52 31 52 22 28 21 91 9 49 75 37 35 47 47 61 80 34 75 98 11 10 49 1 47 85 - 91 41 63 44 28 74 84 96 12 20 13 59 84 41 68 38 58 64 52 68 9 8 34 59 60 81 96 29 68 33 54 67 79 21 52 0 13 41 22 65 61 42 33 77 91 12 91 56 35 45 31 45 25 58 7 86 58 24 6 37 - 59 15 6 35 76 49 87 82 99 67 35 43 8 94 99 49 98 18 48 51 89 64 79 93 37 54 98 11 36 66 1 42 37 69 31 13 0 69 57 6 50 87 63 85 35 20 72 91 86 11 22 84 57 73 6 1 19 72 79 70 - 18 83 0 3 66 50 2 79 51 24 80 50 29 21 54 85 55 79 12 53 96 73 24 34 44 80 47 39 5 6 72 63 54 1 52 41 69 0 22 19 5 94 2 72 38 95 93 24 17 85 89 99 17 85 78 14 63 11 97 6 - 76 96 62 62 82 37 27 75 87 94 40 58 10 21 69 86 84 23 17 80 30 47 41 92 41 88 0 69 74 77 84 79 71 24 22 22 57 22 0 94 61 32 9 39 56 76 48 9 93 47 40 55 3 55 81 58 29 44 33 30 - 39 74 41 8 98 79 82 83 76 10 55 62 92 20 99 88 76 56 13 84 66 68 29 82 76 13 60 85 74 84 9 10 49 22 28 65 6 19 94 0 48 3 80 43 88 43 17 27 56 4 86 32 76 6 41 55 32 41 20 61 - 18 45 62 51 35 19 71 43 71 64 30 43 62 61 1 13 19 63 35 40 37 78 7 69 25 62 94 79 57 82 35 79 19 28 21 61 50 5 61 48 0 75 46 60 10 38 99 62 70 30 49 3 22 17 26 2 29 62 69 28 - 57 65 46 1 15 51 71 26 47 52 22 9 62 13 49 71 46 2 7 3 2 8 26 3 6 11 53 60 65 33 21 93 9 47 91 42 87 94 32 3 75 0 61 33 21 55 27 73 89 88 42 26 1 22 41 66 1 88 78 68 - 36 40 25 91 17 70 40 81 47 92 76 22 74 5 63 46 89 78 96 32 0 40 71 24 62 65 6 83 82 12 64 87 29 80 9 33 63 2 9 80 46 61 0 30 9 60 44 24 42 35 90 0 13 71 61 67 68 65 78 33 - 61 54 75 39 77 42 93 39 9 49 55 64 48 46 23 75 89 3 17 27 1 6 36 94 60 72 97 12 51 24 8 13 53 22 49 77 85 72 39 43 60 33 30 0 92 21 34 27 9 26 79 33 1 22 2 10 27 38 25 59 - 36 83 76 87 44 26 27 66 71 68 56 46 22 97 33 98 5 32 59 32 8 31 18 53 51 18 20 5 27 91 66 21 17 18 75 91 35 38 56 88 10 21 9 92 0 44 28 72 91 32 30 55 30 3 57 9 34 94 18 7 - 21 14 40 72 26 79 93 22 20 65 91 68 85 61 99 53 23 3 26 61 84 85 57 66 57 81 94 55 28 45 94 48 79 89 37 12 20 95 76 43 38 55 60 21 44 0 17 85 28 38 40 29 91 81 85 74 18 19 69 69 - 71 71 66 45 76 98 92 71 81 66 74 53 23 8 40 52 63 2 30 27 99 47 16 98 79 55 42 9 85 83 50 40 33 97 35 91 72 93 48 17 99 27 44 34 28 17 0 43 64 29 32 33 25 70 76 31 89 56 49 29 - 11 77 58 96 86 60 34 58 99 28 82 8 3 92 29 10 19 18 43 92 7 96 28 6 34 82 4 49 5 85 37 63 12 52 47 56 91 24 9 27 62 73 24 27 72 85 43 0 2 26 84 34 64 67 33 59 89 45 63 45 - 29 36 30 7 60 35 39 42 45 81 96 30 30 33 60 84 53 89 53 25 62 5 1 98 41 20 30 88 73 44 42 97 6 13 47 35 86 17 93 56 70 89 42 9 91 28 64 2 0 75 76 52 40 44 32 10 6 35 25 75 - 82 53 68 87 62 9 31 91 56 17 2 30 12 73 95 70 20 50 26 2 58 98 24 30 82 33 25 61 48 45 40 32 9 99 61 45 11 85 47 4 30 88 35 26 32 38 29 26 75 0 56 78 92 4 92 98 29 9 79 98 - 82 37 78 68 62 96 26 56 15 58 13 92 98 0 28 44 47 69 37 15 49 44 68 31 95 20 64 92 23 51 6 73 18 66 80 31 22 89 40 86 49 42 90 79 30 40 32 84 76 56 0 86 40 18 53 12 48 71 15 87 - 6 26 91 33 83 70 1 27 99 99 4 6 69 16 44 8 17 66 93 9 93 86 56 41 15 77 12 23 44 78 30 94 80 27 34 45 84 99 55 32 3 26 0 33 55 29 33 34 52 78 86 0 79 94 1 97 40 31 87 97 - 71 87 13 3 91 21 87 56 64 90 4 13 29 73 30 52 66 20 35 30 47 0 81 74 94 99 44 54 0 88 12 16 29 67 75 25 57 17 3 76 22 1 13 1 30 91 25 64 40 92 40 79 0 57 26 41 21 51 38 82 - 8 76 59 21 57 37 72 28 57 70 35 95 61 74 88 59 60 97 49 0 53 93 1 23 12 5 74 81 39 31 34 2 45 89 98 58 73 85 55 6 17 22 71 22 3 81 70 67 44 4 18 94 57 0 68 68 12 48 2 66 - 77 91 49 90 62 37 59 64 84 17 48 76 34 44 66 48 86 52 33 97 34 53 54 56 90 70 96 58 53 3 27 30 9 64 11 7 6 78 81 41 26 41 61 2 57 85 76 33 32 92 53 1 26 68 0 17 49 90 31 39 - 74 13 85 45 36 67 97 98 83 57 29 81 53 55 9 85 14 81 87 24 39 16 22 15 49 31 54 29 80 42 29 89 81 80 10 86 1 14 58 55 2 66 67 10 9 74 31 59 10 98 12 97 41 68 17 0 61 73 6 19 - 30 29 84 47 2 93 46 69 61 37 42 91 98 96 41 29 52 42 55 14 8 87 67 63 82 33 44 27 33 34 33 9 2 50 49 58 19 63 29 32 29 1 68 27 34 18 89 89 6 29 48 40 21 12 49 61 0 45 13 21 - 89 11 8 25 2 93 62 69 25 2 56 37 94 67 3 94 27 28 48 10 86 94 44 91 56 52 32 80 43 46 82 89 97 34 1 24 72 11 44 41 62 88 65 38 94 19 56 45 35 9 71 31 51 48 90 73 45 0 32 56 - 76 77 38 30 43 39 12 93 41 37 3 78 33 94 4 79 77 71 63 84 18 23 6 67 75 47 74 10 99 71 54 0 39 46 47 6 79 97 33 20 69 78 78 25 18 69 49 63 25 79 15 87 38 2 31 6 13 32 0 26 - 76 32 41 43 65 2 91 35 8 3 30 90 77 83 63 4 5 71 81 56 52 61 46 10 39 55 5 78 80 12 75 90 92 18 85 37 70 6 30 61 28 68 33 59 7 69 29 45 75 98 87 97 82 66 39 19 21 56 26 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai60b.dat b/trunk/paradiseo-peo/tutorial/benchs/tai60b.dat deleted file mode 100755 index 67d52066e..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai60b.dat +++ /dev/null @@ -1,122 +0,0 @@ - 60 608215054 - - 0 139 88 123 111 86 86 33 121 71 150 108 88 85 1389 1375 1375 1399 1400 1384 1391 1424 1437 1377 1385 1416 1151 1059 1154 1124 1118 1157 1053 1110 1065 1092 1030 1073 1125 1096 1146 1093 1103 1127 1089 1132 1189 1188 1510 1533 1527 1570 1960 1955 1950 1957 1946 1958 1955 1956 - 139 0 145 98 137 146 60 133 152 139 63 87 122 79 1315 1302 1301 1325 1325 1310 1318 1349 1364 1302 1311 1342 1061 977 1067 1043 1030 1076 968 1020 979 1013 941 992 1038 1007 1061 1011 1011 1158 1123 1064 1119 1116 1423 1448 1442 1486 1906 1901 1895 1902 1891 1904 1901 1902 - 88 145 0 68 29 3 89 118 34 17 117 65 24 67 1449 1435 1435 1458 1459 1443 1451 1483 1497 1436 1444 1475 1201 1114 1206 1179 1169 1212 1106 1160 1117 1148 1080 1129 1177 1147 1199 1148 1152 1215 1176 1194 1250 1248 1562 1586 1580 1624 2029 2025 2019 2026 2015 2027 2024 2025 - 123 98 68 0 47 70 63 141 59 73 52 17 47 44 1413 1400 1399 1423 1423 1407 1415 1447 1461 1400 1408 1439 1158 1074 1164 1141 1127 1173 1065 1117 1076 1110 1038 1090 1135 1104 1158 1108 1108 1227 1191 1161 1216 1214 1520 1545 1539 1583 2002 1997 1991 1998 1988 2000 1997 1998 - 111 137 29 47 0 32 88 138 15 43 98 50 25 64 1449 1436 1436 1459 1460 1444 1452 1484 1498 1437 1445 1476 1198 1112 1204 1179 1167 1212 1104 1157 1115 1148 1078 1128 1174 1144 1197 1147 1148 1235 1197 1197 1252 1250 1560 1585 1578 1622 2034 2030 2024 2031 2020 2032 2030 2030 - 86 146 3 70 32 0 89 116 37 15 119 66 25 67 1448 1434 1434 1458 1459 1443 1451 1483 1496 1436 1444 1475 1201 1113 1206 1179 1169 1212 1106 1160 1117 1148 1080 1128 1176 1147 1199 1147 1152 1212 1174 1194 1250 1248 1562 1586 1580 1624 2028 2024 2018 2025 2014 2026 2024 2024 - 86 60 89 63 88 89 0 91 103 80 68 47 68 24 1362 1348 1348 1372 1372 1356 1364 1396 1410 1349 1357 1388 1113 1026 1117 1092 1081 1125 1018 1071 1029 1061 992 1041 1088 1058 1111 1060 1063 1164 1128 1109 1164 1162 1474 1498 1492 1536 1946 1942 1936 1943 1932 1944 1941 1942 - 33 133 118 141 138 116 91 0 149 101 159 124 114 99 1358 1343 1344 1367 1369 1352 1359 1392 1405 1345 1353 1384 1121 1029 1123 1093 1088 1126 1023 1080 1035 1061 1000 1042 1094 1066 1115 1062 1073 1097 1059 1100 1157 1156 1479 1502 1496 1539 1927 1922 1917 1924 1913 1925 1922 1923 - 121 152 34 59 15 37 103 149 0 51 111 65 38 79 1464 1451 1451 1474 1475 1459 1467 1499 1513 1452 1460 1491 1213 1127 1218 1194 1182 1226 1119 1172 1130 1163 1093 1143 1189 1159 1212 1162 1163 1246 1209 1212 1267 1265 1575 1599 1593 1637 2049 2045 2039 2046 2035 2047 2044 2045 - 71 139 17 73 43 15 80 101 51 0 119 66 27 60 1436 1422 1422 1446 1447 1431 1438 1471 1484 1423 1431 1463 1190 1102 1194 1167 1158 1201 1094 1149 1106 1136 1069 1117 1165 1136 1187 1136 1141 1197 1159 1181 1237 1235 1551 1575 1569 1612 2015 2010 2004 2011 2000 2013 2010 2011 - 150 63 117 52 98 119 68 159 111 119 0 53 94 66 1371 1359 1357 1381 1381 1366 1374 1405 1420 1358 1367 1397 1113 1031 1120 1098 1083 1130 1021 1072 1032 1068 993 1047 1091 1060 1115 1065 1063 1218 1183 1122 1176 1173 1476 1501 1495 1539 1965 1961 1954 1962 1951 1963 1960 1961 - 108 87 65 17 50 66 47 124 65 66 53 0 41 26 1401 1388 1387 1411 1411 1396 1404 1436 1450 1389 1397 1428 1149 1064 1154 1130 1118 1163 1055 1108 1066 1099 1028 1079 1125 1095 1148 1098 1099 1210 1173 1149 1204 1202 1511 1535 1529 1573 1989 1984 1978 1985 1975 1987 1984 1985 - 88 122 24 47 25 25 68 114 38 27 94 41 0 44 1430 1416 1416 1439 1440 1424 1432 1464 1478 1417 1425 1456 1180 1094 1185 1160 1149 1193 1085 1139 1097 1129 1060 1109 1156 1126 1179 1128 1131 1210 1172 1176 1231 1230 1542 1566 1560 1604 2012 2008 2002 2009 1998 2010 2008 2008 - 85 79 67 44 64 67 24 99 79 60 66 26 44 0 1386 1373 1372 1396 1396 1381 1388 1420 1434 1373 1381 1413 1136 1050 1141 1116 1105 1149 1041 1095 1053 1085 1016 1065 1112 1082 1135 1084 1086 1184 1147 1133 1188 1186 1498 1522 1516 1560 1971 1966 1960 1967 1956 1969 1966 1967 - 1389 1315 1449 1413 1449 1448 1362 1358 1464 1436 1371 1401 1430 1386 0 27 14 13 15 9 13 35 52 13 6 27 297 346 276 277 313 248 362 330 354 305 398 327 303 338 272 311 347 980 1005 261 203 203 187 192 187 216 638 634 626 633 624 637 632 635 - 1375 1302 1435 1400 1436 1434 1348 1343 1451 1422 1359 1388 1416 1373 27 0 22 27 42 18 19 56 62 21 21 48 298 338 275 270 311 242 356 328 349 295 393 318 300 335 269 304 346 953 978 244 186 187 214 219 214 242 640 635 628 635 625 639 634 636 - 1375 1301 1435 1399 1436 1434 1348 1344 1451 1422 1357 1387 1416 1372 14 22 0 25 27 10 20 49 65 1 10 41 286 332 264 264 301 235 349 318 341 291 385 313 290 325 260 298 335 972 996 248 189 189 196 203 197 228 650 646 638 645 636 649 644 647 - 1399 1325 1458 1423 1459 1458 1372 1367 1474 1446 1381 1411 1439 1396 13 27 25 0 20 15 8 29 40 24 15 21 310 357 289 289 326 260 374 343 367 316 410 338 315 350 285 323 360 978 1003 269 211 212 190 193 188 215 625 621 613 620 611 624 619 622 - 1400 1325 1459 1423 1460 1459 1372 1369 1475 1447 1381 1411 1440 1396 15 42 27 20 0 24 26 25 49 26 21 18 301 354 281 285 319 255 369 335 361 313 405 335 308 343 278 319 352 995 1020 274 215 215 173 177 172 202 635 630 623 630 621 634 629 632 - 1384 1310 1443 1407 1444 1443 1356 1352 1459 1431 1366 1396 1424 1381 9 18 10 15 24 0 10 42 55 9 3 34 296 342 274 274 311 244 359 328 351 300 395 323 300 336 270 308 346 971 996 255 196 197 196 201 196 225 640 635 628 635 625 639 634 636 - 1391 1318 1451 1415 1452 1451 1364 1359 1467 1438 1374 1404 1432 1388 13 19 20 8 26 10 0 37 46 19 12 29 306 351 284 283 321 254 368 338 361 309 405 332 310 345 279 317 355 970 995 261 203 204 197 201 196 223 630 625 618 625 616 629 624 627 - 1424 1349 1483 1447 1484 1483 1396 1392 1499 1471 1405 1436 1464 1420 35 56 49 29 25 42 37 0 29 48 40 8 325 379 306 310 343 280 394 359 386 338 429 360 333 368 303 344 376 1004 1030 296 238 238 166 166 162 187 611 607 599 606 597 610 605 608 - 1437 1364 1497 1461 1498 1496 1410 1405 1513 1484 1420 1450 1478 1434 52 62 65 40 49 55 46 29 0 63 55 31 349 397 328 329 365 299 414 382 406 355 450 378 354 390 324 363 399 991 1018 305 248 249 184 181 177 197 586 582 575 582 572 586 581 583 - 1377 1302 1436 1400 1437 1436 1349 1345 1452 1423 1358 1389 1417 1373 13 21 1 24 26 9 19 48 63 0 8 40 287 334 266 265 302 236 350 319 343 292 387 315 291 327 261 299 337 971 996 249 190 190 196 202 197 228 648 644 637 644 634 648 643 645 - 1385 1311 1444 1408 1445 1444 1357 1353 1460 1431 1367 1397 1425 1381 6 21 10 15 21 3 12 40 55 8 0 32 295 342 274 274 311 244 359 327 351 301 395 323 300 335 269 308 345 974 999 256 198 198 193 198 193 222 640 636 629 636 626 640 635 637 - 1416 1342 1475 1439 1476 1475 1388 1384 1491 1463 1397 1428 1456 1413 27 48 41 21 18 34 29 8 31 40 32 0 319 371 299 303 337 273 387 353 379 331 423 353 326 361 296 337 370 997 1023 288 229 230 171 173 168 194 616 612 605 612 602 616 611 613 - 1151 1061 1201 1158 1198 1201 1113 1121 1213 1190 1113 1149 1180 1136 297 298 286 310 301 296 306 325 349 287 295 319 0 110 31 91 37 83 103 41 89 113 121 111 37 55 50 91 52 1005 1017 205 196 189 363 388 383 427 935 931 923 930 921 935 930 932 - 1059 977 1114 1074 1112 1113 1026 1029 1127 1102 1031 1064 1094 1050 346 338 332 357 354 342 351 379 397 334 342 371 110 0 99 69 73 100 28 78 35 47 68 23 74 66 87 35 90 913 921 154 179 173 451 474 468 511 974 970 963 970 960 973 969 971 - 1154 1067 1206 1164 1204 1206 1117 1123 1218 1194 1120 1154 1185 1141 276 275 264 289 281 274 284 306 328 266 274 299 31 99 0 64 38 53 100 53 88 91 128 95 29 63 21 73 72 979 992 175 166 158 357 381 375 419 914 910 902 909 900 913 908 911 - 1124 1043 1179 1141 1179 1179 1092 1093 1194 1167 1098 1130 1160 1116 277 270 264 289 285 274 283 310 329 265 274 303 91 69 64 0 69 34 87 87 83 34 127 51 60 84 43 34 107 915 928 116 121 114 389 410 404 447 907 902 895 902 893 906 902 904 - 1118 1030 1169 1127 1167 1169 1081 1088 1182 1158 1083 1118 1149 1105 313 311 301 326 319 311 321 343 365 302 311 337 37 73 38 69 0 76 67 19 53 84 90 77 12 25 43 59 39 976 986 185 187 180 393 418 412 456 950 946 939 946 936 950 945 947 - 1157 1076 1212 1173 1212 1212 1125 1126 1226 1201 1130 1163 1193 1149 248 242 235 260 255 244 254 280 299 236 244 273 83 100 53 34 76 0 114 95 107 67 151 84 65 98 35 65 115 934 948 125 113 106 355 377 371 413 881 877 869 876 867 880 875 878 - 1053 968 1106 1065 1104 1106 1018 1023 1119 1094 1021 1055 1085 1041 362 356 349 374 369 359 368 394 414 350 359 387 103 28 100 87 67 114 0 65 14 73 41 49 72 50 94 54 71 936 944 181 203 197 457 481 475 518 994 989 982 989 980 993 988 991 - 1110 1020 1160 1117 1157 1160 1071 1080 1172 1149 1072 1108 1139 1095 330 328 318 343 335 328 338 359 382 319 327 353 41 78 53 87 19 95 65 0 51 97 79 87 30 15 62 72 21 988 997 202 206 198 404 429 423 467 967 963 956 963 953 967 962 964 - 1065 979 1117 1076 1115 1117 1029 1035 1130 1106 1032 1066 1097 1053 354 349 341 367 361 351 361 386 406 343 351 379 89 35 88 83 53 107 14 51 0 74 44 54 59 36 84 52 57 947 955 184 203 196 445 469 463 507 988 984 976 984 974 987 983 985 - 1092 1013 1148 1110 1148 1148 1061 1061 1163 1136 1068 1099 1129 1085 305 295 291 316 313 300 309 338 355 292 301 331 113 47 91 34 84 67 73 97 74 0 114 25 77 90 72 26 115 893 904 110 132 126 422 443 437 479 929 925 918 925 915 928 924 926 - 1030 941 1080 1038 1078 1080 992 1000 1093 1069 993 1028 1060 1016 398 393 385 410 405 395 405 429 450 387 395 423 121 68 128 127 90 151 41 79 44 114 0 90 99 66 126 94 74 959 965 222 245 239 483 508 502 546 1032 1028 1021 1028 1018 1031 1027 1029 - 1073 992 1129 1090 1128 1128 1041 1042 1143 1117 1047 1079 1109 1065 327 318 313 338 335 323 332 360 378 315 323 353 111 23 95 51 77 84 49 87 54 25 90 0 74 76 79 22 102 901 911 132 156 151 438 460 454 497 953 949 942 949 939 952 948 950 - 1125 1038 1177 1135 1174 1176 1088 1094 1189 1165 1091 1125 1156 1112 303 300 290 315 308 300 310 333 354 291 300 326 37 74 29 60 12 65 72 30 59 77 99 74 0 35 31 54 51 970 981 176 176 169 386 410 404 448 939 935 928 935 925 939 934 936 - 1096 1007 1147 1104 1144 1147 1058 1066 1159 1136 1060 1095 1126 1082 338 335 325 350 343 336 345 368 390 327 335 361 55 66 63 84 25 98 50 15 36 90 66 76 35 0 66 64 26 977 986 197 205 198 416 441 435 479 975 970 963 970 961 974 969 972 - 1146 1061 1199 1158 1197 1199 1111 1115 1212 1187 1115 1148 1179 1135 272 269 260 285 278 270 279 303 324 261 269 296 50 87 21 43 43 35 94 62 84 72 126 79 31 66 0 57 82 958 971 154 148 140 364 387 381 425 909 904 897 904 894 908 903 905 - 1093 1011 1148 1108 1147 1147 1060 1062 1162 1136 1065 1098 1128 1084 311 304 298 323 319 308 317 344 363 299 308 337 91 35 73 34 59 65 54 72 52 26 94 22 54 64 57 0 89 917 927 135 151 144 418 440 434 477 941 937 929 937 927 940 936 938 - 1103 1011 1152 1108 1148 1152 1063 1073 1163 1141 1063 1099 1131 1086 347 346 335 360 352 346 355 376 399 337 345 370 52 90 72 107 39 115 71 21 57 115 74 102 51 26 82 89 0 1002 1011 221 226 219 414 440 434 479 985 981 973 980 971 985 980 982 - 1127 1158 1215 1227 1235 1212 1164 1097 1246 1197 1218 1210 1210 1184 980 953 972 978 995 971 970 1004 991 971 974 997 1005 913 979 915 976 934 936 988 947 893 959 901 970 977 958 917 1002 0 49 812 849 855 1167 1170 1165 1188 1211 1207 1205 1211 1200 1207 1209 1207 - 1089 1123 1176 1191 1197 1174 1128 1059 1209 1159 1183 1173 1172 1147 1005 978 996 1003 1020 996 995 1030 1018 996 999 1023 1017 921 992 928 986 948 944 997 955 904 965 911 981 986 971 927 1011 49 0 827 867 873 1192 1196 1191 1215 1254 1250 1248 1253 1243 1250 1252 1249 - 1132 1064 1194 1161 1197 1194 1109 1100 1212 1181 1122 1149 1176 1133 261 244 248 269 274 255 261 296 305 249 256 288 205 154 175 116 185 125 181 202 184 110 222 132 176 197 154 135 221 812 827 0 59 60 418 434 428 465 852 847 840 847 837 850 846 848 - 1189 1119 1250 1216 1252 1250 1164 1157 1267 1237 1176 1204 1231 1188 203 186 189 211 215 196 203 238 248 190 198 229 196 179 166 121 187 113 203 206 203 132 245 156 176 205 148 151 226 849 867 59 0 7 361 376 370 407 804 799 792 799 789 802 798 800 - 1188 1116 1248 1214 1250 1248 1162 1156 1265 1235 1173 1202 1230 1186 203 187 189 212 215 197 204 238 249 190 198 230 189 173 158 114 180 106 197 198 196 126 239 151 169 198 140 144 219 855 873 60 7 0 358 374 368 406 808 803 796 803 793 806 802 804 - 1510 1423 1562 1520 1560 1562 1474 1479 1575 1551 1476 1511 1542 1498 187 214 196 190 173 196 197 166 184 196 193 171 363 451 357 389 393 355 457 404 445 422 483 438 386 416 364 418 414 1167 1192 418 361 358 0 29 25 67 649 645 637 644 637 650 643 647 - 1533 1448 1586 1545 1585 1586 1498 1502 1599 1575 1501 1535 1566 1522 192 219 203 193 177 201 201 166 181 202 198 173 388 474 381 410 418 377 481 429 469 443 508 460 410 441 387 440 440 1170 1196 434 376 374 29 0 6 39 621 617 609 616 609 622 615 619 - 1527 1442 1580 1539 1578 1580 1492 1496 1593 1569 1495 1529 1560 1516 187 214 197 188 172 196 196 162 177 197 193 168 383 468 375 404 412 371 475 423 463 437 502 454 404 435 381 434 434 1165 1191 428 370 368 25 6 0 44 624 620 612 619 612 625 618 622 - 1570 1486 1624 1583 1622 1624 1536 1539 1637 1612 1539 1573 1604 1560 216 242 228 215 202 225 223 187 197 228 222 194 427 511 419 447 456 413 518 467 507 479 546 497 448 479 425 477 479 1188 1215 465 407 406 67 39 44 0 591 588 580 586 579 592 585 589 - 1960 1906 2029 2002 2034 2028 1946 1927 2049 2015 1965 1989 2012 1971 638 640 650 625 635 640 630 611 586 648 640 616 935 974 914 907 950 881 994 967 988 929 1032 953 939 975 909 941 985 1211 1254 852 804 808 649 621 624 591 0 5 12 6 14 4 6 4 - 1955 1901 2025 1997 2030 2024 1942 1922 2045 2010 1961 1984 2008 1966 634 635 646 621 630 635 625 607 582 644 636 612 931 970 910 902 946 877 989 963 984 925 1028 949 935 970 904 937 981 1207 1250 847 799 803 645 617 620 588 5 0 8 4 10 5 3 2 - 1950 1895 2019 1991 2024 2018 1936 1917 2039 2004 1954 1978 2002 1960 626 628 638 613 623 628 618 599 575 637 629 605 923 963 902 895 939 869 982 956 976 918 1021 942 928 963 897 929 973 1205 1248 840 792 796 637 609 612 580 12 8 0 7 5 13 6 10 - 1957 1902 2026 1998 2031 2025 1943 1924 2046 2011 1962 1985 2009 1967 633 635 645 620 630 635 625 606 582 644 636 612 930 970 909 902 946 876 989 963 984 925 1028 949 935 970 904 937 980 1211 1253 847 799 803 644 616 619 586 6 4 7 0 11 8 1 6 - 1946 1891 2015 1988 2020 2014 1932 1913 2035 2000 1951 1975 1998 1956 624 625 636 611 621 625 616 597 572 634 626 602 921 960 900 893 936 867 980 953 974 915 1018 939 925 961 894 927 971 1200 1243 837 789 793 637 609 612 579 14 10 5 11 0 13 10 11 - 1958 1904 2027 2000 2032 2026 1944 1925 2047 2013 1963 1987 2010 1969 637 639 649 624 634 639 629 610 586 648 640 616 935 973 913 906 950 880 993 967 987 928 1031 952 939 974 908 940 985 1207 1250 850 802 806 650 622 625 592 4 5 13 8 13 0 8 3 - 1955 1901 2024 1997 2030 2024 1941 1922 2044 2010 1960 1984 2008 1966 632 634 644 619 629 634 624 605 581 643 635 611 930 969 908 902 945 875 988 962 983 924 1027 948 934 969 903 936 980 1209 1252 846 798 802 643 615 618 585 6 3 6 1 10 8 0 6 - 1956 1902 2025 1998 2030 2024 1942 1923 2045 2011 1961 1985 2008 1967 635 636 647 622 632 636 627 608 583 645 637 613 932 971 911 904 947 878 991 964 985 926 1029 950 936 972 905 938 982 1207 1249 848 800 804 647 619 622 589 4 2 10 6 11 3 6 0 - 0 0 403 0 0 4 0 5585 2 2 0 1180 133 0 0 0 10 6 0 0 460 124 601 0 0 0 31 0 0 0 0 0 3 984 0 0 146 937 0 38 0 0 0 81 0 0 26 0 0 0 0 0 0 0 0 0 0 38 0 1 - 0 0 347 3 0 0 0 6211 702 597 0 0 134 0 0 0 2722 2 1 3 726 2840 1859 0 75 0 0 0 2196 2 0 0 1828 0 0 0 619 0 0 0 0 0 2691 383 47 56 0 0 1 143 0 1 33 0 237 0 0 0 1 0 - 0 471 0 10 7124 1 23 0 11 0 1 109 0 0 0 0 0 11 5104 378 0 2984 86 0 0 361 0 27 0 0 0 193 112 1179 1 0 1 0 0 0 1092 0 0 2991 4 6 17 0 0 3 0 17 0 0 0 65 1 1 11 209 - 0 1 10 0 0 19 0 0 0 0 2802 2 435 11 0 0 0 9 694 0 38 10 0 0 1437 311 0 0 0 4 0 0 40 0 249 0 0 0 0 76 0 0 5049 1 0 0 0 30 0 14 0 0 0 0 5 0 2 0 3 0 - 284 0 1786 27 0 57 4556 0 4 0 0 0 0 0 0 0 293 0 0 129 0 0 4 222 0 0 2741 331 0 1129 6589 0 1 0 524 123 26 1 9 239 0 40 1 5991 0 71 0 0 0 0 168 0 0 580 5592 3 0 0 0 7 - 22 210 0 510 11 0 1576 0 448 0 3547 430 0 0 0 419 0 0 26 0 4 275 0 0 0 68 0 0 0 0 0 2249 34 0 0 0 0 0 0 4 4272 2781 0 0 0 0 175 0 1 0 2721 0 0 0 0 0 0 108 0 0 - 17 257 0 15 1639 0 0 5 0 0 0 5181 0 0 6 0 136 19 0 1 0 0 0 0 3770 0 566 0 0 0 0 1972 0 4 0 0 0 0 0 0 7 0 462 1 0 0 0 2 7300 0 0 0 1 0 0 0 5632 0 27 1 - 0 0 0 0 0 2281 8 0 560 0 0 6 0 0 1045 0 0 0 1356 0 3 0 0 5 11 0 0 0 0 3 0 73 0 0 0 0 8 0 0 0 0 5449 400 0 64 0 14 0 0 0 3980 656 780 0 85 0 0 18 0 0 - 0 0 0 0 1 2978 0 0 0 0 135 0 0 8 75 0 0 2938 0 23 1 1 0 139 0 38 1 0 130 1 0 1 102 0 0 0 4 0 0 0 0 17 190 11 0 0 7360 1 4824 95 3 1 0 69 0 0 0 0 0 1595 - 0 0 329 0 553 0 613 0 0 0 0 283 194 0 0 0 15 7 0 19 745 17 1542 1 0 2 34 2354 0 0 0 2 400 4 2382 0 5 0 23 0 1 0 79 0 0 0 0 6752 10 0 1 805 0 3 3485 0 6 0 0 0 - 0 5698 2994 0 0 0 575 0 0 0 0 0 4104 0 0 1 7 1963 1866 0 0 0 0 46 362 0 0 4 0 1 0 458 15 24 0 0 1 0 0 2 0 9 0 0 14 0 0 0 0 21 2533 0 5 0 0 0 0 0 0 0 - 74 36 0 0 0 0 0 4785 1 152 1 0 0 0 449 4 0 0 0 0 0 5 0 0 0 2357 43 858 0 423 636 0 0 175 0 0 0 0 0 15 0 0 0 1337 0 1 100 0 0 1042 692 322 0 0 5 0 0 1606 34 0 - 0 0 0 6 1 54 0 276 0 5 2407 3 0 320 4582 0 74 5937 0 1 0 3781 2 0 0 6280 0 681 1 36 0 0 111 54 0 1 0 1 11 5721 0 764 0 0 0 0 438 0 0 0 0 4 0 2 0 8 0 70 0 0 - 0 0 7477 0 0 2 0 0 0 11 598 631 2525 0 0 18 7 63 0 0 0 4518 21 0 133 24 0 0 0 0 4 516 1 0 0 0 1 0 0 0 42 3 0 0 697 1405 0 0 0 0 0 1193 7 10 0 5372 4060 0 574 0 - 0 292 11 0 0 52 0 5 158 0 0 0 1 951 0 1226 0 0 175 0 4295 0 5373 0 2 1 0 36 0 0 0 10 1895 2712 325 0 1509 242 0 902 0 4 0 0 0 0 0 49 22 0 0 0 16 5 1059 46 0 0 0 830 - 0 0 29 109 25 0 1339 0 0 0 3074 1 0 887 18 0 1102 0 0 38 212 0 0 0 13 2 0 0 13 0 0 7804 0 0 0 0 0 11 0 0 0 0 0 0 0 0 769 0 0 0 0 0 0 0 450 0 0 3 2199 0 - 3 0 0 1 40 1 183 0 222 124 0 2019 0 4 0 0 0 3 0 0 0 0 187 0 5 1 2 0 71 2585 0 0 0 0 506 0 0 533 0 28 0 0 0 211 0 0 0 448 0 338 5230 0 0 0 0 7 0 0 0 0 - 0 0 0 0 0 3 0 0 19 0 0 1711 0 37 26 83 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 3 0 1844 0 202 0 0 0 0 0 0 1 1278 867 0 5765 580 0 1 0 3113 0 0 0 10 0 1 344 - 0 1 1416 0 578 0 0 5 0 2 0 0 0 6850 2 0 1979 7795 0 0 113 0 0 0 5 0 1103 0 19 1 2 0 0 0 0 36 0 166 0 2964 2 0 75 7701 0 252 0 0 0 0 0 39 10 0 2461 6 4 0 5 39 - 3363 0 100 0 4 0 9 0 137 34 35 8 0 0 1339 20 0 0 84 0 23 0 476 17 6864 0 0 0 1 0 0 0 4080 101 1 0 0 0 0 0 3310 0 5 0 0 0 0 0 0 0 0 3412 0 0 0 6 0 1480 0 0 - 59 133 275 1 0 451 0 2202 32 665 1 0 283 0 0 0 353 0 0 0 0 1 0 0 110 0 0 1 0 0 408 0 1 700 53 169 0 4276 9 0 0 0 2 822 61 0 165 0 0 0 0 8 85 5 388 0 0 0 0 14 - 102 0 0 1 1 0 12 2940 0 0 0 0 0 0 85 470 0 0 0 100 1 0 6 22 0 5392 361 0 3985 37 0 0 0 0 0 0 0 1261 1 1 1 0 0 0 0 9 0 1 43 28 0 0 0 9 35 0 0 0 0 0 - 0 9 3814 0 0 4903 0 0 3 0 0 0 0 31 176 0 1710 0 0 3570 57 5 0 0 0 6 0 0 2184 0 2 398 0 0 0 17 18 0 278 0 1592 16 1759 5233 622 2717 0 92 0 0 0 1 0 0 0 0 0 2546 0 0 - 5877 1 0 0 787 0 1 190 733 0 0 0 0 0 1 0 5 0 0 0 907 35 0 0 0 2 0 1 0 35 0 0 1458 17 0 44 7041 11 6 3111 2 628 0 0 0 306 1966 649 127 1 20 17 3 0 0 131 0 0 0 0 - 0 0 0 9 0 2454 0 2 0 0 0 0 26 49 0 0 7 0 1603 0 357 0 1 27 0 0 7315 227 0 60 386 0 0 0 0 3462 0 0 0 0 0 0 0 112 13 1 0 0 1 0 0 0 0 1 0 3935 0 71 491 2 - 50 3 0 448 0 0 1 0 0 603 0 7056 0 0 0 1 0 0 0 0 0 2173 1 73 0 0 7 0 370 0 0 3394 0 0 0 1 621 0 0 0 55 804 141 766 0 2645 108 0 6010 17 0 0 1 0 0 0 0 4 0 4 - 0 5 3 0 0 12 2 0 23 0 0 0 0 6 0 4521 0 0 0 1072 0 5818 679 139 0 1 0 0 0 0 0 75 220 14 553 51 3257 2 9 16 438 229 0 0 0 0 0 0 0 0 6987 119 1 0 0 1 1 2055 2940 0 - 0 0 5 0 0 0 908 3056 6131 0 0 9 0 0 0 0 1 6958 3 0 0 509 0 0 0 0 160 0 2 0 0 0 0 0 234 0 0 0 0 0 0 0 0 0 40 622 0 254 0 49 0 322 28 0 3 5778 4 0 0 0 - 331 0 430 35 7 52 0 1 0 957 36 0 0 0 0 0 0 0 1 75 3 12 0 0 0 0 459 1 0 0 0 0 70 0 0 0 0 0 1541 0 0 0 0 0 0 0 7 0 0 0 0 0 6351 380 0 0 0 0 0 0 - 5 0 1733 0 1 17 0 47 0 1346 0 0 0 6 0 0 0 0 8 0 0 50 0 4321 5 0 97 0 0 0 0 0 0 0 0 16 0 4200 924 0 0 1 470 0 198 1256 0 0 0 0 0 0 4 0 0 352 0 1 0 0 - 0 5 0 32 0 0 0 0 770 0 0 0 0 0 0 0 0 0 0 449 0 0 1 0 0 0 15 0 0 0 0 81 382 0 8 0 0 19 0 0 0 84 0 261 15 0 2 0 0 0 6019 432 9 0 0 59 7528 28 73 0 - 95 24 0 0 0 3889 0 3 55 4336 0 6 1 0 0 791 544 0 0 1 0 10 0 8 6 0 2625 406 0 620 78 0 319 1 0 31 4237 5 0 89 0 0 0 7245 0 397 6 0 160 0 101 645 0 0 1 0 0 0 0 1 - 3470 0 0 925 0 3 0 0 9 2 2 0 0 2 348 0 0 665 0 2428 0 0 0 0 1 0 1699 0 0 0 27 0 0 3 1013 0 0 0 0 0 0 0 76 0 0 0 5 6 387 0 0 0 485 0 128 3208 0 2 1 0 - 28 3789 0 0 0 1000 1460 39 0 0 815 0 0 63 1 0 0 123 3 9 61 0 4953 6131 3959 89 0 0 0 672 232 2 0 0 0 779 388 0 0 1 245 86 1 0 4 0 0 0 197 0 0 1667 0 6010 12 0 0 0 0 0 - 0 0 142 4838 0 172 0 964 2257 0 0 537 0 4647 0 2875 0 52 0 2659 133 0 0 0 0 0 0 57 83 3 0 47 5 0 0 1 0 0 0 474 0 3 0 20 148 2 0 1066 2 0 4 29 216 246 0 0 0 0 0 0 - 1028 0 0 185 1 2709 0 38 47 0 0 4 0 1705 0 0 0 0 2 160 0 0 100 28 0 0 0 0 0 1 0 12 642 0 0 0 0 5 3 5265 6 1 0 0 0 0 2 0 203 0 0 6 3240 107 0 0 8 1926 0 7137 - 7378 0 0 7 0 0 0 37 0 3 0 3429 0 0 0 13 52 0 2 0 0 54 0 76 2008 0 0 3160 0 20 0 0 0 0 0 0 0 11 0 0 0 0 0 0 0 5 53 3205 0 399 0 0 1 90 2 0 0 394 0 7659 - 869 0 82 1 128 972 0 20 0 0 6477 630 0 6347 0 7 16 0 3387 0 0 12 1 0 328 0 5 0 0 0 0 0 0 47 0 513 0 0 1 0 39 6600 0 0 0 70 0 0 0 320 7592 0 1962 0 0 533 0 4 22 0 - 0 171 0 6 0 31 8 0 0 0 0 549 5752 0 80 25 0 0 70 7116 25 4634 0 0 0 0 6 0 666 1 5 913 0 1164 593 0 0 0 0 173 0 3187 0 1315 0 0 0 2 2501 921 0 0 284 0 0 0 0 4 0 565 - 0 0 29 0 0 0 0 1 391 350 0 150 1 0 4 1 392 1 0 0 1 723 1 0 0 3 0 0 0 0 1529 214 1 0 0 0 20 0 0 0 0 0 0 0 0 0 1151 108 0 0 69 0 0 8 743 0 403 26 73 2395 - 90 1000 0 25 0 0 11 18 0 0 6 178 5 0 17 0 3036 1331 5044 357 1 1072 0 6 15 0 661 46 38 0 0 0 0 0 0 1926 0 1 0 112 0 2398 170 0 0 0 0 0 1 0 0 0 0 4939 254 5 0 0 0 6609 - 0 0 0 0 0 0 0 0 0 223 58 0 0 3 4544 0 2690 1 16 0 0 0 896 20 0 3751 0 0 57 0 0 0 247 0 2391 1 517 108 0 0 6 0 1 0 0 2 0 0 0 0 5361 0 0 17 3205 0 3 0 0 0 - 0 2 0 182 1 233 0 0 2710 0 3757 844 7202 4482 5 263 0 7 0 4 455 0 0 0 0 7 0 0 3611 0 1 1 0 142 0 0 6 2726 2 4 0 0 0 45 3 4 1249 1 0 152 0 0 0 0 51 0 0 33 0 0 - 7 5 13 0 0 0 5551 0 0 7 432 0 0 0 48 0 0 0 0 0 0 0 0 2 0 4 0 0 0 0 0 23 0 2 20 0 0 0 0 3007 28 0 0 0 0 16 2 0 0 0 125 0 1338 2930 49 0 0 0 0 0 - 6682 5 465 4 0 0 7 8 0 1 0 0 0 0 0 4543 2474 0 4 0 0 338 0 0 0 0 0 0 0 0 0 1107 0 0 811 0 0 2 0 453 1190 46 1346 798 0 0 9 0 2 0 0 82 7370 1 592 0 0 0 43 0 - 1 0 0 4 188 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 77 6 8 26 0 3 0 0 0 3 14 1094 0 0 62 0 0 0 2 0 1 54 98 9 0 0 0 4 0 27 1361 0 0 385 0 0 2 87 0 0 - 0 1503 0 9 1 3025 0 539 49 1 1 2 0 0 148 0 1053 3730 0 11 3 0 0 0 5813 0 2807 0 254 0 0 0 0 0 0 5 0 0 0 274 0 214 0 0 0 11 0 3550 0 0 282 0 2 0 119 43 1 0 0 0 - 88 0 0 0 1 1 0 519 119 0 4367 63 531 105 0 0 0 51 0 0 6048 1 12 6 21 0 3 0 8 0 0 0 2 1507 2125 0 354 0 6057 2 0 0 0 1 0 2 0 0 0 0 0 0 0 0 0 0 0 131 948 65 - 0 1 0 0 1 0 0 1 4 7820 292 0 2770 0 0 0 0 1618 0 0 0 396 0 1 5 1 12 13 0 0 0 51 5 0 31 0 0 1258 41 21 0 15 24 6 0 4 0 12 0 114 0 301 4303 0 95 0 0 7 0 1 - 2887 2 20 66 0 79 15 2693 0 0 0 0 164 3172 0 29 0 0 0 0 0 0 25 3523 8 167 472 0 0 310 107 0 1 0 1 12 33 0 3 13 1 0 0 0 125 0 9 6428 0 0 0 13 63 0 0 0 21 7236 0 0 - 0 0 5044 189 0 1522 0 3636 69 0 47 0 0 366 622 0 4 0 3 0 613 0 0 0 1 0 0 0 929 0 0 177 8 0 0 0 0 0 0 0 0 0 1 0 0 1276 1 0 0 0 0 34 5 0 0 0 3 39 0 0 - 0 0 0 0 845 0 0 2 848 30 0 474 7272 0 0 0 1268 0 0 1 0 0 0 0 1 339 8 1 4360 0 68 33 0 0 434 0 0 0 58 0 0 0 0 5 0 0 0 1601 0 0 0 0 8 0 0 0 0 1 185 0 - 156 11 0 2092 0 1 0 0 0 0 1 0 0 0 0 1 0 20 13 0 0 0 909 4 11 1 13 0 3 6 0 170 0 37 0 17 0 1 1 0 0 0 0 0 0 2194 113 0 0 0 20 13 0 0 0 0 0 0 144 0 - 0 0 0 1 0 0 0 1 5906 0 3556 190 0 0 85 0 3868 0 476 1271 1 0 0 0 5 143 0 0 0 0 0 0 0 1295 0 0 7 0 52 2336 82 5313 0 0 0 0 0 0 0 0 24 55 376 0 0 0 1 0 846 1092 - 0 8 7641 0 0 3467 0 0 0 19 0 0 28 0 3266 23 0 5231 3 435 1641 5478 415 0 0 0 0 1 0 3085 0 0 0 0 597 0 0 253 0 0 14 0 534 5320 1 0 3706 0 0 2 0 47 7534 0 0 4 2035 0 0 1974 - 7394 0 1310 0 0 308 0 662 660 0 1 0 3 225 0 33 10 0 0 0 0 0 0 0 0 9 1 15 56 8 0 1 0 151 2068 1 0 60 50 0 0 0 0 20 149 1 0 0 0 894 177 3 0 2451 0 0 40 5978 6 0 - 0 1 0 2 0 0 1 0 0 2520 4 1125 0 0 0 0 17 100 0 0 0 27 311 0 0 1 1817 793 0 0 3 1 516 4 2 0 0 1 0 0 0 0 15 5 0 410 22 3097 0 0 0 4171 7 0 6613 28 0 0 0 29 - 10 166 0 0 6 0 0 159 0 13 0 16 3 629 1753 0 1446 0 59 0 0 0 0 0 3258 511 0 0 121 0 100 0 10 2 0 0 519 34 210 73 0 0 29 0 0 0 13 0 0 0 0 0 0 0 0 0 3877 0 70 155 - 0 0 0 44 0 204 137 0 1215 0 1 0 6 0 0 0 0 0 0 11 0 1 0 0 0 0 0 80 0 1 0 387 37 1 0 0 2 0 0 0 3828 0 4 4148 0 31 0 24 1 358 0 212 192 130 1 2230 0 0 0 1 - 738 689 551 1 0 0 35 512 0 13 2532 0 0 55 133 0 1 574 0 0 4 0 0 0 0 1 0 0 0 2911 191 1 19 6110 0 1849 0 1035 31 22 0 1297 0 0 1803 1448 0 0 0 0 0 239 0 0 0 0 3590 0 2 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai64c.dat b/trunk/paradiseo-peo/tutorial/benchs/tai64c.dat deleted file mode 100755 index 9c6463552..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai64c.dat +++ /dev/null @@ -1,130 +0,0 @@ - 64 1855928 - - 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 100000 25000 11111 6250 11111 25000 100000 100000 50000 20000 10000 5882 10000 20000 50000 25000 20000 12500 7692 5000 7692 12500 20000 11111 10000 7692 5556 4000 5556 7692 10000 6250 5882 5000 4000 3125 4000 5000 5882 11111 10000 7692 5556 4000 5556 7692 10000 25000 20000 12500 7692 5000 7692 12500 20000 100000 50000 20000 10000 5882 10000 20000 50000 - 100000 0 100000 25000 11111 6250 11111 25000 50000 100000 50000 20000 10000 5882 10000 20000 20000 25000 20000 12500 7692 5000 7692 12500 10000 11111 10000 7692 5556 4000 5556 7692 5882 6250 5882 5000 4000 3125 4000 5000 10000 11111 10000 7692 5556 4000 5556 7692 20000 25000 20000 12500 7692 5000 7692 12500 50000 100000 50000 20000 10000 5882 10000 20000 - 25000 100000 0 100000 25000 11111 6250 11111 20000 50000 100000 50000 20000 10000 5882 10000 12500 20000 25000 20000 12500 7692 5000 7692 7692 10000 11111 10000 7692 5556 4000 5556 5000 5882 6250 5882 5000 4000 3125 4000 7692 10000 11111 10000 7692 5556 4000 5556 12500 20000 25000 20000 12500 7692 5000 7692 20000 50000 100000 50000 20000 10000 5882 10000 - 11111 25000 100000 0 100000 25000 11111 6250 10000 20000 50000 100000 50000 20000 10000 5882 7692 12500 20000 25000 20000 12500 7692 5000 5556 7692 10000 11111 10000 7692 5556 4000 4000 5000 5882 6250 5882 5000 4000 3125 5556 7692 10000 11111 10000 7692 5556 4000 7692 12500 20000 25000 20000 12500 7692 5000 10000 20000 50000 100000 50000 20000 10000 5882 - 6250 11111 25000 100000 0 100000 25000 11111 5882 10000 20000 50000 100000 50000 20000 10000 5000 7692 12500 20000 25000 20000 12500 7692 4000 5556 7692 10000 11111 10000 7692 5556 3125 4000 5000 5882 6250 5882 5000 4000 4000 5556 7692 10000 11111 10000 7692 5556 5000 7692 12500 20000 25000 20000 12500 7692 5882 10000 20000 50000 100000 50000 20000 10000 - 11111 6250 11111 25000 100000 0 100000 25000 10000 5882 10000 20000 50000 100000 50000 20000 7692 5000 7692 12500 20000 25000 20000 12500 5556 4000 5556 7692 10000 11111 10000 7692 4000 3125 4000 5000 5882 6250 5882 5000 5556 4000 5556 7692 10000 11111 10000 7692 7692 5000 7692 12500 20000 25000 20000 12500 10000 5882 10000 20000 50000 100000 50000 20000 - 25000 11111 6250 11111 25000 100000 0 100000 20000 10000 5882 10000 20000 50000 100000 50000 12500 7692 5000 7692 12500 20000 25000 20000 7692 5556 4000 5556 7692 10000 11111 10000 5000 4000 3125 4000 5000 5882 6250 5882 7692 5556 4000 5556 7692 10000 11111 10000 12500 7692 5000 7692 12500 20000 25000 20000 20000 10000 5882 10000 20000 50000 100000 50000 - 100000 25000 11111 6250 11111 25000 100000 0 50000 20000 10000 5882 10000 20000 50000 100000 20000 12500 7692 5000 7692 12500 20000 25000 10000 7692 5556 4000 5556 7692 10000 11111 5882 5000 4000 3125 4000 5000 5882 6250 10000 7692 5556 4000 5556 7692 10000 11111 20000 12500 7692 5000 7692 12500 20000 25000 50000 20000 10000 5882 10000 20000 50000 100000 - 100000 50000 20000 10000 5882 10000 20000 50000 0 100000 25000 11111 6250 11111 25000 100000 100000 50000 20000 10000 5882 10000 20000 50000 25000 20000 12500 7692 5000 7692 12500 20000 11111 10000 7692 5556 4000 5556 7692 10000 6250 5882 5000 4000 3125 4000 5000 5882 11111 10000 7692 5556 4000 5556 7692 10000 25000 20000 12500 7692 5000 7692 12500 20000 - 50000 100000 50000 20000 10000 5882 10000 20000 100000 0 100000 25000 11111 6250 11111 25000 50000 100000 50000 20000 10000 5882 10000 20000 20000 25000 20000 12500 7692 5000 7692 12500 10000 11111 10000 7692 5556 4000 5556 7692 5882 6250 5882 5000 4000 3125 4000 5000 10000 11111 10000 7692 5556 4000 5556 7692 20000 25000 20000 12500 7692 5000 7692 12500 - 20000 50000 100000 50000 20000 10000 5882 10000 25000 100000 0 100000 25000 11111 6250 11111 20000 50000 100000 50000 20000 10000 5882 10000 12500 20000 25000 20000 12500 7692 5000 7692 7692 10000 11111 10000 7692 5556 4000 5556 5000 5882 6250 5882 5000 4000 3125 4000 7692 10000 11111 10000 7692 5556 4000 5556 12500 20000 25000 20000 12500 7692 5000 7692 - 10000 20000 50000 100000 50000 20000 10000 5882 11111 25000 100000 0 100000 25000 11111 6250 10000 20000 50000 100000 50000 20000 10000 5882 7692 12500 20000 25000 20000 12500 7692 5000 5556 7692 10000 11111 10000 7692 5556 4000 4000 5000 5882 6250 5882 5000 4000 3125 5556 7692 10000 11111 10000 7692 5556 4000 7692 12500 20000 25000 20000 12500 7692 5000 - 5882 10000 20000 50000 100000 50000 20000 10000 6250 11111 25000 100000 0 100000 25000 11111 5882 10000 20000 50000 100000 50000 20000 10000 5000 7692 12500 20000 25000 20000 12500 7692 4000 5556 7692 10000 11111 10000 7692 5556 3125 4000 5000 5882 6250 5882 5000 4000 4000 5556 7692 10000 11111 10000 7692 5556 5000 7692 12500 20000 25000 20000 12500 7692 - 10000 5882 10000 20000 50000 100000 50000 20000 11111 6250 11111 25000 100000 0 100000 25000 10000 5882 10000 20000 50000 100000 50000 20000 7692 5000 7692 12500 20000 25000 20000 12500 5556 4000 5556 7692 10000 11111 10000 7692 4000 3125 4000 5000 5882 6250 5882 5000 5556 4000 5556 7692 10000 11111 10000 7692 7692 5000 7692 12500 20000 25000 20000 12500 - 20000 10000 5882 10000 20000 50000 100000 50000 25000 11111 6250 11111 25000 100000 0 100000 20000 10000 5882 10000 20000 50000 100000 50000 12500 7692 5000 7692 12500 20000 25000 20000 7692 5556 4000 5556 7692 10000 11111 10000 5000 4000 3125 4000 5000 5882 6250 5882 7692 5556 4000 5556 7692 10000 11111 10000 12500 7692 5000 7692 12500 20000 25000 20000 - 50000 20000 10000 5882 10000 20000 50000 100000 100000 25000 11111 6250 11111 25000 100000 0 50000 20000 10000 5882 10000 20000 50000 100000 20000 12500 7692 5000 7692 12500 20000 25000 10000 7692 5556 4000 5556 7692 10000 11111 5882 5000 4000 3125 4000 5000 5882 6250 10000 7692 5556 4000 5556 7692 10000 11111 20000 12500 7692 5000 7692 12500 20000 25000 - 25000 20000 12500 7692 5000 7692 12500 20000 100000 50000 20000 10000 5882 10000 20000 50000 0 100000 25000 11111 6250 11111 25000 100000 100000 50000 20000 10000 5882 10000 20000 50000 25000 20000 12500 7692 5000 7692 12500 20000 11111 10000 7692 5556 4000 5556 7692 10000 6250 5882 5000 4000 3125 4000 5000 5882 11111 10000 7692 5556 4000 5556 7692 10000 - 20000 25000 20000 12500 7692 5000 7692 12500 50000 100000 50000 20000 10000 5882 10000 20000 100000 0 100000 25000 11111 6250 11111 25000 50000 100000 50000 20000 10000 5882 10000 20000 20000 25000 20000 12500 7692 5000 7692 12500 10000 11111 10000 7692 5556 4000 5556 7692 5882 6250 5882 5000 4000 3125 4000 5000 10000 11111 10000 7692 5556 4000 5556 7692 - 12500 20000 25000 20000 12500 7692 5000 7692 20000 50000 100000 50000 20000 10000 5882 10000 25000 100000 0 100000 25000 11111 6250 11111 20000 50000 100000 50000 20000 10000 5882 10000 12500 20000 25000 20000 12500 7692 5000 7692 7692 10000 11111 10000 7692 5556 4000 5556 5000 5882 6250 5882 5000 4000 3125 4000 7692 10000 11111 10000 7692 5556 4000 5556 - 7692 12500 20000 25000 20000 12500 7692 5000 10000 20000 50000 100000 50000 20000 10000 5882 11111 25000 100000 0 100000 25000 11111 6250 10000 20000 50000 100000 50000 20000 10000 5882 7692 12500 20000 25000 20000 12500 7692 5000 5556 7692 10000 11111 10000 7692 5556 4000 4000 5000 5882 6250 5882 5000 4000 3125 5556 7692 10000 11111 10000 7692 5556 4000 - 5000 7692 12500 20000 25000 20000 12500 7692 5882 10000 20000 50000 100000 50000 20000 10000 6250 11111 25000 100000 0 100000 25000 11111 5882 10000 20000 50000 100000 50000 20000 10000 5000 7692 12500 20000 25000 20000 12500 7692 4000 5556 7692 10000 11111 10000 7692 5556 3125 4000 5000 5882 6250 5882 5000 4000 4000 5556 7692 10000 11111 10000 7692 5556 - 7692 5000 7692 12500 20000 25000 20000 12500 10000 5882 10000 20000 50000 100000 50000 20000 11111 6250 11111 25000 100000 0 100000 25000 10000 5882 10000 20000 50000 100000 50000 20000 7692 5000 7692 12500 20000 25000 20000 12500 5556 4000 5556 7692 10000 11111 10000 7692 4000 3125 4000 5000 5882 6250 5882 5000 5556 4000 5556 7692 10000 11111 10000 7692 - 12500 7692 5000 7692 12500 20000 25000 20000 20000 10000 5882 10000 20000 50000 100000 50000 25000 11111 6250 11111 25000 100000 0 100000 20000 10000 5882 10000 20000 50000 100000 50000 12500 7692 5000 7692 12500 20000 25000 20000 7692 5556 4000 5556 7692 10000 11111 10000 5000 4000 3125 4000 5000 5882 6250 5882 7692 5556 4000 5556 7692 10000 11111 10000 - 20000 12500 7692 5000 7692 12500 20000 25000 50000 20000 10000 5882 10000 20000 50000 100000 100000 25000 11111 6250 11111 25000 100000 0 50000 20000 10000 5882 10000 20000 50000 100000 20000 12500 7692 5000 7692 12500 20000 25000 10000 7692 5556 4000 5556 7692 10000 11111 5882 5000 4000 3125 4000 5000 5882 6250 10000 7692 5556 4000 5556 7692 10000 11111 - 11111 10000 7692 5556 4000 5556 7692 10000 25000 20000 12500 7692 5000 7692 12500 20000 100000 50000 20000 10000 5882 10000 20000 50000 0 100000 25000 11111 6250 11111 25000 100000 100000 50000 20000 10000 5882 10000 20000 50000 25000 20000 12500 7692 5000 7692 12500 20000 11111 10000 7692 5556 4000 5556 7692 10000 6250 5882 5000 4000 3125 4000 5000 5882 - 10000 11111 10000 7692 5556 4000 5556 7692 20000 25000 20000 12500 7692 5000 7692 12500 50000 100000 50000 20000 10000 5882 10000 20000 100000 0 100000 25000 11111 6250 11111 25000 50000 100000 50000 20000 10000 5882 10000 20000 20000 25000 20000 12500 7692 5000 7692 12500 10000 11111 10000 7692 5556 4000 5556 7692 5882 6250 5882 5000 4000 3125 4000 5000 - 7692 10000 11111 10000 7692 5556 4000 5556 12500 20000 25000 20000 12500 7692 5000 7692 20000 50000 100000 50000 20000 10000 5882 10000 25000 100000 0 100000 25000 11111 6250 11111 20000 50000 100000 50000 20000 10000 5882 10000 12500 20000 25000 20000 12500 7692 5000 7692 7692 10000 11111 10000 7692 5556 4000 5556 5000 5882 6250 5882 5000 4000 3125 4000 - 5556 7692 10000 11111 10000 7692 5556 4000 7692 12500 20000 25000 20000 12500 7692 5000 10000 20000 50000 100000 50000 20000 10000 5882 11111 25000 100000 0 100000 25000 11111 6250 10000 20000 50000 100000 50000 20000 10000 5882 7692 12500 20000 25000 20000 12500 7692 5000 5556 7692 10000 11111 10000 7692 5556 4000 4000 5000 5882 6250 5882 5000 4000 3125 - 4000 5556 7692 10000 11111 10000 7692 5556 5000 7692 12500 20000 25000 20000 12500 7692 5882 10000 20000 50000 100000 50000 20000 10000 6250 11111 25000 100000 0 100000 25000 11111 5882 10000 20000 50000 100000 50000 20000 10000 5000 7692 12500 20000 25000 20000 12500 7692 4000 5556 7692 10000 11111 10000 7692 5556 3125 4000 5000 5882 6250 5882 5000 4000 - 5556 4000 5556 7692 10000 11111 10000 7692 7692 5000 7692 12500 20000 25000 20000 12500 10000 5882 10000 20000 50000 100000 50000 20000 11111 6250 11111 25000 100000 0 100000 25000 10000 5882 10000 20000 50000 100000 50000 20000 7692 5000 7692 12500 20000 25000 20000 12500 5556 4000 5556 7692 10000 11111 10000 7692 4000 3125 4000 5000 5882 6250 5882 5000 - 7692 5556 4000 5556 7692 10000 11111 10000 12500 7692 5000 7692 12500 20000 25000 20000 20000 10000 5882 10000 20000 50000 100000 50000 25000 11111 6250 11111 25000 100000 0 100000 20000 10000 5882 10000 20000 50000 100000 50000 12500 7692 5000 7692 12500 20000 25000 20000 7692 5556 4000 5556 7692 10000 11111 10000 5000 4000 3125 4000 5000 5882 6250 5882 - 10000 7692 5556 4000 5556 7692 10000 11111 20000 12500 7692 5000 7692 12500 20000 25000 50000 20000 10000 5882 10000 20000 50000 100000 100000 25000 11111 6250 11111 25000 100000 0 50000 20000 10000 5882 10000 20000 50000 100000 20000 12500 7692 5000 7692 12500 20000 25000 10000 7692 5556 4000 5556 7692 10000 11111 5882 5000 4000 3125 4000 5000 5882 6250 - 6250 5882 5000 4000 3125 4000 5000 5882 11111 10000 7692 5556 4000 5556 7692 10000 25000 20000 12500 7692 5000 7692 12500 20000 100000 50000 20000 10000 5882 10000 20000 50000 0 100000 25000 11111 6250 11111 25000 100000 100000 50000 20000 10000 5882 10000 20000 50000 25000 20000 12500 7692 5000 7692 12500 20000 11111 10000 7692 5556 4000 5556 7692 10000 - 5882 6250 5882 5000 4000 3125 4000 5000 10000 11111 10000 7692 5556 4000 5556 7692 20000 25000 20000 12500 7692 5000 7692 12500 50000 100000 50000 20000 10000 5882 10000 20000 100000 0 100000 25000 11111 6250 11111 25000 50000 100000 50000 20000 10000 5882 10000 20000 20000 25000 20000 12500 7692 5000 7692 12500 10000 11111 10000 7692 5556 4000 5556 7692 - 5000 5882 6250 5882 5000 4000 3125 4000 7692 10000 11111 10000 7692 5556 4000 5556 12500 20000 25000 20000 12500 7692 5000 7692 20000 50000 100000 50000 20000 10000 5882 10000 25000 100000 0 100000 25000 11111 6250 11111 20000 50000 100000 50000 20000 10000 5882 10000 12500 20000 25000 20000 12500 7692 5000 7692 7692 10000 11111 10000 7692 5556 4000 5556 - 4000 5000 5882 6250 5882 5000 4000 3125 5556 7692 10000 11111 10000 7692 5556 4000 7692 12500 20000 25000 20000 12500 7692 5000 10000 20000 50000 100000 50000 20000 10000 5882 11111 25000 100000 0 100000 25000 11111 6250 10000 20000 50000 100000 50000 20000 10000 5882 7692 12500 20000 25000 20000 12500 7692 5000 5556 7692 10000 11111 10000 7692 5556 4000 - 3125 4000 5000 5882 6250 5882 5000 4000 4000 5556 7692 10000 11111 10000 7692 5556 5000 7692 12500 20000 25000 20000 12500 7692 5882 10000 20000 50000 100000 50000 20000 10000 6250 11111 25000 100000 0 100000 25000 11111 5882 10000 20000 50000 100000 50000 20000 10000 5000 7692 12500 20000 25000 20000 12500 7692 4000 5556 7692 10000 11111 10000 7692 5556 - 4000 3125 4000 5000 5882 6250 5882 5000 5556 4000 5556 7692 10000 11111 10000 7692 7692 5000 7692 12500 20000 25000 20000 12500 10000 5882 10000 20000 50000 100000 50000 20000 11111 6250 11111 25000 100000 0 100000 25000 10000 5882 10000 20000 50000 100000 50000 20000 7692 5000 7692 12500 20000 25000 20000 12500 5556 4000 5556 7692 10000 11111 10000 7692 - 5000 4000 3125 4000 5000 5882 6250 5882 7692 5556 4000 5556 7692 10000 11111 10000 12500 7692 5000 7692 12500 20000 25000 20000 20000 10000 5882 10000 20000 50000 100000 50000 25000 11111 6250 11111 25000 100000 0 100000 20000 10000 5882 10000 20000 50000 100000 50000 12500 7692 5000 7692 12500 20000 25000 20000 7692 5556 4000 5556 7692 10000 11111 10000 - 5882 5000 4000 3125 4000 5000 5882 6250 10000 7692 5556 4000 5556 7692 10000 11111 20000 12500 7692 5000 7692 12500 20000 25000 50000 20000 10000 5882 10000 20000 50000 100000 100000 25000 11111 6250 11111 25000 100000 0 50000 20000 10000 5882 10000 20000 50000 100000 20000 12500 7692 5000 7692 12500 20000 25000 10000 7692 5556 4000 5556 7692 10000 11111 - 11111 10000 7692 5556 4000 5556 7692 10000 6250 5882 5000 4000 3125 4000 5000 5882 11111 10000 7692 5556 4000 5556 7692 10000 25000 20000 12500 7692 5000 7692 12500 20000 100000 50000 20000 10000 5882 10000 20000 50000 0 100000 25000 11111 6250 11111 25000 100000 100000 50000 20000 10000 5882 10000 20000 50000 25000 20000 12500 7692 5000 7692 12500 20000 - 10000 11111 10000 7692 5556 4000 5556 7692 5882 6250 5882 5000 4000 3125 4000 5000 10000 11111 10000 7692 5556 4000 5556 7692 20000 25000 20000 12500 7692 5000 7692 12500 50000 100000 50000 20000 10000 5882 10000 20000 100000 0 100000 25000 11111 6250 11111 25000 50000 100000 50000 20000 10000 5882 10000 20000 20000 25000 20000 12500 7692 5000 7692 12500 - 7692 10000 11111 10000 7692 5556 4000 5556 5000 5882 6250 5882 5000 4000 3125 4000 7692 10000 11111 10000 7692 5556 4000 5556 12500 20000 25000 20000 12500 7692 5000 7692 20000 50000 100000 50000 20000 10000 5882 10000 25000 100000 0 100000 25000 11111 6250 11111 20000 50000 100000 50000 20000 10000 5882 10000 12500 20000 25000 20000 12500 7692 5000 7692 - 5556 7692 10000 11111 10000 7692 5556 4000 4000 5000 5882 6250 5882 5000 4000 3125 5556 7692 10000 11111 10000 7692 5556 4000 7692 12500 20000 25000 20000 12500 7692 5000 10000 20000 50000 100000 50000 20000 10000 5882 11111 25000 100000 0 100000 25000 11111 6250 10000 20000 50000 100000 50000 20000 10000 5882 7692 12500 20000 25000 20000 12500 7692 5000 - 4000 5556 7692 10000 11111 10000 7692 5556 3125 4000 5000 5882 6250 5882 5000 4000 4000 5556 7692 10000 11111 10000 7692 5556 5000 7692 12500 20000 25000 20000 12500 7692 5882 10000 20000 50000 100000 50000 20000 10000 6250 11111 25000 100000 0 100000 25000 11111 5882 10000 20000 50000 100000 50000 20000 10000 5000 7692 12500 20000 25000 20000 12500 7692 - 5556 4000 5556 7692 10000 11111 10000 7692 4000 3125 4000 5000 5882 6250 5882 5000 5556 4000 5556 7692 10000 11111 10000 7692 7692 5000 7692 12500 20000 25000 20000 12500 10000 5882 10000 20000 50000 100000 50000 20000 11111 6250 11111 25000 100000 0 100000 25000 10000 5882 10000 20000 50000 100000 50000 20000 7692 5000 7692 12500 20000 25000 20000 12500 - 7692 5556 4000 5556 7692 10000 11111 10000 5000 4000 3125 4000 5000 5882 6250 5882 7692 5556 4000 5556 7692 10000 11111 10000 12500 7692 5000 7692 12500 20000 25000 20000 20000 10000 5882 10000 20000 50000 100000 50000 25000 11111 6250 11111 25000 100000 0 100000 20000 10000 5882 10000 20000 50000 100000 50000 12500 7692 5000 7692 12500 20000 25000 20000 - 10000 7692 5556 4000 5556 7692 10000 11111 5882 5000 4000 3125 4000 5000 5882 6250 10000 7692 5556 4000 5556 7692 10000 11111 20000 12500 7692 5000 7692 12500 20000 25000 50000 20000 10000 5882 10000 20000 50000 100000 100000 25000 11111 6250 11111 25000 100000 0 50000 20000 10000 5882 10000 20000 50000 100000 20000 12500 7692 5000 7692 12500 20000 25000 - 25000 20000 12500 7692 5000 7692 12500 20000 11111 10000 7692 5556 4000 5556 7692 10000 6250 5882 5000 4000 3125 4000 5000 5882 11111 10000 7692 5556 4000 5556 7692 10000 25000 20000 12500 7692 5000 7692 12500 20000 100000 50000 20000 10000 5882 10000 20000 50000 0 100000 25000 11111 6250 11111 25000 100000 100000 50000 20000 10000 5882 10000 20000 50000 - 20000 25000 20000 12500 7692 5000 7692 12500 10000 11111 10000 7692 5556 4000 5556 7692 5882 6250 5882 5000 4000 3125 4000 5000 10000 11111 10000 7692 5556 4000 5556 7692 20000 25000 20000 12500 7692 5000 7692 12500 50000 100000 50000 20000 10000 5882 10000 20000 100000 0 100000 25000 11111 6250 11111 25000 50000 100000 50000 20000 10000 5882 10000 20000 - 12500 20000 25000 20000 12500 7692 5000 7692 7692 10000 11111 10000 7692 5556 4000 5556 5000 5882 6250 5882 5000 4000 3125 4000 7692 10000 11111 10000 7692 5556 4000 5556 12500 20000 25000 20000 12500 7692 5000 7692 20000 50000 100000 50000 20000 10000 5882 10000 25000 100000 0 100000 25000 11111 6250 11111 20000 50000 100000 50000 20000 10000 5882 10000 - 7692 12500 20000 25000 20000 12500 7692 5000 5556 7692 10000 11111 10000 7692 5556 4000 4000 5000 5882 6250 5882 5000 4000 3125 5556 7692 10000 11111 10000 7692 5556 4000 7692 12500 20000 25000 20000 12500 7692 5000 10000 20000 50000 100000 50000 20000 10000 5882 11111 25000 100000 0 100000 25000 11111 6250 10000 20000 50000 100000 50000 20000 10000 5882 - 5000 7692 12500 20000 25000 20000 12500 7692 4000 5556 7692 10000 11111 10000 7692 5556 3125 4000 5000 5882 6250 5882 5000 4000 4000 5556 7692 10000 11111 10000 7692 5556 5000 7692 12500 20000 25000 20000 12500 7692 5882 10000 20000 50000 100000 50000 20000 10000 6250 11111 25000 100000 0 100000 25000 11111 5882 10000 20000 50000 100000 50000 20000 10000 - 7692 5000 7692 12500 20000 25000 20000 12500 5556 4000 5556 7692 10000 11111 10000 7692 4000 3125 4000 5000 5882 6250 5882 5000 5556 4000 5556 7692 10000 11111 10000 7692 7692 5000 7692 12500 20000 25000 20000 12500 10000 5882 10000 20000 50000 100000 50000 20000 11111 6250 11111 25000 100000 0 100000 25000 10000 5882 10000 20000 50000 100000 50000 20000 - 12500 7692 5000 7692 12500 20000 25000 20000 7692 5556 4000 5556 7692 10000 11111 10000 5000 4000 3125 4000 5000 5882 6250 5882 7692 5556 4000 5556 7692 10000 11111 10000 12500 7692 5000 7692 12500 20000 25000 20000 20000 10000 5882 10000 20000 50000 100000 50000 25000 11111 6250 11111 25000 100000 0 100000 20000 10000 5882 10000 20000 50000 100000 50000 - 20000 12500 7692 5000 7692 12500 20000 25000 10000 7692 5556 4000 5556 7692 10000 11111 5882 5000 4000 3125 4000 5000 5882 6250 10000 7692 5556 4000 5556 7692 10000 11111 20000 12500 7692 5000 7692 12500 20000 25000 50000 20000 10000 5882 10000 20000 50000 100000 100000 25000 11111 6250 11111 25000 100000 0 50000 20000 10000 5882 10000 20000 50000 100000 - 100000 50000 20000 10000 5882 10000 20000 50000 25000 20000 12500 7692 5000 7692 12500 20000 11111 10000 7692 5556 4000 5556 7692 10000 6250 5882 5000 4000 3125 4000 5000 5882 11111 10000 7692 5556 4000 5556 7692 10000 25000 20000 12500 7692 5000 7692 12500 20000 100000 50000 20000 10000 5882 10000 20000 50000 0 100000 25000 11111 6250 11111 25000 100000 - 50000 100000 50000 20000 10000 5882 10000 20000 20000 25000 20000 12500 7692 5000 7692 12500 10000 11111 10000 7692 5556 4000 5556 7692 5882 6250 5882 5000 4000 3125 4000 5000 10000 11111 10000 7692 5556 4000 5556 7692 20000 25000 20000 12500 7692 5000 7692 12500 50000 100000 50000 20000 10000 5882 10000 20000 100000 0 100000 25000 11111 6250 11111 25000 - 20000 50000 100000 50000 20000 10000 5882 10000 12500 20000 25000 20000 12500 7692 5000 7692 7692 10000 11111 10000 7692 5556 4000 5556 5000 5882 6250 5882 5000 4000 3125 4000 7692 10000 11111 10000 7692 5556 4000 5556 12500 20000 25000 20000 12500 7692 5000 7692 20000 50000 100000 50000 20000 10000 5882 10000 25000 100000 0 100000 25000 11111 6250 11111 - 10000 20000 50000 100000 50000 20000 10000 5882 7692 12500 20000 25000 20000 12500 7692 5000 5556 7692 10000 11111 10000 7692 5556 4000 4000 5000 5882 6250 5882 5000 4000 3125 5556 7692 10000 11111 10000 7692 5556 4000 7692 12500 20000 25000 20000 12500 7692 5000 10000 20000 50000 100000 50000 20000 10000 5882 11111 25000 100000 0 100000 25000 11111 6250 - 5882 10000 20000 50000 100000 50000 20000 10000 5000 7692 12500 20000 25000 20000 12500 7692 4000 5556 7692 10000 11111 10000 7692 5556 3125 4000 5000 5882 6250 5882 5000 4000 4000 5556 7692 10000 11111 10000 7692 5556 5000 7692 12500 20000 25000 20000 12500 7692 5882 10000 20000 50000 100000 50000 20000 10000 6250 11111 25000 100000 0 100000 25000 11111 - 10000 5882 10000 20000 50000 100000 50000 20000 7692 5000 7692 12500 20000 25000 20000 12500 5556 4000 5556 7692 10000 11111 10000 7692 4000 3125 4000 5000 5882 6250 5882 5000 5556 4000 5556 7692 10000 11111 10000 7692 7692 5000 7692 12500 20000 25000 20000 12500 10000 5882 10000 20000 50000 100000 50000 20000 11111 6250 11111 25000 100000 0 100000 25000 - 20000 10000 5882 10000 20000 50000 100000 50000 12500 7692 5000 7692 12500 20000 25000 20000 7692 5556 4000 5556 7692 10000 11111 10000 5000 4000 3125 4000 5000 5882 6250 5882 7692 5556 4000 5556 7692 10000 11111 10000 12500 7692 5000 7692 12500 20000 25000 20000 20000 10000 5882 10000 20000 50000 100000 50000 25000 11111 6250 11111 25000 100000 0 100000 - 50000 20000 10000 5882 10000 20000 50000 100000 20000 12500 7692 5000 7692 12500 20000 25000 10000 7692 5556 4000 5556 7692 10000 11111 5882 5000 4000 3125 4000 5000 5882 6250 10000 7692 5556 4000 5556 7692 10000 11111 20000 12500 7692 5000 7692 12500 20000 25000 50000 20000 10000 5882 10000 20000 50000 100000 100000 25000 11111 6250 11111 25000 100000 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai80a.dat b/trunk/paradiseo-peo/tutorial/benchs/tai80a.dat deleted file mode 100755 index 2da27f212..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai80a.dat +++ /dev/null @@ -1,163 +0,0 @@ - 80 13557864 - - 0 64 51 3 95 13 54 71 64 7 62 20 49 22 20 24 83 86 92 58 8 9 66 95 83 42 26 88 93 65 85 87 87 75 33 40 80 93 53 74 37 1 27 55 32 49 15 6 88 38 10 71 99 23 89 0 6 16 75 81 46 15 84 17 71 49 15 14 58 8 30 8 14 90 64 2 48 66 87 45 - 64 0 28 89 7 20 5 43 0 63 46 19 72 45 33 36 14 2 82 55 77 1 24 61 71 91 87 31 70 19 11 88 56 47 86 88 35 60 21 18 96 57 75 31 19 19 3 53 10 4 51 77 21 70 2 26 37 17 41 28 44 20 26 11 82 43 76 85 64 54 18 72 84 26 28 3 65 21 69 21 - 51 28 0 50 56 28 70 51 47 18 54 88 94 37 18 83 64 21 2 35 58 83 22 89 3 10 81 0 61 25 91 9 60 56 13 40 5 49 69 79 19 45 87 94 77 16 71 19 22 85 24 71 5 75 17 95 6 41 49 72 91 36 87 67 39 20 0 95 50 48 79 69 7 48 86 94 9 96 7 4 - 3 89 50 0 84 70 44 51 58 94 92 70 26 98 23 23 23 26 15 54 50 77 81 1 39 57 94 21 20 93 71 36 27 55 88 36 21 77 68 4 51 98 16 73 94 65 45 14 95 17 74 57 7 30 48 12 36 92 78 70 25 22 29 18 35 26 79 30 60 71 75 68 94 34 67 47 85 77 72 62 - 95 7 56 84 0 93 37 74 40 14 56 86 51 54 83 50 36 21 55 95 6 71 12 88 16 3 22 85 88 64 18 52 1 54 20 1 40 95 43 16 12 1 34 69 66 15 67 50 58 25 61 59 36 61 7 25 96 2 66 12 68 45 42 70 19 64 2 56 77 83 10 96 73 78 3 39 56 45 30 44 - 13 20 28 70 93 0 65 4 5 96 8 96 10 51 16 57 67 35 78 47 56 56 63 61 5 86 97 55 51 36 94 3 14 83 33 96 76 64 93 19 29 56 20 0 56 18 14 4 72 33 22 82 52 3 23 78 51 26 80 57 85 84 76 4 59 74 6 57 71 23 81 45 70 64 79 86 23 91 33 79 - 54 5 70 44 37 65 0 66 97 83 94 92 89 3 47 12 49 27 19 47 91 46 47 96 82 97 69 99 84 30 12 13 63 87 40 72 89 52 8 18 81 24 83 40 65 2 47 32 29 24 98 90 34 66 66 69 96 78 25 45 55 52 5 69 31 96 4 73 59 59 53 46 43 63 26 8 80 65 62 82 - 71 43 51 51 74 4 66 0 95 56 59 94 82 2 88 43 95 24 71 10 60 17 77 52 74 58 63 47 17 97 10 13 98 11 8 56 0 47 41 29 4 49 94 16 97 59 24 40 78 31 2 56 83 54 97 33 7 28 26 60 11 28 46 54 48 86 91 37 63 14 13 27 57 31 49 49 74 81 27 74 - 64 0 47 58 40 5 97 95 0 51 23 48 85 66 57 23 23 81 6 17 71 36 51 60 0 48 64 18 18 30 52 92 28 35 49 42 23 39 44 91 72 27 36 27 98 9 97 44 20 22 17 50 55 30 47 94 35 93 37 65 78 76 98 91 43 44 99 8 36 68 21 77 32 7 58 79 82 63 78 12 - 7 63 18 94 14 96 83 56 51 0 25 43 51 99 41 47 17 91 42 25 84 29 9 49 93 10 28 93 14 80 42 26 91 43 84 89 92 96 30 45 21 57 8 28 30 31 80 10 60 26 54 96 97 56 53 86 85 0 84 72 94 61 26 88 11 66 44 34 90 12 76 74 92 15 54 93 42 64 7 74 - 62 46 54 92 56 8 94 59 23 25 0 76 43 68 44 0 18 86 85 91 20 21 44 78 4 61 98 63 48 99 54 41 55 72 56 41 3 31 57 75 72 35 83 83 53 85 88 49 45 21 43 63 17 98 49 50 7 47 44 15 57 59 98 9 83 24 23 47 30 16 28 71 11 70 93 37 9 27 93 62 - 20 19 88 70 86 96 92 94 48 43 76 0 54 45 29 41 73 82 32 18 38 20 52 89 26 42 55 14 58 68 71 73 64 79 97 1 60 71 52 95 41 75 44 57 88 53 84 61 91 13 95 89 3 94 1 97 68 20 33 51 98 7 85 86 72 3 39 98 11 58 44 45 1 41 27 83 28 20 80 70 - 49 72 94 26 51 10 89 82 85 51 43 54 0 3 59 34 55 53 96 36 36 63 99 69 70 53 20 9 30 80 18 4 17 17 71 90 93 14 48 52 6 78 56 40 74 98 93 32 75 68 32 60 82 24 99 3 97 23 49 54 91 46 57 17 46 82 6 14 91 73 41 82 20 79 95 46 22 39 95 87 - 22 45 37 98 54 51 3 2 66 99 68 45 3 0 37 23 23 65 62 18 67 65 5 65 58 1 67 82 90 29 62 4 92 53 85 81 73 34 74 12 77 34 19 15 48 11 10 80 8 23 75 31 34 66 48 15 25 46 66 76 31 36 7 37 20 2 76 67 4 46 71 66 56 95 49 47 26 81 55 76 - 20 33 18 23 83 16 47 88 57 41 44 29 59 37 0 66 35 53 26 51 28 35 68 20 71 60 70 68 27 85 27 40 86 54 16 61 96 58 52 92 63 55 59 35 21 58 78 24 29 38 78 78 57 44 37 76 70 72 85 7 9 84 41 67 19 24 74 22 32 60 20 75 83 25 92 28 39 14 73 65 - 24 36 83 23 50 57 12 43 23 47 0 41 34 23 66 0 86 9 26 7 7 97 83 56 61 8 94 34 89 61 47 66 76 14 17 53 23 55 96 9 11 96 52 91 77 5 91 13 41 29 85 16 22 60 76 39 85 9 64 14 55 40 27 93 88 26 77 81 19 75 55 66 64 7 17 55 79 20 93 31 - 83 14 64 23 36 67 49 95 23 17 18 73 55 23 35 86 0 7 44 37 78 25 98 17 25 21 27 67 23 61 89 60 64 38 90 87 0 99 34 8 21 73 14 13 84 75 37 32 28 31 89 11 47 18 97 6 11 43 89 13 33 55 56 21 5 24 54 47 57 78 4 50 83 70 20 71 57 35 49 31 - 86 2 21 26 21 35 27 24 81 91 86 82 53 65 53 9 7 0 86 28 30 92 49 83 89 44 37 62 45 22 85 38 98 56 67 84 77 67 53 46 24 51 96 1 87 32 26 48 78 82 65 80 12 63 77 16 77 82 3 72 93 67 24 66 80 42 92 20 32 13 29 58 83 85 85 70 34 1 76 45 - 92 82 2 15 55 78 19 71 6 42 85 32 96 62 26 26 44 86 0 72 69 46 2 56 70 77 33 48 59 81 59 70 76 9 65 18 76 86 20 75 96 2 49 57 66 84 98 55 70 31 30 63 10 8 31 58 98 95 24 3 44 60 87 30 0 96 21 95 72 77 29 88 13 22 93 48 9 6 14 91 - 58 55 35 54 95 47 47 10 17 25 91 18 36 18 51 7 37 28 72 0 4 42 29 79 39 33 76 81 10 10 53 18 99 61 88 93 33 71 42 64 39 79 8 25 71 29 35 47 57 95 93 79 88 77 94 38 73 46 16 29 62 77 43 98 47 13 44 24 98 29 90 92 34 12 75 54 80 67 2 92 - 8 77 58 50 6 56 91 60 71 84 20 38 36 67 28 7 78 30 69 4 0 54 67 24 76 37 98 96 20 14 35 65 97 27 24 60 23 97 60 75 92 73 20 28 2 96 51 25 44 55 30 64 37 44 46 66 30 48 26 81 50 90 63 85 35 69 66 81 17 81 72 71 90 59 82 21 88 34 48 78 - 9 1 83 77 71 56 46 17 36 29 21 20 63 65 35 97 25 92 46 42 54 0 69 76 1 13 2 21 25 44 0 3 15 54 42 87 35 76 98 78 81 48 25 81 27 83 59 98 13 32 95 30 12 67 18 57 65 12 63 26 95 53 94 26 93 48 63 64 33 9 56 50 97 52 46 15 50 96 85 60 - 66 24 22 81 12 63 47 77 51 9 44 52 99 5 68 83 98 49 2 29 67 69 0 76 29 90 42 87 36 42 88 91 13 63 65 74 71 7 38 95 81 17 38 69 17 23 65 75 51 59 3 73 55 18 39 50 94 52 54 22 83 54 1 80 83 66 24 16 79 90 50 28 28 90 83 83 18 95 86 11 - 95 61 89 1 88 61 96 52 60 49 78 89 69 65 20 56 17 83 56 79 24 76 76 0 33 22 43 29 82 83 42 56 89 37 96 9 2 53 97 10 65 47 75 22 16 13 10 68 91 53 2 80 78 31 53 43 85 18 47 49 65 21 37 51 82 58 88 77 18 32 52 8 96 22 64 21 36 2 52 44 - 83 71 3 39 16 5 82 74 0 93 4 26 70 58 71 61 25 89 70 39 76 1 29 33 0 10 20 85 5 39 67 29 35 58 31 10 11 5 59 64 65 22 80 74 63 92 62 10 83 87 66 98 42 22 45 51 5 2 64 55 97 83 41 81 92 68 45 56 88 49 12 23 12 49 17 49 94 71 64 31 - 42 91 10 57 3 86 97 58 48 10 61 42 53 1 60 8 21 44 77 33 37 13 90 22 10 0 20 1 63 58 35 64 52 7 94 51 35 82 29 16 20 80 38 54 34 85 43 47 66 18 66 60 60 98 82 78 70 27 74 26 32 12 8 11 50 15 48 83 48 13 78 96 77 67 88 76 76 73 92 72 - 26 87 81 94 22 97 69 63 64 28 98 55 20 67 70 94 27 37 33 76 98 2 42 43 20 20 0 86 66 98 39 31 74 45 98 90 3 23 60 86 15 41 13 92 67 77 46 40 78 2 72 95 53 58 34 66 41 63 26 92 7 64 34 5 42 39 1 6 85 32 13 74 58 95 48 36 59 3 41 93 - 88 31 0 21 85 55 99 47 18 93 63 14 9 82 68 34 67 62 48 81 96 21 87 29 85 1 86 0 32 29 15 95 57 11 95 20 74 37 4 31 61 38 97 56 8 53 12 47 5 70 18 97 40 0 56 60 61 13 90 76 11 89 37 34 91 69 54 48 56 84 21 51 42 50 61 61 9 87 99 39 - 93 70 61 20 88 51 84 17 18 14 48 58 30 90 27 89 23 45 59 10 20 25 36 82 5 63 66 32 0 91 63 62 52 32 15 57 39 80 75 8 56 84 87 42 53 28 74 23 83 64 74 39 86 56 52 95 88 41 59 87 85 58 39 48 40 34 54 62 89 93 11 19 85 26 0 18 60 86 39 90 - 65 19 25 93 64 36 30 97 30 80 99 68 80 29 85 61 61 22 81 10 14 44 42 83 39 58 98 29 91 0 28 50 53 43 7 74 86 79 24 79 62 79 91 98 30 39 93 3 21 11 89 8 82 28 31 1 0 13 55 46 31 25 59 79 44 0 11 75 78 98 42 53 66 23 35 7 50 86 92 99 - 85 11 91 71 18 94 12 10 52 42 54 71 18 62 27 47 89 85 59 53 35 0 88 42 67 35 39 15 63 28 0 7 56 97 28 93 5 7 86 79 62 80 27 94 4 63 25 41 28 83 40 44 18 0 2 24 49 0 25 14 85 46 15 23 98 22 32 94 28 79 70 19 54 96 79 67 92 19 40 27 - 87 88 9 36 52 3 13 13 92 26 41 73 4 4 40 66 60 38 70 18 65 3 91 56 29 64 31 95 62 50 7 0 3 42 4 61 27 7 27 37 46 85 22 19 56 40 1 13 97 37 57 23 39 62 0 27 17 94 66 86 23 58 13 64 66 8 75 28 61 59 91 85 33 86 13 73 42 0 6 12 - 87 56 60 27 1 14 63 98 28 91 55 64 17 92 86 76 64 98 76 99 97 15 13 89 35 52 74 57 52 53 56 3 0 94 80 52 20 22 55 68 22 49 90 38 33 66 81 27 47 46 67 48 92 78 84 93 38 42 0 65 87 77 55 8 42 84 73 66 38 83 57 97 52 77 12 11 1 65 93 39 - 75 47 56 55 54 83 87 11 35 43 72 79 17 53 54 14 38 56 9 61 27 54 63 37 58 7 45 11 32 43 97 42 94 0 0 35 42 9 18 54 47 85 70 82 38 91 82 84 16 5 54 87 85 3 71 85 87 60 98 3 99 52 20 33 53 63 17 45 28 43 41 80 4 30 18 8 92 98 43 50 - 33 86 13 88 20 33 40 8 49 84 56 97 71 85 16 17 90 67 65 88 24 42 65 96 31 94 98 95 15 7 28 4 80 0 0 7 30 14 47 30 80 83 19 83 69 48 93 38 12 88 74 63 96 95 21 41 25 33 68 8 81 27 60 69 37 57 35 79 96 74 46 94 5 19 19 51 85 92 43 75 - 40 88 40 36 1 96 72 56 42 89 41 1 90 81 61 53 87 84 18 93 60 87 74 9 10 51 90 20 57 74 93 61 52 35 7 0 70 69 35 30 76 63 89 45 24 88 73 2 56 72 80 82 35 98 90 46 10 46 65 83 75 46 60 27 59 21 71 49 35 87 7 24 75 73 80 5 5 33 79 9 - 80 35 5 21 40 76 89 0 23 92 3 60 93 73 96 23 0 77 76 33 23 35 71 2 11 35 3 74 39 86 5 27 20 42 30 70 0 92 65 25 72 41 18 6 40 33 64 4 24 89 95 57 83 27 34 74 4 5 8 2 1 35 40 48 49 14 17 64 54 0 79 9 36 77 80 78 83 93 20 85 - 93 60 49 77 95 64 52 47 39 96 31 71 14 34 58 55 99 67 86 71 97 76 7 53 5 82 23 37 80 79 7 7 22 9 14 69 92 0 64 46 34 2 52 59 6 65 57 23 54 25 39 89 94 51 74 53 85 21 83 18 43 60 88 14 26 10 15 55 59 80 53 92 22 55 78 12 89 1 16 97 - 53 21 69 68 43 93 8 41 44 30 57 52 48 74 52 96 34 53 20 42 60 98 38 97 59 29 60 4 75 24 86 27 55 18 47 35 65 64 0 41 11 47 46 16 43 15 91 94 73 88 11 57 25 23 55 0 67 2 0 71 75 19 59 87 26 47 72 88 48 58 73 86 48 94 14 95 40 94 15 71 - 74 18 79 4 16 19 18 29 91 45 75 95 52 12 92 9 8 46 75 64 75 78 95 10 64 16 86 31 8 79 79 37 68 54 30 30 25 46 41 0 30 60 46 31 33 69 31 0 0 80 18 57 98 37 30 51 66 38 62 72 69 77 40 9 46 94 25 65 17 41 59 79 6 75 62 96 6 9 47 38 - 37 96 19 51 12 29 81 4 72 21 72 41 6 77 63 11 21 24 96 39 92 81 81 65 65 20 15 61 56 62 62 46 22 47 80 76 72 34 11 30 0 19 78 37 26 63 62 10 37 67 37 74 8 65 15 37 84 49 61 39 97 88 29 33 32 20 7 94 9 73 85 81 61 99 67 61 10 3 69 30 - 1 57 45 98 1 56 24 49 27 57 35 75 78 34 55 96 73 51 2 79 73 48 17 47 22 80 41 38 84 79 80 85 49 85 83 63 41 2 47 60 19 0 48 8 41 21 33 83 54 2 7 75 29 56 65 89 60 90 84 74 16 1 18 70 26 55 90 10 17 41 64 73 95 21 52 32 4 94 12 41 - 27 75 87 16 34 20 83 94 36 8 83 44 56 19 59 52 14 96 49 8 20 25 38 75 80 38 13 97 87 91 27 22 90 70 19 89 18 52 46 46 78 48 0 85 75 37 12 10 73 42 26 32 56 42 70 2 10 49 7 2 46 57 22 79 99 22 61 25 51 72 89 74 59 27 94 95 17 73 39 60 - 55 31 94 73 69 0 40 16 27 28 83 57 40 15 35 91 13 1 57 25 28 81 69 22 74 54 92 56 42 98 94 19 38 82 83 45 6 59 16 31 37 8 85 0 68 75 36 13 64 6 20 7 4 7 58 59 85 35 84 97 93 59 99 28 94 40 50 86 97 11 91 12 6 95 19 69 44 43 28 31 - 32 19 77 94 66 56 65 97 98 30 53 88 74 48 21 77 84 87 66 71 2 27 17 16 63 34 67 8 53 30 4 56 33 38 69 24 40 6 43 33 26 41 75 68 0 94 84 60 48 48 65 84 52 8 57 1 22 5 77 97 13 71 28 95 30 32 52 70 11 66 14 76 11 44 36 91 48 15 41 78 - 49 19 16 65 15 18 2 59 9 31 85 53 98 11 58 5 75 32 84 29 96 83 23 13 92 85 77 53 28 39 63 40 66 91 48 88 33 65 15 69 63 21 37 75 94 0 33 17 3 86 76 40 74 92 93 49 3 12 24 62 20 45 16 16 29 32 67 23 54 57 14 89 49 52 62 54 48 98 88 49 - 15 3 71 45 67 14 47 24 97 80 88 84 93 10 78 91 37 26 98 35 51 59 65 10 62 43 46 12 74 93 25 1 81 82 93 73 64 57 91 31 62 33 12 36 84 33 0 92 64 96 92 4 70 30 26 10 77 56 3 73 96 73 66 52 38 77 98 23 62 28 28 1 29 86 27 9 55 51 3 88 - 6 53 19 14 50 4 32 40 44 10 49 61 32 80 24 13 32 48 55 47 25 98 75 68 10 47 40 47 23 3 41 13 27 84 38 2 4 23 94 0 10 83 10 13 60 17 92 0 76 76 47 15 2 37 90 73 17 57 37 32 14 60 66 71 99 79 29 42 62 85 10 43 6 14 53 0 84 31 52 50 - 88 10 22 95 58 72 29 78 20 60 45 91 75 8 29 41 28 78 70 57 44 13 51 91 83 66 78 5 83 21 28 97 47 16 12 56 24 54 73 0 37 54 73 64 48 3 64 76 0 6 54 9 43 58 49 92 25 25 70 35 13 30 38 35 52 66 40 30 68 56 59 51 17 57 36 91 21 21 81 91 - 38 4 85 17 25 33 24 31 22 26 21 13 68 23 38 29 31 82 31 95 55 32 59 53 87 18 2 70 64 11 83 37 46 5 88 72 89 25 88 80 67 2 42 6 48 86 96 76 6 0 28 69 17 3 50 18 31 21 34 92 14 37 51 58 38 61 92 62 56 14 48 91 65 59 90 38 2 51 54 60 - 10 51 24 74 61 22 98 2 17 54 43 95 32 75 78 85 89 65 30 93 30 95 3 2 66 66 72 18 74 89 40 57 67 54 74 80 95 39 11 18 37 7 26 20 65 76 92 47 54 28 0 79 63 68 51 51 5 43 99 92 27 38 81 94 12 91 96 54 61 54 85 21 47 92 4 21 26 23 58 92 - 71 77 71 57 59 82 90 56 50 96 63 89 60 31 78 16 11 80 63 79 64 30 73 80 98 60 95 97 39 8 44 23 48 87 63 82 57 89 57 57 74 75 32 7 84 40 4 15 9 69 79 0 69 26 33 78 26 75 18 60 82 14 18 4 16 71 39 5 79 23 16 99 25 0 99 96 86 9 92 93 - 99 21 5 7 36 52 34 83 55 97 17 3 82 34 57 22 47 12 10 88 37 12 55 78 42 60 53 40 86 82 18 39 92 85 96 35 83 94 25 98 8 29 56 4 52 74 70 2 43 17 63 69 0 54 57 51 31 74 75 27 86 3 24 7 41 58 93 79 65 64 10 5 99 63 73 60 96 74 66 76 - 23 70 75 30 61 3 66 54 30 56 98 94 24 66 44 60 18 63 8 77 44 67 18 31 22 98 58 0 56 28 0 62 78 3 95 98 27 51 23 37 65 56 42 7 8 92 30 37 58 3 68 26 54 0 18 36 50 58 74 45 40 74 39 43 65 60 3 0 40 17 7 48 27 77 97 77 14 44 15 89 - 89 2 17 48 7 23 66 97 47 53 49 1 99 48 37 76 97 77 31 94 46 18 39 53 45 82 34 56 52 31 2 0 84 71 21 90 34 74 55 30 15 65 70 58 57 93 26 90 49 50 51 33 57 18 0 7 18 71 21 9 26 69 78 90 22 5 22 27 98 56 96 85 60 34 42 73 30 10 59 57 - 0 26 95 12 25 78 69 33 94 86 50 97 3 15 76 39 6 16 58 38 66 57 50 43 51 78 66 60 95 1 24 27 93 85 41 46 74 53 0 51 37 89 2 59 1 49 10 73 92 18 51 78 51 36 7 0 88 38 42 29 77 84 57 58 44 71 86 83 2 13 91 26 16 12 20 82 91 10 88 99 - 6 37 6 36 96 51 96 7 35 85 7 68 97 25 70 85 11 77 98 73 30 65 94 85 5 70 41 61 88 0 49 17 38 87 25 10 4 85 67 66 84 60 10 85 22 3 77 17 25 31 5 26 31 50 18 88 0 7 5 71 53 1 1 91 8 32 97 26 16 97 96 0 29 4 78 58 19 42 96 96 - 16 17 41 92 2 26 78 28 93 0 47 20 23 46 72 9 43 82 95 46 48 12 52 18 2 27 63 13 41 13 0 94 42 60 33 46 5 21 2 38 49 90 49 35 5 12 56 57 25 21 43 75 74 58 71 38 7 0 75 89 66 8 58 84 93 83 58 92 82 11 89 81 20 3 93 12 75 35 58 69 - 75 41 49 78 66 80 25 26 37 84 44 33 49 66 85 64 89 3 24 16 26 63 54 47 64 74 26 90 59 55 25 66 0 98 68 65 8 83 0 62 61 84 7 84 77 24 3 37 70 34 99 18 75 74 21 42 5 75 0 8 79 28 45 26 71 89 20 78 3 16 97 49 16 53 52 73 43 7 75 18 - 81 28 72 70 12 57 45 60 65 72 15 51 54 76 7 14 13 72 3 29 81 26 22 49 55 26 92 76 87 46 14 86 65 3 8 83 2 18 71 72 39 74 2 97 97 62 73 32 35 92 92 60 27 45 9 29 71 89 8 0 90 94 77 80 19 47 89 30 4 19 45 71 9 97 44 85 40 68 61 76 - 46 44 91 25 68 85 55 11 78 94 57 98 91 31 9 55 33 93 44 62 50 95 83 65 97 32 7 11 85 31 85 23 87 99 81 75 1 43 75 69 97 16 46 93 13 20 96 14 13 14 27 82 86 40 26 77 53 66 79 90 0 60 65 91 63 67 25 56 21 66 70 29 56 66 29 63 77 27 73 63 - 15 20 36 22 45 84 52 28 76 61 59 7 46 36 84 40 55 67 60 77 90 53 54 21 83 12 64 89 58 25 46 58 77 52 27 46 35 60 19 77 88 1 57 59 71 45 73 60 30 37 38 14 3 74 69 84 1 8 28 94 60 0 19 67 71 49 11 53 68 34 26 80 12 16 9 74 63 16 10 15 - 84 26 87 29 42 76 5 46 98 26 98 85 57 7 41 27 56 24 87 43 63 94 1 37 41 8 34 37 39 59 15 13 55 20 60 60 40 88 59 40 29 18 22 99 28 16 66 66 38 51 81 18 24 39 78 57 1 58 45 77 65 19 0 29 91 89 93 61 15 49 72 57 68 14 92 31 15 56 41 31 - 17 11 67 18 70 4 69 54 91 88 9 86 17 37 67 93 21 66 30 98 85 26 80 51 81 11 5 34 48 79 23 64 8 33 69 27 48 14 87 9 33 70 79 28 95 16 52 71 35 58 94 4 7 43 90 58 91 84 26 80 91 67 29 0 84 1 39 39 79 85 34 29 9 42 77 69 47 83 7 26 - 71 82 39 35 19 59 31 48 43 11 83 72 46 20 19 88 5 80 0 47 35 93 83 82 92 50 42 91 40 44 98 66 42 53 37 59 49 26 26 46 32 26 99 94 30 29 38 99 52 38 12 16 41 65 22 44 8 93 71 19 63 71 91 84 0 11 73 28 12 71 19 64 56 43 79 25 42 43 27 70 - 49 43 20 26 64 74 96 86 44 66 24 3 82 2 24 26 24 42 96 13 69 48 66 58 68 15 39 69 34 0 22 8 84 63 57 21 14 10 47 94 20 55 22 40 32 32 77 79 66 61 91 71 58 60 5 71 32 83 89 47 67 49 89 1 11 0 63 57 53 84 44 5 77 39 94 72 93 80 34 31 - 15 76 0 79 2 6 4 91 99 44 23 39 6 76 74 77 54 92 21 44 66 63 24 88 45 48 1 54 54 11 32 75 73 17 35 71 17 15 72 25 7 90 61 50 52 67 98 29 40 92 96 39 93 3 22 86 97 58 20 89 25 11 93 39 73 63 0 59 30 85 52 6 99 19 95 20 62 72 97 49 - 14 85 95 30 56 57 73 37 8 34 47 98 14 67 22 81 47 20 95 24 81 64 16 77 56 83 6 48 62 75 94 28 66 45 79 49 64 55 88 65 94 10 25 86 70 23 23 42 30 62 54 5 79 0 27 83 26 92 78 30 56 53 61 39 28 57 59 0 77 83 73 94 35 89 8 29 81 78 16 52 - 58 64 50 60 77 71 59 63 36 90 30 11 91 4 32 19 57 32 72 98 17 33 79 18 88 48 85 56 89 78 28 61 38 28 96 35 54 59 48 17 9 17 51 97 11 54 62 62 68 56 61 79 65 40 98 2 16 82 3 4 21 68 15 79 12 53 30 77 0 84 0 90 5 17 9 3 40 20 32 82 - 8 54 48 71 83 23 59 14 68 12 16 58 73 46 60 75 78 13 77 29 81 9 90 32 49 13 32 84 93 98 79 59 83 43 74 87 0 80 58 41 73 41 72 11 66 57 28 85 56 14 54 23 64 17 56 13 97 11 16 19 66 34 49 85 71 84 85 83 84 0 28 30 6 34 83 69 52 0 81 25 - 30 18 79 75 10 81 53 13 21 76 28 44 41 71 20 55 4 29 29 90 72 56 50 52 12 78 13 21 11 42 70 91 57 41 46 7 79 53 73 59 85 64 89 91 14 14 28 10 59 48 85 16 10 7 96 91 96 89 97 45 70 26 72 34 19 44 52 73 0 28 0 45 61 70 63 28 2 38 2 30 - 8 72 69 68 96 45 46 27 77 74 71 45 82 66 75 66 50 58 88 92 71 50 28 8 23 96 74 51 19 53 19 85 97 80 94 24 9 92 86 79 81 73 74 12 76 89 1 43 51 91 21 99 5 48 85 26 0 81 49 71 29 80 57 29 64 5 6 94 90 30 45 0 96 47 12 99 42 55 49 40 - 14 84 7 94 73 70 43 57 32 92 11 1 20 56 83 64 83 83 13 34 90 97 28 96 12 77 58 42 85 66 54 33 52 4 5 75 36 22 48 6 61 95 59 6 11 49 29 6 17 65 47 25 99 27 60 16 29 20 16 9 56 12 68 9 56 77 99 35 5 6 61 96 0 80 74 17 9 33 67 64 - 90 26 48 34 78 64 63 31 7 15 70 41 79 95 25 7 70 85 22 12 59 52 90 22 49 67 95 50 26 23 96 86 77 30 19 73 77 55 94 75 99 21 27 95 44 52 86 14 57 59 92 0 63 77 34 12 4 3 53 97 66 16 14 42 43 39 19 89 17 34 70 47 80 0 51 6 88 67 21 98 - 64 28 86 67 3 79 26 49 58 54 93 27 95 49 92 17 20 85 93 75 82 46 83 64 17 88 48 61 0 35 79 13 12 18 19 80 80 78 14 62 67 52 94 19 36 62 27 53 36 90 4 99 73 97 42 20 78 93 52 44 29 9 92 77 79 94 95 8 9 83 63 12 74 51 0 99 82 58 79 30 - 2 3 94 47 39 86 8 49 79 93 37 83 46 47 28 55 71 70 48 54 21 15 83 21 49 76 36 61 18 7 67 73 11 8 51 5 78 12 95 96 61 32 95 69 91 54 9 0 91 38 21 96 60 77 73 82 58 12 73 85 63 74 31 69 25 72 20 29 3 69 28 99 17 6 99 0 65 95 37 19 - 48 65 9 85 56 23 80 74 82 42 9 28 22 26 39 79 57 34 9 80 88 50 18 36 94 76 59 9 60 50 92 42 1 92 85 5 83 89 40 6 10 4 17 44 48 48 55 84 21 2 26 86 96 14 30 91 19 75 43 40 77 63 15 47 42 93 62 81 40 52 2 42 9 88 82 65 0 82 38 18 - 66 21 96 77 45 91 65 81 63 64 27 20 39 81 14 20 35 1 6 67 34 96 95 2 71 73 3 87 86 86 19 0 65 98 92 33 93 1 94 9 3 94 73 43 15 98 51 31 21 51 23 9 74 44 10 10 42 35 7 68 27 16 56 83 43 80 72 78 20 0 38 55 33 67 58 95 82 0 73 3 - 87 69 7 72 30 33 62 27 78 7 93 80 95 55 73 93 49 76 14 2 48 85 86 52 64 92 41 99 39 92 40 6 93 43 43 79 20 16 15 47 69 12 39 28 41 88 3 52 81 54 58 92 66 15 59 88 96 58 75 61 73 10 41 7 27 34 97 16 32 81 2 49 67 21 79 37 38 73 0 53 - 45 21 4 62 44 79 82 74 12 74 62 70 87 76 65 31 31 45 91 92 78 60 11 44 31 72 93 39 90 99 27 12 39 50 75 9 85 97 71 38 30 41 60 31 78 49 88 50 91 60 92 93 76 89 57 99 96 69 18 76 63 15 31 26 70 31 49 52 82 25 30 40 64 98 30 19 18 3 53 0 - - 0 21 95 82 56 41 6 25 10 4 63 6 44 40 75 79 0 89 35 9 1 85 84 12 0 26 91 11 35 82 26 69 56 86 45 91 59 18 76 39 18 57 36 61 36 21 71 11 29 82 82 6 71 8 77 74 30 89 76 76 40 93 56 1 50 4 36 27 85 2 1 15 11 35 11 20 21 61 80 58 - 21 0 21 76 72 44 85 94 90 51 3 48 29 90 66 41 15 83 96 74 45 65 40 54 83 14 71 77 36 53 37 26 87 76 91 13 29 11 77 32 87 67 94 79 2 10 99 56 70 99 60 4 56 2 60 72 74 46 13 20 86 4 77 15 89 48 14 89 44 59 22 57 63 6 0 62 41 62 46 25 - 95 21 0 75 76 40 66 58 30 68 78 91 13 59 49 85 84 8 38 41 56 39 53 77 50 30 58 55 19 85 52 34 53 40 69 12 85 72 7 49 46 87 58 17 68 27 21 6 67 26 82 44 35 3 62 8 51 1 91 39 87 72 45 96 7 87 68 33 3 21 90 45 47 25 30 43 97 33 35 61 - 82 76 75 0 42 36 43 7 84 6 0 0 48 62 59 29 94 82 29 3 3 51 67 39 15 66 42 23 62 62 28 76 66 82 98 35 15 17 77 44 26 76 86 60 62 62 83 91 57 62 36 2 2 43 65 37 49 61 5 34 53 96 82 48 28 31 75 1 95 7 92 69 62 32 97 5 39 50 82 93 - 56 72 76 42 0 71 35 14 20 74 49 50 37 79 19 51 70 42 26 79 98 60 35 9 96 70 21 37 37 67 93 93 39 2 52 26 90 26 1 68 93 7 94 19 54 37 0 20 12 11 66 84 80 1 55 9 21 12 65 7 17 51 84 87 2 27 82 71 71 40 93 27 93 92 34 39 31 26 1 87 - 41 44 40 36 71 0 72 59 97 46 62 12 91 63 70 1 22 49 24 58 62 49 94 92 63 13 45 22 69 70 18 1 44 32 3 72 99 34 45 18 96 82 79 75 83 43 26 81 39 66 22 71 58 42 91 56 27 56 28 64 98 69 69 93 35 41 67 12 33 1 71 72 26 86 67 67 24 10 46 56 - 6 85 66 43 35 72 0 56 69 53 48 74 43 94 29 64 97 38 12 99 51 87 76 71 47 47 9 71 20 81 99 45 56 15 99 64 57 84 83 61 25 41 8 46 52 22 33 68 52 28 75 99 6 85 65 47 90 24 79 70 28 19 87 80 4 21 34 12 20 67 24 94 10 64 52 92 49 68 65 66 - 25 94 58 7 14 59 56 0 28 81 17 58 99 90 70 17 57 37 2 37 3 43 20 68 35 60 23 48 40 10 42 83 82 27 49 15 34 50 42 26 33 23 16 69 97 13 35 80 40 55 30 22 76 55 56 91 74 82 96 2 13 4 4 35 48 29 42 56 3 30 60 81 37 42 3 17 25 37 26 88 - 10 90 30 84 20 97 69 28 0 95 55 53 62 22 44 86 43 43 40 36 53 34 59 43 50 58 62 43 9 22 64 46 68 53 8 30 30 92 6 13 95 76 81 91 37 78 90 64 49 46 19 60 93 35 47 69 54 87 12 39 33 54 12 10 4 88 54 46 82 84 8 29 10 92 62 62 74 48 22 85 - 4 51 68 6 74 46 53 81 95 0 23 3 30 12 98 69 29 61 34 53 98 94 33 77 31 54 71 78 8 78 50 76 56 80 72 26 20 57 39 68 55 71 19 32 87 41 94 21 21 20 61 13 5 46 97 61 8 92 33 73 0 16 73 74 44 55 96 67 94 83 28 22 78 55 89 11 99 84 56 30 - 63 3 78 0 49 62 48 17 55 23 0 90 87 80 20 66 59 93 79 80 28 68 99 54 69 99 1 49 63 23 33 99 40 29 60 95 28 44 30 88 66 9 41 3 4 63 61 87 34 28 55 63 10 78 17 90 0 66 62 30 76 0 91 62 73 38 49 85 86 88 13 71 46 75 98 53 52 10 84 70 - 6 48 91 0 50 12 74 58 53 3 90 0 44 8 52 59 48 85 29 94 79 4 85 31 54 95 75 81 11 56 38 95 37 67 54 88 93 53 44 68 58 98 55 84 76 19 46 89 89 5 23 63 19 53 20 47 17 66 60 86 14 52 27 77 5 37 27 53 88 84 63 1 26 18 85 59 24 64 81 12 - 44 29 13 48 37 91 43 99 62 30 87 44 0 72 32 64 18 79 23 56 63 2 78 3 32 3 2 18 89 50 69 66 20 97 52 81 42 28 71 71 53 87 31 36 99 98 38 97 26 31 60 83 43 16 91 96 52 48 12 17 13 35 7 96 17 59 26 30 43 53 26 37 93 35 49 33 87 55 48 63 - 40 90 59 62 79 63 94 90 22 12 80 8 72 0 81 55 12 28 79 62 63 11 56 0 10 34 1 75 62 33 68 51 53 80 84 40 3 32 27 32 61 27 92 25 2 15 9 30 0 97 24 14 10 84 56 83 0 16 67 2 5 98 73 47 81 88 39 46 13 9 89 96 30 66 37 2 0 1 8 84 - 75 66 49 59 19 70 29 70 44 98 20 52 32 81 0 99 7 62 58 49 93 47 53 34 39 8 86 18 52 4 95 3 80 9 3 5 26 36 92 8 94 75 8 64 73 47 68 78 8 40 6 31 85 47 96 5 98 44 86 0 93 53 16 87 94 23 61 80 35 17 45 51 26 54 59 57 25 99 87 34 - 79 41 85 29 51 1 64 17 86 69 66 59 64 55 99 0 79 24 41 29 7 26 71 36 18 57 16 28 1 24 68 56 81 1 54 22 67 44 6 46 30 0 86 73 15 81 68 36 12 65 18 59 93 34 92 82 69 3 24 94 53 66 98 6 98 30 31 41 74 23 56 15 63 91 67 10 63 5 20 27 - 0 15 84 94 70 22 97 57 43 29 59 48 18 12 7 79 0 20 15 75 56 89 93 60 37 44 41 76 25 6 62 60 51 57 79 34 41 82 95 15 94 12 90 49 82 56 75 39 48 84 15 45 93 74 87 39 10 81 54 80 88 13 62 11 65 72 18 81 55 82 20 33 20 77 99 5 70 31 33 52 - 89 83 8 82 42 49 38 37 43 61 93 85 79 28 62 24 20 0 47 55 29 74 7 30 64 45 13 7 96 98 47 0 60 94 53 6 97 20 94 42 4 30 25 64 12 44 74 96 54 44 32 74 5 84 4 44 64 68 38 35 29 11 39 69 85 79 60 83 12 5 55 9 49 88 61 92 23 54 81 58 - 35 96 38 29 26 24 12 2 40 34 79 29 23 79 58 41 15 47 0 29 27 80 10 78 55 72 49 31 63 37 68 36 5 74 74 57 65 82 51 27 28 85 5 73 48 23 44 0 39 53 80 33 43 99 80 98 61 46 15 4 33 66 6 77 84 82 33 12 24 91 45 83 85 44 45 51 78 88 31 3 - 9 74 41 3 79 58 99 37 36 53 80 94 56 62 49 29 75 55 29 0 42 34 46 71 12 80 15 81 21 54 1 72 84 9 35 21 64 8 66 94 50 37 42 40 6 30 12 34 27 29 33 82 54 75 75 54 19 67 42 63 79 10 79 93 87 13 21 48 40 63 97 32 73 94 16 2 30 89 9 89 - 1 45 56 3 98 62 51 3 53 98 28 79 63 63 93 7 56 29 27 42 0 0 90 9 2 79 37 54 71 49 19 9 29 53 17 79 33 12 6 9 18 80 29 45 9 81 2 97 39 92 76 21 69 1 24 22 28 47 80 22 18 89 97 52 13 99 66 27 67 89 64 80 50 34 46 18 52 31 52 22 - 85 65 39 51 60 49 87 43 34 94 68 4 2 11 47 26 89 74 80 34 0 0 28 21 91 9 49 75 37 35 47 47 61 80 34 75 98 11 10 49 1 47 85 13 41 22 65 61 42 33 77 91 12 91 56 35 45 31 45 25 58 7 86 58 24 6 37 69 57 6 50 87 63 85 35 20 72 91 86 11 - 84 40 53 67 35 94 76 20 59 33 99 85 78 56 53 71 93 7 10 46 90 28 0 22 84 57 73 6 1 19 72 79 70 22 19 5 94 2 72 38 95 93 24 17 85 89 99 17 85 78 14 63 11 97 6 94 61 32 9 39 56 76 48 9 93 47 40 55 3 55 81 58 29 44 33 30 48 3 80 43 - 12 54 77 39 9 92 71 68 43 77 54 31 3 0 34 36 60 30 78 71 9 21 22 0 88 43 17 27 56 4 86 32 76 6 41 55 32 41 20 61 75 46 60 10 38 99 62 70 30 49 3 22 17 26 2 29 62 69 28 61 33 21 55 27 73 89 88 42 26 1 22 41 66 1 88 78 68 30 9 60 - 0 83 50 15 96 63 47 35 50 31 69 54 32 10 39 18 37 64 55 12 2 91 84 88 0 44 24 42 35 90 0 13 71 61 67 68 65 78 33 92 21 34 27 9 26 79 33 1 22 2 10 27 38 25 59 44 28 72 91 32 30 55 30 3 57 9 34 94 18 7 17 85 28 38 40 29 91 81 85 74 - 26 14 30 66 70 13 47 60 58 54 99 95 3 34 8 57 44 45 72 80 79 9 57 43 44 0 18 19 69 69 43 64 29 32 33 25 70 76 31 89 56 49 29 2 26 84 34 64 67 33 59 89 45 63 45 75 76 52 40 44 32 10 6 35 25 75 56 78 92 4 92 98 29 9 79 98 86 40 18 53 - 91 71 58 42 21 45 9 23 62 71 1 75 2 1 86 16 41 13 49 15 37 49 73 17 24 18 0 12 48 71 15 87 79 94 1 97 40 31 87 97 57 26 41 21 51 38 82 68 68 12 48 2 66 17 49 90 31 39 61 73 6 19 45 13 21 32 56 26 79 71 7 70 35 96 47 30 32 23 35 39 - 11 77 55 23 37 22 71 48 43 78 49 81 18 75 18 28 76 7 31 81 54 75 6 27 42 19 12 0 56 80 28 78 62 81 80 13 85 26 5 62 3 26 46 91 49 27 73 21 58 3 21 27 57 83 30 60 94 44 97 94 66 5 36 21 99 83 28 2 26 60 34 76 64 87 53 98 76 40 70 43 - 35 36 19 62 37 69 20 40 9 8 63 11 89 62 52 1 25 96 63 21 71 37 1 56 35 69 48 56 0 41 79 88 14 49 72 89 52 55 12 7 31 31 98 45 59 22 87 6 36 26 85 6 33 35 48 59 88 25 58 76 98 28 46 79 25 18 48 95 78 77 90 23 9 85 55 54 66 11 57 69 - 82 53 85 62 67 70 81 10 22 78 23 56 50 33 4 24 6 98 37 54 49 35 19 4 90 69 71 80 41 0 81 99 83 16 40 23 10 67 58 30 4 4 39 58 31 92 11 53 97 56 53 64 77 51 36 52 18 53 86 40 55 78 74 23 2 8 7 88 72 27 21 50 1 48 81 93 96 43 12 60 - 26 37 52 28 93 18 99 42 64 50 33 38 69 68 95 68 62 47 68 1 19 47 72 86 0 43 15 28 79 81 0 10 36 91 83 66 3 17 24 27 95 51 84 18 5 90 69 61 57 4 75 3 37 27 3 80 24 14 91 48 55 9 62 70 76 99 57 83 84 64 74 13 17 47 96 86 14 84 7 30 - 69 26 34 76 93 1 45 83 46 76 99 95 66 51 3 56 60 0 36 72 9 47 79 32 13 64 87 78 88 99 10 0 95 79 8 91 76 25 42 66 70 91 67 2 98 3 71 61 74 87 12 10 40 42 93 69 79 12 23 72 37 81 82 87 25 5 89 67 70 30 89 29 68 20 78 45 99 9 16 22 - 56 87 53 66 39 44 56 82 68 56 40 37 20 53 80 81 51 60 5 84 29 61 70 76 71 29 79 62 14 83 36 95 0 83 46 86 17 66 45 3 13 3 19 88 49 84 57 93 76 49 29 25 36 24 95 48 11 58 17 45 19 52 44 92 75 95 32 9 44 1 62 62 82 28 28 94 19 41 80 94 - 86 76 40 82 2 32 15 27 53 80 29 67 97 80 9 1 57 94 74 9 53 80 22 6 61 32 94 81 49 16 91 79 83 0 35 7 41 65 3 70 29 13 31 50 30 26 98 38 84 65 11 58 44 48 15 48 3 92 92 71 44 4 98 93 16 78 10 15 88 81 92 45 61 38 28 94 86 22 0 55 - 45 91 69 98 52 3 99 49 8 72 60 54 52 84 3 54 79 53 74 35 17 34 19 41 67 33 1 80 72 40 83 8 46 35 0 91 67 91 3 60 38 24 90 93 12 65 25 33 46 98 91 10 46 49 77 4 13 46 80 45 25 67 3 14 93 54 20 19 5 17 75 24 15 77 27 23 15 77 36 15 - 91 13 12 35 26 72 64 15 30 26 95 88 81 40 5 22 34 6 57 21 79 75 5 55 68 25 97 13 89 23 66 91 86 7 91 0 31 46 21 81 27 70 89 54 96 62 46 60 18 97 12 6 43 6 73 14 66 69 97 32 97 63 72 27 3 86 77 94 8 56 28 79 54 73 65 85 25 38 76 24 - 59 29 85 15 90 99 57 34 30 20 28 93 42 3 26 67 41 97 65 64 33 98 94 32 65 70 40 85 52 10 3 76 17 41 67 31 0 38 4 91 28 21 27 38 30 45 17 93 57 85 57 97 9 78 93 1 87 16 17 9 50 7 25 13 20 14 9 85 46 41 17 35 1 44 89 5 2 0 42 81 - 18 11 72 17 26 34 84 50 92 57 44 53 28 32 36 44 82 20 82 8 12 11 2 41 78 76 31 26 55 67 17 25 66 65 91 46 38 0 57 75 58 10 1 35 29 88 9 87 21 30 8 42 91 26 2 74 99 63 83 70 84 83 12 84 45 19 32 74 41 32 70 32 48 41 99 6 53 8 73 29 - 76 77 7 77 1 45 83 42 6 39 30 44 71 27 92 6 95 94 51 66 6 10 72 20 33 31 87 5 12 58 24 42 45 3 3 21 4 57 0 75 84 58 26 79 73 91 85 21 26 17 90 13 62 54 87 28 70 81 95 11 98 56 46 69 17 47 96 14 18 57 44 25 29 97 27 86 68 22 74 21 - 39 32 49 44 68 18 61 26 13 68 88 68 71 32 8 46 15 42 27 94 9 49 38 61 92 89 97 62 7 30 27 66 3 70 60 81 91 75 75 0 30 66 48 73 17 45 13 91 81 66 7 89 55 71 60 33 89 31 46 60 17 15 84 98 12 67 56 23 24 70 46 65 28 63 80 81 29 10 58 92 - 18 87 46 26 93 96 25 33 95 55 66 58 53 61 94 30 94 4 28 50 18 1 95 75 21 56 57 3 31 4 95 70 13 29 38 27 28 58 84 30 0 20 5 26 19 69 22 90 1 67 80 75 20 32 30 21 46 25 89 22 98 78 50 90 81 17 39 58 49 51 26 96 28 22 54 83 93 21 79 44 - 57 67 87 76 7 82 41 23 76 71 9 98 87 27 75 0 12 30 85 37 80 47 93 46 34 49 26 26 31 4 51 91 3 13 24 70 21 10 58 66 20 0 22 62 95 39 50 99 19 82 84 85 76 85 31 44 48 1 30 40 91 44 40 14 17 48 62 95 69 2 80 40 20 64 99 47 64 4 91 55 - 36 94 58 86 94 79 8 16 81 19 41 55 31 92 8 86 90 25 5 42 29 85 24 60 27 29 41 46 98 39 84 67 19 31 90 89 27 1 26 48 5 22 0 80 59 47 25 60 37 17 5 21 31 21 21 3 87 72 25 15 35 56 91 15 69 54 72 69 21 2 91 43 24 35 98 4 96 54 67 79 - 61 79 17 60 19 75 46 69 91 32 3 84 36 25 64 73 49 64 73 40 45 13 17 10 9 2 21 91 45 58 18 2 88 50 93 54 38 35 79 73 26 62 80 0 51 53 36 27 75 81 97 44 21 31 50 91 13 69 80 16 74 72 84 18 85 11 97 74 85 76 25 23 77 18 32 32 81 75 23 24 - 36 2 68 62 54 83 52 97 37 87 4 76 99 2 73 15 82 12 48 6 9 41 85 38 26 26 51 49 59 31 5 98 49 30 12 96 30 29 73 17 19 95 59 51 0 51 63 12 39 61 98 0 16 73 18 1 2 69 18 91 92 63 53 52 23 79 97 5 66 86 3 86 99 13 1 30 69 75 87 67 - 21 10 27 62 37 43 22 13 78 41 63 19 98 15 47 81 56 44 23 30 81 22 89 99 79 84 38 27 22 92 90 3 84 26 65 62 45 88 91 45 69 39 47 53 51 0 62 59 29 65 12 57 76 77 5 55 59 92 13 72 71 28 72 4 75 41 68 96 1 89 0 78 21 21 87 38 21 50 28 19 - 71 99 21 83 0 26 33 35 90 94 61 46 38 9 68 68 75 74 44 12 2 65 99 62 33 34 82 73 87 11 69 71 57 98 25 46 17 9 85 13 22 50 25 36 63 62 0 14 31 80 9 5 90 58 90 24 96 62 71 12 52 30 29 69 90 69 48 10 94 57 3 20 87 17 37 69 96 57 76 64 - 11 56 6 91 20 81 68 80 64 21 87 89 97 30 78 36 39 96 0 34 97 61 17 70 1 64 68 21 6 53 61 61 93 38 33 60 93 87 21 91 90 99 60 27 12 59 14 0 60 99 97 88 29 73 81 72 19 22 0 44 48 8 63 38 46 51 77 53 44 73 51 24 56 56 57 63 87 58 66 71 - 29 70 67 57 12 39 52 40 49 21 34 89 26 0 8 12 48 54 39 27 39 42 85 30 22 67 68 58 36 97 57 74 76 84 46 18 57 21 26 81 1 19 37 75 39 29 31 60 0 10 73 18 92 86 77 23 62 41 26 94 68 79 52 96 15 84 18 81 45 78 84 93 25 31 95 71 70 47 27 17 - 82 99 26 62 11 66 28 55 46 20 28 5 31 97 40 65 84 44 53 29 92 33 78 49 2 33 12 3 26 56 4 87 49 65 98 97 85 30 17 66 67 82 17 81 61 65 80 99 10 0 40 71 10 82 88 87 65 96 68 54 24 15 26 42 29 23 36 92 47 61 89 63 2 6 26 32 26 48 17 28 - 82 60 82 36 66 22 75 30 19 61 55 23 60 24 6 18 15 32 80 33 76 77 14 3 10 59 48 21 85 53 75 12 29 11 91 12 57 8 90 7 80 84 5 97 98 12 9 97 73 40 0 67 15 59 62 96 50 53 84 41 24 32 64 8 43 46 2 10 46 50 25 36 22 12 22 92 92 66 51 51 - 6 4 44 2 84 71 99 22 60 13 63 63 83 14 31 59 45 74 33 82 21 91 63 22 27 89 2 27 6 64 3 10 25 58 10 6 97 42 13 89 75 85 21 44 0 57 5 88 18 71 67 0 57 55 39 16 79 77 64 57 33 90 78 66 84 70 81 23 86 70 88 52 27 19 71 69 49 46 11 92 - 71 56 35 2 80 58 6 76 93 5 10 19 43 10 85 93 93 5 43 54 69 12 11 17 38 45 66 57 33 77 37 40 36 44 46 43 9 91 62 55 20 76 31 21 16 76 90 29 92 10 15 57 0 13 32 51 54 44 77 84 78 78 56 49 77 72 92 99 93 81 67 94 44 32 37 31 72 98 80 3 - 8 2 3 43 1 42 85 55 35 46 78 53 16 84 47 34 74 84 99 75 1 91 97 26 25 63 17 83 35 51 27 42 24 48 49 6 78 26 54 71 32 85 21 31 73 77 58 73 86 82 59 55 13 0 37 50 35 31 37 42 49 15 20 41 35 74 26 89 5 67 17 17 67 8 84 80 91 58 4 47 - 77 60 62 65 55 91 65 56 47 97 17 20 91 56 96 92 87 4 80 75 24 56 6 2 59 45 49 30 48 36 3 93 95 15 77 73 93 2 87 60 30 31 21 50 18 5 90 81 77 88 62 39 32 37 0 82 23 87 90 31 71 80 22 33 54 75 61 72 73 52 88 49 37 37 62 74 10 36 42 89 - 74 72 8 37 9 56 47 91 69 61 90 47 96 83 5 82 39 44 98 54 22 35 94 29 44 75 90 60 59 52 80 69 48 48 4 14 1 74 28 33 21 44 3 91 1 55 24 72 23 87 96 16 51 50 82 0 88 48 4 47 15 35 5 37 8 60 65 63 96 64 76 85 30 23 64 96 23 49 74 73 - 30 74 51 49 21 27 90 74 54 8 0 17 52 0 98 69 10 64 61 19 28 45 61 62 28 76 31 94 88 18 24 79 11 3 13 66 87 99 70 89 46 48 87 13 2 59 96 19 62 65 50 79 54 35 23 88 0 35 75 14 16 31 8 16 80 74 42 92 54 64 15 16 42 45 54 25 27 38 0 28 - 89 46 1 61 12 56 24 82 87 92 66 66 48 16 44 3 81 68 46 67 47 31 32 69 72 52 39 44 25 53 14 12 58 92 46 69 16 63 81 31 25 1 72 69 69 92 62 22 41 96 53 77 44 31 87 48 35 0 48 23 47 84 58 11 54 17 87 2 53 6 92 1 32 79 90 0 79 59 88 50 - 76 13 91 5 65 28 79 96 12 33 62 60 12 67 86 24 54 38 15 42 80 45 9 28 91 40 61 97 58 86 91 23 17 92 80 97 17 83 95 46 89 30 25 80 18 13 71 0 26 68 84 64 77 37 90 4 75 48 0 13 30 90 70 4 25 76 39 89 52 52 3 0 28 51 66 1 61 36 13 54 - 76 20 39 34 7 64 70 2 39 73 30 86 17 2 0 94 80 35 4 63 22 25 39 61 32 44 73 94 76 40 48 72 45 71 45 32 9 70 11 60 22 40 15 16 91 72 12 44 94 54 41 57 84 42 31 47 14 23 13 0 73 42 9 54 82 27 73 9 85 51 3 84 48 5 99 29 69 18 73 61 - 40 86 87 53 17 98 28 13 33 0 76 14 13 5 93 53 88 29 33 79 18 58 56 33 30 32 6 66 98 55 55 37 19 44 25 97 50 84 98 17 98 91 35 74 92 71 52 48 68 24 24 33 78 49 71 15 16 47 30 73 0 84 14 92 65 23 83 37 19 0 80 38 87 96 55 99 9 53 48 68 - 93 4 72 96 51 69 19 4 54 16 0 52 35 98 53 66 13 11 66 10 89 7 76 21 55 10 19 5 28 78 9 81 52 4 67 63 7 83 56 15 78 44 56 72 63 28 30 8 79 15 32 90 78 15 80 35 31 84 90 42 84 0 11 92 31 90 94 58 94 78 72 58 3 70 25 94 3 17 49 9 - 56 77 45 82 84 69 87 4 12 73 91 27 7 73 16 98 62 39 6 79 97 86 48 55 30 6 45 36 46 74 62 82 44 98 3 72 25 12 46 84 50 40 91 84 53 72 29 63 52 26 64 78 56 20 22 5 8 58 70 9 14 11 0 64 19 87 97 16 63 4 16 18 78 57 36 82 57 73 35 56 - 1 15 96 48 87 93 80 35 10 74 62 77 96 47 87 6 11 69 77 93 52 58 9 27 3 35 13 21 79 23 70 87 92 93 14 27 13 84 69 98 90 14 15 18 52 4 69 38 96 42 8 66 49 41 33 37 16 11 4 54 92 92 64 0 7 27 54 86 49 2 10 89 11 91 36 74 54 3 33 45 - 50 89 7 28 2 35 4 48 4 44 73 5 17 81 94 98 65 85 84 87 13 24 93 73 57 25 21 99 25 2 76 25 75 16 93 3 20 45 17 12 81 17 69 85 23 75 90 46 15 29 43 84 77 35 54 8 80 54 25 82 65 31 19 7 0 93 45 17 43 8 26 30 63 23 62 14 11 11 67 19 - 4 48 87 31 27 41 21 29 88 55 38 37 59 88 23 30 72 79 82 13 99 6 47 89 9 75 32 83 18 8 99 5 95 78 54 86 14 19 47 67 17 48 54 11 79 41 69 51 84 23 46 70 72 74 75 60 74 17 76 27 23 90 87 27 93 0 60 91 7 91 29 34 40 40 97 25 23 22 13 13 - 36 14 68 75 82 67 34 42 54 96 49 27 26 39 61 31 18 60 33 21 66 37 40 88 34 56 56 28 48 7 57 89 32 10 20 77 9 32 96 56 39 62 72 97 97 68 48 77 18 36 2 81 92 26 61 65 42 87 39 73 83 94 97 54 45 60 0 47 31 85 96 26 57 77 77 46 22 13 54 99 - 27 89 33 1 71 12 12 56 46 67 85 53 30 46 80 41 81 83 12 48 27 69 55 42 94 78 26 2 95 88 83 67 9 15 19 94 85 74 14 23 58 95 69 74 5 96 10 53 81 92 10 23 99 89 72 63 92 2 89 9 37 58 16 86 17 91 47 0 22 54 64 51 44 45 42 87 81 50 10 96 - 85 44 3 95 71 33 20 3 82 94 86 88 43 13 35 74 55 12 24 40 67 57 3 26 18 92 79 26 78 72 84 70 44 88 5 8 46 41 18 24 49 69 21 85 66 1 94 44 45 47 46 86 93 5 73 96 54 53 52 85 19 94 63 49 43 7 31 22 0 89 52 28 85 32 62 74 21 18 10 50 - 2 59 21 7 40 1 67 30 84 83 88 84 53 9 17 23 82 5 91 63 89 6 55 1 7 4 71 60 77 27 64 30 1 81 17 56 41 32 57 70 51 2 2 76 86 89 57 73 78 61 50 70 81 67 52 64 64 6 52 51 0 78 4 2 8 91 85 54 89 0 60 22 45 3 33 26 27 57 20 81 - 1 22 90 92 93 71 24 60 8 28 13 63 26 89 45 56 20 55 45 97 64 50 81 22 17 92 7 34 90 21 74 89 62 92 75 28 17 70 44 46 26 80 91 25 3 0 3 51 84 89 25 88 67 17 88 76 15 92 3 3 80 72 16 10 26 29 96 64 52 60 0 55 63 21 26 17 67 90 85 76 - 15 57 45 69 27 72 94 81 29 22 71 1 37 96 51 15 33 9 83 32 80 87 58 41 85 98 70 76 23 50 13 29 62 45 24 79 35 32 25 65 96 40 43 23 86 78 20 24 93 63 36 52 94 17 49 85 16 1 0 84 38 58 18 89 30 34 26 51 28 22 55 0 20 19 39 36 17 85 22 20 - 11 63 47 62 93 26 10 37 10 78 46 26 93 30 26 63 20 49 85 73 50 63 29 66 28 29 35 64 9 1 17 68 82 61 15 54 1 48 29 28 28 20 24 77 99 21 87 56 25 2 22 27 44 67 37 30 42 32 28 48 87 3 78 11 63 40 57 44 85 45 63 20 0 80 15 55 32 32 20 23 - 35 6 25 32 92 86 64 42 92 55 75 18 35 66 54 91 77 88 44 94 34 85 44 1 38 9 96 87 85 48 47 20 28 38 77 73 44 41 97 63 22 64 35 18 13 21 17 56 31 6 12 19 32 8 37 23 45 79 51 5 96 70 57 91 23 40 77 45 32 3 21 19 80 0 75 8 3 5 41 71 - 11 0 30 97 34 67 52 3 62 89 98 85 49 37 59 67 99 61 45 16 46 35 33 88 40 79 47 53 55 81 96 78 28 28 27 65 89 99 27 80 54 99 98 32 1 87 37 57 95 26 22 71 37 84 62 64 54 90 66 99 55 25 36 36 62 97 77 42 62 33 26 39 15 75 0 50 1 55 99 83 - 20 62 43 5 39 67 92 17 62 11 53 59 33 2 57 10 5 92 51 2 18 20 30 78 29 98 30 98 54 93 86 45 94 94 23 85 5 6 86 81 83 47 4 32 30 38 69 63 71 32 92 69 31 80 74 96 25 0 1 29 99 94 82 74 14 25 46 87 74 26 17 36 55 8 50 0 8 41 30 16 - 21 41 97 39 31 24 49 25 74 99 52 24 87 0 25 63 70 23 78 30 52 72 48 68 91 86 32 76 66 96 14 99 19 86 15 25 2 53 68 29 93 64 96 81 69 21 96 87 70 26 92 49 72 91 10 23 27 79 61 69 9 3 57 54 11 23 22 81 21 27 67 17 32 3 1 8 0 20 85 12 - 61 62 33 50 26 10 68 37 48 84 10 64 55 1 99 5 31 54 88 89 31 91 3 30 81 40 23 40 11 43 84 9 41 22 77 38 0 8 22 10 21 4 54 75 75 50 57 58 47 48 66 46 98 58 36 49 38 59 36 18 53 17 73 3 11 22 13 50 18 57 90 85 32 5 55 41 20 0 66 43 - 80 46 35 82 1 46 65 26 22 56 84 81 48 8 87 20 33 81 31 9 52 86 80 9 85 18 35 70 57 12 7 16 80 0 36 76 42 73 74 58 79 91 67 23 87 28 76 66 27 17 51 11 80 4 42 74 0 88 13 73 48 49 35 33 67 13 54 10 10 20 85 22 20 41 99 30 85 66 0 82 - 58 25 61 93 87 56 66 88 85 30 70 12 63 84 34 27 52 58 3 89 22 11 43 60 74 53 39 43 69 60 30 22 94 55 15 24 81 29 21 92 44 55 79 24 67 19 64 71 17 28 51 92 3 47 89 73 28 50 54 61 68 9 56 45 19 13 99 96 50 81 76 20 23 71 83 16 12 43 82 0 diff --git a/trunk/paradiseo-peo/tutorial/benchs/tai80b.dat b/trunk/paradiseo-peo/tutorial/benchs/tai80b.dat deleted file mode 100755 index ea13bcb5f..000000000 --- a/trunk/paradiseo-peo/tutorial/benchs/tai80b.dat +++ /dev/null @@ -1,162 +0,0 @@ - 80 818415043 - - 0 85 89 833 718 832 893 711 807 881 755 878 815 302 315 347 325 341 331 331 309 333 325 328 316 329 325 321 324 303 333 359 303 420 445 421 432 447 420 441 435 434 445 159 172 158 205 180 245 245 231 140 156 202 213 239 166 164 252 147 203 445 442 467 402 459 415 449 427 432 448 210 253 190 748 764 756 743 760 733 - 85 0 32 916 801 916 976 794 889 964 839 962 897 269 279 313 291 302 304 298 274 303 293 292 280 289 287 284 288 272 305 325 267 504 529 505 516 532 505 525 519 519 529 243 257 242 278 263 330 326 315 213 240 283 294 323 250 247 330 228 284 376 377 402 338 392 346 389 365 365 382 294 337 275 690 706 698 682 702 674 - 89 32 0 920 806 919 981 799 895 968 840 966 904 300 310 344 322 332 336 329 305 335 325 323 311 320 318 315 319 303 337 356 298 502 524 501 511 528 501 523 515 515 524 239 257 239 264 259 329 319 315 200 243 276 286 321 252 242 319 221 277 358 357 382 318 373 328 367 344 346 363 298 334 277 715 732 724 707 727 699 - 833 916 920 0 116 40 60 125 41 55 116 46 53 978 992 1000 988 1016 970 991 985 981 981 999 989 1011 1000 997 993 972 972 1007 984 438 436 453 451 425 445 422 441 434 442 688 665 686 711 671 595 629 607 750 678 667 662 606 669 687 652 712 667 1259 1248 1272 1207 1267 1229 1244 1228 1243 1254 622 599 644 1399 1414 1401 1407 1413 1391 - 718 801 806 116 0 127 177 10 89 169 106 162 101 863 877 886 873 901 856 876 870 867 866 884 874 896 885 882 878 857 858 893 868 334 338 352 353 326 343 319 342 332 345 575 552 574 604 560 483 521 495 640 564 557 553 495 555 575 546 600 557 1147 1137 1162 1097 1156 1118 1135 1118 1132 1143 508 489 530 1288 1304 1291 1296 1302 1280 - 832 916 919 40 127 0 73 137 75 51 91 61 91 988 1003 1012 999 1027 983 1002 996 993 992 1010 1000 1022 1011 1008 1004 983 984 1019 994 429 423 441 438 413 435 411 429 422 428 684 662 683 702 667 592 621 604 744 676 660 654 601 667 683 642 707 660 1253 1241 1265 1201 1260 1223 1236 1220 1236 1247 622 593 642 1415 1431 1418 1423 1429 1407 - 893 976 981 60 177 73 0 185 93 30 164 15 94 1036 1050 1058 1046 1074 1028 1049 1044 1039 1039 1057 1048 1069 1058 1055 1051 1030 1030 1064 1042 496 493 510 508 482 503 480 499 492 499 748 725 746 770 731 655 688 667 810 738 727 721 666 729 747 710 772 726 1318 1307 1332 1267 1327 1289 1304 1287 1303 1313 683 659 704 1454 1469 1456 1463 1468 1446 - 711 794 799 125 10 137 185 0 96 178 115 170 106 853 867 876 863 892 847 867 861 858 857 875 865 886 876 873 869 848 848 883 859 330 335 349 350 323 339 316 339 329 343 569 545 568 600 554 477 516 488 635 557 552 548 489 549 569 542 594 552 1142 1132 1156 1091 1151 1112 1130 1112 1126 1138 501 484 524 1278 1294 1281 1286 1292 1270 - 807 889 895 41 89 75 93 96 0 95 127 80 20 943 957 965 953 981 935 956 951 946 946 964 955 976 965 962 958 937 936 971 949 421 423 438 438 411 429 406 427 419 430 665 641 663 693 649 573 610 584 729 653 647 642 584 644 665 634 689 646 1237 1227 1251 1186 1246 1207 1224 1207 1221 1232 597 578 619 1361 1376 1364 1370 1375 1353 - 881 964 968 55 169 51 30 178 95 0 141 27 102 1032 1046 1054 1042 1070 1025 1045 1039 1036 1035 1053 1043 1065 1054 1051 1047 1026 1026 1061 1038 479 473 492 489 464 485 462 480 473 479 733 712 732 753 717 641 672 654 794 725 711 705 651 716 732 692 757 710 1303 1291 1315 1251 1311 1274 1287 1271 1287 1297 670 644 691 1454 1470 1457 1462 1468 1446 - 755 839 840 116 106 91 164 115 127 141 0 151 146 928 943 955 940 968 926 944 936 936 934 951 941 962 951 948 945 923 927 963 934 344 335 354 350 326 349 325 341 336 340 603 584 602 616 585 512 537 525 661 599 577 570 520 589 601 555 625 576 1169 1156 1180 1116 1176 1140 1151 1135 1152 1162 546 511 564 1365 1381 1369 1372 1379 1356 - 878 962 966 46 162 61 15 170 80 27 151 0 82 1022 1036 1044 1032 1060 1014 1035 1030 1025 1025 1043 1034 1055 1044 1041 1037 1016 1016 1050 1028 482 479 496 494 468 489 466 484 477 485 733 711 732 756 717 641 674 653 795 723 712 707 651 715 732 696 757 712 1304 1293 1317 1253 1312 1275 1289 1273 1288 1299 668 645 690 1440 1456 1443 1450 1455 1433 - 815 897 904 53 101 91 94 106 20 102 146 82 0 946 960 967 955 983 937 958 954 948 948 966 958 979 968 965 961 940 939 973 952 434 438 452 453 426 443 420 442 433 445 675 651 673 705 660 583 622 594 741 662 658 654 595 654 675 647 700 658 1247 1238 1262 1197 1256 1218 1236 1218 1232 1243 606 590 629 1360 1376 1363 1370 1375 1353 - 302 269 300 978 863 988 1036 853 943 1032 928 1022 946 0 15 45 23 43 42 29 8 36 26 26 14 34 24 21 21 8 42 57 7 641 676 653 667 674 646 661 666 660 681 426 419 421 498 445 480 512 464 437 395 476 489 483 407 434 532 427 478 542 558 578 527 564 517 580 555 539 560 424 503 424 461 478 468 461 475 448 - 315 279 310 992 877 1003 1050 867 957 1046 943 1036 960 15 0 35 16 28 41 21 7 32 23 13 3 19 10 6 10 20 41 46 12 656 691 668 682 689 661 676 681 675 696 441 433 435 512 460 495 527 479 450 410 491 503 497 422 448 547 441 492 543 559 579 530 565 518 583 558 540 562 439 517 439 446 463 453 446 460 433 - 347 313 344 1000 886 1012 1058 876 965 1054 955 1044 967 45 35 0 22 26 30 16 40 19 24 23 33 34 29 31 25 44 28 12 46 675 712 688 703 708 681 695 701 695 716 467 459 462 541 486 517 553 502 480 435 518 530 521 447 475 574 469 519 574 591 610 562 596 549 615 589 571 593 461 542 463 424 441 430 425 438 412 - 325 291 322 988 873 999 1046 863 953 1042 940 1032 955 23 16 22 0 28 27 6 18 17 9 12 13 26 16 15 7 22 26 34 25 657 693 670 684 690 663 677 683 676 698 446 438 441 519 465 498 532 482 458 415 496 509 501 427 454 553 448 498 559 575 595 545 581 534 598 573 556 578 442 521 443 443 460 449 444 457 431 - 341 302 332 1016 901 1027 1074 892 981 1070 968 1060 983 43 28 26 28 0 51 26 35 39 36 17 29 12 18 22 23 46 50 31 40 683 719 695 710 716 689 703 708 702 723 468 461 463 539 487 522 554 507 477 438 518 531 525 450 476 574 468 520 550 568 587 540 572 526 592 567 548 570 467 545 467 419 436 425 419 432 406 - 331 304 336 970 856 983 1028 847 935 1025 926 1014 937 42 41 30 27 51 0 26 41 12 19 38 39 53 42 42 34 35 2 37 47 648 685 662 677 682 655 668 675 668 690 446 435 440 522 464 493 530 477 462 412 496 508 497 424 453 552 449 497 583 599 619 569 605 558 622 596 580 602 436 517 439 450 467 456 453 464 439 - 331 298 329 991 876 1002 1049 867 956 1045 944 1035 958 29 21 16 6 26 26 0 24 14 10 13 19 27 18 18 11 28 25 28 31 662 698 675 690 695 668 682 688 681 703 452 444 446 526 471 503 538 488 464 420 502 515 507 432 460 559 454 504 563 580 599 550 585 538 603 578 560 582 447 527 448 438 455 444 439 451 425 - 309 274 305 985 870 996 1044 861 951 1039 936 1030 954 8 7 40 18 35 41 24 0 34 24 19 6 26 17 13 15 14 41 51 7 649 684 661 675 682 655 669 674 668 689 434 427 428 506 453 488 520 472 444 403 484 496 490 415 441 540 434 485 542 558 578 528 564 517 581 556 539 561 432 511 432 453 470 460 453 467 440 - 333 303 335 981 867 993 1039 858 946 1036 936 1025 948 36 32 19 17 39 12 14 34 0 10 26 30 41 31 31 24 32 11 28 40 657 693 670 685 690 663 677 683 676 698 451 441 445 526 469 500 536 484 465 418 501 514 504 430 459 557 453 503 575 591 611 562 597 550 615 589 572 594 443 524 445 442 459 448 444 456 430 - 325 293 325 981 866 992 1039 857 946 1035 934 1025 948 26 23 24 9 36 19 10 24 10 0 20 20 35 24 23 16 22 18 35 30 652 689 665 680 686 659 673 678 672 693 444 435 438 518 462 494 529 479 457 412 494 506 498 424 451 550 446 496 565 582 601 552 587 540 605 579 562 584 438 518 439 447 464 453 448 461 435 - 328 292 323 999 884 1010 1057 875 964 1053 951 1043 966 26 13 23 12 17 38 13 19 26 20 0 13 15 6 8 6 29 37 34 25 666 702 678 693 699 672 686 691 685 706 453 445 447 525 471 506 539 490 463 422 503 515 509 434 460 559 453 504 552 568 588 539 574 527 592 567 549 571 450 529 450 435 452 441 435 449 422 - 316 280 311 989 874 1000 1048 865 955 1043 941 1034 958 14 3 33 13 29 39 19 6 30 20 13 0 21 11 7 8 18 38 45 13 654 690 666 681 687 660 675 680 673 694 440 433 434 512 459 493 526 478 450 409 490 502 496 421 447 546 441 492 546 562 582 532 568 521 585 560 543 565 438 517 438 447 464 454 447 461 434 - 329 289 320 1011 896 1022 1069 886 976 1065 962 1055 979 34 19 34 26 12 53 27 26 41 35 15 21 0 11 14 19 39 52 41 30 674 710 686 701 707 680 695 699 693 714 457 451 452 528 477 513 544 497 465 428 507 520 515 440 465 563 457 509 540 558 577 529 563 516 582 556 538 560 457 535 457 429 446 435 428 442 415 - 325 287 318 1000 885 1011 1058 876 965 1054 951 1044 968 24 10 29 16 18 42 18 17 31 24 6 11 11 0 4 8 28 42 39 22 665 701 677 692 698 671 686 690 684 705 450 443 445 522 469 504 536 489 460 420 500 513 507 432 458 556 451 502 546 563 582 534 568 521 587 561 543 565 449 527 449 437 454 443 437 450 424 - 321 284 315 997 882 1008 1055 873 962 1051 948 1041 965 21 6 31 15 22 42 18 13 31 23 8 7 14 4 0 8 25 41 41 18 661 697 674 688 695 667 682 687 681 702 447 439 441 518 466 501 533 485 456 416 497 509 503 428 454 553 447 498 545 562 581 532 567 520 585 560 542 564 445 524 445 440 457 447 440 454 427 - 324 288 319 993 878 1004 1051 869 958 1047 945 1037 961 21 10 25 7 23 34 11 15 24 16 6 8 19 8 8 0 23 34 36 21 660 696 672 687 693 666 680 686 679 700 447 440 442 520 466 500 533 484 458 416 497 510 503 428 455 553 448 499 552 569 588 539 574 527 592 567 549 571 444 523 445 441 458 447 441 454 428 - 303 272 303 972 857 983 1030 848 937 1026 923 1016 940 8 20 44 22 46 35 28 14 32 22 29 18 39 28 25 23 0 36 55 15 637 673 649 664 670 643 658 663 656 677 425 417 419 498 444 477 511 461 437 393 475 487 480 405 432 531 426 476 549 564 585 534 571 524 587 562 546 567 421 500 422 464 481 470 464 477 451 - 333 305 337 972 858 984 1030 848 936 1026 927 1016 939 42 41 28 26 50 2 25 41 11 18 37 38 52 42 41 34 36 0 36 47 650 687 664 678 683 657 670 676 669 692 447 437 441 523 465 494 531 479 463 413 497 510 498 425 455 554 450 499 583 599 619 569 605 558 622 596 580 602 438 519 440 449 466 454 451 463 437 - 359 325 356 1007 893 1019 1064 883 971 1061 963 1050 973 57 46 12 34 31 37 28 51 28 35 34 45 41 39 41 36 55 36 0 57 685 722 698 713 718 691 705 711 704 726 479 469 473 553 497 528 564 513 492 446 529 541 532 458 486 585 480 530 581 599 618 571 604 557 623 598 579 601 472 552 473 414 431 420 416 428 402 - 303 267 298 984 868 994 1042 859 949 1038 934 1028 952 7 12 46 25 40 47 31 7 40 30 25 13 30 22 18 21 15 47 57 0 645 680 657 671 678 651 665 670 664 684 429 422 423 500 448 483 515 468 438 398 479 491 486 410 436 534 429 480 536 552 572 522 558 511 575 550 533 555 428 506 427 458 475 465 457 472 445 - 420 504 502 438 334 429 496 330 421 479 344 482 434 641 656 675 657 683 648 662 649 657 652 666 654 674 665 661 660 637 650 685 645 0 43 30 44 34 15 21 34 21 52 263 248 264 274 244 175 193 190 317 267 233 227 181 256 260 214 283 233 825 812 836 773 832 796 808 792 809 818 221 169 232 1099 1115 1104 1100 1112 1087 - 445 529 524 436 338 423 493 335 423 473 335 479 438 676 691 712 693 719 685 698 684 693 689 702 690 710 701 697 696 673 687 722 680 43 0 24 15 15 31 32 10 21 11 286 275 287 283 266 204 208 219 333 295 251 242 206 284 282 222 303 250 837 823 847 784 843 809 817 802 821 829 254 191 261 1136 1152 1141 1137 1149 1124 - 421 505 501 453 352 441 510 349 438 492 354 496 452 653 668 688 670 695 662 675 661 670 665 678 666 686 677 674 672 649 664 698 657 30 24 0 16 29 15 33 14 20 28 262 251 263 263 243 179 186 195 311 271 228 220 182 260 259 202 280 227 816 802 826 763 822 788 797 782 799 808 230 168 237 1112 1129 1118 1113 1126 1100 - 432 516 511 451 353 438 508 350 438 489 350 494 453 667 682 703 684 710 677 690 675 685 680 693 681 701 692 688 687 664 678 713 671 44 15 16 0 28 29 40 13 27 14 273 263 274 268 253 192 194 208 319 283 237 228 194 272 269 207 290 236 822 808 832 769 828 794 802 787 806 814 244 179 250 1127 1144 1133 1128 1141 1115 - 447 532 528 425 326 413 482 323 411 464 326 468 426 674 689 708 690 716 682 695 682 690 686 699 687 707 698 695 693 670 683 718 678 34 15 29 28 0 28 18 16 14 25 289 277 290 291 270 204 214 220 339 296 256 248 209 285 286 230 308 255 845 831 855 791 851 816 825 810 828 837 253 195 262 1132 1149 1138 1134 1146 1120 - 420 505 501 445 343 435 503 339 429 485 349 489 443 646 661 681 663 689 655 668 655 663 659 672 660 680 671 667 666 643 657 691 651 15 31 15 29 28 0 24 21 14 39 262 249 263 268 243 177 189 192 314 269 230 223 181 257 259 207 281 229 820 807 831 768 827 792 802 787 804 813 225 168 234 1105 1122 1111 1107 1119 1093 - 441 525 523 422 319 411 480 316 406 462 325 466 420 661 676 695 677 703 668 682 669 677 673 686 675 695 686 682 680 658 670 705 665 21 32 33 40 18 24 0 28 14 42 283 269 284 291 264 196 212 211 336 288 253 246 202 277 281 231 303 252 844 831 855 791 850 815 826 810 827 837 242 189 253 1119 1136 1124 1121 1133 1107 - 435 519 515 441 342 429 499 339 427 480 341 484 442 666 681 701 683 708 675 688 674 683 678 691 680 699 690 687 686 663 676 711 670 34 10 14 13 16 21 28 0 15 18 276 265 278 276 257 193 199 209 324 285 242 234 197 274 273 215 294 241 830 816 839 776 836 801 810 795 813 822 243 182 251 1125 1142 1131 1126 1139 1113 - 434 519 515 434 332 422 492 329 419 473 336 477 433 660 675 695 676 702 668 681 668 676 672 685 673 693 684 681 679 656 669 704 664 21 21 20 27 14 14 14 15 0 31 276 263 277 280 257 191 202 206 327 283 244 236 195 271 273 220 295 243 833 820 844 781 840 805 815 799 817 826 239 182 248 1118 1135 1124 1120 1132 1106 - 445 529 524 442 345 428 499 343 430 479 340 485 445 681 696 716 698 723 690 703 689 698 693 706 694 714 705 702 700 677 692 726 684 52 11 28 14 25 39 42 18 31 0 286 277 288 280 266 206 207 221 331 297 250 241 208 285 282 219 303 249 834 820 843 780 840 806 813 798 817 826 257 192 264 1140 1157 1146 1141 1154 1128 - 159 243 239 688 575 684 748 569 665 733 603 733 675 426 441 467 446 468 446 452 434 451 444 453 440 457 450 447 447 425 447 479 429 263 286 262 273 289 262 283 276 276 286 0 33 8 92 20 92 88 81 74 46 50 63 83 40 8 107 28 52 572 563 588 522 582 542 563 544 557 569 86 95 56 885 902 892 883 898 871 - 172 257 257 665 552 662 725 545 641 712 584 711 651 419 433 459 438 461 435 444 427 441 435 445 433 451 443 439 440 417 437 469 422 248 275 251 263 277 249 269 265 263 277 33 0 27 121 37 73 95 59 107 23 69 80 69 12 39 123 60 70 598 590 614 549 608 568 590 571 583 595 53 86 23 880 896 886 878 893 866 - 158 242 239 686 574 683 746 568 663 732 602 732 673 421 435 462 441 463 440 446 428 445 438 447 434 452 445 441 442 419 441 473 423 264 287 263 274 290 263 284 278 277 288 8 27 0 100 25 91 93 79 80 38 56 69 83 33 16 113 33 58 574 566 590 525 584 544 566 547 559 571 80 96 50 880 897 887 878 893 866 - 205 278 264 711 604 702 770 600 693 753 616 756 705 498 512 541 519 539 522 526 506 526 518 525 512 528 522 518 520 498 523 553 500 274 283 263 268 291 268 291 276 280 280 92 121 100 0 85 143 84 141 65 138 60 58 127 131 84 62 77 60 554 540 564 500 560 526 534 519 537 546 167 122 138 951 968 959 947 964 937 - 180 263 259 671 560 667 731 554 649 717 585 717 660 445 460 486 465 487 464 471 453 469 462 471 459 477 469 466 466 444 465 497 448 244 266 243 253 270 243 264 257 257 266 20 37 25 85 0 77 68 68 83 57 33 45 65 48 16 90 40 35 588 578 602 537 597 558 577 559 572 583 83 75 53 905 921 912 902 918 891 - 245 330 329 595 483 592 655 477 573 641 512 641 583 480 495 517 498 522 493 503 488 500 494 506 493 513 504 501 500 477 494 528 483 175 204 179 192 204 177 196 193 191 206 92 73 91 143 77 0 71 16 160 92 84 85 16 81 92 110 117 84 664 655 679 614 673 634 654 636 649 660 58 32 58 941 958 947 941 954 928 - 245 326 319 629 521 621 688 516 610 672 537 674 622 512 527 553 532 554 530 538 520 536 529 539 526 544 536 533 533 511 531 564 515 193 208 186 194 214 189 212 199 202 207 88 95 93 84 68 71 0 76 125 118 43 34 55 107 82 39 99 42 632 619 644 580 639 603 615 599 616 625 116 42 98 972 989 979 970 986 959 - 231 315 315 607 495 604 667 488 584 654 525 653 594 464 479 502 482 507 477 488 472 484 479 490 478 497 489 485 484 461 479 513 468 190 219 195 208 220 192 211 209 206 221 81 59 79 141 68 16 76 0 151 77 81 85 23 66 82 115 107 82 653 644 669 604 663 623 644 625 638 650 44 43 42 925 942 932 925 939 912 - 140 213 200 750 640 744 810 635 729 794 661 795 741 437 450 480 458 477 462 464 444 465 457 463 450 465 460 456 458 437 463 492 438 317 333 311 319 339 314 336 324 327 331 74 107 80 65 83 160 125 151 0 113 84 91 146 112 71 119 47 84 509 497 522 457 517 479 495 478 493 503 160 151 130 887 904 895 882 900 872 - 156 240 243 678 564 676 738 557 653 725 599 723 662 395 410 435 415 438 412 420 403 418 412 422 409 428 420 416 416 393 413 446 398 267 295 271 283 296 269 288 285 283 297 46 23 38 138 57 92 118 77 113 0 90 101 90 12 54 145 68 91 589 582 607 541 600 559 584 564 574 588 57 108 35 856 873 863 855 870 843 - 202 283 276 667 557 660 727 552 647 711 577 712 658 476 491 518 496 518 496 502 484 501 494 503 490 507 500 497 497 475 497 529 479 233 251 228 237 256 230 253 242 244 250 50 69 56 60 33 84 43 81 84 90 0 12 68 80 43 57 55 2 592 581 605 541 600 563 578 561 576 587 108 68 81 935 952 942 932 948 921 - 213 294 286 662 553 654 721 548 642 705 570 707 654 489 503 530 509 531 508 515 496 514 506 515 502 520 513 509 510 487 510 541 491 227 242 220 228 248 223 246 234 236 241 63 80 69 58 45 85 34 85 91 101 12 0 69 92 55 44 67 11 598 586 611 546 606 570 583 566 582 592 116 65 91 947 964 954 945 960 933 - 239 323 321 606 495 601 666 489 584 651 520 651 595 483 497 521 501 525 497 507 490 504 498 509 496 515 507 503 503 480 498 532 486 181 206 182 194 209 181 202 197 195 208 83 69 83 127 65 16 55 23 146 90 68 69 0 78 81 94 106 69 653 643 667 602 662 623 641 624 637 649 66 21 58 944 961 950 943 957 931 - 166 250 252 669 555 667 729 549 644 716 589 715 654 407 422 447 427 450 424 432 415 430 424 434 421 440 432 428 428 405 425 458 410 256 284 260 272 285 257 277 274 271 285 40 12 33 131 48 81 107 66 112 12 80 92 78 0 47 135 66 82 595 588 613 547 606 565 590 570 581 594 51 96 25 868 885 875 867 882 855 - 164 247 242 687 575 683 747 569 665 732 601 732 675 434 448 475 454 476 453 460 441 459 451 460 447 465 458 454 455 432 455 486 436 260 282 259 269 286 259 281 273 273 282 8 39 16 84 16 92 82 82 71 54 43 55 81 47 0 99 25 44 572 563 587 522 581 542 562 544 557 568 91 91 60 893 909 900 890 906 878 - 252 330 319 652 546 642 710 542 634 692 555 696 647 532 547 574 553 574 552 559 540 557 550 559 546 563 556 553 553 531 554 585 534 214 222 202 207 230 207 231 215 220 219 107 123 113 62 90 110 39 115 119 145 57 44 94 135 99 0 107 55 615 601 625 562 621 587 595 580 599 607 152 80 131 990 1007 997 987 1003 976 - 147 228 221 712 600 707 772 594 689 757 625 757 700 427 441 469 448 468 449 454 434 453 446 453 441 457 451 447 448 426 450 480 429 283 303 280 290 308 281 303 294 295 303 28 60 33 77 40 117 99 107 47 68 55 67 106 66 25 107 0 57 547 538 562 497 556 518 537 519 532 543 113 114 83 884 900 891 880 897 869 - 203 284 277 667 557 660 726 552 646 710 576 712 658 478 492 519 498 520 497 504 485 503 496 504 492 509 502 498 499 476 499 530 480 233 250 227 236 255 229 252 241 243 249 52 70 58 60 35 84 42 82 84 91 2 11 69 82 44 55 57 0 593 581 605 541 601 564 578 561 577 587 109 68 83 936 953 943 934 950 922 - 445 376 358 1259 1147 1253 1318 1142 1237 1303 1169 1304 1247 542 543 574 559 550 583 563 542 575 565 552 546 540 546 545 552 549 583 581 536 825 837 816 822 845 820 844 830 833 834 572 598 574 554 588 664 632 653 509 589 592 598 653 595 572 615 547 593 0 33 39 56 23 31 65 54 19 30 646 659 620 775 787 786 755 782 756 - 442 377 357 1248 1137 1241 1307 1132 1227 1291 1156 1293 1238 558 559 591 575 568 599 580 558 591 582 568 562 558 563 562 569 564 599 599 552 812 823 802 808 831 807 831 816 820 820 563 590 566 540 578 655 619 644 497 582 581 586 643 588 563 601 538 581 33 0 25 41 21 42 33 24 21 6 639 648 612 804 817 815 785 811 785 - 467 402 382 1272 1162 1265 1332 1156 1251 1315 1180 1317 1262 578 579 610 595 587 619 599 578 611 601 588 582 577 582 581 588 585 619 618 572 836 847 826 832 855 831 855 839 844 843 588 614 590 564 602 679 644 669 522 607 605 611 667 613 587 625 562 605 39 25 0 66 15 61 39 45 39 20 664 673 637 813 825 824 793 819 794 - 402 338 318 1207 1097 1201 1267 1091 1186 1251 1116 1253 1197 527 530 562 545 540 569 550 528 562 552 539 532 529 534 532 539 534 569 571 522 773 784 763 769 791 768 791 776 781 780 522 549 525 500 537 614 580 604 457 541 541 546 602 547 522 562 497 541 56 41 66 0 60 38 53 28 38 46 598 608 572 794 807 805 776 802 775 - 459 392 373 1267 1156 1260 1327 1151 1246 1311 1176 1312 1256 564 565 596 581 572 605 585 564 597 587 574 568 563 568 567 574 571 605 604 558 832 843 822 828 851 827 850 836 840 840 582 608 584 560 597 673 639 663 517 600 600 606 662 606 581 621 556 601 23 21 15 60 0 48 48 45 27 15 657 668 630 798 810 808 778 804 779 - 415 346 328 1229 1118 1223 1289 1112 1207 1274 1140 1275 1218 517 518 549 534 526 558 538 517 550 540 527 521 516 521 520 527 524 558 557 511 796 809 788 794 816 792 815 801 805 806 542 568 544 526 558 634 603 623 479 559 563 570 623 565 542 587 518 564 31 42 61 38 48 0 72 51 22 44 615 630 590 764 777 775 745 771 745 - 449 389 367 1244 1135 1236 1304 1130 1224 1287 1151 1289 1236 580 583 615 598 592 622 603 581 615 605 592 585 582 587 585 592 587 622 623 575 808 817 797 802 825 802 826 810 815 813 563 590 566 534 577 654 615 644 495 584 578 583 641 590 562 595 537 578 65 33 39 53 48 72 0 25 54 36 641 646 613 836 849 847 817 843 817 - 427 365 344 1228 1118 1220 1287 1112 1207 1271 1135 1273 1218 555 558 589 573 567 596 578 556 589 579 567 560 556 561 560 567 562 596 598 550 792 802 782 787 810 787 810 795 799 798 544 571 547 519 559 636 599 625 478 564 561 566 624 570 544 580 519 561 54 24 45 28 45 51 25 0 37 30 621 629 594 815 828 826 796 822 796 - 432 365 346 1243 1132 1236 1303 1126 1221 1287 1152 1288 1232 539 540 571 556 548 580 560 539 572 562 549 543 538 543 542 549 546 580 579 533 809 821 799 806 828 804 827 813 817 817 557 583 559 537 572 649 616 638 493 574 576 582 637 581 557 599 532 577 19 21 39 38 27 22 54 37 0 22 631 643 605 783 795 794 763 790 764 - 448 382 363 1254 1143 1247 1313 1138 1232 1297 1162 1299 1243 560 562 593 578 570 602 582 561 594 584 571 565 560 565 564 571 567 602 601 555 818 829 808 814 837 813 837 822 826 826 569 595 571 546 583 660 625 650 503 588 587 592 649 594 568 607 543 587 30 6 20 46 15 44 36 30 22 0 644 654 618 803 816 814 784 810 784 - 210 294 298 622 508 622 683 501 597 670 546 668 606 424 439 461 442 467 436 447 432 443 438 450 438 457 449 445 444 421 438 472 428 221 254 230 244 253 225 242 243 239 257 86 53 80 167 83 58 116 44 160 57 108 116 66 51 91 152 113 109 646 639 664 598 657 615 641 621 631 644 0 87 30 885 902 891 885 899 872 - 253 337 334 599 489 593 659 484 578 644 511 645 590 503 517 542 521 545 517 527 511 524 518 529 517 535 527 524 523 500 519 552 506 169 191 168 179 195 168 189 182 182 192 95 86 96 122 75 32 42 43 151 108 68 65 21 96 91 80 114 68 659 648 673 608 668 630 646 629 643 654 87 0 79 964 981 970 963 977 951 - 190 275 277 644 530 642 704 524 619 691 564 690 629 424 439 463 443 467 439 448 432 445 439 450 438 457 449 445 445 422 440 473 427 232 261 237 250 262 234 253 251 248 264 56 23 50 138 53 58 98 42 130 35 81 91 58 25 60 131 83 83 620 612 637 572 630 590 613 594 605 618 30 79 0 885 902 892 885 899 872 - 748 690 715 1399 1288 1415 1454 1278 1361 1454 1365 1440 1360 461 446 424 443 419 450 438 453 442 447 435 447 429 437 440 441 464 449 414 458 1099 1136 1112 1127 1132 1105 1119 1125 1118 1140 885 880 880 951 905 941 972 925 887 856 935 947 944 868 893 990 884 936 775 804 813 794 798 764 836 815 783 803 885 964 885 0 17 11 28 14 19 - 764 706 732 1414 1304 1431 1469 1294 1376 1470 1381 1456 1376 478 463 441 460 436 467 455 470 459 464 452 464 446 454 457 458 481 466 431 475 1115 1152 1129 1144 1149 1122 1136 1142 1135 1157 902 896 897 968 921 958 989 942 904 873 952 964 961 885 909 1007 900 953 787 817 825 807 810 777 849 828 795 816 902 981 902 17 0 14 33 6 33 - 756 698 724 1401 1291 1418 1456 1281 1364 1457 1369 1443 1363 468 453 430 449 425 456 444 460 448 453 441 454 435 443 447 447 470 454 420 465 1104 1141 1118 1133 1138 1111 1124 1131 1124 1146 892 886 887 959 912 947 979 932 895 863 942 954 950 875 900 997 891 943 786 815 824 805 808 775 847 826 794 814 891 970 892 11 14 0 38 15 30 - 743 682 707 1407 1296 1423 1463 1286 1370 1462 1372 1450 1370 461 446 425 444 419 453 439 453 444 448 435 447 428 437 440 441 464 451 416 457 1100 1137 1113 1128 1134 1107 1121 1126 1120 1141 883 878 878 947 902 941 970 925 882 855 932 945 943 867 890 987 880 934 755 785 793 776 778 745 817 796 763 784 885 963 885 28 33 38 0 27 19 - 760 702 727 1413 1302 1429 1468 1292 1375 1468 1379 1455 1375 475 460 438 457 432 464 451 467 456 461 449 461 442 450 454 454 477 463 428 472 1112 1149 1126 1141 1146 1119 1133 1139 1132 1154 898 893 893 964 918 954 986 939 900 870 948 960 957 882 906 1003 897 950 782 811 819 802 804 771 843 822 790 810 899 977 899 14 6 15 27 0 28 - 733 674 699 1391 1280 1407 1446 1270 1353 1446 1356 1433 1353 448 433 412 431 406 439 425 440 430 435 422 434 415 424 427 428 451 437 402 445 1087 1124 1100 1115 1120 1093 1107 1113 1106 1128 871 866 866 937 891 928 959 912 872 843 921 933 931 855 878 976 869 922 756 785 794 775 779 745 817 796 764 784 872 951 872 19 33 30 19 28 0 - 0 0 264 1 0 0 1 0 8 0 0 0 29 0 5 52 0 0 0 0 147 0 0 0 0 0 16 42 1 0 0 0 1 77 0 1 0 14 0 1 2031 67 0 1 1 0 1321 0 0 540 186 4256 0 0 1185 0 53 5 29 268 0 0 0 0 79 0 424 0 0 0 3957 0 0 88 24 103 58 0 57 0 - 16 0 0 0 0 0 0 36 0 0 0 0 6 0 835 2 2 0 0 0 0 8 0 0 713 15 37 0 0 0 0 0 0 3 0 1537 37 306 0 0 2985 0 0 3026 0 0 0 0 98 0 1056 688 144 0 164 834 41 0 0 0 0 0 6341 4 0 1 0 5 179 2 0 0 171 870 2 22 0 2 0 0 - 0 101 0 132 832 18 0 0 149 7722 0 0 528 0 9 3 0 0 1089 623 66 0 0 0 118 0 0 0 0 0 0 0 152 42 0 1078 0 1 676 0 310 0 0 106 0 2732 0 0 0 0 0 0 533 0 0 33 1041 0 0 5 297 1 0 0 0 0 0 0 0 0 1 6584 0 404 10 2 51 0 0 0 - 347 0 678 0 0 0 0 0 0 0 0 0 3068 0 0 2622 862 202 0 0 0 828 0 0 0 0 0 760 17 0 0 0 0 2052 16 0 18 0 0 29 1 0 0 0 225 0 0 0 0 0 3310 0 0 2 0 0 0 230 0 0 0 0 4 1698 2613 0 8 38 55 5 0 0 0 0 0 0 0 0 0 29 - 2916 0 0 0 0 0 0 0 0 0 0 175 0 2569 0 361 11 2711 1 0 0 6664 6 95 0 0 0 38 327 0 0 0 0 73 521 0 0 4669 45 0 0 0 4 0 5 224 0 6804 0 20 0 0 3 0 1 0 0 0 41 0 6878 165 7270 0 0 7 0 27 0 153 0 5 21 0 0 0 28 0 0 7218 - 7 76 1360 0 3016 0 977 0 21 2421 0 25 548 0 22 92 79 0 304 0 0 10 95 0 0 2313 0 3514 6 62 0 32 0 6 26 152 166 0 0 23 0 0 0 11 0 0 0 0 31 1 0 0 0 0 4179 0 118 0 0 0 0 0 102 0 0 0 0 0 0 1 147 4 0 5 0 0 46 0 3345 0 - 39 0 3621 1 0 0 0 1 0 113 0 10 0 0 46 0 155 0 2 2 0 0 0 6496 0 3 104 2142 0 7270 0 4391 954 0 5 56 8 2510 104 6594 0 0 0 0 0 24 0 0 0 0 0 20 0 3 3924 0 134 0 0 0 0 0 0 0 1 2 27 0 0 1 0 0 0 0 0 0 0 16 4096 50 - 0 7574 0 0 1475 4 1 0 0 3539 0 2978 0 0 0 0 4 672 0 0 0 0 884 0 0 15 0 0 122 840 0 0 0 42 0 0 0 2 0 0 0 0 6070 0 1 0 0 0 0 309 0 0 658 0 315 0 570 5 0 149 0 11 0 7993 0 0 27 0 0 0 0 370 0 0 28 0 0 80 0 0 - 6545 309 1 0 2001 0 6706 0 0 914 1302 0 0 0 12 0 0 0 4 8 0 0 0 1021 85 0 0 4350 116 306 1 580 0 0 0 0 0 1 27 1 1 18 382 0 0 94 0 126 5551 0 41 0 0 0 0 38 210 1 0 0 0 3 8 66 702 0 0 3720 0 5295 1489 0 1096 2 1 28 0 4942 0 59 - 0 17 225 3 0 6 4563 0 0 0 24 0 0 824 0 4 0 0 355 0 2 219 7697 11 0 59 0 804 0 0 48 3078 0 0 605 3 0 1430 4 163 0 0 1 0 0 0 59 0 419 0 44 10 7526 0 0 309 3 0 0 0 0 0 0 143 0 0 0 63 1 0 34 0 1 0 0 0 0 0 0 1 - 0 0 0 0 0 14 0 0 0 0 0 5789 0 1 0 1165 0 1 2 0 21 0 525 1080 0 0 0 49 309 0 0 0 0 0 0 661 0 0 0 69 3 0 0 0 58 0 68 0 0 0 0 0 0 0 9 77 0 0 133 0 0 1 135 2201 0 92 1273 0 0 79 621 477 26 5162 0 0 0 0 271 0 - 0 0 0 0 2909 0 0 769 20 1725 0 0 0 205 0 33 0 1 0 0 1 0 9 874 0 0 0 1 1 0 93 3 0 0 6 0 0 0 0 0 0 296 175 416 0 0 0 0 0 2 0 20 1 0 1 297 0 0 53 0 0 576 1 8 0 0 7 0 0 0 5229 0 0 0 162 0 0 2 6878 46 - 33 2022 3 0 35 0 275 0 0 5966 0 13 0 5 19 0 0 38 3571 0 0 0 1060 2276 114 5 0 915 0 0 0 0 802 7983 1 212 548 1719 0 80 0 0 0 1 0 3 0 1 4 1 624 2 0 731 0 927 1 36 119 0 112 0 0 0 0 1347 0 0 0 20 46 37 69 0 2477 1 0 3826 16 0 - 432 5937 0 4420 940 2 0 0 466 1 0 1117 0 0 0 0 0 4 273 2 0 2 609 0 0 0 0 165 5030 8 0 36 0 579 0 18 0 0 0 0 0 225 0 0 3354 0 0 0 39 58 0 0 0 0 2 5433 0 0 31 0 0 0 1 0 27 0 1 0 77 0 0 0 65 2831 2 0 0 0 0 0 - 0 219 0 0 0 0 0 0 70 7888 0 0 0 0 0 11 0 0 0 0 1626 3338 0 5083 91 0 0 5297 0 44 0 0 40 0 13 2 0 614 1 1 1006 346 0 16 0 0 1 0 0 4255 1930 863 0 0 0 40 0 1 0 0 5 3 0 3371 2557 12 3 0 0 1227 0 0 0 2 423 0 0 0 1540 6 - 0 1392 0 0 2184 0 447 0 0 5 0 0 0 0 0 0 3450 3 115 0 4 0 53 37 994 0 0 3713 438 9 0 1 0 24 0 1148 0 19 0 0 0 0 7 0 499 0 0 0 0 571 2510 24 0 0 0 58 0 0 202 2 0 991 1 0 0 0 0 0 0 0 5 0 9 0 0 0 0 52 0 0 - 0 4748 11 0 0 3749 0 0 0 28 17 2636 4651 770 8 0 0 4132 0 0 0 153 131 6344 0 0 0 79 7269 0 117 0 0 985 513 0 0 0 0 3 0 5 1812 77 1066 0 130 4354 0 0 0 36 0 1715 0 0 174 31 0 14 1 0 2 0 0 1093 0 0 0 815 13 0 0 6 59 0 0 0 0 878 - 0 0 1266 353 0 6573 0 0 0 0 0 0 10 1 0 1 0 0 866 0 0 0 0 0 0 0 5 4353 0 0 0 0 0 0 0 948 0 2 63 0 0 449 28 0 0 517 0 0 13 0 2 3 300 62 0 1 2130 0 0 0 18 5740 3 0 488 2615 0 0 38 0 68 150 0 0 0 0 0 1 5 0 - 0 0 48 0 0 6153 6 0 0 0 0 0 2 0 1005 0 0 31 0 0 0 0 1 6536 440 128 21 0 0 0 0 0 0 1 0 0 0 0 0 28 0 45 89 0 0 0 0 3 0 0 10 0 0 0 83 0 0 0 519 0 1 0 0 0 6 1 0 0 0 19 0 0 268 0 0 0 0 2 0 2631 - 18 0 3 3 0 0 0 0 2164 0 302 52 23 33 0 803 3283 156 461 0 0 0 0 0 161 0 2352 2603 0 78 0 8 67 0 66 0 0 0 1 0 0 136 0 0 53 0 0 0 2 0 0 0 73 0 0 160 0 1 0 0 4 2 2705 145 0 55 0 0 0 280 0 10 146 1644 0 3 0 2 0 0 - 0 7293 1 0 4 0 71 7 0 825 17 813 65 1 11 174 4204 17 0 2817 0 1721 1 0 64 62 0 18 8 0 0 0 3914 0 36 0 0 99 0 23 0 18 139 2 806 0 0 8 0 2 74 0 0 0 0 0 0 0 0 0 0 499 0 2 55 0 0 4329 0 0 0 0 7 0 0 1483 107 6 8 0 - 114 0 0 0 1055 0 2938 0 0 0 7403 0 1511 0 1447 1867 4 827 0 893 381 0 17 39 95 5697 916 1237 406 0 1 2345 111 0 0 0 0 1868 340 3591 0 15 0 0 1135 0 0 2 0 1 0 0 0 0 0 0 0 0 0 0 23 0 1 0 0 0 3 10 0 0 0 10 2 11 0 894 21 0 0 797 - 1650 0 3531 0 0 985 259 1140 0 630 172 0 123 16 0 0 0 0 307 0 88 0 0 0 0 6892 0 0 1798 4 0 0 0 1 0 0 0 0 0 20 0 77 29 18 0 1 5 7454 0 1654 0 0 0 0 1 0 0 1 0 0 0 0 0 382 0 0 306 1738 12 94 0 0 2370 3590 0 0 1 0 0 0 - 0 24 0 30 0 2629 0 0 962 179 500 0 36 752 1 0 0 714 15 0 0 167 0 0 2 0 157 0 3195 1467 0 0 2699 0 0 145 11 689 2 0 7783 0 699 6473 0 5740 1 96 0 0 21 733 5420 209 0 0 0 0 0 179 0 0 0 1 0 10 4993 0 2 7 0 2 0 0 0 0 2771 0 0 0 - 14 25 12 543 24 883 299 3 0 0 0 0 0 2154 16 1521 0 0 0 0 9 0 0 6859 0 12 2 0 4390 226 0 0 215 0 0 4 16 7 0 0 66 1143 141 0 15 0 0 0 0 0 0 709 0 0 7755 0 0 3 0 81 45 0 3272 0 0 0 0 0 0 0 1401 0 0 0 0 0 0 0 1043 71 - 28 249 0 0 653 0 0 12 0 0 0 1 0 0 1910 7154 110 284 1 0 0 0 0 0 0 0 0 369 0 0 9 0 826 0 7 0 0 0 1913 0 0 3 115 346 0 1 0 2266 0 0 896 0 0 1 0 0 0 91 0 9 0 0 3 282 0 0 0 0 0 0 6659 0 6401 135 0 0 0 0 0 1021 - 0 7 0 5345 0 7 1 0 0 0 0 61 1 3681 0 2 6602 0 0 0 715 0 0 1 226 0 0 3 0 0 0 0 7 826 0 1 0 0 324 15 1 0 0 0 0 0 1036 3328 0 15 0 1 626 0 1 9 0 4 55 0 1 0 0 1090 1 7 7991 0 16 0 2 32 0 0 1823 0 3425 0 1 0 - 1 0 0 1 12 11 0 0 0 0 2 0 0 0 0 0 0 0 0 0 1024 1 1 0 0 8 5 0 37 0 1 495 1259 1 40 0 0 0 0 1760 0 0 0 0 0 0 1091 271 0 0 0 0 0 0 0 0 3 0 0 4 0 43 3197 0 55 46 0 0 0 186 29 0 0 299 0 0 0 1 3280 0 - 0 0 0 0 0 0 0 1 0 0 4 0 1762 0 0 8 0 0 54 599 4 57 0 3051 136 0 0 1 0 2056 0 0 5211 6 0 0 1124 6 0 8 1 0 2 3 0 0 410 0 6272 0 0 41 41 0 244 279 0 2 0 47 7679 1188 2598 0 0 0 0 7 0 20 10 0 0 0 0 0 305 0 4 0 - 0 0 0 0 0 0 0 253 1 0 0 0 0 0 0 0 1 0 0 0 8 0 0 0 2 0 98 1 2 0 44 0 0 0 0 0 6 6 0 0 0 0 0 3960 0 3128 2598 0 0 3 0 0 0 0 0 42 0 9 1 0 0 0 396 0 915 481 0 1 0 3 0 0 0 0 0 0 1 0 0 267 - 1128 0 0 1 0 50 16 0 673 4 861 4 0 1 0 0 0 136 6860 160 22 0 0 1 0 0 0 0 0 0 0 0 0 0 34 0 0 0 4750 0 0 0 0 0 0 0 0 73 2534 0 3875 0 0 2028 83 89 0 0 0 85 1 29 166 0 0 231 2 0 7 0 0 8 570 0 0 6839 0 21 108 0 - 7 6161 9 2 1 205 0 0 2 4215 15 0 0 0 0 0 0 1 120 25 228 0 2669 0 0 0 0 0 0 369 2 0 0 0 0 195 19 2760 0 2258 6399 2 1 8 592 0 36 34 9 0 0 0 1181 86 0 46 0 16 0 0 60 1 0 0 3155 0 516 0 388 1 0 0 0 0 0 0 1 0 1 833 - 1 2 0 1 0 0 7 1 185 0 0 10 21 0 13 15 5647 0 1 122 3 1239 0 0 0 0 0 1 0 0 3 0 0 0 0 0 0 4546 0 1 13 0 30 3629 0 1 0 0 0 148 1 199 6319 0 0 118 0 368 3 1457 1631 0 0 0 0 0 7535 0 1656 43 0 3 0 0 0 1 0 0 0 68 - 0 0 5 130 0 3082 1 1 0 845 0 10 166 92 0 0 386 0 1 6855 0 933 0 0 0 8 14 0 0 0 0 0 1 0 0 0 59 0 0 156 277 7 4280 0 35 0 0 16 0 0 76 0 16 0 0 1 0 0 0 0 0 0 0 21 0 85 0 2926 851 0 0 0 0 143 0 5 647 0 0 0 - 0 0 0 0 116 1 148 1 0 647 0 0 0 0 1131 2956 8 0 0 0 11 121 1 0 521 0 4 0 147 0 91 150 3556 28 0 0 0 0 0 0 3 0 1 0 1 0 0 0 0 0 0 2108 0 0 9 0 11 0 0 0 0 23 0 88 5791 0 0 3418 0 0 0 0 435 0 1 0 0 0 0 0 - 357 139 0 0 0 2705 334 787 0 51 6045 0 173 0 1 0 0 1 0 28 11 0 1082 0 0 0 0 33 0 7 0 173 0 2 186 0 33 0 0 6 5600 55 53 17 0 0 14 1762 0 0 0 2289 0 0 0 0 3507 0 0 1 7771 0 2 0 45 228 0 262 0 0 17 4 0 0 6198 0 0 0 6 0 - 0 0 1796 0 1 13 0 0 0 0 0 0 277 0 73 0 0 0 0 165 7814 0 8 33 0 0 0 7 981 72 0 0 0 0 0 440 0 28 1 0 0 0 0 0 0 15 0 288 1494 0 0 0 43 0 7094 0 1099 0 0 0 0 5 2 0 0 0 216 1 0 0 10 0 9 0 0 14 3496 98 0 223 - 4976 0 0 0 0 1 245 0 0 0 0 0 1767 22 0 260 0 68 3 1 0 0 0 0 0 12 5 0 11 9 0 0 42 1351 0 0 169 0 0 0 451 94 36 2888 209 147 0 0 0 0 0 3 34 0 0 0 0 0 0 54 329 0 0 26 81 0 1 2 0 0 0 0 351 0 1170 66 38 2 0 1 - 3 0 1 1 25 18 0 0 0 2 240 0 165 18 0 5 0 0 278 0 43 798 2545 0 0 1 33 549 0 0 0 0 1629 0 0 0 26 0 0 0 0 9 2345 2 0 0 1544 0 0 0 0 91 0 0 0 0 0 0 0 400 0 7422 849 0 0 0 0 0 218 0 81 0 321 0 0 2143 1197 110 1 0 - 445 483 0 3 0 0 57 5 1 2 0 0 366 756 0 6 0 0 36 238 2 0 1 0 1782 0 0 7994 6 0 0 0 0 0 0 0 0 32 0 0 0 0 0 0 2 17 0 0 255 31 1 0 0 1940 2586 0 0 0 9 0 1 0 269 0 1684 111 0 236 0 0 6311 0 0 98 0 1065 0 0 64 93 - 0 36 0 8 7892 227 305 0 141 1406 0 47 148 9 0 5 6 0 6 0 0 0 74 0 39 11 0 0 169 63 0 0 0 0 0 0 1677 2 0 401 0 33 0 1909 4 1 21 0 0 0 0 0 3 8 0 3 1 0 5987 57 23 6041 6 151 134 0 0 0 209 0 267 561 0 0 22 0 454 11 1 0 - 11 247 1 9 0 0 0 0 0 0 0 0 0 179 2 0 1505 561 291 0 3183 0 9 0 20 0 0 0 0 65 6 0 0 0 0 0 0 0 0 0 0 0 0 494 0 1 124 3826 92 0 167 78 0 0 0 0 2 107 0 3604 2096 192 2 4 6 5 1399 6057 2 34 0 20 0 0 0 0 0 24 0 0 - 13 1535 257 21 25 2 0 0 0 0 2 0 1 0 17 0 43 2 234 0 0 10 4 129 7 1617 19 0 14 1 13 0 0 0 0 9 0 0 383 0 1 0 0 11 0 0 590 1480 0 714 0 0 1030 0 1 3 0 3019 3 27 0 0 0 2 0 675 0 74 102 0 0 0 394 0 0 0 0 0 2 3939 - 0 0 0 0 0 4544 0 0 0 4 28 0 436 257 9 0 0 0 0 0 253 63 3 0 0 0 0 0 0 187 1 0 0 0 3160 7 3 0 0 0 72 430 0 0 0 0 1 6638 3 0 1441 72 0 131 0 0 4 0 0 234 2071 1674 0 0 340 0 490 39 1065 0 1 0 237 0 1949 0 0 0 24 146 - 0 0 79 0 0 0 0 0 0 0 0 804 742 1 1113 2 0 0 22 0 0 1 0 0 271 2279 218 2 1 993 1 0 0 0 180 45 1043 74 24 0 0 0 0 0 0 0 50 6 4238 217 0 0 7 1 0 0 10 0 0 2 0 0 0 0 1 0 0 21 4 0 43 0 0 0 1 3484 0 1 0 0 - 0 7145 586 0 0 0 0 0 0 0 0 180 0 23 0 0 0 0 1880 685 25 0 54 0 21 21 0 0 0 7556 3 0 225 67 0 1 84 0 15 0 0 76 0 0 0 0 0 0 333 0 5133 0 0 0 0 0 0 11 0 4929 0 85 0 0 5 0 3 2 16 167 348 0 0 0 0 9 0 0 0 0 - 1 1 0 0 54 0 6 0 23 0 57 0 0 7688 408 1 110 2671 0 6 36 1 35 0 5 0 0 0 0 1230 0 0 661 707 0 0 0 0 0 0 26 0 0 0 0 0 0 6079 0 1 0 0 10 301 123 2238 0 70 149 0 0 0 149 0 0 1 551 11 0 0 0 16 205 159 116 0 0 0 212 0 - 0 296 47 422 4 140 0 0 113 352 5010 7 0 0 113 0 0 716 0 0 0 0 109 0 0 4157 0 0 4 0 1 2914 50 0 1 0 1118 142 0 7041 3 2358 790 0 0 79 0 0 0 0 0 0 0 0 560 11 0 0 0 4 10 0 0 62 0 0 0 1 150 34 344 1 0 1 0 0 0 0 0 0 - 0 0 4 0 7 6 25 0 5428 2764 0 89 123 0 1660 7797 1 0 1 0 2982 0 0 0 125 0 9 352 0 0 15 4499 0 0 1 0 0 0 98 0 4 19 4742 2 0 0 7787 1 0 0 769 0 0 2 5613 0 2015 188 0 0 0 7 47 0 974 0 0 0 0 976 0 2302 0 0 0 30 9 0 0 0 - 0 0 3 94 0 0 0 0 5 0 0 0 0 0 0 696 0 50 0 0 0 0 0 0 0 205 0 0 0 8 0 0 0 0 0 0 3 0 2 10 0 1 1 487 2039 0 0 966 1564 0 0 117 0 0 614 0 0 1477 0 0 0 2 0 0 0 0 0 606 0 0 0 1 0 0 0 0 0 0 24 0 - 5 0 0 7868 0 367 229 121 0 0 0 8 0 0 7242 0 10 1 195 314 0 6779 9 0 0 2178 0 0 0 55 0 3 0 1 0 639 0 1364 27 5 0 1708 0 0 0 3 750 539 1047 418 0 2040 0 0 0 36 0 0 0 31 0 0 0 0 0 3 0 411 1806 0 0 7 0 2 0 0 0 2193 4 0 - 0 251 0 0 5 0 0 13 0 0 69 0 7914 6063 0 0 2121 379 0 0 2 0 3460 309 0 0 42 1 4739 0 236 53 54 0 0 0 0 1 6 0 120 0 0 38 0 5 1 0 0 116 0 0 0 71 116 0 0 12 0 0 0 0 0 3 0 2 688 430 0 10 2 0 138 0 3 0 0 0 0 0 - 0 6179 1042 5334 0 5 4603 2575 0 1 4 1 0 6 0 101 435 935 5 2 0 0 31 0 0 0 1 0 92 0 0 0 182 1457 0 0 0 1 86 0 0 0 0 0 45 0 12 199 2 2351 34 8 0 0 0 0 0 0 92 0 112 11 129 2 0 0 0 0 0 0 1 0 29 0 0 256 0 1943 0 0 - 42 0 0 0 1993 0 0 0 0 0 306 0 0 614 1 1206 1 21 2 2 0 11 0 0 10 0 2058 6356 0 3104 3405 5 0 0 263 0 0 0 0 0 698 283 1 0 0 7 2461 1 339 0 0 55 0 0 0 268 0 55 2333 34 0 0 234 0 0 0 186 1 0 0 253 0 0 0 0 648 0 2059 0 4 - 41 0 0 0 0 1 16 0 0 0 0 0 0 1 3 44 0 47 1302 2041 0 0 0 2 2039 47 0 753 0 0 0 0 1119 0 274 0 981 0 0 0 924 0 0 0 0 4 0 0 0 128 0 0 0 0 0 3 0 0 0 486 0 0 69 0 8 1900 80 0 1 0 0 2 0 0 0 0 0 0 238 2779 - 0 0 0 1 0 4 1248 11 2 0 0 0 0 28 0 1 150 0 4 1617 560 0 0 111 316 64 371 6724 0 844 0 0 742 1 0 0 4115 0 33 0 0 0 0 0 7 4 74 0 426 1 0 0 0 0 151 0 83 18 0 27 0 0 1061 328 0 1 0 1 28 0 2189 0 5770 1 1 0 0 0 1 0 - 0 7281 0 0 0 0 0 0 0 66 81 2891 2 0 0 0 0 10 0 2 0 0 0 0 812 1446 0 0 19 3549 0 0 2 0 3 0 2689 0 3963 2 0 0 11 6 0 0 1 2 0 0 101 0 257 0 0 0 0 0 5 0 0 4 0 0 711 13 0 0 0 0 58 0 0 39 1 513 0 1 11 0 - 90 411 15 0 0 0 1293 289 4946 313 2 14 0 0 0 68 0 2 0 4429 0 0 0 1 0 1 0 168 0 123 5577 2 7 0 0 0 0 0 0 0 10 0 0 0 301 0 0 841 0 0 0 0 0 0 350 0 98 0 494 602 0 0 93 627 537 0 0 136 1603 0 0 4656 40 0 0 0 0 0 56 0 - 0 0 809 3 206 0 272 0 0 0 35 0 0 0 3090 1 3440 0 0 17 38 24 0 1582 126 0 0 0 28 0 71 270 564 0 0 0 727 232 55 2 2 341 0 89 8 0 0 1288 55 0 0 0 0 1 0 2127 0 0 0 0 0 16 3 3 2 1831 7 5919 0 1 0 151 0 0 0 0 1 0 375 0 - 0 0 0 15 0 1250 0 26 0 0 2 1 0 127 3639 0 124 0 0 538 0 0 851 0 0 0 0 56 0 470 0 19 0 0 46 0 0 0 0 2575 0 0 0 75 0 0 106 36 1319 0 0 0 0 0 809 0 0 3912 74 0 0 0 4 0 33 2 0 1 0 1 1 44 1 34 0 0 10 501 0 0 - 0 0 3726 0 0 0 0 2 958 0 1 0 512 8 0 3960 1319 0 903 0 49 12 0 0 0 8 8 0 0 0 156 16 0 84 0 10 0 0 4 2 370 0 0 0 8 2 0 8 0 0 0 238 0 3949 389 2 0 0 0 1 0 0 0 3502 0 0 0 0 0 0 5 3 1325 9 0 7 0 0 7998 0 - 0 0 0 0 123 86 12 191 0 1 0 0 0 192 5368 0 0 0 4116 0 0 0 0 0 16 1 0 13 0 0 3925 0 1164 0 0 0 1 1 1 7 1 0 0 0 0 2 1678 0 5 294 1 0 56 0 0 0 2 7213 0 0 209 0 4077 0 5239 660 12 0 0 0 0 60 0 0 4013 0 0 0 0 0 - 876 0 901 8 0 2 0 223 0 3 26 3638 0 0 0 167 0 0 6 1 0 0 154 6877 4 0 2 1 0 3613 509 0 0 1 7192 242 0 1 0 0 11 4928 0 1750 2814 1117 1206 20 2 0 0 0 0 1 0 1025 47 0 0 1088 0 41 0 0 4 307 20 0 2 0 38 0 338 0 0 49 0 2101 480 0 - 0 385 0 56 2127 0 1334 562 0 0 2 0 0 0 0 23 0 0 0 0 0 0 70 28 0 0 1949 0 1037 0 24 0 379 0 21 0 0 0 2743 0 24 0 0 2378 0 0 695 0 0 0 1 1 0 47 0 0 0 0 0 0 190 0 0 0 0 87 0 94 62 489 17 0 0 0 0 0 1 0 0 0 - 135 2 0 336 0 0 0 27 0 0 0 0 0 0 0 218 0 0 1772 11 0 0 1619 0 0 0 7 0 0 0 7 4414 1543 0 1718 0 1027 5 0 0 0 1532 11 985 0 3527 0 0 0 0 0 0 1 1 1 0 6 0 97 0 3 0 0 3 0 0 0 0 0 0 3 1 6037 0 541 0 0 0 0 0 - 0 1077 0 2 0 1 0 1050 1 783 174 7526 0 1 0 0 0 0 0 872 10 1991 25 0 204 0 91 14 0 0 0 0 31 3812 1530 26 0 0 3 11 40 135 0 3 7204 0 7191 91 0 2 0 0 2 35 0 83 0 6 0 0 6072 1 2178 0 486 0 229 1898 0 0 0 0 0 0 0 1 0 134 0 5236 - 0 0 0 4 36 18 0 0 0 8 0 175 0 0 0 0 6 0 0 0 97 1 0 0 4898 0 0 7953 12 0 0 0 3270 5 6 0 5 16 0 5 910 51 806 1238 336 36 0 394 48 35 0 0 0 121 0 228 0 82 0 109 0 1 0 0 0 4 0 0 146 2202 1 0 4513 1668 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 77 2 0 0 0 44 0 8 0 0 0 2496 0 204 0 0 3074 1 16 1261 0 0 0 0 0 0 0 0 728 0 0 0 0 0 0 4399 0 0 0 0 0 0 0 0 0 116 2 0 0 0 0 0 0 0 0 0 0 0 9 0 185 12 4 0 - 0 0 0 0 5 0 0 503 0 0 0 0 56 510 8 0 2959 0 1565 1391 3790 0 3 0 0 29 1885 22 97 0 0 7248 35 0 0 0 0 0 0 0 0 0 142 0 0 0 0 9 0 140 0 0 7393 5450 0 4 7024 444 0 458 19 4 0 0 0 322 0 0 0 2572 0 37 3 1948 0 0 3 8 0 0 - 0 0 2938 1986 3677 0 4796 0 2 0 0 0 0 5545 0 0 1522 0 1933 0 0 0 24 0 3135 1 391 1 117 153 18 0 1101 73 3244 43 6 17 0 3 0 3430 0 0 0 0 0 83 6 0 0 0 48 76 2 0 101 0 0 0 1 3497 0 0 0 14 0 0 5 0 0 0 0 0 0 0 0 0 1 36 - 0 0 0 1 0 2 1412 0 1673 7 41 251 0 543 0 61 21 0 0 0 0 0 5034 0 0 1 468 5 0 9 0 0 0 1243 65 1 1 0 0 10 0 0 0 0 0 7 0 274 0 24 8 0 0 124 6 0 1 5132 0 1 5 598 0 1 0 3 0 0 152 0 0 63 0 0 1175 0 0 0 1485 321 - 0 0 318 0 0 0 1468 14 0 0 0 3426 0 7 0 7 1915 611 162 4 39 0 1170 250 0 0 217 0 0 0 0 0 4 0 0 0 0 0 1061 1011 15 10 0 12 0 1 3 3 0 0 0 1 0 414 4 43 0 0 5529 0 101 0 77 0 5328 7 0 0 0 0 3 0 0 0 0 5670 0 1500 0 0 - 1 566 71 0 1 4 0 2144 0 0 0 0 266 0 37 1575 0 0 0 0 7 5826 5596 0 0 0 0 4 196 17 1069 0 159 0 0 294 0 920 0 81 284 267 21 0 1 5 0 0 1 8 0 0 2753 0 0 16 0 0 0 0 0 0 1 0 0 0 0 8 0 0 0 0 0 0 9 0 367 0 0 0 - 81 1402 37 19 142 0 53 0 0 4 0 131 242 0 1308 7556 1 0 0 353 0 2 391 0 1374 0 0 5 0 0 0 204 1471 0 0 366 0 0 0 3 0 0 0 1 3673 1 1 13 19 0 0 0 0 7 1 1 0 255 11 45 126 0 0 0 0 613 0 336 0 0 136 192 538 0 0 0 0 0 4155 8 - 0 0 0 0 0 705 0 0 0 0 0 93 0 0 0 2381 0 2 44 140 0 0 1 0 0 33 12 0 0 1 0 0 2 0 0 0 3073 0 1430 2802 2 16 0 0 380 0 0 631 0 0 3 0 0 769 2281 0 209 7 24 0 0 0 0 0 0 0 2 0 55 0 2 4593 0 0 0 171 1584 4255 4385 2110 - 0 0 3770 0 15 27 0 22 138 11 12 46 98 71 0 11 0 0 0 0 0 0 0 0 0 1 7019 0 721 0 0 2 255 0 4 0 0 0 6012 7347 0 23 0 0 4 0 0 0 0 0 0 0 335 0 0 7249 692 4726 0 0 897 0 0 0 0 0 0 17 712 620 0 0 0 0 0 0 415 0 0 2223 - 2984 1162 0 14 0 0 476 0 0 0 261 6 312 5521 695 0 1 0 279 0 0 7 0 381 0 234 20 0 0 0 132 0 0 2 0 5715 0 46 0 11 2003 0 2 0 7 0 1459 0 0 0 0 25 0 14 0 0 0 1588 0 0 0 0 59 1 129 1 0 872 0 3789 0 10 0 6 11 0 0 1 148 0 - 0 0 0 0 0 0 1 19 0 0 7309 0 0 0 0 18 0 3511 7586 1 0 80 0 0 2 0 157 21 1008 3785 0 33 0 0 0 150 0 0 71 0 0 5670 0 0 0 0 0 0 0 127 0 0 3784 0 35 30 0 0 988 0 23 0 1 559 0 1 834 137 0 0 5 101 536 7 0 7810 752 0 160 22 - 0 1085 16 0 0 283 1 0 2948 0 73 721 0 0 0 1 0 0 0 0 0 262 0 0 152 2 203 82 0 2 0 0 0 0 0 217 0 14 569 3979 5 12 296 11 0 0 3 22 0 1 0 3 16 0 2349 0 610 0 0 0 0 0 0 15 100 0 0 0 0 1021 417 0 0 877 1 0 0 1 0 51 - 293 0 2 0 0 19 0 6772 331 2 0 0 1 0 0 1 431 0 0 0 0 854 0 892 0 813 1152 1 429 455 0 0 0 66 4428 0 1 0 0 33 0 4549 5714 0 0 912 0 20 0 1392 0 0 0 0 0 14 0 0 750 0 2 0 0 0 0 0 0 0 56 0 1012 118 257 0 347 253 32 6 0 0