Bugfix: a reference can't be reinitialized. Different vectors weren't recopied after evaluation.

This commit is contained in:
Benjamin Bouvier 2012-07-04 13:24:10 +02:00
commit 581b24af18
2 changed files with 13 additions and 9 deletions

View file

@ -99,10 +99,10 @@ struct CatBestAnswers : public eo::mpi::HandleResponseParallelApply<EOT>
(*_wrapped)( wrkRank );
for(int i = index; i < index+size; ++i)
{
if( best.fitness() < d->data[ i ].fitness() )
if( best.fitness() < d->data()[ i ].fitness() )
{
eo::log << eo::quiet << "Better solution found:" << d->data[i].fitness() << std::endl;
best = d->data[ i ];
eo::log << eo::quiet << "Better solution found:" << d->data()[i].fitness() << std::endl;
best = d->data()[ i ];
}
}
}