Merge branch 'master' of ssh://eodev.git.sourceforge.net/gitroot/eodev/eodev
This commit is contained in:
commit
f8202d238a
496 changed files with 8734 additions and 8186 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
The Evolving Distribution Objects framework (EDO) is a template-based,
|
||||
ANSI-C++ evolutionary computation library which helps you to write your
|
||||
own estimation of distribution algorithms.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
############################################################################
|
||||
##########
|
||||
### 1) If you want to set your own variables in install.cmake and avoid the cmd line
|
||||
######################################################################################
|
||||
### 1) Set the application properties
|
||||
|
||||
INCLUDE(install.cmake OPTIONAL)
|
||||
|
||||
######################################################################################
|
||||
|
||||
######################################################################################
|
||||
### 2) Project properties
|
||||
######################################################################################
|
||||
|
||||
# Checks cmake version compatibility
|
||||
|
|
@ -16,15 +25,12 @@ SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT
|
|||
|
||||
|
||||
######################################################################################
|
||||
### 2) Include useful features
|
||||
### 3) Include useful features
|
||||
######################################################################################
|
||||
|
||||
INCLUDE(FindDoxygen)
|
||||
INCLUDE(FindPkgConfig)
|
||||
|
||||
PKG_CHECK_MODULES(EO eo REQUIRED)
|
||||
PKG_CHECK_MODULES(MO mo REQUIRED)
|
||||
|
||||
FIND_PACKAGE(Boost 1.33.0)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
|
|
@ -34,11 +40,16 @@ INCLUDE_DIRECTORIES(
|
|||
# /Dev/ometah-0.3/common
|
||||
)
|
||||
|
||||
LINK_DIRECTORIES(
|
||||
${EO_LIBRARY_DIRS}
|
||||
${MO_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 3) Include header files path
|
||||
### 4) Include header files path
|
||||
######################################################################################
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
|
|
@ -49,7 +60,7 @@ INCLUDE_DIRECTORIES(
|
|||
|
||||
|
||||
######################################################################################
|
||||
### 4) Set compiler definitions
|
||||
### 5) Set compiler definitions
|
||||
######################################################################################
|
||||
|
||||
IF(UNIX)
|
||||
|
|
@ -63,7 +74,7 @@ ENDIF()
|
|||
|
||||
|
||||
######################################################################################
|
||||
### 5) Prepare some variables for CMAKE usage
|
||||
### 6) Prepare some variables for CMAKE usage
|
||||
######################################################################################
|
||||
|
||||
SET(SAMPLE_SRCS)
|
||||
|
|
@ -72,7 +83,7 @@ SET(SAMPLE_SRCS)
|
|||
|
||||
|
||||
######################################################################################
|
||||
### 6) Now where we go ?
|
||||
### 7) Now where we go ?
|
||||
######################################################################################
|
||||
|
||||
ADD_SUBDIRECTORY(src)
|
||||
|
|
@ -85,7 +96,7 @@ ADD_SUBDIRECTORY(doc)
|
|||
|
||||
|
||||
######################################################################################
|
||||
### 7) Create executable, link libraries and prepare target
|
||||
### 8) Create executable, link libraries and prepare target
|
||||
######################################################################################
|
||||
|
||||
SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
|
||||
|
|
@ -99,7 +110,7 @@ INSTALL(TARGETS edo ARCHIVE DESTINATION lib COMPONENT libraries)
|
|||
|
||||
|
||||
######################################################################################
|
||||
### 8) Install pkg-config config file for EO
|
||||
### 9) Install pkg-config config file for EO
|
||||
######################################################################################
|
||||
|
||||
INSTALL(FILES edo.pc DESTINATION lib/pkgconfig COMPONENT headers)
|
||||
|
|
@ -108,7 +119,7 @@ INSTALL(FILES edo.pc DESTINATION lib/pkgconfig COMPONENT headers)
|
|||
|
||||
|
||||
######################################################################################
|
||||
### 9) Include packaging
|
||||
### 10) Include packaging
|
||||
######################################################################################
|
||||
|
||||
INCLUDE(Packaging.cmake)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,6 @@ FOREACH(file ${RESOURCES})
|
|||
EXECUTE_PROCESS(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${file}
|
||||
${DO_BINARY_DIR}/${file}
|
||||
${EDO_BINARY_DIR}/${file}
|
||||
)
|
||||
ENDFOREACH(file)
|
||||
|
|
|
|||
20
edo/install.cmake-dist
Normal file
20
edo/install.cmake-dist
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Variables to set
|
||||
|
||||
# directory we need to build project
|
||||
SET(EO_DIR "<<PATH_TO_EO>>" CACHE PATH "EO directory" FORCE)
|
||||
SET(MO_DIR "<<PATH_TO_MO>>" CACHE PATH "MO directory" FORCE)
|
||||
|
||||
# automagically set parameters, do not edit
|
||||
|
||||
SET(EO_INCLUDE_DIRS "${EO_DIR}/src" CACHE PATH "EO include directory" FORCE)
|
||||
SET(EO_LIBRARY_DIRS "${EO_DIR}/release/lib" CACHE PATH "EO library directory" FORCE)
|
||||
SET(EO_LIBRARIES "eoutils eo es ga cma gcov")
|
||||
|
||||
SET(MO_INCLUDE_DIRS "${MO_DIR}/src" CACHE PATH "MO include directory" FORCE)
|
||||
SET(MO_LIBRARY_DIRS "${MO_DIR}/release/lib" CACHE PATH "MO library directory" FORCE)
|
||||
SET(MO_LIBRARIES "mo")
|
||||
|
||||
# ... or rather use pkg-config (dont forget to comment the code above)
|
||||
|
||||
#PKG_CHECK_MODULES(EO eo REQUIRED)
|
||||
#PKG_CHECK_MODULES(MO mo REQUIRED)
|
||||
|
|
@ -25,4 +25,3 @@ Authors:
|
|||
*/
|
||||
|
||||
#include "edo"
|
||||
|
||||
|
|
|
|||
|
|
@ -60,4 +60,3 @@ private:
|
|||
};
|
||||
|
||||
#endif // !_edoBounderRng_h
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public:
|
|||
//-------------------------------------------------------------
|
||||
|
||||
|
||||
_varcovar.resize(s_size, s_size);
|
||||
_varcovar.resize(s_size);
|
||||
|
||||
|
||||
//-------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -38,4 +38,3 @@ public:
|
|||
};
|
||||
|
||||
#endif // !_edoModifier_h
|
||||
|
||||
|
|
|
|||
|
|
@ -42,4 +42,3 @@ public:
|
|||
};
|
||||
|
||||
#endif // !_edoModifierMass_h
|
||||
|
||||
|
|
|
|||
|
|
@ -44,4 +44,3 @@ public:
|
|||
};
|
||||
|
||||
#endif // !_edoNormalMonoCenter_h
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public:
|
|||
|
||||
assert( Vl == Vc );
|
||||
|
||||
_L.resize(Vl, Vc);
|
||||
_L.resize(Vl);
|
||||
|
||||
unsigned int i,j,k;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ Authors:
|
|||
#include <edo>
|
||||
|
||||
#include <boost/numeric/ublas/vector.hpp>
|
||||
#include <boost/numeric/ublas/symmetric_matrix.hpp>
|
||||
#include <boost/numeric/ublas/symmetric.hpp>
|
||||
|
||||
#include "Rosenbrock.h"
|
||||
#include "Sphere.h"
|
||||
|
|
|
|||
|
|
@ -44,6 +44,12 @@ ENABLE_LANGUAGE(C)
|
|||
### 2) Include required modules / configuration files
|
||||
#####################################################################################
|
||||
|
||||
FIND_PACKAGE(OpenMP REQUIRED)
|
||||
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)
|
||||
|
|
@ -103,7 +109,7 @@ ENDIF (ENABLE_CMAKE_TESTING)
|
|||
### 5) Where must cmake go now ?
|
||||
######################################################################################
|
||||
|
||||
ADD_SUBDIRECTORY(app)
|
||||
#ADD_SUBDIRECTORY(app)
|
||||
ADD_SUBDIRECTORY(doc)
|
||||
ADD_SUBDIRECTORY(src)
|
||||
ADD_SUBDIRECTORY(test)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# NOTE: only add something here if it is really needed by EO
|
||||
|
||||
include(CheckIncludeFile)
|
||||
|
|
@ -28,6 +27,3 @@ check_include_files(stdint.h "stdint.h" HAVE_STDINT_H)
|
|||
# check is to be added to get the proper set of headers. Example :
|
||||
|
||||
#check_symbol_exists(asymbol "symbole.h" HAVE_SYMBOLE)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -233,4 +233,3 @@ operates.
|
|||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
|
|
|
|||
|
|
@ -500,5 +500,3 @@ necessary. Here is a sample; alter the names:
|
|||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
|
|
|
|||
1
eo/NEWS
1
eo/NEWS
|
|
@ -39,4 +39,3 @@
|
|||
* release 0.9.3z.1 (1. Oct. 2005)
|
||||
- Support gcc-3.4 and gcc.4.x.
|
||||
- Provide full automake/autoconf/configure support.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
EO README FILE
|
||||
|
||||
=======================================================================
|
||||
|
|
|
|||
|
|
@ -29,4 +29,3 @@ IF(NOT WIN32 OR CYGWIN)
|
|||
ENDIF(NOT WIN32 OR CYGWIN)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
|
|
|||
|
|
@ -211,4 +211,3 @@ template<class T> T euclidean_distance(const std::vector<T>& v1,
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -36,4 +36,3 @@ SET_TARGET_PROPERTIES(gpsymreg PROPERTIES VERSION "${GPSYMREG_VERSION}")
|
|||
TARGET_LINK_LIBRARIES(gpsymreg eo eoutils)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
|
|
|||
|
|
@ -225,4 +225,3 @@ class RegFitness: public eoEvalFunc< eoParseTree<FitnessType, Node> >
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -335,10 +335,3 @@ int main(int argc, char *argv[])
|
|||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,4 +36,3 @@ SET_TARGET_PROPERTIES(mastermind PROPERTIES VERSION "${MASTERMIND_VERSION}")
|
|||
TARGET_LINK_LIBRARIES(mastermind eo eoutils)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
|
|
|||
2
eo/config.guess
vendored
2
eo/config.guess
vendored
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2004-03-03'
|
||||
timestamp='2011-05-05'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -71,5 +71,3 @@
|
|||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#cmakedefine size_t
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -57,14 +57,3 @@
|
|||
#include <boost/config/suffix.hpp>
|
||||
|
||||
#endif // BOOST_CONFIG_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,5 +19,3 @@
|
|||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -342,13 +342,3 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
|||
#if defined(BOOST_AUTO_LINK_NOMANGLE)
|
||||
# undef BOOST_AUTO_LINK_NOMANGLE
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
// (C) Copyright John maddock 1999.
|
||||
// (C) David Abrahams 2002. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
|
|
|
|||
|
|
@ -106,4 +106,3 @@ class eoAged: public Object
|
|||
};
|
||||
|
||||
#endif EOAGE_H
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ using namespace std;
|
|||
// eoDrawable
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/** eoDrawable is a template class that adds a drawing interface to an object.\\
|
||||
/** 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
|
||||
|
|
@ -61,4 +61,4 @@ class eoDrawable
|
|||
|
||||
};
|
||||
|
||||
#endif EODRAWABLE_H
|
||||
#endif //! EODRAWABLE_H
|
||||
|
|
|
|||
|
|
@ -11,13 +11,14 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
|||
SET(EO_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib)
|
||||
SET(LIBRARY_OUTPUT_PATH ${EO_LIB_OUTPUT_PATH})
|
||||
|
||||
SET (EO_SOURCES eoFunctorStore.cpp
|
||||
SET(EO_SOURCES
|
||||
eoFunctorStore.cpp
|
||||
eoPersistent.cpp
|
||||
eoPrintable.cpp
|
||||
eoCtrlCContinue.cpp
|
||||
eoScalarFitnessAssembled.cpp
|
||||
eoSIGContinue.cpp)
|
||||
|
||||
eoSIGContinue.cpp
|
||||
)
|
||||
|
||||
ADD_LIBRARY(eo STATIC ${EO_SOURCES})
|
||||
INSTALL(TARGETS eo ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||
|
|
@ -42,6 +43,6 @@ ADD_SUBDIRECTORY(ga)
|
|||
ADD_SUBDIRECTORY(gp)
|
||||
ADD_SUBDIRECTORY(other)
|
||||
ADD_SUBDIRECTORY(utils)
|
||||
ADD_SUBDIRECTORY(pyeo)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
|
|
|||
|
|
@ -171,4 +171,3 @@ private:
|
|||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,12 @@
|
|||
#ifndef _apply_h
|
||||
#define _apply_h
|
||||
|
||||
#include <utils/eoParallel.h>
|
||||
#include <utils/eoParser.h>
|
||||
#include <utils/eoLogger.h>
|
||||
#include <eoFunctor.h>
|
||||
#include <vector>
|
||||
#include <omp.h>
|
||||
|
||||
/**
|
||||
Applies a unary function to a std::vector of things.
|
||||
|
|
@ -37,7 +41,76 @@
|
|||
template <class EOT>
|
||||
void apply(eoUF<EOT&, void>& _proc, std::vector<EOT>& _pop)
|
||||
{
|
||||
for (unsigned i = 0; i < _pop.size(); ++i)
|
||||
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<EOT> which is called in parallel
|
||||
thanks to OpenMP.
|
||||
|
||||
@ingroup Utilities
|
||||
*/
|
||||
template <class EOT>
|
||||
void omp_apply(eoUF<EOT&, void>& _proc, std::vector<EOT>& _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 <class EOT>
|
||||
void omp_dynamic_apply(eoUF<EOT&, void>& _proc, std::vector<EOT>& _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]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -570,4 +570,3 @@ eoCheckPoint<EOT>& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@
|
|||
|
||||
#include <utils/eoParserLogger.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
#include <utils/eoParallel.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -80,4 +80,3 @@ virtual bool operator()(EOT& , EOT& ) {return false;}
|
|||
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -90,4 +90,3 @@ private:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -90,4 +90,3 @@ std::vector<double> rates;
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -207,4 +207,3 @@ protected:
|
|||
};
|
||||
|
||||
#endif /*EOCONSTRICTEDVARIABLEWEIGHTVELOCITY_H*/
|
||||
|
||||
|
|
|
|||
|
|
@ -197,4 +197,3 @@ protected:
|
|||
|
||||
|
||||
#endif /*EOCONSTRICTEDVELOCITY_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -68,4 +68,3 @@ public:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -84,4 +84,3 @@ public:
|
|||
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -71,4 +71,3 @@ template <class EOT> class eoDetTournamentSelect: public eoSelectOne<EOT>
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -314,4 +314,3 @@ protected:
|
|||
|
||||
/** @} */
|
||||
#endif // _eoDualFitness_h_
|
||||
|
||||
|
|
|
|||
|
|
@ -44,4 +44,3 @@ template<class EOT> class eoEDA: public eoUF<eoDistribution<EOT>&, void>
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,25 @@ template<class EOT> class eoEasyEA: public eoAlgo<EOT>
|
|||
replace(_replace)
|
||||
{}
|
||||
|
||||
/** Ctor taking a breed and merge, an overload of ctor to define an offspring size */
|
||||
eoEasyEA(
|
||||
eoContinue<EOT>& _continuator,
|
||||
eoEvalFunc<EOT>& _eval,
|
||||
eoBreed<EOT>& _breed,
|
||||
eoReplacement<EOT>& _replace,
|
||||
unsigned _offspringSize
|
||||
) : continuator(_continuator),
|
||||
eval (_eval),
|
||||
loopEval(_eval),
|
||||
popEval(loopEval),
|
||||
selectTransform(dummySelect, dummyTransform),
|
||||
breed(_breed),
|
||||
mergeReduce(dummyMerge, dummyReduce),
|
||||
replace(_replace)
|
||||
{
|
||||
offspring.reserve(_offspringSize); // This line avoids an incremental resize of offsprings.
|
||||
}
|
||||
|
||||
/*
|
||||
eoEasyEA(eoContinue <EOT> & _continuator,
|
||||
eoPopEvalFunc <EOT> & _pop_eval,
|
||||
|
|
@ -191,7 +210,9 @@ template<class EOT> class eoEasyEA: public eoAlgo<EOT>
|
|||
/// Apply a few generation of evolution to the population.
|
||||
virtual void operator()(eoPop<EOT>& _pop)
|
||||
{
|
||||
eoPop<EOT> offspring, empty_pop;
|
||||
_pop.reserve(offspring.capacity());
|
||||
|
||||
eoPop<EOT> empty_pop;
|
||||
|
||||
popEval(empty_pop, _pop); // A first eval of pop.
|
||||
|
||||
|
|
@ -270,6 +291,8 @@ template<class EOT> class eoEasyEA: public eoAlgo<EOT>
|
|||
eoMergeReduce<EOT> mergeReduce;
|
||||
eoReplacement<EOT>& replace;
|
||||
|
||||
eoPop<EOT> offspring;
|
||||
|
||||
// Friend classes
|
||||
friend class eoIslandsEasyEA <EOT> ;
|
||||
friend class eoDistEvalEasyEA <EOT> ;
|
||||
|
|
@ -280,4 +303,3 @@ Example of a test program building an EA algorithm.
|
|||
*/
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -84,4 +84,3 @@ private :
|
|||
};
|
||||
|
||||
#endif // __eoEvalCounterThrowException_h__
|
||||
|
||||
|
|
|
|||
|
|
@ -65,4 +65,3 @@ struct eoEvalFuncPtr: public eoEvalFunc<EOT> {
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -211,4 +211,3 @@ protected:
|
|||
* Example of a test program using this class:
|
||||
*/
|
||||
#endif /*eoExtendedVelocity_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -53,4 +53,3 @@ private :
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -189,4 +189,3 @@ protected:
|
|||
|
||||
|
||||
#endif /*EOFIXEDINERTIAWEIGHTEDVELOCITY_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -112,4 +112,3 @@ private:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -69,14 +69,14 @@ class eoGenOp : public eoOp<EOT>, public eoUF<eoPopulator<EOT> &, void>
|
|||
virtual unsigned max_production(void) = 0;
|
||||
|
||||
virtual std::string className() const = 0;
|
||||
|
||||
void operator()(eoPopulator<EOT>& _pop)
|
||||
{
|
||||
_pop.reserve(max_production());
|
||||
_pop.reserve( max_production() );
|
||||
apply(_pop);
|
||||
}
|
||||
|
||||
|
||||
protected :
|
||||
//protected :
|
||||
/** the function that will do the work
|
||||
*/
|
||||
virtual void apply(eoPopulator<EOT>& _pop) = 0;
|
||||
|
|
|
|||
|
|
@ -105,4 +105,3 @@ class eoGeneralBreeder: public eoBreed<EOT>
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -145,4 +145,3 @@ class eoDummy : public eoUF<POT&, void>
|
|||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -193,4 +193,3 @@ protected:
|
|||
|
||||
|
||||
#endif /*EOINTEGERVELOCITY_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -215,11 +215,3 @@ protected:
|
|||
};
|
||||
|
||||
#endif /*EOLINEARTOPOLOGY_H_ */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -55,14 +55,3 @@ public:
|
|||
|
||||
|
||||
#endif /* EONEIGHBORHOOD_H_ */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -73,4 +73,3 @@ class eoObject
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -119,4 +119,3 @@ class eoOneToOneBreeder: public eoBreed<EOT>
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ public:
|
|||
|
||||
|
||||
void apply(eoPopulator<EOT>& _pop) {
|
||||
_pop.reserve( this->max_production() );
|
||||
|
||||
position_type pos = _pop.tellp();
|
||||
for (size_t i = 0; i < rates.size(); ++i) {
|
||||
_pop.seekp(pos);
|
||||
|
|
@ -108,7 +110,11 @@ public:
|
|||
// try
|
||||
// {
|
||||
// apply it to all the guys in the todo std::list
|
||||
(*ops[i])(_pop);
|
||||
|
||||
//(*ops[i])(_pop);
|
||||
|
||||
ops[i]->apply(_pop);
|
||||
|
||||
// }
|
||||
// check for out of individuals and do nothing with that...
|
||||
// catch(eoPopulator<EOT>::OutOfIndividuals&)
|
||||
|
|
@ -160,4 +166,3 @@ public:
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -80,4 +80,3 @@ public:
|
|||
#endif /*_EOPARTICLEBESTINIT_H */
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -153,4 +153,3 @@ template <class POT> class eoParticleInitializer : public eoInitializerBase <POT
|
|||
#endif /*_eoParticleFullInitializer_H*/
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -53,4 +53,3 @@ private:
|
|||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -337,4 +337,3 @@ public:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -105,4 +105,3 @@ private:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -209,4 +209,3 @@ private:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -19,4 +19,3 @@ std::ostream & operator << ( std::ostream& _os, const eoPrintable& _o ) {
|
|||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -60,4 +60,3 @@ class eoPrintable
|
|||
std::ostream & operator << ( std::ostream& _os, const eoPrintable& _o );
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -91,4 +91,3 @@ private:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ public:
|
|||
{
|
||||
if (t_rate <= 0.5)
|
||||
{
|
||||
eo::log << eo:warnings << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 0.51" << std::endl;
|
||||
eo::log << eo::warnings << "Warning, Rate for eoStochTournamentTruncateSplit adjusted to 0.51" << std::endl;
|
||||
t_rate = 0.51;
|
||||
}
|
||||
if (t_rate > 1)
|
||||
|
|
|
|||
|
|
@ -121,4 +121,3 @@ class eoSTLBF : public std::binary_function<A1, A2, R>
|
|||
|
||||
/** @} */
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,3 @@
|
|||
|
||||
// need to allocate the static variables of class eoScalarFitnessAssembledTraits
|
||||
std::vector<std::string> eoScalarFitnessAssembledTraits::TermDescriptions;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -282,4 +282,3 @@ std::istream& operator>>(std::istream& is, eoScalarFitnessAssembled<F, Cmp, Fitn
|
|||
|
||||
/** @} */
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -74,4 +74,3 @@ public:
|
|||
*/
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -229,4 +229,3 @@ private:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -89,4 +89,3 @@ template<class EOT> class eoShiftMutation: public eoMonOp<EOT>
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -104,4 +104,3 @@ template<class EOT> class eoSimpleEDA: public eoEDA<EOT>
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -123,4 +123,3 @@ protected:
|
|||
|
||||
|
||||
#endif /* EOSOCIALNEIGHBORHOOD_H_ */
|
||||
|
||||
|
|
|
|||
|
|
@ -193,4 +193,3 @@ protected:
|
|||
|
||||
|
||||
#endif /*EOSTANDARDVELOCITY_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -139,11 +139,3 @@ protected:
|
|||
};
|
||||
|
||||
#endif /*EOSTARTOPOLOGY_H_ */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -117,4 +117,3 @@ private:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -65,4 +65,3 @@ private:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -195,4 +195,3 @@ private :
|
|||
/** @} */
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -80,4 +80,3 @@ template<class Chrom> class eoSwapMutation: public eoMonOp<Chrom>
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -84,11 +84,3 @@ public:
|
|||
|
||||
|
||||
#endif /*EOTOPOLOGY_H_ */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -196,4 +196,3 @@ protected:
|
|||
};
|
||||
|
||||
#endif /*EOVARIABLEINERTIAWEIGHTEDVELOCITY_H*/
|
||||
|
||||
|
|
|
|||
|
|
@ -350,4 +350,3 @@ private:
|
|||
|
||||
/** @} */
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -158,4 +158,3 @@ private:
|
|||
|
||||
/** @} */
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -78,4 +78,3 @@ public:
|
|||
};
|
||||
|
||||
#endif /*EOVELOCITY_H_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -144,4 +144,3 @@ private:
|
|||
#endif /*EOVELOCITYINIT_H */
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
* C++ification of Nikolaus Hansen's original C-source code for the
|
||||
* CMA-ES
|
||||
|
|
|
|||
|
|
@ -49,4 +49,3 @@ class CMAParams {
|
|||
} // namespace eo
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -362,4 +362,3 @@ bool CMAState::updateEigenSystem(unsigned max_tries, unsigned max_iters) { retur
|
|||
|
||||
|
||||
} // namespace eo
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
* C++ification of Nikolaus Hansen's original C-source code for the
|
||||
* CMA-ES.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
* C++ification of Nikolaus Hansen's original C-source code for the
|
||||
* CMA-ES. These are the eigenvector calculations
|
||||
|
|
|
|||
|
|
@ -279,4 +279,3 @@ private:
|
|||
//-----------------------------------------------------------------------------
|
||||
//@}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -68,4 +68,3 @@ class eoRealInitBounded : public eoInit<EOT>
|
|||
//-----------------------------------------------------------------------------
|
||||
//@}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue