cmpGraph                 package:ggm                 R Documentation

_T_h_e _c_o_m_p_l_e_m_e_n_t_a_r_y _g_r_a_p_h

_D_e_s_c_r_i_p_t_i_o_n:

     Finds the complementary graph of an undirected graph.

_U_s_a_g_e:

     cmpGraph(amat)

_A_r_g_u_m_e_n_t_s:

    amat: the adjacency matrix of an undirected graph

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

     the edge matrix of the complementary graph.

_A_u_t_h_o_r(_s):

     Giovanni M. Marchetti

_R_e_f_e_r_e_n_c_e_s:

     Lauritzen, S. (1996). _Graphical models_. Oxford: Clarendon Press.

_S_e_e _A_l_s_o:

     'UG', 'DAG'

_E_x_a_m_p_l_e_s:

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

