Skip to content

Commit 58e57d7

Browse files
committed
Removed redundant code for PT / Minor figure handle fix
1 parent 695d6b9 commit 58e57d7

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

plotMultiStarts.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
% Open figure
3636
if length(varargin) >= 1 && ~isempty(varargin{1}) && isvalid(varargin{1})
37-
fh = figure(varargin{1});
37+
fh = varargin{1};
3838
else
3939
fh = figure('Name','plotMultiStarts');
4040
end

private/performPT.m

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -278,21 +278,6 @@
278278
end
279279
end
280280

281-
if nTemps > 1
282-
dBeta = beta(1:end-1) - beta(2:end);
283-
for l = nTemps:-1:2
284-
pAccSwap(l-1) = dBeta(l-1) .* (logPost(l)-logPost(l-1))';
285-
A(l-1) = log(rand) < pAccSwap(l-1);
286-
propSwap(l-1) = propSwap(l-1) + 1;
287-
accSwap(l-1) = accSwap(l-1) + A(l-1);
288-
% As usually implemented when using PT
289-
if A(l-1)
290-
theta(:,[l,l-1]) = theta(:,[l-1,l]);
291-
logPost([l,l-1]) = logPost([l-1,l]);
292-
end
293-
end
294-
end
295-
296281
% Adaptation of the temperature values (Vousden 2016)
297282
if nTemps > 1
298283

0 commit comments

Comments
 (0)