function L = adj2lap ( A )
%ADJ2LAP  converts adjacency matrix to Laplacian matrix

if nargin ~= 1
    error('Please input adjacency matrix !');
else
    if size(A,1) ~= size(A,2)
        error('Please input SQUARE matrix !');
    end
end

L = diag(sum(A)) - A;