networkx.MultiDiGraph.new_edge_key¶
- MultiDiGraph.new_edge_key(u, v)¶
Returns an unused key for edges between nodes
uandv.The nodes
uandvdo not need to be already in the graph.- Parameters
- u, vnodes
- Returns
- keyint
Notes
In the standard MultiGraph class the new key is the number of existing edges between
uandv(increased if necessary to ensure unused). The first edge will have key 0, then 1, etc. If an edge is removed further new_edge_keys may not be in this order.