ó
    …~iœ	  ã                   óL   • S SK Jr  S SKrS/r\R
                  SS j5       rS rg)é    )ÚdefaultdictNÚk_clique_communitiesc              #   ó–  #   • US:  a  [         R                  " SU S35      eUc  [         R                  " U 5      nU Vs/ s H  n[        U5      U:¼  d  M  [	        U5      PM!     nn[        [        5      nU H  nU H  nXF   R                  U5        M     M!     [         R                  " 5       nUR                  U5        U HI  n[        XT5       H7  n[        UR                  U5      5      US-
  :¼  d  M&  UR                  XX5        M9     MK     [         R                  " U5       H  n	[        R                  " U	6 v •  M     gs  snf 7f)uÄ  Find k-clique communities in graph using the percolation method.

A k-clique community is the union of all cliques of size k that
can be reached through adjacent (sharing k-1 nodes) k-cliques.

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

k : int
   Size of smallest clique

cliques: list or generator
   Precomputed cliques (use networkx.find_cliques(G))

Returns
-------
Yields sets of nodes, one for each k-clique community.

Examples
--------
>>> G = nx.complete_graph(5)
>>> K5 = nx.convert_node_labels_to_integers(G, first_label=2)
>>> G.add_edges_from(K5.edges())
>>> c = list(nx.community.k_clique_communities(G, 4))
>>> sorted(list(c[0]))
[0, 1, 2, 3, 4, 5, 6]
>>> list(nx.community.k_clique_communities(G, 6))
[]

References
----------
.. [1] Gergely Palla, Imre DerÃ©nyi, IllÃ©s Farkas1, and TamÃ¡s Vicsek,
   Uncovering the overlapping community structure of complex networks
   in nature and society Nature 435, 814-818, 2005,
   doi:10.1038/nature03607
é   zk=z, k must be greater than 1.Né   )ÚnxÚNetworkXErrorÚfind_cliquesÚlenÚ	frozensetr   ÚlistÚappendÚGraphÚadd_nodes_fromÚ_get_adjacent_cliquesÚintersectionÚadd_edgeÚconnected_componentsÚunion)
ÚGÚkÚcliquesÚcÚmembership_dictÚcliqueÚnodeÚ
perc_graphÚ
adj_cliqueÚ	components
             Úb/home/mande/repo/quber/.venv/lib/python3.13/site-packages/networkx/algorithms/community/kclique.pyr   r      s  é € ðN 	ˆ1ƒuÜ×Ò  A 3Ð&AÐBÓCÐCØ�Ü—/’/ !Ó$ˆÙ%,Ó<¢W ´°A³¸!±‹|Œy˜Ž|¡W€GÐ<ô "¤$Ó'€OÛˆÛˆDØÑ!×(Ñ(¨Ö0ó ñ ô
 —’“€JØ×Ñ˜gÔ&ÛˆÜ/°ÖHˆJÜ�6×&Ñ& zÓ2Ó3¸¸A¹Õ>Ø×#Ñ# FÖ7ó Iñ ô ×,Ò,¨ZÖ8ˆ	Ü�Š 	Ð*Ô+ò 9ùò% =ùs   ‚>E	Á EÁEÁ&BE	Ã8AE	c                 ór   • [        5       nU  H&  nX    H  nX:w  d  M
  UR                  U5        M     M(     U$ ©N)ÚsetÚadd)r   r   Úadjacent_cliquesÚnr   s        r    r   r   I   s=   € Ü“uÐÛˆØ)Ô,ˆJØÕ#Ø ×$Ñ$ ZÖ0ó -ñ ð Ðó    r"   )Úcollectionsr   Únetworkxr   Ú__all__Ú_dispatchabler   r   © r'   r    Ú<module>r-      s3   ðÝ #ã à!Ð
"€ð ×Ñó=,ó ð=,ó@r'   