+
    �°³j  ã                   ó  € R t ^ RIt^ RIHt . ROt]! ^4      ]P                  ! RRR7      R	R l4       4       t]! ^4      ]P                  ! RRR7      R	R l4       4       t]! ^4      ]P                  ! RRR7      R	R l4       4       t	R# )
z,
Generators for random intersection graphs.
N)Úpy_random_stateT)ÚgraphsÚreturns_graphc                ór   € ^ RI Hp VP                  WW#4      p\        P                  ! V\        V 4      4      # )u7  Returns a uniform random intersection graph.

Parameters
----------
n : int
    The number of nodes in the first bipartite set (nodes)
m : int
    The number of nodes in the second bipartite set (attributes)
p : float
    Probability of connecting nodes between bipartite sets
seed : integer, random_state, or None (default)
    Indicator of random number generation state.
    See :ref:`Randomness<randomness>`.

See Also
--------
gnp_random_graph

References
----------
.. [1] K.B. Singer-Cohen, Random Intersection Graphs, 1995,
   PhD thesis, Johns Hopkins University
.. [2] Fill, J. A., Scheinerman, E. R., and Singer-Cohen, K. B.,
   Random intersection graphs when m = !(n):
   An equivalence theorem relating the evolution of the g(n, m, p)
   and g(n, p) models. Random Struct. Algorithms 16, 2 (2000), 156â€“176.
)Ú	bipartite)Únetworkx.algorithmsr   Úrandom_graphÚnxÚprojected_graphÚrange)ÚnÚmÚpÚseedr   ÚGs   &&&&  Úa/home/luca/screen-checking/.venv/lib/python3.14/site-packages/networkx/generators/intersection.pyÚ!uniform_random_intersection_graphr      s0   € õ< .à×Ñ˜q QÓ-€AÜ×Ò˜a¤ q£Ó*Ð*ó    c           	     ó<  € \         P                  ! W,           4      p\        W V,           4      p\        V 4       F@  pVP                  WR4      pVP	                  \        V.\        V4      ,          V4      4       KB  	  \         P                  ! V\        V 4      4      # )aÜ  Returns a intersection graph with randomly chosen attribute sets for
each node that are of equal size (k).

Parameters
----------
n : int
    The number of nodes in the first bipartite set (nodes)
m : int
    The number of nodes in the second bipartite set (attributes)
k : float
    Size of attribute set to assign to each node.
seed : integer, random_state, or None (default)
    Indicator of random number generation state.
    See :ref:`Randomness<randomness>`.

See Also
--------
gnp_random_graph, uniform_random_intersection_graph

References
----------
.. [1] Godehardt, E., and Jaworski, J.
   Two models of random intersection graphs and their applications.
   Electronic Notes in Discrete Mathematics 10 (2001), 129--132.
)r	   Úempty_graphr   ÚsampleÚadd_edges_fromÚzipÚlenr
   )r   r   Úkr   r   ÚmsetÚvÚtargetss   &&&&    r   Úk_random_intersection_graphr   3   sv   € ô8 	�Š�q•uÓ€AÜ�˜•E‹?€DÜ�1ŽXˆØ—+‘+˜dÓ&ˆØ	×Ñœ˜a˜S¤3 w£<Õ/°Ó9Ö:ñ ô ×Ò˜a¤ q£Ó*Ð*r   c                óp  € \        V4      V8w  d   \        R4      h\        P                  ! W,           4      p\	        W V,           4      p\	        V 4       F?  p\        WR4       F-  w  rxVP                  4       V8  g   K  VP                  Wg4       K/  	  KA  	  \        P                  ! V\	        V 4      4      # )u¨  Returns a random intersection graph with independent probabilities
for connections between node and attribute sets.

Parameters
----------
n : int
    The number of nodes in the first bipartite set (nodes)
m : int
    The number of nodes in the second bipartite set (attributes)
p : list of floats of length m
    Probabilities for connecting nodes to each attribute
seed : integer, random_state, or None (default)
    Indicator of random number generation state.
    See :ref:`Randomness<randomness>`.

See Also
--------
gnp_random_graph, uniform_random_intersection_graph

References
----------
.. [1] Nikoletseas, S. E., Raptopoulos, C., and Spirakis, P. G.
   The existence and efficient construction of large independent sets
   in general random intersection graphs. In ICALP (2004), J. DÂ´Ä±az,
   J. KarhumÂ¨aki, A. LepistÂ¨o, and D. Sannella, Eds., vol. 3142
   of Lecture Notes in Computer Science, Springer, pp. 1029â€“1040.
z(Probability list p must have m elements.)	r   Ú
ValueErrorr	   r   r   r   ÚrandomÚadd_edger
   )	r   r   r   r   r   r   Úur   Úqs	   &&&&     r   Ú!general_random_intersection_graphr%   W   s‰   € ô< ˆ1ƒv�„{ÜÐCÓDÐDÜ
�Š�q•uÓ€AÜ�˜•E‹?€DÜ�1ŽXˆÜ˜–L‰DˆAØ�{‰{‹}˜qÖ Ø—
‘
˜1Ö ó !ñ ô ×Ò˜a¤ q£Ó*Ð*r   )r   r   r%   )N)
Ú__doc__Únetworkxr	   Únetworkx.utilsr   Ú__all__Ú_dispatchabler   r   r%   © r   r   Ú<module>r,      s¥   ðñó Ý *ò€ñ �ÓØ×Ò˜¨TÔ2ó+ó 3ó ð+ñD �ÓØ×Ò˜¨TÔ2ó+ó 3ó ð+ñD �ÓØ×Ò˜¨TÔ2ó$+ó 3ó ò$+r   