};
// 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.
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;