aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2009-09-06 17:06:20 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2009-09-06 17:06:20 +0000
commit81860e1b50373d070ab8ff2a0d6e8bff44b0216a (patch)
tree9e04760538e8c467df770ec3cffc07b0aa98d8c6 /core
parent6d41f389dc7681b15bd29764b4faa4598362e416 (diff)
downloadopt-utilities-81860e1b50373d070ab8ff2a0d6e8bff44b0216a.tar.bz2
git-svn-id: file:///home/svn/opt_utilities@64 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'core')
-rw-r--r--core/fitter.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/core/fitter.hpp b/core/fitter.hpp
index 5a2cba4..d38b437 100644
--- a/core/fitter.hpp
+++ b/core/fitter.hpp
@@ -709,6 +709,25 @@ namespace opt_utilities
return get_num_params();
}
+ /**
+ \param pinfo param information being set
+ */
+ void set_param_info(const param_info<Tp,Tstr>& pinfo)
+ {
+ for(typename std::vector<param_info<Tp,Tstr> >::iterator i=param_info_list.begin();
+ i!=param_info_list.end();++i)
+ {
+ if(i->get_name()==pinfo.get_name())
+ {
+ i->set_value(pinfo.get_value());
+ i->set_lower_limit(pinfo.get_lower_limit());
+ i->set_upper_limit(pinfo.get_upper_limit());
+ return;
+ }
+ }
+ throw param_not_found();
+ }
+
/**
\param pname the name of the parameter
@@ -1387,6 +1406,20 @@ namespace opt_utilities
return p_model->get_param_info(pname).get_upper_limit();
}
+
+ /**
+ \param pinfo the param information being set
+ */
+
+ void set_param_info(const param_info<Tp,Tstr>& pinfo)
+ {
+ if(p_model==0)
+ {
+ throw model_undefined();
+ }
+ p_model->set_param_info(pinfo);
+ }
+
/**
get the param_info of a parameter