function [av_lpf] = tester(m, n, numprobs)
%
% code to test performance of pdip amd mpc routines on random
% dense problems.
%
% P:   min_x c'*x  s.t. Ax=b, x>=0,
% D:   max_{lambda,s}   b'*lambda  s.t. A'*lambda+s=c,  s>=0.
%
% calling sequence:
%
% [avpd,avme] = tester(m, n, numprobs)
%
% input:    m, n,    problem dimensions (m<n)
%           numprobs number of problems to test
%
% output:   av_lpf is the av # iterations required by lpf


av_lpf = 0;

for i=1:numprobs
  A = randn(m,n);
  x = rand(n,1)+.1; b = A*x;
  s = rand(n,1)+.1; lambda=randn(m,1); c=A'*lambda+s;

  x0=x; s0=s; lambda0=lambda;
  
  [x,y,s,f,its] = lpf(A,b,c,x0,lambda0,s0);
  av_lpf = av_lpf + its;  
end

av_lpf = av_lpf / numprobs; 

fprintf('\n lpf average %7.1f iterations', av_lpf);

return;
