bc_clustering.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <!--
  3. Copyright (c) 2004 Trustees of Indiana University
  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. <html>
  9. <head>
  10. <meta name="generator" content=
  11. "HTML Tidy for Mac OS X (vers 12 April 2005), see www.w3.org">
  12. <meta http-equiv="Content-Type" content=
  13. "text/html; charset=us-ascii">
  14. <title>Function betweenness_centrality_clustering</title>
  15. </head>
  16. <body>
  17. <div class="titlepage"></div>
  18. <div class="refnamediv">
  19. <IMG SRC="../../../boost.png"
  20. ALT="C++ Boost" width="277" height="86">
  21. <h1><img src="figs/python.gif" alt="(Python)"/><span class="refentrytitle">Function
  22. betweenness_centrality_clustering</span></h1>
  23. <p>boost::betweenness_centrality_clustering &mdash; Graph
  24. clustering based on edge betweenness centrality.</p>
  25. </div>
  26. <h2 xmlns:rev=
  27. "http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class=
  28. "refsynopsisdiv-title">Synopsis</h2>
  29. <div xmlns:rev=
  30. "http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class=
  31. "refsynopsisdiv">
  32. <pre class="synopsis">
  33. <span class="bold"><b>template</b></span>&lt;<span class=
  34. "bold"><b>typename</b></span> MutableGraph, <span class=
  35. "bold"><b>typename</b></span> Done, <span class=
  36. "bold"><b>typename</b></span> EdgeCentralityMap,
  37. <span class=
  38. "bold"><b>typename</b></span> VertexIndexMap&gt;
  39. <span class="type"><span class=
  40. "bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph &amp; g, Done done,
  41. EdgeCentralityMap edge_centrality,
  42. VertexIndexMap vertex_index);
  43. <span class="bold"><b>template</b></span>&lt;<span class=
  44. "bold"><b>typename</b></span> MutableGraph, <span class=
  45. "bold"><b>typename</b></span> Done, <span class=
  46. "bold"><b>typename</b></span> EdgeCentralityMap&gt;
  47. <span class="type"><span class=
  48. "bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph &amp; g, Done done,
  49. EdgeCentralityMap edge_centrality);
  50. <span class="bold"><b>template</b></span>&lt;<span class=
  51. "bold"><b>typename</b></span> MutableGraph, <span class=
  52. "bold"><b>typename</b></span> Done&gt;
  53. <span class="type"><span class=
  54. "bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph &amp; g, Done done);
  55. </pre></div>
  56. <div class="refsect1" lang="en"><a name="id822306" id=
  57. "id822306"></a>
  58. <h2>Description</h2>
  59. <p>This algorithm implements graph clustering based on edge
  60. betweenness centrality. It is an iterative algorithm, where in each
  61. step it computes the edge betweenness centrality (via <a href=
  62. "betweenness_centrality.html">brandes_betweenness_centrality</a>) and
  63. removes the edge with the maximum betweenness centrality. The
  64. <tt class="computeroutput">done</tt> function object determines
  65. when the algorithm terminates (the edge found when the algorithm
  66. terminates will not be removed).</p>
  67. <h2>Parameters</h2>
  68. IN: <tt>const Graph&amp; g</tt>
  69. <blockquote>
  70. The graph object on which the algorithm will be applied. The type
  71. <tt>Graph</tt> must be a model of <a
  72. href="VertexListGraph.html">Vertex List Graph</a> and <a
  73. href="IncidenceGraph.html">Incidence Graph</a>. When an edge
  74. centrality map is supplied, it must also model <a
  75. href="EdgeListGraph.html">Edge List Graph</a> and <a
  76. href="MutableGraph.html">MutableGraph</a>.<br>
  77. <b>Python</b>: The parameter is named <tt>graph</tt>.
  78. </blockquote>
  79. IN: <tt>Done done</tt>
  80. <blockquote>
  81. The function object that indicates termination of the algorithm.
  82. It must be a ternary function object thats accepts the maximum
  83. centrality, the descriptor of the edge that will be removed, and
  84. the graph <tt class="computeroutput">g</tt>.<br>
  85. <b>Python</b>: Any callable Python object will suffice.
  86. </blockquote>
  87. OUT/UTIL: <tt>EdgeCentralityMap edge_centrality_map</tt>
  88. <blockquote>
  89. This property map is used to accumulate the betweenness centrality
  90. of each edge, and is a secondary form of output for the
  91. algorithm. The type <tt>EdgeCentralityMap</tt> must be a model of <a
  92. href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
  93. Property Map</a>, with the graph's edge descriptor type as its key
  94. type. The value type of this property map should be the same as the
  95. value type of the <tt>CentralityMap</tt> property map.<br>
  96. <b>Default:</b> a <tt>dummy_property_map</tt>, which requires no
  97. work to compute and returns no answer.<br>
  98. <b>Python</b>: The color map must be a <tt>edge_double_map</tt> for
  99. the graph.<br>
  100. <b>Python default</b>: <tt>graph.get_edge_double_map("centrality")</tt>
  101. </blockquote>
  102. IN: <tt>VertexIndexMap vertex_index</tt>
  103. <blockquote>
  104. This maps each vertex to an integer in the range <tt>[0,
  105. num_vertices(g))</tt>. This is necessary for efficient updates of the
  106. heap data structure when an edge is relaxed. The type
  107. <tt>VertexIndexMap</tt> must be a model of
  108. <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
  109. integer type. The vertex descriptor type of the graph needs to be
  110. usable as the key type of the map.<br>
  111. <b>Default:</b> <tt>get(vertex_index, g)</tt>.
  112. Note: if you use this default, make sure your graph has
  113. an internal <tt>vertex_index</tt> property. For example,
  114. <tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
  115. not have an internal <tt>vertex_index</tt> property.<br>
  116. <b>Python</b>: Unsupported parameter.
  117. </blockquote>
  118. <table xmlns:rev=
  119. "http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width=
  120. "100%">
  121. <tr>
  122. <td align="left"></td>
  123. <td align="right"></td>
  124. </tr>
  125. </table>
  126. <h3>Where Defined</h3>
  127. &lt;<a href=
  128. "../../../boost/graph/bc_clustering.hpp">boost/graph/bc_clustering.hpp</a>&gt;
  129. <hr>
  130. <table>
  131. <tr valign="top">
  132. <td nowrap>Copyright &copy; 2004</td>
  133. <td><a href="http://www.boost.org/people/doug_gregor.html">Douglas Gregor</a>,
  134. Indiana University (dgregor@cs.indiana.edu)<br>
  135. <a href="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</a>, Indiana
  136. University (<a href=
  137. "mailto:lums@osl.iu.edu">lums@osl.iu.edu</a>)</td>
  138. </tr>
  139. </table>
  140. </body>
  141. </html>