From 7c0296b99989ac0e177a3e07e2aa40e8eb96f50c Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Tue, 25 Jan 2011 16:52:29 +0000 Subject: git-svn-id: file:///home/svn/opt_utilities@166 ed2142bd-67ad-457f-ba7c-d818d4011675 --- interface/perform_fit.hpp | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 interface/perform_fit.hpp (limited to 'interface/perform_fit.hpp') diff --git a/interface/perform_fit.hpp b/interface/perform_fit.hpp new file mode 100644 index 0000000..5ae4e6d --- /dev/null +++ b/interface/perform_fit.hpp @@ -0,0 +1,42 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace opt_utilities +{ + + template + void perform_fit(const char* model_name, + const char* method_name, + const char* statistic_name, + const datat_set& ds, + const char* froze_parameters + ) + { + fitter fit; + fit.load_data(ds); + const statistic* pstat=get_statistic(statistic_name); + fit.set_statistic(*pstat); + const opt_method* popm=get_opt_method(method_name); + fit.set_opt_method(*popm); + const model* pmo=get_model(model_name); + fit.set_model(*pmo); + fit.fit(); + } + + +} -- cgit v1.2.2