R igraph 手册页

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

is_degseq {igraph}R 文档

检查一个度序列对于多重图是否有效

描述

is_degseq 检查给定的顶点度(有向图的入度和出度)是否可以由一个图实现。请注意,该图不必是简单的,它可以包含环和多重边。对于无向图,它还会检查度的总和是否为偶数。对于有向图,该函数检查两个度向量的长度是否相等,以及它们的和是否也相等。这些是已知的度序列有效的充分必要条件。

用法

is_degseq(out.deg, in.deg = NULL)

参数

out.deg

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

in.deg

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

一个逻辑标量。

作者

Tamas Nepusz ntamas@gmail.com 和 Szabolcs Horvat szhorvat@gmail.com

参考

Z Kiraly, Recognizing graphic degree sequences and generating all realizations. TR-2011-11, Egervary Research Group, H-1117, Budapest, Hungary. ISSN 1587-4451 (2012).

B. Cloteaux, Is This for Real? Fast Graphicality Testing, Comput. Sci. Eng. 17, 91 (2015).

A. Berger, A note on the characterization of digraphic sequences, Discrete Math. 314, 38 (2014).

G. Cairns and S. Mendan, Degree Sequence for Graphs with Loops (2013).

参见

其他图度序列:is_graphical()

示例

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

[包 igraph 版本 1.3.5 索引]