From ad5dfcefc8fecc56cdf6e3256cef460ae358da59 Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Sun, 13 Sep 2009 15:16:12 +0000 Subject: git-svn-id: file:///home/svn/opt_utilities@68 ed2142bd-67ad-457f-ba7c-d818d4011675 --- methods/aga/aga.hpp | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'methods/aga') diff --git a/methods/aga/aga.hpp b/methods/aga/aga.hpp index 8878953..cf0b4a6 100644 --- a/methods/aga/aga.hpp +++ b/methods/aga/aga.hpp @@ -87,16 +87,18 @@ namespace opt_utilities public: aga_method(int _n1,int _n2) - :threshold(1e-4),p_fo(0),p_optimizer(0), - n1(_n1),n2(_n2),samples(n1*n2+n1),n0(n1*n2+n1), - decay_factor(.999) + :n1(_n1),n2(_n2),n0(n1*n2+n1), + p_fo(0),p_optimizer(0),threshold(1e-4), + decay_factor(.999), + samples(n1*n2+n1) { } aga_method() - :threshold(1e-4),p_fo(0),p_optimizer(0), - n1(50),n2(20),samples(n1*n2+n1),n0(n1*n2+n1), - decay_factor(.999) + :n1(50),n2(20),n0(n1*n2+n1), + p_fo(0),p_optimizer(0),threshold(1e-4), + decay_factor(.999), + samples(n1*n2+n1) { } @@ -106,10 +108,11 @@ namespace opt_utilities }; aga_method(const aga_method& rhs) - :threshold(rhs.threshold), + :n1(rhs.n1),n2(rhs.n2),n0(rhs.n0), p_fo(rhs.p_fo),p_optimizer(rhs.p_optimizer), - n1(rhs.n1),n2(rhs.n2), - samples(rhs.samples),n0(rhs.n0) + threshold(rhs.threshold), + decay_factor(rhs.decay_factor), + samples(rhs.samples) { } @@ -137,12 +140,12 @@ namespace opt_utilities void do_set_start_point(const array1d_type& p) { - for(int i=0;i