aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_optimizer.cpp
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2009-09-05 17:32:18 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2009-09-05 17:32:18 +0000
commit35748cd7ea58c7dce30630d22f51d5d95b0c9ae8 (patch)
treee9678ee5f2a744a2ca46275eadf11d2a420643f5 /test/test_optimizer.cpp
parent07139e38b8d6baadc30443c7f20551908b3db491 (diff)
downloadopt-utilities-35748cd7ea58c7dce30630d22f51d5d95b0c9ae8.tar.bz2
git-svn-id: file:///home/svn/opt_utilities@61 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'test/test_optimizer.cpp')
-rw-r--r--test/test_optimizer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_optimizer.cpp b/test/test_optimizer.cpp
index b6d70a7..8d0b405 100644
--- a/test/test_optimizer.cpp
+++ b/test/test_optimizer.cpp
@@ -1,3 +1,5 @@
+#define private public
+#include <cassert>
#include <core/optimizer.hpp>
#include <methods/powell/powell_method.hpp>
//#include <methods/gsl_simplex/gsl_simplex.hpp>
@@ -120,8 +122,10 @@ void test_opt(const func_obj<double,vector<double> >& fo,
{
const int problem_size=5;
optimizer<double,vector<double> > opt;
- opt.set_opt_method(optm);
+
opt.set_func_obj(fo);
+ opt.set_opt_method(optm);
+
vector<double> p(problem_size);
for(int i=0;i<p.size();++i)
{