Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

conComp

Connectivity components


Description

Finds the connectivity components of a graph.

Usage

conComp(amat, method)

Arguments

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.

Value

an integer vector representing a partition of the set of nodes.

Author(s)

Giovanni M. Marchetti

References

Lauritzen, S. (1996). Graphical models. Oxford: Clarendon Press.

See Also

Examples

## 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))

ggm

Graphical Markov Models with Mixed Graphs

v2.5
GPL-2
Authors
Giovanni M. Marchetti, Mathias Drton, Kayvan Sadeghi
Initial release
2020-02-014

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.