+
    �°³jÊ%  ã                   óä   € R t ^ RIt^ RIt^ RIHt . ROtR t]! ^RR7      RR l4       t]! ^ RR7      ]P                  ! RRR	7      RR
 l4       4       t
]P                  ! RRR	7      R 4       tR tR# )a
  
*****
Pajek
*****
Read graphs in Pajek format.

This implementation handles directed and undirected graphs including
those with self loops and parallel edges.

Format
------
See http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm
for format information.

N)Ú	open_filec              #  óB  "  € V P                   R8X  d   RpMV P                   pRV P                  4        2x € \        V 4      p\        \	        V\        ^\        V4      ^,           4      4      4      pV EFL  pV P                  P                  V/ 4      P                  4       pVP                  RR4      pVP                  RR4      p \        VP                  RW4,          4      4      pYƒT&   TP                  R	R
4      p
RP                  \        \         Y„YgT
34      4      pTP#                  4        Fˆ  w  rÍ\%        T\&        4      '       d9   TP)                  4       R8w  d$   TR\!        T4       R\!        T4       2,          pKS  \*        P,                  ! RT R\%        T\&        4      '       d   RMR R24       KŠ  	  Tx € EKO  	  V P/                  4       '       d   Rx € MRx € V P1                  RR7       Fö  w  rípVP                  4       pVP                  RR4      pRP                  \        \         W>,          W=,          V34      4      pVP#                  4        Fˆ  w  rÍ\%        V\&        4      '       d9   VP)                  4       R8w  d$   VR\!        V4       R\!        V4       2,          pKS  \*        P,                  ! RT R\%        V\&        4      '       d   RMR R24       KŠ  	  Vx € Kø  	  R#   \         d    p	T	;P                  R,          un        h Rp	?	ii ; i5i)zÌGenerate lines in Pajek graph format.

Parameters
----------
G : graph
   A Networkx graph

References
----------
See http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm
for format information.
Ú ÚNetworkXz
*vertices Úxg        ÚyÚidNÚshapeÚellipseÚ zNode attribute z is not processed. zEmpty attributezNon-string attributeÚ.ú*arcsú*edgesT)ÚdataÚweightg      ð?zEdge attribute )zSPajek format requires 'id' to be an int(). Refer to the 'Relabeling nodes' section.)ÚnameÚorderÚlistÚdictÚzipÚrangeÚlenÚnodesÚgetÚcopyÚpopÚintÚ
ValueErrorÚargsÚjoinÚmapÚ	make_qstrÚitemsÚ
isinstanceÚstrÚstripÚwarningsÚwarnÚis_directedÚedges)ÚGr   r   Ú
nodenumberÚnÚnar   r   r   Úerrr	   ÚsÚkÚvÚuÚedgedataÚdÚvalues   &                 ÚY/home/luca/screen-checking/.venv/lib/python3.14/site-packages/networkx/readwrite/pajek.pyÚgenerate_pajekr7      s²  é € ð 	‡v�v�„|Ø‰à�v‰vˆð �q—w‘w“y�kÐ
"Ò"Ü�‹G€Eä”c˜%¤ q¬#¨e«*°q­.Ó!9Ó:Ó;€JÜˆð �W‰W�[‰[˜˜BÓ×$Ñ$Ó&ˆØ�F‰F�3˜ÓˆØ�F‰F�3˜Óˆð		Ü�R—V‘V˜D *¥-Ó0Ó1ˆBð �1‰Ø—‘�w 	Ó*ˆØ�H‰H”Sœ R¨A°%Ð$8Ó9Ó:ˆà—H‘H–J‰DˆAÜ˜!œS×!Ò! a§g¡g£i°2¤oØ�qœ 1›˜ a¬	°!« ~Ð6Õ6’ä—’Ø% a SÐ(;ÔR\Ð]^Ô`c×RdÒRdÑ=Nð  kAð  <Cð  CDð  Eöñ	 ð �ñ7 ð< 	‡}�}‡‚Ø‹àŠØŸ'™' t˜'Ö,‰ˆˆhØ�M‰M‹OˆØ—‘�h Ó$ˆØ�H‰H”Sœ Z¥]°JµMÀ5Ð$IÓJÓKˆØ—G‘G–I‰DˆAÜ˜!œS×!Ò! a§g¡g£i°2¤oØ�qœ 1›˜ a¬	°!« ~Ð6Õ6’ä—’Ø% a SÐ(;ÔR\Ð]^Ô`c×RdÒRdÑ=Nð  kAð  <Cð  CDð  Eöñ	 ð Œó -øô5 ô 	Ø�HŠHð õ �Hð ûð	üs2   ‚CLÃ!K2Ã(C2LÇDLË2LË=LÌLÌLÚwb)Úmodec                ó|   € \        V 4       F,  pVR,          pVP                  VP                  V4      4       K.  	  R# )a»  Write graph in Pajek format to path.

