Made eoBestFitnessStat an eoStat, NOT an eoSortedStat
Cde VS: Committing in .
This commit is contained in:
parent
683bc2e44f
commit
265be972ef
1 changed files with 19 additions and 1 deletions
|
|
@ -134,7 +134,25 @@ private :
|
||||||
unsigned which;
|
unsigned which;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Actually, you don't need to sort the population to get the best fitness
|
||||||
|
MS - 17/11/00
|
||||||
|
|
||||||
|
template <class EOT>
|
||||||
|
class eoBestFitnessStat : public eoStat<EOT, typename EOT::Fitness >
|
||||||
|
{
|
||||||
|
public :
|
||||||
|
typedef typename EOT::Fitness Fitness;
|
||||||
|
|
||||||
|
eoBestFitnessStat(std::string _description = "Best Fitness") :
|
||||||
|
eoStat<EOT, Fitness>(Fitness(), _description) {}
|
||||||
|
|
||||||
|
virtual void operator()(const eoPop<EOT>& _pop)
|
||||||
|
{
|
||||||
|
value() = _pop.nth_element_fitness(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
*/
|
||||||
template <class EOT>
|
template <class EOT>
|
||||||
class eoBestFitnessStat : public eoNthElementFitnessStat<EOT>
|
class eoBestFitnessStat : public eoNthElementFitnessStat<EOT>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Reference in a new issue