Changed some files for compatibility with MSVC 2003 and 2005
This commit is contained in:
parent
359c5ba8ec
commit
219e9bd648
7 changed files with 890 additions and 876 deletions
|
|
@ -208,6 +208,7 @@ eoCheckPoint<EOT>& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval
|
|||
fileMonitor->add(*secondStat);
|
||||
}
|
||||
|
||||
#if !defined(NO_GNUPLOT)
|
||||
if (plotBestParam.value()) // an eoGnuplot1DMonitor for best & average
|
||||
{
|
||||
std::string stmp = dirNameParam.value() + "/gnu_best.xg";
|
||||
|
|
@ -240,7 +241,7 @@ eoCheckPoint<EOT>& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval
|
|||
// and of course add it to the checkpoint
|
||||
checkpoint->add(*fitSnapshot);
|
||||
}
|
||||
|
||||
#endif
|
||||
//////////////////////////////////
|
||||
// State savers
|
||||
//////////////////////////////
|
||||
|
|
|
|||
|
|
@ -59,6 +59,11 @@ class eoScalarFitness
|
|||
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<ScalarType, Compare>& y ) const { return y < *this; }
|
||||
// implementation of the other operators
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
@see eoSelectMany, eoSelectRandom, eoDetTournament, eoStochTournament, eoProportional
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1300)
|
||||
template<class EOT, class WorthT = EOT::Fitness>
|
||||
#else
|
||||
template<class EOT, class WorthT = typename EOT::Fitness>
|
||||
|
|
|
|||
|
|
@ -32,11 +32,19 @@ Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
|||
//
|
||||
// The C99-standard defines uint32_t to be declared in stdint.h, but some
|
||||
// systmes don't have that and implement it in inttypes.h.
|
||||
|
||||
// first if check added for MSVC by Jeroen Eggermont 20-11-2006, needed for MSVC 2003 (and 2005)
|
||||
# if (defined _MSC_VER)
|
||||
typedef unsigned long uint32_t;
|
||||
#include <cmath>
|
||||
#else
|
||||
#if (! defined __sun)
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#include <vector>
|
||||
#include "eoPersistent.h"
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ public :
|
|||
|
||||
( For eoScalarFitnessAssembled user eoAssembledFitnessStat classes.)
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1300)
|
||||
template <class EOT> class eoAverageStat : public eoStat<EOT, EOT::Fitness>
|
||||
#else
|
||||
template <class EOT> class eoAverageStat : public eoStat<EOT, typename EOT::Fitness>
|
||||
|
|
@ -203,7 +203,7 @@ public :
|
|||
/**
|
||||
The n_th element fitness in the population (see eoBestFitnessStat)
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1300)
|
||||
template <class EOT>
|
||||
class eoNthElementFitnessStat : public eoSortedStat<EOT, EOT::Fitness >
|
||||
#else
|
||||
|
|
@ -308,7 +308,7 @@ public :
|
|||
( For eoScalarFitnessAssembled look at eoAssembledFitnessStat )
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1300)
|
||||
template <class EOT>
|
||||
class eoBestFitnessStat : public eoStat<EOT, EOT::Fitness>
|
||||
#else
|
||||
|
|
|
|||
Reference in a new issue