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
|
|
@ -39,32 +39,32 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
|
||||
#include "moTestClass.h"
|
||||
|
||||
int main(){
|
||||
int main() {
|
||||
|
||||
std::cout << "[t-moLocalSearch] => START" << std::endl;
|
||||
std::cout << "[t-moLocalSearch] => START" << std::endl;
|
||||
|
||||
|
||||
|
||||
bitNeighborhood nh(8);
|
||||
oneMaxEval<bitVector> fullEval;
|
||||
evalOneMax eval(8);
|
||||
moTrueContinuator<bitNeighbor> cont;
|
||||
moSolNeighborComparator<bitNeighbor> sncomp;
|
||||
moNeighborComparator<bitNeighbor> ncomp;
|
||||
moSimpleHCexplorer<bitNeighbor> explorer(nh, eval, ncomp, sncomp);
|
||||
moLocalSearch<bitNeighbor> test(explorer, cont, fullEval);
|
||||
bitNeighborhood nh(8);
|
||||
oneMaxEval<bitVector> fullEval;
|
||||
evalOneMax eval(8);
|
||||
moTrueContinuator<bitNeighbor> cont;
|
||||
moSolNeighborComparator<bitNeighbor> sncomp;
|
||||
moNeighborComparator<bitNeighbor> ncomp;
|
||||
moSimpleHCexplorer<bitNeighbor> explorer(nh, eval, ncomp, sncomp);
|
||||
moLocalSearch<bitNeighbor> test(explorer, cont, fullEval);
|
||||
|
||||
bitVector sol(8, true);
|
||||
bitVector sol(8, true);
|
||||
|
||||
test(sol);
|
||||
test(sol);
|
||||
|
||||
assert(sol.fitness()==0);
|
||||
for(unsigned int i=0; i<sol.size(); i++)
|
||||
assert(!sol[i]);
|
||||
assert(sol.fitness()==0);
|
||||
for (unsigned int i=0; i<sol.size(); i++)
|
||||
assert(!sol[i]);
|
||||
|
||||
|
||||
std::cout << "[t-moLocalSearch] => OK" << std::endl;
|
||||
std::cout << "[t-moLocalSearch] => OK" << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue