MultiDiGraph.pred#
- property MultiDiGraph.pred#
Graph adjacency object holding the predecessors of each node.
This object is a read-only dict-like structure with node keys and neighbor-dict values. The neighbor-dict is keyed by neighbor to the edgekey-dict. So
G.adj[3][2][0]['color'] = 'blue'
sets the color of the edge(3, 2, 0)
to"blue"
.Iterating over G.adj behaves like a dict. Useful idioms include
for nbr, datadict in G.adj[n].items():
.