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,33 +34,33 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
#include <eval/moEvalCounter.h>
|
||||
#include "moTestClass.h"
|
||||
|
||||
int main(){
|
||||
int main() {
|
||||
|
||||
std::cout << "[t-moEvalCounter] => START" << std::endl;
|
||||
std::cout << "[t-moEvalCounter] => START" << std::endl;
|
||||
|
||||
evalOneMax eval(4);
|
||||
bitVector sol;
|
||||
sol.resize(4);
|
||||
sol[0]=true;
|
||||
sol[1]=false;
|
||||
sol[2]=true;
|
||||
sol[3]=true;
|
||||
sol.fitness(3);
|
||||
bitNeighbor n;
|
||||
n.index(2);
|
||||
evalOneMax eval(4);
|
||||
bitVector sol;
|
||||
sol.resize(4);
|
||||
sol[0]=true;
|
||||
sol[1]=false;
|
||||
sol[2]=true;
|
||||
sol[3]=true;
|
||||
sol.fitness(3);
|
||||
bitNeighbor n;
|
||||
n.index(2);
|
||||
|
||||
moEvalCounter<bitNeighbor> test(eval);
|
||||
moEvalCounter<bitNeighbor> test(eval);
|
||||
|
||||
test(sol,n);
|
||||
assert(test.value()==1);
|
||||
assert(n.fitness()==2);
|
||||
n.index(1);
|
||||
test(sol,n);
|
||||
assert(test.value()==2);
|
||||
assert(n.fitness()==4);
|
||||
test(sol,n);
|
||||
assert(test.value()==1);
|
||||
assert(n.fitness()==2);
|
||||
n.index(1);
|
||||
test(sol,n);
|
||||
assert(test.value()==2);
|
||||
assert(n.fitness()==4);
|
||||
|
||||
std::cout << "[t-moEvalCounter] => OK" << std::endl;
|
||||
std::cout << "[t-moEvalCounter] => OK" << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue