function    value=K(B)
%  Operator K of B (psd)
B=sparse(B);
n=size(B,1);
value=sparse(diag(B)*sparse(ones(1,n)));
value=value+value'-2*B;
