§
    bŠtjs  ã                   ó¶   — d Z ddlZddlmZ ddlmZ ddlm	Z	 dgZ
 e	d¦  «         e	d¦  «         ej        d	¬
¦  «        dd„¦   «         ¦   «         ¦   «         ZdS )z"Functions related to graph covers.é    N)Úhopcroft_karp_matching)Úmin_edge_cover)Únot_implemented_forr   ÚdirectedÚ
multigraphÚbipartite_min_edge_cover)Únamec                 ó‚   — |                       ¦   «         dk    rt          ¦   «         S |€t          }t          | |¬¦  «        S )a±  Returns a set of edges which constitutes
    the minimum edge cover of the graph.

    The smallest edge cover can be found in polynomial time by finding
    a maximum matching and extending it greedily so that all nodes
    are covered.

    Parameters
    ----------
    G : NetworkX graph
        An undirected bipartite graph.

    matching_algorithm : function
        A function that returns a maximum cardinality matching in a
        given bipartite graph. The function must take one input, the
        graph ``G``, and return a dictionary mapping each node to its
        mate. If not specified,
        :func:`~networkx.algorithms.bipartite.matching.hopcroft_karp_matching`
        will be used. Other possibilities include
        :func:`~networkx.algorithms.bipartite.matching.eppstein_matching`,

    Returns
    -------
    set
        A set of the edges in a minimum edge cover of the graph, given as
        pairs of nodes. It contains both the edges `(u, v)` and `(v, u)`
        for given nodes `u` and `v` among the edges of minimum edge cover.

    Notes
    -----
    An edge cover of a graph is a set of edges such that every node of
    the graph is incident to at least one edge of the set.
    A minimum edge cover is an edge covering of smallest cardinality.

    Due to its implementation, the worst-case running time of this algorithm
    is bounded by the worst-case running time of the function
    ``matching_algorithm``.
    r   N)Úmatching_algorithm)ÚorderÚsetr   Ú_min_edge_cover)ÚGr   s     úd/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/networkx/algorithms/bipartite/covering.pyr   r      s?   € ðT 	‡w‚w�y„y�A‚~€~Ý‰uŒuˆØÐ!Ý3ÐÝ˜1Ð1CÐDÑDÔDÐDó    )N)Ú__doc__ÚnetworkxÚnxÚ&networkx.algorithms.bipartite.matchingr   Únetworkx.algorithms.coveringr   r   Únetworkx.utilsr   Ú__all__Ú_dispatchable© r   r   ú<module>r      sÃ   ðØ (Ð (à Ð Ð Ð Ø IÐ IÐ IÐ IÐ IÐ IØ JÐ JÐ JÐ JÐ JÐ JØ .Ð .Ð .Ð .Ð .Ð .àÐ
€ð Ð�ZÑ Ô ØÐ�\Ñ"Ô"Ø€ÔÐ1Ð2Ñ2Ô2ð+Eð +Eð +Eñ 3Ô2ñ #Ô"ñ !Ô ð+Eð +Eð +Er   