Hello.
I try to calculate brandes_betweenness_centrality.
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include <iostream>
#include <algorithm>
#include
using namespace boost;
using namespace graph;
using namespace distributed;
namespace mpi = boost::mpi;
typedef boost::adjacency_list,
undirectedS> Graph;
typedef boost::unique_rmat_iterator RMATGen;
struct no_self_loops
{
no_self_loops() {}
bool operator()(const std::pair& e) { return e.first != e.second; }
};
int main(int argc, char* argv[])
{
boost::mpi::environment env(argc, argv);
boost::minstd_rand gen;
unsigned int SCALE = atoi(argv[1]);
unsigned int EDGE_FACTOR = atoi(argv[2]);
unsigned int N = pow(2, SCALE);
unsigned int E = EDGE_FACTOR * N;
Graph g(
boost::make_filter_iterator
(
RMATGen(gen, N, E, 0.45, 0.15, 0.15, 0.25), RMATGen()),
boost::make_filter_iterator(RMATGen(), RMATGen()),
N);
typedef boost::property_map::type LocalMap;
boost::parallel::distributed_property_map centrality_map;
//brandes_betweenness_centrality(g, centrality_map);
}
What should be here "|||||" ?
I see
http://www.boost.org/doc/libs/1_55_0/libs/graph_parallel/doc/html/distribute...
template
Key: The key_type of the distributed property map, which must model the
Global Descriptor concept
But don`t understand, is not work - typedef
property_traits<LocalMap>::key_type key_type;
Can you provide example?