Encore du nettoyage

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1814 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jhumeau 2010-05-17 15:11:48 +00:00
commit 02e5cfb6c0
66 changed files with 987 additions and 1785 deletions

View file

@ -34,79 +34,79 @@ Contact: paradiseo-help@lists.gforge.inria.fr
#include <continuator/moVectorMonitor.h>
#include "moTestClass.h"
int main(){
int main() {
std::cout << "[t-moVectorMonitor] => START" << std::endl;
std::cout << "[t-moVectorMonitor] => START" << std::endl;
eoValueParam<double> doubleParam;
eoValueParam<unsigned int> intParam;
eoValueParam<bitVector> eotParam;
eoValueParam<std::string> stringParam;
doubleParam.value()= 3.1;
intParam.value()=6;
bitVector sol(4,true);
sol.fitness(0);
eotParam.value()=sol;
eoValueParam<double> doubleParam;
eoValueParam<unsigned int> intParam;
eoValueParam<bitVector> eotParam;
eoValueParam<std::string> stringParam;
doubleParam.value()= 3.1;
intParam.value()=6;
bitVector sol(4,true);
sol.fitness(0);
eotParam.value()=sol;
moVectorMonitor<bitVector> test1(doubleParam);
moVectorMonitor<bitVector> test2(intParam);
moVectorMonitor<bitVector> test3(eotParam);
moVectorMonitor<bitVector> test4(stringParam);
moVectorMonitor<bitVector> test1(doubleParam);
moVectorMonitor<bitVector> test2(intParam);
moVectorMonitor<bitVector> test3(eotParam);
moVectorMonitor<bitVector> test4(stringParam);
assert(!test1.solutionType());
assert(!test2.solutionType());
assert(test3.solutionType());
assert(!test1.solutionType());
assert(!test2.solutionType());
assert(test3.solutionType());
test1();
test2();
test3();
doubleParam.value()= 3.3;
intParam.value()=7;
sol.fitness(1);
eotParam.value()=sol;
test1();
test2();
test3();
doubleParam.value()= 3.6;
intParam.value()=8;
sol.fitness(2);
eotParam.value()=sol;
test1();
test2();
test3();
doubleParam.value()= 3.001;
intParam.value()=9;
test1();
test2();
test1();
test2();
test3();
doubleParam.value()= 3.3;
intParam.value()=7;
sol.fitness(1);
eotParam.value()=sol;
test1();
test2();
test3();
doubleParam.value()= 3.6;
intParam.value()=8;
sol.fitness(2);
eotParam.value()=sol;
test1();
test2();
test3();
doubleParam.value()= 3.001;
intParam.value()=9;
test1();
test2();
assert(test1.size()==4);
assert(test2.size()==4);
assert(test3.size()==3);
assert(test1.getValue(1)=="3.3");
assert(test2.getValue(2)=="8");
std::cout << test3.getValue(2) << std::endl;
assert(test1.getValues()[0]==3.1);
assert(test2.getValues()[2]==8);
assert(test3.getSolutions()[0].fitness()==0);
assert(test1.size()==4);
assert(test2.size()==4);
assert(test3.size()==3);
assert(test1.getValue(1)=="3.3");
assert(test2.getValue(2)=="8");
std::cout << test3.getValue(2) << std::endl;
assert(test1.getValues()[0]==3.1);
assert(test2.getValues()[2]==8);
assert(test3.getSolutions()[0].fitness()==0);
test1.fileExport("outputTestVectorMonitor.txt");
test1.fileExport("outputTestVectorMonitor.txt");
test1.clear();
test2.clear();
test3.clear();
assert(test1.size()==0);
assert(test2.size()==0);
assert(test3.size()==0);
test1.clear();
test2.clear();
test3.clear();
assert(test1.size()==0);
assert(test2.size()==0);
assert(test3.size()==0);
assert(test1.className()=="moVectorMonitor");
assert(test1.className()=="moVectorMonitor");
std::cout << "[t-moVectorMonitor] => OK" << std::endl;
std::cout << "[t-moVectorMonitor] => OK" << std::endl;
return EXIT_SUCCESS;
return EXIT_SUCCESS;
}