hyb
2026-01-30 7657e1b2fa251a2ea372710ad75cb395a3c0e374
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Ë
?ñúh–ãóB—dZddlZddlmZddlmZmZdd„Zdd„Zd„Z    y)    zg
altgraph.GraphUtil - Utility classes and functions
==================================================
éN)Údeque)ÚGraphÚ
GraphErrorcó–—tj«}|s |r||z}n||dz
z}||kDr td«‚t|«}|D]}|j|«Œ    t    j
|«}t    j
|«}    ||    k(r|sŒ3|j ||    «|sŒH|j||    «|j«|k\r    |SŒp)zŽ
    Generates and returns a :py:class:`~altgraph.Graph.Graph` instance with
    *node_num* nodes randomly connected by *edge_num* edges.
    éz1inconsistent arguments to 'generate_random_graph')    rrÚrangeÚadd_nodeÚrandomÚchoiceÚ edge_by_nodeÚadd_edgeÚnumber_of_edges)
Únode_numÚedge_numÚ
self_loopsÚ multi_edgesÚgÚ    max_edgesÚnodesÚnodeÚheadÚtails
          úEH:\Change_password\venv_build\Lib\site-packages\altgraph/GraphUtil.pyÚgenerate_random_graphr sڀô
     ‰ ‹ €Aá Ù Ø  8Ñ+‰Ià  H¨q¡LÑ1ˆIà iÒ ÜÐPÓQÐ Qä (‹O€EàòˆØ    
‰
4Õðð ܏}‰}˜UÓ#ˆÜ}‰}˜UÓ#ˆð 4Š<¡
Ø ð >‰>˜$ Ó %Ð 1¹+Ø ð    

‰
4˜ÔØ × Ñ Ó  (Ò *Ø à €Hð# ócóv—tj«}g}t|«D]J}t|dz|«D]6}|j|«|j|«|j||«Œ8ŒLt|||z«D]¸}|j    |«|j |«|krYt j|«}    ||    k(r|sŒ1|j||    «r|sŒF|j||    «|j |«|krŒY|j|«D]$}    |j|«|j|    «Œ&Œº|S)a˜
    Generates and returns a :py:class:`~altgraph.Graph.Graph` instance that
    will have *steps* \* *growth_num* nodes and a scale free (powerlaw)
    connectivity. Starting with a fully connected graph with *growth_num*
    nodes at every step *growth_num* nodes are added to the graph and are
    connected to existing nodes with a probability proportional to the degree
    of these existing nodes.
    r)
rrÚappendr r    Ú
out_degreer
r r Úout_nbrs)
ÚstepsÚ
growth_numrrÚgraphÚstoreÚiÚjrÚnbrs
          rÚgenerate_scale_free_graphr'5s3€ô K‰K‹M€Eð €EÜ :Ó ò!ˆÜq˜1‘u˜jÓ)ò    !ˆAØ L‰L˜ŒOØ L‰L˜ŒOØ N‰N˜1˜aÕ  ñ    !ð!ôj %¨*Ñ"4Ó5òˆØ ‰tÔØ×јtÓ$ zÒ1Ü—-‘- Ó&ˆCðsŠ{¡:Øð×!Ñ! $¨Ô,±[Øà N‰N˜4 Ô %ð×јtÓ$ zÓ1ð—>‘> $Ó'ò    ˆCØ L‰L˜Ô Ø L‰L˜Õ ñ    ðð& €Lrcó—|ht«t«}}}t||fg«}|j}|j}|j}    |r™|j «\}
} || «} | $|D]} | | «rŒ |j | «n| }
|| «D]J}|    |«}|
| ur|j |
|f«||vsŒ'|j |«|j|
|f«ŒL|rŒ™|Dcgc]\}}||vsŒ ||f‘Œ}}}|||fScc}}w)aÄ
    Perform a walk in a depth-first order starting
    at *head*.
 
    Returns (visited, removes, orphans).
 
    * visited: the set of visited nodes
    * removes: the list of nodes where the node
      data does not all *filters*
    * orphans: tuples of (last_good, node),
      where node is not in removes, is directly
      reachable from a node in *removes* and
      *last_good* is the closest upstream node that is not
      in *removes*.
    )ÚsetrÚ    node_dataÚ    out_edgesrÚpopÚaddr)r"rÚfiltersÚvisitedÚremovesÚorphansÚstackÚget_dataÚ    get_edgesÚget_tailÚ    last_goodrÚdataÚfiltfuncÚedgerÚlgÚtls                  rÚ filter_stackr<`s%€ð""& ¬«¬s«ugˆW€GÜ D˜$<.Ó !€E؏‰€HØ—‘€I؏z‰z€Há
ØŸ)™)›+‰ˆ    4Ù˜‹~ˆØ Ð Ø#ò !Ù •~Ø—K‘K Ô%Ùð !ð
!    Ù˜d“Oò    0ˆDÙ˜D“>ˆDØ Ñ$Ø— ‘ ˜Y¨Ð-Ô.ؘ7Ò"Ø— ‘ ˜DÔ!Ø— ‘ ˜i¨Ð.Õ/ð     0ò ð$)0×E™H˜R °2¸WÒ3DBŠxÐE€GÑEà G˜WÐ $Ð$ùóFs Ã* DÃ7D)FF)
Ú__doc__r
Ú collectionsrÚaltgraphrrrr'r<©rrú<module>rAs&ðñó
Ýç&ó& óR(óV+%r