§
    bŠtjœ	  ã                   óH   — d dl mZ d dlZdgZej        dd„¦   «         Zd„ ZdS )é    )ÚdefaultdictNÚk_clique_communitiesc              #   óN  ‡K  — ‰dk     rt          j        d‰› d�¦  «        ‚|€t          j        | ¦  «        }ˆfd„|D ¦   «         }t          t          ¦  «        }|D ]"}|D ]}||                              |¦  «         ŒŒ#t          j        ¦   «         }|                     |¦  «         |D ]T}t          ||¦  «        D ]A}t          | 
                    |¦  «        ¦  «        ‰dz
  k    r|                     ||¦  «         ŒBŒUt          j        |¦  «        D ]}t          j        |Ž V — ŒdS )u8  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.Nc                 óT   •— g | ]$}t          |¦  «        ‰k    ¯t          |¦  «        ‘Œ%S © )ÚlenÚ	frozenset)Ú.0ÚcÚks     €úc/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/networkx/algorithms/community/kclique.pyú
<listcomp>z(k_clique_communities.<locals>.<listcomp>3   s*   ø€ Ð<Ð<Ð< µ°A±´¸!²°�y˜‰|Œ|°°°ó    é   )ÚnxÚNetworkXErrorÚfind_cliquesr   ÚlistÚappendÚGraphÚadd_nodes_fromÚ_get_adjacent_cliquesr	   ÚintersectionÚadd_edgeÚconnected_componentsr
   Úunion)	ÚGr   ÚcliquesÚmembership_dictÚcliqueÚnodeÚ
perc_graphÚ
adj_cliqueÚ	components	    `       r   r   r      sq  øè è € ðN 	ˆ1‚u€uÝÔÐB AÐBÐBÐBÑCÔCÐCØ€Ý”/ !Ñ$Ô$ˆØ<Ð<Ð<Ð< WÐ<Ñ<Ô<€Gõ "¥$Ñ'Ô'€OØð 1ð 1ˆØð 	1ð 	1ˆDØ˜DÔ!×(Ò(¨Ñ0Ô0Ð0Ð0ð	1õ ”‘”€JØ×Ò˜gÑ&Ô&Ð&Øð 8ð 8ˆÝ/°¸ÑHÔHð 	8ð 	8ˆJÝ�6×&Ò& zÑ2Ô2Ñ3Ô3¸¸A¹Ò>Ð>Ø×#Ò# F¨JÑ7Ô7Ð7øð	8õ Ô,¨ZÑ8Ô8ð ,ð ,ˆ	ÝŒ 	Ð*Ð+Ð+Ð+Ð+ð,ð ,r   c                 óx   — t          ¦   «         }| D ](}||         D ]}| |k    r|                     |¦  «         ŒŒ)|S ©N)ÚsetÚadd)r!   r    Úadjacent_cliquesÚnr$   s        r   r   r   I   s\   € Ý‘u”uÐØð 1ð 1ˆØ)¨!Ô,ð 	1ð 	1ˆJØ˜Ò#Ð#Ø ×$Ò$ ZÑ0Ô0Ð0øð	1ð Ðr   r'   )Úcollectionsr   Únetworkxr   Ú__all__Ú_dispatchabler   r   r   r   r   ú<module>r0      si   ðØ #Ð #Ð #Ð #Ð #Ð #à Ð Ð Ð à!Ð
"€ð Ôð=,ð =,ð =,ñ Ôð=,ð@ð ð ð ð r   