| igraph Reference Manual |
|---|
int igraph_clusters(const igraph_t *graph, igraph_vector_t *membership, igraph_vector_t *csize, igraph_integer_t *no, igraph_connectedness_t mode);
Arguments:
|
The graph object to analyze. |
|
First half of the result will be stored here. For
every vertex the id of its component is given. The vector
has to be preinitialized and will be resized. Alternatively
this argument can be |
|
The second half of the result. For every component it
gives its size, the order is defined by the component ids.
The vector has to be preinitialized and will be resized.
Alternatively this argument can be |
|
Pointer to an integer, if not |
|
For directed graph this specifies whether to calculate
weakly or strongly connected components. Possible values:
|
Returns:
Error code:
|
Time complexity: O(|V|+|E|), |V| and |E| are the number of vertices and edges in the graph.
<< 4.2. igraph_subgraph — Creates a subgraph with the specified vertices. |
4.4. igraph_is_connected — Decides whether the graph is (weakly or strongly) connected. >> |