diff options
author | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2008-12-15 07:26:12 +0000 |
---|---|---|
committer | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2008-12-15 07:26:12 +0000 |
commit | 1f4a944064bc42284c33e6b755353d191cf288e8 (patch) | |
tree | c8cb2253dea5f395e0f867aa6976433bd3eb00de /models/strmodel1d.hpp | |
download | opt-utilities-1f4a944064bc42284c33e6b755353d191cf288e8.tar.bz2 |
git-svn-id: file:///home/svn/opt_utilities@1 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'models/strmodel1d.hpp')
-rw-r--r-- | models/strmodel1d.hpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/models/strmodel1d.hpp b/models/strmodel1d.hpp new file mode 100644 index 0000000..8d992a0 --- /dev/null +++ b/models/strmodel1d.hpp @@ -0,0 +1,39 @@ +#ifndef STRMODEL1D_HPP +#define STRMODEL1D_HPP +#include <core/fitter.hpp> +#include <cmath> +#include <sstream> +#include <cassert> +#include <muparser/muParser.h> +#include <vector> +#include <string> + +class strmodel1d + :public opt_utilities::model<double,double,std::vector<double>,std::string> +{ +private: + mu::Parser mp; + strmodel1d* do_clone()const; + std::vector<double> par_vec; + std::vector<std::string> par_names; + std::string expr; + std::string var_name; + double x; + void set_buildin_fun(); +public: + double do_eval(const double& x,const std::vector<double>& p); + strmodel1d(); + strmodel1d(const strmodel1d& rhs); + strmodel1d& operator=(const strmodel1d& rhs); + + + void set_expr(const std::string& _expr, + const std::vector<std::string>& _par_names, + const std::string& _var_name); + +}; + + + +#endif +//EOF |