strongComp {RBGL} | R Documentation |
The strongly connected components in a directed graph are identified and returned as a list.
strongComp(g)
g |
g: graph with edgemode “directed”. |
Tarjan's algorithm is used to determine all strongly connected components of a directed graph.
A list whose length is the number of strongly connected components in
g
. Each element of the list is a vector of the node labels for
the nodes in that component.
Vince Carey <stvjc@channing.harvard.edu>
Boost Graph Library
km <- fromGXL(file(system.file("XML/kmstEx.gxl",package="RBGL"))) km@nodes <- c(km@nodes,"F","G","H") km@edgeL$F <- list(edges=numeric(0)) km@edgeL$G <- list(edges=8) km@edgeL$H <- list(edges=7) strongComp(km) connectedComp(ugraph(km))