From 71b0dc17716a39350ee6bb3777dea7ebce3293f7 Mon Sep 17 00:00:00 2001 From: mac Date: Mon, 12 Jun 2000 20:24:27 +0000 Subject: [PATCH] Oh, right found some errors using gcc --- eo/src/utils/eoFileMonitor.h | 3 +++ eo/src/utils/eoStat.h | 4 ++-- eo/test/t-eoESFull.cpp | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoFileMonitor.h b/eo/src/utils/eoFileMonitor.h index d6e414890..45d889a60 100644 --- a/eo/src/utils/eoFileMonitor.h +++ b/eo/src/utils/eoFileMonitor.h @@ -32,6 +32,9 @@ #include #include +/** + Prints statistics to file +*/ class eoFileMonitor : public eoMonitor { public : diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 92a8c7940..78b1778c6 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -60,7 +60,7 @@ class eoAverageStat : public eoStat public : eoAverageStat(std::string _description = "AverageFitness") : eoStat(0.0, _description) {} - static double sumFitness(double _sum, const EOT& eot) + static double sumFitness(double _sum, const EOT& _eot) { _sum += _eot.fitness(); return _sum; @@ -72,7 +72,7 @@ public : { double v = std::accumulate(_pop.begin(), _pop.end(), 0.0, eoAverageStat::sumFitness); - value() = v / pop.size(); + value() = v / _pop.size(); } }; diff --git a/eo/test/t-eoESFull.cpp b/eo/test/t-eoESFull.cpp index 46372ea06..75be5006b 100644 --- a/eo/test/t-eoESFull.cpp +++ b/eo/test/t-eoESFull.cpp @@ -66,7 +66,7 @@ main(int argc, char *argv[]) eoEsObjectiveBounds bounds(chromSize.value(), minimum.value(), maximum.value()); // Run the appropriate algorithm - if (stdevs.value() == false && corr.value == false) + if (stdevs.value() == false && corr.value() == false) { runAlgorithm(eoEsSimple() ,parser, bounds); }