diff options
author | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2009-12-17 17:01:15 +0000 |
---|---|---|
committer | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2009-12-17 17:01:15 +0000 |
commit | 4170b13f464439ab97efadb210dab0d749fa4b42 (patch) | |
tree | f6d31514c19a9a015c4d22477f5a3fb8bccd250b /vmodel/gauss1d.hpp | |
parent | eeafd6e502bc60da664de3cf0eb9251f349df228 (diff) | |
download | opt-utilities-4170b13f464439ab97efadb210dab0d749fa4b42.tar.bz2 |
rename vmodel to vmodels
git-svn-id: file:///home/svn/opt_utilities@103 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'vmodel/gauss1d.hpp')
-rw-r--r-- | vmodel/gauss1d.hpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/vmodel/gauss1d.hpp b/vmodel/gauss1d.hpp deleted file mode 100644 index 5576c89..0000000 --- a/vmodel/gauss1d.hpp +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef GAUSS_MODEL_H_ -#define GAUSS_MODEL_H_ -#define OPT_HEADER -#include <core/fitter.hpp> -#include <cmath> -#include <misc/optvec.hpp> - -namespace opt_utilities -{ - template <typename T> - class gauss1d - :public model<optvec<T>,optvec<T>,optvec<T>,std::string> - { - private: - gauss1d* do_clone()const - { - return new gauss1d<T>(*this); - } - - const char* do_get_type_name()const - { - return "1d gaussian"; - } - public: - gauss1d() - { - this->push_param_info(param_info<optvec<T> >("N",1)); - this->push_param_info(param_info<optvec<T> >("x0",0)); - this->push_param_info(param_info<optvec<T> >("sigma",1)); - } - - public: - optvec<T> do_eval(const optvec<T>& x,const optvec<T>& param) - { - T N=get_element(param,0); - T x0=get_element(param,1); - T sigma=get_element(param,2); - optvec<T> y=(x-x0)/2./sigma; - return N*exp(-y*y); - } - - private: - std::string do_get_information()const - { - return ""; - } - }; -} - - - -#endif -//EOF |