EO::printOn has been changed so that the printOn function will

always print a valid fitness value even if the fitness is invalid

Jeroen
This commit is contained in:
jeggermo 2002-05-13 11:31:32 +00:00
commit 2e87ffd00f
2 changed files with 11 additions and 4 deletions

View file

@ -124,7 +124,14 @@ public:
// A random value would so be printed.
// Even a non-evaluated EO is also serializable ...
_os << repFitness << ' '; // trailing space to make reading in that much easier
// From now on instead of printing an invalid fitness value
// a default value is printed (for paradisEO)
if (invalid())
_os << Fitness() << ' ';
else
_os << repFitness << ' '; // trailing space to make reading in that much easier
}
//@}