+
    �°³jÛ  ã                   óŠ   € R t ^ RIHt ^ RItRR.t]P                  ! RR/RR7      R
R l4       t]P                  RR	 l4       tR# )aY  Routines to find the boundary of a set of nodes.

An edge boundary is a set of edges, each of which has exactly one
endpoint in a given set of nodes (or, in the case of directed graphs,
the set of edges whose source node is in the set).

A node boundary of a set *S* of nodes is the set of (out-)neighbors of
nodes in *S* that are outside *S*.

)ÚchainNÚedge_boundaryÚnode_boundaryÚdataÚdefault)Ú
edge_attrsÚpreserve_edge_attrsc                ó  aa	€ V Uu0 uF  qfV 9   g   K  VkK  	  upoV P                  4       '       d   V P                  SW4VR7      pMV P                  SW5R7      pVf   V3R lV 4       # \        V4      o	VV	3R lV 4       # u upi )aÒ  Returns the edge boundary of `nbunch1`.

The *edge boundary* of a set *S* with respect to a set *T* is the
set of edges (*u*, *v*) such that *u* is in *S* and *v* is in *T*.
If *T* is not specified, it is assumed to be the set of all nodes
not in *S*.

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

nbunch1 : iterable
    Iterable of nodes in the graph representing the set of nodes
    whose edge boundary will be returned. (This is the set *S* from
    the definition above.)

nbunch2 : iterable
    Iterable of nodes representing the target (or "exterior") set of
    nodes. (This is the set *T* from the definition above.) If not
    specified, this is assumed to be the set of all nodes in `G`
    not in `nbunch1`.

keys : bool
    This parameter has the same meaning as in
    :meth:`MultiGraph.edges`.

data : bool or object
    This parameter has the same meaning as in
    :meth:`MultiGraph.edges`.

default : object
    This parameter has the same meaning as in
    :meth:`MultiGraph.edges`.

Returns
-------
iterator
    An iterator over the edges in the boundary of `nbunch1` with
    respect to `nbunch2`. If `keys`, `data`, or `default`
    are specified and `G` is a multigraph, then edges are returned
    with keys and/or data, as in :meth:`MultiGraph.edges`.

Examples
--------
>>> G = nx.wheel_graph(6)

When nbunch2=None:

>>> list(nx.edge_boundary(G, (1, 3)))
[(1, 0), (1, 2), (1, 5), (3, 0), (3, 2), (3, 4)]

When nbunch2 is given:

>>> list(nx.edge_boundary(G, (1, 3), (2, 0)))
[(1, 0), (1, 2), (3, 0), (3, 2)]

Notes
-----
Any element of `nbunch` that is not in the graph `G` will be
ignored.

`nbunch1` and `nbunch2` are usually meant to be disjoint, but in
the interest of speed and generality, that is not required here.

)r   Úkeysr   )r   r   c              3   óp   <"  € T F+  q^ ,          S9   V^,          S9   ,          '       g   K'  Vx € K-  	  R# 5i©é    N© )Ú.0ÚeÚnset1s   & €Ú]/home/luca/screen-checking/.venv/lib/python3.14/site-packages/networkx/algorithms/boundary.pyÚ	<genexpr>Ú edge_boundary.<locals>.<genexpr>e   s+   øé € ÐF™5�a q¥T¨U¡]°q¸µt¸u±}×$EÑ$E—’›5ùs   ƒ$6¬
6c              3   ó    <"  € T FC  pV^ ,          S9   d   V^,          S9   g!   V^,          S9   g   K/  V^ ,          S9   g   K?  Vx € KE  	  R# 5ir   r   )r   r   r   Únset2s   & €€r   r   r   g   sI   øé € ð áˆAØˆa�D�EŒM˜a �d eœm°°1µ¸±ô 	
àCDÀQÅ4È5Á=÷ 	
ŠÛùs   ƒ,A´AÁ
A)Úis_multigraphÚedgesÚset)
ÚGÚnbunch1Únbunch2r   r
   r   Únr   r   r   s
   &&&&&&  @@r   r   r      s‡   ù€ ñF  Ó*™�1¨¡6�QˆQ™Ñ*€Eð 	‡�×ÒØ—‘˜ D¸W�ÓE‰à—‘˜ D�Ó:ˆð
 ‚ÜF™5ÓFÐFÜ�‹L€Eõáóð ùò# +s
   ‡B”Bc                óÐ   a € V Uu0 uF  q3S 9   g   K  VkK  	  pp\        \        P                  ! V 3R lV 4       4      4      V,
          pVe   V\        V4      ,          pV# u upi )aÓ  Returns the node boundary of `nbunch1`.

The *node boundary* of a set *S* with respect to a set *T* is the
set of nodes *v* in *T* such that for some *u* in *S*, there is an
edge joining *u* to *v*. If *T* is not specified, it is assumed to
be the set of all nodes not in *S*.

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

nbunch1 : iterable
    Iterable of nodes in the graph representing the set of nodes
    whose node boundary will be returned. (This is the set *S* from
    the definition above.)

nbunch2 : iterable
    Iterable of nodes representing the target (or "exterior") set of
    nodes. (This is the set *T* from the definition above.) If not
    specified, this is assumed to be the set of all nodes in `G`
    not in `nbunch1`.

Returns
-------
set
    The node boundary of `nbunch1` with respect to `nbunch2`.

Examples
--------
>>> G = nx.wheel_graph(6)

When nbunch2=None:

>>> list(nx.node_boundary(G, (3, 4)))
[0, 2, 5]

When nbunch2 is given:

>>> list(nx.node_boundary(G, (3, 4), (0, 1, 5)))
[0, 5]

Notes
-----
Any element of `nbunch` that is not in the graph `G` will be
ignored.

`nbunch1` and `nbunch2` are usually meant to be disjoint, but in
the interest of speed and generality, that is not required here.

c              3   ó6   <"  € T F  pSV,          x € K  	  R # 5i©Nr   )r   Úvr   s   & €r   r   Ú node_boundary.<locals>.<genexpr>£   s   øé € Ð!6±¨1 ! A§$¢$³ùs   ƒ)r   r   Úfrom_iterable)r   r   r   r   r   Úbdys   f&&   r   r   r   n   s`   ø€ ñh  Ó*™�1¨¡6�QˆQ™€EÐ*Ü
Œe×!Ò!Ô!6±Ó!6Ó6Ó
7¸%Õ
?€Cð ÒØŒs�7‹|ÕˆØ€Jùò +s
   †A#“A#)NFFNr    )	Ú__doc__Ú	itertoolsr   ÚnetworkxÚnxÚ__all__Ú_dispatchabler   r   r   ó    r   Ú<module>r,      s`   ðñ	õ ã à˜OÐ
,€ð ×Ò˜f iÐ0ÀfÔMóWó NðWðt ×Ñó9ó ò9r+   