Parameters
----------
G : graph
   A Networkx graph
path : file or string
   File or filename to write.
   Filenames ending in .gz or .bz2 will be compressed.

Examples
--------
>>> from pathlib import Path
>>> import tempfile
>>> tmp_path = Path(tempfile.gettempdir())

>>> fpath = tmp_path / "test.net"
>>> G = nx.path_graph(4)
>>> nx.write_pajek(G, fpath)

>>> with open(fpath) as fh:  # The data as stored in pajek format
...     print(fh.read())
*vertices 4
1 0 0.0 0.0 ellipse
2 1 0.0 0.0 ellipse
3 2 0.0 0.0 ellipse
4 3 0.0 0.0 ellipse
*edges
1 2 1.0
2 3 1.0
3 4 1.0
<BLANKLINE>

Warnings
--------
Optional node attributes and edge attributes must be non-empty strings.
Otherwise it will not be written into the file. You will need to
convert those attributes to strings if you want to keep them.

References
----------
See http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm
for format information.
Ú
N)r7   ÚwriteÚencode)r*   ÚpathÚencodingÚlines   &&& r6   Úwrite_pajekrA   c   s2   € ô\ ˜qÖ!ˆØ��ˆØ�
‰
�4—;‘;˜xÓ(Ö)ó "ó    ÚrbT)ÚgraphsÚreturns_graphc                ó2   a€ V3R lV  4       p\        V4      # )a   Read graph in Pajek format from path.

Parameters
----------
path : file or string
   Filename or file handle to read.
   Filenames ending in .gz or .bz2 will be decompressed.

Returns
-------
G : NetworkX MultiGraph or MultiDiGraph.

Examples
--------
>>> from pathlib import Path
>>> import tempfile
>>> tmp_path = Path(tempfile.gettempdir())

>>> fpath = tmp_path / "test.net"
>>> nx.write_pajek(nx.path_graph(4), fpath)
>>> G = nx.read_pajek(fpath)
>>> G.edges
MultiEdgeView([('0', '1', 0), ('1', '2', 0), ('2', '3', 0)])

To create a Graph instead of a MultiGraph use

>>> G1 = nx.Graph(G)
>>> G1.edges
EdgeView([('0', '1'), ('1', '2'), ('2', '3')])

References
----------
See http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm
for format information.
c              3   óD   <"  € T F  qP                  S4      x € K  	  R # 5i)N)Údecode)Ú.0r@   r?   s   & €r6   Ú	<genexpr>Úread_pajek.<locals>.<genexpr>¼   s   øé € Ð4©t t�[‰[˜×"Ð"«tùs   ƒ )Úparse_pajek)r>   r?   Úliness   &f r6   Ú
read_pajekrN   –   s   ø€ ôL 5©tÓ4€EÜ�uÓÐrB   c           	     ó
  a€ ^ RI p\        V \        4      '       d   \        V P	                  R4      4      p \        V  Uu. uF  q"P                  R4      NK  	  up4      p \        P                  ! 4       p. oV '       Edñ    \        V 4      pTP                  4       P                  R4      '       d&    TP	                  R^4      w  rVYcP                  R&   K_  TP                  4       P                  R4      '       EdP   / pTP	                  4       w  rH\        \        T4      4       EF  p	\        T 4      p TP	                  \        T4      P                  R4      4       U
