| strongComp {RBGL} | R Documentation |
The strongly connected components in a directed graph are identified and returned as a list.
strongComp(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
connComp,connectedComp, same.component
km <- fromGXL(file(system.file("XML/kmstEx.gxl",package="RBGL"), open="r"))
km<- graph::addNode(c("F","G","H"), km)
km<- addEdge("G", "H", km, 1)
km<- addEdge("H", "G", km, 1)
strongComp(km)
connectedComp(ugraph(km))