function ab=r_marchenko_pastur_cheb(dig,N,alpha,beta,c,dirac)
%R_MARCHENKO_PASTUR_CHEB Recurrence coefficients for the
%generalized Marchenko_Pastur probability measure.
%   AB=R_MARCHENKO_PASTUR_CHEB(DIG,N,ALPHA,BETA,C,DIRAC) uses
%   the modified Chebyshev algorithm to generate in DIG-digit
%   arithmetic the first N recurrence coefficients for the
%   monic orthogonal polynomials relative to the generalized
%   Marchenko-Pastur probability measure with parameters
%   ALPHA, BETA, C, and with or without the Dirac function 
%   depending on whether DIRAC=true resp. DIRAC=false. The
%   recurrence coefficients are placed into the Nx2 array AB.

digits(dig);
s1=vpa(1); sc=vpa(c); sa=(sqrt(sc)-s1)^2;
sal=vpa(alpha); sbe=vpa(beta);
if c==1
  ab=sr_jacobi01(N,sal,sbe-s1); ab(1,2)=s1;
else
  abm=vpa(zeros(2*N-1,2)); abm(:,1)=sa*vpa(ones(2*N-1,1));
  mom=smom_marchenko_pastur(dig,N,sal,sbe,c,dirac); mom=mom';
  ab=schebyshev(dig,N,mom,abm);
end
