From 93bbc50dd255eadb7ab33cb53130ffbeb1bd922f Mon Sep 17 00:00:00 2001 From: liefooga Date: Thu, 28 Feb 2008 13:54:03 +0000 Subject: [PATCH] add test for MOEO git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1014 331e1502-861f-0410-8da2-ba01fb791d7f --- trunk/paradiseo-moeo/test/t-moeo.cpp | 33 +++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/trunk/paradiseo-moeo/test/t-moeo.cpp b/trunk/paradiseo-moeo/test/t-moeo.cpp index d3f1b7819..4bd6388ef 100644 --- a/trunk/paradiseo-moeo/test/t-moeo.cpp +++ b/trunk/paradiseo-moeo/test/t-moeo.cpp @@ -37,18 +37,45 @@ // t-moeo.cpp //----------------------------------------------------------------------------- -#include // MOEO +#include +#include //----------------------------------------------------------------------------- +class ObjectiveVectorTraits : public moeoObjectiveVectorTraits +{ +public: + static bool minimizing (int i) + { + return true; + } + static bool maximizing (int i) + { + return false; + } + static unsigned int nObjectives () + { + return 2; + } +}; + +typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; + +typedef MOEO < ObjectiveVector, double, double > Solution; //----------------------------------------------------------------------------- int main() { - std::cout << "Please fill the test" << std::endl; - return 0; + std::cout << "[MOEO]\t=>\t"; + + // solutions + Solution sol1, sol2; + + std::cout << "OK" << std::endl; + return EXIT_SUCCESS; + } //-----------------------------------------------------------------------------