function [rmin,rmax,time2] = sem_eigs(eflag,W,rmin,rmax,n); % PURPOSE: compute the eigenvalues for the weight matrix % --------------------------------------------------- % USAGE: [rmin,rmax,time2] = far_eigs(eflag,W,rmin,rmax,W) % where eflag is an input flag, W is the weight matrix % rmin,rmax may be used as default outputs % and the outputs are either user-inputs or default values % --------------------------------------------------- if eflag == 0 t0 = clock; opt.tol = 1e-3; opt.disp = 0; lambda = eigs(sparse(W),speye(n),1,'SR',opt); rmin = 1/lambda; rmax = 1; time2 = etime(clock,t0); else time2 = 0; end;