%
% runAll.m
%

% assumes the following variables are set:
%  Itarget
%  Irefs{1}-{4}
%  scheme
%  allLambdas[]
%  indices[]
%  pdf[]
%  blocksize

fprintf('Running scheme %s...\n', scheme);
% get curve by varying lambda

i = 0;
R = zeros(size(allLambdas));
D = zeros(size(allLambdas));

for lambda = allLambdas
  
  fprintf('lambda = %f ', lambda);
  
  i = i + 1;
  [R(i), D(i), dummy_pdf, Ipredict{i}] = All(Itarget, Irefs, lambda, ...
											 indices, pdf, blocksize, scheme);
  fprintf('R=%f, PSNR=%f\n', R(i), PSNR(D(i))); 
end