u. uF  qªP!                  R4      NK  	  pp
TR,          w  rÅSP%                  T4       TP'                  T4       YWT&   YÃP(                  T,          R&    TR	,          w  r­pTP(                  T,          P+                  R
\-        T
4      R\-        T4      RT/4       \/        TR,          TR,          4      pTP(                  T,          P+                  T4       EK"  	  EKÔ  TP                  4       P                  R4      '       g'   TP                  4       P                  R4      '       Edt   TP                  4       P                  R4      '       d   \        P0                  ! T4      pTP                  4       P                  R4      '       d   TP3                  4       pT  Fú  p TP	                  \        T4      P                  R4      4       U
u. uF  qªP!                  R4      NK  	  pp
\5        T4      ^8  d   K\  TR,          w  ppXP7                  TT4      pTP7                  TT4      p/ p TR,          pTP+                  R\-        T^ ,          4      /4       \/        TR,          TR,          4      pTP+                  T4       TP8                  ! TT3/ TB  Kü  	  EK’  TP                  4       P                  R4      '       g   EKº  \        P:                  ! T4      pT3R l\=        T 4       4       pTP?                  T4       EKù  V# u upi     T# ; i  \         d     EK  i ; iu up
i   \"         d    TP	                  \        T4      4      p ELEi ; i    ELÁ; iu up
i   \"         d    TP	                  \        T4      4      p EL¦i ; i    EL>; i)zÀParse Pajek format graph from string or iterable.

Parameters
----------
lines : string or iterable
   Data in Pajek format.

Returns
-------
G : NetworkX graph

See Also
--------
read_pajek

Nr;   z*networkr   z	*verticeszutf-8:é    é   Nr   :rQ   é   Nr   r   r	   :rR   NrQ   :é   NrQ   r   r   z*edge:rQ   é   Nr   :rT   NrQ   :é   NrQ   z*matrixc              3   óÌ   <"  € T FY  w  r\        VP                  4       4       F7  w  r4\        V4      ^ 8w  g   K  SV,          SV,          R\        V4      /3x € K9  	  K[  	  R# 5i)rP   r   N)Ú	enumerateÚsplitr   )rI   Úrowr@   Úcolr   Úlabelss   &    €r6   rJ   Úparse_pajek.<locals>.<genexpr>%  s[   øé € ð á#3‘K�SÜ#,¨T¯Z©Z«\Ö#:‘K�SÜ�t“9 ‘>ô B�˜•˜f S�k¨H´c¸$³iÐ+@ÕAá#:ñ BÛ#3ùs
   ƒ2A$º*A$) Úshlexr#   r$   ÚiterrX   ÚrstripÚnxÚMultiDiGraphÚnextÚlowerÚ
