update weight function laplacian