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:
parent
0de879a09b
commit
1ee68125fd
1 changed files with 12 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue