/** \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