|igraph Reference Manual|
int igraph_community_to_membership(const igraph_matrix_t *merges, igraph_integer_t nodes, igraph_integer_t steps, igraph_vector_t *membership, igraph_vector_t *csize);
This function creates a membership vector from a community
structure dendrogram. A membership vector contains for each vertex
the id of its graph component, the graph components are numbered
from zero, see the same argument of
igraph_clusters() for an
example of a membership vector.
Many community detection algorithms return with a merges
igraph_community_edge_betweenness() are two examples. The matrix
contains the merge operations performed while mapping the
hierarchical structure of a network. If the matrix has
n is the number of vertices in the graph, then it contains
the hierarchical structure of the whole network and it is called a
This function performs
steps merge operations as prescribed by
merges matrix and returns the current state of the network.
merges is not a complete dendrogram, it is possible to
steps steps if
steps is not bigger than the number
The two-column matrix containing the merge
The number of leaf nodes in the dendrogram
Integer constant, the number of steps to take.
Pointer to an initialied vector, the membership results will be stored here, if not NULL. The vector will be resized as needed.
Pointer to an initialized vector, or NULL. If not NULL then the sizes of the components will be stored here, the vector will be resized as needed.
Time complexity: O(|V|), the number of vertices in the graph.
||2. Community structure based on statistical mechanics >>|