First time here? Check out the FAQ!
answered 2017-11-01 10:00:14 +0100
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]