aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2010-12-12 15:40:01 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2010-12-12 15:40:01 +0000
commitb3e9a3d2acc6be6648977957adc2ed17df925637 (patch)
tree65f2986db97c6f609493c00e20db5b674dc43c50
parent2da52222a3310d6e204392b02c0c43c346e1b22b (diff)
downloadopt-utilities-b3e9a3d2acc6be6648977957adc2ed17df925637.tar.bz2
git-svn-id: file:///home/svn/opt_utilities@146 ed2142bd-67ad-457f-ba7c-d818d4011675
-rw-r--r--dynamical_fit/dynamical_fit.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/dynamical_fit/dynamical_fit.cpp b/dynamical_fit/dynamical_fit.cpp
index 196df0d..23646f7 100644
--- a/dynamical_fit/dynamical_fit.cpp
+++ b/dynamical_fit/dynamical_fit.cpp
@@ -6,6 +6,7 @@
#include <fstream>
#include <string>
#include <methods/powell/powell_method.hpp>
+#include <methods/gsl_simplex/gsl_simplex.hpp>
#include <statistics/chisq.hpp>
#include <cstdlib>
@@ -22,8 +23,11 @@ int main(int argc,char* argv[])
}
ifstream cfg_file(argv[1]);
fitter<double,double,std::vector<double>,double,std::string> fit;
+ chisq<double,double,vector<double>,double,string> stat;
+ stat.verbose(true);
fit.set_opt_method(powell_method<double,vector<double> >());
- fit.set_statistic(chisq<double,double,vector<double>,double,string>());
+ //
+ fit.set_statistic(stat);
std::string model_so_name;
cfg_file>>model_so_name;
cerr<<"loading model shared object "<<model_so_name<<endl;
@@ -59,6 +63,8 @@ int main(int argc,char* argv[])
fit.set_precision(1e-5);
fit.fit();
+ fit.set_opt_method(gsl_simplex<double,vector<double> >());
+ fit.fit();
fit.fit();
vector<double> p=fit.fit();