How to calculate betweenness using boostlib for adjacency list?
问题 I'm trying to write a simple program to calculate betweeness using brandes_betweenness_centrality from boostlib. I got stuck at getting an output (CentralityMap). I've been reading the documentation but I can't figure out how to put it all together. Here is my simple code: #include <iostream> // std::cout #include <utility> // std::pair #include <boost/graph/graph_traits.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/betweenness_centrality.hpp> using namespace boost; int