clusters {igraph} | R Documentation |
is.connected(graph, mode="weak") clusters(graph, mode="weak") cluster.distribution(graph, cumulative = FALSE, mul.size = FALSE, ...)
graph |
The graph to analyze. |
mode |
Character string, either “weak” or “strong”. For directed graphs “weak” implies weakly, “strong” strongly connected components to search. It is ignored for undirected graphs. |
cumulative |
Logical, if TRUE the cumulative distirubution (relative frequency) is calculated. |
mul.size |
Logical. If TRUE the relative frequencies will be multiplied by the cluster sizes. |
... |
Additional attributes to pass to cluster , right
now only mode makes sense. |
is.connected
decides whether the graph is weakly or strongly
connected.
clusters
finds the maximal (weakly or strongly) connected
components of a graph.
cluster.distribution
creates a histogram for the maximal
connected component sizes.
Breadth-first search is conducted from each not-yet visited vertex.
For is.connected
a logical constant.
For clusters
a named list with two components:
membership |
numeric vector giving the cluster id to which each vertex belongs. |
csize |
numeric vector giving the sizes of the clusters. |
normal-bracket35bracket-normal
For cluster.distribution
a numeric vector with the relative
frequencies. The length of the vector is the number of components.
Gabor Csardi csardi@rmki.kfki.hu
g <- erdos.renyi.game(20, 1/20) clusters(g)