Skip to content

Commit

Permalink
Fixes bad text output (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenNneji authored Nov 2, 2023
1 parent 9da2745 commit d44dc1f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions minimisers/DE/RAT_deopt.m
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@

if (I_refresh > 0)
if ((rem(I_iter,I_refresh) == 0) || I_iter == 1) && strcmpi(controls.display,'iter')
%fprintf('Iteration: %d, Best: %f, fWeight: %f, F_CR: %f, I_NP: %d\n',I_iter,S_bestval.FVr_oa(1),fWeight,F_CR,I_NP);
fprintf('Iteration: %g, Best: %f, fWeight: %f, F_CR: %f, I_NP: %g\n', I_iter,S_bestval.FVr_oa(1),fWeight,F_CR,I_NP);
fprintf('Iteration: %g, Best: %f, fWeight: %f, F_CR: %f, I_NP: %g\n\n', I_iter,S_bestval.FVr_oa(1),fWeight,F_CR,I_NP);

%disp(S_bestval);
%var(FM_pop)
Expand Down
2 changes: 1 addition & 1 deletion minimisers/NSMain/drawMCMC.m
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@

% print out acceptance ratio
if verbose
fprintf('Acceptance ratio: %1.4f, \n', acctot/(Ntimes*Nmcmc));
fprintf('Acceptance ratio: %1.4f, \n\n', acctot/(Ntimes*Nmcmc));
end

return
2 changes: 1 addition & 1 deletion minimisers/NSMain/nestedSampler.m
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@

% display progress (optional)
if verbose
fprintf('log(Z): %.5e, tol = %.5e, K = %d, iteration = %d, H = %.5e', ...
fprintf('log(Z): %.5e, tol = %.5e, K = %d, iteration = %d, H = %.5e\n', ...
logZ, tol, int32(K), int32(j), H);
end

Expand Down
10 changes: 5 additions & 5 deletions minimisers/simplex/RATFminSearch.m
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@

% Print out initial f(x) as 0th iteration
if prnt == 3
fprintf('\n%s', header)
fprintf(' %5.0f %5.0f %12.6g %s', itercount, func_evals, fv(1), how);
fprintf('\n%s\n', header);
fprintf(' %5.0f %5.0f %12.6g %s\n', itercount, func_evals, fv(1), how);
elseif prnt == 4
% Option never used in RAT

Expand Down Expand Up @@ -294,7 +294,7 @@
itercount = itercount + 1;
func_evals = n+1;
if prnt == 3
fprintf(' %5.0f %5.0f %12.6g %s', itercount, func_evals, fv(1), how);
fprintf(' %5.0f %5.0f %12.6g %s\n', itercount, func_evals, fv(1), how);
elseif prnt == 4
% sendTextOutput(' ')
% sendTextOutput(how)
Expand Down Expand Up @@ -406,7 +406,7 @@
v = v(:,j);
itercount = itercount + 1;
if prnt == 3
fprintf(' %5.0f %5.0f %12.6g %s', itercount, func_evals, fv(1), how);
fprintf(' %5.0f %5.0f %12.6g %s\n', itercount, func_evals, fv(1), how);
elseif prnt == 4
% sendTextOutput(' ')
% sendTextOutput(num2str(how))
Expand Down Expand Up @@ -471,7 +471,7 @@
end

if printMsg
fprintf('\n%s', msg)
fprintf('\n%s\n', msg);
end

%--------------------------------------------------------------------------
Expand Down

0 comments on commit d44dc1f

Please sign in to comment.