conComp | R Documentation |
Finds the connectivity components of a graph.
conComp(amat, method)
amat |
a square matrix with dimnames, the adjacency matrix of an UG. |
method |
an integer 1 or 2 to choose the method used to find the components. Method 2 is more efficient for large graphs. |
an integer vector representing a partition of the set of nodes.
Giovanni M. Marchetti
Lauritzen, S. (1996). Graphical models. Oxford: Clarendon Press.
UG
## three connected components
conComp(UG(~a*c+c*d+e+g*o*u))
## a connected graph
conComp(UG(~ a*b+b*c+c*d+d*a))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.