From cefb34d3a9b5a74f746193bc16b424dfc4b56551 Mon Sep 17 00:00:00 2001 From: jhumeau Date: Thu, 27 May 2010 13:52:57 +0000 Subject: [PATCH] test sur la tabu liste de voisins git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1835 331e1502-861f-0410-8da2-ba01fb791d7f --- .../src/memory/moNeighborVectorTabuList.h | 6 +++++ .../test/t-moNeighborVectorTabuList.cpp | 25 ++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/trunk/paradiseo-mo/src/memory/moNeighborVectorTabuList.h b/trunk/paradiseo-mo/src/memory/moNeighborVectorTabuList.h index 75efade02..392cf0bd8 100644 --- a/trunk/paradiseo-mo/src/memory/moNeighborVectorTabuList.h +++ b/trunk/paradiseo-mo/src/memory/moNeighborVectorTabuList.h @@ -116,6 +116,12 @@ public: index = 0; } + void print(){ + std::cout << "TAbulist:" << std::endl; + for(int i=0; i n2 and n3 must be tabu test.add(sol, n3); - assert(!test.check(sol, n1)); - assert(test.check(sol, n2)); - assert(test.check(sol, n3)); - assert(!test.check(sol, n4)); + if(test.check(sol, n1)) + std::cout << "n1 is in tabuList" << std::endl; + if(test.check(sol, n2)) + std::cout << "n2 is in tabuList" << std::endl; + if(test.check(sol, n3)) + std::cout << "n3 is in tabuList" << std::endl; + if(test.check(sol, n4)) + std::cout << "n4 is in tabuList" << std::endl; + + test.print(); + +// assert(!test.check(sol, n1)); +// assert(test.check(sol, n2)); +// assert(test.check(sol, n3)); +// assert(!test.check(sol, n4)); //clear tabu list all neighbor must not be tabu test.init(sol);