complementer | R Documentation |
A complementer graph contains all edges that were not present in the input graph.
complementer(graph, loops = FALSE)
graph |
The input graph, can be directed or undirected. |
loops |
Logical constant, whether to generate loop edges. |
complementer()
creates the complementer of a graph. Only edges
which are not present in the original graph will be included in the
new graph.
complementer()
keeps graph and vertex attriubutes, edge
attributes are lost.
A new graph object.
Gabor Csardi csardi.gabor@gmail.com
Other functions for manipulating graph structure:
+.igraph()
,
add_edges()
,
add_vertices()
,
compose()
,
connect()
,
contract()
,
delete_edges()
,
delete_vertices()
,
difference()
,
difference.igraph()
,
disjoint_union()
,
edge()
,
igraph-minus
,
intersection()
,
intersection.igraph()
,
path()
,
permute()
,
rep.igraph()
,
reverse_edges()
,
simplify()
,
union()
,
union.igraph()
,
vertex()
## Complementer of a ring
g <- make_ring(10)
complementer(g)
## A graph and its complementer give together the full graph
g <- make_ring(10)
gc <- complementer(g)
gu <- union(g, gc)
gu
graph.isomorphic(gu, make_full_graph(vcount(g)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.