Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Weighted adjacency matrix of a graph.

G=Graph(sparse=True, weighted=True)

G.add_edges([(0, 1, i), (0,8,1),(1,2,1),(2,3,1),(3,4,1),(4,5,1),(4,6,1),(6,7,1),(6,8,1),(8,9,1)])

M = G.weighted_adjacency_matrix()

show(M) Here the (1,0) entry in the output matrix will be i. Even I had defined (1,0,-i), it is not coming. Please give some hint.

Weighted adjacency matrix of a graph.

G=Graph(sparse=True, weighted=True)

G.add_edges([(0, 1, i), (0,8,1),(1,2,1),(2,3,1),(3,4,1),(4,5,1),(4,6,1),(6,7,1),(6,8,1),(8,9,1)])

M = G.weighted_adjacency_matrix()

show(M) show(M)

Here the (1,0) entry in the output matrix will be i. Even i, but I need -i. For that purpose, even I had defined (1,0,-i), it is not coming. Please give some hint. hint.

Weighted adjacency matrix of a graph.

G=Graph(sparse=True, weighted=True)

weighted=True) G.add_edges([(0, 1, i), (0,8,1),(1,2,1),(2,3,1),(3,4,1),(4,5,1),(4,6,1),(6,7,1),(6,8,1),(8,9,1)])

(0,8,1),(1,2,1),(2,3,1),(3,4,1),(4,5,1),(4,6,1),(6,7,1),(6,8,1),(8,9,1)]) M = G.weighted_adjacency_matrix()

G.weighted_adjacency_matrix() show(M)

show(M)

Here the (1,0) entry in the output matrix will be i, but I need -i. For that purpose, even I had defined (1,0,-i), it is not coming. Please give some hint.

Weighted adjacency matrix of a graph.

G=Graph(sparse=True, weighted=True) G.add_edges([(0, 1, i), (0,8,1),(1,2,1),(2,3,1),(3,4,1),(4,5,1),(4,6,1),(6,7,1),(6,8,1),(8,9,1)]) M = G.weighted_adjacency_matrix() show(M) show(M)

Here the (1,0) entry in the output matrix will be i, but I need -i. For that purpose, even I had defined (1,0,-i), it is not coming. Please give some hint.

Weighted adjacency matrix of a graph.

G=Graph(sparse=True, weighted=True) G.add_edges([(0, 1, i), (0,8,1),(1,2,1),(2,3,1),(3,4,1),(4,5,1),(4,6,1),(6,7,1),(6,8,1),(8,9,1)]) M = G.weighted_adjacency_matrix() show(M)

Here the (1,0) entry in the output matrix will be i, but I need -i. For that purpose, even I had defined (1,0,-i), it is not coming. Please give some hint.

Weighted adjacency matrix of a graph.

The code:

G=Graph(sparse=True, weighted=True)
 G.add_edges([(0, 1, i), (0,8,1),(1,2,1),(2,3,1),(3,4,1),(4,5,1),(4,6,1),(6,7,1),(6,8,1),(8,9,1)])
 M = G.weighted_adjacency_matrix()
    show(M)

show(M)

Here the (1,0) entry in the output matrix will be i, but I need -i. For that purpose, even I had defined (1,0,-i), it is not coming. Please give some hint.