First time here? Check out the FAQ!
answered 7 years ago
sage: G = DiGraph(3, weighted=True) sage: G.add_edges([(0,2,4), (1,2,6),(0,1,2)]) sage: G.laplacian_matrix() [ 0 -2 -4] [ 0 2 -6] [ 0 0 10]