Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
77ee04ef
Commit
77ee04ef
authored
May 31, 2010
by
Marco Ratto
Browse files
use of struct2local is eliminated;
Header is improved;
parent
6625ca41
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/independent_metropolis_hastings_core.m
View file @
77ee04ef
function
myoutput
=
independent_metropolis_hastings_core
(
myinputs
,
fblck
,
nblck
,
whoiam
,
ThisMatlab
)
% PARALLEL CONTEXT
% The most computationally intensive portion of code in
% independent_metropolis_hastings (the 'for xxx = fblck:nblck' cycle).
% See the comment in random_walk_metropolis_hastings_core.m funtion.
%
% INPUTS
% See See the comment in random_walk_metropolis_hastings_core.m funtion.
% Copyright (C) 2006-2008 Dynare Team
% OUTPUTS
% See See the comment in random_walk_metropolis_hastings_core.m funtion.
%
% ALGORITHM
% Portion of Independing Metropolis-Hastings.
%
% SPECIAL REQUIREMENTS.
% None.
%
% Copyright (C) 2006-2008,2010 Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -24,9 +40,34 @@ end
global
bayestopt_
estim_params_
options_
M_
oo_
struct2local
(
myinputs
);
% Reshape 'myinputs' for local computation.
% In order to avoid confusion in the name space, the instruction struct2local(myinputs) is replaced by:
TargetFun
=
myinputs
.
TargetFun
;
ProposalFun
=
myinputs
.
ProposalFun
;
xparam1
=
myinputs
.
xparam1
;
vv
=
myinputs
.
vv
;
mh_bounds
=
myinputs
.
mh_bounds
;
ix2
=
myinputs
.
ix2
;
ilogpo2
=
myinputs
.
ilogpo2
;
ModelName
=
myinputs
.
ModelName
;
fline
=
myinputs
.
fline
;
npar
=
myinputs
.
npar
;
nruns
=
myinputs
.
nruns
;
NewFile
=
myinputs
.
NewFile
;
MAX_nruns
=
myinputs
.
MAX_nruns
;
d
=
myinputs
.
d
;
InitSizeArray
=
myinputs
.
InitSizeArray
;
record
=
myinputs
.
record
;
varargin
=
myinputs
.
varargin
;
if
whoiam
Parallel
=
myinputs
.
Parallel
;
MasterName
=
myinputs
.
MasterName
;
DyMo
=
myinputs
.
DyMo
;
end
% (re)Set the penalty
% (re)Set the penalty
.
bayestopt_
.
penalty
=
Inf
;
MhDirectoryName
=
CheckPath
(
'metropolis'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment