G = Graph({1:{2:'e4',4:'e5',3:'e3'},2:{1:'e4',3:'e6',4:'e1'},3:{1:'e3',2:'e6',4:'e2'},4:{1:'e5',2:'e1',3:'e2'}})
G.plot(edge_labels=True)
G.adjacency_matrix()
[0 1 1 1]
[1 0 1 1]
[1 1 0 1]
[1 1 1 0]

Kreyszig-21.1-8-U (last edited 2010-12-18 07:54:55 by 10)