1 <?xml version="1.0" encoding="ascii"?> |
|
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
3 "DTD/xhtml1-transitional.dtd"> |
|
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
|
5 <head> |
|
6 <title>graph.digraph</title> |
|
7 <link rel="stylesheet" href="epydoc.css" type="text/css" /> |
|
8 <script type="text/javascript" src="epydoc.js"></script> |
|
9 </head> |
|
10 |
|
11 <body bgcolor="white" text="black" link="blue" vlink="#204080" |
|
12 alink="#204080"> |
|
13 <!-- ==================== NAVIGATION BAR ==================== --> |
|
14 <table class="navbar" border="0" width="100%" cellpadding="0" |
|
15 bgcolor="#a0c0ff" cellspacing="0"> |
|
16 <tr valign="middle"> |
|
17 <!-- Home link --> |
|
18 <th> <a |
|
19 href="graph-module.html">Home</a> </th> |
|
20 |
|
21 <!-- Tree link --> |
|
22 <th> <a |
|
23 href="module-tree.html">Trees</a> </th> |
|
24 |
|
25 <!-- Index link --> |
|
26 <th> <a |
|
27 href="identifier-index.html">Indices</a> </th> |
|
28 |
|
29 <!-- Help link --> |
|
30 <th> <a |
|
31 href="help.html">Help</a> </th> |
|
32 |
|
33 <!-- Project homepage --> |
|
34 <th class="navbar" align="right" width="100%"> |
|
35 <table border="0" cellpadding="0" cellspacing="0"> |
|
36 <tr><th class="navbar" align="center" |
|
37 ><a class="navbar" target="_top" href="http://code.google.com/p/python-graph/">python-graph</a></th> |
|
38 </tr></table></th> |
|
39 </tr> |
|
40 </table> |
|
41 <table width="100%" cellpadding="0" cellspacing="0"> |
|
42 <tr valign="top"> |
|
43 <td width="100%"> |
|
44 <span class="breadcrumbs"> |
|
45 <a href="graph-module.html">Package graph</a> :: |
|
46 Class digraph |
|
47 </span> |
|
48 </td> |
|
49 <td> |
|
50 <table cellpadding="0" cellspacing="0"> |
|
51 <!-- hide/show private --> |
|
52 </table> |
|
53 </td> |
|
54 </tr> |
|
55 </table> |
|
56 <!-- ==================== CLASS DESCRIPTION ==================== --> |
|
57 <h1 class="epydoc">Class digraph</h1><p class="nomargin-top"></p> |
|
58 <pre class="base-tree"> |
|
59 object --+ |
|
60 | |
|
61 <strong class="uidshort">digraph</strong> |
|
62 </pre> |
|
63 |
|
64 <hr /> |
|
65 <p>Digraph class.</p> |
|
66 <p>Digraphs are built of nodes and directed edges.</p> |
|
67 |
|
68 <!-- ==================== INSTANCE METHODS ==================== --> |
|
69 <a name="section-InstanceMethods"></a> |
|
70 <table class="summary" border="1" cellpadding="3" |
|
71 cellspacing="0" width="100%" bgcolor="white"> |
|
72 <tr bgcolor="#70b0f0" class="table-header"> |
|
73 <td align="left" colspan="2" class="table-header"> |
|
74 <span class="table-header">Instance Methods</span></td> |
|
75 </tr> |
|
76 <tr> |
|
77 <td width="15%" align="right" valign="top" class="summary"> |
|
78 <span class="summary-type"> </span> |
|
79 </td><td class="summary"> |
|
80 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
81 <tr> |
|
82 <td><span class="summary-sig"><a href="graph.digraph-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
83 Initialize a digraph.</td> |
|
84 <td align="right" valign="top"> |
|
85 |
|
86 |
|
87 </td> |
|
88 </tr> |
|
89 </table> |
|
90 |
|
91 </td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td width="15%" align="right" valign="top" class="summary"> |
|
95 <span class="summary-type">iterator</span> |
|
96 </td><td class="summary"> |
|
97 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
98 <tr> |
|
99 <td><span class="summary-sig"><a href="graph.digraph-class.html#__getitem__" class="summary-sig-name">__getitem__</a>(<span class="summary-sig-arg">self</span>, |
|
100 <span class="summary-sig-arg">node</span>)</span><br /> |
|
101 Return a iterator passing through all neighbors of the given node.</td> |
|
102 <td align="right" valign="top"> |
|
103 |
|
104 |
|
105 </td> |
|
106 </tr> |
|
107 </table> |
|
108 |
|
109 </td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td width="15%" align="right" valign="top" class="summary"> |
|
113 <span class="summary-type">iterator</span> |
|
114 </td><td class="summary"> |
|
115 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
116 <tr> |
|
117 <td><span class="summary-sig"><a href="graph.digraph-class.html#__iter__" class="summary-sig-name">__iter__</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
118 Return a iterator passing through all nodes in the digraph.</td> |
|
119 <td align="right" valign="top"> |
|
120 |
|
121 |
|
122 </td> |
|
123 </tr> |
|
124 </table> |
|
125 |
|
126 </td> |
|
127 </tr> |
|
128 <tr> |
|
129 <td width="15%" align="right" valign="top" class="summary"> |
|
130 <span class="summary-type">number</span> |
|
131 </td><td class="summary"> |
|
132 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
133 <tr> |
|
134 <td><span class="summary-sig"><a href="graph.digraph-class.html#__len__" class="summary-sig-name">__len__</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
135 Return the order of the digraph when requested by len().</td> |
|
136 <td align="right" valign="top"> |
|
137 |
|
138 |
|
139 </td> |
|
140 </tr> |
|
141 </table> |
|
142 |
|
143 </td> |
|
144 </tr> |
|
145 <tr> |
|
146 <td width="15%" align="right" valign="top" class="summary"> |
|
147 <span class="summary-type">string</span> |
|
148 </td><td class="summary"> |
|
149 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
150 <tr> |
|
151 <td><span class="summary-sig"><a href="graph.digraph-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
152 Return a string representing the digraph when requested by str() (or |
|
153 print).</td> |
|
154 <td align="right" valign="top"> |
|
155 |
|
156 |
|
157 </td> |
|
158 </tr> |
|
159 </table> |
|
160 |
|
161 </td> |
|
162 </tr> |
|
163 <tr> |
|
164 <td width="15%" align="right" valign="top" class="summary"> |
|
165 <span class="summary-type"> </span> |
|
166 </td><td class="summary"> |
|
167 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
168 <tr> |
|
169 <td><span class="summary-sig"><a href="graph.digraph-class.html#add_edge" class="summary-sig-name">add_edge</a>(<span class="summary-sig-arg">self</span>, |
|
170 <span class="summary-sig-arg">u</span>, |
|
171 <span class="summary-sig-arg">v</span>, |
|
172 <span class="summary-sig-arg">wt</span>=<span class="summary-sig-default">1</span>, |
|
173 <span class="summary-sig-arg">label</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>, |
|
174 <span class="summary-sig-arg">attrs</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span><br /> |
|
175 Add an directed edge (u,v) to the graph connecting nodes u to v.</td> |
|
176 <td align="right" valign="top"> |
|
177 |
|
178 |
|
179 </td> |
|
180 </tr> |
|
181 </table> |
|
182 |
|
183 </td> |
|
184 </tr> |
|
185 <tr> |
|
186 <td width="15%" align="right" valign="top" class="summary"> |
|
187 <span class="summary-type"> </span> |
|
188 </td><td class="summary"> |
|
189 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
190 <tr> |
|
191 <td><span class="summary-sig"><a href="graph.digraph-class.html#add_edge_attribute" class="summary-sig-name">add_edge_attribute</a>(<span class="summary-sig-arg">self</span>, |
|
192 <span class="summary-sig-arg">u</span>, |
|
193 <span class="summary-sig-arg">v</span>, |
|
194 <span class="summary-sig-arg">attr</span>)</span><br /> |
|
195 Add attribute to the given edge.</td> |
|
196 <td align="right" valign="top"> |
|
197 |
|
198 |
|
199 </td> |
|
200 </tr> |
|
201 </table> |
|
202 |
|
203 </td> |
|
204 </tr> |
|
205 <tr> |
|
206 <td width="15%" align="right" valign="top" class="summary"> |
|
207 <span class="summary-type"> </span> |
|
208 </td><td class="summary"> |
|
209 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
210 <tr> |
|
211 <td><span class="summary-sig"><a href="graph.digraph-class.html#add_graph" class="summary-sig-name">add_graph</a>(<span class="summary-sig-arg">self</span>, |
|
212 <span class="summary-sig-arg">graph</span>)</span><br /> |
|
213 Add other graph to the graph.</td> |
|
214 <td align="right" valign="top"> |
|
215 |
|
216 |
|
217 </td> |
|
218 </tr> |
|
219 </table> |
|
220 |
|
221 </td> |
|
222 </tr> |
|
223 <tr> |
|
224 <td width="15%" align="right" valign="top" class="summary"> |
|
225 <span class="summary-type"> </span> |
|
226 </td><td class="summary"> |
|
227 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
228 <tr> |
|
229 <td><span class="summary-sig"><a href="graph.digraph-class.html#add_node" class="summary-sig-name">add_node</a>(<span class="summary-sig-arg">self</span>, |
|
230 <span class="summary-sig-arg">node</span>, |
|
231 <span class="summary-sig-arg">attrs</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span><br /> |
|
232 Add given node to the graph.</td> |
|
233 <td align="right" valign="top"> |
|
234 |
|
235 |
|
236 </td> |
|
237 </tr> |
|
238 </table> |
|
239 |
|
240 </td> |
|
241 </tr> |
|
242 <tr> |
|
243 <td width="15%" align="right" valign="top" class="summary"> |
|
244 <span class="summary-type"> </span> |
|
245 </td><td class="summary"> |
|
246 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
247 <tr> |
|
248 <td><span class="summary-sig"><a href="graph.digraph-class.html#add_node_attribute" class="summary-sig-name">add_node_attribute</a>(<span class="summary-sig-arg">self</span>, |
|
249 <span class="summary-sig-arg">node</span>, |
|
250 <span class="summary-sig-arg">attr</span>)</span><br /> |
|
251 Add attribute to the given node.</td> |
|
252 <td align="right" valign="top"> |
|
253 |
|
254 |
|
255 </td> |
|
256 </tr> |
|
257 </table> |
|
258 |
|
259 </td> |
|
260 </tr> |
|
261 <tr> |
|
262 <td width="15%" align="right" valign="top" class="summary"> |
|
263 <span class="summary-type"> </span> |
|
264 </td><td class="summary"> |
|
265 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
266 <tr> |
|
267 <td><span class="summary-sig"><a href="graph.digraph-class.html#add_nodes" class="summary-sig-name">add_nodes</a>(<span class="summary-sig-arg">self</span>, |
|
268 <span class="summary-sig-arg">nodelist</span>)</span><br /> |
|
269 Add given nodes to the graph.</td> |
|
270 <td align="right" valign="top"> |
|
271 |
|
272 |
|
273 </td> |
|
274 </tr> |
|
275 </table> |
|
276 |
|
277 </td> |
|
278 </tr> |
|
279 <tr> |
|
280 <td width="15%" align="right" valign="top" class="summary"> |
|
281 <span class="summary-type"> </span> |
|
282 </td><td class="summary"> |
|
283 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
284 <tr> |
|
285 <td><span class="summary-sig"><a href="graph.digraph-class.html#add_spanning_tree" class="summary-sig-name">add_spanning_tree</a>(<span class="summary-sig-arg">self</span>, |
|
286 <span class="summary-sig-arg">st</span>)</span><br /> |
|
287 Add a spanning tree to the graph.</td> |
|
288 <td align="right" valign="top"> |
|
289 |
|
290 |
|
291 </td> |
|
292 </tr> |
|
293 </table> |
|
294 |
|
295 </td> |
|
296 </tr> |
|
297 <tr> |
|
298 <td width="15%" align="right" valign="top" class="summary"> |
|
299 <span class="summary-type"> </span> |
|
300 </td><td class="summary"> |
|
301 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
302 <tr> |
|
303 <td><span class="summary-sig"><a href="graph.digraph-class.html#complete" class="summary-sig-name">complete</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
304 Make the graph a complete graph.</td> |
|
305 <td align="right" valign="top"> |
|
306 |
|
307 |
|
308 </td> |
|
309 </tr> |
|
310 </table> |
|
311 |
|
312 </td> |
|
313 </tr> |
|
314 <tr> |
|
315 <td width="15%" align="right" valign="top" class="summary"> |
|
316 <span class="summary-type">number</span> |
|
317 </td><td class="summary"> |
|
318 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
319 <tr> |
|
320 <td><span class="summary-sig"><a href="graph.digraph-class.html#degree" class="summary-sig-name">degree</a>(<span class="summary-sig-arg">self</span>, |
|
321 <span class="summary-sig-arg">node</span>)</span><br /> |
|
322 Return the degree of the given node.</td> |
|
323 <td align="right" valign="top"> |
|
324 |
|
325 |
|
326 </td> |
|
327 </tr> |
|
328 </table> |
|
329 |
|
330 </td> |
|
331 </tr> |
|
332 <tr> |
|
333 <td width="15%" align="right" valign="top" class="summary"> |
|
334 <span class="summary-type"> </span> |
|
335 </td><td class="summary"> |
|
336 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
337 <tr> |
|
338 <td><span class="summary-sig"><a href="graph.digraph-class.html#del_edge" class="summary-sig-name">del_edge</a>(<span class="summary-sig-arg">self</span>, |
|
339 <span class="summary-sig-arg">u</span>, |
|
340 <span class="summary-sig-arg">v</span>)</span><br /> |
|
341 Remove an directed edge (u, v) from the graph.</td> |
|
342 <td align="right" valign="top"> |
|
343 |
|
344 |
|
345 </td> |
|
346 </tr> |
|
347 </table> |
|
348 |
|
349 </td> |
|
350 </tr> |
|
351 <tr> |
|
352 <td width="15%" align="right" valign="top" class="summary"> |
|
353 <span class="summary-type"> </span> |
|
354 </td><td class="summary"> |
|
355 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
356 <tr> |
|
357 <td><span class="summary-sig"><a href="graph.digraph-class.html#del_node" class="summary-sig-name">del_node</a>(<span class="summary-sig-arg">self</span>, |
|
358 <span class="summary-sig-arg">node</span>)</span><br /> |
|
359 Remove a node from the graph.</td> |
|
360 <td align="right" valign="top"> |
|
361 |
|
362 |
|
363 </td> |
|
364 </tr> |
|
365 </table> |
|
366 |
|
367 </td> |
|
368 </tr> |
|
369 <tr> |
|
370 <td width="15%" align="right" valign="top" class="summary"> |
|
371 <span class="summary-type">list</span> |
|
372 </td><td class="summary"> |
|
373 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
374 <tr> |
|
375 <td><span class="summary-sig"><a href="graph.digraph-class.html#edges" class="summary-sig-name">edges</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
376 Return all edges in the graph.</td> |
|
377 <td align="right" valign="top"> |
|
378 |
|
379 |
|
380 </td> |
|
381 </tr> |
|
382 </table> |
|
383 |
|
384 </td> |
|
385 </tr> |
|
386 <tr> |
|
387 <td width="15%" align="right" valign="top" class="summary"> |
|
388 <span class="summary-type">list</span> |
|
389 </td><td class="summary"> |
|
390 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
391 <tr> |
|
392 <td><span class="summary-sig"><a href="graph.digraph-class.html#get_edge_attributes" class="summary-sig-name">get_edge_attributes</a>(<span class="summary-sig-arg">self</span>, |
|
393 <span class="summary-sig-arg">u</span>, |
|
394 <span class="summary-sig-arg">v</span>)</span><br /> |
|
395 Return the attributes of the given edge.</td> |
|
396 <td align="right" valign="top"> |
|
397 |
|
398 |
|
399 </td> |
|
400 </tr> |
|
401 </table> |
|
402 |
|
403 </td> |
|
404 </tr> |
|
405 <tr> |
|
406 <td width="15%" align="right" valign="top" class="summary"> |
|
407 <span class="summary-type">string</span> |
|
408 </td><td class="summary"> |
|
409 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
410 <tr> |
|
411 <td><span class="summary-sig"><a href="graph.digraph-class.html#get_edge_label" class="summary-sig-name">get_edge_label</a>(<span class="summary-sig-arg">self</span>, |
|
412 <span class="summary-sig-arg">u</span>, |
|
413 <span class="summary-sig-arg">v</span>)</span><br /> |
|
414 Get the label of an edge.</td> |
|
415 <td align="right" valign="top"> |
|
416 |
|
417 |
|
418 </td> |
|
419 </tr> |
|
420 </table> |
|
421 |
|
422 </td> |
|
423 </tr> |
|
424 <tr> |
|
425 <td width="15%" align="right" valign="top" class="summary"> |
|
426 <span class="summary-type">number</span> |
|
427 </td><td class="summary"> |
|
428 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
429 <tr> |
|
430 <td><span class="summary-sig"><a href="graph.digraph-class.html#get_edge_weight" class="summary-sig-name">get_edge_weight</a>(<span class="summary-sig-arg">self</span>, |
|
431 <span class="summary-sig-arg">u</span>, |
|
432 <span class="summary-sig-arg">v</span>)</span><br /> |
|
433 Get the weight of an edge.</td> |
|
434 <td align="right" valign="top"> |
|
435 |
|
436 |
|
437 </td> |
|
438 </tr> |
|
439 </table> |
|
440 |
|
441 </td> |
|
442 </tr> |
|
443 <tr> |
|
444 <td width="15%" align="right" valign="top" class="summary"> |
|
445 <span class="summary-type">list</span> |
|
446 </td><td class="summary"> |
|
447 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
448 <tr> |
|
449 <td><span class="summary-sig"><a href="graph.digraph-class.html#get_node_attributes" class="summary-sig-name">get_node_attributes</a>(<span class="summary-sig-arg">self</span>, |
|
450 <span class="summary-sig-arg">node</span>)</span><br /> |
|
451 Return the attributes of the given node.</td> |
|
452 <td align="right" valign="top"> |
|
453 |
|
454 |
|
455 </td> |
|
456 </tr> |
|
457 </table> |
|
458 |
|
459 </td> |
|
460 </tr> |
|
461 <tr> |
|
462 <td width="15%" align="right" valign="top" class="summary"> |
|
463 <span class="summary-type">boolean</span> |
|
464 </td><td class="summary"> |
|
465 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
466 <tr> |
|
467 <td><span class="summary-sig"><a href="graph.digraph-class.html#has_edge" class="summary-sig-name">has_edge</a>(<span class="summary-sig-arg">self</span>, |
|
468 <span class="summary-sig-arg">u</span>, |
|
469 <span class="summary-sig-arg">v</span>)</span><br /> |
|
470 Return whether an edge between nodes u and v exists.</td> |
|
471 <td align="right" valign="top"> |
|
472 |
|
473 |
|
474 </td> |
|
475 </tr> |
|
476 </table> |
|
477 |
|
478 </td> |
|
479 </tr> |
|
480 <tr> |
|
481 <td width="15%" align="right" valign="top" class="summary"> |
|
482 <span class="summary-type">boolean</span> |
|
483 </td><td class="summary"> |
|
484 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
485 <tr> |
|
486 <td><span class="summary-sig"><a href="graph.digraph-class.html#has_node" class="summary-sig-name">has_node</a>(<span class="summary-sig-arg">self</span>, |
|
487 <span class="summary-sig-arg">node</span>)</span><br /> |
|
488 Return whether the requested node exists.</td> |
|
489 <td align="right" valign="top"> |
|
490 |
|
491 |
|
492 </td> |
|
493 </tr> |
|
494 </table> |
|
495 |
|
496 </td> |
|
497 </tr> |
|
498 <tr> |
|
499 <td width="15%" align="right" valign="top" class="summary"> |
|
500 <span class="summary-type">list</span> |
|
501 </td><td class="summary"> |
|
502 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
503 <tr> |
|
504 <td><span class="summary-sig"><a href="graph.digraph-class.html#incidents" class="summary-sig-name">incidents</a>(<span class="summary-sig-arg">self</span>, |
|
505 <span class="summary-sig-arg">node</span>)</span><br /> |
|
506 Return all nodes that are incident to the given node.</td> |
|
507 <td align="right" valign="top"> |
|
508 |
|
509 |
|
510 </td> |
|
511 </tr> |
|
512 </table> |
|
513 |
|
514 </td> |
|
515 </tr> |
|
516 <tr> |
|
517 <td width="15%" align="right" valign="top" class="summary"> |
|
518 <span class="summary-type">graph</span> |
|
519 </td><td class="summary"> |
|
520 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
521 <tr> |
|
522 <td><span class="summary-sig"><a href="graph.digraph-class.html#inverse" class="summary-sig-name">inverse</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
523 Return the inverse of the graph.</td> |
|
524 <td align="right" valign="top"> |
|
525 |
|
526 |
|
527 </td> |
|
528 </tr> |
|
529 </table> |
|
530 |
|
531 </td> |
|
532 </tr> |
|
533 <tr> |
|
534 <td width="15%" align="right" valign="top" class="summary"> |
|
535 <span class="summary-type">list</span> |
|
536 </td><td class="summary"> |
|
537 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
538 <tr> |
|
539 <td><span class="summary-sig"><a href="graph.digraph-class.html#neighbors" class="summary-sig-name">neighbors</a>(<span class="summary-sig-arg">self</span>, |
|
540 <span class="summary-sig-arg">node</span>)</span><br /> |
|
541 Return all nodes that are directly accessible from given node.</td> |
|
542 <td align="right" valign="top"> |
|
543 |
|
544 |
|
545 </td> |
|
546 </tr> |
|
547 </table> |
|
548 |
|
549 </td> |
|
550 </tr> |
|
551 <tr> |
|
552 <td width="15%" align="right" valign="top" class="summary"> |
|
553 <span class="summary-type">list</span> |
|
554 </td><td class="summary"> |
|
555 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
556 <tr> |
|
557 <td><span class="summary-sig"><a href="graph.digraph-class.html#nodes" class="summary-sig-name">nodes</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
558 Return node list.</td> |
|
559 <td align="right" valign="top"> |
|
560 |
|
561 |
|
562 </td> |
|
563 </tr> |
|
564 </table> |
|
565 |
|
566 </td> |
|
567 </tr> |
|
568 <tr> |
|
569 <td width="15%" align="right" valign="top" class="summary"> |
|
570 <span class="summary-type">number</span> |
|
571 </td><td class="summary"> |
|
572 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
573 <tr> |
|
574 <td><span class="summary-sig"><a href="graph.digraph-class.html#order" class="summary-sig-name">order</a>(<span class="summary-sig-arg">self</span>, |
|
575 <span class="summary-sig-arg">node</span>)</span><br /> |
|
576 Return the order of the given node.</td> |
|
577 <td align="right" valign="top"> |
|
578 |
|
579 |
|
580 </td> |
|
581 </tr> |
|
582 </table> |
|
583 |
|
584 </td> |
|
585 </tr> |
|
586 <tr> |
|
587 <td width="15%" align="right" valign="top" class="summary"> |
|
588 <span class="summary-type"> </span> |
|
589 </td><td class="summary"> |
|
590 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
591 <tr> |
|
592 <td><span class="summary-sig"><a href="graph.digraph-class.html#set_edge_label" class="summary-sig-name">set_edge_label</a>(<span class="summary-sig-arg">self</span>, |
|
593 <span class="summary-sig-arg">u</span>, |
|
594 <span class="summary-sig-arg">v</span>, |
|
595 <span class="summary-sig-arg">label</span>)</span><br /> |
|
596 Set the label of an edge.</td> |
|
597 <td align="right" valign="top"> |
|
598 |
|
599 |
|
600 </td> |
|
601 </tr> |
|
602 </table> |
|
603 |
|
604 </td> |
|
605 </tr> |
|
606 <tr> |
|
607 <td width="15%" align="right" valign="top" class="summary"> |
|
608 <span class="summary-type"> </span> |
|
609 </td><td class="summary"> |
|
610 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
611 <tr> |
|
612 <td><span class="summary-sig"><a href="graph.digraph-class.html#set_edge_weight" class="summary-sig-name">set_edge_weight</a>(<span class="summary-sig-arg">self</span>, |
|
613 <span class="summary-sig-arg">u</span>, |
|
614 <span class="summary-sig-arg">v</span>, |
|
615 <span class="summary-sig-arg">wt</span>)</span><br /> |
|
616 Set the weight of an edge.</td> |
|
617 <td align="right" valign="top"> |
|
618 |
|
619 |
|
620 </td> |
|
621 </tr> |
|
622 </table> |
|
623 |
|
624 </td> |
|
625 </tr> |
|
626 <tr> |
|
627 <td width="15%" align="right" valign="top" class="summary"> |
|
628 <span class="summary-type">iterator</span> |
|
629 </td><td class="summary"> |
|
630 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
631 <tr> |
|
632 <td><span class="summary-sig"><a href="graph.digraph-class.html#traversal" class="summary-sig-name">traversal</a>(<span class="summary-sig-arg">self</span>, |
|
633 <span class="summary-sig-arg">node</span>, |
|
634 <span class="summary-sig-arg">order</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">pre</code><code class="variable-quote">'</code></span>)</span><br /> |
|
635 Graph traversal iterator.</td> |
|
636 <td align="right" valign="top"> |
|
637 |
|
638 |
|
639 </td> |
|
640 </tr> |
|
641 </table> |
|
642 |
|
643 </td> |
|
644 </tr> |
|
645 <tr> |
|
646 <td width="15%" align="right" valign="top" class="summary"> |
|
647 <span class="summary-type"> </span> |
|
648 </td><td class="summary"> |
|
649 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
650 <tr> |
|
651 <td><span class="summary-sig"><a href="graph.digraph-class.html#generate" class="summary-sig-name">generate</a>(<span class="summary-sig-arg">self</span>, |
|
652 <span class="summary-sig-arg">num_nodes</span>, |
|
653 <span class="summary-sig-arg">num_edges</span>, |
|
654 <span class="summary-sig-arg">weight_range</span>=<span class="summary-sig-default"><code class="variable-group">(</code>1<code class="variable-op">, </code>1<code class="variable-group">)</code></span>)</span><br /> |
|
655 Add nodes and random edges to the graph.</td> |
|
656 <td align="right" valign="top"> |
|
657 |
|
658 |
|
659 </td> |
|
660 </tr> |
|
661 </table> |
|
662 |
|
663 </td> |
|
664 </tr> |
|
665 <tr> |
|
666 <td width="15%" align="right" valign="top" class="summary"> |
|
667 <span class="summary-type"> </span> |
|
668 </td><td class="summary"> |
|
669 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
670 <tr> |
|
671 <td><span class="summary-sig"><a href="graph.digraph-class.html#read" class="summary-sig-name">read</a>(<span class="summary-sig-arg">self</span>, |
|
672 <span class="summary-sig-arg">string</span>, |
|
673 <span class="summary-sig-arg">fmt</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">xml</code><code class="variable-quote">'</code></span>)</span><br /> |
|
674 Read a graph from a string.</td> |
|
675 <td align="right" valign="top"> |
|
676 |
|
677 |
|
678 </td> |
|
679 </tr> |
|
680 </table> |
|
681 |
|
682 </td> |
|
683 </tr> |
|
684 <tr> |
|
685 <td width="15%" align="right" valign="top" class="summary"> |
|
686 <span class="summary-type">string</span> |
|
687 </td><td class="summary"> |
|
688 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
689 <tr> |
|
690 <td><span class="summary-sig"><a href="graph.digraph-class.html#write" class="summary-sig-name">write</a>(<span class="summary-sig-arg">self</span>, |
|
691 <span class="summary-sig-arg">fmt</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">xml</code><code class="variable-quote">'</code></span>)</span><br /> |
|
692 Write the graph to a string.</td> |
|
693 <td align="right" valign="top"> |
|
694 |
|
695 |
|
696 </td> |
|
697 </tr> |
|
698 </table> |
|
699 |
|
700 </td> |
|
701 </tr> |
|
702 <tr> |
|
703 <td width="15%" align="right" valign="top" class="summary"> |
|
704 <span class="summary-type">dictionary</span> |
|
705 </td><td class="summary"> |
|
706 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
707 <tr> |
|
708 <td><span class="summary-sig"><a href="graph.digraph-class.html#accessibility" class="summary-sig-name">accessibility</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
709 Accessibility matrix (transitive closure).</td> |
|
710 <td align="right" valign="top"> |
|
711 |
|
712 |
|
713 </td> |
|
714 </tr> |
|
715 </table> |
|
716 |
|
717 </td> |
|
718 </tr> |
|
719 <tr> |
|
720 <td width="15%" align="right" valign="top" class="summary"> |
|
721 <span class="summary-type">dictionary</span> |
|
722 </td><td class="summary"> |
|
723 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
724 <tr> |
|
725 <td><span class="summary-sig"><a href="graph.digraph-class.html#breadth_first_search" class="summary-sig-name">breadth_first_search</a>(<span class="summary-sig-arg">self</span>, |
|
726 <span class="summary-sig-arg">root</span>=<span class="summary-sig-default">None</span>)</span><br /> |
|
727 Breadth-first search.</td> |
|
728 <td align="right" valign="top"> |
|
729 |
|
730 |
|
731 </td> |
|
732 </tr> |
|
733 </table> |
|
734 |
|
735 </td> |
|
736 </tr> |
|
737 <tr> |
|
738 <td width="15%" align="right" valign="top" class="summary"> |
|
739 <span class="summary-type">list</span> |
|
740 </td><td class="summary"> |
|
741 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
742 <tr> |
|
743 <td><span class="summary-sig"><a href="graph.digraph-class.html#cut_edges" class="summary-sig-name">cut_edges</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
744 Return the cut-edges of the given graph.</td> |
|
745 <td align="right" valign="top"> |
|
746 |
|
747 |
|
748 </td> |
|
749 </tr> |
|
750 </table> |
|
751 |
|
752 </td> |
|
753 </tr> |
|
754 <tr> |
|
755 <td width="15%" align="right" valign="top" class="summary"> |
|
756 <span class="summary-type">list</span> |
|
757 </td><td class="summary"> |
|
758 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
759 <tr> |
|
760 <td><span class="summary-sig"><a href="graph.digraph-class.html#cut_nodes" class="summary-sig-name">cut_nodes</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
761 Return the cut-nodes of the given graph.</td> |
|
762 <td align="right" valign="top"> |
|
763 |
|
764 |
|
765 </td> |
|
766 </tr> |
|
767 </table> |
|
768 |
|
769 </td> |
|
770 </tr> |
|
771 <tr> |
|
772 <td width="15%" align="right" valign="top" class="summary"> |
|
773 <span class="summary-type">tuple</span> |
|
774 </td><td class="summary"> |
|
775 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
776 <tr> |
|
777 <td><span class="summary-sig"><a href="graph.digraph-class.html#depth_first_search" class="summary-sig-name">depth_first_search</a>(<span class="summary-sig-arg">self</span>, |
|
778 <span class="summary-sig-arg">root</span>=<span class="summary-sig-default">None</span>)</span><br /> |
|
779 Depht-first search.</td> |
|
780 <td align="right" valign="top"> |
|
781 |
|
782 |
|
783 </td> |
|
784 </tr> |
|
785 </table> |
|
786 |
|
787 </td> |
|
788 </tr> |
|
789 <tr> |
|
790 <td width="15%" align="right" valign="top" class="summary"> |
|
791 <span class="summary-type">list</span> |
|
792 </td><td class="summary"> |
|
793 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
794 <tr> |
|
795 <td><span class="summary-sig"><a href="graph.digraph-class.html#minimal_spanning_tree" class="summary-sig-name">minimal_spanning_tree</a>(<span class="summary-sig-arg">self</span>, |
|
796 <span class="summary-sig-arg">root</span>=<span class="summary-sig-default">None</span>)</span><br /> |
|
797 Minimal spanning tree.</td> |
|
798 <td align="right" valign="top"> |
|
799 |
|
800 |
|
801 </td> |
|
802 </tr> |
|
803 </table> |
|
804 |
|
805 </td> |
|
806 </tr> |
|
807 <tr> |
|
808 <td width="15%" align="right" valign="top" class="summary"> |
|
809 <span class="summary-type">list</span> |
|
810 </td><td class="summary"> |
|
811 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
812 <tr> |
|
813 <td><span class="summary-sig"><a href="graph.digraph-class.html#mutual_accessibility" class="summary-sig-name">mutual_accessibility</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
814 Mutual-accessibility matrix (strongly connected components).</td> |
|
815 <td align="right" valign="top"> |
|
816 |
|
817 |
|
818 </td> |
|
819 </tr> |
|
820 </table> |
|
821 |
|
822 </td> |
|
823 </tr> |
|
824 <tr> |
|
825 <td width="15%" align="right" valign="top" class="summary"> |
|
826 <span class="summary-type">tuple</span> |
|
827 </td><td class="summary"> |
|
828 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
829 <tr> |
|
830 <td><span class="summary-sig"><a href="graph.digraph-class.html#shortest_path" class="summary-sig-name">shortest_path</a>(<span class="summary-sig-arg">self</span>, |
|
831 <span class="summary-sig-arg">source</span>)</span><br /> |
|
832 Return the shortest path distance between source node and all other |
|
833 nodes using Dijkstra's algorithm.</td> |
|
834 <td align="right" valign="top"> |
|
835 |
|
836 |
|
837 </td> |
|
838 </tr> |
|
839 </table> |
|
840 |
|
841 </td> |
|
842 </tr> |
|
843 <tr> |
|
844 <td width="15%" align="right" valign="top" class="summary"> |
|
845 <span class="summary-type">list</span> |
|
846 </td><td class="summary"> |
|
847 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
848 <tr> |
|
849 <td><span class="summary-sig"><a href="graph.digraph-class.html#topological_sorting" class="summary-sig-name">topological_sorting</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
850 Topological sorting.</td> |
|
851 <td align="right" valign="top"> |
|
852 |
|
853 |
|
854 </td> |
|
855 </tr> |
|
856 </table> |
|
857 |
|
858 </td> |
|
859 </tr> |
|
860 <tr> |
|
861 <td colspan="2" class="summary"> |
|
862 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
|
863 <code>__delattr__</code>, |
|
864 <code>__getattribute__</code>, |
|
865 <code>__hash__</code>, |
|
866 <code>__new__</code>, |
|
867 <code>__reduce__</code>, |
|
868 <code>__reduce_ex__</code>, |
|
869 <code>__repr__</code>, |
|
870 <code>__setattr__</code> |
|
871 </p> |
|
872 </td> |
|
873 </tr> |
|
874 </table> |
|
875 <!-- ==================== PROPERTIES ==================== --> |
|
876 <a name="section-Properties"></a> |
|
877 <table class="summary" border="1" cellpadding="3" |
|
878 cellspacing="0" width="100%" bgcolor="white"> |
|
879 <tr bgcolor="#70b0f0" class="table-header"> |
|
880 <td align="left" colspan="2" class="table-header"> |
|
881 <span class="table-header">Properties</span></td> |
|
882 </tr> |
|
883 <tr> |
|
884 <td colspan="2" class="summary"> |
|
885 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
|
886 <code>__class__</code> |
|
887 </p> |
|
888 </td> |
|
889 </tr> |
|
890 </table> |
|
891 <!-- ==================== METHOD DETAILS ==================== --> |
|
892 <a name="section-MethodDetails"></a> |
|
893 <table class="details" border="1" cellpadding="3" |
|
894 cellspacing="0" width="100%" bgcolor="white"> |
|
895 <tr bgcolor="#70b0f0" class="table-header"> |
|
896 <td align="left" colspan="2" class="table-header"> |
|
897 <span class="table-header">Method Details</span></td> |
|
898 </tr> |
|
899 </table> |
|
900 <a name="__init__"></a> |
|
901 <div> |
|
902 <table class="details" border="1" cellpadding="3" |
|
903 cellspacing="0" width="100%" bgcolor="white"> |
|
904 <tr><td> |
|
905 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
906 <tr valign="top"><td> |
|
907 <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span> |
|
908 <br /><em class="fname">(Constructor)</em> |
|
909 </h3> |
|
910 </td><td align="right" valign="top" |
|
911 > |
|
912 </td> |
|
913 </tr></table> |
|
914 |
|
915 <p>Initialize a digraph.</p> |
|
916 <dl class="fields"> |
|
917 <dt>Overrides: |
|
918 object.__init__ |
|
919 </dt> |
|
920 </dl> |
|
921 </td></tr></table> |
|
922 </div> |
|
923 <a name="__getitem__"></a> |
|
924 <div> |
|
925 <table class="details" border="1" cellpadding="3" |
|
926 cellspacing="0" width="100%" bgcolor="white"> |
|
927 <tr><td> |
|
928 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
929 <tr valign="top"><td> |
|
930 <h3 class="epydoc"><span class="sig"><span class="sig-name">__getitem__</span>(<span class="sig-arg">self</span>, |
|
931 <span class="sig-arg">node</span>)</span> |
|
932 <br /><em class="fname">(Indexing operator)</em> |
|
933 </h3> |
|
934 </td><td align="right" valign="top" |
|
935 > |
|
936 </td> |
|
937 </tr></table> |
|
938 |
|
939 <p>Return a iterator passing through all neighbors of the given node.</p> |
|
940 <dl class="fields"> |
|
941 <dt>Returns: iterator</dt> |
|
942 <dd>Iterator passing through all neighbors of the given node.</dd> |
|
943 </dl> |
|
944 </td></tr></table> |
|
945 </div> |
|
946 <a name="__iter__"></a> |
|
947 <div> |
|
948 <table class="details" border="1" cellpadding="3" |
|
949 cellspacing="0" width="100%" bgcolor="white"> |
|
950 <tr><td> |
|
951 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
952 <tr valign="top"><td> |
|
953 <h3 class="epydoc"><span class="sig"><span class="sig-name">__iter__</span>(<span class="sig-arg">self</span>)</span> |
|
954 </h3> |
|
955 </td><td align="right" valign="top" |
|
956 > |
|
957 </td> |
|
958 </tr></table> |
|
959 |
|
960 <p>Return a iterator passing through all nodes in the digraph.</p> |
|
961 <dl class="fields"> |
|
962 <dt>Returns: iterator</dt> |
|
963 <dd>Iterator passing through all nodes in the digraph.</dd> |
|
964 </dl> |
|
965 </td></tr></table> |
|
966 </div> |
|
967 <a name="__len__"></a> |
|
968 <div> |
|
969 <table class="details" border="1" cellpadding="3" |
|
970 cellspacing="0" width="100%" bgcolor="white"> |
|
971 <tr><td> |
|
972 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
973 <tr valign="top"><td> |
|
974 <h3 class="epydoc"><span class="sig"><span class="sig-name">__len__</span>(<span class="sig-arg">self</span>)</span> |
|
975 <br /><em class="fname">(Length operator)</em> |
|
976 </h3> |
|
977 </td><td align="right" valign="top" |
|
978 > |
|
979 </td> |
|
980 </tr></table> |
|
981 |
|
982 <p>Return the order of the digraph when requested by len().</p> |
|
983 <dl class="fields"> |
|
984 <dt>Returns: number</dt> |
|
985 <dd>Size of the graph.</dd> |
|
986 </dl> |
|
987 </td></tr></table> |
|
988 </div> |
|
989 <a name="__str__"></a> |
|
990 <div> |
|
991 <table class="details" border="1" cellpadding="3" |
|
992 cellspacing="0" width="100%" bgcolor="white"> |
|
993 <tr><td> |
|
994 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
995 <tr valign="top"><td> |
|
996 <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span> |
|
997 <br /><em class="fname">(Informal representation operator)</em> |
|
998 </h3> |
|
999 </td><td align="right" valign="top" |
|
1000 > |
|
1001 </td> |
|
1002 </tr></table> |
|
1003 |
|
1004 <p>Return a string representing the digraph when requested by str() (or |
|
1005 print).</p> |
|
1006 <dl class="fields"> |
|
1007 <dt>Returns: string</dt> |
|
1008 <dd>String representing the graph.</dd> |
|
1009 <dt>Overrides: |
|
1010 object.__str__ |
|
1011 </dt> |
|
1012 </dl> |
|
1013 </td></tr></table> |
|
1014 </div> |
|
1015 <a name="add_edge"></a> |
|
1016 <div> |
|
1017 <table class="details" border="1" cellpadding="3" |
|
1018 cellspacing="0" width="100%" bgcolor="white"> |
|
1019 <tr><td> |
|
1020 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1021 <tr valign="top"><td> |
|
1022 <h3 class="epydoc"><span class="sig"><span class="sig-name">add_edge</span>(<span class="sig-arg">self</span>, |
|
1023 <span class="sig-arg">u</span>, |
|
1024 <span class="sig-arg">v</span>, |
|
1025 <span class="sig-arg">wt</span>=<span class="sig-default">1</span>, |
|
1026 <span class="sig-arg">label</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>, |
|
1027 <span class="sig-arg">attrs</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span> |
|
1028 </h3> |
|
1029 </td><td align="right" valign="top" |
|
1030 > |
|
1031 </td> |
|
1032 </tr></table> |
|
1033 |
|
1034 <p>Add an directed edge (u,v) to the graph connecting nodes u to v.</p> |
|
1035 <dl class="fields"> |
|
1036 <dt>Parameters:</dt> |
|
1037 <dd><ul class="nomargin-top"> |
|
1038 <li><strong class="pname"><code>u</code></strong> (node) - One node.</li> |
|
1039 <li><strong class="pname"><code>v</code></strong> (node) - Other node.</li> |
|
1040 <li><strong class="pname"><code>wt</code></strong> (number) - Edge weight.</li> |
|
1041 <li><strong class="pname"><code>label</code></strong> (string) - Edge label.</li> |
|
1042 <li><strong class="pname"><code>attrs</code></strong> (list) - List of node attributes specified as (attribute, value) tuples.</li> |
|
1043 </ul></dd> |
|
1044 </dl> |
|
1045 </td></tr></table> |
|
1046 </div> |
|
1047 <a name="add_edge_attribute"></a> |
|
1048 <div> |
|
1049 <table class="details" border="1" cellpadding="3" |
|
1050 cellspacing="0" width="100%" bgcolor="white"> |
|
1051 <tr><td> |
|
1052 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1053 <tr valign="top"><td> |
|
1054 <h3 class="epydoc"><span class="sig"><span class="sig-name">add_edge_attribute</span>(<span class="sig-arg">self</span>, |
|
1055 <span class="sig-arg">u</span>, |
|
1056 <span class="sig-arg">v</span>, |
|
1057 <span class="sig-arg">attr</span>)</span> |
|
1058 </h3> |
|
1059 </td><td align="right" valign="top" |
|
1060 > |
|
1061 </td> |
|
1062 </tr></table> |
|
1063 |
|
1064 <p>Add attribute to the given edge.</p> |
|
1065 <dl class="fields"> |
|
1066 <dt>Parameters:</dt> |
|
1067 <dd><ul class="nomargin-top"> |
|
1068 <li><strong class="pname"><code>u</code></strong> (node) - One node.</li> |
|
1069 <li><strong class="pname"><code>v</code></strong> (node) - Other node.</li> |
|
1070 <li><strong class="pname"><code>attr</code></strong> (tuple) - Node attribute specified as a tuple in the form (attribute, |
|
1071 value).</li> |
|
1072 </ul></dd> |
|
1073 </dl> |
|
1074 </td></tr></table> |
|
1075 </div> |
|
1076 <a name="add_graph"></a> |
|
1077 <div> |
|
1078 <table class="details" border="1" cellpadding="3" |
|
1079 cellspacing="0" width="100%" bgcolor="white"> |
|
1080 <tr><td> |
|
1081 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1082 <tr valign="top"><td> |
|
1083 <h3 class="epydoc"><span class="sig"><span class="sig-name">add_graph</span>(<span class="sig-arg">self</span>, |
|
1084 <span class="sig-arg">graph</span>)</span> |
|
1085 </h3> |
|
1086 </td><td align="right" valign="top" |
|
1087 > |
|
1088 </td> |
|
1089 </tr></table> |
|
1090 |
|
1091 <p>Add other graph to the graph.</p> |
|
1092 <dl class="fields"> |
|
1093 <dt>Parameters:</dt> |
|
1094 <dd><ul class="nomargin-top"> |
|
1095 <li><strong class="pname"><code>graph</code></strong> (graph) - Graph</li> |
|
1096 </ul></dd> |
|
1097 </dl> |
|
1098 <div class="fields"> <p><strong>Attention:</strong> |
|
1099 Attributes and labels are not preserved. |
|
1100 </p> |
|
1101 </div></td></tr></table> |
|
1102 </div> |
|
1103 <a name="add_node"></a> |
|
1104 <div> |
|
1105 <table class="details" border="1" cellpadding="3" |
|
1106 cellspacing="0" width="100%" bgcolor="white"> |
|
1107 <tr><td> |
|
1108 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1109 <tr valign="top"><td> |
|
1110 <h3 class="epydoc"><span class="sig"><span class="sig-name">add_node</span>(<span class="sig-arg">self</span>, |
|
1111 <span class="sig-arg">node</span>, |
|
1112 <span class="sig-arg">attrs</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span> |
|
1113 </h3> |
|
1114 </td><td align="right" valign="top" |
|
1115 > |
|
1116 </td> |
|
1117 </tr></table> |
|
1118 |
|
1119 <p>Add given node to the graph.</p> |
|
1120 <dl class="fields"> |
|
1121 <dt>Parameters:</dt> |
|
1122 <dd><ul class="nomargin-top"> |
|
1123 <li><strong class="pname"><code>node</code></strong> (node) - Node identifier.</li> |
|
1124 <li><strong class="pname"><code>attrs</code></strong> (list) - List of node attributes specified as (attribute, value) tuples.</li> |
|
1125 </ul></dd> |
|
1126 </dl> |
|
1127 <div class="fields"> <p><strong>Attention:</strong> |
|
1128 While nodes can be of any type, it's strongly recommended to use |
|
1129 only numbers and single-line strings as node identifiers if you |
|
1130 intend to use write(). |
|
1131 </p> |
|
1132 </div></td></tr></table> |
|
1133 </div> |
|
1134 <a name="add_node_attribute"></a> |
|
1135 <div> |
|
1136 <table class="details" border="1" cellpadding="3" |
|
1137 cellspacing="0" width="100%" bgcolor="white"> |
|
1138 <tr><td> |
|
1139 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1140 <tr valign="top"><td> |
|
1141 <h3 class="epydoc"><span class="sig"><span class="sig-name">add_node_attribute</span>(<span class="sig-arg">self</span>, |
|
1142 <span class="sig-arg">node</span>, |
|
1143 <span class="sig-arg">attr</span>)</span> |
|
1144 </h3> |
|
1145 </td><td align="right" valign="top" |
|
1146 > |
|
1147 </td> |
|
1148 </tr></table> |
|
1149 |
|
1150 <p>Add attribute to the given node.</p> |
|
1151 <dl class="fields"> |
|
1152 <dt>Parameters:</dt> |
|
1153 <dd><ul class="nomargin-top"> |
|
1154 <li><strong class="pname"><code>node</code></strong> (node) - Node identifier</li> |
|
1155 <li><strong class="pname"><code>attr</code></strong> (tuple) - Node attribute specified as a tuple in the form (attribute, |
|
1156 value).</li> |
|
1157 </ul></dd> |
|
1158 </dl> |
|
1159 </td></tr></table> |
|
1160 </div> |
|
1161 <a name="add_nodes"></a> |
|
1162 <div> |
|
1163 <table class="details" border="1" cellpadding="3" |
|
1164 cellspacing="0" width="100%" bgcolor="white"> |
|
1165 <tr><td> |
|
1166 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1167 <tr valign="top"><td> |
|
1168 <h3 class="epydoc"><span class="sig"><span class="sig-name">add_nodes</span>(<span class="sig-arg">self</span>, |
|
1169 <span class="sig-arg">nodelist</span>)</span> |
|
1170 </h3> |
|
1171 </td><td align="right" valign="top" |
|
1172 > |
|
1173 </td> |
|
1174 </tr></table> |
|
1175 |
|
1176 <p>Add given nodes to the graph.</p> |
|
1177 <dl class="fields"> |
|
1178 <dt>Parameters:</dt> |
|
1179 <dd><ul class="nomargin-top"> |
|
1180 <li><strong class="pname"><code>nodelist</code></strong> (list) - List of nodes to be added to the graph.</li> |
|
1181 </ul></dd> |
|
1182 </dl> |
|
1183 <div class="fields"> <p><strong>Attention:</strong> |
|
1184 While nodes can be of any type, it's strongly recommended to use |
|
1185 only numbers and single-line strings as node identifiers if you |
|
1186 intend to use write(). |
|
1187 </p> |
|
1188 </div></td></tr></table> |
|
1189 </div> |
|
1190 <a name="add_spanning_tree"></a> |
|
1191 <div> |
|
1192 <table class="details" border="1" cellpadding="3" |
|
1193 cellspacing="0" width="100%" bgcolor="white"> |
|
1194 <tr><td> |
|
1195 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1196 <tr valign="top"><td> |
|
1197 <h3 class="epydoc"><span class="sig"><span class="sig-name">add_spanning_tree</span>(<span class="sig-arg">self</span>, |
|
1198 <span class="sig-arg">st</span>)</span> |
|
1199 </h3> |
|
1200 </td><td align="right" valign="top" |
|
1201 > |
|
1202 </td> |
|
1203 </tr></table> |
|
1204 |
|
1205 <p>Add a spanning tree to the graph.</p> |
|
1206 <dl class="fields"> |
|
1207 <dt>Parameters:</dt> |
|
1208 <dd><ul class="nomargin-top"> |
|
1209 <li><strong class="pname"><code>st</code></strong> (dictionary) - Spanning tree.</li> |
|
1210 </ul></dd> |
|
1211 </dl> |
|
1212 </td></tr></table> |
|
1213 </div> |
|
1214 <a name="complete"></a> |
|
1215 <div> |
|
1216 <table class="details" border="1" cellpadding="3" |
|
1217 cellspacing="0" width="100%" bgcolor="white"> |
|
1218 <tr><td> |
|
1219 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1220 <tr valign="top"><td> |
|
1221 <h3 class="epydoc"><span class="sig"><span class="sig-name">complete</span>(<span class="sig-arg">self</span>)</span> |
|
1222 </h3> |
|
1223 </td><td align="right" valign="top" |
|
1224 > |
|
1225 </td> |
|
1226 </tr></table> |
|
1227 |
|
1228 <p>Make the graph a complete graph.</p> |
|
1229 <dl class="fields"> |
|
1230 </dl> |
|
1231 <div class="fields"> <p><strong>Attention:</strong> |
|
1232 This will modify the current graph. |
|
1233 </p> |
|
1234 </div></td></tr></table> |
|
1235 </div> |
|
1236 <a name="degree"></a> |
|
1237 <div> |
|
1238 <table class="details" border="1" cellpadding="3" |
|
1239 cellspacing="0" width="100%" bgcolor="white"> |
|
1240 <tr><td> |
|
1241 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1242 <tr valign="top"><td> |
|
1243 <h3 class="epydoc"><span class="sig"><span class="sig-name">degree</span>(<span class="sig-arg">self</span>, |
|
1244 <span class="sig-arg">node</span>)</span> |
|
1245 </h3> |
|
1246 </td><td align="right" valign="top" |
|
1247 > |
|
1248 </td> |
|
1249 </tr></table> |
|
1250 |
|
1251 <p>Return the degree of the given node.</p> |
|
1252 <dl class="fields"> |
|
1253 <dt>Returns: number</dt> |
|
1254 <dd>Order of the given node.</dd> |
|
1255 </dl> |
|
1256 </td></tr></table> |
|
1257 </div> |
|
1258 <a name="del_edge"></a> |
|
1259 <div> |
|
1260 <table class="details" border="1" cellpadding="3" |
|
1261 cellspacing="0" width="100%" bgcolor="white"> |
|
1262 <tr><td> |
|
1263 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1264 <tr valign="top"><td> |
|
1265 <h3 class="epydoc"><span class="sig"><span class="sig-name">del_edge</span>(<span class="sig-arg">self</span>, |
|
1266 <span class="sig-arg">u</span>, |
|
1267 <span class="sig-arg">v</span>)</span> |
|
1268 </h3> |
|
1269 </td><td align="right" valign="top" |
|
1270 > |
|
1271 </td> |
|
1272 </tr></table> |
|
1273 |
|
1274 <p>Remove an directed edge (u, v) from the graph.</p> |
|
1275 <dl class="fields"> |
|
1276 <dt>Parameters:</dt> |
|
1277 <dd><ul class="nomargin-top"> |
|
1278 <li><strong class="pname"><code>u</code></strong> (node) - One node.</li> |
|
1279 <li><strong class="pname"><code>v</code></strong> (node) - Other node.</li> |
|
1280 </ul></dd> |
|
1281 </dl> |
|
1282 </td></tr></table> |
|
1283 </div> |
|
1284 <a name="del_node"></a> |
|
1285 <div> |
|
1286 <table class="details" border="1" cellpadding="3" |
|
1287 cellspacing="0" width="100%" bgcolor="white"> |
|
1288 <tr><td> |
|
1289 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1290 <tr valign="top"><td> |
|
1291 <h3 class="epydoc"><span class="sig"><span class="sig-name">del_node</span>(<span class="sig-arg">self</span>, |
|
1292 <span class="sig-arg">node</span>)</span> |
|
1293 </h3> |
|
1294 </td><td align="right" valign="top" |
|
1295 > |
|
1296 </td> |
|
1297 </tr></table> |
|
1298 |
|
1299 <p>Remove a node from the graph.</p> |
|
1300 <dl class="fields"> |
|
1301 <dt>Parameters:</dt> |
|
1302 <dd><ul class="nomargin-top"> |
|
1303 <li><strong class="pname"><code>node</code></strong> (node) - Node identifier.</li> |
|
1304 </ul></dd> |
|
1305 </dl> |
|
1306 </td></tr></table> |
|
1307 </div> |
|
1308 <a name="edges"></a> |
|
1309 <div> |
|
1310 <table class="details" border="1" cellpadding="3" |
|
1311 cellspacing="0" width="100%" bgcolor="white"> |
|
1312 <tr><td> |
|
1313 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1314 <tr valign="top"><td> |
|
1315 <h3 class="epydoc"><span class="sig"><span class="sig-name">edges</span>(<span class="sig-arg">self</span>)</span> |
|
1316 </h3> |
|
1317 </td><td align="right" valign="top" |
|
1318 > |
|
1319 </td> |
|
1320 </tr></table> |
|
1321 |
|
1322 <p>Return all edges in the graph.</p> |
|
1323 <dl class="fields"> |
|
1324 <dt>Returns: list</dt> |
|
1325 <dd>List of all edges in the graph.</dd> |
|
1326 </dl> |
|
1327 </td></tr></table> |
|
1328 </div> |
|
1329 <a name="get_edge_attributes"></a> |
|
1330 <div> |
|
1331 <table class="details" border="1" cellpadding="3" |
|
1332 cellspacing="0" width="100%" bgcolor="white"> |
|
1333 <tr><td> |
|
1334 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1335 <tr valign="top"><td> |
|
1336 <h3 class="epydoc"><span class="sig"><span class="sig-name">get_edge_attributes</span>(<span class="sig-arg">self</span>, |
|
1337 <span class="sig-arg">u</span>, |
|
1338 <span class="sig-arg">v</span>)</span> |
|
1339 </h3> |
|
1340 </td><td align="right" valign="top" |
|
1341 > |
|
1342 </td> |
|
1343 </tr></table> |
|
1344 |
|
1345 <p>Return the attributes of the given edge.</p> |
|
1346 <dl class="fields"> |
|
1347 <dt>Parameters:</dt> |
|
1348 <dd><ul class="nomargin-top"> |
|
1349 <li><strong class="pname"><code>u</code></strong> (node) - One node.</li> |
|
1350 <li><strong class="pname"><code>v</code></strong> (node) - Other node.</li> |
|
1351 </ul></dd> |
|
1352 <dt>Returns: list</dt> |
|
1353 <dd>List of attributes specified tuples in the form (attribute, |
|
1354 value).</dd> |
|
1355 </dl> |
|
1356 </td></tr></table> |
|
1357 </div> |
|
1358 <a name="get_edge_label"></a> |
|
1359 <div> |
|
1360 <table class="details" border="1" cellpadding="3" |
|
1361 cellspacing="0" width="100%" bgcolor="white"> |
|
1362 <tr><td> |
|
1363 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1364 <tr valign="top"><td> |
|
1365 <h3 class="epydoc"><span class="sig"><span class="sig-name">get_edge_label</span>(<span class="sig-arg">self</span>, |
|
1366 <span class="sig-arg">u</span>, |
|
1367 <span class="sig-arg">v</span>)</span> |
|
1368 </h3> |
|
1369 </td><td align="right" valign="top" |
|
1370 > |
|
1371 </td> |
|
1372 </tr></table> |
|
1373 |
|
1374 <p>Get the label of an edge.</p> |
|
1375 <dl class="fields"> |
|
1376 <dt>Parameters:</dt> |
|
1377 <dd><ul class="nomargin-top"> |
|
1378 <li><strong class="pname"><code>u</code></strong> (node) - One node.</li> |
|
1379 <li><strong class="pname"><code>v</code></strong> (node) - Other node.</li> |
|
1380 </ul></dd> |
|
1381 <dt>Returns: string</dt> |
|
1382 <dd>Edge label</dd> |
|
1383 </dl> |
|
1384 </td></tr></table> |
|
1385 </div> |
|
1386 <a name="get_edge_weight"></a> |
|
1387 <div> |
|
1388 <table class="details" border="1" cellpadding="3" |
|
1389 cellspacing="0" width="100%" bgcolor="white"> |
|
1390 <tr><td> |
|
1391 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1392 <tr valign="top"><td> |
|
1393 <h3 class="epydoc"><span class="sig"><span class="sig-name">get_edge_weight</span>(<span class="sig-arg">self</span>, |
|
1394 <span class="sig-arg">u</span>, |
|
1395 <span class="sig-arg">v</span>)</span> |
|
1396 </h3> |
|
1397 </td><td align="right" valign="top" |
|
1398 > |
|
1399 </td> |
|
1400 </tr></table> |
|
1401 |
|
1402 <p>Get the weight of an edge.</p> |
|
1403 <dl class="fields"> |
|
1404 <dt>Parameters:</dt> |
|
1405 <dd><ul class="nomargin-top"> |
|
1406 <li><strong class="pname"><code>u</code></strong> (node) - One node.</li> |
|
1407 <li><strong class="pname"><code>v</code></strong> (node) - Other node.</li> |
|
1408 </ul></dd> |
|
1409 <dt>Returns: number</dt> |
|
1410 <dd>Edge weight.</dd> |
|
1411 </dl> |
|
1412 </td></tr></table> |
|
1413 </div> |
|
1414 <a name="get_node_attributes"></a> |
|
1415 <div> |
|
1416 <table class="details" border="1" cellpadding="3" |
|
1417 cellspacing="0" width="100%" bgcolor="white"> |
|
1418 <tr><td> |
|
1419 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1420 <tr valign="top"><td> |
|
1421 <h3 class="epydoc"><span class="sig"><span class="sig-name">get_node_attributes</span>(<span class="sig-arg">self</span>, |
|
1422 <span class="sig-arg">node</span>)</span> |
|
1423 </h3> |
|
1424 </td><td align="right" valign="top" |
|
1425 > |
|
1426 </td> |
|
1427 </tr></table> |
|
1428 |
|
1429 <p>Return the attributes of the given node.</p> |
|
1430 <dl class="fields"> |
|
1431 <dt>Parameters:</dt> |
|
1432 <dd><ul class="nomargin-top"> |
|
1433 <li><strong class="pname"><code>node</code></strong> (node) - Node identifier</li> |
|
1434 </ul></dd> |
|
1435 <dt>Returns: list</dt> |
|
1436 <dd>List of attributes specified tuples in the form (attribute, |
|
1437 value).</dd> |
|
1438 </dl> |
|
1439 </td></tr></table> |
|
1440 </div> |
|
1441 <a name="has_edge"></a> |
|
1442 <div> |
|
1443 <table class="details" border="1" cellpadding="3" |
|
1444 cellspacing="0" width="100%" bgcolor="white"> |
|
1445 <tr><td> |
|
1446 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1447 <tr valign="top"><td> |
|
1448 <h3 class="epydoc"><span class="sig"><span class="sig-name">has_edge</span>(<span class="sig-arg">self</span>, |
|
1449 <span class="sig-arg">u</span>, |
|
1450 <span class="sig-arg">v</span>)</span> |
|
1451 </h3> |
|
1452 </td><td align="right" valign="top" |
|
1453 > |
|
1454 </td> |
|
1455 </tr></table> |
|
1456 |
|
1457 <p>Return whether an edge between nodes u and v exists.</p> |
|
1458 <dl class="fields"> |
|
1459 <dt>Parameters:</dt> |
|
1460 <dd><ul class="nomargin-top"> |
|
1461 <li><strong class="pname"><code>u</code></strong> (node) - One node.</li> |
|
1462 <li><strong class="pname"><code>v</code></strong> (node) - Other node.</li> |
|
1463 </ul></dd> |
|
1464 <dt>Returns: boolean</dt> |
|
1465 <dd>Truth-value for edge existence.</dd> |
|
1466 </dl> |
|
1467 </td></tr></table> |
|
1468 </div> |
|
1469 <a name="has_node"></a> |
|
1470 <div> |
|
1471 <table class="details" border="1" cellpadding="3" |
|
1472 cellspacing="0" width="100%" bgcolor="white"> |
|
1473 <tr><td> |
|
1474 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1475 <tr valign="top"><td> |
|
1476 <h3 class="epydoc"><span class="sig"><span class="sig-name">has_node</span>(<span class="sig-arg">self</span>, |
|
1477 <span class="sig-arg">node</span>)</span> |
|
1478 </h3> |
|
1479 </td><td align="right" valign="top" |
|
1480 > |
|
1481 </td> |
|
1482 </tr></table> |
|
1483 |
|
1484 <p>Return whether the requested node exists.</p> |
|
1485 <dl class="fields"> |
|
1486 <dt>Parameters:</dt> |
|
1487 <dd><ul class="nomargin-top"> |
|
1488 <li><strong class="pname"><code>node</code></strong> (node) - Node identifier</li> |
|
1489 </ul></dd> |
|
1490 <dt>Returns: boolean</dt> |
|
1491 <dd>Truth-value for node existence.</dd> |
|
1492 </dl> |
|
1493 </td></tr></table> |
|
1494 </div> |
|
1495 <a name="incidents"></a> |
|
1496 <div> |
|
1497 <table class="details" border="1" cellpadding="3" |
|
1498 cellspacing="0" width="100%" bgcolor="white"> |
|
1499 <tr><td> |
|
1500 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1501 <tr valign="top"><td> |
|
1502 <h3 class="epydoc"><span class="sig"><span class="sig-name">incidents</span>(<span class="sig-arg">self</span>, |
|
1503 <span class="sig-arg">node</span>)</span> |
|
1504 </h3> |
|
1505 </td><td align="right" valign="top" |
|
1506 > |
|
1507 </td> |
|
1508 </tr></table> |
|
1509 |
|
1510 <p>Return all nodes that are incident to the given node.</p> |
|
1511 <dl class="fields"> |
|
1512 <dt>Parameters:</dt> |
|
1513 <dd><ul class="nomargin-top"> |
|
1514 <li><strong class="pname"><code>node</code></strong> (node) - Node identifier</li> |
|
1515 </ul></dd> |
|
1516 <dt>Returns: list</dt> |
|
1517 <dd>List of nodes directly accessible from given node.</dd> |
|
1518 </dl> |
|
1519 </td></tr></table> |
|
1520 </div> |
|
1521 <a name="inverse"></a> |
|
1522 <div> |
|
1523 <table class="details" border="1" cellpadding="3" |
|
1524 cellspacing="0" width="100%" bgcolor="white"> |
|
1525 <tr><td> |
|
1526 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1527 <tr valign="top"><td> |
|
1528 <h3 class="epydoc"><span class="sig"><span class="sig-name">inverse</span>(<span class="sig-arg">self</span>)</span> |
|
1529 </h3> |
|
1530 </td><td align="right" valign="top" |
|
1531 > |
|
1532 </td> |
|
1533 </tr></table> |
|
1534 |
|
1535 <p>Return the inverse of the graph.</p> |
|
1536 <dl class="fields"> |
|
1537 <dt>Returns: graph</dt> |
|
1538 <dd>Complement graph for the graph.</dd> |
|
1539 </dl> |
|
1540 </td></tr></table> |
|
1541 </div> |
|
1542 <a name="neighbors"></a> |
|
1543 <div> |
|
1544 <table class="details" border="1" cellpadding="3" |
|
1545 cellspacing="0" width="100%" bgcolor="white"> |
|
1546 <tr><td> |
|
1547 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1548 <tr valign="top"><td> |
|
1549 <h3 class="epydoc"><span class="sig"><span class="sig-name">neighbors</span>(<span class="sig-arg">self</span>, |
|
1550 <span class="sig-arg">node</span>)</span> |
|
1551 </h3> |
|
1552 </td><td align="right" valign="top" |
|
1553 > |
|
1554 </td> |
|
1555 </tr></table> |
|
1556 |
|
1557 <p>Return all nodes that are directly accessible from given node.</p> |
|
1558 <dl class="fields"> |
|
1559 <dt>Parameters:</dt> |
|
1560 <dd><ul class="nomargin-top"> |
|
1561 <li><strong class="pname"><code>node</code></strong> (node) - Node identifier</li> |
|
1562 </ul></dd> |
|
1563 <dt>Returns: list</dt> |
|
1564 <dd>List of nodes directly accessible from given node.</dd> |
|
1565 </dl> |
|
1566 </td></tr></table> |
|
1567 </div> |
|
1568 <a name="nodes"></a> |
|
1569 <div> |
|
1570 <table class="details" border="1" cellpadding="3" |
|
1571 cellspacing="0" width="100%" bgcolor="white"> |
|
1572 <tr><td> |
|
1573 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1574 <tr valign="top"><td> |
|
1575 <h3 class="epydoc"><span class="sig"><span class="sig-name">nodes</span>(<span class="sig-arg">self</span>)</span> |
|
1576 </h3> |
|
1577 </td><td align="right" valign="top" |
|
1578 > |
|
1579 </td> |
|
1580 </tr></table> |
|
1581 |
|
1582 <p>Return node list.</p> |
|
1583 <dl class="fields"> |
|
1584 <dt>Returns: list</dt> |
|
1585 <dd>Node list.</dd> |
|
1586 </dl> |
|
1587 </td></tr></table> |
|
1588 </div> |
|
1589 <a name="order"></a> |
|
1590 <div> |
|
1591 <table class="details" border="1" cellpadding="3" |
|
1592 cellspacing="0" width="100%" bgcolor="white"> |
|
1593 <tr><td> |
|
1594 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1595 <tr valign="top"><td> |
|
1596 <h3 class="epydoc"><span class="sig"><span class="sig-name">order</span>(<span class="sig-arg">self</span>, |
|
1597 <span class="sig-arg">node</span>)</span> |
|
1598 </h3> |
|
1599 </td><td align="right" valign="top" |
|
1600 > |
|
1601 </td> |
|
1602 </tr></table> |
|
1603 |
|
1604 <p>Return the order of the given node.</p> |
|
1605 <dl class="fields"> |
|
1606 <dt>Returns: number</dt> |
|
1607 <dd>Order of the given node.</dd> |
|
1608 </dl> |
|
1609 </td></tr></table> |
|
1610 </div> |
|
1611 <a name="set_edge_label"></a> |
|
1612 <div> |
|
1613 <table class="details" border="1" cellpadding="3" |
|
1614 cellspacing="0" width="100%" bgcolor="white"> |
|
1615 <tr><td> |
|
1616 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1617 <tr valign="top"><td> |
|
1618 <h3 class="epydoc"><span class="sig"><span class="sig-name">set_edge_label</span>(<span class="sig-arg">self</span>, |
|
1619 <span class="sig-arg">u</span>, |
|
1620 <span class="sig-arg">v</span>, |
|
1621 <span class="sig-arg">label</span>)</span> |
|
1622 </h3> |
|
1623 </td><td align="right" valign="top" |
|
1624 > |
|
1625 </td> |
|
1626 </tr></table> |
|
1627 |
|
1628 <p>Set the label of an edge.</p> |
|
1629 <dl class="fields"> |
|
1630 <dt>Parameters:</dt> |
|
1631 <dd><ul class="nomargin-top"> |
|
1632 <li><strong class="pname"><code>u</code></strong> (node) - One node.</li> |
|
1633 <li><strong class="pname"><code>v</code></strong> (node) - Other node.</li> |
|
1634 <li><strong class="pname"><code>label</code></strong> (string) - Edge label.</li> |
|
1635 </ul></dd> |
|
1636 </dl> |
|
1637 </td></tr></table> |
|
1638 </div> |
|
1639 <a name="set_edge_weight"></a> |
|
1640 <div> |
|
1641 <table class="details" border="1" cellpadding="3" |
|
1642 cellspacing="0" width="100%" bgcolor="white"> |
|
1643 <tr><td> |
|
1644 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1645 <tr valign="top"><td> |
|
1646 <h3 class="epydoc"><span class="sig"><span class="sig-name">set_edge_weight</span>(<span class="sig-arg">self</span>, |
|
1647 <span class="sig-arg">u</span>, |
|
1648 <span class="sig-arg">v</span>, |
|
1649 <span class="sig-arg">wt</span>)</span> |
|
1650 </h3> |
|
1651 </td><td align="right" valign="top" |
|
1652 > |
|
1653 </td> |
|
1654 </tr></table> |
|
1655 |
|
1656 <p>Set the weight of an edge.</p> |
|
1657 <dl class="fields"> |
|
1658 <dt>Parameters:</dt> |
|
1659 <dd><ul class="nomargin-top"> |
|
1660 <li><strong class="pname"><code>u</code></strong> (node) - One node.</li> |
|
1661 <li><strong class="pname"><code>v</code></strong> (node) - Other node.</li> |
|
1662 <li><strong class="pname"><code>wt</code></strong> (number) - Edge weight.</li> |
|
1663 </ul></dd> |
|
1664 </dl> |
|
1665 </td></tr></table> |
|
1666 </div> |
|
1667 <a name="traversal"></a> |
|
1668 <div> |
|
1669 <table class="details" border="1" cellpadding="3" |
|
1670 cellspacing="0" width="100%" bgcolor="white"> |
|
1671 <tr><td> |
|
1672 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1673 <tr valign="top"><td> |
|
1674 <h3 class="epydoc"><span class="sig"><span class="sig-name">traversal</span>(<span class="sig-arg">self</span>, |
|
1675 <span class="sig-arg">node</span>, |
|
1676 <span class="sig-arg">order</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">pre</code><code class="variable-quote">'</code></span>)</span> |
|
1677 </h3> |
|
1678 </td><td align="right" valign="top" |
|
1679 > |
|
1680 </td> |
|
1681 </tr></table> |
|
1682 |
|
1683 <p>Graph traversal iterator.</p> |
|
1684 <dl class="fields"> |
|
1685 <dt>Parameters:</dt> |
|
1686 <dd><ul class="nomargin-top"> |
|
1687 <li><strong class="pname"><code>node</code></strong> (node) - Node.</li> |
|
1688 <li><strong class="pname"><code>order</code></strong> (string) - traversal ordering. Possible values are: |
|
1689 <ol start="2"> |
|
1690 <li> |
|
1691 'pre' - Preordering (default) |
|
1692 </li> |
|
1693 </ol> |
|
1694 <ol start="1"> |
|
1695 <li> |
|
1696 'post' - Postordering |
|
1697 </li> |
|
1698 </ol></li> |
|
1699 </ul></dd> |
|
1700 <dt>Returns: iterator</dt> |
|
1701 <dd>Traversal iterator.</dd> |
|
1702 </dl> |
|
1703 </td></tr></table> |
|
1704 </div> |
|
1705 <a name="generate"></a> |
|
1706 <div> |
|
1707 <table class="details" border="1" cellpadding="3" |
|
1708 cellspacing="0" width="100%" bgcolor="white"> |
|
1709 <tr><td> |
|
1710 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1711 <tr valign="top"><td> |
|
1712 <h3 class="epydoc"><span class="sig"><span class="sig-name">generate</span>(<span class="sig-arg">self</span>, |
|
1713 <span class="sig-arg">num_nodes</span>, |
|
1714 <span class="sig-arg">num_edges</span>, |
|
1715 <span class="sig-arg">weight_range</span>=<span class="sig-default"><code class="variable-group">(</code>1<code class="variable-op">, </code>1<code class="variable-group">)</code></span>)</span> |
|
1716 </h3> |
|
1717 </td><td align="right" valign="top" |
|
1718 > |
|
1719 </td> |
|
1720 </tr></table> |
|
1721 |
|
1722 <p>Add nodes and random edges to the graph.</p> |
|
1723 <dl class="fields"> |
|
1724 <dt>Parameters:</dt> |
|
1725 <dd><ul class="nomargin-top"> |
|
1726 <li><strong class="pname"><code>num_nodes</code></strong> (number) - Number of nodes.</li> |
|
1727 <li><strong class="pname"><code>num_edges</code></strong> (number) - Number of edges.</li> |
|
1728 <li><strong class="pname"><code>weight_range</code></strong> (tuple) - tuple of two integers as lower and upper limits on randomly |
|
1729 generated weights (uniform distribution).</li> |
|
1730 </ul></dd> |
|
1731 </dl> |
|
1732 </td></tr></table> |
|
1733 </div> |
|
1734 <a name="read"></a> |
|
1735 <div> |
|
1736 <table class="details" border="1" cellpadding="3" |
|
1737 cellspacing="0" width="100%" bgcolor="white"> |
|
1738 <tr><td> |
|
1739 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1740 <tr valign="top"><td> |
|
1741 <h3 class="epydoc"><span class="sig"><span class="sig-name">read</span>(<span class="sig-arg">self</span>, |
|
1742 <span class="sig-arg">string</span>, |
|
1743 <span class="sig-arg">fmt</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">xml</code><code class="variable-quote">'</code></span>)</span> |
|
1744 </h3> |
|
1745 </td><td align="right" valign="top" |
|
1746 > |
|
1747 </td> |
|
1748 </tr></table> |
|
1749 |
|
1750 <p>Read a graph from a string. Nodes and edges specified in the input |
|
1751 will be added to the current graph.</p> |
|
1752 <dl class="fields"> |
|
1753 <dt>Parameters:</dt> |
|
1754 <dd><ul class="nomargin-top"> |
|
1755 <li><strong class="pname"><code>string</code></strong> (string) - Input string specifying a graph.</li> |
|
1756 <li><strong class="pname"><code>fmt</code></strong> (string) - Input format. Possible formats are: |
|
1757 <ol start="1"> |
|
1758 <li> |
|
1759 'xml' - XML (default) |
|
1760 </li> |
|
1761 </ol></li> |
|
1762 </ul></dd> |
|
1763 </dl> |
|
1764 </td></tr></table> |
|
1765 </div> |
|
1766 <a name="write"></a> |
|
1767 <div> |
|
1768 <table class="details" border="1" cellpadding="3" |
|
1769 cellspacing="0" width="100%" bgcolor="white"> |
|
1770 <tr><td> |
|
1771 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1772 <tr valign="top"><td> |
|
1773 <h3 class="epydoc"><span class="sig"><span class="sig-name">write</span>(<span class="sig-arg">self</span>, |
|
1774 <span class="sig-arg">fmt</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">xml</code><code class="variable-quote">'</code></span>)</span> |
|
1775 </h3> |
|
1776 </td><td align="right" valign="top" |
|
1777 > |
|
1778 </td> |
|
1779 </tr></table> |
|
1780 |
|
1781 <p>Write the graph to a string. Depending of the output format, this |
|
1782 string can be used by read() to rebuild the graph.</p> |
|
1783 <dl class="fields"> |
|
1784 <dt>Parameters:</dt> |
|
1785 <dd><ul class="nomargin-top"> |
|
1786 <li><strong class="pname"><code>fmt</code></strong> (string) - Output format. Possible formats are: |
|
1787 <ol start="1"> |
|
1788 <li> |
|
1789 'xml' - XML (default) |
|
1790 </li> |
|
1791 <li> |
|
1792 'dot' - DOT Language (for GraphViz) |
|
1793 </li> |
|
1794 <li> |
|
1795 'dotwt' - DOT Language with weight information |
|
1796 </li> |
|
1797 </ol></li> |
|
1798 </ul></dd> |
|
1799 <dt>Returns: string</dt> |
|
1800 <dd>String specifying the graph.</dd> |
|
1801 </dl> |
|
1802 </td></tr></table> |
|
1803 </div> |
|
1804 <a name="accessibility"></a> |
|
1805 <div> |
|
1806 <table class="details" border="1" cellpadding="3" |
|
1807 cellspacing="0" width="100%" bgcolor="white"> |
|
1808 <tr><td> |
|
1809 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1810 <tr valign="top"><td> |
|
1811 <h3 class="epydoc"><span class="sig"><span class="sig-name">accessibility</span>(<span class="sig-arg">self</span>)</span> |
|
1812 </h3> |
|
1813 </td><td align="right" valign="top" |
|
1814 > |
|
1815 </td> |
|
1816 </tr></table> |
|
1817 |
|
1818 <p>Accessibility matrix (transitive closure).</p> |
|
1819 <dl class="fields"> |
|
1820 <dt>Returns: dictionary</dt> |
|
1821 <dd>Accessibility information for each node.</dd> |
|
1822 </dl> |
|
1823 </td></tr></table> |
|
1824 </div> |
|
1825 <a name="breadth_first_search"></a> |
|
1826 <div> |
|
1827 <table class="details" border="1" cellpadding="3" |
|
1828 cellspacing="0" width="100%" bgcolor="white"> |
|
1829 <tr><td> |
|
1830 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1831 <tr valign="top"><td> |
|
1832 <h3 class="epydoc"><span class="sig"><span class="sig-name">breadth_first_search</span>(<span class="sig-arg">self</span>, |
|
1833 <span class="sig-arg">root</span>=<span class="sig-default">None</span>)</span> |
|
1834 </h3> |
|
1835 </td><td align="right" valign="top" |
|
1836 > |
|
1837 </td> |
|
1838 </tr></table> |
|
1839 |
|
1840 <p>Breadth-first search.</p> |
|
1841 <dl class="fields"> |
|
1842 <dt>Parameters:</dt> |
|
1843 <dd><ul class="nomargin-top"> |
|
1844 <li><strong class="pname"><code>root</code></strong> (node) - Optional root node (will explore only root's connected component)</li> |
|
1845 </ul></dd> |
|
1846 <dt>Returns: dictionary</dt> |
|
1847 <dd>A tuple containing a dictionary and a list. |
|
1848 <ol start="1"> |
|
1849 <li> |
|
1850 Generated spanning tree |
|
1851 </li> |
|
1852 <li> |
|
1853 Graph's level-based ordering |
|
1854 </li> |
|
1855 </ol></dd> |
|
1856 </dl> |
|
1857 </td></tr></table> |
|
1858 </div> |
|
1859 <a name="cut_edges"></a> |
|
1860 <div> |
|
1861 <table class="details" border="1" cellpadding="3" |
|
1862 cellspacing="0" width="100%" bgcolor="white"> |
|
1863 <tr><td> |
|
1864 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1865 <tr valign="top"><td> |
|
1866 <h3 class="epydoc"><span class="sig"><span class="sig-name">cut_edges</span>(<span class="sig-arg">self</span>)</span> |
|
1867 </h3> |
|
1868 </td><td align="right" valign="top" |
|
1869 > |
|
1870 </td> |
|
1871 </tr></table> |
|
1872 |
|
1873 <p>Return the cut-edges of the given graph.</p> |
|
1874 <dl class="fields"> |
|
1875 <dt>Returns: list</dt> |
|
1876 <dd>List of cut-edges.</dd> |
|
1877 </dl> |
|
1878 </td></tr></table> |
|
1879 </div> |
|
1880 <a name="cut_nodes"></a> |
|
1881 <div> |
|
1882 <table class="details" border="1" cellpadding="3" |
|
1883 cellspacing="0" width="100%" bgcolor="white"> |
|
1884 <tr><td> |
|
1885 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1886 <tr valign="top"><td> |
|
1887 <h3 class="epydoc"><span class="sig"><span class="sig-name">cut_nodes</span>(<span class="sig-arg">self</span>)</span> |
|
1888 </h3> |
|
1889 </td><td align="right" valign="top" |
|
1890 > |
|
1891 </td> |
|
1892 </tr></table> |
|
1893 |
|
1894 <p>Return the cut-nodes of the given graph.</p> |
|
1895 <dl class="fields"> |
|
1896 <dt>Returns: list</dt> |
|
1897 <dd>List of cut-nodes.</dd> |
|
1898 </dl> |
|
1899 </td></tr></table> |
|
1900 </div> |
|
1901 <a name="depth_first_search"></a> |
|
1902 <div> |
|
1903 <table class="details" border="1" cellpadding="3" |
|
1904 cellspacing="0" width="100%" bgcolor="white"> |
|
1905 <tr><td> |
|
1906 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1907 <tr valign="top"><td> |
|
1908 <h3 class="epydoc"><span class="sig"><span class="sig-name">depth_first_search</span>(<span class="sig-arg">self</span>, |
|
1909 <span class="sig-arg">root</span>=<span class="sig-default">None</span>)</span> |
|
1910 </h3> |
|
1911 </td><td align="right" valign="top" |
|
1912 > |
|
1913 </td> |
|
1914 </tr></table> |
|
1915 |
|
1916 <p>Depht-first search.</p> |
|
1917 <dl class="fields"> |
|
1918 <dt>Parameters:</dt> |
|
1919 <dd><ul class="nomargin-top"> |
|
1920 <li><strong class="pname"><code>root</code></strong> (node) - Optional root node (will explore only root's connected component)</li> |
|
1921 </ul></dd> |
|
1922 <dt>Returns: tuple</dt> |
|
1923 <dd>tupple containing a dictionary and two lists: |
|
1924 <ol start="1"> |
|
1925 <li> |
|
1926 Generated spanning tree |
|
1927 </li> |
|
1928 <li> |
|
1929 Graph's preordering |
|
1930 </li> |
|
1931 <li> |
|
1932 Graph's postordering |
|
1933 </li> |
|
1934 </ol></dd> |
|
1935 </dl> |
|
1936 </td></tr></table> |
|
1937 </div> |
|
1938 <a name="minimal_spanning_tree"></a> |
|
1939 <div> |
|
1940 <table class="details" border="1" cellpadding="3" |
|
1941 cellspacing="0" width="100%" bgcolor="white"> |
|
1942 <tr><td> |
|
1943 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1944 <tr valign="top"><td> |
|
1945 <h3 class="epydoc"><span class="sig"><span class="sig-name">minimal_spanning_tree</span>(<span class="sig-arg">self</span>, |
|
1946 <span class="sig-arg">root</span>=<span class="sig-default">None</span>)</span> |
|
1947 </h3> |
|
1948 </td><td align="right" valign="top" |
|
1949 > |
|
1950 </td> |
|
1951 </tr></table> |
|
1952 |
|
1953 <p>Minimal spanning tree.</p> |
|
1954 <dl class="fields"> |
|
1955 <dt>Parameters:</dt> |
|
1956 <dd><ul class="nomargin-top"> |
|
1957 <li><strong class="pname"><code>root</code></strong> (node) - Optional root node (will explore only root's connected component)</li> |
|
1958 </ul></dd> |
|
1959 <dt>Returns: list</dt> |
|
1960 <dd>Generated spanning tree.</dd> |
|
1961 </dl> |
|
1962 <div class="fields"> <p><strong>Attention:</strong> |
|
1963 Minimal spanning tree meaningful only for weighted graphs. |
|
1964 </p> |
|
1965 </div></td></tr></table> |
|
1966 </div> |
|
1967 <a name="mutual_accessibility"></a> |
|
1968 <div> |
|
1969 <table class="details" border="1" cellpadding="3" |
|
1970 cellspacing="0" width="100%" bgcolor="white"> |
|
1971 <tr><td> |
|
1972 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1973 <tr valign="top"><td> |
|
1974 <h3 class="epydoc"><span class="sig"><span class="sig-name">mutual_accessibility</span>(<span class="sig-arg">self</span>)</span> |
|
1975 </h3> |
|
1976 </td><td align="right" valign="top" |
|
1977 > |
|
1978 </td> |
|
1979 </tr></table> |
|
1980 |
|
1981 <p>Mutual-accessibility matrix (strongly connected components).</p> |
|
1982 <dl class="fields"> |
|
1983 <dt>Returns: list</dt> |
|
1984 <dd>Mutual-accessibility information for each node.</dd> |
|
1985 </dl> |
|
1986 </td></tr></table> |
|
1987 </div> |
|
1988 <a name="shortest_path"></a> |
|
1989 <div> |
|
1990 <table class="details" border="1" cellpadding="3" |
|
1991 cellspacing="0" width="100%" bgcolor="white"> |
|
1992 <tr><td> |
|
1993 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
1994 <tr valign="top"><td> |
|
1995 <h3 class="epydoc"><span class="sig"><span class="sig-name">shortest_path</span>(<span class="sig-arg">self</span>, |
|
1996 <span class="sig-arg">source</span>)</span> |
|
1997 </h3> |
|
1998 </td><td align="right" valign="top" |
|
1999 > |
|
2000 </td> |
|
2001 </tr></table> |
|
2002 |
|
2003 <p>Return the shortest path distance between source node and all other |
|
2004 nodes using Dijkstra's algorithm.</p> |
|
2005 <dl class="fields"> |
|
2006 <dt>Parameters:</dt> |
|
2007 <dd><ul class="nomargin-top"> |
|
2008 <li><strong class="pname"><code>source</code></strong> (node) - Node from which to start the search.</li> |
|
2009 </ul></dd> |
|
2010 <dt>Returns: tuple</dt> |
|
2011 <dd>A tuple containing two dictionaries, each keyed by target nodes. |
|
2012 <ol start="1"> |
|
2013 <li> |
|
2014 Shortest path spanning tree |
|
2015 </li> |
|
2016 <li> |
|
2017 Shortest distance from given source to each target node |
|
2018 </li> |
|
2019 </ol> |
|
2020 <p>Inaccessible target nodes do not appear in either |
|
2021 dictionary.</p></dd> |
|
2022 </dl> |
|
2023 <div class="fields"> <p><strong>Attention:</strong> |
|
2024 All weights must be nonnegative. |
|
2025 </p> |
|
2026 </div></td></tr></table> |
|
2027 </div> |
|
2028 <a name="topological_sorting"></a> |
|
2029 <div> |
|
2030 <table class="details" border="1" cellpadding="3" |
|
2031 cellspacing="0" width="100%" bgcolor="white"> |
|
2032 <tr><td> |
|
2033 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
2034 <tr valign="top"><td> |
|
2035 <h3 class="epydoc"><span class="sig"><span class="sig-name">topological_sorting</span>(<span class="sig-arg">self</span>)</span> |
|
2036 </h3> |
|
2037 </td><td align="right" valign="top" |
|
2038 > |
|
2039 </td> |
|
2040 </tr></table> |
|
2041 |
|
2042 <p>Topological sorting.</p> |
|
2043 <dl class="fields"> |
|
2044 <dt>Returns: list</dt> |
|
2045 <dd>Topological sorting for the graph.</dd> |
|
2046 </dl> |
|
2047 <div class="fields"> <p><strong>Attention:</strong> |
|
2048 Topological sorting is meaningful only for directed acyclic graphs. |
|
2049 </p> |
|
2050 </div></td></tr></table> |
|
2051 </div> |
|
2052 <br /> |
|
2053 <!-- ==================== NAVIGATION BAR ==================== --> |
|
2054 <table class="navbar" border="0" width="100%" cellpadding="0" |
|
2055 bgcolor="#a0c0ff" cellspacing="0"> |
|
2056 <tr valign="middle"> |
|
2057 <!-- Home link --> |
|
2058 <th> <a |
|
2059 href="graph-module.html">Home</a> </th> |
|
2060 |
|
2061 <!-- Tree link --> |
|
2062 <th> <a |
|
2063 href="module-tree.html">Trees</a> </th> |
|
2064 |
|
2065 <!-- Index link --> |
|
2066 <th> <a |
|
2067 href="identifier-index.html">Indices</a> </th> |
|
2068 |
|
2069 <!-- Help link --> |
|
2070 <th> <a |
|
2071 href="help.html">Help</a> </th> |
|
2072 |
|
2073 <!-- Project homepage --> |
|
2074 <th class="navbar" align="right" width="100%"> |
|
2075 <table border="0" cellpadding="0" cellspacing="0"> |
|
2076 <tr><th class="navbar" align="center" |
|
2077 ><a class="navbar" target="_top" href="http://code.google.com/p/python-graph/">python-graph</a></th> |
|
2078 </tr></table></th> |
|
2079 </tr> |
|
2080 </table> |
|
2081 <table border="0" cellpadding="0" cellspacing="0" width="100%%"> |
|
2082 <tr> |
|
2083 <td align="left" class="footer"> |
|
2084 Generated by Epydoc 3.0.1 on Mon Oct 27 20:36:37 2008 |
|
2085 </td> |
|
2086 <td align="right" class="footer"> |
|
2087 <a target="mainFrame" href="http://epydoc.sourceforge.net" |
|
2088 >http://epydoc.sourceforge.net</a> |
|
2089 </td> |
|
2090 </tr> |
|
2091 </table> |
|
2092 |
|
2093 <script type="text/javascript"> |
|
2094 <!-- |
|
2095 // Private objects are initially displayed (because if |
|
2096 // javascript is turned off then we want them to be |
|
2097 // visible); but by default, we want to hide them. So hide |
|
2098 // them unless we have a cookie that says to show them. |
|
2099 checkCookie(); |
|
2100 // --> |
|
2101 </script> |
|
2102 </body> |
|
2103 </html> |
|