1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| void operator()(eoPop<EOT>& _parents,eoPop<EOT>& _offspring)
{ eoPop<EOT> offspringnew, empty_pop;
unsigned d= 1;
EOT eo ;
reduce(_parents, _parents.size() - d);
std::vector <bool> b(7129);
for (int j=0;j<7129;j++)
{b[j]=rng.flip();
cout << "la valeur de b";
cout <<b[j];
cout<<"le num";
cout<<j;}
eo.setB(b);
cout << eo;
eo.invalidate();
cout << "the new size is ";
cout << eo.size ();
//pushback new to offsprings
offspringnew.push_back(eo);
cout<<offspringnew.size();
apply<EOT>(eval,offspringnew);
merge(offspringnew,_parents);
// cout << "the new size of parents is ";
} |