

function [pts,value_new]=iteration_symm(pts_init,opt_method,...
    deg,mildness_vect,family_type,de_parms)


display_stats=1;
tolmin=10^(-2);

% OPTIMIZATION FOR FIXED ORBIT.
if family_type == 1
    value_new=2*eps; value_old=value_new/2; value_init=value_new;
else
    value_new=realmax/2; value_old=2*value_new; value_init=value_new;
end

for tt=1:length(opt_method)

    unc_method=opt_method(tt);

%    for jj=1:100
%        if abs(value_new - value_old) > tolmin*abs(value_old)

            value_old=value_new;

            for ss=1:length(mildness_vect)
                mildness=mildness_vect(ss);
		        x_in = [acos(pts_init(:,1)); acos(pts_init(:,2))];
                [x,value_new]=...
                    optimal_process_symm(x_in,...
                    deg,mildness,family_type,unc_method,...
                    de_parms);
				dim = length(pts_init(:,1));
				pts = [cos(x(1:dim,1)) cos(x(dim+1:end,1))];
                pts_init=pts;

                if display_stats == 1

                    fprintf('\n \t %% value: %2.5e',value_new);
                    fprintf('\n \t %% pts_out=[');
                    for ssss=1:length(pts)
                        fprintf('\n \t %% %1.15e %1.15e',pts(ssss,1),pts(ssss,2));
                    end
                    fprintf('\n \t %% ];');

                end
%            end

 %       end

        % ONLY ONE ITERATION FOR "DE".
%        if unc_method == 6 | unc_method >= 8
%            value_old=value_new;
%        end

    end

    if family_type == 1
        value_old=value_new/2;
    else
        value_old=2*value_new;
    end

    pts_init=pts;

end