startswithÚgraphr   r   r   r=   rH   ÚAttributeErrorÚappendÚadd_noder   ÚupdateÚfloatr   Ú
MultiGraphÚto_directedr   r   Úadd_edgeÚDiGraphrW   Úadd_edges_from)rM   r]   r@   r*   ÚlÚlabelr   Ú
nodelabelsÚnnodesÚir   Ú	splitliner   r   r	   Ú
extra_attrÚuiÚvir2   r1   Ú	edge_dataÚwÚadj_listr[   s   &                      @r6   rL   rL   À   s  ø€ ó$ ô �%œ×ÒÜ�U—[‘[ Ó&Ó'ˆÜ±Ó6±¨—+‘+˜dÖ#±Ñ6Ó7€EÜ
�ŠÓ€AØ€Fß
ˆ%ð	Ü�U“ˆAð �7‰7‹9×Ñ 
×+Ò+ð'ØŸg™g d¨AÓ.‘�ð
 #'—‘˜“Ø�W‰W‹Y×!Ñ! +×.Ó.ØˆJØŸ™›	‰IˆAÜœ3˜v›;×'�Ü˜“K�ð4à38·;±;¼sÀ1»v¿}¹}ÈWÓ?UÔ3Vó!Ù3V¨aŸ™ Ö)Ñ3Vð ð !ð
 & c�N‘	�Ø—‘˜eÔ$Ø—
‘
˜5Ô!Ø!&˜2‘Ø')—‘˜•˜tÑ$ðØ"+¨C¥.‘K�A˜%Ø—G‘G˜E•N×)Ñ)Øœe A›h¨¬U°1«X°wÀÐFôô
 ! ¨4¥°)¸Dµ/ÓB�
Ø—‘˜•×%Ñ% j×1ô+ (ð, �W‰W‹Y×!Ñ! (×+Ò+¨q¯w©w«y×/CÑ/CÀG×/LÓ/LØ�w‰w‹y×#Ñ# G×,Ò,ä—M’M !Ó$�Ø�w‰w‹y×#Ñ# G×,Ò,à—M‘M“O�Û�ð4à38·;±;¼sÀ1»v¿}¹}ÈWÓ?UÔ3Vó!Ù3V¨aŸ™ Ö)Ñ3Vð ð !ô �y“> AÔ%ÙØ" 3�‘��BØ—N‘N 2 rÓ*�Ø—N‘N 2 rÓ*�à�	ðà! #��AØ×$Ñ$ h´°a¸µd³Ð%<Ô=ô
 ! ¨4¥°)¸Dµ/ÓB�
Ø× Ñ  Ô,ð —
’
˜1˜aÑ- 9Ô-ô7 ð8 �W‰W‹Y×!Ñ! )×,Õ,Ü—
’
˜1“ˆAôä#,¨UÔ#3óˆHð ×Ñ˜X×&à€Hùòm 7øð	Øð^ €HûôW ô ãðüò!øô &ô 4Ø %§¡¬C°«FÓ 3“Ið4ûðÚüò!øô &ô 4Ø %§¡¬C°«FÓ 3“Ið4ûðÚús„   ¿Q1Â Q6 Â1Q> Ä3+RÅRÅ7RÇ ASÌ+SÌ6S
ÍSÎ,S;Ñ6Q;Ñ>RÒRÒRÒ%R?Ò>R?ÓSÓ
SÓ%S8Ó7S8Ó;T c                ó  € \        V \        4      '       g   \        V 4      p \        ;QJ d    R V  4       F  '       g   K   RM	  RM! R V  4       4      '       d)   V P                  RR4      P                  RR4      p RV  R2p V # )zóReturns the string representation of t.

Wrap the string in double-quotes if it contains whitespace, a double
quote, or a backslash, escaping the latter two so the Pajek reader
(which splits with shlex) recovers the original string unchanged.
c              3   óZ   "  € T F!  qP                  4       ;'       g    VR 9   x € K#  	  R# 5i)z"\N)Úisspace)rI   Úcs   & r6   rJ   Úmake_qstr.<locals>.<genexpr>9  s#   é € Ð
0©a¨�9‰9‹;×$Ð$˜!˜u™*Ô$«aùs   ‚+�+TFÚ\z\\Ú"z\")r#   r$   ÚanyÚreplace)Úts   &r6   r!   r!   0  sj   € ô �aœ×ÒÜ�‹Fˆß
ƒsÑ
0©aÓ
0‡s‡s‚sÑ
0©aÓ
0×0Ò0Ø�I‰I�d˜FÓ#×+Ñ+¨C°Ó7ˆØ�ˆs�!ˆHˆØ€HrB   )rN   rL   r7   rA   )zUTF-8)Ú__doc__r&   Únetworkxr`   Únetworkx.utilsr   Ú__all__r7   rA   Ú_dispatchablerN   rL   r!   © rB   r6   Ú<module>rŒ      s—   ðñó  ã Ý $â
H€òGñT ˆ1�4Ôó/*ó ð/*ñd ˆ1�4ÔØ×Ò˜¨TÔ2ó%ó 3ó ð%ðP ×Ò˜¨TÔ2ñló 3ðlô^rB   