From 6ec6b9f69b44b03363381210ed635cb3798d7413 Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Fri, 15 Jul 2011 17:20:30 +0000 Subject: git-svn-id: file:///home/svn/opt_utilities@214 ed2142bd-67ad-457f-ba7c-d818d4011675 --- misc/opt_all.hpp | 13 +++++++++++++ vmodels/quad_pl.hpp | 14 +++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 misc/opt_all.hpp diff --git a/misc/opt_all.hpp b/misc/opt_all.hpp new file mode 100644 index 0000000..cff34c7 --- /dev/null +++ b/misc/opt_all.hpp @@ -0,0 +1,13 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/vmodels/quad_pl.hpp b/vmodels/quad_pl.hpp index 14ad752..592af22 100644 --- a/vmodels/quad_pl.hpp +++ b/vmodels/quad_pl.hpp @@ -31,17 +31,17 @@ namespace opt_utilities public: quad_pl() { - this->push_param_info(param_info >("a",1)); - this->push_param_info(param_info >("b",1)); - this->push_param_info(param_info >("c",1)); + this->push_param_info(param_info >("norm",1)); + this->push_param_info(param_info >("gamma",1)); + this->push_param_info(param_info >("corr",1)); } optvec do_eval(const optvec& x,const optvec& param) { - T a=get_element(param,0); - T b=get_element(param,1); - T c=get_element(param,2); - return c*exp(a*log(x)*log(x)+b*log(x)); + T norm=get_element(param,0); + T gamma=get_element(param,1); + T corr=get_element(param,2); + return norm*pow(x,gamma)*exp(corr*log(x)*log(x)); } private: -- cgit v1.2.2