diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index e7c5adca2..c932fb353 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -179,15 +179,13 @@ private : Average fitness + Std. dev. of a population, fitness needs to be scalar. */ template -class eoSecondMomentStats : public eoStat > +class eoSecondMomentStats : public eoStat > { public : + typedef typename EOT::Fitness FitT; - using eoStat >::value; - - typedef typename EOT::Fitness fitness_type; - - typedef std::pair SquarePair; + using eoStat >::value; + typedef std::pair SquarePair; eoSecondMomentStats(std::string _description = "Average & Stdev") : eoStat(std::make_pair(0.0,0.0), _description) @@ -195,7 +193,7 @@ public : static SquarePair sumOfSquares(SquarePair _sq, const EOT& _eo) { - double fitness = _eo.fitness(); + FitT fitness = _eo.fitness(); _sq.first += fitness; _sq.second += fitness * fitness;