diff --git a/eo/test/t-eobreeder.cpp b/eo/test/t-eobreeder.cpp index a0c5e4a47..daaf62dea 100644 --- a/eo/test/t-eobreeder.cpp +++ b/eo/test/t-eobreeder.cpp @@ -37,7 +37,7 @@ main() eoBinRandom random; eoPop pop; - for (i = 0; i < POP_SIZE; i++) + for (i = 0; i < POP_SIZE; ++i) { Chrom chrom(CHROM_SIZE); random(chrom); @@ -46,7 +46,7 @@ main() } cout << "population:" << endl; - for (i = 0; i < pop.size(); i++) + for (i = 0; i < pop.size(); ++i) cout << pop[i] << " " << pop[i].fitness() << endl; eoBinBitFlip bitflip; @@ -58,8 +58,10 @@ main() breeder(pop); + for_each(pop.begin(), pop.end(), binary_value); + cout << "new population:" << endl; - for (i = 0; i < pop.size(); i++) + for (i = 0; i < pop.size(); ++i) cout << pop[i] << " " << pop[i].fitness() << endl; return 0;