simplify               package:igraph               R Documentation

_S_i_m_p_l_e _g_r_a_p_h_s

_D_e_s_c_r_i_p_t_i_o_n:

     Simple graphs are graphs which do not contain loop and multiple
     edges.

_U_s_a_g_e:

     simplify(graph, remove.multiple = TRUE, remove.loops = TRUE)
     is.simple(graph)

_A_r_g_u_m_e_n_t_s:

   graph: The graph to work on.

remove.loops: Logical, whether the loop edges are to be removed.

remove.multiple: Logical, whether the multiple edges are to be removed.

_D_e_t_a_i_l_s:

     A loop edge is an edge for which the two endpoints are the same
     vertex. Two edges are multiple edges if they have exactly the same
     two endpoints (for directed graphs order does matter). A graph is
     simple is it does not contain loop edges and multiple edges.

     'is.simple' checks whether a graph is simple.

     'simplify' removes the loop and/or multiple edges from a graph. If
     both 'remove.loops' and 'remove.multiple' are 'TRUE' the function
     returns a simple graph.

_V_a_l_u_e:

     A new graph object with the edges deleted.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_S_e_e _A_l_s_o:

     'is.loop', 'is.multiple' and 'count.multiple', 'delete.edges',
     'delete.vertices'

_E_x_a_m_p_l_e_s:

     g <- graph( c(1,2,1,2,3,3) )
     is.simple(g)
     is.simple(simplify(g, remove.loops=FALSE))
     is.simple(simplify(g, remove.multiple=FALSE))
     is.simple(simplify(g))

