Encore du nettoyage
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1814 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
3d8057ac4d
commit
02e5cfb6c0
66 changed files with 987 additions and 1785 deletions
|
|
@ -34,36 +34,36 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
#include <continuator/moNeighborEvalContinuator.h>
|
||||
#include "moTestClass.h"
|
||||
|
||||
int main(){
|
||||
int main() {
|
||||
|
||||
std::cout << "[t-moNeighborEvalContinuator] => START" << std::endl;
|
||||
std::cout << "[t-moNeighborEvalContinuator] => START" << std::endl;
|
||||
|
||||
evalOneMax moEval(2);
|
||||
moEvalCounter<bitNeighbor> evalCount(moEval);
|
||||
moNeighborEvalContinuator<bitNeighbor> test(evalCount, 3);
|
||||
evalOneMax moEval(2);
|
||||
moEvalCounter<bitNeighbor> evalCount(moEval);
|
||||
moNeighborEvalContinuator<bitNeighbor> test(evalCount, 3);
|
||||
|
||||
bitVector sol;
|
||||
sol.push_back(true);
|
||||
sol.push_back(false);
|
||||
bitVector sol;
|
||||
sol.push_back(true);
|
||||
sol.push_back(false);
|
||||
|
||||
bitNeighbor n;
|
||||
sol.fitness(1);
|
||||
bitNeighbor n;
|
||||
sol.fitness(1);
|
||||
|
||||
test.init(sol);
|
||||
evalCount(sol,n);
|
||||
assert(test.value()==1);
|
||||
evalCount(sol,n);
|
||||
assert(test.value()==2);
|
||||
assert(test(sol));
|
||||
evalCount(sol,n);
|
||||
assert(test.value()==3);
|
||||
assert(!test(sol));
|
||||
test.init(sol);
|
||||
assert(test.value()==0);
|
||||
assert(test(sol));
|
||||
test.init(sol);
|
||||
evalCount(sol,n);
|
||||
assert(test.value()==1);
|
||||
evalCount(sol,n);
|
||||
assert(test.value()==2);
|
||||
assert(test(sol));
|
||||
evalCount(sol,n);
|
||||
assert(test.value()==3);
|
||||
assert(!test(sol));
|
||||
test.init(sol);
|
||||
assert(test.value()==0);
|
||||
assert(test(sol));
|
||||
|
||||
std::cout << "[t-moNeighborEvalContinuator] => OK" << std::endl;
|
||||
std::cout << "[t-moNeighborEvalContinuator] => OK" << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue