blob: 8d992a03e9eb71335b694debeab724e451d36bc0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
|