function r = norm2(G,D,L,d)
  G2 = sym(G^2);
  s = (1-d)*eigs(mid(G2),mid(D),1,'SM');
  if isspd(G2-s*D) == 1
    r = sup(sqrt(norm(L)/s));
  else
    error('2-norm cannot be obtained.')
  end               
