00001
00020 #include "problemeasy.h"
00021 #include "functions.h"
00022
00023 ProblemEasy::ProblemEasy(unsigned int dim) {
00024 m_ndim = dim;
00025 }
00026
00027 ProblemEasy::~ProblemEasy(void) {
00028 }
00029
00030 ConfigProblem *ProblemEasy::get(unsigned int fun) {
00031 ConfigProblem* prob = new ConfigProblem();
00032 prob->setDimension(m_ndim);
00033 double min = -2.56;
00034 double max = 5.12;
00035
00036 for (unsigned i = 0; i < m_ndim; ++i) {
00037 prob->setDomainValues(i, min, max, true);
00038 }
00039
00040
00041 prob->setOptimize(minimize, 0);
00042
00043
00044 prob->setEval(sphere);
00045
00046 return prob;
00047 }