2
0
mirror of https://github.com/boostorg/graph.git synced 2026-01-31 20:22:09 +00:00

changed the argument order for MutableGraph to be consistent

with the other functions.
Also added the remove_edge(e, g) and remove_edge(iter, g) functions.


[SVN r7856]
This commit is contained in:
Jeremy Siek
2000-09-27 18:19:35 +00:00
parent e80dc97c43
commit 9245287c65
40 changed files with 730 additions and 399 deletions

View File

@@ -61,7 +61,7 @@ edges and vertices.
<table border>
<tr>
<TD><a name="sec:add-edge"><TT>add_edge(g, u, v)</TT></a></TD>
<TD><a name="sec:add-edge"><TT>add_edge(u,&nbsp;v,&nbsp;g)</TT></a></TD>
<TD>
Inserts the edge <i>(u,v)</i> into the graph.<br>
Return type: <TT>std::pair&lt;edge_descriptor, bool&gt;</TT>
@@ -69,7 +69,7 @@ Return type: <TT>std::pair&lt;edge_descriptor, bool&gt;</TT>
</tr>
<tr>
<TD><a name="sec:remove_edge"><TT>remove_edge(g,&nbsp;u,&nbsp;v)</TT></a></TD>
<TD><a name="sec:remove_edge"><TT>remove_edge(u,&nbsp;v,&nbsp;g)</TT></a></TD>
<TD>
Remove the edge <i>(u,v)</i> from the graph. If the
graph allows parallel edges this remove all occurances of
@@ -82,7 +82,7 @@ Postcondition: <i>(u,v)</i> is no longer in the edge set for
</TR>
<tr>
<TD><TT>remove_edge(g,&nbsp;e)</TT></TD>
<TD><TT>remove_edge(e,&nbsp;g)</TT></TD>
<TD>Remove the edge <i>e</i> from the graph.<br>
Return type: <TT>void</TT><><br>
Precondition: <i>e</i> is an edge in the graph.<br>
@@ -100,7 +100,7 @@ Return type: <TT>vertex_descriptor</TT>
</TR>
<tr>
<TD><TT>clear_vertex(g,&nbsp;u)</TT></TD>
<TD><TT>clear_vertex(u,&nbsp;g)</TT></TD>
<TD>
Remove all edges to and from vertex <tt>u</tt> from the graph.<br>
Return type: <TT>void</TT><br>
@@ -111,7 +111,7 @@ any edge in <TT>g</TT>.
</TR>
<tr>
<TD><a name="sec:remove-vertex"><TT>remove_vertex(g,&nbsp;u)</TT></a></TD>
<TD><a name="sec:remove-vertex"><TT>remove_vertex(u,&nbsp;g)</TT></a></TD>
<TD>
Remove <i>u</i> from the vertex set of the graph. Note that undefined
behaviour may result if there are edges remaining in the graph who's
@@ -165,16 +165,18 @@ is no longer a valid vertex descriptor.
typedef typename boost::graph_traits&lt;G&gt;::edge_descriptor edge_descriptor;
void constraints() {
v = add_vertex(g);
clear_vertex(g, v);
remove_vertex(g, v);
p = add_edge(g, u, v);
remove_edge(g, u, v);
remove_edge(g, e);
clear_vertex(v, g);
remove_vertex(v, g);
p = add_edge(u, v, g);
remove_edge(u, v, g);
remove_edge(e, g);
remove_edge(iter, g);
}
G g;
edge_descriptor e;
std::pair&lt;edge_descriptor, bool&gt; p;
typename boost::graph_traits&lt;G&gt;::vertex_descriptor u, v;
typename boost::graph_traits&lt;G&gt;::out_edge_iterator iter;
};
</PRE>