diff options
-rw-r--r-- | misc/opt_all.hpp | 13 | ||||
-rw-r--r-- | vmodels/quad_pl.hpp | 14 |
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: |