aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2011-07-15 17:20:30 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2011-07-15 17:20:30 +0000
commit6ec6b9f69b44b03363381210ed635cb3798d7413 (patch)
tree3b145e16a07a0efe8e87d302ecea4a4439f172c5
parentc9d59463a3d9059ebb09aa06610866438c36fba6 (diff)
downloadopt-utilities-6ec6b9f69b44b03363381210ed635cb3798d7413.tar.bz2
git-svn-id: file:///home/svn/opt_utilities@214 ed2142bd-67ad-457f-ba7c-d818d4011675
-rw-r--r--misc/opt_all.hpp13
-rw-r--r--vmodels/quad_pl.hpp14
2 files changed, 20 insertions, 7 deletions
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 <core/opt_exception.hpp>
+#include <statistics/chisq.hpp>
+#include <statistics/cstat.hpp>
+#include <statistics/leastsq.hpp>
+#include <methods/aga/aga.hpp>
+#include <methods/powell/powell_method.hpp>
+#include <methods/lbfgs/lbfgs_method.hpp>
+#include <methods/bfgs/bfgs.hpp>
+#include <methods/gsl_simplex/gsl_simplex.hpp>
+#include <data_sets/default_data_set.hpp>
+#include <data_sets/sorted_data_set.hpp>
+#include <data_sets/shared_table_data_set.hpp>
+#include <core/freeze_param.hpp>
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<optvec<T> >("a",1));
- this->push_param_info(param_info<optvec<T> >("b",1));
- this->push_param_info(param_info<optvec<T> >("c",1));
+ this->push_param_info(param_info<optvec<T> >("norm",1));
+ this->push_param_info(param_info<optvec<T> >("gamma",1));
+ this->push_param_info(param_info<optvec<T> >("corr",1));
}
optvec<T> do_eval(const optvec<T>& x,const optvec<T>& 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: