Return the degrees of the two node sets in the bipartite graph B.
Parameters : | G : NetworkX graph nodes: list or container :
weight : string or None, optional (default=None)
|
---|---|
Returns : | (degX,degY) : tuple of dictionaries
|
Examples
>>> from networkx.algorithms import bipartite
>>> G = nx.complete_bipartite_graph(3,2)
>>> Y=set([3,4])
>>> degX,degY=bipartite.degrees(G,Y)
>>> degX
{0: 2, 1: 2, 2: 2}