The complementary graph
Finds the complementary graph of an undirected graph.
cmpGraph(amat)
amat
: the adjacency matrix of an undirected graphThe complementary graph of an UG is the graph that has the same set of nodes and an undirected edge connecting and
whenever there is not an edge in the original UG.
the edge matrix of the complementary graph.
Lauritzen, S. (1996). Graphical models. Oxford: Clarendon Press.
Giovanni M. Marchetti
UG
, DAG
## A chordless four-cycle four <- UG(~ a*b + b*d + d*e + e*a) four cmpGraph(four)