add test for MOEO
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1014 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
94f96a88d7
commit
93bbc50dd2
1 changed files with 30 additions and 3 deletions
|
|
@ -37,18 +37,45 @@
|
|||
// t-moeo.cpp
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <core/MOEO.h> // MOEO
|
||||
#include <eo>
|
||||
#include <moeo>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue