#ifndef VCONSTANT_MODEL_H_ #define VCONSTANT_MODEL_H_ #define OPT_HEADER #include #include #include namespace opt_utilities { template class constant :public model,optvec,optvec,std::string> { typedef optvec Tv; private: constant* do_clone()const { return new constant(*this); } const char* do_get_type_name()const { return "constant"; } public: constant() { this->push_param_info(param_info("c",1)); } public: Tv do_eval(const Tv& x,const Tv& param) { //return x*param[0]+param[1]; Tv result(x.size()); for(int i=0;i