component_distribution(graph, cumulative = FALSE, mul.size = FALSE, ...)components(graph, mode = c("weak", "strong"))
cluster
, right now only
mode
makes sense.is_connected
a logical constant.For components
a named list with three components:
count_components
an integer constant is returned.For component_distribution
a numeric vector with the relative
frequencies. The length of the vector is the size of the largest component
plus one. Note that (for currently unknown reasons) the first element of the
vector is the number of clusters of size zero, so this is always zero.
is_connected
decides whether the graph is weakly or strongly
connected.components
finds the maximal (weakly or strongly) connected components
of a graph.
count_components
does almost the same as components
but returns only
the number of clusters found instead of returning the actual clusters.
component_distribution
creates a histogram for the maximal connected
component sizes.
The weakly connected components are found by a simple breadth-first search. The strongly connected components are implemented by two consecutive depth-first searches.
subcomponent
, groups
g <- sample_gnp(20, 1/20)
clu <- components(g)
groups(clu)
Run the code above in your browser using DataCamp Workspace