removed seeding random generators from clock in cmaes and metropolis hastings

time-shift
Michel Juillard 2012-08-05 10:59:59 +02:00
parent 6b3bd9dd0b
commit b1ad31cf56
2 changed files with 5 additions and 8 deletions

View File

@ -644,11 +644,11 @@ else % flgresume
end
% initialize random number generator
if ischar(opts.Seed)
randn('state', eval(opts.Seed)); % random number generator state
else
randn('state', opts.Seed);
end
% $$$ if ischar(opts.Seed)
% $$$ randn('state', eval(opts.Seed)); % random number generator state
% $$$ else
% $$$ randn('state', opts.Seed);
% $$$ end
%qqq
% load(opts.SaveFilename, 'startseed');
% randn('state', startseed);

View File

@ -180,9 +180,6 @@ if ~options_.load_mh_file && ~options_.mh_recover
% separate initializaton for each chain
JSUM = 0;
for j=1:nblck,
JSUM = JSUM + sum(100*clock);
randn('state',JSUM);
rand('state',JSUM);
record.Seeds(j).Normal = randn('state');
record.Seeds(j).Unifor = rand('state');
end