EdgeMutableGraph.html 3.2 KB

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