diff --git a/eo/src/utils/eoStat.h b/eo/src/utils/eoStat.h index 037ca409..4c60ec9b 100644 --- a/eo/src/utils/eoStat.h +++ b/eo/src/utils/eoStat.h @@ -134,13 +134,31 @@ private : unsigned which; }; +/* Actually, you don't need to sort the population to get the best fitness + MS - 17/11/00 +template +class eoBestFitnessStat : public eoStat +{ +public : + typedef typename EOT::Fitness Fitness; + + eoBestFitnessStat(std::string _description = "Best Fitness") : + eoStat(Fitness(), _description) {} + + virtual void operator()(const eoPop& _pop) + { + value() = _pop.nth_element_fitness(0); + } + +}; +*/ template class eoBestFitnessStat : public eoNthElementFitnessStat { public : typedef typename EOT::Fitness Fitness; - + eoBestFitnessStat(std::string _description = "Best Fitness") : eoNthElementFitnessStat(0, _description) {} };