This commit is contained in:
jeggermo 2003-05-16 14:28:52 +00:00
commit 347f64413e
6 changed files with 28 additions and 22 deletions

View file

@ -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}

View file

@ -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 Chrom> class eoNPtsBitXover: public eoQuadOp<Chrom>
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;

View file

@ -192,14 +192,14 @@ public :
Specialization for std::string
*/
template <>
std::string eoValueParam<std::string>::getValue(void) const
inline std::string eoValueParam<std::string>::getValue(void) const
{
return repValue;
}
template <>
void eoValueParam<bool>::setValue(std::string _value)
inline void eoValueParam<bool>::setValue(std::string _value)
{
if (_value.empty())
{
@ -217,7 +217,7 @@ void eoValueParam<bool>::setValue(std::string _value)
/// Because MSVC does not support partial specialization, the std::pair is a double, not a T
template <>
std::string eoValueParam<std::pair<double, double> >::getValue(void) const
inline std::string eoValueParam<std::pair<double, double> >::getValue(void) const
{
// use own buffer as MSVC's buffer leaks!
#ifdef HAVE_SSTREAM
@ -233,7 +233,7 @@ std::string eoValueParam<std::pair<double, double> >::getValue(void) const
/// Because MSVC does not support partial specialization, the std::pair is a double, not a T
template <>
void eoValueParam<std::pair<double, double> >::setValue(std::string _value)
inline void eoValueParam<std::pair<double, double> >::setValue(std::string _value)
{
#ifdef HAVE_SSTREAM
std::istringstream is(_value);
@ -248,7 +248,7 @@ void eoValueParam<std::pair<double, double> >::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<std::vector<std::vector<double> > >::getValue(void) const
inline std::string eoValueParam<std::vector<std::vector<double> > >::getValue(void) const
{
#ifdef HAVE_SSTREAM
std::ostringstream os;
@ -270,7 +270,7 @@ std::string eoValueParam<std::vector<std::vector<double> > >::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<std::vector<std::vector<double> > >::setValue(std::string _value)
inline void eoValueParam<std::vector<std::vector<double> > >::setValue(std::string _value)
{
#ifdef HAVE_SSTREAM
std::istringstream is(_value);
@ -297,7 +297,7 @@ void eoValueParam<std::vector<std::vector<double> > >::setValue(std::string _val
//////////////////////////////////
/// Because MSVC does not support partial specialization, the std::vector is a double, not a T
template <>
std::string eoValueParam<std::vector<double> >::getValue(void) const
inline std::string eoValueParam<std::vector<double> >::getValue(void) const
{
#ifdef HAVE_SSTREAM
std::ostringstream os;
@ -314,7 +314,7 @@ std::string eoValueParam<std::vector<double> >::getValue(void) const
/// Because MSVC does not support partial specialization, the std::vector is a double, not a T
template <>
void eoValueParam<std::vector<double> >::setValue(std::string _value)
inline void eoValueParam<std::vector<double> >::setValue(std::string _value)
{
#ifdef HAVE_SSTREAM
std::istringstream is(_value);
@ -331,7 +331,7 @@ void eoValueParam<std::vector<double> >::setValue(std::string _value)
//////////////////////////////////
/// Because MSVC does not support partial specialization, the std::vector is a eoMinimizingFitness, not a T
template <>
std::string eoValueParam<std::vector<eoMinimizingFitness> >::getValue(void) const
inline std::string eoValueParam<std::vector<eoMinimizingFitness> >::getValue(void) const
{
#ifdef HAVE_SSTREAM
std::ostringstream os;
@ -349,7 +349,7 @@ std::string eoValueParam<std::vector<eoMinimizingFitness> >::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<std::vector<eoMinimizingFitness> >::setValue(std::string _value)
inline void eoValueParam<std::vector<eoMinimizingFitness> >::setValue(std::string _value)
{
#ifdef HAVE_SSTREAM
std::istringstream is(_value);
@ -365,14 +365,14 @@ void eoValueParam<std::vector<eoMinimizingFitness> >::setValue(std::string _valu
// The std::vector<const EOT*>
//////////////////////////////////
template <>
std::string eoValueParam<std::vector<void*> >::getValue(void) const
inline std::string eoValueParam<std::vector<void*> >::getValue(void) const
{
throw std::runtime_error("I cannot getValue for a std::vector<EOT*>");
return std::string("");
}
template <>
void eoValueParam<std::vector<void*> >::setValue(std::string)
inline void eoValueParam<std::vector<void*> >::setValue(std::string)
{
throw std::runtime_error("I cannot setValue for a std::vector<EOT*>");
return;

View file

@ -92,7 +92,7 @@ private :
/// Specialization for bool, does an unbiased coin flip
template <>
bool eoUniformGenerator<bool>::operator()(void)
inline bool eoUniformGenerator<bool>::operator()(void)
{
return uniform.flip(0.5);
}

View file

@ -98,7 +98,7 @@ private :
/** Specialization for bool, does an unbiased coin flip */
template <>
void eoUniformInit<bool>::operator()(bool & _b)
inline void eoUniformInit<bool>::operator()(bool & _b)
{
_b = uniform.flip(0.5);
}

View file

@ -107,7 +107,7 @@ private :
/// Specialization for bool
template <>
bool random_generator<bool>::operator()(void)
inline bool random_generator<bool>::operator()(void)
{
return random.flip(0.5);
}