296 lines
24 KiB
HTML
296 lines
24 KiB
HTML
|
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html><head><title>Python: module geosolver.graph</title>
|
|
</head><body bgcolor="#f0f0f8">
|
|
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
|
<tr bgcolor="#7799ee">
|
|
<td valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="geosolver.html"><font color="#ffffff">geosolver</font></a>.graph</strong></big></big></font></td
|
|
><td align=right valign=bottom
|
|
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/rick/Programming/Python/GeoSolver/geosolver/graph.py">/home/rick/Programming/Python/GeoSolver/geosolver/graph.py</a></font></td></tr></table>
|
|
<p><tt><a href="#Graph">Graph</a> data structures and algorithms. <br>
|
|
After Guido van Rossums essay on graphs in python<br>
|
|
(<a href="http://www.python.org/doc/essays/graphs.html">http://www.python.org/doc/essays/graphs.html</a>).<br>
|
|
and Julien Burdy's sourceforge python graph project. <br>
|
|
(<a href="http://sourceforge.net/projects/pygraphlib/">http://sourceforge.net/projects/pygraphlib/</a>)<br>
|
|
<br>
|
|
A graph is typically represented as G=(V,E) where<br>
|
|
V are vertices and E are edges. <br>
|
|
All vertices in a graph are uniquely, i.e. have unique id's. <br>
|
|
Edges are directed edges and are identified by an ordered <br>
|
|
pair of vertices (v1,v2). All edges are unique, i.e. are unique ordered pairs. <br>
|
|
Associated with each edge is a value.<br>
|
|
<br>
|
|
A graph is implemented as a dictionary of which the keys are vertices. <br>
|
|
Associated with each vertex is (again) a dictionairy of which the keys are <br>
|
|
the vertices to which there is an edge. Associated with each edge is a value. <br>
|
|
(A graph is implemented as a dictionairy of dictionairies). <br>
|
|
<br>
|
|
The add_* and rem_* methods ensure that the graph contains no edges<br>
|
|
to vertices that are not in main dictionary (anymore). <br>
|
|
<br>
|
|
The reverse of the graph is also sored and kept up to date, for fast<br>
|
|
determination of incoming edges and other algorithms.<br>
|
|
<br>
|
|
Also dictionaries are kept mapping vertices to fan-in and fanout numbers, and<br>
|
|
mapping numbers to vertices with that fan-in/out number. This allows us to <br>
|
|
quickly find sources, sinks, etc.<br>
|
|
<br>
|
|
Copyright Rick van der Meiden - 2003, 2004, 2005</tt></p>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#aa55cc">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
|
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="random.html">random</a><br>
|
|
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ee77aa">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl>
|
|
<dt><font face="helvetica, arial"><a href="geosolver.notify.html#Notifier">geosolver.notify.Notifier</a>
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="geosolver.graph.html#Graph">Graph</a>
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="geosolver.graph.html#FanGraph">FanGraph</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
</dl>
|
|
</dd>
|
|
</dl>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="FanGraph">class <strong>FanGraph</strong></a>(<a href="geosolver.graph.html#Graph">Graph</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A graph with updated fan-in and fan-out numbers<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="geosolver.graph.html#FanGraph">FanGraph</a></dd>
|
|
<dd><a href="geosolver.graph.html#Graph">Graph</a></dd>
|
|
<dd><a href="geosolver.notify.html#Notifier">geosolver.notify.Notifier</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="FanGraph-__init__"><strong>__init__</strong></a>(self, graph<font color="#909090">=None</font>)</dt></dl>
|
|
|
|
<dl><dt><a name="FanGraph-add_edge"><strong>add_edge</strong></a>(self, v1, v2, value<font color="#909090">=1</font>)</dt><dd><tt>Add edge from v1 to v2 with optional value.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-add_vertex"><strong>add_vertex</strong></a>(self, v)</dt><dd><tt>Add vertex to graph if not already.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-fanin"><strong>fanin</strong></a>(self, v)</dt><dd><tt>return fan-in number (number of in-going edges)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-fanin_numbers"><strong>fanin_numbers</strong></a>(self)</dt><dd><tt>the set of fan-in numbers, <br>
|
|
i.e. the union of the fan-in numbers of all veretices</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-fanout"><strong>fanout</strong></a>(self, v)</dt><dd><tt>return fan-out number (number of out-going edges)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-fanout_numbers"><strong>fanout_numbers</strong></a>(self)</dt><dd><tt>the set of fan-out numbers, <br>
|
|
i.e. the union of the fan-out numbers of all veretices</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-infan"><strong>infan</strong></a>(self, number)</dt><dd><tt>return a list of vertices with given fan-in number</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-leafs"><strong>leafs</strong></a>(self)</dt><dd><tt>return a list of vertices with zero fan-out</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-outfan"><strong>outfan</strong></a>(self, number)</dt><dd><tt>return a list of vertices with given fan-out number</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-rem_edge"><strong>rem_edge</strong></a>(self, v1, v2)</dt><dd><tt>Remove edge.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-rem_vertex"><strong>rem_vertex</strong></a>(self, v)</dt><dd><tt>Remove vertex and incident edges.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-roots"><strong>roots</strong></a>(self)</dt><dd><tt>return a list of vertices with zero fan-in</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-singular"><strong>singular</strong></a>(self, number)</dt><dd><tt>return a list of vertices with no fan-in and no fan-out</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-subgraph"><strong>subgraph</strong></a>(self, vertices)</dt><dd><tt>Derive subgraph containing specified vertices and enclosed edges.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="geosolver.graph.html#Graph">Graph</a>:<br>
|
|
<dl><dt><a name="FanGraph-__str__"><strong>__str__</strong></a>(self)</dt><dd><tt>Create a string representation, using str() for each element</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-add_bi"><strong>add_bi</strong></a>(self, v1, v2, value<font color="#909090">=1</font>)</dt><dd><tt>Add edges bi-directinally with optional value.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-add_graph"><strong>add_graph</strong></a>(self, graph)</dt><dd><tt>Add all vertices and edges of given graph, and set edge values from given graph too.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-adjacent_edges"><strong>adjacent_edges</strong></a>(self, vertex)</dt><dd><tt>return list of outgoing and outgoing edges</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-adjacent_vertices"><strong>adjacent_vertices</strong></a>(self, v)</dt><dd><tt>list of adjacent (ingoing or outgoing) vertices</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-connected"><strong>connected</strong></a>(self, v)</dt><dd><tt>return vertices X connected to v by following edges ajdajecnt to v or X<br>
|
|
(v is not in the result)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-connected_ingoing"><strong>connected_ingoing</strong></a>(self, v)</dt><dd><tt>return vertices X connected to v by following only ingoing edges to v or X (v is not in the result)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-connected_outgoing"><strong>connected_outgoing</strong></a>(self, v)</dt><dd><tt>return vertices X connected from v by following only outgoing edges from v or X <br>
|
|
(v is not in the result)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-connected_subsets"><strong>connected_subsets</strong></a>(self)</dt><dd><tt>returns a set of (undirectionally) connected subsets of vertices</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-copy"><strong>copy</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="FanGraph-edges"><strong>edges</strong></a>(self)</dt><dd><tt>List edges</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-get"><strong>get</strong></a>(self, v1, v2)</dt><dd><tt>Get value of edge (v1,v2).</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-has_bi"><strong>has_bi</strong></a>(self, v1, v2)</dt><dd><tt>True if both edges (v1,v2) and (v2,v1) are in this graph.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-has_edge"><strong>has_edge</strong></a>(self, v1, v2)</dt><dd><tt>True if there is a directed edge (v1,v2) in this graph.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-has_one"><strong>has_one</strong></a>(self, v1, v2)</dt><dd><tt>True if either edge (v1,v2) or (v2,v1) is in this graph.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-has_vertex"><strong>has_vertex</strong></a>(self, v)</dt><dd><tt>True if v a vertex of this graph.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-ingoing_edges"><strong>ingoing_edges</strong></a>(self, vertex)</dt><dd><tt>return list of incoming edges</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-ingoing_vertices"><strong>ingoing_vertices</strong></a>(self, vertex)</dt><dd><tt>return list of vertices from which edge goes to given vertex</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-mincut"><strong>mincut</strong></a>(self)</dt><dd><tt>Returns a minimum cut of the graph. <br>
|
|
Implements the Stoer/Wagner algorithm. The graph is interpreted <br>
|
|
as a undirected graph, by adding the weights of co-edges. <br>
|
|
Returns (value, edges, g1, g2) <br>
|
|
where value is the weight of the cut, <br>
|
|
edges is the set of cut edges, <br>
|
|
g1 and g2 are disjoint sets of vertices.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-outgoing_edges"><strong>outgoing_edges</strong></a>(self, vertex)</dt><dd><tt>return list of outgoing edges</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-outgoing_vertices"><strong>outgoing_vertices</strong></a>(self, vertex)</dt><dd><tt>return list of vertices to which edge goes from given vertex</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-path"><strong>path</strong></a>(self, start, end)</dt><dd><tt>return an arbitrary path (list of vertices) from start to end. <br>
|
|
If start equal to end, then return a cycle. <br>
|
|
If no path, then return empty list.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-rem_bi"><strong>rem_bi</strong></a>(self, v1, v2)</dt><dd><tt>Remove edges bi-directionally.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-reverse"><strong>reverse</strong></a>(self)</dt><dd><tt>return a reverse graph</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-set"><strong>set</strong></a>(self, v1, v2, value)</dt><dd><tt>Set value of edge (v1,v2) and add edge if it doesn't exist</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-set_bi"><strong>set_bi</strong></a>(self, v1, v2, value)</dt><dd><tt>Set value of edges (v1,v2) and (v2,v1).</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-vertices"><strong>vertices</strong></a>(self)</dt><dd><tt>List vertices</tt></dd></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="geosolver.notify.html#Notifier">geosolver.notify.Notifier</a>:<br>
|
|
<dl><dt><a name="FanGraph-add_listener"><strong>add_listener</strong></a>(self, listener)</dt><dd><tt>add a listener to the list (and self to listers' list)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-rem_listener"><strong>rem_listener</strong></a>(self, listener)</dt><dd><tt>remove a listener from the list (and self from listers' list)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="FanGraph-send_notify"><strong>send_notify</strong></a>(self, message)</dt><dd><tt>send a message to all listeners</tt></dd></dl>
|
|
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Graph">class <strong>Graph</strong></a>(<a href="geosolver.notify.html#Notifier">geosolver.notify.Notifier</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A weighted directed graph<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="Graph-__init__"><strong>__init__</strong></a>(self, graph<font color="#909090">=None</font>)</dt></dl>
|
|
|
|
<dl><dt><a name="Graph-__str__"><strong>__str__</strong></a>(self)</dt><dd><tt>Create a string representation, using str() for each element</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-add_bi"><strong>add_bi</strong></a>(self, v1, v2, value<font color="#909090">=1</font>)</dt><dd><tt>Add edges bi-directinally with optional value.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-add_edge"><strong>add_edge</strong></a>(self, v1, v2, value<font color="#909090">=1</font>)</dt><dd><tt>Add edge from v1 to v2 with optional value.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-add_graph"><strong>add_graph</strong></a>(self, graph)</dt><dd><tt>Add all vertices and edges of given graph, and set edge values from given graph too.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-add_vertex"><strong>add_vertex</strong></a>(self, v)</dt><dd><tt>Add vertex to graph if not already.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-adjacent_edges"><strong>adjacent_edges</strong></a>(self, vertex)</dt><dd><tt>return list of outgoing and outgoing edges</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-adjacent_vertices"><strong>adjacent_vertices</strong></a>(self, v)</dt><dd><tt>list of adjacent (ingoing or outgoing) vertices</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-connected"><strong>connected</strong></a>(self, v)</dt><dd><tt>return vertices X connected to v by following edges ajdajecnt to v or X<br>
|
|
(v is not in the result)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-connected_ingoing"><strong>connected_ingoing</strong></a>(self, v)</dt><dd><tt>return vertices X connected to v by following only ingoing edges to v or X (v is not in the result)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-connected_outgoing"><strong>connected_outgoing</strong></a>(self, v)</dt><dd><tt>return vertices X connected from v by following only outgoing edges from v or X <br>
|
|
(v is not in the result)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-connected_subsets"><strong>connected_subsets</strong></a>(self)</dt><dd><tt>returns a set of (undirectionally) connected subsets of vertices</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-copy"><strong>copy</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Graph-edges"><strong>edges</strong></a>(self)</dt><dd><tt>List edges</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-get"><strong>get</strong></a>(self, v1, v2)</dt><dd><tt>Get value of edge (v1,v2).</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-has_bi"><strong>has_bi</strong></a>(self, v1, v2)</dt><dd><tt>True if both edges (v1,v2) and (v2,v1) are in this graph.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-has_edge"><strong>has_edge</strong></a>(self, v1, v2)</dt><dd><tt>True if there is a directed edge (v1,v2) in this graph.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-has_one"><strong>has_one</strong></a>(self, v1, v2)</dt><dd><tt>True if either edge (v1,v2) or (v2,v1) is in this graph.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-has_vertex"><strong>has_vertex</strong></a>(self, v)</dt><dd><tt>True if v a vertex of this graph.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-ingoing_edges"><strong>ingoing_edges</strong></a>(self, vertex)</dt><dd><tt>return list of incoming edges</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-ingoing_vertices"><strong>ingoing_vertices</strong></a>(self, vertex)</dt><dd><tt>return list of vertices from which edge goes to given vertex</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-mincut"><strong>mincut</strong></a>(self)</dt><dd><tt>Returns a minimum cut of the graph. <br>
|
|
Implements the Stoer/Wagner algorithm. The graph is interpreted <br>
|
|
as a undirected graph, by adding the weights of co-edges. <br>
|
|
Returns (value, edges, g1, g2) <br>
|
|
where value is the weight of the cut, <br>
|
|
edges is the set of cut edges, <br>
|
|
g1 and g2 are disjoint sets of vertices.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-outgoing_edges"><strong>outgoing_edges</strong></a>(self, vertex)</dt><dd><tt>return list of outgoing edges</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-outgoing_vertices"><strong>outgoing_vertices</strong></a>(self, vertex)</dt><dd><tt>return list of vertices to which edge goes from given vertex</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-path"><strong>path</strong></a>(self, start, end)</dt><dd><tt>return an arbitrary path (list of vertices) from start to end. <br>
|
|
If start equal to end, then return a cycle. <br>
|
|
If no path, then return empty list.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-rem_bi"><strong>rem_bi</strong></a>(self, v1, v2)</dt><dd><tt>Remove edges bi-directionally.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-rem_edge"><strong>rem_edge</strong></a>(self, v1, v2)</dt><dd><tt>Remove edge.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-rem_vertex"><strong>rem_vertex</strong></a>(self, v)</dt><dd><tt>Remove vertex and incident edges.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-reverse"><strong>reverse</strong></a>(self)</dt><dd><tt>return a reverse graph</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-set"><strong>set</strong></a>(self, v1, v2, value)</dt><dd><tt>Set value of edge (v1,v2) and add edge if it doesn't exist</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-set_bi"><strong>set_bi</strong></a>(self, v1, v2, value)</dt><dd><tt>Set value of edges (v1,v2) and (v2,v1).</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-subgraph"><strong>subgraph</strong></a>(self, vertices)</dt><dd><tt>Derive subgraph containing specified vertices and enclosed edges.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-vertices"><strong>vertices</strong></a>(self)</dt><dd><tt>List vertices</tt></dd></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="geosolver.notify.html#Notifier">geosolver.notify.Notifier</a>:<br>
|
|
<dl><dt><a name="Graph-add_listener"><strong>add_listener</strong></a>(self, listener)</dt><dd><tt>add a listener to the list (and self to listers' list)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-rem_listener"><strong>rem_listener</strong></a>(self, listener)</dt><dd><tt>remove a listener from the list (and self from listers' list)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Graph-send_notify"><strong>send_notify</strong></a>(self, message)</dt><dd><tt>send a message to all listeners</tt></dd></dl>
|
|
|
|
</td></tr></table></td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#eeaa77">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt><a name="-complete_graph"><strong>complete_graph</strong></a>(nvertices, monocycles<font color="#909090">=False</font>, basename<font color="#909090">='v'</font>)</dt></dl>
|
|
<dl><dt><a name="-random_graph"><strong>random_graph</strong></a>(vertices, edges, bidirectional<font color="#909090">=False</font>, basename<font color="#909090">='v'</font>)</dt><dd><tt>generate a random graph with given number of<br>
|
|
vertices and edges</tt></dd></dl>
|
|
</td></tr></table>
|
|
</body></html> |