From ebb20c44c5058969754f8ded0e375eb6a81c8ff9 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Tue, 28 Sep 2010 10:38:38 +0200 Subject: [PATCH] there was an issue on doBounderNo class tied to the default values of the ctor of mother class doBounder: fixed --- application/CMakeLists.txt | 1 + src/doBounder.h | 2 +- src/doBounderNo.h | 3 +-- test/CMakeLists.txt | 1 + test/t-bounderno.cpp | 18 ++++++++++++++++++ 5 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 test/t-bounderno.cpp diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt index dabb9ea0..24b57198 100644 --- a/application/CMakeLists.txt +++ b/application/CMakeLists.txt @@ -9,5 +9,6 @@ INCLUDE_DIRECTORIES( ADD_SUBDIRECTORY(common) ADD_SUBDIRECTORY(eda_sa) ADD_SUBDIRECTORY(eda) +ADD_SUBDIRECTORY(sa) ###################################################################################### diff --git a/src/doBounder.h b/src/doBounder.h index 3ce4a554..44240246 100644 --- a/src/doBounder.h +++ b/src/doBounder.h @@ -14,7 +14,7 @@ template < typename EOT > class doBounder : public eoUF< EOT&, void > { public: - doBounder( EOT min = -5, EOT max = 5 ) + doBounder( EOT min = EOT(1, 0), EOT max = EOT(1, 0) ) : _min(min), _max(max) { assert(_min.size() > 0); diff --git a/src/doBounderNo.h b/src/doBounderNo.h index 94d873a8..0ca883bc 100644 --- a/src/doBounderNo.h +++ b/src/doBounderNo.h @@ -14,8 +14,7 @@ template < typename EOT > class doBounderNo : public doBounder< EOT > { public: - void operator()( EOT& x ) - {} + void operator()( EOT& ) {} }; #endif // !_doBounderNo_h diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index dbb44481..4e8bffc7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -35,6 +35,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/application/common) SET(SOURCES t-doEstimatorNormalMulti t-mean-distance + t-bounderno ) FOREACH(current ${SOURCES}) diff --git a/test/t-bounderno.cpp b/test/t-bounderno.cpp new file mode 100644 index 00000000..1a157163 --- /dev/null +++ b/test/t-bounderno.cpp @@ -0,0 +1,18 @@ +#include +#include +#include + +#include +#include + +#include "Rosenbrock.h" +#include "Sphere.h" + +typedef eoReal< eoMinimizingFitness > EOT; + +int main(void) +{ + doBounderNo< EOT > bounder; + + return 0; +}