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.searching</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 Module searching |
|
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 <!-- ==================== MODULE DESCRIPTION ==================== --> |
|
57 <h1 class="epydoc">Module searching</h1><p class="nomargin-top"></p> |
|
58 <p>Search algorithms for python-graph.</p> |
|
59 |
|
60 <!-- ==================== FUNCTIONS ==================== --> |
|
61 <a name="section-Functions"></a> |
|
62 <table class="summary" border="1" cellpadding="3" |
|
63 cellspacing="0" width="100%" bgcolor="white"> |
|
64 <tr bgcolor="#70b0f0" class="table-header"> |
|
65 <td align="left" colspan="2" class="table-header"> |
|
66 <span class="table-header">Functions</span></td> |
|
67 </tr> |
|
68 <tr> |
|
69 <td width="15%" align="right" valign="top" class="summary"> |
|
70 <span class="summary-type">tuple</span> |
|
71 </td><td class="summary"> |
|
72 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
73 <tr> |
|
74 <td><span class="summary-sig"><a href="graph.searching-module.html#breadth_first_search" class="summary-sig-name">breadth_first_search</a>(<span class="summary-sig-arg">graph</span>, |
|
75 <span class="summary-sig-arg">root</span>=<span class="summary-sig-default">None</span>)</span><br /> |
|
76 Breadth-first search.</td> |
|
77 <td align="right" valign="top"> |
|
78 |
|
79 |
|
80 </td> |
|
81 </tr> |
|
82 </table> |
|
83 |
|
84 </td> |
|
85 </tr> |
|
86 <tr> |
|
87 <td width="15%" align="right" valign="top" class="summary"> |
|
88 <span class="summary-type">tuple</span> |
|
89 </td><td class="summary"> |
|
90 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
91 <tr> |
|
92 <td><span class="summary-sig"><a href="graph.searching-module.html#depth_first_search" class="summary-sig-name">depth_first_search</a>(<span class="summary-sig-arg">graph</span>, |
|
93 <span class="summary-sig-arg">root</span>=<span class="summary-sig-default">None</span>)</span><br /> |
|
94 Depth-first search.</td> |
|
95 <td align="right" valign="top"> |
|
96 |
|
97 |
|
98 </td> |
|
99 </tr> |
|
100 </table> |
|
101 |
|
102 </td> |
|
103 </tr> |
|
104 </table> |
|
105 <!-- ==================== FUNCTION DETAILS ==================== --> |
|
106 <a name="section-FunctionDetails"></a> |
|
107 <table class="details" border="1" cellpadding="3" |
|
108 cellspacing="0" width="100%" bgcolor="white"> |
|
109 <tr bgcolor="#70b0f0" class="table-header"> |
|
110 <td align="left" colspan="2" class="table-header"> |
|
111 <span class="table-header">Function Details</span></td> |
|
112 </tr> |
|
113 </table> |
|
114 <a name="breadth_first_search"></a> |
|
115 <div> |
|
116 <table class="details" border="1" cellpadding="3" |
|
117 cellspacing="0" width="100%" bgcolor="white"> |
|
118 <tr><td> |
|
119 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
120 <tr valign="top"><td> |
|
121 <h3 class="epydoc"><span class="sig"><span class="sig-name">breadth_first_search</span>(<span class="sig-arg">graph</span>, |
|
122 <span class="sig-arg">root</span>=<span class="sig-default">None</span>)</span> |
|
123 </h3> |
|
124 </td><td align="right" valign="top" |
|
125 > |
|
126 </td> |
|
127 </tr></table> |
|
128 |
|
129 <p>Breadth-first search.</p> |
|
130 <dl class="fields"> |
|
131 <dt>Parameters:</dt> |
|
132 <dd><ul class="nomargin-top"> |
|
133 <li><strong class="pname"><code>graph</code></strong> (graph) - Graph.</li> |
|
134 <li><strong class="pname"><code>root</code></strong> (node) - Optional root node (will explore only root's connected component)</li> |
|
135 </ul></dd> |
|
136 <dt>Returns: tuple</dt> |
|
137 <dd>A tuple containing a dictionary and a list. |
|
138 <ol start="1"> |
|
139 <li> |
|
140 Generated spanning tree |
|
141 </li> |
|
142 <li> |
|
143 Graph's level-based ordering |
|
144 </li> |
|
145 </ol></dd> |
|
146 </dl> |
|
147 </td></tr></table> |
|
148 </div> |
|
149 <a name="depth_first_search"></a> |
|
150 <div> |
|
151 <table class="details" border="1" cellpadding="3" |
|
152 cellspacing="0" width="100%" bgcolor="white"> |
|
153 <tr><td> |
|
154 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
155 <tr valign="top"><td> |
|
156 <h3 class="epydoc"><span class="sig"><span class="sig-name">depth_first_search</span>(<span class="sig-arg">graph</span>, |
|
157 <span class="sig-arg">root</span>=<span class="sig-default">None</span>)</span> |
|
158 </h3> |
|
159 </td><td align="right" valign="top" |
|
160 > |
|
161 </td> |
|
162 </tr></table> |
|
163 |
|
164 <p>Depth-first search.</p> |
|
165 <dl class="fields"> |
|
166 <dt>Parameters:</dt> |
|
167 <dd><ul class="nomargin-top"> |
|
168 <li><strong class="pname"><code>graph</code></strong> (graph) - Graph.</li> |
|
169 <li><strong class="pname"><code>root</code></strong> (node) - Optional root node (will explore only root's connected component)</li> |
|
170 </ul></dd> |
|
171 <dt>Returns: tuple</dt> |
|
172 <dd>A tupple containing a dictionary and two lists: |
|
173 <ol start="1"> |
|
174 <li> |
|
175 Generated spanning tree |
|
176 </li> |
|
177 <li> |
|
178 Graph's preordering |
|
179 </li> |
|
180 <li> |
|
181 Graph's postordering |
|
182 </li> |
|
183 </ol></dd> |
|
184 </dl> |
|
185 </td></tr></table> |
|
186 </div> |
|
187 <br /> |
|
188 <!-- ==================== NAVIGATION BAR ==================== --> |
|
189 <table class="navbar" border="0" width="100%" cellpadding="0" |
|
190 bgcolor="#a0c0ff" cellspacing="0"> |
|
191 <tr valign="middle"> |
|
192 <!-- Home link --> |
|
193 <th> <a |
|
194 href="graph-module.html">Home</a> </th> |
|
195 |
|
196 <!-- Tree link --> |
|
197 <th> <a |
|
198 href="module-tree.html">Trees</a> </th> |
|
199 |
|
200 <!-- Index link --> |
|
201 <th> <a |
|
202 href="identifier-index.html">Indices</a> </th> |
|
203 |
|
204 <!-- Help link --> |
|
205 <th> <a |
|
206 href="help.html">Help</a> </th> |
|
207 |
|
208 <!-- Project homepage --> |
|
209 <th class="navbar" align="right" width="100%"> |
|
210 <table border="0" cellpadding="0" cellspacing="0"> |
|
211 <tr><th class="navbar" align="center" |
|
212 ><a class="navbar" target="_top" href="http://code.google.com/p/python-graph/">python-graph</a></th> |
|
213 </tr></table></th> |
|
214 </tr> |
|
215 </table> |
|
216 <table border="0" cellpadding="0" cellspacing="0" width="100%%"> |
|
217 <tr> |
|
218 <td align="left" class="footer"> |
|
219 Generated by Epydoc 3.0.1 on Mon Oct 27 20:36:37 2008 |
|
220 </td> |
|
221 <td align="right" class="footer"> |
|
222 <a target="mainFrame" href="http://epydoc.sourceforge.net" |
|
223 >http://epydoc.sourceforge.net</a> |
|
224 </td> |
|
225 </tr> |
|
226 </table> |
|
227 |
|
228 <script type="text/javascript"> |
|
229 <!-- |
|
230 // Private objects are initially displayed (because if |
|
231 // javascript is turned off then we want them to be |
|
232 // visible); but by default, we want to hide them. So hide |
|
233 // them unless we have a cookie that says to show them. |
|
234 checkCookie(); |
|
235 // --> |
|
236 </script> |
|
237 </body> |
|
238 </html> |
|