diff options
35 files changed, 98 insertions, 100 deletions
diff --git a/core/fitter.hpp b/core/fitter.hpp index 38f05a3..34f9203 100644 --- a/core/fitter.hpp +++ b/core/fitter.hpp @@ -1038,7 +1038,7 @@ namespace opt_utilities -};
+}
#endif
diff --git a/core/freeze_param.hpp b/core/freeze_param.hpp index 4424c58..31541c1 100644 --- a/core/freeze_param.hpp +++ b/core/freeze_param.hpp @@ -197,7 +197,7 @@ namespace opt_utilities return freeze_param<Ty,Tx,Tp,Tstr>(name); } -}; +} #endif diff --git a/core/opt_exception.hpp b/core/opt_exception.hpp index 925e4b5..65e4470 100644 --- a/core/opt_exception.hpp +++ b/core/opt_exception.hpp @@ -99,7 +99,7 @@ namespace opt_utilities {} }; -}; +} #endif diff --git a/core/opt_traits.hpp b/core/opt_traits.hpp index 94b77a8..b8426e0 100644 --- a/core/opt_traits.hpp +++ b/core/opt_traits.hpp @@ -59,7 +59,7 @@ namespace opt_utilities { return (lhs=rhs); } -}; +} diff --git a/core/optimizer.hpp b/core/optimizer.hpp index ca73775..e953b2d 100644 --- a/core/optimizer.hpp +++ b/core/optimizer.hpp @@ -281,7 +281,7 @@ namespace opt_utilities } }; -}; +} #endif //EOF diff --git a/data_sets/default_data_set.hpp b/data_sets/default_data_set.hpp index 887e3d2..4d0b89e 100644 --- a/data_sets/default_data_set.hpp +++ b/data_sets/default_data_set.hpp @@ -7,40 +7,40 @@ namespace opt_utilities { -template <typename Ty,typename Tx> -class default_data_set - :public data_set<Ty,Tx> -{ -private: - std::vector<data<Ty,Tx> > data_vec; - - data_set<Ty,Tx>* do_clone()const + template <typename Ty,typename Tx> + class default_data_set + :public data_set<Ty,Tx> { - return new default_data_set<Ty,Tx>(*this); - } + private: + std::vector<data<Ty,Tx> > data_vec; + + data_set<Ty,Tx>* do_clone()const + { + return new default_data_set<Ty,Tx>(*this); + } - const data<Ty,Tx>& do_get_data(size_t i)const - { - return data_vec.at(i); - } + const data<Ty,Tx>& do_get_data(size_t i)const + { + return data_vec.at(i); + } - size_t do_size()const - { - return data_vec.size(); - } + size_t do_size()const + { + return data_vec.size(); + } - void do_add_data(const data<Ty,Tx>& d) - { - data_vec.push_back(d); - } + void do_add_data(const data<Ty,Tx>& d) + { + data_vec.push_back(d); + } - void do_clear() - { - data_vec.clear(); - } + void do_clear() + { + data_vec.clear(); + } -}; + }; } #endif diff --git a/data_sets/sorted_data_set.hpp b/data_sets/sorted_data_set.hpp index f12edac..0512f18 100644 --- a/data_sets/sorted_data_set.hpp +++ b/data_sets/sorted_data_set.hpp @@ -14,43 +14,43 @@ namespace opt_utilities } -template <typename Ty,typename Tx> -class sorted_data_set - :public data_set<Ty,Tx> -{ -private: - std::vector<data<Ty,Tx> > data_vec; - - data_set<Ty,Tx>* do_clone()const - { - return new sorted_data_set<Ty,Tx>(*this); - } - - - const data<Ty,Tx>& do_get_data(size_t i)const - { - return data_vec.at(i); - } - - size_t do_size()const - { - return data_vec.size(); - } - - void do_add_data(const data<Ty,Tx>& d) - { - typename std::vector<data<Ty,Tx> >::iterator p - =std::lower_bound(data_vec.begin(),data_vec.end(),d,comp_data<Ty,Tx>); - //data_vec.push_back(d); - data_vec.insert(p,d); - } - - void do_clear() + template <typename Ty,typename Tx> + class sorted_data_set + :public data_set<Ty,Tx> { - data_vec.clear(); - } - -}; + private: + std::vector<data<Ty,Tx> > data_vec; + + data_set<Ty,Tx>* do_clone()const + { + return new sorted_data_set<Ty,Tx>(*this); + } + + + const data<Ty,Tx>& do_get_data(size_t i)const + { + return data_vec.at(i); + } + + size_t do_size()const + { + return data_vec.size(); + } + + void do_add_data(const data<Ty,Tx>& d) + { + typename std::vector<data<Ty,Tx> >::iterator p + =std::lower_bound(data_vec.begin(),data_vec.end(),d,comp_data<Ty,Tx>); + //data_vec.push_back(d); + data_vec.insert(p,d); + } + + void do_clear() + { + data_vec.clear(); + } + + }; } #endif @@ -18,8 +18,8 @@ export CC=gcc export AR = ar rv export RANLIB = ranlib export RM=rm -f -export CFLAGS=-DNDEBUG -g -O2 -Wall -c -I . -export CPPFLAGS=-DNDEBUG -g -O2 -Wall -c -I . --ansi -DHAVE_X_ERROR +export CFLAGS=-DNDEBUG -ansi -pedantic -g -O2 -Wall -c -I . +export CPPFLAGS=-DNDEBUG -ansi -pedantic -g -O2 -Wall -c -I . -DHAVE_X_ERROR INC=-I. -I/usr/include/gsl/ diff --git a/methods/gsl_simplex/gsl_simplex.hpp b/methods/gsl_simplex/gsl_simplex.hpp index 85df28e..9c094b0 100644 --- a/methods/gsl_simplex/gsl_simplex.hpp +++ b/methods/gsl_simplex/gsl_simplex.hpp @@ -194,7 +194,7 @@ namespace opt_utilities } }; -}; +} #endif diff --git a/methods/powell/powell_method.hpp b/methods/powell/powell_method.hpp index bec12b7..d6f7d0b 100644 --- a/methods/powell/powell_method.hpp +++ b/methods/powell/powell_method.hpp @@ -244,7 +244,7 @@ namespace opt_utilities } }; -}; +} #endif diff --git a/misc/bootstrap.hpp b/misc/bootstrap.hpp index 4028c77..5910e92 100644 --- a/misc/bootstrap.hpp +++ b/misc/bootstrap.hpp @@ -143,7 +143,7 @@ namespace opt_utilities }; -}; +} #endif //EOF diff --git a/models/add_model.hpp b/models/add_model.hpp index ddc3316..7e4a6c7 100644 --- a/models/add_model.hpp +++ b/models/add_model.hpp @@ -161,7 +161,7 @@ namespace opt_utilities { return add_model<Ty,Tx,Tp,Tstr>(m1,m2); } -}; +} diff --git a/models/beta1d.hpp b/models/beta1d.hpp index e18aa34..418722f 100644 --- a/models/beta1d.hpp +++ b/models/beta1d.hpp @@ -41,7 +41,7 @@ namespace opt_utilities "S=S0*(1+(r/rc)^2)^(-3*beta+0.5)\n"; } }; -}; +} diff --git a/models/beta2d.hpp b/models/beta2d.hpp index abb6da1..650e179 100644 --- a/models/beta2d.hpp +++ b/models/beta2d.hpp @@ -52,7 +52,7 @@ namespace opt_utilities return bkg+S0*pow(1+r,-3*beta+static_cast<T>(.5)); } }; -}; +} diff --git a/models/beta2d2.hpp b/models/beta2d2.hpp index bb473a3..ab5c4bb 100644 --- a/models/beta2d2.hpp +++ b/models/beta2d2.hpp @@ -65,7 +65,7 @@ namespace opt_utilities }; -}; +} diff --git a/models/bl1d.hpp b/models/bl1d.hpp index bd0ce7d..2f6afb5 100644 --- a/models/bl1d.hpp +++ b/models/bl1d.hpp @@ -48,7 +48,7 @@ namespace opt_utilities "y=k2*(x-x_b)+y_b otherwise\n"; } }; -}; +} diff --git a/models/bpl1d.hpp b/models/bpl1d.hpp index faf1336..be32d8a 100644 --- a/models/bpl1d.hpp +++ b/models/bpl1d.hpp @@ -48,7 +48,7 @@ namespace opt_utilities "y=y_b*(x/x_b)^gamma2 otherwise\n"; } }; -}; +} diff --git a/models/bremss.hpp b/models/bremss.hpp index 9956a3e..af48519 100644 --- a/models/bremss.hpp +++ b/models/bremss.hpp @@ -36,7 +36,7 @@ namespace opt_utilities "flux=norm*kT^0.5*e^{-E/kT}\n"; } }; -}; +} diff --git a/models/constant.hpp b/models/constant.hpp index 8d06279..f052756 100644 --- a/models/constant.hpp +++ b/models/constant.hpp @@ -34,7 +34,7 @@ namespace opt_utilities "y=C\n"; } }; -}; +} diff --git a/models/dbeta1d.hpp b/models/dbeta1d.hpp index 71a1f52..44f6060 100644 --- a/models/dbeta1d.hpp +++ b/models/dbeta1d.hpp @@ -54,7 +54,7 @@ namespace opt_utilities "S=beta(S01,beta1,rc1)+beta(S02,beta2,rc2)\n"; } }; -}; +} diff --git a/models/dbeta2d.hpp b/models/dbeta2d.hpp index 6811270..473dd19 100644 --- a/models/dbeta2d.hpp +++ b/models/dbeta2d.hpp @@ -83,7 +83,7 @@ namespace opt_utilities S02*pow(1+r2,-3*beta2+static_cast<T>(.5)); } }; -}; +} diff --git a/models/dbeta2d2.hpp b/models/dbeta2d2.hpp index d968dbc..7c9adbc 100644 --- a/models/dbeta2d2.hpp +++ b/models/dbeta2d2.hpp @@ -92,7 +92,7 @@ namespace opt_utilities +ampl2*pow(1+(r2_r2/r02/r02),-3*beta2+static_cast<T>(.5)); } }; -}; +} diff --git a/models/dbeta2d3.hpp b/models/dbeta2d3.hpp index e2edb78..8db6efb 100644 --- a/models/dbeta2d3.hpp +++ b/models/dbeta2d3.hpp @@ -83,7 +83,7 @@ namespace opt_utilities //pow(1+r2*r2/r02/r02,-3*beta2+static_cast<T>(.5)); } }; -}; +} diff --git a/models/dl_model.hpp b/models/dl_model.hpp index 2fcf227..9188736 100644 --- a/models/dl_model.hpp +++ b/models/dl_model.hpp @@ -169,7 +169,7 @@ namespace opt_utilities "Should be loaded from an shared object file\n"; } }; -}; +} diff --git a/models/func_model.hpp b/models/func_model.hpp index 4eda8d5..b47043a 100644 --- a/models/func_model.hpp +++ b/models/func_model.hpp @@ -49,7 +49,7 @@ namespace opt_utilities return "Wrapper for necked C function\n"; } }; -}; +} diff --git a/models/gauss1d.hpp b/models/gauss1d.hpp index 958cec9..8221178 100644 --- a/models/gauss1d.hpp +++ b/models/gauss1d.hpp @@ -39,7 +39,7 @@ namespace opt_utilities "y=N*exp(-(x-x0)^2/sigma^2\n"; } }; -}; +} diff --git a/models/lin1d.hpp b/models/lin1d.hpp index b0ddd31..1a07424 100644 --- a/models/lin1d.hpp +++ b/models/lin1d.hpp @@ -34,7 +34,7 @@ namespace opt_utilities "y=k*x+b\n"; } }; -}; +} diff --git a/models/models.cc b/models/models.cc index 7481b88..8a63037 100644 --- a/models/models.cc +++ b/models/models.cc @@ -173,4 +173,5 @@ model<double,vecn<double,2>,std::vector<double>,std::string>& get_2dmodel_by_nam }model2d_map_keeper; -}; +} + diff --git a/models/mul_model.hpp b/models/mul_model.hpp index b5cc06b..807f8a8 100644 --- a/models/mul_model.hpp +++ b/models/mul_model.hpp @@ -163,7 +163,7 @@ namespace opt_utilities return mul_model<Ty,Tx,Tp,Tstr>(m1,m2); } -}; +} diff --git a/models/nbeta1d.hpp b/models/nbeta1d.hpp index 3806fe9..83f43a3 100644 --- a/models/nbeta1d.hpp +++ b/models/nbeta1d.hpp @@ -41,7 +41,7 @@ namespace opt_utilities "n=n0*(1+(r/rc)^2)^(-1.5*beta)\n"; } }; -}; +} diff --git a/models/nfw1d.hpp b/models/nfw1d.hpp index 9c2dfd4..6ce9df0 100644 --- a/models/nfw1d.hpp +++ b/models/nfw1d.hpp @@ -37,7 +37,7 @@ namespace opt_utilities "y=rho0/(r/rs*(1+r/rs)^2\n"; } }; -}; +} diff --git a/models/pl1d.hpp b/models/pl1d.hpp index 50b4c50..3b52832 100644 --- a/models/pl1d.hpp +++ b/models/pl1d.hpp @@ -35,7 +35,7 @@ namespace opt_utilities "y=A*x^gamma\n"; } }; -}; +} diff --git a/models/poly1d.hpp b/models/poly1d.hpp index a8c994b..457ce3a 100644 --- a/models/poly1d.hpp +++ b/models/poly1d.hpp @@ -59,7 +59,7 @@ namespace opt_utilities return ostr.str(); } }; -}; +} diff --git a/models/pow_model.hpp b/models/pow_model.hpp index 0493303..3e1ea17 100644 --- a/models/pow_model.hpp +++ b/models/pow_model.hpp @@ -114,7 +114,7 @@ namespace opt_utilities { return pow_model<Ty,Tx,Tp,Tstr>(m1,idx); } -}; +} diff --git a/models/vecn.hpp b/models/vecn.hpp index cac1436..8b65361 100644 --- a/models/vecn.hpp +++ b/models/vecn.hpp @@ -53,10 +53,7 @@ namespace opt_utilities os<<']'; return os; } - - - -}; +} #endif //EOF |