Oh, right found some errors using gcc
This commit is contained in:
parent
e55e3813dc
commit
71b0dc1771
3 changed files with 6 additions and 3 deletions
|
|
@ -32,6 +32,9 @@
|
||||||
#include <utils/eoMonitor.h>
|
#include <utils/eoMonitor.h>
|
||||||
#include <eoObject.h>
|
#include <eoObject.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Prints statistics to file
|
||||||
|
*/
|
||||||
class eoFileMonitor : public eoMonitor
|
class eoFileMonitor : public eoMonitor
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class eoAverageStat : public eoStat<EOT, double>
|
||||||
public :
|
public :
|
||||||
eoAverageStat(std::string _description = "AverageFitness") : eoStat<EOT, double>(0.0, _description) {}
|
eoAverageStat(std::string _description = "AverageFitness") : eoStat<EOT, double>(0.0, _description) {}
|
||||||
|
|
||||||
static double sumFitness(double _sum, const EOT& eot)
|
static double sumFitness(double _sum, const EOT& _eot)
|
||||||
{
|
{
|
||||||
_sum += _eot.fitness();
|
_sum += _eot.fitness();
|
||||||
return _sum;
|
return _sum;
|
||||||
|
|
@ -72,7 +72,7 @@ public :
|
||||||
{
|
{
|
||||||
double v = std::accumulate(_pop.begin(), _pop.end(), 0.0, eoAverageStat::sumFitness);
|
double v = std::accumulate(_pop.begin(), _pop.end(), 0.0, eoAverageStat::sumFitness);
|
||||||
|
|
||||||
value() = v / pop.size();
|
value() = v / _pop.size();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ main(int argc, char *argv[])
|
||||||
eoEsObjectiveBounds bounds(chromSize.value(), minimum.value(), maximum.value());
|
eoEsObjectiveBounds bounds(chromSize.value(), minimum.value(), maximum.value());
|
||||||
|
|
||||||
// Run the appropriate algorithm
|
// Run the appropriate algorithm
|
||||||
if (stdevs.value() == false && corr.value == false)
|
if (stdevs.value() == false && corr.value() == false)
|
||||||
{
|
{
|
||||||
runAlgorithm(eoEsSimple<FitT>() ,parser, bounds);
|
runAlgorithm(eoEsSimple<FitT>() ,parser, bounds);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in a new issue