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

cmpGraph

The complementary graph


Description

Finds the complementary graph of an undirected graph.

Usage

cmpGraph(amat)

Arguments

amat

the adjacency matrix of an undirected graph

Details

The complementary graph of an UG is the graph that has the same set of nodes and an undirected edge connecting i and j whenever there is not an (i,j) edge in the original UG.

Value

the edge matrix of the complementary graph.

Author(s)

Giovanni M. Marchetti

References

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

See Also

Examples

## A chordless four-cycle
four <- UG(~ a*b + b*d + d*e + e*a)
four
cmpGraph(four)

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.