Return the number of edges between two nodes.
Parameters : | u,v : nodes, optional (default=all edges)
|
---|---|
Returns : | nedges : int
|
See also
Examples
>>> G = nx.Graph() # or DiGraph, MultiGraph, MultiDiGraph, etc
>>> G.add_path([0,1,2,3])
>>> G.number_of_edges()
3
>>> G.number_of_edges(0,1)
1
>>> e = (0,1)
>>> G.number_of_edges(*e)
1