fix weight_matrix, remove weight_matrix_sparse

when (i,j) is not an edge of graph, weight w_{i,j} should be Inf instead of 0.
weight w_{i,j} should be 0 only when i==j

therefore, there would be no sparse version of weight matrix