#include #include #include #include #include using namespace std; using namespace boost; struct VertexProperties { string name; }; struct EdgeProperties { int weight; }; int main(int argc, char** argv) { typedef graph::distributed::mpi_process_group process_group_type; mpi::environment env(argc, argv); process_group_type pg; // create graph typedef adjacency_list Graph; Graph g; // ... load graph data... // compute betweenness vector centrality(num_vertices(g)); typedef iterator_property_map::iterator, typename property_map::type, double, double&> CentralityMap; CentralityMap centrality_property = make_iterator_property_map(centrality.begin(), get(vertex_index, g)); // the following compiles non_distributed_brandes_betweenness_centrality(pg, g, centrality_map(centrality_property) .weight_map(get(&EdgeProperties::weight, g))); // the following does not compile //non_distributed_brandes_betweenness_centrality(pg, g, // centrality_map(centrality_property)); return 0; }