fix: do not count two times the evaluations in eoEvalCounterThrowException
This commit is contained in:
parent
34eadef7a2
commit
0665cc02f5
1 changed files with 5 additions and 7 deletions
|
|
@ -64,20 +64,18 @@ public :
|
||||||
// bypass already evaluated individuals
|
// bypass already evaluated individuals
|
||||||
if (eo.invalid()) {
|
if (eo.invalid()) {
|
||||||
|
|
||||||
// increment the value of the self parameter
|
// evaluate
|
||||||
// (eoEvalFuncCounter inherits from @see eoValueParam)
|
this->eoEvalFuncCounter<EOT>::operator()(eo);
|
||||||
value()++;
|
// No need to increment value(), it is done in the superclass.
|
||||||
|
|
||||||
|
// increment t
|
||||||
// if we have reached the maximum
|
// if we have reached the maximum
|
||||||
if ( value() >= _threshold ) {
|
if ( this->value() >= _threshold ) {
|
||||||
|
|
||||||
// go back through the stack until catched
|
// go back through the stack until catched
|
||||||
throw eoMaxEvalException(_threshold);
|
throw eoMaxEvalException(_threshold);
|
||||||
}
|
}
|
||||||
|
|
||||||
// evaluate
|
|
||||||
this->eoEvalFuncCounter<EOT>::operator()(eo);
|
|
||||||
|
|
||||||
} // if invalid
|
} // if invalid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue