+
    ˜°³jý  ã                   ó&   € ^ RI Ht  ! R R4      tR# )é    )Údequec                   óÈ   a € ] tR t^t o RtR tR tR tR tR t	]
R 4       t]
R 4       tR	 tR
 tV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltRtV tR# )ÚDiGraphz¨Really simple unweighted directed graph data structure to track dependencies.

The API is pretty much the same as networkx so if you add something just
copy their API.
c                óL   € / V n         / V n        / V n        / V n        ^ V n        R# )r   N)Ú_nodeÚ_succÚ_predÚ_node_orderÚ_insertion_idx©Úselfs   &ÚW/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/package/_digraph.pyÚ__init__ÚDiGraph.__init__   s+   € àˆŒ
ð ˆŒ
àˆŒ
ð ˆÔØˆÖó    c                ó*  € WP                   9  da   W P                   V&   / V P                  V&   / V P                  V&   V P                  V P                  V&   V ;P                  ^,          un        R# V P                   V,          P                  V4       R# )zšAdd a node to the graph.

Args:
    n: the node. Can be any object that is a valid dict key.
    **kwargs: any attributes you want to attach to the node.
N)r   r   r	   r   r
   Úupdate)r   ÚnÚkwargss   &&,r   Úadd_nodeÚDiGraph.add_node   sp   € ð —J‘JÔØ"�J‰J�q‰MØˆD�J‰J�q‰MØˆD�J‰J�q‰MØ"&×"5Ñ"5ˆD×Ñ˜QÑØ×Ò 1Õ$×à�J‰J�q�M× Ñ  Ö(r   c                ó¢   € V P                  V4       V P                  V4       RV P                  V,          V&   RV P                  V,          V&   R# )zrAdd an edge to graph between nodes ``u`` and ``v``

``u`` and ``v`` will be created if they do not already exist.
TN)r   r   r	   )r   ÚuÚvs   &&&r   Úadd_edgeÚDiGraph.add_edge*   sB   € ð 	�‰�aÔØ�‰�aÔð  ˆ�
‰
�1��aÑØˆ�
‰
�1��aÓr   c                ó‚   €  \        V P                  V,          4      #   \         d   p\        RT R24      ThRp?ii ; i)z.Returns an iterator over successor nodes of n.ú	The node ú is not in the digraph.N)Úiterr   ÚKeyErrorÚ
ValueError©r   r   Úes   && r   Ú
successorsÚDiGraph.successors7   óD   € ð	LÜ˜Ÿ
™
 1�Ó&Ð&øÜô 	LÜ˜y¨¨Ð+BÐCÓDÈ!ÐKûð	Lúó   ‚ ž>©9¹>c                ó‚   €  \        V P                  V,          4      #   \         d   p\        RT R24      ThRp?ii ; i)z0Returns an iterator over predecessor nodes of n.r   r   N)r    r	   r!   r"   r#   s   && r   ÚpredecessorsÚDiGraph.predecessors>   r'   r(   c              #  óp   "  € V P                   P                  4        F  w  rV F  pW3x € K
  	  K  	  R# 5i)z6Returns an iterator over all edges (u, v) in the graphN)r   Úitems)r   r   r%   Úsuccs   &   r   ÚedgesÚDiGraph.edgesE   s1   é € ð "ŸZ™Z×-Ñ-Ö/‰MˆAÛ"�Ø�g”ó #ó 0ùs   ‚46c                ó   € V P                   # )z6Returns a dictionary of all nodes to their attributes.)r   r   s   &r   ÚnodesÚDiGraph.nodesL   s   € ð �z‰zÐr   c                ó,   € \        V P                  4      # )zIterate over the nodes.)r    r   r   s   &r   Ú__iter__ÚDiGraph.__iter__Q   s   € ä�D—J‘JÓÐr   c                óD   €  WP                   9   #   \         d     R# i ; i)z>Returns True if ``n`` is a node in the graph, False otherwise.F)r   Ú	TypeError)r   r   s   &&r   Ú__contains__ÚDiGraph.__contains__U   s%   € ð	ØŸ
™
‘?Ð"øÜô 	Úð	ús   ‚ �žc                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# ©é   ÚsrcÚreturn©ÚstrÚset)ÚformatÚ__classdict__s   "€r   Ú__annotate__ÚDiGraph.__annotate__\   s   ø€ ÷ ñ ©cð ±c¹#µhñ r   c                óú   € \        V4      p\        V4      p\        V4      ^ 8”  dU   VP                  4       pV P	                  V4       F-  pWR9  g   K  VP                  V4       VP                  V4       K/  	  Kd  V# )z2Returns a set of nodes that are reachable from src)rB   r   ÚlenÚpopleftr%   ÚaddÚappend©r   r>   ÚresultÚworking_setÚcurr   s   &&    r   Úforward_transitive_closureÚ"DiGraph.forward_transitive_closure\   si   € ô �S“ˆÜ˜C“jˆÜ�+Ó Ô"Ø×%Ñ%Ó'ˆCØ—_‘_ SÖ)�Ø–?Ø—J‘J˜q”MØ×&Ñ& qÖ)ó *ð ˆr   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# r<   r@   )rC   rD   s   "€r   rE   rF   i   s   ø€ ÷ ñ ©sð ±s¹3µxñ r   c                óú   € \        V4      p\        V4      p\        V4      ^ 8”  dU   VP                  4       pV P	                  V4       F-  pWR9  g   K  VP                  V4       VP                  V4       K/  	  Kd  V# )zGReturns a set of nodes that are reachable from src in reverse direction)rB   r   rH   rI   r*   rJ   rK   rL   s   &&    r   Úbackward_transitive_closureÚ#DiGraph.backward_transitive_closurei   sk   € ô �S“ˆÜ˜C“jˆÜ�+Ó Ô"Ø×%Ñ%Ó'ˆCØ×&Ñ& sÖ+�Ø–?Ø—J‘J˜q”MØ×&Ñ& qÖ)ó ,ð ˆr   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# )r=   r>   Údst©rA   )rC   rD   s   "€r   rE   rF   v   s   ø€ ÷ %ñ %™Sð %¡sñ %r   c                óF  € \        4       pV P                  V4      pW$9  d   V# \        V4      p\        V4      ^ 8”  dU   VP	                  4       pV P                  V4       F-  pWt9   g   K  VP                  Wv4       VP                  V4       K/  	  Kd  VP                  4       # )zAReturns a subgraph rooted at src that shows all the paths to dst.)	r   rP   r   rH   rI   r*   r   rK   Úto_dot)r   r>   rW   Úresult_graphÚforward_reachable_from_srcrN   rO   r   s   &&&     r   Ú	all_pathsÚDiGraph.all_pathsv   s–   € ô “yˆà%)×%DÑ%DÀSÓ%IÐ"àÔ0ØÐô
 ˜C“jˆÜ�+Ó Ô"Ø×%Ñ%Ó'ˆCØ×&Ñ& sÖ+�ØÖ2Ø ×)Ñ)¨!Ô1à×&Ñ& qÖ)ó	 ,ð ×"Ñ"Ó$Ð$r   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# )r=   rW   r?   )rA   Úlist)rC   rD   s   "€r   rE   rF   Ž   s   ø€ ÷ $ñ $™cð $¡d©3¥iñ $r   c                ó$  € . pV'       dt   VP                  V4       V P                  V,          P                  4       pRRrAV F6  pV P                  P	                  VR4      pVf    Ke  Ve	   Wd8  g   K2  TpTpK8  	  K{  \        \        V4      4      # )z_Returns a list of nodes that show the first path that resulted in dst being added to the graph.Ú N)rK   r	   Úkeysr
   Úgetr`   Úreversed)r   rW   ÚpathÚ
candidatesÚmin_idxÚ	candidateÚidxs   &&     r   Ú
first_pathÚDiGraph.first_pathŽ   s�   € àˆçØ�K‰K˜ÔØŸ™ C�×-Ñ-Ó/ˆJØ˜t�Û'�	Ø×&Ñ&×*Ñ*¨9°dÓ;�Ø’;ÚØ’? c¦mØ!�GØ#’Có (ô ”H˜T“NÓ#Ð#r   c                ó    <€ V ^8„  d   QhRS[ /# )r=   r?   rX   )rC   rD   s   "€r   rE   rF       s   ø€ ÷ ñ ™ñ r   c                óR   € RP                  R V P                   4       4      pRV R2# )z^Returns the dot representation of the graph.

Returns:
    A dot representation of the graph.
Ú
c              3   ó8   "  € T F  w  rR V RV R2x € K  	  R# 5i)Ú"z" -> "z";N© )Ú.0ÚfÚts   &  r   Ú	<genexpr>Ú!DiGraph.to_dot.<locals>.<genexpr>¦   s!   é € ÐD¹±°˜A˜a˜S  q c¨Õ,»ùs   ‚z,digraph G {
rankdir = LR;
node [shape=box];
z
}
)Újoinr/   )r   r/   s   & r   rZ   ÚDiGraph.to_dot    s7   € ð —	‘	ÑD¸¿ºÓDÓDˆðð €ð ð	ð 	r   )r   r   r
   r	   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r   r%   r*   Úpropertyr/   r2   r5   r9   rP   rT   r]   rk   rZ   Ú__static_attributes__Ú__classdictcell__)rD   s   @r   r   r      s‰   ø‡ € ñò ò)ò  òLòLð ñó ðð ñó ðò ò÷ð ÷ð ÷%ð %÷0$ð $÷$ö r   r   N)Úcollectionsr   r   rr   r   r   Ú<module>rƒ      s   ðå ÷hó hr   