revert 399b22266 (virtual fitness interface temptative)
Incompatible with MOEO's change of interface.
This commit is contained in:
parent
f30240cb44
commit
e643468de8
1 changed files with 4 additions and 2 deletions
|
|
@ -72,7 +72,9 @@ public:
|
||||||
virtual ~EO() {};
|
virtual ~EO() {};
|
||||||
|
|
||||||
/// Return fitness value.
|
/// Return fitness value.
|
||||||
virtual const Fitness& fitness() const {
|
// virtual const Fitness& fitness() const { // This would be impossible with MOEO.
|
||||||
|
// virtual Fitness fitness() const { // Cannot do that either, MOEO changes the interface.
|
||||||
|
Fitness fitness() const {
|
||||||
if (invalid())
|
if (invalid())
|
||||||
throw eoInvalidFitnessError("Cannot retrieve unevaluated fitness");
|
throw eoInvalidFitnessError("Cannot retrieve unevaluated fitness");
|
||||||
return repFitness;
|
return repFitness;
|
||||||
|
|
@ -91,7 +93,7 @@ public:
|
||||||
/** Set fitness. At the same time, validates it.
|
/** Set fitness. At the same time, validates it.
|
||||||
* @param _fitness New fitness value.
|
* @param _fitness New fitness value.
|
||||||
*/
|
*/
|
||||||
virtual void fitness(const Fitness& _fitness)
|
void fitness(const Fitness& _fitness)
|
||||||
{
|
{
|
||||||
repFitness = _fitness;
|
repFitness = _fitness;
|
||||||
invalidFitness = false;
|
invalidFitness = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue