diff --git a/eo/config.cache b/eo/config.cache index c576c6ba..bb2c1689 100644 --- a/eo/config.cache +++ b/eo/config.cache @@ -14,20 +14,22 @@ # ac_cv_c_const=${ac_cv_c_const=yes} ac_cv_c_inline=${ac_cv_c_inline=inline} +ac_cv_cxx_have_sstream=${ac_cv_cxx_have_sstream=yes} +ac_cv_cxx_namespaces=${ac_cv_cxx_namespaces=yes} ac_cv_func_select=${ac_cv_func_select=yes} ac_cv_header_limits_h=${ac_cv_header_limits_h=yes} ac_cv_header_stdc=${ac_cv_header_stdc=yes} ac_cv_lib_eo_main=${ac_cv_lib_eo_main=no} ac_cv_lib_eoutils_main=${ac_cv_lib_eoutils_main=no} ac_cv_lib_m_main=${ac_cv_lib_m_main=yes} -ac_cv_path_install=${ac_cv_path_install='$/usr/bin/install -c'} -ac_cv_prog_CPP=${ac_cv_prog_CPP='$cc -E'} -ac_cv_prog_CXX=${ac_cv_prog_CXX=c++} -ac_cv_prog_LN_S=${ac_cv_prog_LN_S='$ln -s'} +ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'} +ac_cv_prog_CPP=${ac_cv_prog_CPP='cc -E'} +ac_cv_prog_CXX=${ac_cv_prog_CXX=/opt/intel/compiler70/ia32/bin/icpc} +ac_cv_prog_LN_S=${ac_cv_prog_LN_S='ln -s'} ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib} ac_cv_prog_cxx_cross=${ac_cv_prog_cxx_cross=no} ac_cv_prog_cxx_g=${ac_cv_prog_cxx_g=yes} ac_cv_prog_cxx_works=${ac_cv_prog_cxx_works=yes} -ac_cv_prog_gxx=${ac_cv_prog_gxx=yes} +ac_cv_prog_gxx=${ac_cv_prog_gxx=no} ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes} ac_cv_type_size_t=${ac_cv_type_size_t=yes} diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 3c1ff1b2..1bfdf0b0 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -21,7 +21,7 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es Marc.Schoenauer@polytechnique.fr mak@dhi.dk - CVS Info: $Date: 2003-02-27 19:24:47 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/ga/eoBitOp.h,v 1.15 2003-02-27 19:24:47 okoenig Exp $ $Author: okoenig $ + CVS Info: $Date: 2003-05-16 14:28:52 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/ga/eoBitOp.h,v 1.16 2003-05-16 14:28:52 jeggermo Exp $ $Author: jeggermo $ */ //----------------------------------------------------------------------------- @@ -362,7 +362,11 @@ template class eoNPtsBitXover: public eoQuadOp change = !change; if (change) - std::swap(chrom1[bit], chrom2[bit]); + { + typename Chrom::AtomType tmp= chrom1[bit]; + chrom1[bit] = chrom2[bit]; + chrom2[bit] = tmp; + } } return true; diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 921d85e2..05ff9b2c 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -192,14 +192,14 @@ public : Specialization for std::string */ template <> -std::string eoValueParam::getValue(void) const +inline std::string eoValueParam::getValue(void) const { return repValue; } template <> -void eoValueParam::setValue(std::string _value) +inline void eoValueParam::setValue(std::string _value) { if (_value.empty()) { @@ -217,7 +217,7 @@ void eoValueParam::setValue(std::string _value) /// Because MSVC does not support partial specialization, the std::pair is a double, not a T template <> -std::string eoValueParam >::getValue(void) const +inline std::string eoValueParam >::getValue(void) const { // use own buffer as MSVC's buffer leaks! #ifdef HAVE_SSTREAM @@ -233,7 +233,7 @@ std::string eoValueParam >::getValue(void) const /// Because MSVC does not support partial specialization, the std::pair is a double, not a T template <> -void eoValueParam >::setValue(std::string _value) +inline void eoValueParam >::setValue(std::string _value) { #ifdef HAVE_SSTREAM std::istringstream is(_value); @@ -248,7 +248,7 @@ void eoValueParam >::setValue(std::string _value) ////////////////////////////////// /// Because MSVC does not support partial specialization, the std::vector is a std::vector of doubles, not a T template <> -std::string eoValueParam > >::getValue(void) const +inline std::string eoValueParam > >::getValue(void) const { #ifdef HAVE_SSTREAM std::ostringstream os; @@ -270,7 +270,7 @@ std::string eoValueParam > >::getValue(void) con /// Because MSVC does not support partial specialization, the std::vector is a std::vector of doubles, not a T template <> -void eoValueParam > >::setValue(std::string _value) +inline void eoValueParam > >::setValue(std::string _value) { #ifdef HAVE_SSTREAM std::istringstream is(_value); @@ -297,7 +297,7 @@ void eoValueParam > >::setValue(std::string _val ////////////////////////////////// /// Because MSVC does not support partial specialization, the std::vector is a double, not a T template <> -std::string eoValueParam >::getValue(void) const +inline std::string eoValueParam >::getValue(void) const { #ifdef HAVE_SSTREAM std::ostringstream os; @@ -314,7 +314,7 @@ std::string eoValueParam >::getValue(void) const /// Because MSVC does not support partial specialization, the std::vector is a double, not a T template <> -void eoValueParam >::setValue(std::string _value) +inline void eoValueParam >::setValue(std::string _value) { #ifdef HAVE_SSTREAM std::istringstream is(_value); @@ -331,7 +331,7 @@ void eoValueParam >::setValue(std::string _value) ////////////////////////////////// /// Because MSVC does not support partial specialization, the std::vector is a eoMinimizingFitness, not a T template <> -std::string eoValueParam >::getValue(void) const +inline std::string eoValueParam >::getValue(void) const { #ifdef HAVE_SSTREAM std::ostringstream os; @@ -349,7 +349,7 @@ std::string eoValueParam >::getValue(void) cons /// Because MSVC does not support partial specialization, the std::vector is a eoMinimizingFitness, not a T // NOTE: g++ doesn support it either!!! template <> -void eoValueParam >::setValue(std::string _value) +inline void eoValueParam >::setValue(std::string _value) { #ifdef HAVE_SSTREAM std::istringstream is(_value); @@ -365,14 +365,14 @@ void eoValueParam >::setValue(std::string _valu // The std::vector ////////////////////////////////// template <> -std::string eoValueParam >::getValue(void) const +inline std::string eoValueParam >::getValue(void) const { throw std::runtime_error("I cannot getValue for a std::vector"); return std::string(""); } template <> -void eoValueParam >::setValue(std::string) +inline void eoValueParam >::setValue(std::string) { throw std::runtime_error("I cannot setValue for a std::vector"); return; diff --git a/eo/src/utils/eoRndGenerators.h b/eo/src/utils/eoRndGenerators.h index ab5a3049..e851bb02 100644 --- a/eo/src/utils/eoRndGenerators.h +++ b/eo/src/utils/eoRndGenerators.h @@ -92,7 +92,7 @@ private : /// Specialization for bool, does an unbiased coin flip template <> -bool eoUniformGenerator::operator()(void) +inline bool eoUniformGenerator::operator()(void) { return uniform.flip(0.5); } diff --git a/eo/src/utils/eoUniformInit.h b/eo/src/utils/eoUniformInit.h index 575398bb..7960339f 100644 --- a/eo/src/utils/eoUniformInit.h +++ b/eo/src/utils/eoUniformInit.h @@ -98,7 +98,7 @@ private : /** Specialization for bool, does an unbiased coin flip */ template <> -void eoUniformInit::operator()(bool & _b) +inline void eoUniformInit::operator()(bool & _b) { _b = uniform.flip(0.5); } diff --git a/eo/src/utils/rnd_generators.h b/eo/src/utils/rnd_generators.h index 292205bd..90fdd290 100644 --- a/eo/src/utils/rnd_generators.h +++ b/eo/src/utils/rnd_generators.h @@ -107,7 +107,7 @@ private : /// Specialization for bool template <> -bool random_generator::operator()(void) +inline bool random_generator::operator()(void) { return random.flip(0.5); }