+
    �°³jŸ  ã                   ó@   € R t ^ RItR.t]P                  RR l4       tR# )z@Algorithm to select influential nodes in a graph using VoteRank.NÚvoterankc                ó˜  a€ . p/ o\        V 4      ^ 8X  d   V# Ve   V\        V 4      8”  d   \        V 4      pV P                  4       '       d2   \        R V P                  4        4       4      \        V 4      ,          pM0\        R V P	                  4        4       4      \        V 4      ,          pV P                  4        F
  p^ ^.SV&   K  	  \        V4       EFn  pV P                  4        F  p^ SV,          ^ &   K  	  V P                  4        Fq  w  rFSV,          ^ ;;,          SV,          ^,          ,          uu&   V P                  4       '       d   KG  SV,          ^ ;;,          SV,          ^,          ,          uu&   Ks  	  V F  p^ SV,          ^ &   K  	  \        V P
                  V3R lR7      pSV,          ^ ,          ^ 8X  d   Vu # VP                  V4       ^ ^ .SV&   V P                  V4       FL  w  rVSV,          ^;;,          ^V,          ,          uu&   \        SV,          ^,          ^ 4      SV,          ^&   KN  	  EKq  	  V# )a#  Select a list of influential nodes in a graph using VoteRank algorithm

VoteRank [1]_ computes a ranking of the nodes in a graph G based on a
voting scheme. With VoteRank, all nodes vote for each of its in-neighbors
and the node with the highest votes is elected iteratively. The voting
ability of out-neighbors of elected nodes is decreased in subsequent turns.

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

number_of_nodes : integer, optional
    Number of ranked nodes to extract (default all nodes).

Returns
-------
voterank : list
    Ordered list of computed seeds.
    Only nodes with positive number of votes are returned.

Examples
--------
>>> G = nx.Graph([(0, 1), (0, 2), (0, 3), (1, 4)])
>>> nx.voterank(G)
[0, 1]

The algorithm can be used both for undirected and directed graphs.
However, the directed version is different in two ways:
(i) nodes only vote for their in-neighbors and
(ii) only the voting ability of elected node and its out-neighbors are updated:

>>> G = nx.DiGraph([(0, 1), (2, 1), (2, 3), (3, 4)])
>>> nx.voterank(G)
[2, 3]

Notes
-----
Each edge is treated independently in case of multigraphs.

References
----------
.. [1] Zhang, J.-X. et al. (2016).
    Identifying a set of influential spreaders in complex networks.
    Sci. Rep. 6, 27823; doi: 10.1038/srep27823.
c              3   ó*   "  € T F	  w  rVx € K  	  R # 5i©N© ©Ú.0Ú_Údegs   &  Úl/home/luca/screen-checking/.venv/lib/python3.14/site-packages/networkx/algorithms/centrality/voterank_alg.pyÚ	<genexpr>Úvoterank.<locals>.<genexpr>@   s   é € Ð9©.¡ �«.ùó   ‚c              3   ó*   "  € T F	  w  rVx € K  	  R # 5ir   r   r   s   &  r   r   r   C   s   é € Ð5©*¡ �«*ùr   c                 ó$   <€ SV ,          ^ ,          # )é    r   )ÚxÚ	vote_ranks   &€r   Ú<lambda>Úvoterank.<locals>.<lambda>U   s   ø€  y°¥|°A¦ó    )Úkey)
ÚlenÚis_directedÚsumÚ
out_degreeÚdegreeÚnodesÚrangeÚedgesÚmaxÚappend)ÚGÚnumber_of_nodesÚinfluential_nodesÚ	avgDegreeÚnr	   Únbrr   s   &&     @r   r   r      s×  ø€ ð` ÐØ€IÜ
ˆ1ƒv�„{Ø Ð ØÒ /´C¸³FÔ":Ü˜a›&ˆØ‡}�}‡‚äÑ9¨!¯,©,¬.Ó9Ó9¼CÀ»FÕB‰	ô Ñ5¨!¯(©(¬*Ó5Ó5¼¸A»Õ>ˆ	à�W‰WŽYˆØ˜1�vˆ	�!‹ñ ô �?×#ˆà—‘–ˆAØˆI�a�L˜‹Oñ ð —g‘g–i‰FˆAà�a�L˜�O˜y¨�~¨aÕ0Õ0‹OØ—=‘=—?”?Ø˜#•˜q×! Y¨q¥\°!¥_Õ4Õ!ñ	  ó
 #ˆAØˆI�a�L˜‹Oñ #ô �—‘Ô6Ô7ˆØ�Q�<˜�?˜aÔØ$Ò$Ø× Ñ  Ô#à˜1�vˆ	�!‰à—g‘g˜a–j‰FˆAØ�c�N˜1×  Y¥Õ.ÓÜ # I¨c¥N°1Õ$5°qÓ 9ˆI�c�N˜1Óô !ñ) $ð. Ðr   r   )Ú__doc__ÚnetworkxÚnxÚ__all__Ú_dispatchabler   r   r   r   Ú<module>r-      s.   ðÙ Fã àˆ,€ð ×ÑóVó òVr   