diff options
author | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2009-09-05 17:32:18 +0000 |
---|---|---|
committer | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2009-09-05 17:32:18 +0000 |
commit | 35748cd7ea58c7dce30630d22f51d5d95b0c9ae8 (patch) | |
tree | e9678ee5f2a744a2ca46275eadf11d2a420643f5 /test | |
parent | 07139e38b8d6baadc30443c7f20551908b3db491 (diff) | |
download | opt-utilities-35748cd7ea58c7dce30630d22f51d5d95b0c9ae8.tar.bz2 |
git-svn-id: file:///home/svn/opt_utilities@61 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'test')
-rw-r--r-- | test/makefile | 2 | ||||
-rw-r--r-- | test/test_optimizer.cpp | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/test/makefile b/test/makefile index a801d7b..e850e82 100644 --- a/test/makefile +++ b/test/makefile @@ -3,7 +3,7 @@ targets=test_optimizer all:$(targets) test_optimizer:test_optimizer.cpp - $(CXX) $< -o $@ -I .. -O3 + $(CXX) $< -o $@ -I .. -O3 -g clean: 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) { |