Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis)

Avg Stats are now only evaluated of individuals if this bool is false!
This commit is contained in:
okoenig 2004-06-14 17:05:07 +00:00
commit 500f66efbf

View file

@ -228,7 +228,11 @@ std::ostream& operator<<(std::ostream& os, const eoScalarFitnessAssembled<F, Cmp
{
for (unsigned i=0; i < f.size(); ++i)
os << f[i] << " ";
return os;
os << f.feasible << " ";
os << f.failed << " ";
return os;
}
template <class F, class Cmp, class FitnessTraits>
@ -239,7 +243,10 @@ std::istream& operator>>(std::istream& is, eoScalarFitnessAssembled<F, Cmp, Fitn
is >> value;
f[i] = value;
}
is >> f.feasible;
is >> f.failed;
return is;
}