Added symbolic regression, which tests combined ops as well

This commit is contained in:
mac 2000-08-18 08:44:22 +00:00
commit 8ae796ab28
14 changed files with 161 additions and 199 deletions

View file

@ -59,7 +59,7 @@ template <class EOT>
class eoAverageStat : public eoStat<EOT, double>
{
public :
eoAverageStat(std::string _description = "AverageFitness") : eoStat<EOT, double>(0.0, _description) {}
eoAverageStat(std::string _description = "Average Fitness") : eoStat<EOT, double>(0.0, _description) {}
static double sumFitness(double _sum, const EOT& _eot)
{
@ -103,6 +103,20 @@ public :
}
};
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>
class eoStdevStat : public eoStat<EOT, double >