aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2009-01-05 11:10:40 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2009-01-05 11:10:40 +0000
commita32748e7eeee74472d15d8c00e48847bd7ef21f2 (patch)
treec9892b38aee80f3ef0ac3838bfda3c0e19f07ab4 /models
parentb2c2d2a42e5d9e7b104ecebe41c89c701ad49923 (diff)
downloadopt-utilities-a32748e7eeee74472d15d8c00e48847bd7ef21f2.tar.bz2
git-svn-id: file:///home/svn/opt_utilities@8 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'models')
-rw-r--r--models/strmodel1d.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/models/strmodel1d.cc b/models/strmodel1d.cc
index df3cd40..26e853b 100644
--- a/models/strmodel1d.cc
+++ b/models/strmodel1d.cc
@@ -11,14 +11,15 @@ strmodel1d* strmodel1d::do_clone()const
strmodel1d::strmodel1d()
{
- set_buildin_fun();
+ set_buildin_fun();
}
strmodel1d::strmodel1d(const strmodel1d& rhs)
- :expr(rhs.expr),
+ :par_vec(rhs.par_vec),
par_names(rhs.par_names),
- var_name(rhs.var_name),
- par_vec(rhs.par_vec)
+ expr(rhs.expr),
+ var_name(rhs.var_name)
+
{
set_buildin_fun();
set_expr(expr,par_names,var_name);
@@ -56,7 +57,7 @@ void strmodel1d::set_expr(const string& _expr,
par_vec.resize(par_names.size());
mp.ClearVar();
// mp.ClearFun();
- for(int i=0;i<par_vec.size();++i)
+ for(unsigned int i=0;i<par_vec.size();++i)
{
mp.DefineVar(par_names[i].c_str(),&par_vec[i]);
this->push_param_info(param_info<std::vector<double> >(par_names[i],0));
@@ -68,7 +69,7 @@ void strmodel1d::set_expr(const string& _expr,
double strmodel1d::do_eval(const double& _x,const vector<double>& p)
{
- for(int i=0;i<par_vec.size();++i)
+ for(unsigned int i=0;i<par_vec.size();++i)
{
//get_element(par_vec,i)=get_element(p,i);
set_element(par_vec,i,get_element(p,i));