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
|
||||
if (eo.invalid()) {
|
||||
|
||||
// increment the value of the self parameter
|
||||
// (eoEvalFuncCounter inherits from @see eoValueParam)
|
||||
value()++;
|
||||
// evaluate
|
||||
this->eoEvalFuncCounter<EOT>::operator()(eo);
|
||||
// No need to increment value(), it is done in the superclass.
|
||||
|
||||
// increment t
|
||||
// if we have reached the maximum
|
||||
if ( value() >= _threshold ) {
|
||||
if ( this->value() >= _threshold ) {
|
||||
|
||||
// go back through the stack until catched
|
||||
throw eoMaxEvalException(_threshold);
|
||||
}
|
||||
|
||||
// evaluate
|
||||
this->eoEvalFuncCounter<EOT>::operator()(eo);
|
||||
|
||||
} // if invalid
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue