* eoEasyEA: pop reserve at each call to algo
This commit is contained in:
parent
b0844ae27b
commit
d8bbe055ca
1 changed files with 2 additions and 0 deletions
|
|
@ -210,6 +210,8 @@ template<class EOT> class eoEasyEA: public eoAlgo<EOT>
|
||||||
/// Apply a few generation of evolution to the population.
|
/// Apply a few generation of evolution to the population.
|
||||||
virtual void operator()(eoPop<EOT>& _pop)
|
virtual void operator()(eoPop<EOT>& _pop)
|
||||||
{
|
{
|
||||||
|
_pop.reserve(offspring.capacity());
|
||||||
|
|
||||||
eoPop<EOT> empty_pop;
|
eoPop<EOT> empty_pop;
|
||||||
|
|
||||||
popEval(empty_pop, _pop); // A first eval of pop.
|
popEval(empty_pop, _pop); // A first eval of pop.
|
||||||
|
|
|
||||||
Reference in a new issue