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.generators</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 generators |
|
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 generators</h1><p class="nomargin-top"></p> |
|
58 <p>Random graph generators 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"> </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.generators-module.html#generate" class="summary-sig-name">generate</a>(<span class="summary-sig-arg">graph</span>, |
|
75 <span class="summary-sig-arg">num_nodes</span>, |
|
76 <span class="summary-sig-arg">num_edges</span>, |
|
77 <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 /> |
|
78 Add nodes and random edges to the graph.</td> |
|
79 <td align="right" valign="top"> |
|
80 |
|
81 |
|
82 </td> |
|
83 </tr> |
|
84 </table> |
|
85 |
|
86 </td> |
|
87 </tr> |
|
88 </table> |
|
89 <!-- ==================== FUNCTION DETAILS ==================== --> |
|
90 <a name="section-FunctionDetails"></a> |
|
91 <table class="details" border="1" cellpadding="3" |
|
92 cellspacing="0" width="100%" bgcolor="white"> |
|
93 <tr bgcolor="#70b0f0" class="table-header"> |
|
94 <td align="left" colspan="2" class="table-header"> |
|
95 <span class="table-header">Function Details</span></td> |
|
96 </tr> |
|
97 </table> |
|
98 <a name="generate"></a> |
|
99 <div> |
|
100 <table class="details" border="1" cellpadding="3" |
|
101 cellspacing="0" width="100%" bgcolor="white"> |
|
102 <tr><td> |
|
103 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
104 <tr valign="top"><td> |
|
105 <h3 class="epydoc"><span class="sig"><span class="sig-name">generate</span>(<span class="sig-arg">graph</span>, |
|
106 <span class="sig-arg">num_nodes</span>, |
|
107 <span class="sig-arg">num_edges</span>, |
|
108 <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> |
|
109 </h3> |
|
110 </td><td align="right" valign="top" |
|
111 > |
|
112 </td> |
|
113 </tr></table> |
|
114 |
|
115 <p>Add nodes and random edges to the graph.</p> |
|
116 <dl class="fields"> |
|
117 <dt>Parameters:</dt> |
|
118 <dd><ul class="nomargin-top"> |
|
119 <li><strong class="pname"><code>graph</code></strong> (graph) - Graph.</li> |
|
120 <li><strong class="pname"><code>num_nodes</code></strong> (number) - Number of nodes.</li> |
|
121 <li><strong class="pname"><code>num_edges</code></strong> (number) - Number of edges.</li> |
|
122 <li><strong class="pname"><code>weight_range</code></strong> (tuple) - tuple of two integers as lower and upper limits on randomly |
|
123 generated weights (uniform distribution).</li> |
|
124 </ul></dd> |
|
125 </dl> |
|
126 </td></tr></table> |
|
127 </div> |
|
128 <br /> |
|
129 <!-- ==================== NAVIGATION BAR ==================== --> |
|
130 <table class="navbar" border="0" width="100%" cellpadding="0" |
|
131 bgcolor="#a0c0ff" cellspacing="0"> |
|
132 <tr valign="middle"> |
|
133 <!-- Home link --> |
|
134 <th> <a |
|
135 href="graph-module.html">Home</a> </th> |
|
136 |
|
137 <!-- Tree link --> |
|
138 <th> <a |
|
139 href="module-tree.html">Trees</a> </th> |
|
140 |
|
141 <!-- Index link --> |
|
142 <th> <a |
|
143 href="identifier-index.html">Indices</a> </th> |
|
144 |
|
145 <!-- Help link --> |
|
146 <th> <a |
|
147 href="help.html">Help</a> </th> |
|
148 |
|
149 <!-- Project homepage --> |
|
150 <th class="navbar" align="right" width="100%"> |
|
151 <table border="0" cellpadding="0" cellspacing="0"> |
|
152 <tr><th class="navbar" align="center" |
|
153 ><a class="navbar" target="_top" href="http://code.google.com/p/python-graph/">python-graph</a></th> |
|
154 </tr></table></th> |
|
155 </tr> |
|
156 </table> |
|
157 <table border="0" cellpadding="0" cellspacing="0" width="100%%"> |
|
158 <tr> |
|
159 <td align="left" class="footer"> |
|
160 Generated by Epydoc 3.0.1 on Mon Oct 27 20:36:37 2008 |
|
161 </td> |
|
162 <td align="right" class="footer"> |
|
163 <a target="mainFrame" href="http://epydoc.sourceforge.net" |
|
164 >http://epydoc.sourceforge.net</a> |
|
165 </td> |
|
166 </tr> |
|
167 </table> |
|
168 |
|
169 <script type="text/javascript"> |
|
170 <!-- |
|
171 // Private objects are initially displayed (because if |
|
172 // javascript is turned off then we want them to be |
|
173 // visible); but by default, we want to hide them. So hide |
|
174 // them unless we have a cookie that says to show them. |
|
175 checkCookie(); |
|
176 // --> |
|
177 </script> |
|
178 </body> |
|
179 </html> |
|