diff --git a/eo/test/t-eoPareto.cpp b/eo/test/t-eoPareto.cpp index 592ba5c4..f646e592 100644 --- a/eo/test/t-eoPareto.cpp +++ b/eo/test/t-eoPareto.cpp @@ -2,7 +2,7 @@ #include //#include -//#include +#include using namespace std; typedef vector fitness_type; @@ -10,9 +10,6 @@ typedef vector fitness_type; struct eoDouble : public EO { double value; - - void printOn(ostream& os) const { os << fitness()[0] << ' ' << fitness()[1] << ' ' << value; } - void readFrom(istream& is) { is >> value; } }; class Mutate : public eoMonOp @@ -30,8 +27,8 @@ class Eval : public eoEvalFunc { double v = _eo.value; fitness_type f(2); - f[0] = v * v; - f[1] = (v - 1.) * (v - 1.); + f[1] = v * v; + f[0] = (v - 1.) * (v - 1.); _eo.fitness(f); } @@ -64,7 +61,8 @@ void the_main() eoDominanceMap dominance(maximizes); // Pareto ranking needs a dominance map - eoParetoRanking perf2worth(dominance); + //eoParetoRanking perf2worth(dominance); + eoNDSorting perf2worth(dominance, 0.0); // Three selectors eoDetTournamentWorthSelect select1(perf2worth, 3); @@ -94,6 +92,7 @@ void the_main() cp.add(fitness1); eoGnuplot1DSnapshot snapshot("pareto"); + snapshot.pointSize =3; cp.add(snapshot);