Returns the spectral bipartivity.
Parameters : | G : NetworkX graph nodes : list or container optional(default is all nodes)
weight : string or None optional (default = ‘weight’)
|
---|---|
Returns : | sb : float or dict
|
See also
color
Notes
This implementation uses Numpy (dense) matrices which are not efficient for storing large sparse graphs.
References
[R127] | E. Estrada and J. A. Rodríguez-Velázquez, “Spectral measures of bipartivity in complex networks”, PhysRev E 72, 046105 (2005) |
Examples
>>> from networkx.algorithms import bipartite
>>> G = nx.path_graph(4)
>>> bipartite.spectral_bipartivity(G)
1.0