Ë
    D^(hœ  ã                   óV   — d Z ddlmZ ddlZdgZ ej                  dd¬«      d„ «       Zy)z 
Generators for interval graph.
é    )ÚSequenceNÚinterval_graphT)ÚgraphsÚreturns_graphc                 óº  — t        | «      } | D ]D  }t        |t        «      rt        |«      dk(  st	        d«      ‚|d   |d   kD  sŒ8t        d|› �«      ‚ t        j                  «       }| D �cg c]  }t        |«      ‘Œ }}|j                  |«       |rB|j                  «       x\  }}}|D ]%  }|\  }}	||k\  sŒ|	|k\  sŒ|j                  ||«       Œ' |rŒB|S c c}w )ao  Generates an interval graph for a list of intervals given.

    In graph theory, an interval graph is an undirected graph formed from a set
    of closed intervals on the real line, with a vertex for each interval
    and an edge between vertices whose intervals intersect.
    It is the intersection graph of the intervals.

    More information can be found at:
    https://en.wikipedia.org/wiki/Interval_graph

    Parameters
    ----------
    intervals : a sequence of intervals, say (l, r) where l is the left end,
    and r is the right end of the closed interval.

    Returns
    -------
    G : networkx graph

    Examples
    --------
    >>> intervals = [(-2, 3), [1, 4], (2, 3), (4, 6)]
    >>> G = nx.interval_graph(intervals)
    >>> sorted(G.edges)
    [((-2, 3), (1, 4)), ((-2, 3), (2, 3)), ((1, 4), (2, 3)), ((1, 4), (4, 6))]

    Raises
    ------
    :exc:`TypeError`
        if `intervals` contains None or an element which is not
        collections.abc.Sequence or not a length of 2.
    :exc:`ValueError`
        if `intervals` contains an interval such that min1 > max1
        where min1,max1 = interval
    é   zZEach interval must have length 2, and be a collections.abc.Sequence such as tuple or list.r   é   z*Interval must have lower value first. Got )ÚlistÚ
isinstancer   ÚlenÚ	TypeErrorÚ
ValueErrorÚnxÚGraphÚtupleÚadd_nodes_fromÚpopÚadd_edge)
Ú	intervalsÚintervalÚgraphÚtupled_intervalsÚmin1Úmax1Ú	interval1Ú	interval2Úmin2Úmax2s
             ú`/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/networkx/generators/interval_graph.pyr   r      sÿ   € ôJ �Y“€IØò VˆÜ˜8¤XÔ.´3°x³=ÀAÒ3EÜðBóð ð �A‰;˜ !™Ó$ÜÐIÈ(ÈÐTÓUÐUðVô �H‰H‹J€Eà8AÖB¨Hœ˜h�ÐBÐÐBØ	×ÑÐ)Ô*á
Ø!1×!5Ñ!5Ó!7Ð7‰
ˆˆd�YØ)ò 	5ˆIØ"‰JˆD�$Ø�t‹| ¨£Ø—‘˜y¨)Õ4ð	5ò ð €Lùò Cs   Á-C)Ú__doc__Úcollections.abcr   Únetworkxr   Ú__all__Ú_dispatchabler   © ó    r   ú<module>r'      s=   ðñõ %ã àÐ
€ð €×Ñ˜¨TÔ2ñ9ó 3ñ9r&   