IndexNeighborhoods rajoutées
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1668 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
a7c4dc4136
commit
1bd2d3e18b
12 changed files with 451 additions and 101 deletions
|
|
@ -31,7 +31,7 @@ LINK_DIRECTORIES(${PARADISEO_EO_BIN_DIR}/lib)
|
|||
SET (TEST_LIST
|
||||
t-moNeighbor
|
||||
t-moBitNeighbor
|
||||
t-moBitNeighborhood
|
||||
t-moOrderNeighborhood
|
||||
t-moFullEvalByCopy
|
||||
t-moFullEvalByModif
|
||||
t-moSimpleHCexplorer)
|
||||
|
|
|
|||
|
|
@ -51,10 +51,6 @@ int main(){
|
|||
moBitNeighbor<int> test1;
|
||||
assert(test1.index()==0);
|
||||
|
||||
//verif du constructeur indiquant le bit
|
||||
moBitNeighbor<int> hop(34);
|
||||
assert(hop.index()==34);
|
||||
|
||||
//verif du setter d'index et du constructeur de copy
|
||||
test1.index(6);
|
||||
test1.fitness(2);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
<t-moBitNeighborhood.cpp>
|
||||
<t-moOrderNeighborhood.cpp>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
||||
|
||||
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau
|
||||
|
|
@ -32,14 +32,16 @@
|
|||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#include <neighborhood/moBitNeighborhood.h>
|
||||
#include <neighborhood/moOrderNeighborhood.h>
|
||||
#include <neighborhood/moBitNeighbor.h>
|
||||
#include <ga/eoBit.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cassert>
|
||||
|
||||
int main(){
|
||||
|
||||
std::cout << "[t-moBitNeighborhood] => START" << std::endl;
|
||||
std::cout << "[t-moOrderNeighborhood] => START" << std::endl;
|
||||
|
||||
//init sol
|
||||
eoBit<int> sol;
|
||||
|
|
@ -50,7 +52,7 @@ int main(){
|
|||
moBitNeighbor<int> neighbor;
|
||||
|
||||
//verif du constructeur vide
|
||||
moBitNeighborhood<moBitNeighbor<int> > test;
|
||||
moOrderNeighborhood<moBitNeighbor<int> > test(3);
|
||||
assert(test.position()==0);
|
||||
|
||||
//verif du hasneighbor
|
||||
|
|
@ -72,6 +74,6 @@ int main(){
|
|||
test.next(sol, neighbor);
|
||||
assert(!test.cont(sol));
|
||||
|
||||
std::cout << "[t-moBitNeighborhood] => OK" << std::endl;
|
||||
std::cout << "[t-moOrderNeighborhood] => OK" << std::endl;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue