aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--interface/pymodel.hpp2
-rw-r--r--statistics/chisq.hpp16
-rw-r--r--statistics/cstat.hpp4
-rw-r--r--statistics/leastsq.hpp4
4 files changed, 13 insertions, 13 deletions
diff --git a/interface/pymodel.hpp b/interface/pymodel.hpp
index 8165d6d..3a8b495 100644
--- a/interface/pymodel.hpp
+++ b/interface/pymodel.hpp
@@ -123,7 +123,7 @@ namespace opt_utilities
typename element_type_trait<Tp>::element_type pvalue=
boost::python::extract<typename element_type_trait<Tp>::element_type>(args_values[i]);
- push_param_info(param_info<Tp,std::string>(pname,pvalue));
+ this->push_param_info(param_info<Tp,std::string>(pname,pvalue));
}
}
private:
diff --git a/statistics/chisq.hpp b/statistics/chisq.hpp
index 8a3881a..b9a32f7 100644
--- a/statistics/chisq.hpp
+++ b/statistics/chisq.hpp
@@ -62,7 +62,7 @@ namespace opt_utilities
Ts result(0);
for(int i=(this->get_data_set()).size()-1;i>=0;--i)
{
- Ty chi=(this->get_data_set().get_data(i).get_y()-eval_model(this->get_data_set().get_data(i).get_x(),p))/this->get_data_set().get_data(i).get_y_upper_err();
+ Ty chi=(this->get_data_set().get_data(i).get_y()-this->eval_model(this->get_data_set().get_data(i).get_x(),p))/this->get_data_set().get_data(i).get_y_upper_err();
result+=chi*chi;
}
@@ -134,15 +134,15 @@ namespace opt_utilities
Tx x1=this->get_data_set().get_data(i).get_x()-this->get_data_set().get_data(i).get_x_lower_err();
Tx x2=this->get_data_set().get_data(i).get_x()+this->get_data_set().get_data(i).get_x_upper_err();
Tx x=this->get_data_set().get_data(i).get_x();
- Ty errx1=(eval_model(x1,p)-eval_model(x,p));
- Ty errx2=(eval_model(x2,p)-eval_model(x,p));
+ Ty errx1=(this->eval_model(x1,p)-this->eval_model(x,p));
+ Ty errx2=(this->eval_model(x2,p)-this->eval_model(x,p));
//Ty errx=0;
#else
Ty errx1=0;
Ty errx2=0;
#endif
- Ty y_model=eval_model(this->get_data_set().get_data(i).get_x(),p);
+ Ty y_model=this->eval_model(this->get_data_set().get_data(i).get_x(),p);
Ty y_obs=this->get_data_set().get_data(i).get_y();
Ty y_err;
@@ -182,13 +182,13 @@ namespace opt_utilities
Ty chi=(y_obs-y_model)/std::sqrt(y_err*y_err+errx*errx);
- // Ty chi=(this->get_data_set().get_data(i).get_y()-eval_model(this->get_data_set().get_data(i).get_x(),p));
+ // Ty chi=(this->get_data_set().get_data(i).get_y()-this->eval_model(this->get_data_set().get_data(i).get_x(),p));
// cerr<<chi<<"\n";
result+=chi*chi;
//std::cerr<<chi<<std::endl;
- //cerr<<eval_model(this->get_data_set()[i].x,p)<<endl;
+ //cerr<<this->eval_model(this->get_data_set()[i].x,p)<<endl;
//cerr<<this->get_data_set()[i].y_upper_err<<endl;
- // cerr<<this->get_data_set()[i].x<<"\t"<<this->get_data_set()[i].y<<"\t"<<eval_model(this->get_data_set()[i].x,p)<<endl;
+ // cerr<<this->get_data_set()[i].x<<"\t"<<this->get_data_set()[i].y<<"\t"<<this->eval_model(this->get_data_set()[i].x,p)<<endl;
}
if(verb)
{
@@ -252,7 +252,7 @@ namespace opt_utilities
Ty chi(this->get_data_set().get_data(0).get_y().size());
for(int j=0;j<chi.size();++j)
{
- Ty model_y(eval_model(this->get_data_set().get_data(i).get_x(),p));
+ Ty model_y(this->eval_model(this->get_data_set().get_data(i).get_x(),p));
if(model_y[j]>this->get_data_set().get_data(i).get_y()[j])
{
chi[j]=(this->get_data_set().get_data(i).get_y()[j]-model_y[j])/this->get_data_set().get_data(i).get_y_upper_err()[j];
diff --git a/statistics/cstat.hpp b/statistics/cstat.hpp
index 1d845e3..f1c1d8f 100644
--- a/statistics/cstat.hpp
+++ b/statistics/cstat.hpp
@@ -60,7 +60,7 @@ namespace opt_utilities
Ts result(0);
for(int i=(this->get_data_set()).size()-1;i>=0;--i)
{
- Ty model_y=eval_model(this->get_data_set().get_data(i).get_x(),p);
+ Ty model_y=this->eval_model(this->get_data_set().get_data(i).get_x(),p);
result-=contract(this->get_data_set().get_data(i).get_y(),std::log(model_y),result);
}
@@ -125,7 +125,7 @@ namespace opt_utilities
Ts result(0);
for(int i=(this->get_data_set()).size()-1;i>=0;--i)
{
- Ty model_y=eval_model(this->get_data_set().get_data(i).get_x(),p);
+ Ty model_y=this->eval_model(this->get_data_set().get_data(i).get_x(),p);
result-=contract1(this->get_data_set().get_data(i).get_y(),std::log(model_y),result);
}
diff --git a/statistics/leastsq.hpp b/statistics/leastsq.hpp
index f23f0d1..1ecd2dc 100644
--- a/statistics/leastsq.hpp
+++ b/statistics/leastsq.hpp
@@ -62,7 +62,7 @@ namespace opt_utilities
Ts result(0);
for(int i=(this->get_data_set()).size()-1;i>=0;--i)
{
- Ty chi=(this->get_data_set().get_data(i).get_y()-eval_model(this->get_data_set().get_data(i).get_x(),p));
+ Ty chi=(this->get_data_set().get_data(i).get_y()-this->eval_model(this->get_data_set().get_data(i).get_x(),p));
result+=chi*chi;
}
@@ -128,7 +128,7 @@ namespace opt_utilities
Ty chi(this->get_data_set().get_data(0).get_y().size());
for(int j=0;j<chi.size();++j)
{
- Ty model_y(eval_model(this->get_data_set().get_data(i).get_x(),p));
+ Ty model_y(this->eval_model(this->get_data_set().get_data(i).get_x(),p));
if(model_y[j]>this->get_data_set().get_data(i).get_y()[j])
{
chi[j]=(this->get_data_set().get_data(i).get_y()[j]-model_y[j]);