R igraph 手册页

如果您从 R 中使用 igraph,请使用此选项

complementer {igraph}R 文档

图的补图

描述

一个图的补图包含所有在输入图中不存在的边。

用法

complementer(graph, loops = FALSE)

参数

输入图,可以是定向图或无向图。

循环

逻辑常量,是否生成环边。

详细信息

complementer 创建一个图的补图。只有在原始图中存在的边才会被包含在新图中。

complementer 保留图和顶点属性,但边属性会丢失。

一个新的图对象。

作者

Gabor Csardi csardi.gabor@gmail.com

示例


## 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)))


[包 igraph 版本 1.3.5 索引]