From 6994a9715f05fd49f60a4346171a1d9226ec98d9 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 8 Jun 2016 10:26:30 +0800 Subject: mass_profile: fix many compilation warnings --- mass_profile/fit_mt_bpl.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'mass_profile/fit_mt_bpl.cpp') diff --git a/mass_profile/fit_mt_bpl.cpp b/mass_profile/fit_mt_bpl.cpp index 7cf22b2..e956f4f 100644 --- a/mass_profile/fit_mt_bpl.cpp +++ b/mass_profile/fit_mt_bpl.cpp @@ -45,7 +45,7 @@ double shuffle_data(double xc,double xl,double xu) double lxc=log(xc); double lxl=log(xc-xl)-log(xc); double lxu=log(xc+xu)-log(xc); - + if(std_norm_rand()>0) { double result=std::exp(lxc-std::abs(std_norm_rand()*lxl)); @@ -107,7 +107,7 @@ int main(int argc,char* argv[]) } line+=" "; istringstream iss(line); - + if(line[0]=='#') { if(!is_first_nonono) @@ -145,7 +145,7 @@ int main(int argc,char* argv[]) cerr<,double,std::string> fit; fit.set_opt_method(powell_method >()); - + fit.set_statistic(logchisq,double,std::string>()); //fit.set_statistic(leastsq,double,std::string>()); fit.set_model(bpl1d()); @@ -222,7 +222,7 @@ int main(int argc,char* argv[]) cerr<<"k0l="< mean_p(p.size()); std::vector mean_p2(p.size()); int cnt=0; @@ -252,7 +252,7 @@ int main(int argc,char* argv[]) double sxl=0; double syl=0; double sxyl=0; - + double sxxu=0; double s1u=0; double sxu=0; @@ -260,7 +260,7 @@ int main(int argc,char* argv[]) double sxyu=0; opt_utilities::default_data_set ds1; - for(int i=0;i(new_x,new_y, yl/y*new_y, yu/y*new_y, @@ -306,40 +306,40 @@ int main(int argc,char* argv[]) double Mbl=sxxl*syl-sxl*sxyl; double k0l=Mal/Ml; double b0l=Mbl/Ml; - + double Mu=sxxu*s1u-sxu*sxu; double Mau=sxyu*s1u-syu*sxu; double Mbu=sxxu*syu-sxu*sxyu; double k0u=Mau/Mu; double b0u=Mbu/Mu; - + double gamma0l=k0l; double gamma0u=k0u; - + double ampl0l=exp(b0l)*pow(Tb,gamma0l); double ampl0u=exp(b0u)*pow(Tb,gamma0u);; - + fit.set_param_value("bpx",Tb); fit.set_param_value("bpy",(ampl0l+ampl0u)/2); fit.set_param_value("gamma1",gamma0l); fit.set_param_value("gamma2",gamma0u); - - + + fit.load_data(ds1); - + fit.fit(); vector p=fit.fit(); - for(int i=0;i std_p(p.size()); cerr<