<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://programmingexamples.net/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://programmingexamples.net/w/index.php?action=history&amp;feed=atom&amp;title=Boost%2FBGL%2FBetweennessCentralityClustering</id>
		<title>Boost/BGL/BetweennessCentralityClustering - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://programmingexamples.net/w/index.php?action=history&amp;feed=atom&amp;title=Boost%2FBGL%2FBetweennessCentralityClustering"/>
		<link rel="alternate" type="text/html" href="http://programmingexamples.net/w/index.php?title=Boost/BGL/BetweennessCentralityClustering&amp;action=history"/>
		<updated>2026-06-13T12:11:05Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.5</generator>

	<entry>
		<id>http://programmingexamples.net/w/index.php?title=Boost/BGL/BetweennessCentralityClustering&amp;diff=5083&amp;oldid=prev</id>
		<title>Daviddoria: Cleaner using lexical_cast</title>
		<link rel="alternate" type="text/html" href="http://programmingexamples.net/w/index.php?title=Boost/BGL/BetweennessCentralityClustering&amp;diff=5083&amp;oldid=prev"/>
				<updated>2011-11-18T21:06:54Z</updated>
		
		<summary type="html">&lt;p&gt;Cleaner using lexical_cast&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:06, 18 November 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 43:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 43:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; // Convert the input argument to a double&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; // Convert the input argument to a double&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;std&lt;/del&gt;::&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;stringstream ss;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;double max_centrality = boost&lt;/ins&gt;::&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;lexical_cast&lt;/ins&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;double&amp;gt;(&lt;/ins&gt;argv[1]&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;)&lt;/ins&gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; ss &amp;lt;&lt;/del&gt;&amp;lt; argv[1]&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; double max_centrality;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; ss &amp;gt;&amp;gt; max_centrality&lt;/del&gt;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; // Create a star graph&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; // Create a star graph&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Daviddoria</name></author>	</entry>

	<entry>
		<id>http://programmingexamples.net/w/index.php?title=Boost/BGL/BetweennessCentralityClustering&amp;diff=5065&amp;oldid=prev</id>
		<title>Daviddoria: moved CPP/Boost/BGL/BetweennessCentralityClustering to Boost/BGL/BetweennessCentralityClustering</title>
		<link rel="alternate" type="text/html" href="http://programmingexamples.net/w/index.php?title=Boost/BGL/BetweennessCentralityClustering&amp;diff=5065&amp;oldid=prev"/>
				<updated>2011-11-16T12:52:52Z</updated>
		
		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/wiki/CPP/Boost/BGL/BetweennessCentralityClustering&quot; class=&quot;mw-redirect&quot; title=&quot;CPP/Boost/BGL/BetweennessCentralityClustering&quot;&gt;CPP/Boost/BGL/BetweennessCentralityClustering&lt;/a&gt; to &lt;a href=&quot;/wiki/Boost/BGL/BetweennessCentralityClustering&quot; title=&quot;Boost/BGL/BetweennessCentralityClustering&quot;&gt;Boost/BGL/BetweennessCentralityClustering&lt;/a&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 12:52, 16 November 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Daviddoria</name></author>	</entry>

	<entry>
		<id>http://programmingexamples.net/w/index.php?title=Boost/BGL/BetweennessCentralityClustering&amp;diff=4544&amp;oldid=prev</id>
		<title>Daviddoria at 21:18, 14 June 2011</title>
		<link rel="alternate" type="text/html" href="http://programmingexamples.net/w/index.php?title=Boost/BGL/BetweennessCentralityClustering&amp;diff=4544&amp;oldid=prev"/>
				<updated>2011-06-14T21:18:19Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:18, 14 June 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==BetweennessCentralityClustering.cpp==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==BetweennessCentralityClustering.cpp==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/*&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; * In the included example, the max centrality of the graph is 14. So specifying&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; * the required input argument 14 gives the &amp;quot;first&amp;quot; decomposition of the graph.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; * That is, removal of one edge (with the maximal edge centrality). Specifying a value&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; * greater than 14 yields no decomposition.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; */&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#include &amp;lt;string&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#include &amp;lt;string&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#include &amp;lt;iostream&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#include &amp;lt;iostream&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Daviddoria</name></author>	</entry>

	<entry>
		<id>http://programmingexamples.net/w/index.php?title=Boost/BGL/BetweennessCentralityClustering&amp;diff=4543&amp;oldid=prev</id>
		<title>Daviddoria: Created page with ' ==BetweennessCentralityClustering.cpp== &lt;source lang=&quot;cpp&quot;&gt; #include &lt;string&gt; #include &lt;iostream&gt; #include &lt;fstream&gt; #include &lt;sstream&gt;  #include &lt;boost/graph/adjacency_list.hpp…'</title>
		<link rel="alternate" type="text/html" href="http://programmingexamples.net/w/index.php?title=Boost/BGL/BetweennessCentralityClustering&amp;diff=4543&amp;oldid=prev"/>
				<updated>2011-06-14T21:14:56Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039; ==BetweennessCentralityClustering.cpp== &amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt; #include &amp;lt;string&amp;gt; #include &amp;lt;iostream&amp;gt; #include &amp;lt;fstream&amp;gt; #include &amp;lt;sstream&amp;gt;  #include &amp;lt;boost/graph/adjacency_list.hpp…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
