diff --git a/eo/src/eoLinearFitScaling.h b/eo/src/eoLinearFitScaling.h index 424ebda7..998728a9 100644 --- a/eo/src/eoLinearFitScaling.h +++ b/eo/src/eoLinearFitScaling.h @@ -66,7 +66,8 @@ public: // average fitness double sum=0.0; - for (unsigned i=0; i(_pop[i].fitness()); double averageFitness = sum/pSize; @@ -75,7 +76,7 @@ public: double alpha = (pressure-1)/denom; double beta = (bestFitness - pressure*averageFitness)/denom; - for (unsigned i=0; i> foo; } - } #endif + } catch(exception& e) { cout << e.what() << endl; diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index 05142eb6..77136808 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -61,9 +61,9 @@ void testSelectMany(eoSelect & _select, string _name) eoDummyPop parents(pSize); eoDummyPop offspring(0); - + unsigned i; // initialize parents - for (unsigned i=0; i & _select, string _name) // compute stats vector nb(parents.size(), 0); - for (unsigned i=0; i(offspring[i], parents); if (trouve == parents.size()) // pas trouve @@ -84,7 +84,7 @@ void testSelectMany(eoSelect & _select, string _name) // dump to file so you can plot using gnuplot string fName = _name + ".prop"; ofstream os(fName.c_str()); - for (unsigned i=0; i " << ( (double)nb[i])/offspring.size() << endl; os << i << " " << ( (double)nb[i])/offspring.size() << endl;