From a0d3b74adcc29c22d70da971621dd301727eb695 Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Fri, 16 Oct 2009 12:03:14 +0000 Subject: git-svn-id: file:///home/svn/opt_utilities@81 ed2142bd-67ad-457f-ba7c-d818d4011675 --- models/add_model.hpp | 6 ++++++ models/beta1d.hpp | 5 +++++ models/beta2d.hpp | 5 +++++ models/beta2d2.hpp | 5 +++++ models/bl1d.hpp | 5 +++++ models/bpl1d.hpp | 5 +++++ models/bremss.hpp | 5 +++++ models/constant.hpp | 4 ++++ models/dbeta1d.hpp | 6 ++++++ models/dbeta2d.hpp | 5 ++++- models/dbeta2d2.hpp | 5 +++++ models/dbeta2d3.hpp | 5 +++++ models/dl_model.hpp | 5 +++++ models/func_model.hpp | 5 +++++ models/gauss1d.hpp | 5 +++++ models/lin1d.hpp | 5 +++++ models/nbeta1d.hpp | 5 +++++ models/nfw1d.hpp | 5 +++++ models/pl1d.hpp | 5 +++++ models/polar_ellipse.hpp | 5 +++++ models/poly1d.hpp | 5 +++++ models/pow_model.hpp | 4 ++++ models/strmodel1d.hpp | 5 +++++ 23 files changed, 114 insertions(+), 1 deletion(-) (limited to 'models') diff --git a/models/add_model.hpp b/models/add_model.hpp index 46aa76c..1ac7dc1 100644 --- a/models/add_model.hpp +++ b/models/add_model.hpp @@ -129,6 +129,12 @@ namespace opt_utilities } } + public: + const char* do_get_type_name()const + { + return "add model"; + } + public: Ty do_eval(const Tx& x,const Tp& param) { diff --git a/models/beta1d.hpp b/models/beta1d.hpp index 79e9a67..d6468b4 100644 --- a/models/beta1d.hpp +++ b/models/beta1d.hpp @@ -16,6 +16,11 @@ namespace opt_utilities { return new beta1d(*this); } + + const char* do_get_type_name()const + { + return "1d beta model"; + } public: beta1d() { diff --git a/models/beta2d.hpp b/models/beta2d.hpp index 2955e75..6166fd3 100644 --- a/models/beta2d.hpp +++ b/models/beta2d.hpp @@ -19,6 +19,11 @@ namespace opt_utilities { return new beta2d(*this); } + + const char* do_get_type_name()const + { + return "2d beta model"; + } public: beta2d() { diff --git a/models/beta2d2.hpp b/models/beta2d2.hpp index 860d986..f42fd5f 100644 --- a/models/beta2d2.hpp +++ b/models/beta2d2.hpp @@ -19,6 +19,11 @@ namespace opt_utilities { return new beta2d2(*this); } + + const char* do_get_type_name()const + { + return "2d double beta model"; + } public: beta2d2() { diff --git a/models/bl1d.hpp b/models/bl1d.hpp index 6dd24b3..10b547f 100644 --- a/models/bl1d.hpp +++ b/models/bl1d.hpp @@ -15,6 +15,11 @@ namespace opt_utilities { return new bl1d(*this); } + + const char* do_get_type_name()const + { + return "broken linear model"; + } public: bl1d() { diff --git a/models/bpl1d.hpp b/models/bpl1d.hpp index 1c34016..29c6afd 100644 --- a/models/bpl1d.hpp +++ b/models/bpl1d.hpp @@ -15,6 +15,11 @@ namespace opt_utilities { return new bpl1d(*this); } + + const char* do_get_type_name()const + { + return "broken power law"; + } public: bpl1d() { diff --git a/models/bremss.hpp b/models/bremss.hpp index 147e724..51b1415 100644 --- a/models/bremss.hpp +++ b/models/bremss.hpp @@ -15,6 +15,11 @@ namespace opt_utilities { return new bremss(*this); } + + const char* do_get_type_name()const + { + return "Bremsstrahlung emission"; + } public: bremss() { diff --git a/models/constant.hpp b/models/constant.hpp index 666051f..ea4b85e 100644 --- a/models/constant.hpp +++ b/models/constant.hpp @@ -15,6 +15,10 @@ namespace opt_utilities { return new constant(*this); } + const char* do_get_type_name()const + { + return "constant"; + } public: constant() { diff --git a/models/dbeta1d.hpp b/models/dbeta1d.hpp index 3ecd5b1..53fa293 100644 --- a/models/dbeta1d.hpp +++ b/models/dbeta1d.hpp @@ -15,6 +15,12 @@ namespace opt_utilities { return new dbeta1d(*this); } + + const char* do_get_type_name()const + { + return "1d double beta model"; + } + public: dbeta1d() { diff --git a/models/dbeta2d.hpp b/models/dbeta2d.hpp index 89003c9..9529327 100644 --- a/models/dbeta2d.hpp +++ b/models/dbeta2d.hpp @@ -19,7 +19,10 @@ namespace opt_utilities return new dbeta2d(*this); } - + const char* do_get_type_name()const + { + return "2d double beta model"; + } public: dbeta2d() diff --git a/models/dbeta2d2.hpp b/models/dbeta2d2.hpp index e1ee307..13e4143 100644 --- a/models/dbeta2d2.hpp +++ b/models/dbeta2d2.hpp @@ -19,6 +19,11 @@ namespace opt_utilities { return new dbeta2d2(*this); } + + const char* do_get_type_name()const + { + return "2d double beta model 2"; + } public: dbeta2d2() { diff --git a/models/dbeta2d3.hpp b/models/dbeta2d3.hpp index 38052ec..560304e 100644 --- a/models/dbeta2d3.hpp +++ b/models/dbeta2d3.hpp @@ -19,6 +19,11 @@ namespace opt_utilities { return new dbeta2d3(*this); } + + const char* do_get_type_name()const + { + return "2d double beta model 3"; + } public: dbeta2d3() { diff --git a/models/dl_model.hpp b/models/dl_model.hpp index 92a9820..7221fd1 100644 --- a/models/dl_model.hpp +++ b/models/dl_model.hpp @@ -27,6 +27,11 @@ namespace opt_utilities this->handle=NULL; return result; } + + const char* do_get_type_name()const + { + return "shared object wrapping model"; + } // public: public: diff --git a/models/func_model.hpp b/models/func_model.hpp index 2234cc1..2035def 100644 --- a/models/func_model.hpp +++ b/models/func_model.hpp @@ -21,6 +21,11 @@ namespace opt_utilities return new func_model(*this); } + const char* do_get_type_name()const + { + return "function wrapping model"; + } + // public: private: func_model() diff --git a/models/gauss1d.hpp b/models/gauss1d.hpp index a31ace1..ad54510 100644 --- a/models/gauss1d.hpp +++ b/models/gauss1d.hpp @@ -15,6 +15,11 @@ namespace opt_utilities { return new gauss1d(*this); } + + const char* do_get_type_name()const + { + return "1d gaussian"; + } public: gauss1d() { diff --git a/models/lin1d.hpp b/models/lin1d.hpp index 0f6ac98..0db54ae 100644 --- a/models/lin1d.hpp +++ b/models/lin1d.hpp @@ -15,6 +15,11 @@ namespace opt_utilities { return new lin1d(*this); } + + const char* do_get_type_name()const + { + return "1d linear model"; + } public: lin1d() { diff --git a/models/nbeta1d.hpp b/models/nbeta1d.hpp index ad00201..7ae8c0c 100644 --- a/models/nbeta1d.hpp +++ b/models/nbeta1d.hpp @@ -15,6 +15,11 @@ namespace opt_utilities { return new nbeta1d(*this); } + + const char* do_get_type_name()const + { + return "1d density beta model"; + } public: nbeta1d() { diff --git a/models/nfw1d.hpp b/models/nfw1d.hpp index 4dc1970..cb1a407 100644 --- a/models/nfw1d.hpp +++ b/models/nfw1d.hpp @@ -15,6 +15,11 @@ namespace opt_utilities { return new nfw1d(*this); } + + const char* do_get_type_name()const + { + return "1d NFW model"; + } public: nfw1d() { diff --git a/models/pl1d.hpp b/models/pl1d.hpp index c048334..91f70ec 100644 --- a/models/pl1d.hpp +++ b/models/pl1d.hpp @@ -15,6 +15,11 @@ namespace opt_utilities { return new pl1d(*this); } + + const char* do_get_type_name()const + { + return "1d power law"; + } public: pl1d() { diff --git a/models/polar_ellipse.hpp b/models/polar_ellipse.hpp index 0b574a4..5844301 100644 --- a/models/polar_ellipse.hpp +++ b/models/polar_ellipse.hpp @@ -15,6 +15,11 @@ namespace opt_utilities { return new polar_ellipse(*this); } + + const char* do_get_type_name()const + { + return "ellipse in polar coordinate system"; + } public: polar_ellipse() { diff --git a/models/poly1d.hpp b/models/poly1d.hpp index 142f6ba..4c14426 100644 --- a/models/poly1d.hpp +++ b/models/poly1d.hpp @@ -17,6 +17,11 @@ namespace opt_utilities { return new poly1d(*this); } + + const char* do_get_type_name()const + { + return "polynomial"; + } public: poly1d() { diff --git a/models/pow_model.hpp b/models/pow_model.hpp index 6702236..2e3b18d 100644 --- a/models/pow_model.hpp +++ b/models/pow_model.hpp @@ -21,6 +21,10 @@ namespace opt_utilities { } + const char* do_get_type_name()const + { + return "combine two models by power operation"; + } private: model* pm1; typename element_type_trait::element_type idx; diff --git a/models/strmodel1d.hpp b/models/strmodel1d.hpp index 4cb1786..650f588 100644 --- a/models/strmodel1d.hpp +++ b/models/strmodel1d.hpp @@ -21,6 +21,11 @@ private: std::string var_name; double x; void set_buildin_fun(); + + const char* do_get_type_name()const + { + return "parse a string as a model"; + } public: double do_eval(const double& x,const std::vector& p); strmodel1d(); -- cgit v1.2.2