+
    )i(	                     |    R t ^ RIt^ RIHtHt R.t]! R4      ]! ^4      ]P                  RR l4       4       4       tR# )z=
Algorithm to find a maximal (not maximum) independent set.

N)not_implemented_forpy_random_statemaximal_independent_setdirectedc           	        V'       g   VP                  \        V 4      4      0pM\        V4      pVP                  V 4      '       g   \        P
                  ! V R24      h\        P                  ! V Uu. uF  p\        V P                  V,          4      NK!  	  up!  p\        P                  WA4      '       d   \        P
                  ! V R24      h\        V4      p\        V P                  4       4      P                  VP                  V4      4      pV'       da   VP                  \        V4      4      pVP                  V4       VP                  \        V P                  V,          4      V.,           4       Kh  V# u upi )a  Returns a random maximal independent set guaranteed to contain
a given set of nodes.

An independent set is a set of nodes such that the subgraph
of G induced by these nodes contains no edges. A maximal
independent set is an independent set such that it is not possible
to add a new node and still get an independent set.

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

nodes : list or iterable
   Nodes that must be part of the independent set. This set of nodes
   must be independent.

seed : integer, random_state, or None (default)
    Indicator of random number generation state.
    See :ref:`Randomness<randomness>`.

Returns
-------
indep_nodes : list
   List of nodes that are part of a maximal independent set.

Raises
------
NetworkXUnfeasible
   If the nodes in the provided list are not part of the graph or
   do not form an independent set, an exception is raised.

NetworkXNotImplemented
    If `G` is directed.

Examples
--------
>>> G = nx.path_graph(5)
>>> nx.maximal_independent_set(G)  # doctest: +SKIP
[4, 0, 2]
>>> nx.maximal_independent_set(G, [1])  # doctest: +SKIP
[1, 3]

Notes
-----
This algorithm does not solve the maximum independent set problem.

z" is not a subset of the nodes of Gz is not an independent set of G)choicelistsetissubsetnxNetworkXUnfeasibleunionadjintersectionnodes
differenceappenddifference_update)Gr   seedv	neighborsindep_nodesavailable_nodesnodes   &&&     U/var/www/html/photoedit/myenv/lib/python3.14/site-packages/networkx/algorithms/mis.pyr   r      s   f T!W%&E
>>!##ug-O$PQQ		595aCaM59:I
	))##ug-L$MNNu+K!'')n//	0FGO
{{4014 ))$quuT{*;tf*DE :s   4%E>)NN)	__doc__networkxr   networkx.utilsr   r   __all___dispatchabler        r   <module>r#      sN   
  ?$
% Z ?   !?r"   