git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2094 331e1502-861f-0410-8da2-ba01fb791d7f

This commit is contained in:
boufaras 2011-01-28 16:38:48 +00:00
commit f09597cccc
7 changed files with 255 additions and 79 deletions

View file

@ -13,12 +13,9 @@ class QapEval : public eoEvalFunc<EOT>
void operator() (EOT & _sol) {
int cost=0;
for (int i=0; i<n; i++)
std::cout<<_sol[i]<<" ";
std::cout<<std::endl;
for (int i=0; i<n; i++)
for (int j=0; j<n; j++)
cost += a[i][j] * b[_sol[i]][_sol[j]];
cost += a[i*n+j] * b[_sol[i]*n+_sol[j]];
_sol.fitness(cost);
}