From cad0320e57fdc5d28b03d897bef03f5ca996f154 Mon Sep 17 00:00:00 2001 From: jhumeau Date: Thu, 18 Mar 2010 11:34:06 +0000 Subject: [PATCH] test and documentation added git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1698 331e1502-861f-0410-8da2-ba01fb791d7f --- .../src/continuator/moCounterMonitorSaver.h | 56 ++++++---- .../src/continuator/moNeighborhoodStat.h | 4 +- .../newMo/src/continuator/moSolutionStat.h | 27 +++-- branches/newMo/src/continuator/moStat.h | 20 +++- branches/newMo/src/continuator/moStatBase.h | 13 ++- .../newMo/src/explorer/moSimpleHCexplorer.h | 8 ++ .../src/neighborhood/moIndexNeighborhood.h | 8 ++ .../newMo/src/neighborhood/moNeighborhood.h | 4 +- .../src/neighborhood/moOrderNeighborhood.h | 8 ++ .../neighborhood/moRndWithReplNeighborhood.h | 8 ++ .../moRndWithoutReplNeighborhood.h | 8 ++ branches/newMo/test/CMakeLists.txt | 2 + branches/newMo/test/t-moBitNeighbor.cpp | 1 + .../newMo/test/t-moCounterMonitorSaver.cpp | 105 ++++++++++++++++++ branches/newMo/test/t-moDistanceStat.cpp | 1 + branches/newMo/test/t-moFitnessStat.cpp | 2 +- branches/newMo/test/t-moNeighbor.cpp | 1 + .../newMo/test/t-moNeighborComparator.cpp | 1 + branches/newMo/test/t-moNeighborhoodStat.cpp | 8 ++ branches/newMo/test/t-moOrderNeighborhood.cpp | 2 + .../test/t-moRndWithReplNeighborhood.cpp | 1 + .../test/t-moRndWithoutReplNeighborhood.cpp | 2 + branches/newMo/test/t-moSimpleHCexplorer.cpp | 2 + .../newMo/test/t-moSolNeighborComparator.cpp | 1 + branches/newMo/test/t-moSolutionStat.cpp | 63 +++++++++++ 25 files changed, 318 insertions(+), 38 deletions(-) create mode 100644 branches/newMo/test/t-moCounterMonitorSaver.cpp create mode 100644 branches/newMo/test/t-moSolutionStat.cpp diff --git a/branches/newMo/src/continuator/moCounterMonitorSaver.h b/branches/newMo/src/continuator/moCounterMonitorSaver.h index ae46fb024..3d42b9a3a 100644 --- a/branches/newMo/src/continuator/moCounterMonitorSaver.h +++ b/branches/newMo/src/continuator/moCounterMonitorSaver.h @@ -46,33 +46,51 @@ class moCounterMonitorSaver : public eoUpdater { public : - moCounterMonitorSaver(unsigned _interval, eoMonitor& _mon) : interval(_interval), counter(0) { - monitors.push_back(&_mon); - } - - void operator()(void) { - - if (++counter % interval == 0) - for (unsigned i = 0; i < monitors.size(); ++i) - (*monitors[i])(); - + /** + * Default Constructor + * @param _interval frequency to call monitors + * @param _mon a monitor + */ + moCounterMonitorSaver(unsigned _interval, eoMonitor& _mon) : interval(_interval), counter(0) { + monitors.push_back(&_mon); } - void lastCall(void) { - for (unsigned i = 0; i < monitors.size(); ++i) - monitors[i]->lastCall(); + /** + * call monitors if interval is reach by a counter + */ + void operator()(void) { + if (counter++ % interval == 0) + for (unsigned i = 0; i < monitors.size(); i++) + (*monitors[i])(); } - void add(eoMonitor& _mon) { - monitors.push_back(&_mon); - } + /** + * last call of monitors + */ + void lastCall(void) { + for (unsigned i = 0; i < monitors.size(); i++) + monitors[i]->lastCall(); + } - virtual std::string className(void) const { return "moCounterMonitorSaver"; } + /** + * attach another monitor to this class + * @param _mon the monitor to attach + */ + void add(eoMonitor& _mon) { + monitors.push_back(&_mon); + } + + /** + * @return name of the class + */ + virtual std::string className(void) const { return "moCounterMonitorSaver"; } private : - unsigned interval, counter; + /** interval and counter value */ + unsigned int interval, counter; - std::vector monitors; + /** monitor's vector */ + std::vector monitors; }; diff --git a/branches/newMo/src/continuator/moNeighborhoodStat.h b/branches/newMo/src/continuator/moNeighborhoodStat.h index 128eec6d9..153c7970a 100644 --- a/branches/newMo/src/continuator/moNeighborhoodStat.h +++ b/branches/newMo/src/continuator/moNeighborhoodStat.h @@ -206,7 +206,9 @@ public : /** * @return the class name */ - virtual std::string className(void) const { return "moNeigborhoodStat"; } + virtual std::string className(void) const { + return "moNeighborhoodStat"; + } private: diff --git a/branches/newMo/src/continuator/moSolutionStat.h b/branches/newMo/src/continuator/moSolutionStat.h index 229b047ea..92f1d353f 100644 --- a/branches/newMo/src/continuator/moSolutionStat.h +++ b/branches/newMo/src/continuator/moSolutionStat.h @@ -39,25 +39,36 @@ /** * The statistic which only give the current solution - * becarefull, the solution is given by copy + * be careful, the solution is given by copy * -*/ + */ template class moSolutionStat : public moStat { public : using moStat< EOT, EOT >::value; - moSolutionStat(std::string _description = "solution") - : moStat(EOT(), _description) - {} + /** + * Default Constructor + * @param _description a description of the parameter + */ + moSolutionStat(std::string _description = "solution"): + moStat(EOT(), _description){} - virtual void operator()(EOT & _sol) - { + /** + * Set the solution by copy + * @param _sol the corresponding solution + */ + virtual void operator()(EOT & _sol){ value() = _sol; } - virtual std::string className(void) const { return "moSolutionStat"; } + /** + * @return name of the class + */ + virtual std::string className(void) const{ + return "moSolutionStat"; + } }; #endif diff --git a/branches/newMo/src/continuator/moStat.h b/branches/newMo/src/continuator/moStat.h index 6c988ead2..955aefeb0 100644 --- a/branches/newMo/src/continuator/moStat.h +++ b/branches/newMo/src/continuator/moStat.h @@ -41,18 +41,26 @@ * The actual class that will be used as base for all statistics * that need to be calculated over the solution * It is a moStatBase AND an eoValueParam so it can be used in Monitors. -*/ + */ template class moStat : public eoValueParam, public moStatBase { public: - moStat(T _value, std::string _description) - : eoValueParam(_value, _description) - {} + /** + * Default Constructor + * @param _value a default parameter's value + * @param _description a description of the parameter + */ + moStat(T _value, std::string _description): + eoValueParam(_value, _description){} - virtual std::string className(void) const - { return "moStat"; } + /** + * @return name of the class + */ + virtual std::string className(void) const{ + return "moStat"; + } }; diff --git a/branches/newMo/src/continuator/moStatBase.h b/branches/newMo/src/continuator/moStatBase.h index 9da048a64..b6ef3afd2 100644 --- a/branches/newMo/src/continuator/moStatBase.h +++ b/branches/newMo/src/continuator/moStatBase.h @@ -49,8 +49,17 @@ template class moStatBase : public eoUF { public: - virtual void lastCall(EOT &) {} - virtual std::string className(void) const { return "moStatBase"; } + /** + * last call of a statistical operator + */ + virtual void lastCall(EOT &) {} + + /** + * @return name of the class + */ + virtual std::string className(void) const{ + return "moStatBase"; + } }; #endif diff --git a/branches/newMo/src/explorer/moSimpleHCexplorer.h b/branches/newMo/src/explorer/moSimpleHCexplorer.h index 6a737aa4a..6c92136b2 100644 --- a/branches/newMo/src/explorer/moSimpleHCexplorer.h +++ b/branches/newMo/src/explorer/moSimpleHCexplorer.h @@ -157,6 +157,14 @@ public: return isAccept; }; + /** + * Return the class id. + * @return the class name as a std::string + */ + virtual std::string className() const { + return "moSimpleHCexplorer"; + } + private: // comparator betwenn solution and neighbor or between neighbors moNeighborComparator& neighborComparator; diff --git a/branches/newMo/src/neighborhood/moIndexNeighborhood.h b/branches/newMo/src/neighborhood/moIndexNeighborhood.h index a258aacd1..3817b0e30 100644 --- a/branches/newMo/src/neighborhood/moIndexNeighborhood.h +++ b/branches/newMo/src/neighborhood/moIndexNeighborhood.h @@ -55,6 +55,14 @@ public: */ moIndexNeighborhood(unsigned int _neighborhoodSize):neighborhoodSize(_neighborhoodSize){} + /** + * Return the class id. + * @return the class name as a std::string + */ + virtual std::string className() const { + return "moIndexNeighborhood"; + } + protected: unsigned int neighborhoodSize; }; diff --git a/branches/newMo/src/neighborhood/moNeighborhood.h b/branches/newMo/src/neighborhood/moNeighborhood.h index 80d3d8bc7..47757ff65 100644 --- a/branches/newMo/src/neighborhood/moNeighborhood.h +++ b/branches/newMo/src/neighborhood/moNeighborhood.h @@ -86,7 +86,9 @@ public: * Return the class id. * @return the class name as a std::string */ - virtual std::string className() const { return "moNeighborhood"; } + virtual std::string className() const { + return "moNeighborhood"; + } }; #endif diff --git a/branches/newMo/src/neighborhood/moOrderNeighborhood.h b/branches/newMo/src/neighborhood/moOrderNeighborhood.h index dc8f2806e..fa3f7ef0d 100644 --- a/branches/newMo/src/neighborhood/moOrderNeighborhood.h +++ b/branches/newMo/src/neighborhood/moOrderNeighborhood.h @@ -109,6 +109,14 @@ public: return currentIndex; } + /** + * Return the class id. + * @return the class name as a std::string + */ + virtual std::string className() const { + return "moOrderNeighborhood"; + } + private: unsigned int currentIndex; diff --git a/branches/newMo/src/neighborhood/moRndWithReplNeighborhood.h b/branches/newMo/src/neighborhood/moRndWithReplNeighborhood.h index 52928b2b2..9fb27ea86 100644 --- a/branches/newMo/src/neighborhood/moRndWithReplNeighborhood.h +++ b/branches/newMo/src/neighborhood/moRndWithReplNeighborhood.h @@ -97,6 +97,14 @@ public: return neighborhoodSize > 0; } + /** + * Return the class id. + * @return the class name as a std::string + */ + virtual std::string className() const { + return "moRndWithReplNeighborhood"; + } + }; #endif diff --git a/branches/newMo/src/neighborhood/moRndWithoutReplNeighborhood.h b/branches/newMo/src/neighborhood/moRndWithoutReplNeighborhood.h index 4d9725bff..94337ee71 100644 --- a/branches/newMo/src/neighborhood/moRndWithoutReplNeighborhood.h +++ b/branches/newMo/src/neighborhood/moRndWithoutReplNeighborhood.h @@ -122,6 +122,14 @@ public: return indexVector[maxIndex]; } + /** + * Return the class id. + * @return the class name as a std::string + */ + virtual std::string className() const { + return "moRndWithoutReplNeighborhood"; + } + private: unsigned int maxIndex; std::vector indexVector; diff --git a/branches/newMo/test/CMakeLists.txt b/branches/newMo/test/CMakeLists.txt index 2dbec2a13..b28e9b50c 100644 --- a/branches/newMo/test/CMakeLists.txt +++ b/branches/newMo/test/CMakeLists.txt @@ -45,6 +45,8 @@ SET (TEST_LIST t-moFitnessStat t-moDistanceStat t-moNeighborhoodStat + t-moCounterMonitorSaver + t-moSolutionStat ) FOREACH (test ${TEST_LIST}) diff --git a/branches/newMo/test/t-moBitNeighbor.cpp b/branches/newMo/test/t-moBitNeighbor.cpp index 52375f3a2..ee3bd1e68 100644 --- a/branches/newMo/test/t-moBitNeighbor.cpp +++ b/branches/newMo/test/t-moBitNeighbor.cpp @@ -79,6 +79,7 @@ int main(){ test1.printOn(std::cout); test2.printOn(std::cout); + assert(test1.className()=="moBitNeighbor"); std::cout << "[t-moBitNeighbor] => OK" << std::endl; return EXIT_SUCCESS; } diff --git a/branches/newMo/test/t-moCounterMonitorSaver.cpp b/branches/newMo/test/t-moCounterMonitorSaver.cpp new file mode 100644 index 000000000..740b76eb9 --- /dev/null +++ b/branches/newMo/test/t-moCounterMonitorSaver.cpp @@ -0,0 +1,105 @@ +/* + +Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010 + +Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau + +This software is governed by the CeCILL license under French law and +abiding by the rules of distribution of free software. You can ue, +modify and/ or redistribute the software under the terms of the CeCILL +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. + +ParadisEO WebSite : http://paradiseo.gforge.inria.fr +Contact: paradiseo-help@lists.gforge.inria.fr +*/ + +#include +#include + +#include +#include +#include + + +class monitor1 : public eoMonitor +{ +public: + + monitor1(unsigned int& _a): a(_a){} + + eoMonitor& operator()(){ + a++; + return *this; + } + + void lastCall(){ + a++; + } + +private: + unsigned int& a; +}; + +class monitor2 : public eoMonitor +{ +public: + + monitor2(unsigned int& _a): a(_a){} + + eoMonitor& operator()(){ + a++; + return *this; + } + + void lastCall(){ + a++; + } + +private: + unsigned int& a; +}; + +int main(){ + + std::cout << "[t-moCounterMonitorSaver] => START" << std::endl; + + unsigned int a=1; + unsigned int b=10; + + monitor1 mon1(a); + monitor2 mon2(b); + + moCounterMonitorSaver test(3, mon1); + test.add(mon2); + + test(); + assert(a==2 && b==11); + test(); + assert(a==2 && b==11); + test(); + assert(a==2 && b==11); + test(); + assert(a==3 && b==12); + test.lastCall(); + assert(a==4 && b==13); + + assert(test.className()=="moCounterMonitorSaver"); + std::cout << "[t-moCounterMonitorSaver] => OK" << std::endl; + + return EXIT_SUCCESS; +} + diff --git a/branches/newMo/test/t-moDistanceStat.cpp b/branches/newMo/test/t-moDistanceStat.cpp index 3f3909143..8ed407839 100644 --- a/branches/newMo/test/t-moDistanceStat.cpp +++ b/branches/newMo/test/t-moDistanceStat.cpp @@ -63,6 +63,7 @@ int main(){ test(sol3); assert(test.value()==1); + assert(test.className()=="moDistanceStat"); std::cout << "[t-moDistanceStat] => OK" << std::endl; return EXIT_SUCCESS; diff --git a/branches/newMo/test/t-moFitnessStat.cpp b/branches/newMo/test/t-moFitnessStat.cpp index c705896a6..34d221508 100644 --- a/branches/newMo/test/t-moFitnessStat.cpp +++ b/branches/newMo/test/t-moFitnessStat.cpp @@ -49,7 +49,7 @@ int main(){ test(sol); assert(test.value()==12); - + assert(test.className()=="moFitnessStat"); std::cout << "[t-moFitnessStat] => OK" << std::endl; return EXIT_SUCCESS; diff --git a/branches/newMo/test/t-moNeighbor.cpp b/branches/newMo/test/t-moNeighbor.cpp index 60dc8d1b0..e5ca0ccee 100644 --- a/branches/newMo/test/t-moNeighbor.cpp +++ b/branches/newMo/test/t-moNeighbor.cpp @@ -56,6 +56,7 @@ int main(){ test2.printOn(std::cout); test3.printOn(std::cout); + assert(test1.className()=="moNeighbor"); std::cout << "[t-moNeighbor] => OK" << std::endl; return EXIT_SUCCESS; diff --git a/branches/newMo/test/t-moNeighborComparator.cpp b/branches/newMo/test/t-moNeighborComparator.cpp index 5d694bebf..2f305e597 100644 --- a/branches/newMo/test/t-moNeighborComparator.cpp +++ b/branches/newMo/test/t-moNeighborComparator.cpp @@ -62,6 +62,7 @@ int main(){ neighbor2.fitness(3); assert(test.equals(neighbor1,neighbor2)); + assert(test.className()=="moNeighborComparator"); std::cout << "[t-moNeighborComparator] => OK" << std::endl; return EXIT_SUCCESS; } diff --git a/branches/newMo/test/t-moNeighborhoodStat.cpp b/branches/newMo/test/t-moNeighborhoodStat.cpp index 043974e10..1d15665ae 100644 --- a/branches/newMo/test/t-moNeighborhoodStat.cpp +++ b/branches/newMo/test/t-moNeighborhoodStat.cpp @@ -87,6 +87,7 @@ int main(){ assert(test.getNbInf()==3); assert(test.getNbEqual()==0); + assert(test.className()=="moNeighborhoodStat"); std::cout << "[t-moNeighborhoodStat] => OK" << std::endl; //test of moMaxNeighborStat.h @@ -94,6 +95,7 @@ int main(){ moMaxNeighborStat test2(test); test2(sol); assert(test2.value()==6); + assert(test2.className()=="moMaxNeighborStat"); std::cout << "[t-moMaxNeighborStat] => OK" << std::endl; //test of moMinNeighborStat.h @@ -101,6 +103,7 @@ int main(){ moMinNeighborStat test3(test); test3(sol); assert(test3.value()==8); + assert(test3.className()=="moMinNeighborStat"); std::cout << "[t-moMinNeighborStat] => OK" << std::endl; //test of moNbInfNeighborStat.h @@ -108,6 +111,7 @@ int main(){ moNbInfNeighborStat test4(test); test4(sol); assert(test4.value()==3); + assert(test4.className()=="moNbInfNeighborStat"); std::cout << "[t-moNbInfNeighborStat] => OK" << std::endl; //test of moNbSupNeighborStat.h @@ -115,6 +119,7 @@ int main(){ moNbSupNeighborStat test5(test); test5(sol); assert(test5.value()==7); + assert(test5.className()=="moNbSupNeighborStat"); std::cout << "[t-moNbSupNeighborStat] => OK" << std::endl; //test of moNeutralDegreeNeighborStat.h @@ -122,6 +127,7 @@ int main(){ moNeutralDegreeNeighborStat test6(test); test6(sol); assert(test6.value()==0); + assert(test6.className()=="moNeutralDegreeNeighborStat"); std::cout << "[t-moNeutralDegreeNeighborStat] => OK" << std::endl; //test of moSecondMomentNeighborStat.h @@ -130,6 +136,7 @@ int main(){ test7(sol); assert(test7.value().first==6.6); assert(test7.value().second > 0.966 && test7.value().second < 0.967); + assert(test7.className()=="moSecondMomentNeighborStat"); std::cout << "[t-moSecondMomentNeighborStat] => OK" << std::endl; //test of moSizeNeighborStat.h @@ -137,6 +144,7 @@ int main(){ moSizeNeighborStat test8(test); test8(sol); assert(test8.value()==10); + assert(test8.className()=="moSizeNeighborStat"); std::cout << "[t-moSizeNeighborStat] => OK" << std::endl; return EXIT_SUCCESS; diff --git a/branches/newMo/test/t-moOrderNeighborhood.cpp b/branches/newMo/test/t-moOrderNeighborhood.cpp index 192659bfc..1b07436dd 100644 --- a/branches/newMo/test/t-moOrderNeighborhood.cpp +++ b/branches/newMo/test/t-moOrderNeighborhood.cpp @@ -73,6 +73,8 @@ int main(){ test.next(sol, neighbor); assert(!test.cont(sol)); + assert(test.className()=="moOrderNeighborhood"); + std::cout << "[t-moOrderNeighborhood] => OK" << std::endl; return EXIT_SUCCESS; } diff --git a/branches/newMo/test/t-moRndWithReplNeighborhood.cpp b/branches/newMo/test/t-moRndWithReplNeighborhood.cpp index 4c7d29922..41c70fd57 100644 --- a/branches/newMo/test/t-moRndWithReplNeighborhood.cpp +++ b/branches/newMo/test/t-moRndWithReplNeighborhood.cpp @@ -65,6 +65,7 @@ int main(){ } + assert(test.className()=="moRndWithReplNeighborhood"); std::cout << "[t-moRndWithReplNeighborhood] => OK" << std::endl; diff --git a/branches/newMo/test/t-moRndWithoutReplNeighborhood.cpp b/branches/newMo/test/t-moRndWithoutReplNeighborhood.cpp index 582d29a69..28119afce 100644 --- a/branches/newMo/test/t-moRndWithoutReplNeighborhood.cpp +++ b/branches/newMo/test/t-moRndWithoutReplNeighborhood.cpp @@ -63,6 +63,8 @@ int main(){ assert(a==1 || b==1 || c==1); assert(a==2 || b==2 || c==2); + assert(test.className()=="moRndWithoutReplNeighborhood"); + std::cout << "[t-moRndWithoutReplNeighborhood] => OK" << std::endl; return EXIT_SUCCESS; diff --git a/branches/newMo/test/t-moSimpleHCexplorer.cpp b/branches/newMo/test/t-moSimpleHCexplorer.cpp index da0f2d7bb..8c91c7fc2 100644 --- a/branches/newMo/test/t-moSimpleHCexplorer.cpp +++ b/branches/newMo/test/t-moSimpleHCexplorer.cpp @@ -84,6 +84,8 @@ int main(){ test.accept(sol); assert(!test.isContinue(sol)); + assert(test.className()=="moSimpleHCexplorer"); + std::cout << "[t-moSimpleHCexplorer] => OK" << std::endl; return EXIT_SUCCESS; diff --git a/branches/newMo/test/t-moSolNeighborComparator.cpp b/branches/newMo/test/t-moSolNeighborComparator.cpp index b811e70e6..f3b735b99 100644 --- a/branches/newMo/test/t-moSolNeighborComparator.cpp +++ b/branches/newMo/test/t-moSolNeighborComparator.cpp @@ -65,6 +65,7 @@ int main(){ neighbor.fitness(3); assert(test.equals(sol, neighbor)); + assert(test.className()=="moSolNeighborComparator"); std::cout << "[t-moSolNeighborComparator] => OK" << std::endl; return EXIT_SUCCESS; diff --git a/branches/newMo/test/t-moSolutionStat.cpp b/branches/newMo/test/t-moSolutionStat.cpp new file mode 100644 index 000000000..9b32758b5 --- /dev/null +++ b/branches/newMo/test/t-moSolutionStat.cpp @@ -0,0 +1,63 @@ +/* + +Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010 + +Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau + +This software is governed by the CeCILL license under French law and +abiding by the rules of distribution of free software. You can ue, +modify and/ or redistribute the software under the terms of the CeCILL +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. + +ParadisEO WebSite : http://paradiseo.gforge.inria.fr +Contact: paradiseo-help@lists.gforge.inria.fr +*/ + +#include +#include "moTestClass.h" + +#include +#include +#include + +int main(){ + + std::cout << "[t-moSolutionStat] => START" << std::endl; + + eoBit s(3); + s[0]=true; + s[1]=true; + s[2]=false; + + s.fitness(17); + + moSolutionStat< eoBit > test; + + test(s); + + assert(test.value()[0]); + assert(test.value()[1]); + assert(!test.value()[2]); + assert(test.value().fitness()==17); + + assert(test.className()=="moSolutionStat"); + + std::cout << "[t-moSolutionStat] => OK" << std::endl; + + return EXIT_SUCCESS; +} +