  function ShowLaplacianChol()
% Looks at the Cholesky factorization of Laplacian(m,n)
m = 30;
n = 20;
A = TheLaplacian(m,n);

% Cholesky on A...
G1 = chol(A,'lower');

subplot(2,2,1)
spy(A)
xlabel(sprintf('nnz(A) = %1d',nnz(A)),'fontsize',16)
title('A','fontsize',16)

subplot(2,2,3)
spy(G1)
xlabel(sprintf('nnz(G1) = %1d',nnz(G1)),'fontsize',16)
title('G1','fontsize',16)

% Cholesky on A with minimum degree pivoting...
[G2,err,p] = chol(A,'lower','vector');

subplot(2,2,2)
spy(A(p,p))
title('P''AP','fontsize',16)

subplot(2,2,4)
spy(G2)
xlabel(sprintf('nnz(G2) = %1d',nnz(G2)),'fontsize',16)
title('G2','fontsize',16)
shg


