diff options
author | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2009-10-16 12:03:14 +0000 |
---|---|---|
committer | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2009-10-16 12:03:14 +0000 |
commit | a0d3b74adcc29c22d70da971621dd301727eb695 (patch) | |
tree | 78435ae01f83769a678eeb550fb74ce512650fd9 /models | |
parent | 0c1f50351a0287252c4b0f7e9edbfb945481e6f7 (diff) | |
download | opt-utilities-a0d3b74adcc29c22d70da971621dd301727eb695.tar.bz2 |
git-svn-id: file:///home/svn/opt_utilities@81 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'models')
-rw-r--r-- | models/add_model.hpp | 6 | ||||
-rw-r--r-- | models/beta1d.hpp | 5 | ||||
-rw-r--r-- | models/beta2d.hpp | 5 | ||||
-rw-r--r-- | models/beta2d2.hpp | 5 | ||||
-rw-r--r-- | models/bl1d.hpp | 5 | ||||
-rw-r--r-- | models/bpl1d.hpp | 5 | ||||
-rw-r--r-- | models/bremss.hpp | 5 | ||||
-rw-r--r-- | models/constant.hpp | 4 | ||||
-rw-r--r-- | models/dbeta1d.hpp | 6 | ||||
-rw-r--r-- | models/dbeta2d.hpp | 5 | ||||
-rw-r--r-- | models/dbeta2d2.hpp | 5 | ||||
-rw-r--r-- | models/dbeta2d3.hpp | 5 | ||||
-rw-r--r-- | models/dl_model.hpp | 5 | ||||
-rw-r--r-- | models/func_model.hpp | 5 | ||||
-rw-r--r-- | models/gauss1d.hpp | 5 | ||||
-rw-r--r-- | models/lin1d.hpp | 5 | ||||
-rw-r--r-- | models/nbeta1d.hpp | 5 | ||||
-rw-r--r-- | models/nfw1d.hpp | 5 | ||||
-rw-r--r-- | models/pl1d.hpp | 5 | ||||
-rw-r--r-- | models/polar_ellipse.hpp | 5 | ||||
-rw-r--r-- | models/poly1d.hpp | 5 | ||||
-rw-r--r-- | models/pow_model.hpp | 4 | ||||
-rw-r--r-- | models/strmodel1d.hpp | 5 |
23 files changed, 114 insertions, 1 deletions
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 @@ -130,6 +130,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) { if(!pm1) 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<T>(*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<T>(*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<T>(*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<T>(*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<T>(*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<T>(*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<T>(*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<T>(*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<T>(*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<T>(*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<T>(*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<T>(*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<T>(*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<T>(*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<T>(*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<T>(*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<T>(*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<T>(*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<T,n>(*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<Ty,Tx,Tp,Tstr>* pm1; typename element_type_trait<Tp>::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<double>& p); strmodel1d(); |