function dhist(A)
% DHIST : log/log degree histogram of graph 

A = A - diag(diag(A));
A = spones(A);
degree = full(sum(A,2));
logdeg = log(degree);
mld = ceil(max(logdeg));

edges = [0:.05:mld];

N = histc(logdeg,edges);

% bar(edges,logN,'histc');
figure
loglog(exp(edges),N,'.');
xlabel('vertex degree');
ylabel('number of vertices');

figure
loglog(sort(degree,'descend'),'.');
xlabel('vertex number');
ylabel('vertex degree');
