Return density of bipartite graph B.
Parameters : | G : NetworkX graph nodes: list or container :
|
---|---|
Returns : | d : float
|
See also
Examples
>>> from networkx.algorithms import bipartite
>>> G = nx.complete_bipartite_graph(3,2)
>>> X=set([0,1,2])
>>> bipartite.density(G,X)
1.0
>>> Y=set([3,4])
>>> bipartite.density(G,Y)
1.0