make_biconnected_planar.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <HTML>
  2. <!-- Copyright 2007 Aaron Windsor
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt)
  6. -->
  7. <Head>
  8. <Title>Boost Graph Library: make_biconnected_planar</Title>
  9. <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
  10. ALINK="#ff0000">
  11. <IMG SRC="../../../boost.png"
  12. ALT="C++ Boost" width="277" height="86">
  13. <BR Clear>
  14. <H1><tt>make_biconnected_planar</tt></H1>
  15. <p>
  16. <pre>
  17. template &lt;typename Graph, typename PlanarEmbedding, typename EdgeIndexMap, typename AddEdgeVisitor&gt;
  18. void make_biconnected_planar(Graph& g, PlanarEmbedding embedding, EdgeIndexMap em, AddEdgeVisitor& vis);
  19. </pre>
  20. <p>
  21. A graph <i>G</i> is biconnected if, for every pair of vertices <i>u,v</i> in
  22. <i>G</i>, there is a cycle containing both <i>u</i> and <i>v</i>.
  23. Alternatively, a graph is biconnected if it is connected and cannot be made
  24. disconnected by removing any single vertex. <tt>make_biconnected_planar</tt>
  25. takes a <a href="./make_connected.html">connected</a>
  26. <a href="planar_graphs.html">planar</a> graph <tt>g</tt> as input and adds zero
  27. or more edges to make <tt>g</tt> biconnected while preserving planarity.
  28. <p>
  29. The default behavior of <tt>make_biconnected_planar</tt> is to modify the
  30. graph <tt>g</tt> by calling <tt>add_edge(u,v,g)</tt> for every pair of
  31. vertices <i>(u,v)</i> where an edge needs to be added to make <tt>g</tt>
  32. biconnected. This behavior can be overriden by providing a vistor as the
  33. <tt>AddEdgeVisitor</tt> parameter. The only requirement for an
  34. <tt>AddEdgeVisitor</tt> is that it define a member function with the
  35. following signature:
  36. <pre>
  37. template &lt;typename Graph, typename Vertex&gt;
  38. void visit_vertex_pair(Vertex u, Vertex v, Graph& g);
  39. </pre>
  40. This event point can also be used as a hook to update the underlying edge
  41. index map automatically as edges are added. See the
  42. documentation for the <a href="./AddEdgeVisitor.html">AddEdgeVisitor</a>
  43. concept for more information.
  44. <H3>Where Defined</H3>
  45. <P>
  46. <a href="../../../boost/graph/make_biconnected_planar.hpp">
  47. <TT>boost/graph/make_biconnected_planar.hpp</TT>
  48. </a>
  49. <h3>Parameters</h3>
  50. IN/OUT: <tt>Graph&amp; g</tt>
  51. <blockquote>
  52. An undirected graph. The graph type must be a model of <a
  53. href="VertexListGraph.html">Vertex List Graph</a>, <a
  54. href="IncidenceGraph.html">Incidence Graph</a>, and
  55. a <a href="MutableGraph.html">Mutable Graph</a><br>
  56. </blockquote>
  57. IN: <tt>PlanarEmbedding embedding</tt>
  58. <blockquote>
  59. A model of <a href="PlanarEmbedding.html">PlanarEmbedding</a>.
  60. </blockquote>
  61. IN: <tt>EdgeIndexMap vm</tt>
  62. <blockquote>
  63. A <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map
  64. </a> that maps edges from <tt>g</tt> to distinct integers in the range
  65. <tt>[0, num_edges(g) )</tt><br>
  66. <b>Default</b>: <tt>get(edge_index,g)</tt><br>
  67. </blockquote>
  68. IN: <tt>AddEdgeVisitor</tt>
  69. <blockquote>
  70. A model of <a href="AddEdgeVisitor.html">AddEdgeVisitor
  71. </a>.<br>
  72. <b>Default</b>: <tt>default_add_edge_visitor</tt>, a class defines
  73. <tt>visit_vertex_pair</tt> to dispatch its calls to <tt>add_edge</tt>.
  74. </blockquote>
  75. <h3>Complexity</h3>
  76. On a planar graph with <i>n</i> vertices, <tt>make_biconnected_planar</tt>
  77. runs in time <i>O(n)</i>
  78. <H3>Example</H3>
  79. <P>
  80. <a href="../example/make_biconnected_planar.cpp">
  81. <TT>examples/make_biconnected_planar.cpp</TT>
  82. </a>
  83. <h3>See Also</h3>
  84. <a href="planar_graphs.html">Planar Graphs in the Boost Graph Library</a>
  85. <br>
  86. <HR>
  87. Copyright &copy; 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
  88. aaron.windsor@gmail.com</a>)
  89. </BODY>
  90. </HTML>