Ë
    D^(h/  ã                   óD   — d dl mZ d dlZdgZej
                  dd„«       Zy)é    )ÚcombinationsNÚ
dispersionc                 óv  ‡‡‡‡— ˆˆˆˆfd„}|€g|€3| D �ci c]  }|i “Œ }	}| D ]  }| |   D ]  } || ||«      |	|   |<   Œ Œ |	S t         j                  | |   i «      }	| |   D ]  } || ||«      |	|<   Œ |	S |€2t         j                  | |   i «      }	| |   D ]  } || ||«      |	|<   Œ |	S  || ||«      }	|	S c c}w )a�  Calculate dispersion between `u` and `v` in `G`.

    A link between two actors (`u` and `v`) has a high dispersion when their
    mutual ties (`s` and `t`) are not well connected with each other.

    Parameters
    ----------
    G : graph
        A NetworkX graph.
    u : node, optional
        The source for the dispersion score (e.g. ego node of the network).
    v : node, optional
        The target of the dispersion score if specified.
    normalized : bool
        If True (default) normalize by the embeddedness of the nodes (u and v).
    alpha, b, c : float
        Parameters for the normalization procedure. When `normalized` is True,
        the dispersion value is normalized by::

            result = ((dispersion + b) ** alpha) / (embeddedness + c)

        as long as the denominator is nonzero.

    Returns
    -------
    nodes : dictionary
        If u (v) is specified, returns a dictionary of nodes with dispersion
        score for all "target" ("source") nodes. If neither u nor v is
        specified, returns a dictionary of dictionaries for all nodes 'u' in the
        graph with a dispersion score for each node 'v'.

    Notes
    -----
    This implementation follows Lars Backstrom and Jon Kleinberg [1]_. Typical
    usage would be to run dispersion on the ego network $G_u$ if $u$ were
    specified.  Running :func:`dispersion` with neither $u$ nor $v$ specified
    can take some time to complete.

    References
    ----------
    .. [1] Romantic Partnerships and the Dispersion of Social Ties:
        A Network Analysis of Relationship Status on Facebook.
        Lars Backstrom, Jon Kleinberg.
        https://arxiv.org/pdf/1310.6753v1.pdf

    c                 óN  •— t        | |   «      }| |   D �ch c]	  }||v sŒ|’Œ }}||h}t        |d«      }d}|D ];  \  }	}
|j                  | |	   «      |z
  }|
|vsŒ"|j                  | |
   «      sŒ7|dz  }Œ= t	        |«      }|}‰r|‰z   ‰z  }|‰z   dk7  r||‰z   z  }|S c c}w )z=dispersion for all nodes 'v' in a ego network G_u of node 'u'é   r   é   )Úsetr   ÚintersectionÚ
isdisjointÚlen)ÚG_uÚuÚvÚu_nbrsÚnÚSTÚset_uvÚpossibÚtotalÚsÚtÚnbrs_sÚembeddednessÚdispersion_valÚalphaÚbÚcÚ
normalizeds                 €€€€úg/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/networkx/algorithms/centrality/dispersion.pyÚ_dispersionzdispersion.<locals>._dispersion9   sÝ   ø€ ä�S˜‘V“ˆØ˜Q™Ö/�A 1¨¢;ŠaÐ/ˆÐ/Ø�Q�ˆä˜b !Ó$ˆØˆØò 	‰DˆAˆqà×(Ñ(¨¨Q©Ó0°6Ñ9ˆFà˜Šà×$Ñ$ S¨¡VÕ,à˜Q‘J‘Eð	ô ˜2“wˆàˆÙØ# a™i¨EÑ1ˆNØ˜aÑ 1Ò$Ø ,°Ñ"2Ñ2�àÐùò/ 0s
   —	B"¡B")ÚdictÚfromkeys)
ÚGr   r   r   r   r   r   r    r   Úresultss
      ````   r   r   r      s  û€ ÷bð8 	€yàˆ9Ø&'Ö( �q˜"‘uÐ(ˆGÐ(Øò 9�Ø˜1™ò 9�AÙ$/°°1°aÓ$8�G˜A‘J˜q’Mñ9ð9ð$ €Nô —m‘m A a¡D¨"Ó-ˆGØ�q‘Tò 2�Ù(¨¨A¨qÓ1�˜’
ð2ð €Nð ˆ9Ü—m‘m A a¡D¨"Ó-ˆGØ�q‘Tò 2�Ù(¨¨A¨qÓ1�˜’
ð2ð €Nñ " ! Q¨Ó*ˆGà€Nùò' )s   •
B6)NNTg      ð?ç        r%   )Ú	itertoolsr   ÚnetworkxÚnxÚ__all__Ú_dispatchabler   © ó    r   ú<module>r-      s.   ðÝ "ã àˆ.€ð ×Ñòbó ñbr,   