3.4. igraph_le_community_to_membership — Vertex membership from the leading eigenvector community structure

int igraph_le_community_to_membership(const igraph_matrix_t *merges,
				      igraph_integer_t steps,
				      igraph_vector_t *membership,
				      igraph_vector_t *csize);

This function creates a membership vector from the result of igraph_community_leading_eigenvector() or igraph_community_leading_eigenvector_naive(). It takes membership and permformes steps merges, according to the supplied merges matrix.

Arguments: 

merges:

The matrix defining the merges to make. This is usually from the output of the leading eigenvector community structure detection routines.

steps:

The number of steps to make according to merges.

membership:

Initially the starting membership vector, on output the resulting membership vector, after performing steps merges.

csize:

Optionally the sizes of the commmunities is stored here, if this is not a null pointer, but an initialized vector.

Returns: 

Error code.

Time complexity: O(|V|), the number of vertices.