From d8bbe055ca33f5c5305cd20086b96228ce3ecc66 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 30 Mar 2011 15:50:19 +0200 Subject: [PATCH] * eoEasyEA: pop reserve at each call to algo --- eo/src/eoEasyEA.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eo/src/eoEasyEA.h b/eo/src/eoEasyEA.h index c058c2338..2ca8d37e3 100644 --- a/eo/src/eoEasyEA.h +++ b/eo/src/eoEasyEA.h @@ -210,6 +210,8 @@ template class eoEasyEA: public eoAlgo /// Apply a few generation of evolution to the population. virtual void operator()(eoPop& _pop) { + _pop.reserve(offspring.capacity()); + eoPop empty_pop; popEval(empty_pop, _pop); // A first eval of pop.