From f9cb256e35ae66ac63adfa9445a94e86ed18f2e0 Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Mon, 30 May 2011 17:22:15 +0000 Subject: git-svn-id: file:///home/svn/opt_utilities@204 ed2142bd-67ad-457f-ba7c-d818d4011675 --- distributions/normed_dgauss1d.hpp | 1 + distributions/normed_gauss1d.hpp | 1 + distributions/uniformed.hpp | 1 + model_doc/beta1d.tex | 11 +++++++ model_doc/bl.tex | 16 ++++++++++ model_doc/bremss.tex | 11 +++++++ model_doc/component.tex | 11 +++++++ model_doc/constant.tex | 11 +++++++ model_doc/dbeta1d.tex | 11 +++++++ model_doc/dualgauss1d.tex | 11 +++++++ model_doc/gauss1d.tex | 11 +++++++ model_doc/kmm_component.tex | 11 +++++++ model_doc/make_doc.sh | 1 + model_doc/nbeta1d.tex | 11 +++++++ model_doc/nfw.tex | 11 +++++++ model_doc/nfw_int.tex | 11 +++++++ model_doc/normed_dgauss1d.tex | 11 +++++++ model_doc/normed_gauss1d.tex | 11 +++++++ model_doc/poly1d.tex | 11 +++++++ model_doc/powerlaw.tex | 11 +++++++ model_doc/quad_pl.tex | 11 +++++++ model_doc/rquarter.tex | 11 +++++++ model_doc/uniformed.tex | 16 ++++++++++ model_doc/vt_temperature.tex | 14 +++++++++ vmodels/beta1d.hpp | 1 + vmodels/bl.hpp | 5 ++- vmodels/bpl.hpp | 1 + vmodels/bremss.hpp | 1 + vmodels/constant.hpp | 4 +-- vmodels/dbeta1d.hpp | 1 + vmodels/dualgauss1d.hpp | 1 + vmodels/gauss1d.hpp | 1 + vmodels/lin1d.hpp | 1 + vmodels/nbeta1d.hpp | 1 + vmodels/nfw.hpp | 4 +-- vmodels/nfw_int.hpp | 4 +-- vmodels/poly1d.hpp | 10 ++---- vmodels/powerlaw.hpp | 4 +-- vmodels/quad_pl.hpp | 4 +-- vmodels/rquarter.hpp | 66 +++++++++++++++++++++++++++++++++++++++ vmodels/vt_temperature.hpp | 7 ++++- 41 files changed, 331 insertions(+), 22 deletions(-) create mode 100644 model_doc/beta1d.tex create mode 100644 model_doc/bl.tex create mode 100644 model_doc/bremss.tex create mode 100644 model_doc/component.tex create mode 100644 model_doc/constant.tex create mode 100644 model_doc/dbeta1d.tex create mode 100644 model_doc/dualgauss1d.tex create mode 100644 model_doc/gauss1d.tex create mode 100644 model_doc/kmm_component.tex create mode 100644 model_doc/nbeta1d.tex create mode 100644 model_doc/nfw.tex create mode 100644 model_doc/nfw_int.tex create mode 100644 model_doc/normed_dgauss1d.tex create mode 100644 model_doc/normed_gauss1d.tex create mode 100644 model_doc/poly1d.tex create mode 100644 model_doc/powerlaw.tex create mode 100644 model_doc/quad_pl.tex create mode 100644 model_doc/rquarter.tex create mode 100644 model_doc/uniformed.tex create mode 100644 model_doc/vt_temperature.tex create mode 100644 vmodels/rquarter.hpp diff --git a/distributions/normed_dgauss1d.hpp b/distributions/normed_dgauss1d.hpp index 5405de8..7aa29f6 100644 --- a/distributions/normed_dgauss1d.hpp +++ b/distributions/normed_dgauss1d.hpp @@ -71,6 +71,7 @@ namespace opt_utilities private: std::string do_get_information()const { +#include return ""; } }; diff --git a/distributions/normed_gauss1d.hpp b/distributions/normed_gauss1d.hpp index 03a69cb..68114a3 100644 --- a/distributions/normed_gauss1d.hpp +++ b/distributions/normed_gauss1d.hpp @@ -55,6 +55,7 @@ namespace opt_utilities private: std::string do_get_information()const { +#include return ""; } }; diff --git a/distributions/uniformed.hpp b/distributions/uniformed.hpp index b40d079..8cde0b7 100644 --- a/distributions/uniformed.hpp +++ b/distributions/uniformed.hpp @@ -54,6 +54,7 @@ namespace opt_utilities private: std::string do_get_information()const { +#include return ""; } }; diff --git a/model_doc/beta1d.tex b/model_doc/beta1d.tex new file mode 100644 index 0000000..25b1ff8 --- /dev/null +++ b/model_doc/beta1d.tex @@ -0,0 +1,11 @@ +\documentclass{article} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{amsfonts} + +\thispagestyle{empty} +\begin{document} +\begin{equation} + S(r)=S_0(1+\frac{r^2}{r_c^2})^{-3\beta+1/2}+bkg\notag +\end{equation} +\end{document} diff --git a/model_doc/bl.tex b/model_doc/bl.tex new file mode 100644 index 0000000..a972ee4 --- /dev/null +++ b/model_doc/bl.tex @@ -0,0 +1,16 @@ +\documentclass{article} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{amsfonts} + +\thispagestyle{empty} +\begin{document} +\begin{equation} + y=\left\{ + \begin{array}{cc} + k_1(x-x_b)+y_b& x return ""; } }; diff --git a/vmodels/bl.hpp b/vmodels/bl.hpp index dc2a0da..6561e28 100644 --- a/vmodels/bl.hpp +++ b/vmodels/bl.hpp @@ -61,9 +61,8 @@ namespace opt_utilities private: std::string do_get_information()const { - return "broken linear model\n" - "y=k1*(x-x_b)+y_b for x + return ""; } }; } diff --git a/vmodels/bpl.hpp b/vmodels/bpl.hpp index a1f43aa..78c1fa1 100644 --- a/vmodels/bpl.hpp +++ b/vmodels/bpl.hpp @@ -64,6 +64,7 @@ namespace opt_utilities std::string do_get_information()const { #include + return ""; } }; } diff --git a/vmodels/bremss.hpp b/vmodels/bremss.hpp index 6d9f317..c7f6652 100644 --- a/vmodels/bremss.hpp +++ b/vmodels/bremss.hpp @@ -46,6 +46,7 @@ namespace opt_utilities private: std::string do_get_information()const { +#include return ""; } }; diff --git a/vmodels/constant.hpp b/vmodels/constant.hpp index 888ef8e..fc61f4e 100644 --- a/vmodels/constant.hpp +++ b/vmodels/constant.hpp @@ -49,8 +49,8 @@ namespace opt_utilities private: std::string do_get_information()const { - return "Constant\n" - "y=C\n"; +#include + return ""; } }; } diff --git a/vmodels/dbeta1d.hpp b/vmodels/dbeta1d.hpp index 40f881d..6f5d1ad 100644 --- a/vmodels/dbeta1d.hpp +++ b/vmodels/dbeta1d.hpp @@ -73,6 +73,7 @@ namespace opt_utilities private: std::string do_get_information()const { +#include return ""; } }; diff --git a/vmodels/dualgauss1d.hpp b/vmodels/dualgauss1d.hpp index 221fe54..aba5df0 100644 --- a/vmodels/dualgauss1d.hpp +++ b/vmodels/dualgauss1d.hpp @@ -58,6 +58,7 @@ namespace opt_utilities private: std::string do_get_information()const { +#include return ""; } }; diff --git a/vmodels/gauss1d.hpp b/vmodels/gauss1d.hpp index da9c5df..641b3f7 100644 --- a/vmodels/gauss1d.hpp +++ b/vmodels/gauss1d.hpp @@ -51,6 +51,7 @@ namespace opt_utilities private: std::string do_get_information()const { +#include return ""; } }; diff --git a/vmodels/lin1d.hpp b/vmodels/lin1d.hpp index 701e8e3..53424c3 100644 --- a/vmodels/lin1d.hpp +++ b/vmodels/lin1d.hpp @@ -55,6 +55,7 @@ namespace opt_utilities std::string do_get_information()const { #include + return ""; } }; } diff --git a/vmodels/nbeta1d.hpp b/vmodels/nbeta1d.hpp index cbf0bc2..28097ab 100644 --- a/vmodels/nbeta1d.hpp +++ b/vmodels/nbeta1d.hpp @@ -58,6 +58,7 @@ namespace opt_utilities private: std::string do_get_information()const { +#include return ""; } }; diff --git a/vmodels/nfw.hpp b/vmodels/nfw.hpp index a46ed87..5b78f4e 100644 --- a/vmodels/nfw.hpp +++ b/vmodels/nfw.hpp @@ -45,8 +45,8 @@ namespace opt_utilities private: std::string do_get_information()const { - return "NFW mass profile\n" - "y=rho0/(x/rs*(1+x/rs)^2)\n"; +#include + return ""; } }; } diff --git a/vmodels/nfw_int.hpp b/vmodels/nfw_int.hpp index b3e8b54..de7024f 100644 --- a/vmodels/nfw_int.hpp +++ b/vmodels/nfw_int.hpp @@ -45,8 +45,8 @@ namespace opt_utilities private: std::string do_get_information()const { - return "integrated NFW mass profile\n" - "y=rho0/(x/rs*(1+x/rs)^2)\n"; +#include + return ""; } }; } diff --git a/vmodels/poly1d.hpp b/vmodels/poly1d.hpp index 113ef83..1fc81d3 100644 --- a/vmodels/poly1d.hpp +++ b/vmodels/poly1d.hpp @@ -67,14 +67,8 @@ namespace opt_utilities private: std::string do_get_information()const { - std::ostringstream ostr; - ostr< + return ""; } }; } diff --git a/vmodels/powerlaw.hpp b/vmodels/powerlaw.hpp index c30dbb6..ac6ec80 100644 --- a/vmodels/powerlaw.hpp +++ b/vmodels/powerlaw.hpp @@ -45,8 +45,8 @@ namespace opt_utilities private: std::string do_get_information()const { - return "Simple power law model\n" - "y=A*x^gamma\n"; +#include + return ""; } }; } diff --git a/vmodels/quad_pl.hpp b/vmodels/quad_pl.hpp index a0a25a4..14ad752 100644 --- a/vmodels/quad_pl.hpp +++ b/vmodels/quad_pl.hpp @@ -47,8 +47,8 @@ namespace opt_utilities private: std::string do_get_information()const { - return "Simple power law model\n" - "y=A*x^gamma\n"; +#include + return ""; } }; } diff --git a/vmodels/rquarter.hpp b/vmodels/rquarter.hpp new file mode 100644 index 0000000..7f37924 --- /dev/null +++ b/vmodels/rquarter.hpp @@ -0,0 +1,66 @@ +/** + \file lin1d.hpp + \brief linear + \author Junhua Gu + */ + + +#ifndef VRQUARTER_MODEL_H_ +#define VRQUARTER_MODEL_H_ +#define OPT_HEADER +#include +#include +#include + +namespace opt_utilities +{ + template + class rquarter + :public model,optvec,optvec,std::string> + { + typedef optvec Tv; + private: + rquarter* do_clone()const + { + return new rquarter(*this); + } + + const char* do_get_type_name()const + { + return "de Vaucoulurs 1/4 law"; + } + public: + rquarter() + { + this->push_param_info(param_info("I0",1)); + this->push_param_info(param_info("Re",10)); + this->push_param_info(param_info("bkg",0)); + } + + public: + Tv do_eval(const Tv& x,const Tv& param) + { + Tv result(x.size()); + + + //return x*get_element(param,0)+get_element(param,1); + for(size_t i=0;i!=x.size();++i) + { + result[i]=param[0]*exp(-7.67*(pow(x[i]/param[1],.25)-T(1.)))+param[2]; + } + return result; + } + + private: + std::string do_get_information()const + { +#include + return ""; + } + }; +} + + + +#endif +//EOF diff --git a/vmodels/vt_temperature.hpp b/vmodels/vt_temperature.hpp index f6fb55e..0778794 100644 --- a/vmodels/vt_temperature.hpp +++ b/vmodels/vt_temperature.hpp @@ -50,7 +50,12 @@ public: } return result; } - + + std::string do_get_information()const + { +#include + return ""; + } }; #endif -- cgit v1.2.2