]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/graph/example/influence_prestige.cpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / libs / graph / example / influence_prestige.cpp
index e7d26f134dec4a27a3512279fb5e70dab08af9a5..65abac3bfbaea03435224316a1f59ba0d51891fb 100644 (file)
@@ -24,23 +24,22 @@ struct Actor
 };
 
 // Declare the graph type and its vertex and edge types.
-typedef directed_graph<Actor> Graph;
-typedef graph_traits<Graph>::vertex_descriptor Vertex;
-typedef graph_traits<Graph>::edge_descriptor Edge;
+typedef directed_graph< Actor > Graph;
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+typedef graph_traits< Graph >::edge_descriptor Edge;
 
 // The name map provides an abstract accessor for the names of
 // each vertex. This is used during graph creation.
-typedef property_map<Graph, string Actor::*>::type NameMap;
+typedef property_map< Graph, string Actor::* >::type NameMap;
 
 // Declare a container type for influence and prestige (both
 // of which are degree centralities) and its corresponding
 // property map.
-typedef exterior_vertex_property<Graph, unsigned> CentralityProperty;
+typedef exterior_vertex_property< Graph, unsigned > CentralityProperty;
 typedef CentralityProperty::container_type CentralityContainer;
 typedef CentralityProperty::map_type CentralityMap;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char* argv[])
 {
     // Create the graph and a property map that provides
     // access to the actor names.
@@ -61,13 +60,12 @@ main(int argc, char *argv[])
     all_prestige_values(g, pm);
 
     // Print the degree centrality of each vertex
-    graph_traits<Graph>::vertex_iterator i, end;
-    for(boost::tie(i, end) = vertices(g); i != end; ++i) {
+    graph_traits< Graph >::vertex_iterator i, end;
+    for (boost::tie(i, end) = vertices(g); i != end; ++i)
+    {
         Vertex v = *i;
-        cout << setiosflags(ios::left) << setw(12)
-             << g[v].name << "\t"
-             << im[v] << "\t"
-             << pm[v] << endl;
+        cout << setiosflags(ios::left) << setw(12) << g[v].name << "\t" << im[v]
+             << "\t" << pm[v] << endl;
     }
 
     return 0;