more bugfixes
This commit is contained in:
parent
220c89d1d5
commit
f2f65d7ed4
3 changed files with 4 additions and 5 deletions
|
|
@ -16,9 +16,9 @@ class eoMOEval : public eoPopEvalFunc<EOT> {
|
||||||
|
|
||||||
private :
|
private :
|
||||||
|
|
||||||
eoPopEvalFunc<EOT>& pop_eval;
|
|
||||||
eoPopLoopEval<EOT> default_loop;
|
|
||||||
class eoDummyEval : public eoEvalFunc<EOT> {public: void operator()(EOT &) {} } dummy_eval;
|
class eoDummyEval : public eoEvalFunc<EOT> {public: void operator()(EOT &) {} } dummy_eval;
|
||||||
|
eoPopLoopEval<EOT> default_loop;
|
||||||
|
eoPopEvalFunc<EOT>& pop_eval;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,8 @@ class eoNSGA_IIa_Eval : public eoMOEval<EOT>
|
||||||
for (unsigned i = 0; i < offspring.size(); ++i) pop.push_back(&offspring[i]);
|
for (unsigned i = 0; i < offspring.size(); ++i) pop.push_back(&offspring[i]);
|
||||||
|
|
||||||
typename eoFrontSorter<EOT>::front_t front = sorter(pop);
|
typename eoFrontSorter<EOT>::front_t front = sorter(pop);
|
||||||
|
|
||||||
|
|
||||||
unsigned rank = parents.size();
|
unsigned rank = pop.size();
|
||||||
for (unsigned i = 0; i < front.size(); ++i) {
|
for (unsigned i = 0; i < front.size(); ++i) {
|
||||||
rank = assign_worths(front[i], rank, pop);
|
rank = assign_worths(front[i], rank, pop);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ public :
|
||||||
eoNSGA_I_Eval(double nicheWidth, eoEvalFunc<EOT>& eval) : eoMOEval<EOT>(eval), nicheSize(nicheWidth) {}
|
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) {}
|
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);
|
eval(parents, offspring);
|
||||||
|
|
||||||
std::vector<EOT*> pop;
|
std::vector<EOT*> pop;
|
||||||
|
|
|
||||||
Reference in a new issue