==BetweennessCentralityClustering.cpp==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;sstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;boost/graph/adjacency_list.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/graph/graphviz.hpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// For clustering&lt;br /&gt;
#include &amp;lt;boost/graph/bc_clustering.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/graph/iteration_macros.hpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Graph edge properties (bundled properties)&lt;br /&gt;
struct EdgeProperties&lt;br /&gt;
{&lt;br /&gt;
  int weight;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
typedef boost::adjacency_list&amp;lt; boost::setS, boost::vecS, boost::undirectedS, boost::no_property, EdgeProperties &amp;gt; Graph;&lt;br /&gt;
typedef Graph::vertex_descriptor Vertex;&lt;br /&gt;
typedef Graph::edge_descriptor Edge;&lt;br /&gt;
&lt;br /&gt;
void WriteGraph(const Graph&amp;amp; g, const std::string&amp;amp; filename);&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char** argv)&lt;br /&gt;
{&lt;br /&gt;
  // Verify arguments&lt;br /&gt;
  if( argc != 2 )&lt;br /&gt;
  {&lt;br /&gt;
    std::cerr &amp;lt;&amp;lt; &amp;quot;USAGE: &amp;quot; &amp;lt;&amp;lt; argv[0] &amp;lt;&amp;lt; &amp;quot; &amp;lt;Max centrality&amp;gt;&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
    return -1;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // Convert the input argument to a double&lt;br /&gt;
  std::stringstream ss;&lt;br /&gt;
  ss &amp;lt;&amp;lt; argv[1];&lt;br /&gt;
  double max_centrality;&lt;br /&gt;
  ss &amp;gt;&amp;gt; max_centrality;&lt;br /&gt;
&lt;br /&gt;
  // Create a star graph&lt;br /&gt;
  Graph g;&lt;br /&gt;
&lt;br /&gt;
  // Central vertex&lt;br /&gt;
  Vertex centerVertex = boost::add_vertex(g);&lt;br /&gt;
&lt;br /&gt;
  // Surrounding vertices&lt;br /&gt;
  Vertex v;&lt;br /&gt;
  v = boost::add_vertex(g);&lt;br /&gt;
  boost::add_edge(centerVertex, v, g);&lt;br /&gt;
  v = boost::add_vertex(g);&lt;br /&gt;
  boost::add_edge(centerVertex, v, g);&lt;br /&gt;
  v = boost::add_vertex(g);&lt;br /&gt;
  boost::add_edge(centerVertex, v, g);&lt;br /&gt;
  v = boost::add_vertex(g);&lt;br /&gt;
  boost::add_edge(centerVertex, v, g);&lt;br /&gt;
  v = boost::add_vertex(g);&lt;br /&gt;
  boost::add_edge(centerVertex, v, g);&lt;br /&gt;
  v = boost::add_vertex(g);&lt;br /&gt;
  boost::add_edge(centerVertex, v, g);&lt;br /&gt;
  v = boost::add_vertex(g);&lt;br /&gt;
  boost::add_edge(centerVertex, v, g);&lt;br /&gt;
&lt;br /&gt;
  // Attach an additional vertex to one of the star arm vertices&lt;br /&gt;
  Vertex x = boost::add_vertex(g);&lt;br /&gt;
  boost::add_edge(v, x, g);&lt;br /&gt;
&lt;br /&gt;
  // std::map used for convenient initialization&lt;br /&gt;
  typedef std::map&amp;lt;Edge, int&amp;gt; StdEdgeIndexMap;&lt;br /&gt;
  StdEdgeIndexMap my_e_index;&lt;br /&gt;
  // associative property map needed for iterator property map-wrapper&lt;br /&gt;
  typedef boost::associative_property_map&amp;lt; StdEdgeIndexMap &amp;gt; EdgeIndexMap;&lt;br /&gt;
  EdgeIndexMap e_index(my_e_index);&lt;br /&gt;
&lt;br /&gt;
  // We use setS as edge-container -&amp;gt; no automatic indices&lt;br /&gt;
  // -&amp;gt; Create and set it explicitly&lt;br /&gt;
  int i = 0;&lt;br /&gt;
  BGL_FORALL_EDGES(edge, g, Graph)&lt;br /&gt;
  {&lt;br /&gt;
    my_e_index.insert(std::pair&amp;lt; Edge, int &amp;gt;( edge, i));&lt;br /&gt;
    ++i;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // Define EdgeCentralityMap&lt;br /&gt;
  std::vector&amp;lt; double &amp;gt; e_centrality_vec(boost::num_edges(g), 0.0);&lt;br /&gt;
  // Create the external property map&lt;br /&gt;
  boost::iterator_property_map&amp;lt; std::vector&amp;lt; double &amp;gt;::iterator, EdgeIndexMap &amp;gt;&lt;br /&gt;
          e_centrality_map(e_centrality_vec.begin(), e_index);&lt;br /&gt;
&lt;br /&gt;
  // Define VertexCentralityMap&lt;br /&gt;
  typedef boost::property_map&amp;lt; Graph, boost::vertex_index_t&amp;gt;::type VertexIndexMap;&lt;br /&gt;
  VertexIndexMap v_index = get(boost::vertex_index, g);&lt;br /&gt;
  std::vector&amp;lt; double &amp;gt; v_centrality_vec(boost::num_vertices(g), 0.0);&lt;br /&gt;
  // Create the external property map&lt;br /&gt;
  boost::iterator_property_map&amp;lt; std::vector&amp;lt; double &amp;gt;::iterator, VertexIndexMap &amp;gt;&lt;br /&gt;
          v_centrality_map(v_centrality_vec.begin(), v_index);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  std::cout &amp;lt;&amp;lt; &amp;quot;Before&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
  print_graph(g);&lt;br /&gt;
&lt;br /&gt;
  BGL_FORALL_EDGES(edge, g, Graph)&lt;br /&gt;
  {&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; edge &amp;lt;&amp;lt; &amp;quot;: &amp;quot; &amp;lt;&amp;lt; e_centrality_map[edge] &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // Write to graphviz -&amp;gt; illustrate the graph via 'neato -Tps before.dot &amp;gt; before.ps'&lt;br /&gt;
  WriteGraph(g, &amp;quot;before.dot&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Calculate the vertex and edge centralites&lt;br /&gt;
  // Can be used to get an initial impression about the edge centrality values for the graph&lt;br /&gt;
  //brandes_betweenness_centrality( g, v_centrality_map, e_centrality_map );&lt;br /&gt;
&lt;br /&gt;
  // Define the done-object:&lt;br /&gt;
  // 'false' means here that no normalization is performed, so edge centrality-values can become big&lt;br /&gt;
  // If set to 'true', values will range between 0 and 1 but will be more difficult to use for this&lt;br /&gt;
  // illustrative example.&lt;br /&gt;
  boost::bc_clustering_threshold&amp;lt; double &amp;gt; terminate(max_centrality, g, false);&lt;br /&gt;
&lt;br /&gt;
  //&lt;br /&gt;
  // Do the clustering&lt;br /&gt;
  // Does also calculate the brandes_betweenness_centrality and stores it in e_centrality_map&lt;br /&gt;
  //&lt;br /&gt;
  betweenness_centrality_clustering( g, terminate, e_centrality_map );&lt;br /&gt;
&lt;br /&gt;
  // Print the results&lt;br /&gt;
  std::cout &amp;lt;&amp;lt; &amp;quot;\nAfter&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
  print_graph(g);&lt;br /&gt;
&lt;br /&gt;
  BGL_FORALL_EDGES(edge, g, Graph)&lt;br /&gt;
  {&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; edge &amp;lt;&amp;lt; &amp;quot;: &amp;quot; &amp;lt;&amp;lt;e_centrality_map[edge] &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // Write to graphviz -&amp;gt; illustrate the graph via 'neato -Tps after.dot &amp;gt; after.ps'&lt;br /&gt;
  WriteGraph(g, &amp;quot;after.dot&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void WriteGraph(const Graph&amp;amp; g, const std::string&amp;amp; filename)&lt;br /&gt;
{&lt;br /&gt;
  std::ofstream graphStream;&lt;br /&gt;
  graphStream.open(filename.c_str());&lt;br /&gt;
  boost::write_graphviz(graphStream, g );&lt;br /&gt;
  graphStream.close();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CMakeLists.txt==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
cmake_minimum_required(VERSION 2.6)&lt;br /&gt;
&lt;br /&gt;
Project(BetweennessCentralityClustering)&lt;br /&gt;
&lt;br /&gt;
set(Boost_USE_MULTITHREADED ON)&lt;br /&gt;
FIND_PACKAGE(Boost 1.38 COMPONENTS required)&lt;br /&gt;
&lt;br /&gt;
INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIRS})&lt;br /&gt;
LINK_DIRECTORIES(${LINK_DIRECTORIES} ${Boost_LIBRARY_DIRS})&lt;br /&gt;
&lt;br /&gt;
ADD_EXECUTABLE(BetweennessCentralityClustering BetweennessCentralityClustering.cpp)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daviddoria</name></author>	</entry>

	</feed>