R igraph 手册页

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

is_graphical {igraph}R 文档

一个度序列是否是可图的?

描述

确定给定的顶点度(有向图的入度和出度)是否可以在图中实现。

用法

is_graphical(
  out.deg,
  in.deg = NULL,
  allowed.edge.types = c("simple", "loops", "multi", "all")
)

参数

out.deg

整数向量,无向图的度序列,或者有向图的出度序列。

in.deg

NULL 或整数向量。对于无向图,应为 NULL。对于有向图,它指定入度。

allowed.edge.types

图中允许的边类型。“simple”表示既不允许环也不允许多重边(即,图必须是简单的)。“loops”表示允许环边,但不允许多重边。“multi”表示允许多重边,但不允许环边。“all”表示允许环边和多重边。

详细信息

可图性的经典概念假定简单图。当图中允许自环、多重边或两者时,此函数也可以执行检查。

一个逻辑标量。

作者

Tamas Nepusz ntamas@gmail.com

参考

Hakimi SL: On the realizability of a set of integers as degrees of the vertices of a simple graph. J SIAM Appl Math 10:496-506, 1962.

PL Erdos, I Miklos and Z Toroczkai: A simple Havel-Hakimi type algorithm to realize graphical degree sequences of directed graphs. The Electronic Journal of Combinatorics 17(1):R66, 2010.

参见

其他可图的度序列:is_degseq()

示例

g <- sample_gnp(100, 2/100)
is_degseq(degree(g))
is_graphical(degree(g))

[包 igraph 版本 1.3.5 索引]