Find the topologically-connected components of a linear network.
A linear network (object of class
Character string specifying the kind of result.
connected is generic. This is the method for
linear networks (objects of class
Two vertices of the network are connected if they are joined by a path in the network. This function divides the network into subsets, such that all points in a subset are connected to each other.
what="labels" the return value is a factor with one entry
for each vertex of
X, identifying which connected component the
vertex belongs to.
what="components" the return value is a list of linear
networks, which are the connected components of
what="labels", a factor.
what="components", a list of linear networks.
and Suman Rakshit.
1 2 3 4 5 6 7 8 9
# remove some edges from a network to make it disconnected plot(simplenet, col="grey", main="", lty=2) A <- thinNetwork(simplenet, retainedges=-c(3,5)) plot(A, add=TRUE, lwd=2) # find the connected components connected(A) cA <- connected(A, what="components") plot(cA[], add=TRUE, col="green", lwd=2) plot(cA[], add=TRUE, col="blue", lwd=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.