Added symbolic regression, which tests combined ops as well
This commit is contained in:
parent
04bc4ecde8
commit
8ae796ab28
14 changed files with 161 additions and 199 deletions
|
|
@ -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 >
|
||||
|
|
|
|||
Reference in a new issue