Given a graph (possibly weighted) split into communities, the expansion of a community
is the sum of all edge weights connecting it to the rest of the graph divided by the number
of vertices in the community
Usage
expansion(g, com)
Value
Numeric vector with the expansion of each community.
Arguments
g
Graph to be analyzed (as an igraph object). If the edges have a "weight"
attribute, those will be used as weights.
com
community membership integer vector. Each element corresponds to a vertex.