simplify(graph, remove.multiple = TRUE, remove.loops = TRUE,
edge.attr.comb = getIgraphOpt("edge.attr.comb"))
is.simple(graph)
remove.multiple=TRUE
. In this case many edges might be mapped
to a single one in the new graph, and their attributes are
combined. Please see
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.
is.loop
, is.multiple
and
count.multiple
, delete.edges
,
delete.vertices
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))
Run the code above in your browser using DataLab