more bugfixes

This commit is contained in:
maartenkeijzer 2007-08-31 14:12:54 +00:00
commit f2f65d7ed4
3 changed files with 4 additions and 5 deletions

View file

@ -16,9 +16,9 @@ class eoMOEval : public eoPopEvalFunc<EOT> {
private :
eoPopEvalFunc<EOT>& pop_eval;
eoPopLoopEval<EOT> default_loop;
class eoDummyEval : public eoEvalFunc<EOT> {public: void operator()(EOT &) {} } dummy_eval;
eoPopLoopEval<EOT> default_loop;
eoPopEvalFunc<EOT>& pop_eval;
};

View file

@ -27,9 +27,8 @@ class eoNSGA_IIa_Eval : public eoMOEval<EOT>
for (unsigned i = 0; i < offspring.size(); ++i) pop.push_back(&offspring[i]);
typename eoFrontSorter<EOT>::front_t front = sorter(pop);
unsigned rank = parents.size();
unsigned rank = pop.size();
for (unsigned i = 0; i < front.size(); ++i) {
rank = assign_worths(front[i], rank, pop);
}

View file

@ -14,7 +14,7 @@ public :
eoNSGA_I_Eval(double nicheWidth, eoEvalFunc<EOT>& eval) : eoMOEval<EOT>(eval), nicheSize(nicheWidth) {}
eoNSGA_I_Eval(double nicheWidth, eoPopEvalFunc<EOT>& eval) : eoMOEval<EOT>(eval), nicheSize(nicheWidth) {}
virutal void operator()(eoPop<EOT>& parents, eoPop<EOT>& offspring) {
virtual void operator()(eoPop<EOT>& parents, eoPop<EOT>& offspring) {
eval(parents, offspring);
std::vector<EOT*> pop;