+
    )in                     N    R t ^ RItR.t]P                  ! RR7      RR l4       tR# )z
Spectral bipartivity measure.
Nspectral_bipartivityweight)
edge_attrsc           
     B   ^ RI p\        V 4      p\        P                  ! WVR7      pVP                  P                  V4      pVP                  P                  V) 4      pRWg,           ,          pVfK   \        VP                  4       P                  4       VP                  4       P                  4       ,          4      # \        \        V\        \        V4      4      4      4      p	/ p
V F4  pW,          pVP                  W4      VP                  W4      ,          W&   K6  	  V
# )u  Returns the spectral bipartivity.

Parameters
----------
G : NetworkX graph

nodes : list or container  optional(default is all nodes)
  Nodes to return value of spectral bipartivity contribution.

weight : string or None  optional (default = 'weight')
  Edge data key to use for edge weights. If None, weights set to 1.

Returns
-------
sb : float or dict
   A single number if the keyword nodes is not specified, or
   a dictionary keyed by node with the spectral bipartivity contribution
   of that node as the value.

Examples
--------
>>> from networkx.algorithms import bipartite
>>> G = nx.path_graph(4)
>>> bipartite.spectral_bipartivity(G)
1.0

Notes
-----
This implementation uses Numpy (dense) matrices which are not efficient
for storing large sparse graphs.

See Also
--------
color

References
----------
.. [1] E. Estrada and J. A. Rodríguez-Velázquez, "Spectral measures of
   bipartivity in complex networks", PhysRev E 72, 046105 (2005)
N)r   g      ?)scipylistnxto_numpy_arraylinalgexpmfloatdiagonalsumdictziprangelenitem)Gnodesr   spnodelistAexpAexpmAcoshAindexsbnis   &&&          d/var/www/html/photoedit/myenv/lib/python3.14/site-packages/networkx/algorithms/bipartite/spectral.pyr   r   
   s    T AwH
!f5A99>>!DIINNA2E4< E}U^^%))+dmmo.A.A.CCDD S5X#789AAJJq$tyy6BE  	    )Nr   )__doc__networkxr   __all___dispatchabler    r!   r    <module>r'      s6    !
" X&: ':r!   