Small change in the Lesson6 neutralWalk.cpp

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1938 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
verel 2010-09-20 10:13:49 +00:00
commit 1ee68125fd

View file

@ -159,6 +159,18 @@ void main_function(int argc, char **argv)
// Initial Solution of the random neutral walk
Indi initialSol(vecSize, false);
// nearly 2 blocks are complete
for (unsigned i = 0; i < blockSize - 1; i++) {
initialSol[i] = true;
initialSol[blockSize + i] = true;
initialSol[2 * blockSize + i] = true;
}
// first block is complete
initialSol[blockSize - 1] = true;
// evaluation of the initial solution
fullEval(initialSol);
// Hamming distance
eoHammingDistance<Indi> distance;
@ -176,17 +188,6 @@ void main_function(int argc, char **argv)
*
* ========================================================= */
// nearly 2 blocks are complete
for (unsigned i = 0; i < blockSize - 1; i++) {
initialSol[i] = true;
initialSol[blockSize + i] = true;
initialSol[2 * blockSize + i] = true;
}
// first block is complete
initialSol[blockSize - 1] = true;
fullEval(initialSol);
std::cout << "Initial Solution: " << initialSol << std::endl;
// the sampling