The brandes_betweenness_centrality() function computes the
betweenness centrality of the vertices and edges in a graph. The
method of calculating betweenness centrality in O(V) space is due to
Brandes [Brandes01]. The algorithm itself is a modification of
Brandes algorithm by Edmonds [Edmonds09].

The graph type must be a model of Distributed Graph. The graph
type must also model the Incidence Graph concept. 0-weighted
edges in g will result in undefined behavior.

IN: CentralityMapcentrality

A centrality map may be supplied to the algorithm, if not supplied a
dummy_property_map will be used and no vertex centrality
information will be recorded. The CentralityMap type must be a
Distributed Property Map. The key type must be the graph's
vertex descriptor type.

Default: A dummy_property_map.

IN: EdgeCentralityMapedge_centrality_map

An edge centrality map may be supplied to the algorithm, if not
supplied a dummy_property_map will be used and no edge
centrality information will be recorded. The EdgeCentralityMap
type must be a Distributed Property Map. The key type must be
the graph's vertex descriptor type.

Default: A dummy_property_map.

IN: IncomingMapincoming

The incoming map contains the incoming edges to a vertex that are
part of shortest paths to that vertex. The IncomingMap type
must be a Distributed Property Map. Its key type and value type
must both be the graph's vertex descriptor type.

Default: An iterator_property_map created from a

std::vector of std::vector of the graph's vertex
descriptor type.

IN: DistanceMapdistance

The distance map records the distance to vertices during the
shortest paths portion of the algorithm. The DistanceMap type
must be a Distributed Property Map. Its key type must be the
graph's vertex descriptor type.

Default: An iterator_property_map created from a

std::vector of the value type of the CentralityMap.

IN: DependencyMapdependency

The dependency map records the dependency of each vertex during the
centrality calculation portion of the algorithm. The
DependencyMap type must be a Distributed Property Map. Its
key type must be the graph's vertex descriptor type.

Default: An iterator_property_map created from a

std::vector of the value type of the CentralityMap.

IN: PathCountMappath_count

The path count map records the number of shortest paths each vertex
is on during the centrality calculation portion of the algorithm.
The PathCountMap type must be a Distributed Property Map.
Its key type must be the graph's vertex descriptor type.

Default: An iterator_property_map created from a

std::vector of the graph's degree size type.

IN: VertexIndexMapvertex_index

A model of Readable Property Map whose key type is the vertex
descriptor type of the graph g and whose value type is an
integral type. The property map should map from vertices to their
(local) indices in the range [0, num_vertices(g)).

Default: get(vertex_index,g)

IN: WeightMapweight_map

A model of Readable Property Map whose key type is the edge
descriptor type of the graph g. If not supplied the betweenness
centrality calculation will be unweighted.

IN: Buffersources

A model of Buffer containing the starting vertices for the
algorithm. If sources is empty a complete betweenness
centrality calculation using all vertices in g will be
performed. The value type of the Buffer must be the graph's vertex
descriptor type.

For the vertices in sources (or all vertices in g when
sources is empty) the algorithm first calls a customized
implementation of delta_stepping_shortest_paths which maintains a
shortest path tree using an IncomingMap. The IncomingMap
contains the source of all incoming edges on shortest paths.

The IncomingMap defines the shortest path DAG at the target of the
edges in the shortest paths tree. In the bidirectional case edge
flags could be used to translate the shortest paths information to the
source of the edges. Setting edge flags during the shortest path
computation rather than using an IncomingMap would result in
adding an O(V) factor to the inner loop of the shortest paths
computation to account for having to clear edge flags when a new
shortest path is found. This would increase the complexity of the
algorithm. Asymptotically, the current implementation is better,
however using edge flags in the bidirectional case would reduce the
number of supersteps required by the depth of the shortest paths DAG
for each vertex. Currently an outgoing map is explicitly
constructed by simply reversing the edges in the incoming map. Once
the outgoing map is constructed it is traversed in dependency
order from the source of the shortest paths calculation in order to
compute path counts. Once path counts are computed the shortest paths
DAG is again traversed in dependency order from the source to
calculate the dependency and centrality of each vertex.

The algorithm is complete when the centrality has been computed from
all vertices in g.