Some bugfixing in MO optimization and added empty check: target in tutorial

This commit is contained in:
maartenkeijzer 2001-03-16 13:11:32 +00:00
commit 548b2ae528
4 changed files with 21 additions and 133 deletions

View file

@ -62,6 +62,7 @@ public :
bool operator<(const eoParetoFitness<FitnessTraits>& _other) const
{
bool smaller = false;
double tol = FitnessTraits::tol();
const vector<double>& performance = *this;
const vector<double>& otherperformance = _other;
@ -70,7 +71,7 @@ public :
{
bool maxim = FitnessTraits::maximizing(i);
double aval = maxim? performance[i] : -performance[i];
double bval = maxim? otherperformance[i] : otherperformance[i];
double bval = maxim? otherperformance[i] : -otherperformance[i];
if (fabs(aval - bval) > tol)
{