+
    �°³jX  ã                   óJ  € R t ^ RIt. ROt]P                  ! RR7      RR l4       t]P                  ! RR7      RR l4       t]P                  ! RR7      RR l4       t]P                  ! RR7      RRRRR	R
/R l4       t]P                  R 4       t	]P                  RR l4       t
R# )z 
Eigenvalue spectrum of graphs.
NÚweight)Ú
edge_attrsc                ó†   € ^ RI pVP                  P                  \        P                  ! WR7      P                  4       4      # )a8  Returns eigenvalues of the Laplacian of G

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

weight : string or None, optional (default='weight')
   The edge data key used to compute each value in the matrix.
   If None, then each edge has weight 1.

Returns
-------
evals : NumPy array
  Eigenvalues

Notes
-----
For MultiGraph/MultiDiGraph, the edges weights are summed.
See :func:`~networkx.convert_matrix.to_numpy_array` for other options.

See Also
--------
laplacian_matrix

Examples
--------
The multiplicity of 0 as an eigenvalue of the laplacian matrix is equal
to the number of connected components of G.

>>> G = nx.Graph()  # Create a graph with 5 nodes and 3 connected components
>>> G.add_nodes_from(range(5))
>>> G.add_edges_from([(0, 2), (3, 4)])
>>> nx.laplacian_spectrum(G)
array([0., 0., 0., 2., 2.])

N©r   )ÚscipyÚlinalgÚeigvalshÚnxÚlaplacian_matrixÚtodense©ÚGr   Úsps   && ÚY/home/luca/screen-checking/.venv/lib/python3.14/site-packages/networkx/linalg/spectrum.pyÚlaplacian_spectrumr      s1   € óN à�9‰9×Ñœb×1Ò1°!ÔC×KÑKÓMÓNÐNó    c                ó†   € ^ RI pVP                  P                  \        P                  ! WR7      P                  4       4      # )a×  Return eigenvalues of the normalized Laplacian of G

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

weight : string or None, optional (default='weight')
   The edge data key used to compute each value in the matrix.
   If None, then each edge has weight 1.

Returns
-------
evals : NumPy array
  Eigenvalues

Notes
-----
For MultiGraph/MultiDiGraph, the edges weights are summed.
See to_numpy_array for other options.

See Also
--------
normalized_laplacian_matrix
Nr   )r   r   r   r	   Únormalized_laplacian_matrixr   r   s   && r   Únormalized_laplacian_spectrumr   =   s5   € ó6 à�9‰9×ÑÜ
×&Ò& qÔ8×@Ñ@ÓBóð r   c                ó†   € ^ RI pVP                  P                  \        P                  ! WR7      P                  4       4      # )aÊ  Returns eigenvalues of the adjacency matrix of G.

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

weight : string or None, optional (default='weight')
   The edge data key used to compute each value in the matrix.
   If None, then each edge has weight 1.

Returns
-------
evals : NumPy array
  Eigenvalues

Notes
-----
For MultiGraph/MultiDiGraph, the edges weights are summed.
See to_numpy_array for other options.

See Also
--------
adjacency_matrix
Nr   )r   r   Úeigvalsr	   Úadjacency_matrixr   r   s   && r   Úadjacency_spectrumr   _   s0   € ó6 à�9‰9×ÑœR×0Ò0°ÔB×JÑJÓLÓMÐMr   Úqg      Ð?Ú
normalizedFc               ó�   € ^ RI p\        P                  ! WW#R7      pVP                  P	                  VP                  4       RR7      # )aA  Returns eigenvalues of the magnetic laplacian matrix with phase `q`.

Parameters
----------
G : DiGraph
    Directed graph

q : float (default=0.25)
    The phase of the magnetic potential is the charge parameter 0 <= q <= 0.5.
    At q=0 returns the standard Laplacian.

weight : string or None, optional (default='weight')
   The edge data key used to compute each value in the matrix.
   If None, then each edge has weight 1.

normalized : bool, optional (default=False)
    If True, return the spectrum of the normalized magnetic laplacian matrix.
    If False, use the magnetic laplacian matrix without normalization.

Returns
-------
evals : np.ndarray
    Eigenvalues of the magnetic Laplacian matrix

Raises
------
NetworkXNotImplemented
    If `G` is undirected or a multigraph.

See Also
--------
magnetic_laplacian_matrix
N)r   r   r   T)Úeigvals_only)r   r	   Úmagnetic_laplacian_matrixr   ÚeighÚtoarray)r   r   r   r   r   ÚMLs   &$$$  r   Úmagnetic_spectrumr!      s7   € óF ä	×	%Ò	% a°VÔ	S€BØ�9‰9�>‰>˜"Ÿ*™*›,°Tˆ>Ó:Ð:r   c                óò   € ^ RI pV P                  4       '       d0   VP                  P                  \        P
                  ! V 4      4      # VP                  P                  \        P                  ! V 4      4      # )aj  Returns eigenvalues of the modularity matrix of G.

Parameters
----------
G : Graph
   A NetworkX Graph or DiGraph

Returns
-------
evals : NumPy array
  Eigenvalues

See Also
--------
modularity_matrix

References
----------
.. [1] M. E. J. Newman, "Modularity and community structure in networks",
   Proc. Natl. Acad. Sci. USA, vol. 103, pp. 8577-8582, 2006.
N)r   Úis_directedr   r   r	   Údirected_modularity_matrixÚmodularity_matrix)r   r   s   & r   Úmodularity_spectrumr&   ¨   sR   € ó. à‡}�}‡‚Ø�y‰y× Ñ ¤×!>Ò!>¸qÓ!AÓBÐBà�y‰y× Ñ ¤×!5Ò!5°aÓ!8Ó9Ð9r   c                ó„   € ^ RI pVP                  P                  \        P                  ! W4      P                  4       4      # )u²  Returns eigenvalues of the Bethe Hessian matrix of G.

Parameters
----------
G : Graph
   A NetworkX Graph or DiGraph

r : float
   Regularizer parameter

Returns
-------
evals : NumPy array
  Eigenvalues

See Also
--------
bethe_hessian_matrix

References
----------
.. [1] A. Saade, F. Krzakala and L. ZdeborovÃ¡
   "Spectral clustering of graphs with the bethe hessian",
   Advances in Neural Information Processing Systems. 2014.
N)r   r   r   r	   Úbethe_hessian_matrixr   )r   Úrr   s   && r   Úbethe_hessian_spectrumr*   Ç   s0   € ó6 à�9‰9×Ñœb×5Ò5°aÓ;×CÑCÓEÓFÐFr   )r   r   r&   r   r*   r!   r   )N)Ú__doc__Únetworkxr	   Ú__all__Ú_dispatchabler   r   r   r!   r&   r*   © r   r   Ú<module>r0      sä   ðñó ò€ð ×Ò˜XÔ&ó(Oó 'ð(OðV ×Ò˜XÔ&óó 'ððB ×Ò˜XÔ&óNó 'ðNð> ×Ò˜XÔ&ð%;˜dð %;¨8ð %;Àó %;ó 'ð%;ðP ×Ññ:ó ð:ð< ×ÑóGó òGr   