1 | <HTML> |
---|
2 | <!-- |
---|
3 | -- Copyright (c) Jeremy Siek 2001 |
---|
4 | -- |
---|
5 | -- Distributed under the Boost Software License, Version 1.0. |
---|
6 | -- (See accompanying file LICENSE_1_0.txt or copy at |
---|
7 | -- http://www.boost.org/LICENSE_1_0.txt) |
---|
8 | --> |
---|
9 | <Head> |
---|
10 | <Title>Edge Mutable Graph</Title> |
---|
11 | <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" |
---|
12 | ALINK="#ff0000"> |
---|
13 | <IMG SRC="../../../boost.png" |
---|
14 | ALT="C++ Boost" width="277" height="86"> |
---|
15 | |
---|
16 | <BR Clear> |
---|
17 | |
---|
18 | |
---|
19 | <H2><A NAME="concept:EdgeMutableGraph"> |
---|
20 | Edge Mutable Graph |
---|
21 | </H2> |
---|
22 | |
---|
23 | The <I>Edge Mutable Graph</I> concept defines the interface for a |
---|
24 | graph that supports the addition and removal of edges. |
---|
25 | |
---|
26 | <H3>Refinement of</H3> |
---|
27 | |
---|
28 | <a href="./Graph.html">Graph</a> |
---|
29 | |
---|
30 | <H3>Associated Types</H3> |
---|
31 | |
---|
32 | No additional associated types. |
---|
33 | |
---|
34 | <h3>Valid Expressions</h3> |
---|
35 | |
---|
36 | <ul> |
---|
37 | |
---|
38 | <li><a name="sec:add_edge"><TT>add_edge(u, v, g)</TT></a> |
---|
39 | <b>returns</b> <TT>std::pair<edge_descriptor, bool></TT> |
---|
40 | <br><br> |
---|
41 | |
---|
42 | <b>Semantics:</b> Try to insert the edge <i>(u,v)</i> into the graph, |
---|
43 | returning the inserted edge or a parallel edge and a flag that |
---|
44 | specifies whether an edge was inserted. This operation must not |
---|
45 | invalidate vertex descriptors or vertex iterators of the graph, though |
---|
46 | it may invalidate edge descriptors or edge iterators.<br> |
---|
47 | |
---|
48 | <b>Preconditions:</b> <i>u</i> and <i>v</i> are vertices in the |
---|
49 | graph. <br> |
---|
50 | |
---|
51 | <b>Postconditions:</b> <i>(u,v)</i> is in the edge set of |
---|
52 | the graph. The returned edge descriptor will have <i>u</i> in the |
---|
53 | source position and <i>v</i> in the target position. If the graph |
---|
54 | allows parallel edges, then the returned flag is always |
---|
55 | <tt>true</tt>. If the graph does not allow parallel edges, if |
---|
56 | <i>(u,v)</i> was already in the graph then the returned flag is |
---|
57 | <tt>false</tt>. If <i>(u,v)</i> was not in the graph then the returned |
---|
58 | flag is <tt>true</tt>.<br> |
---|
59 | </li><br> |
---|
60 | |
---|
61 | <li><a name="sec:remove_edge_by_pair"><tt>remove_edge(u, v, g)</tt></a> |
---|
62 | <b>returns</b> <tt>void</tt><br><br> |
---|
63 | <b>Semantics:</b> Remove the edge <i>(u,v)</i> from the graph. If the |
---|
64 | graph allows parallel edges this removes all occurrences of <i>(u,v)</i>. <br> |
---|
65 | <b>Precondition:</b> <i>(u,v)</i> is in the edge set of the graph. <br> |
---|
66 | <b>Postcondition:</b> <i>(u,v)</i> is no longer in the edge set of the graph. <br> |
---|
67 | </li><br> |
---|
68 | |
---|
69 | <li> |
---|
70 | <a name="sec:remove_edge"><tt>remove_edge(e, g)</tt></a> |
---|
71 | <b>returns</b> <tt>void</tt><br><br> |
---|
72 | <b>Semantics:</b> Remove the edge <i>e</i> from the graph.<br> |
---|
73 | <b>Precondition:</b> <i>e</i> is an edge in the graph. <br> |
---|
74 | <b>Postcondition:</b> <i>e</i> is no longer in the edge set for <tt>g</tt>. <br> |
---|
75 | </li><br> |
---|
76 | |
---|
77 | <li> |
---|
78 | <a name="sec:clear_vertex"><tt>clear_vertex(u, g)</tt></a> |
---|
79 | <b>returns</b> <tt>void</tt><br><br> |
---|
80 | <b>Semantics:</b> Remove all edges to and from vertex <i>u</i> from the graph. <br> |
---|
81 | <b>Precondition:</b> <i>u</i> is a valid vertex descriptor of |
---|
82 | <tt>g</tt>. <br> <b>Postconditions:</b> <i>u</i> does not appear as a |
---|
83 | source or target of any edge in <tt>g</tt>. |
---|
84 | </li> |
---|
85 | |
---|
86 | </ul> |
---|
87 | |
---|
88 | |
---|
89 | <H3>Complexity guarantees</H3> |
---|
90 | |
---|
91 | <P> |
---|
92 | UNDER CONSTRUCTION |
---|
93 | |
---|
94 | <H3>See Also</H3> |
---|
95 | |
---|
96 | <a href="./graph_concepts.html">Graph concepts</a> |
---|
97 | |
---|
98 | |
---|
99 | <br> |
---|
100 | <HR> |
---|
101 | <TABLE> |
---|
102 | <TR valign=top> |
---|
103 | <TD nowrap>Copyright © 2000-2001</TD><TD> |
---|
104 | <A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>) |
---|
105 | </TD></TR></TABLE> |
---|
106 | |
---|
107 | </BODY> |
---|
108 | </HTML> |
---|